From 5c399b64062f09f359668bfc036c2aeedf1e4bb7 Mon Sep 17 00:00:00 2001 From: decolua Date: Fri, 11 Sep 2026 22:03:48 +0700 Subject: [PATCH] feat(codebuddy-intl,ollama): add DeepSeek-V4.1-Flash codebuddy-intl: deepseek-v4-flash replaced by deepseek-v4.1-flash (same gateway catalog as CN) and a capability override so the model keeps the openai-style reasoning_effort path instead of the vendor-native "deepseek" thinking shape the gateway rejects. Thinking levels low/high/xhigh. ollama: add deepseek-v4.1-flash:cloud (verified on ollama.com/api/tags) with vision + 1M context caps. Co-Authored-By: Claude Code --- open-sse/providers/capabilities.js | 17 +++++++++++++++++ open-sse/providers/registry/codebuddy-intl.js | 4 +++- open-sse/providers/registry/ollama.js | 1 + open-sse/providers/thinkingLevels.js | 2 ++ 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/open-sse/providers/capabilities.js b/open-sse/providers/capabilities.js index e011b788..8ad55314 100644 --- a/open-sse/providers/capabilities.js +++ b/open-sse/providers/capabilities.js @@ -214,6 +214,13 @@ export const PROVIDER_CAPABILITIES = { // contract). maxOutput 128000 per the server's product-config payload. "deepseek-v4.1-flash": { vision: true, reasoning: true, thinkingFormat: "openai", thinkingCanDisable: true, contextWindow: 1000000, maxOutput: 128000 }, }, + // CodeBuddy intl — same gateway catalog as CN, so deepseek-v4.1-flash mirrors + // the codebuddy-cn entry (the openai-style reasoning_effort format matters: + // the generic *deepseek-v4* pattern would otherwise pick the vendor-native + // "deepseek" thinking shape, which the CodeBuddy gateway does not accept). + "codebuddy-intl": { + "deepseek-v4.1-flash": { vision: true, reasoning: true, thinkingFormat: "openai", thinkingCanDisable: true, contextWindow: 1000000, maxOutput: 128000 }, + }, // Qoder — upstream exposes opaque internal ids (dfmodel, kmodel, …); the // registry `name` is display-only and capability lookup matches on the raw // id, so every qoder model would fall through to DEFAULT_CAPABILITIES @@ -251,6 +258,16 @@ export const PROVIDER_CAPABILITIES = { "laguna-s-2.1": { reasoning: true, thinkingFormat: "openai", contextWindow: 1000000, maxOutput: 32000 }, "laguna-xs-2.1": { reasoning: true, thinkingFormat: "openai", contextWindow: 200000, maxOutput: 32000 }, }, + // Ollama Cloud — the generic *deepseek-v4* pattern misses the vision badge + // the library page publishes for this model (text+image in, 1M context). + // ponytail: thinkingFormat stays "deepseek" to preserve today's body shape; + // Ollama's native toggle is the top-level `think` field (bool or + // low/medium/high/max), which no format in thinkingUnified.js emits yet — + // openai-to-ollama.js drops it. Wire a "think" format when thinking on + // Ollama Cloud is actually needed. + "ollama": { + "deepseek-v4.1-flash:cloud": { vision: true, reasoning: true, thinkingFormat: "deepseek", contextWindow: 1000000, maxOutput: 384000 }, + }, }; /** diff --git a/open-sse/providers/registry/codebuddy-intl.js b/open-sse/providers/registry/codebuddy-intl.js index eab1ce93..65e787d1 100644 --- a/open-sse/providers/registry/codebuddy-intl.js +++ b/open-sse/providers/registry/codebuddy-intl.js @@ -58,7 +58,9 @@ export default { { id: "kimi-k2.5", name: "Kimi-K2.5" }, { id: "hy3-preview", name: "Hy3 Preview" }, { id: "deepseek-v4-pro", name: "DeepSeek-V4-Pro" }, - { id: "deepseek-v4-flash", name: "DeepSeek-V4-Flash" }, + // deepseek-v4-flash replaced server-side by deepseek-v4.1-flash (same + // catalog as CN; the old endpoint still answers 200 but the list is the contract). + { id: "deepseek-v4.1-flash", name: "DeepSeek-V4.1-Flash" }, { id: "deepseek-v3-2-volc", name: "DeepSeek-V3.2" }, ], oauth: { diff --git a/open-sse/providers/registry/ollama.js b/open-sse/providers/registry/ollama.js index 6965484a..605c4b89 100644 --- a/open-sse/providers/registry/ollama.js +++ b/open-sse/providers/registry/ollama.js @@ -30,6 +30,7 @@ export default { { id: "glm-4.7-flash", name: "GLM 4.7 Flash" }, { id: "qwen3.5", name: "Qwen3.5" }, { id: "minimax-m3", name: "MiniMax M3" }, + { id: "deepseek-v4.1-flash:cloud", name: "DeepSeek V4.1 Flash" }, ], serviceKinds: ["llm", "webFetch"], fetchConfig: { diff --git a/open-sse/providers/thinkingLevels.js b/open-sse/providers/thinkingLevels.js index 7cc1b28f..404fa75e 100644 --- a/open-sse/providers/thinkingLevels.js +++ b/open-sse/providers/thinkingLevels.js @@ -52,6 +52,8 @@ const PATTERN_THINKING = [ { provider: "codebuddy-cn", pattern: "deepseek-v4*", levels: ["low", "high", "xhigh"] }, { provider: "codebuddy-cn", pattern: "hy3*", levels: ["low", "high"] }, { provider: "codebuddy-cn", pattern: "hy4*", levels: ["high"] }, + // codebuddy-intl rides the same gateway catalog, so its deepseek levels match. + { provider: "codebuddy-intl", pattern: "deepseek-v4*", levels: ["low", "high", "xhigh"] }, ]; // Returns valid thinking levels for a model, or null when the model has no reasoning.