.NET: fix: Standardize OpenAI API key environment variable naming (#1001) #2629
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Contribution Checklist
Motivation and Context
Why is this change required?
The codebase had inconsistent environment variable naming for OpenAI API keys across samples.
What problem does it solve?
Eliminates confusion caused by mixed usage of
OPENAI_APIKEYandOPENAI_API_KEY.What scenario does it contribute to?
Ensures all samples and documentation use standardized environment variable naming aligned with OpenAI conventions.
Related Issue
Fixes #1001
Description
Changes Made
Standardized OpenAI API key environment variable naming across 15 files:
OPENAI_APIKEY→OPENAI_API_KEY(14 occurrences)AZURE_FOUNDRY_OPENAI_APIKEY→AZURE_FOUNDRY_OPENAI_API_KEY(1 occurrence)Affected Files
Approach
Simple find-and-replace operation to standardize naming convention. No functional changes to code logic.
Contribution Checklist
Additional Notes
Verification Steps Completed
OPENAI_APIKEYoccurrences in codebaseAZURE_FOUNDRY_OPENAI_APIKEYoccurrencesCI/CD Checks