From fe31efa0db287e6abf04e03b5a8f3fb636195f6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnaud=20H=C3=A9ritier?= Date: Thu, 3 Sep 2026 14:40:55 +0000 Subject: [PATCH] fix: update stale Fireworks kimi-k2-instruct model reference accounts/fireworks/models/kimi-k2-instruct does not exist in the fireworks-ai models.dev catalog and never has. Replace it with accounts/fireworks/models/kimi-k3, which is present in the current snapshot, across DefaultModels, examples/fireworks.yaml, tests, and the Fireworks provider docs (including the stale Available Models table, which also listed two other nonexistent ids). Also teach examples_test.go to resolve the actual models.dev catalog id for providers where it diverges from the docker-agent provider name (fireworks -> fireworks-ai, together -> togetherai, moonshot -> moonshotai, chatgpt -> openai, opencode-zen -> opencode) instead of unconditionally skipping validation, so this class of drift is caught automatically going forward. vercel now validates directly (models.dev catalogs it as-is); dmr/ovhcloud/cloudflare-* remain skipped with updated, accurate comments. Rebased onto main after #4147 (issue #4134/#4133) merged and added TestDefaultModelsExistInModelsDev, which validates DefaultModels directly against the models.dev provider id without the catalog-alias resolution above; apply the same modelsDevCatalogProviders mapping there so fireworks/together/moonshot/chatgpt/opencode-zen resolve correctly instead of failing on the raw docker-agent provider name. Fixes #4132 --- docs/providers/fireworks/index.md | 19 ++++++---- examples/fireworks.yaml | 2 +- pkg/config/auto.go | 2 +- pkg/config/auto_test.go | 18 ++++++--- pkg/config/examples_test.go | 37 +++++++++++++------ .../openai/system_message_merge_test.go | 2 +- .../provider/openai_alias_providers_test.go | 2 +- 7 files changed, 52 insertions(+), 30 deletions(-) diff --git a/docs/providers/fireworks/index.md b/docs/providers/fireworks/index.md index 9644653071..65cd1fe155 100644 --- a/docs/providers/fireworks/index.md +++ b/docs/providers/fireworks/index.md @@ -11,7 +11,7 @@ _Use Fireworks AI models with Docker Agent._ ## Overview [Fireworks AI](https://fireworks.ai/) is a fast inference host for open-weight -models, serving Kimi K2, Llama, Qwen, DeepSeek, GLM and others through an +models, serving Kimi, Qwen, DeepSeek, GLM and others through an OpenAI-compatible API. Docker Agent includes built-in support for Fireworks AI as an alias provider. @@ -33,7 +33,7 @@ The simplest way to use Fireworks AI: ```yaml agents: root: - model: fireworks/accounts/fireworks/models/kimi-k2-instruct + model: fireworks/accounts/fireworks/models/kimi-k3 description: Assistant using Fireworks AI instruction: You are a helpful assistant. ``` @@ -46,7 +46,7 @@ For more control over parameters: models: fireworks_model: provider: fireworks - model: accounts/fireworks/models/kimi-k2-instruct + model: accounts/fireworks/models/kimi-k3 temperature: 0.7 max_tokens: 8192 @@ -66,9 +66,12 @@ limits, and pricing. | Model | Description | | --- | --- | -| `accounts/fireworks/models/kimi-k2-instruct` | Kimi K2, large open MoE chat and tool-calling model | -| `accounts/fireworks/models/llama-v3p3-70b-instruct` | Llama 3.3 70B instruct | -| `accounts/fireworks/models/qwen3-235b-a22b` | Qwen 3 235B MoE | +| `accounts/fireworks/models/kimi-k3` | Kimi K3, large open MoE chat and tool-calling model | +| `accounts/fireworks/models/kimi-k2p7-code` | Kimi K2.7 Code, coding-focused variant | +| `accounts/fireworks/models/glm-5p3` | GLM 5.3 | +| `accounts/fireworks/models/qwen3p8-max` | Qwen 3.8 Max | +| `accounts/fireworks/models/deepseek-v4-pro-0813` | DeepSeek V4 Pro | +| `accounts/fireworks/models/gpt-oss-120b` | GPT OSS 120B | > Model IDs are case-sensitive and must be passed exactly as the catalogue lists > them. @@ -90,8 +93,8 @@ messages into a single one for this provider. ```yaml agents: coder: - model: fireworks/accounts/fireworks/models/kimi-k2-instruct - description: Code assistant using Kimi K2 on Fireworks AI + model: fireworks/accounts/fireworks/models/kimi-k2p7-code + description: Code assistant using Kimi K2.7 Code on Fireworks AI instruction: | You are an expert programmer. Write clean, well-documented code and follow language best practices. diff --git a/examples/fireworks.yaml b/examples/fireworks.yaml index e39868c882..77d4f7206b 100644 --- a/examples/fireworks.yaml +++ b/examples/fireworks.yaml @@ -3,7 +3,7 @@ models: fireworks_model: provider: fireworks - model: accounts/fireworks/models/kimi-k2-instruct + model: accounts/fireworks/models/kimi-k3 agents: root: diff --git a/pkg/config/auto.go b/pkg/config/auto.go index 6d608a866c..cc16f7babc 100644 --- a/pkg/config/auto.go +++ b/pkg/config/auto.go @@ -160,7 +160,7 @@ var DefaultModels = map[string]string{ "baseten": "deepseek-ai/DeepSeek-V4-Pro", "ovhcloud": "Qwen3.5-397B-A17B", "groq": "llama-3.3-70b-versatile", - "fireworks": "accounts/fireworks/models/kimi-k2-instruct", + "fireworks": "accounts/fireworks/models/kimi-k3", "deepseek": "deepseek-v4-pro", "cerebras": "gpt-oss-120b", "together": "meta-llama/Llama-3.3-70B-Instruct-Turbo", diff --git a/pkg/config/auto_test.go b/pkg/config/auto_test.go index 82e70ba0ae..f2db1d2988 100644 --- a/pkg/config/auto_test.go +++ b/pkg/config/auto_test.go @@ -338,7 +338,7 @@ func TestAutoModelConfig(t *testing.T) { "FIREWORKS_API_KEY": "test-key", }, expectedProvider: "fireworks", - expectedModel: "accounts/fireworks/models/kimi-k2-instruct", + expectedModel: "accounts/fireworks/models/kimi-k3", expectedMaxTokens: 32000, }, { @@ -498,7 +498,7 @@ func TestDefaultModels(t *testing.T) { assert.Equal(t, "deepseek-ai/DeepSeek-V4-Pro", DefaultModels["baseten"]) assert.Equal(t, "Qwen3.5-397B-A17B", DefaultModels["ovhcloud"]) assert.Equal(t, "llama-3.3-70b-versatile", DefaultModels["groq"]) - assert.Equal(t, "accounts/fireworks/models/kimi-k2-instruct", DefaultModels["fireworks"]) + assert.Equal(t, "accounts/fireworks/models/kimi-k3", DefaultModels["fireworks"]) assert.Equal(t, "deepseek-v4-pro", DefaultModels["deepseek"]) assert.Equal(t, "gpt-oss-120b", DefaultModels["cerebras"]) assert.Equal(t, "meta-llama/Llama-3.3-70B-Instruct-Turbo", DefaultModels["together"]) @@ -1185,9 +1185,10 @@ func TestCloudProviderEnvVars(t *testing.T) { // TestDefaultModelsExistInModelsDev is the regression test for issue #4133: // DefaultModels must reference models that actually exist in the models.dev // catalog, since AutoModelConfig hands them straight to real users with no -// other validation. modelsDevAbsentProviders (defined in examples_test.go) is -// reused so providers legitimately absent, or aliased, in the catalog don't -// produce false failures. +// other validation. modelsDevAbsentProviders and modelsDevCatalogProviders +// (both defined in examples_test.go) are reused so providers legitimately +// absent, or aliased under a different id, in the catalog don't produce +// false failures. func TestDefaultModelsExistInModelsDev(t *testing.T) { t.Parallel() @@ -1202,7 +1203,12 @@ func TestDefaultModelsExistInModelsDev(t *testing.T) { t.Skipf("provider %q is not expected to exist in the models.dev catalog", provider) } - _, err := modelsStore.GetModel(t.Context(), modelsdev.NewID(provider, model)) + catalogProvider := provider + if id, ok := modelsDevCatalogProviders[provider]; ok { + catalogProvider = id + } + + _, err := modelsStore.GetModel(t.Context(), modelsdev.NewID(catalogProvider, model)) require.NoError(t, err, "DefaultModels[%q] = %q must exist in the models.dev catalog", provider, model) }) } diff --git a/pkg/config/examples_test.go b/pkg/config/examples_test.go index edd686fe5a..d41c8e7bee 100644 --- a/pkg/config/examples_test.go +++ b/pkg/config/examples_test.go @@ -17,18 +17,25 @@ import ( "github.com/docker/docker-agent/pkg/modelsdev" ) +// modelsDevCatalogProviders maps a docker-agent provider name to the id +// models.dev actually catalogs it under, for providers where the two +// diverge. Resolving through this map (instead of skipping validation +// outright) is what caught the stale Fireworks model reference in #4132. +var modelsDevCatalogProviders = map[string]string{ + "fireworks": "fireworks-ai", // models.dev catalogs Fireworks under the "fireworks-ai" id, not "fireworks" + "together": "togetherai", // models.dev catalogs Together AI under the "togetherai" id, not "together" + "moonshot": "moonshotai", // models.dev catalogs Moonshot AI under the "moonshotai" id, not "moonshot" + "chatgpt": "openai", // ChatGPT subscription backend; models.dev catalogs its models under the "openai" id + "opencode-zen": "opencode", // models.dev catalogs the OpenCode Zen router under the "opencode" id +} + // modelsDevAbsentProviders lists providers that are valid at runtime but -// are not expected to exist in the remote models.dev catalog. The test -// skips models.dev lookups for these to avoid false failures. +// whose example model reference can't be validated against models.dev, +// even via modelsDevCatalogProviders above. The test skips models.dev +// lookups for these to avoid false failures. var modelsDevAbsentProviders = map[string]bool{ "dmr": true, // Docker Model Runner (local, not in catalog) - "chatgpt": true, // ChatGPT subscription backend; models.dev catalogs its models under the "openai" id - "opencode-zen": true, // not yet registered in models.dev - "ovhcloud": true, // OVHcloud AI Endpoints (not yet in models.dev) - "fireworks": true, // models.dev catalogs Fireworks under the "fireworks-ai" id, not "fireworks" - "together": true, // models.dev catalogs Together AI under the "togetherai" id, not "together" - "moonshot": true, // models.dev catalogs Moonshot AI under the "moonshotai" id, not "moonshot" - "vercel": true, // Vercel AI Gateway is a multi-provider router, not a models.dev catalog id + "ovhcloud": true, // models.dev lower-cases OVHcloud model ids (e.g. "qwen3.5-397b-a17b"); the provider API is case-sensitive and takes "Qwen3.5-397B-A17B" "cloudflare-workers-ai": true, // example uses an @cf/... model id not present in the models.dev snapshot (only variant ids like -fp8 are listed) "cloudflare-ai-gateway": true, // multi-provider router; example model ids use the gateway's provider/model form, not guaranteed to match a models.dev id } @@ -60,8 +67,10 @@ func collectExamples(t *testing.T) []string { // skip rules to both: first_available selectors are resolved at runtime // from the environment's credentials, routed models span multiple // providers, custom providers are self-contained (already validated via -// cfg.Providers), and modelsDevAbsentProviders lists providers models.dev -// deliberately does not catalog. +// cfg.Providers), modelsDevAbsentProviders lists providers models.dev +// deliberately does not catalog, and modelsDevCatalogProviders resolves +// the remaining providers to the id models.dev actually catalogs them +// under, when it diverges from the docker-agent provider name. func catalogModelRefs(cfg *latest.Config) []modelsdev.ID { var ids []modelsdev.ID for _, model := range cfg.Models { @@ -80,7 +89,11 @@ func catalogModelRefs(cfg *latest.Config) []modelsdev.ID { if _, isCustomProvider := cfg.Providers[model.Provider]; isCustomProvider { continue } - ids = append(ids, modelsdev.NewID(model.Provider, model.Model)) + catalogProvider := model.Provider + if id, ok := modelsDevCatalogProviders[model.Provider]; ok { + catalogProvider = id + } + ids = append(ids, modelsdev.NewID(catalogProvider, model.Model)) } return ids } diff --git a/pkg/model/provider/openai/system_message_merge_test.go b/pkg/model/provider/openai/system_message_merge_test.go index 346c03ce1f..ccb962f641 100644 --- a/pkg/model/provider/openai/system_message_merge_test.go +++ b/pkg/model/provider/openai/system_message_merge_test.go @@ -161,7 +161,7 @@ func TestShouldMergeConsecutiveMessages_Gating(t *testing.T) { {"baseten", &latest.ModelConfig{Provider: "baseten", Model: "zai-org/GLM-5.2"}, true}, {"ovhcloud", &latest.ModelConfig{Provider: "ovhcloud", Model: "Qwen3.5-397B-A17B"}, true}, {"open-model host alias cerebras", &latest.ModelConfig{Provider: "cerebras", Model: "qwen-3-coder-480b"}, true}, - {"open-model host fireworks", &latest.ModelConfig{Provider: "fireworks", Model: "accounts/fireworks/models/kimi-k2-instruct"}, true}, + {"open-model host fireworks", &latest.ModelConfig{Provider: "fireworks", Model: "accounts/fireworks/models/kimi-k3"}, true}, {"open-model host together", &latest.ModelConfig{Provider: "together", Model: "Qwen/Qwen3-235B-A22B-Instruct-2507-tput"}, true}, {"open-model host huggingface", &latest.ModelConfig{Provider: "huggingface", Model: "meta-llama/Llama-3.3-70B-Instruct"}, true}, {"open-model host gateway vercel", &latest.ModelConfig{Provider: "vercel", Model: "openai/gpt-5"}, true}, diff --git a/pkg/model/provider/openai_alias_providers_test.go b/pkg/model/provider/openai_alias_providers_test.go index dffad01651..cc0f3c03d8 100644 --- a/pkg/model/provider/openai_alias_providers_test.go +++ b/pkg/model/provider/openai_alias_providers_test.go @@ -68,7 +68,7 @@ var openAIAliasProviders = []openAIAliasProvider{ provider: "fireworks", envVar: "FIREWORKS_API_KEY", testKey: "fw-test-fireworks-key", - model: "accounts/fireworks/models/kimi-k2-instruct", + model: "accounts/fireworks/models/kimi-k3", greeting: "Hello from Fireworks", mergesSystemMessages: true, },