ai-agents-for-beginners icon indicating copy to clipboard operation
ai-agents-for-beginners copied to clipboard

Standardize environment variable naming convention across all code samples

Open MamoruKuroda opened this issue 5 months ago • 1 comments

Environment Variable Standardization

Currently, the repository uses inconsistent environment variable naming conventions across different code samples and chapters. This creates confusion for learners and makes the setup process more complex than necessary.

Problem

  • Different samples use varying naming patterns (e.g., AZURE_AI_AGENT_MODEL_DEPLOYMENT_NAME vs MODEL_DEPLOYMENT_NAME)
  • Inconsistent variable names between .env.example files and actual code usage
  • Learners need to manage multiple different variable names for similar purposes
  • Setup instructions become unclear due to naming variations

Proposed Solution

  1. Standardize variable naming across all samples

    • Use consistent, descriptive names (e.g., AZURE_OPENAI_ENDPOINT, AZURE_OPENAI_API_KEY)
    • Follow a unified naming convention (Azure service prefix + descriptive suffix)
  2. Update root .env.example to reflect standardized names

  3. Implement backward compatibility with fallback logic

    deployment_name = os.getenv("MODEL_DEPLOYMENT_NAME") or os.getenv("AZURE_AI_AGENT_MODEL_DEPLOYMENT_NAME")
    
  4. Update all English code samples to use the new standardized names

Benefits

✅ Improved developer experience with consistent variable naming ✅ Simplified setup process for beginners
✅ Reduced confusion and support requests ✅ Better maintainability across the repository ✅ Future-proof naming convention for new samples

Scope

  • Root .env.example file
  • All code samples in English chapters (01-11)
  • Documentation updates where environment variables are referenced
  • Maintain backward compatibility to avoid breaking existing setups

Priority

Medium - improves user experience but doesn't break existing functionality

Labels

enhancement documentation good first issue

MamoruKuroda avatar Jul 28 '25 05:07 MamoruKuroda

👋 Thanks for contributing @MamoruKuroda! We will review the issue and get back to you soon.

github-actions[bot] avatar Jul 28 '25 05:07 github-actions[bot]