Skip to content

Comments

.NET Samples - Configuration Naming Update#4149

Open
Copilot wants to merge 21 commits intocrickman/dotnet-sample-improvementsfrom
copilot/rename-configuration-settings
Open

.NET Samples - Configuration Naming Update#4149
Copilot wants to merge 21 commits intocrickman/dotnet-sample-improvementsfrom
copilot/rename-configuration-settings

Conversation

Copy link
Contributor

Copilot AI commented Feb 21, 2026

Motivation and Context

Rename configuration settings for consistency within .NET and also between .NET and Python.

Validation

Most recent integration test runs:

.NET - https://github.com/microsoft/agent-framework/actions/runs/22326836567
Python - https://github.com/microsoft/agent-framework/actions/runs/22363194830

Description

Applied the following updates to configuration names:

Original Actual
SERVER_URL AGUI_SERVER_URL
OTLP_ENDPOINT OTEL_EXPORTER_OTLP_ENDPOINT
Anthropic.ApiKey ANTHROPIC_API_KEY
Anthropic.ChatModelId ANTHROPIC_CHAT_MODEL_NAME
Anthropic.ChatReasoningModelId ANTHROPIC_REASONING_MODEL_NAME
Anthropic.ServiceId ANTHROPIC_SERVICE_ID
ANTHROPIC_APIKEY ANTHROPIC_API_KEY
ANTHROPIC_DEPLOYMENT_NAME ANTHROPIC_CHAT_MODEL_NAME
ANTHROPIC_MODEL ANTHROPIC_CHAT_MODEL_NAME
BEDROCK_ACCESSKEY BEDROCK_ACCESS_KEY
BEDROCK_SECRETACCESSKEY BEDROCK_SECRET_KEY
AZURE_FOUNDRY_MODEL_DEPLOYMENT AZURE_AI_MODEL_DEPLOYMENT_NAME
AZURE_FOUNDRY_OPENAI_API_KEY AZURE_OPENAI_API_KEY
AZURE_FOUNDRY_PROJECT_DEEP_RESEARCH_DEPLOYMENT_NAME AZURE_AI_REASONING_DEPLOYMENT_NAME
AZURE_FOUNDRY_PROJECT_DEPLOYMENT_NAME AZURE_AI_MODEL_DEPLOYMENT_NAME
AZURE_FOUNDRY_PROJECT_ENDPOINT AZURE_AI_PROJECT_ENDPOINT
AzureAI.BingConnectionId AZURE_AI_BING_CONNECTION_ID
AzureAI.DeploymentName AZURE_AI_MODEL_DEPLOYMENT_NAME
AzureAI.Endpoint AZURE_AI_PROJECT_ENDPOINT
AZURE_OPENAI_CHAT_DEPLOYMENT_NAME AZURE_OPENAI_DEPLOYMENT_NAME
AZURE_OPENAI_DEPLOYMENT AZURE_OPENAI_DEPLOYMENT_NAME
AZURE_OPENAI_KEY AZURE_OPENAI_API_KEY
BING_CONNECTION_ID AZURE_AI_BING_CONNECTION_ID
BING_CUSTOM_SEARCH_PROJECT_CONNECTION_ID AZURE_AI_CUSTOM_SEARCH_CONNECTION_ID
BING_CUSTOM_SEARCH_INSTANCE_NAME AZURE_AI_CUSTOM_SEARCH_INSTANCE_NAME
COSMOS_EMULATOR_AVAILABLE COSMOSDB_EMULATOR_AVAILABLE
COSMOS_PRESERVE_CONTAINERS COSMOSDB_PRESERVE_CONTAINERS
FOUNDRY_CONNECTION_GROUNDING_TOOL AZURE_AI_BING_CONNECTION_ID
FOUNDRY_MEDIA_DEPLOYMENT_NAME AZURE_AI_MODEL_DEPLOYMENT_NAME
FOUNDRY_MODEL_DEPLOYMENT_NAME AZURE_AI_MODEL_DEPLOYMENT_NAME
FOUNDRY_PROJECT_ENDPOINT AZURE_AI_PROJECT_ENDPOINT
FOUNDRY_PROJECT_EMBEDDING_MODEL AZURE_AI_EMBEDDING_DEPLOYMENT_NAME
FOUNDRY_PROJECT_MEMORY_STORE_NAME AZURE_AI_MEMORY_STORE_ID
Mem0.ApiKey MEM0_API_KEY
Mem0.ServiceUri MEM0_ENDPOINT
MEM0_APIKEY MEM0_API_KEY
CopilotStudioAgent.AppClientId COPILOTSTUDIO_AGENT_APP_ID
CopilotStudioAgent.DirectConnectUrl COPILOTSTUDIO_DIRECT_CONNECT_URL
CopilotStudioAgent.TenantId COPILOTSTUDIO_TENANT_ID
OpenAI.ApiKey OPENAI_API_KEY
OpenAI.ChatModelId OPENAI_CHAT_MODEL_NAME
OpenAI.ChatReasoningModelId OPENAI_REASONING_MODEL_NAME
OpenAI.ServiceId OPENAI_SERVICE_ID
OPENAI_MODEL OPENAI_CHAT_MODEL_NAME

