diff --git a/dotnet/tests/Microsoft.Agents.AI.DurableTask.IntegrationTests/TestHelper.cs b/dotnet/tests/Microsoft.Agents.AI.DurableTask.IntegrationTests/TestHelper.cs index 53c00c91ed..75af1e82ac 100644 --- a/dotnet/tests/Microsoft.Agents.AI.DurableTask.IntegrationTests/TestHelper.cs +++ b/dotnet/tests/Microsoft.Agents.AI.DurableTask.IntegrationTests/TestHelper.cs @@ -116,10 +116,14 @@ internal sealed class TestHelper : IDisposable internal static ChatClient GetAzureOpenAIChatClient(IConfiguration configuration) { - string azureOpenAiEndpoint = configuration["AZURE_OPENAI_ENDPOINT"] - ?? throw new InvalidOperationException("The required AZURE_OPENAI_ENDPOINT env variable is not set."); - string azureOpenAiDeploymentName = configuration["AZURE_OPENAI_DEPLOYMENT"] - ?? throw new InvalidOperationException("The required AZURE_OPENAI_DEPLOYMENT env variable is not set."); + string azureOpenAiEndpoint = + configuration["AZUREAI:ENDPOINT"] ?? // Defined in dotnet-build-and-test.yml (as AZUREAI__ENDPOINT) + configuration["AZURE_OPENAI_ENDPOINT"] ?? // Legacy + throw new InvalidOperationException("The required AZUREAI__ENDPOINT or AZURE_OPENAI_ENDPOINT env variable is not set."); + string azureOpenAiDeploymentName = + configuration["AZUREAI:DEPLOYMENTNAME"] ?? // Defined in dotnet-build-and-test.yml (as AZUREAI__DEPLOYMENTNAME) + configuration["AZURE_OPENAI_DEPLOYMENT"] ?? // Legacy + throw new InvalidOperationException("The required AZUREAI__DEPLOYMENTNAME or AZURE_OPENAI_DEPLOYMENT env variable is not set."); // Check if AZURE_OPENAI_KEY is provided for token-based authentication string? azureOpenAiKey = configuration["AZURE_OPENAI_KEY"]; diff --git a/dotnet/tests/Microsoft.Agents.AI.Hosting.AzureFunctions.IntegrationTests/SamplesValidation.cs b/dotnet/tests/Microsoft.Agents.AI.Hosting.AzureFunctions.IntegrationTests/SamplesValidation.cs index 9572b097ae..cf5c6ea720 100644 --- a/dotnet/tests/Microsoft.Agents.AI.Hosting.AzureFunctions.IntegrationTests/SamplesValidation.cs +++ b/dotnet/tests/Microsoft.Agents.AI.Hosting.AzureFunctions.IntegrationTests/SamplesValidation.cs @@ -635,10 +635,14 @@ public sealed class SamplesValidation(ITestOutputHelper outputHelper) : IAsyncLi RedirectStandardError = true, }; - string openAiEndpoint = s_configuration["AZURE_OPENAI_ENDPOINT"] - ?? throw new InvalidOperationException("AZURE_OPENAI_ENDPOINT is not set in the environment variables or user secrets"); - string openAiDeployment = s_configuration["AZURE_OPENAI_DEPLOYMENT"] - ?? throw new InvalidOperationException("AZURE_OPENAI_DEPLOYMENT is not set in the environment variables or user secrets"); + string openAiEndpoint = + s_configuration["AZUREAI:ENDPOINT"] ?? // Defined in dotnet-build-and-test.yml (as AZUREAI__ENDPOINT) + s_configuration["AZURE_OPENAI_ENDPOINT"] ?? // Legacy + throw new InvalidOperationException("The required AZUREAI__ENDPOINT or AZURE_OPENAI_ENDPOINT env variable is not set."); + string openAiDeployment = + s_configuration["AZUREAI:DEPLOYMENTNAME"] ?? // Defined in dotnet-build-and-test.yml (as AZUREAI__DEPLOYMENTNAME) + s_configuration["AZURE_OPENAI_DEPLOYMENT"] ?? // Legacy + throw new InvalidOperationException("The required AZUREAI__DEPLOYMENTNAME or AZURE_OPENAI_DEPLOYMENT env variable is not set."); // Set required environment variables for the function app (see local.settings.json for required settings) startInfo.EnvironmentVariables["AZURE_OPENAI_ENDPOINT"] = openAiEndpoint; diff --git a/schemas/durable-agent-entity-state.json b/schemas/durable-agent-entity-state.json index 7ec195f89f..bf6fff9bfa 100644 --- a/schemas/durable-agent-entity-state.json +++ b/schemas/durable-agent-entity-state.json @@ -144,7 +144,7 @@ }, "createdAt": { "type": "string", "format": "date-time", "description": "When this message was created (RFC 3339)." } }, - "required": ["role", "createdAt"] + "required": ["role"] }, "chatMessages": { "type": "array", @@ -157,8 +157,7 @@ "createdAt": { "type": "string", "format": "date-time", "description": "When this exchange was created (RFC 3339)." }, "correlationId": { "type": "string", "description": "An optional correlation ID to group related exchanges." }, "messages": { "$ref": "#/$defs/chatMessages" } - }, - "required": ["createdAt"] + } }, "agentRequest": { "allOf": [