From 6245558bcef38d2df56b401fc598d519581a3887 Mon Sep 17 00:00:00 2001 From: Simon Shi Date: Fri, 5 Jun 2026 19:00:15 +0900 Subject: [PATCH 1/3] fix(qoder): allow models from dynamic cache to bypass static ModelMap check Models fetched from /algo/api/v2/model/list (e.g. qmodel_latest) were rejected at request time because they were not in the static ModelMap. Fall back to the dynamic model config cache before failing, so any model returned by the live API is automatically accepted without manual updates to ModelMap. --- internal/runtime/executor/qoder_executor.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/runtime/executor/qoder_executor.go b/internal/runtime/executor/qoder_executor.go index 53d3fb4a..f3f6f8e4 100644 --- a/internal/runtime/executor/qoder_executor.go +++ b/internal/runtime/executor/qoder_executor.go @@ -76,7 +76,8 @@ func (e *QoderExecutor) ExecuteStream(ctx context.Context, authRecord *cliproxya qoderModel := strings.TrimPrefix(model, "qoder/") if mapped, ok := qoderauth.ModelMap[qoderModel]; ok { qoderModel = mapped - } else { + } else if _, cached := storage.GetModelConfig(qoderModel); !cached { + // Not in static map and not in dynamic model cache — reject early. return nil, fmt.Errorf("unsupported qoder model: %q (received %q)", qoderModel, model) } From 0fda5fafd6b02ecd2063f3216301f32cb630c730 Mon Sep 17 00:00:00 2001 From: Simon Shi Date: Fri, 5 Jun 2026 19:04:39 +0900 Subject: [PATCH 2/3] fix(qoder): add qmodel_latest to ModelMap and update models.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add qmodel_latest (Qwen3.7 Max) to ModelMap static table - Update models.json qoder section: add qmodel_latest, correct context lengths to 180000 (272000 for performance), update display names to match live API (qmodel→Qwen3.7 Plus, mmodel→MiniMax M3), add is_vl and thinking levels (low/medium/high/max/xhigh for ultimate/performance, high/max for dmodel/dfmodel/gm51model), kmodel ctx→256000 --- internal/auth/qoder/api.go | 13 +-- internal/registry/models/models.json | 144 +++++++++++++++++++++------ 2 files changed, 119 insertions(+), 38 deletions(-) diff --git a/internal/auth/qoder/api.go b/internal/auth/qoder/api.go index aa6e0522..f27131bf 100644 --- a/internal/auth/qoder/api.go +++ b/internal/auth/qoder/api.go @@ -40,12 +40,13 @@ var ModelMap = map[string]string{ "efficient": "efficient", "lite": "lite", // Frontier models — pin a specific backing model - "qmodel": "qmodel", // Qwen 3.6 Plus - "dmodel": "dmodel", // DeepSeek V4 Pro - "dfmodel": "dfmodel", // DeepSeek V4 Flash - "gm51model": "gm51model", // GLM 5.1 - "kmodel": "kmodel", // Kimi K2.6 - "mmodel": "mmodel", // MiniMax M2.7 + "qmodel": "qmodel", // Qwen3.7 Plus + "qmodel_latest": "qmodel_latest", // Qwen3.7 Max (latest) + "dmodel": "dmodel", // DeepSeek V4 Pro + "dfmodel": "dfmodel", // DeepSeek V4 Flash + "gm51model": "gm51model", // GLM 5.1 + "kmodel": "kmodel", // Kimi K2.6 + "mmodel": "mmodel", // MiniMax M3 } // doRefreshToken performs a token refresh and persists the result to authFilePath. diff --git a/internal/registry/models/models.json b/internal/registry/models/models.json index 1a02a23a..e295f374 100644 --- a/internal/registry/models/models.json +++ b/internal/registry/models/models.json @@ -2151,7 +2151,6 @@ ] } } - ], "xai": [ { @@ -2287,8 +2286,12 @@ "type": "qoder", "display_name": "Qoder Auto", "description": "Qoder Auto — automatically selects the best model for your prompt", - "context_length": 131072, - "max_completion_tokens": 65536 + "context_length": 180000, + "max_completion_tokens": 65536, + "supported_input_modalities": [ + "TEXT", + "IMAGE" + ] }, { "id": "qoder/ultimate", @@ -2298,13 +2301,24 @@ "type": "qoder", "display_name": "Qoder Ultimate", "description": "Qoder Ultimate — highest quality tier", - "context_length": 131072, + "context_length": 180000, "max_completion_tokens": 65536, + "supported_input_modalities": [ + "TEXT", + "IMAGE" + ], "thinking": { "min": 1024, "max": 32000, "zero_allowed": true, - "dynamic_allowed": true + "dynamic_allowed": true, + "levels": [ + "low", + "medium", + "high", + "max", + "xhigh" + ] } }, { @@ -2315,13 +2329,24 @@ "type": "qoder", "display_name": "Qoder Performance", "description": "Qoder Performance — balanced quality and speed", - "context_length": 131072, + "context_length": 272000, "max_completion_tokens": 32768, + "supported_input_modalities": [ + "TEXT", + "IMAGE" + ], "thinking": { "min": 1024, "max": 32000, "zero_allowed": true, - "dynamic_allowed": true + "dynamic_allowed": true, + "levels": [ + "low", + "medium", + "high", + "max", + "xhigh" + ] } }, { @@ -2332,8 +2357,12 @@ "type": "qoder", "display_name": "Qoder Efficient", "description": "Qoder Efficient — cost-efficient tier", - "context_length": 131072, - "max_completion_tokens": 16384 + "context_length": 180000, + "max_completion_tokens": 16384, + "supported_input_modalities": [ + "TEXT", + "IMAGE" + ] }, { "id": "qoder/lite", @@ -2343,7 +2372,7 @@ "type": "qoder", "display_name": "Qoder Lite", "description": "Qoder Lite — fastest and most affordable tier", - "context_length": 131072, + "context_length": 180000, "max_completion_tokens": 16384 }, { @@ -2352,10 +2381,29 @@ "created": 1767196800, "owned_by": "qoder", "type": "qoder", - "display_name": "Qwen 3.6 Plus (Qoder)", - "description": "Qoder frontier — Qwen 3.6 Plus", - "context_length": 131072, - "max_completion_tokens": 32768 + "display_name": "Qwen3.7 Plus (Qoder)", + "description": "Qoder frontier — Qwen3.7 Plus", + "context_length": 180000, + "max_completion_tokens": 32768, + "supported_input_modalities": [ + "TEXT", + "IMAGE" + ] + }, + { + "id": "qoder/qmodel_latest", + "object": "model", + "created": 1767196800, + "owned_by": "qoder", + "type": "qoder", + "display_name": "Qwen3.7 Max (Qoder)", + "description": "Qoder frontier — Qwen3.7 Max (latest Qwen)", + "context_length": 180000, + "max_completion_tokens": 32768, + "supported_input_modalities": [ + "TEXT", + "IMAGE" + ] }, { "id": "qoder/dmodel", @@ -2365,13 +2413,21 @@ "type": "qoder", "display_name": "DeepSeek V4 Pro (Qoder)", "description": "Qoder frontier — DeepSeek V4 Pro", - "context_length": 131072, + "context_length": 180000, "max_completion_tokens": 65536, + "supported_input_modalities": [ + "TEXT", + "IMAGE" + ], "thinking": { "min": 1024, "max": 32000, "zero_allowed": true, - "dynamic_allowed": true + "dynamic_allowed": true, + "levels": [ + "high", + "max" + ] } }, { @@ -2382,8 +2438,22 @@ "type": "qoder", "display_name": "DeepSeek V4 Flash (Qoder)", "description": "Qoder frontier — DeepSeek V4 Flash", - "context_length": 131072, - "max_completion_tokens": 16384 + "context_length": 180000, + "max_completion_tokens": 16384, + "supported_input_modalities": [ + "TEXT", + "IMAGE" + ], + "thinking": { + "min": 1024, + "max": 32000, + "zero_allowed": true, + "dynamic_allowed": true, + "levels": [ + "high", + "max" + ] + } }, { "id": "qoder/gm51model", @@ -2393,13 +2463,21 @@ "type": "qoder", "display_name": "GLM 5.1 (Qoder)", "description": "Qoder frontier — GLM 5.1", - "context_length": 131072, + "context_length": 180000, "max_completion_tokens": 32768, + "supported_input_modalities": [ + "TEXT", + "IMAGE" + ], "thinking": { "min": 1024, "max": 32000, "zero_allowed": true, - "dynamic_allowed": true + "dynamic_allowed": true, + "levels": [ + "high", + "max" + ] } }, { @@ -2410,14 +2488,12 @@ "type": "qoder", "display_name": "Kimi K2.6 (Qoder)", "description": "Qoder frontier — Kimi K2.6", - "context_length": 131072, + "context_length": 256000, "max_completion_tokens": 32768, - "thinking": { - "min": 1024, - "max": 32000, - "zero_allowed": true, - "dynamic_allowed": true - } + "supported_input_modalities": [ + "TEXT", + "IMAGE" + ] }, { "id": "qoder/mmodel", @@ -2425,10 +2501,14 @@ "created": 1767196800, "owned_by": "qoder", "type": "qoder", - "display_name": "MiniMax M2.7 (Qoder)", - "description": "Qoder frontier — MiniMax M2.7", - "context_length": 131072, - "max_completion_tokens": 65536 + "display_name": "MiniMax M3 (Qoder)", + "description": "Qoder frontier — MiniMax M3", + "context_length": 180000, + "max_completion_tokens": 65536, + "supported_input_modalities": [ + "TEXT", + "IMAGE" + ] } ] -} \ No newline at end of file +} From 69f0713e0190124a52f552f7c54d404632d22203 Mon Sep 17 00:00:00 2001 From: Simon Shi Date: Fri, 5 Jun 2026 19:09:53 +0900 Subject: [PATCH 3/3] fix(qoder): remove inaccurate max_completion_tokens from model defs Qoder API does not expose max_output_tokens; the values were guesses. Remove the field entirely to avoid misleading clients. --- internal/registry/models/models.json | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/internal/registry/models/models.json b/internal/registry/models/models.json index e295f374..708ba086 100644 --- a/internal/registry/models/models.json +++ b/internal/registry/models/models.json @@ -2287,7 +2287,6 @@ "display_name": "Qoder Auto", "description": "Qoder Auto — automatically selects the best model for your prompt", "context_length": 180000, - "max_completion_tokens": 65536, "supported_input_modalities": [ "TEXT", "IMAGE" @@ -2302,7 +2301,6 @@ "display_name": "Qoder Ultimate", "description": "Qoder Ultimate — highest quality tier", "context_length": 180000, - "max_completion_tokens": 65536, "supported_input_modalities": [ "TEXT", "IMAGE" @@ -2330,7 +2328,6 @@ "display_name": "Qoder Performance", "description": "Qoder Performance — balanced quality and speed", "context_length": 272000, - "max_completion_tokens": 32768, "supported_input_modalities": [ "TEXT", "IMAGE" @@ -2358,7 +2355,6 @@ "display_name": "Qoder Efficient", "description": "Qoder Efficient — cost-efficient tier", "context_length": 180000, - "max_completion_tokens": 16384, "supported_input_modalities": [ "TEXT", "IMAGE" @@ -2372,8 +2368,7 @@ "type": "qoder", "display_name": "Qoder Lite", "description": "Qoder Lite — fastest and most affordable tier", - "context_length": 180000, - "max_completion_tokens": 16384 + "context_length": 180000 }, { "id": "qoder/qmodel", @@ -2384,7 +2379,6 @@ "display_name": "Qwen3.7 Plus (Qoder)", "description": "Qoder frontier — Qwen3.7 Plus", "context_length": 180000, - "max_completion_tokens": 32768, "supported_input_modalities": [ "TEXT", "IMAGE" @@ -2399,7 +2393,6 @@ "display_name": "Qwen3.7 Max (Qoder)", "description": "Qoder frontier — Qwen3.7 Max (latest Qwen)", "context_length": 180000, - "max_completion_tokens": 32768, "supported_input_modalities": [ "TEXT", "IMAGE" @@ -2414,7 +2407,6 @@ "display_name": "DeepSeek V4 Pro (Qoder)", "description": "Qoder frontier — DeepSeek V4 Pro", "context_length": 180000, - "max_completion_tokens": 65536, "supported_input_modalities": [ "TEXT", "IMAGE" @@ -2439,7 +2431,6 @@ "display_name": "DeepSeek V4 Flash (Qoder)", "description": "Qoder frontier — DeepSeek V4 Flash", "context_length": 180000, - "max_completion_tokens": 16384, "supported_input_modalities": [ "TEXT", "IMAGE" @@ -2464,7 +2455,6 @@ "display_name": "GLM 5.1 (Qoder)", "description": "Qoder frontier — GLM 5.1", "context_length": 180000, - "max_completion_tokens": 32768, "supported_input_modalities": [ "TEXT", "IMAGE" @@ -2489,7 +2479,6 @@ "display_name": "Kimi K2.6 (Qoder)", "description": "Qoder frontier — Kimi K2.6", "context_length": 256000, - "max_completion_tokens": 32768, "supported_input_modalities": [ "TEXT", "IMAGE" @@ -2504,7 +2493,6 @@ "display_name": "MiniMax M3 (Qoder)", "description": "Qoder frontier — MiniMax M3", "context_length": 180000, - "max_completion_tokens": 65536, "supported_input_modalities": [ "TEXT", "IMAGE"