Co-authored-by: crickman <66376200+crickman@users.noreply.github.com>
Copilot AI changed the title [WIP] Update configuration setting names in dotnet samples Rename configuration keys in dotnet/samples to standardized names Feb 21, 2026
Copilot AI requested a review from crickman February 21, 2026 21:32
@markwallace-microsoft markwallace-microsoft added documentation Improvements or additions to documentation .NET labels Feb 22, 2026
@github-actions github-actions bot changed the title Rename configuration keys in dotnet/samples to standardized names .NET: Rename configuration keys in dotnet/samples to standardized names Feb 22, 2026
@crickman crickman changed the title .NET: Rename configuration keys in dotnet/samples to standardized names .NET Samples - Configuration Naming Update Feb 22, 2026
@crickman crickman moved this to In Review in Agent Framework Feb 22, 2026
@crickman crickman added the samples Issue relates to the samples label Feb 22, 2026
@crickman crickman marked this pull request as ready for review February 22, 2026 00:22
Comment on lines +208 to +210
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENAI_CHAT_MODEL_NAME: ${{ vars.OPENAI_CHAT_MODEL_NAME }}
OPENAI_REASONING_MODEL_NAME: ${{ vars.OPENAI_REASONING_MODEL_NAME }}
Copy link
Member

@rogerbarreto rogerbarreto Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@crickman I think not using "__" double underscores breaks the UserSecrets approach please ensure we can safely use single _

Copy link
Contributor

@crickman crickman Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

User-secrets are still functional, the keys have just changed. Instead of a binding to a configuration class, the configuration keys are simply read directly. While I'm fond of class-binding for configuration, these provides alignnment between sample usage and integration tests.

Here an example of integration test secrets for local usage:

{
  "AZURE_AI_PROJECT_ENDPOINT": "https://<foundry>.services.ai.azure.com/api/projects/<project>",
  "AZURE_AI_MODEL_DEPLOYMENT_NAME": "gpt-4.1",
  "AZURE_AI_REASONING_DEPLOYMENT_NAME": "o3",
  "AZURE_AI_EMBEDDING_DEPLOYMENT_NAME": "text-embedding-3-large",
  "AZURE_AI_BING_CONNECTION_ID": "skbinggrounding"
}

Here is the simplified shared configuration keys: https://github.com/microsoft/agent-framework/blob/copilot/rename-configuration-settings/dotnet/src/Shared/IntegrationTests/TestSettings.cs

I've verified this works from the command line with no environmental vars defined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation .NET samples Issue relates to the samples

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

4 participants