Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: omit GPT-6 Astra from the Azure known-models catalog on 2.37
The fantasy pin on release/2.37 predates gpt-6-astra, and the Azure
provider exposes no hook to force Responses, so an Azure Astra model
config would speak Chat Completions while Astra's function calling is
Responses-only. main added the Azure entry after bumping fantasy
(#29230), which the backport does not carry.

TestCuratedAstraUsesResponses guards the curation against reintroducing
an Astra entry whose resolved transport is not Responses.
  • Loading branch information
ibetitsmike committed Sep 18, 2026
commit fd0e070427527c0ab21aca2fb04d252e7c5c2406
23 changes: 23 additions & 0 deletions scripts/aibridgepricesgen/catalog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ import (
"os"
"testing"

fantasyazure "charm.land/fantasy/providers/azure"
fantasyopenai "charm.land/fantasy/providers/openai"
"github.com/stretchr/testify/require"

"github.com/coder/coder/v2/coderd/x/chatd/chatopenai"
)

// fixtureUpstream returns a small upstream payload covering the join cases:
Expand Down Expand Up @@ -263,6 +267,25 @@ func TestBuildCatalogErrors(t *testing.T) {
}
}

// TestCuratedAstraUsesResponses guards against suggesting GPT-6 Astra on a
// provider whose client would speak Chat Completions: Astra's function calling
// is Responses-only, and Azure follows the pinned SDK's known-model list.
func TestCuratedAstraUsesResponses(t *testing.T) {
t.Parallel()

curation := embeddedCuration(t)
for _, provider := range []string{fantasyopenai.Name, fantasyazure.Name} {
for _, model := range curation[provider] {
if !chatopenai.IsGPT6Astra(model.ModelIdentifier) {
continue
}
require.Equal(t, chatopenai.TransportResponses,
chatopenai.TransportFor(provider, model.ModelIdentifier, nil),
"%s/%s", provider, model.ModelIdentifier)
}
}
}

// TestCurationMatchesGeneratedCatalog is a drift test: the editorial fields
// (per provider, in order) in the embedded curation.json must exactly match
// their projection in the checked-in generated frontend catalog. Fails when
Expand Down
3 changes: 0 additions & 3 deletions scripts/aibridgepricesgen/curation.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,6 @@
{
"modelIdentifier": "claude-haiku-4-5"
},
{
"modelIdentifier": "gpt-6-astra"
},
{
"modelIdentifier": "gpt-5.6-sol"
},
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading