Skip to content

Commit 96c0c73

Browse files
committed
fix: switch to gpt-4o for azure_ai_search tool support
- gpt-5-mini doesn't support azure_ai_search tool in Persistent Agents - Update model deployment from gpt-5-mini to gpt-4o - Update default model config in appsettings and FoundryOptions - Fix foundry_endpoint output to use project URL format
1 parent d4bb1a7 commit 96c0c73

5 files changed

Lines changed: 11 additions & 11 deletions

File tree

infra/terraform/foundry.deployments.tf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Azure AI Foundry Model Deployments for Health Plan Chat
22

3-
# GPT-5-mini deployment for chat completions
4-
resource "azapi_resource" "gpt5_mini_deployment" {
3+
# GPT-4o deployment for chat completions (supports azure_ai_search tool)
4+
resource "azapi_resource" "gpt4o_deployment" {
55
type = "Microsoft.CognitiveServices/accounts/deployments@2024-10-01"
6-
name = "gpt-5-mini"
6+
name = "gpt-4o"
77
parent_id = azapi_resource.ai_services.id
88

99
body = {
@@ -14,8 +14,8 @@ resource "azapi_resource" "gpt5_mini_deployment" {
1414
properties = {
1515
model = {
1616
format = "OpenAI"
17-
name = "gpt-5-mini"
18-
version = "2025-08-07"
17+
name = "gpt-4o"
18+
version = "2024-11-20"
1919
}
2020
raiPolicyName = "Microsoft.DefaultV2"
2121
}
@@ -49,7 +49,7 @@ resource "azapi_resource" "embedding_deployment" {
4949
}
5050

5151
# Ensure deployments are created sequentially to avoid conflicts
52-
depends_on = [azapi_resource.gpt5_mini_deployment]
52+
depends_on = [azapi_resource.gpt4o_deployment]
5353

5454
timeouts {
5555
create = "30m"

infra/terraform/outputs.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ output "redis_hostname" {
3232
}
3333

3434
output "foundry_endpoint" {
35-
description = "Azure AI Foundry endpoint"
36-
value = azapi_resource.ai_services.output.properties.endpoint
35+
description = "Azure AI Foundry project endpoint for Persistent Agents API"
36+
value = "https://${azapi_resource.ai_services.name}.services.ai.azure.com/api/projects/${azapi_resource.foundry_project.name}"
3737
}
3838

3939
# GitHub Actions WIF outputs

src/backend/HealthPlanChat.Infrastructure.AgentFramework/FoundryOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public sealed class FoundryOptions
1818
/// <summary>
1919
/// Model deployment name for chat completions. Default: "gpt-5-mini".
2020
/// </summary>
21-
public string ChatModelDeployment { get; set; } = "gpt-5-mini";
21+
public string ChatModelDeployment { get; set; } = "gpt-4o";
2222

2323
/// <summary>
2424
/// Model deployment name for embeddings. Default: "text-embedding-3-small".

src/backend/HealthPlanChat.WebApi/appsettings.Development.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
"Foundry": {
4343
"Endpoint": "https://<your-foundry-endpoint>.cognitiveservices.azure.com",
44-
"ChatModelDeployment": "gpt-5-mini",
44+
"ChatModelDeployment": "gpt-4o",
4545
"EmbeddingModelDeployment": "text-embedding-3-small",
4646
"MaxTokens": 1024,
4747
"Temperature": 0.7

src/backend/HealthPlanChat.WebApi/appsettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
"Foundry": {
3333
"Endpoint": "",
34-
"ChatModelDeployment": "gpt-5-mini",
34+
"ChatModelDeployment": "gpt-4o",
3535
"EmbeddingModelDeployment": "text-embedding-3-small",
3636
"MaxTokens": 1024,
3737
"Temperature": 0.7

0 commit comments

Comments
 (0)