From 6c85974b10c421561246d4b49cffb13fd5b48c66 Mon Sep 17 00:00:00 2001 From: mahdiwafy Date: Sun, 26 Jul 2026 09:25:08 +0700 Subject: [PATCH 1/3] fix(providers): agentrouter falls into wrong validate case (dup switch label) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit validate/route.js had two `case "agentrouter":` labels in the same switch. JS only runs the first match, so agentrouter connections were silently validated by the generic glm/kimi/minimax block (bare x-api-key + anthropic-version, no headers) instead of validateAgentRouterConnection()'s Claude-CLI spoof headers. AgentRouter gates on client fingerprint and returns 401 'unauthorized client detected' for any request missing the spoof headers/UA — which the dashboard's Add API Key flow then reported as 'Invalid API key' even for a valid, unrestricted key. Removed agentrouter from the shared fallthrough case so it reaches the dedicated block. Verified live against the real AgentRouter API: the old (buggy) header set gets a genuine 401 from the same key that gets a non-401/403 response through validateAgentRouterConnection(). Co-Authored-By: Claude Fable 5 --- src/app/api/providers/validate/route.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/app/api/providers/validate/route.js b/src/app/api/providers/validate/route.js index 23f9c4041a..ab65fe7850 100644 --- a/src/app/api/providers/validate/route.js +++ b/src/app/api/providers/validate/route.js @@ -305,8 +305,7 @@ export async function POST(request) { case "minimax-cn": case "alicode-intl": case "alims-intl": - case "alicode": - case "agentrouter": { + case "alicode": { // Use baseUrl from PROVIDERS (DRY); separate openai-format vs claude-format flow const cfg = PROVIDERS[provider]; const isOpenAiFormat = provider === "glm-cn" || provider === "alicode" || provider === "alicode-intl" || provider === "alims-intl"; From 761056e939f4e9ad75b96ef5896e67249e55c22b Mon Sep 17 00:00:00 2001 From: mahdiwafy Date: Sun, 26 Jul 2026 10:06:16 +0700 Subject: [PATCH 2/3] =?UTF-8?q?chore:=20update=20AgentRouter=20model=20lis?= =?UTF-8?q?t=20=E2=80=94=20add=20kimi-k3,=20gpt-5.6-sol;=20remove=20claude?= =?UTF-8?q?-opus-4-7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- open-sse/executors/agentrouter.js | 2 +- open-sse/providers/registry/agentrouter.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/open-sse/executors/agentrouter.js b/open-sse/executors/agentrouter.js index 9941092fa3..8614a78b0c 100644 --- a/open-sse/executors/agentrouter.js +++ b/open-sse/executors/agentrouter.js @@ -94,7 +94,7 @@ export async function validateAgentRouterConnection(apiKey, fetchFn = fetch) { method: "POST", headers, body: JSON.stringify({ - model: "claude-opus-4-7", + model: "claude-opus-4-8", max_tokens: 1, messages: [{ role: "user", content: "ping" }], stream: false diff --git a/open-sse/providers/registry/agentrouter.js b/open-sse/providers/registry/agentrouter.js index 0680b45aea..e2666b3bcc 100644 --- a/open-sse/providers/registry/agentrouter.js +++ b/open-sse/providers/registry/agentrouter.js @@ -45,10 +45,11 @@ export default { }, models: [ { id: "claude-opus-4-6", name: "Claude 4.6 Opus" }, - { id: "claude-opus-4-7", name: "Claude 4.7 Opus" }, { id: "claude-opus-4-8", name: "Claude 4.8 Opus" }, { id: "glm-5.2", name: "GLM 5.2" }, { id: "gpt-5.5", name: "GPT 5.5" }, + { id: "gpt-5.6-sol", name: "GPT 5.6 Sol" }, + { id: "kimi-k3", name: "Kimi K3" }, ], passthroughModels: true, }; From 07c3ddaee5560505403bb5522e95f70136487155 Mon Sep 17 00:00:00 2001 From: mahdiwafy Date: Sun, 26 Jul 2026 14:54:38 +0700 Subject: [PATCH 3/3] fix(providers): remove stale/unreachable NVIDIA NIM models, refresh catalog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit NVIDIA NIM chat/completions returned errors for several registry models: - z-ai/glm-5.1 → HTTP 410 Gone (EOL 2026-07-02). This is the primary failure users hit — the model is globally retired. - moonshotai/kimi-k2.6 (+ none/low/medium/high thinking variants) → HTTP 404 "not found for account": catalog-listed but not served on standard NIM developer keys. suggestedModels also carried dead ids: - z-ai/glm-5.1 (410 EOL), qwen/qwen3.5-397b-a17b (404 account), qwen/qwen3.5-122b-a10b and mistralai/mistral-large-3-675b-instruct-2512 (absent from /v1/models entirely). Replaced with models verified against integrate.api.nvidia.com (present in /v1/models and returning 200 on a real completion): GLM 5.2, DeepSeek V4 Pro/Flash, MiniMax M2.7/M3, GPT-OSS 120B/20B, Llama 4 Maverick, Step 3.7 Flash, Nemotron 3 Ultra/Super 120B, Nemotron Super 49B v1.5. Co-Authored-By: Claude Opus 4.8 --- open-sse/providers/registry/nvidia.js | 11 +++++------ src/shared/constants/suggestedModels.js | 17 +++++++++-------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/open-sse/providers/registry/nvidia.js b/open-sse/providers/registry/nvidia.js index a718b6f9df..8f1f6e9023 100644 --- a/open-sse/providers/registry/nvidia.js +++ b/open-sse/providers/registry/nvidia.js @@ -23,16 +23,15 @@ export default { models: [ { id: "minimaxai/minimax-m2.7", name: "MiniMax M2.7" }, { id: "minimaxai/minimax-m3", name: "MiniMax M3" }, - { id: "z-ai/glm-5.1", name: "GLM 5.1" }, { id: "z-ai/glm-5.2", name: "GLM 5.2" }, { id: "deepseek-ai/deepseek-v4-pro", name: "DeepSeek V4 Pro" }, { id: "deepseek-ai/deepseek-v4-flash", name: "DeepSeek V4 Flash" }, - { id: "moonshotai/kimi-k2.6", name: "Kimi K2.6" }, - { id: "moonshotai/kimi-k2.6(none)", name: "Kimi K2.6 (No/Minimal Thinking)", upstreamModelId: "moonshotai/kimi-k2.6" }, - { id: "moonshotai/kimi-k2.6(low)", name: "Kimi K2.6 (Low Thinking)", upstreamModelId: "moonshotai/kimi-k2.6" }, - { id: "moonshotai/kimi-k2.6(medium)", name: "Kimi K2.6 (Medium Thinking)", upstreamModelId: "moonshotai/kimi-k2.6" }, - { id: "moonshotai/kimi-k2.6(high)", name: "Kimi K2.6 (High Thinking)", upstreamModelId: "moonshotai/kimi-k2.6" }, + { id: "openai/gpt-oss-120b", name: "GPT-OSS 120B" }, + { id: "openai/gpt-oss-20b", name: "GPT-OSS 20B" }, + { id: "meta/llama-4-maverick-17b-128e-instruct", name: "Llama 4 Maverick 17B" }, + { id: "stepfun-ai/step-3.7-flash", name: "Step 3.7 Flash" }, { id: "nvidia/nemotron-3-ultra-550b-a55b", name: "Nemotron 3 Ultra" }, + { id: "nvidia/nemotron-3-super-120b-a12b", name: "Nemotron 3 Super 120B" }, { id: "nvidia/nv-embedqa-e5-v5", name: "NV EmbedQA E5 v5", kind: "embedding" }, ], serviceKinds: ["llm","embedding"], diff --git a/src/shared/constants/suggestedModels.js b/src/shared/constants/suggestedModels.js index f68f8fee0e..7d75d5c701 100644 --- a/src/shared/constants/suggestedModels.js +++ b/src/shared/constants/suggestedModels.js @@ -4,20 +4,21 @@ // // Keyed by providerId. Each entry: { id, name }. // NVIDIA NIM: all listed models are free for NVIDIA Developer Program members -// (prototyping/testing). The list below was verified reachable against -// integrate.api.nvidia.com — fast, good-quality general/coding models. +// (prototyping/testing). Verified callable against integrate.api.nvidia.com +// (in the /v1/models catalog AND returning 200 on a real completion) — models +// that are catalog-listed but 404 "not found for account" (e.g. kimi-k2.6, +// qwen3.5-397b) or EOL/410 (e.g. glm-5.1) are intentionally excluded. export const SUGGESTED_MODELS = { nvidia: [ - { id: "z-ai/glm-5.1", name: "GLM 5.1" }, - { id: "moonshotai/kimi-k2.6", name: "Kimi K2.6" }, - { id: "qwen/qwen3.5-397b-a17b", name: "Qwen3.5 397B A17B" }, - { id: "qwen/qwen3.5-122b-a10b", name: "Qwen3.5 122B A10B" }, + { id: "z-ai/glm-5.2", name: "GLM 5.2" }, + { id: "deepseek-ai/deepseek-v4-pro", name: "DeepSeek V4 Pro" }, + { id: "deepseek-ai/deepseek-v4-flash", name: "DeepSeek V4 Flash" }, + { id: "minimaxai/minimax-m3", name: "MiniMax M3" }, { id: "qwen/qwen3-next-80b-a3b-instruct", name: "Qwen3 Next 80B A3B" }, { id: "openai/gpt-oss-120b", name: "GPT-OSS 120B" }, { id: "openai/gpt-oss-20b", name: "GPT-OSS 20B" }, { id: "meta/llama-4-maverick-17b-128e-instruct", name: "Llama 4 Maverick 17B" }, - { id: "meta/llama-3.3-70b-instruct", name: "Llama 3.3 70B" }, - { id: "mistralai/mistral-large-3-675b-instruct-2512", name: "Mistral Large 3 675B" }, + { id: "nvidia/nemotron-3-super-120b-a12b", name: "Nemotron 3 Super 120B" }, { id: "nvidia/llama-3.3-nemotron-super-49b-v1.5", name: "Nemotron Super 49B v1.5" }, { id: "stepfun-ai/step-3.7-flash", name: "Step 3.7 Flash" }, ],