mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-26 00:52:18 +03:00
Dispatch: OpencodeExecutor.transformRequest stripped the effort-suffixed alias (e.g. glm-5.2-high) down to the base id and injected a flat reasoning_effort body field — but opencode-go's ChatCompletionRequest has no such field for non-DeepSeek families, so the tier never reached the upstream and every request ran at default effort. Only DeepSeek V4 accepts the flat field (its native contract, #4647), so it keeps the old rewrite; every other family now forwards the aliased model id verbatim, which is their only native effort mechanism. Registry: declare supportedThinkingEfforts on the base rows that had aliases but no tier vocabulary — opencode-go (glm-5.2, mimo-v2.5, grok-4.5, hy3, kimi-k3, qwen3.7-max/plus), the shared zen/go row (qwen3.6-plus) and opencode-zen (deepseek-v4-pro/flash, glm-5.2, kimi-k3) — so catalog variant synthesis (#9485) and sanitizeReasoningEffortForProvider clamp from one source of truth. nvidia z-ai/glm-5.2 is declared reasoning-capable with an EMPTY tier list: its upstream only exposes a binary enable_thinking switch (mapNvidiaGlm52ReasoningParams), so no honest tiers exist to advertise. Ollama Cloud declarations were already landed upstream (#11307); this change covers the remaining providers named in #10788.
27 lines
1.2 KiB
TypeScript
27 lines
1.2 KiB
TypeScript
/**
|
|
* Models declared identically in both the `opencode-zen` and `opencode-go` provider
|
|
* registries (same upstream family, opencode.ai/zen/*). Mirrors the GLM_SHARED_MODELS
|
|
* pattern in glmProvider.ts: one array, spread into each sibling RegistryEntry, so a
|
|
* metadata fix (targetFormat, supportsReasoning, ...) only has to land in one file
|
|
* instead of drifting out of sync across registries.
|
|
*
|
|
* Only entries that are byte-identical across both registries belong here — a model
|
|
* with tier-specific flags (e.g. go's effort variants, or a flag only one tier needs)
|
|
* stays local to that registry's own `models` array.
|
|
*/
|
|
export const OPENCODE_ZEN_GO_SHARED_MODELS = Object.freeze([
|
|
{ id: "kimi-k2.7-code", name: "Kimi K2.7 Code" },
|
|
{ id: "qwen3.5-plus", name: "Qwen3.5 Plus", targetFormat: "claude", supportsVision: false },
|
|
{
|
|
id: "qwen3.6-plus",
|
|
name: "Qwen3.6 Plus",
|
|
targetFormat: "claude",
|
|
supportsVision: false,
|
|
// #10788: effort-tier aliases exist as explicit registry rows; declare the
|
|
// vocabulary on the shared base row so variant synthesis and the sanitizer
|
|
// agree on it for both opencode-go and opencode-zen.
|
|
supportsReasoning: true,
|
|
supportedThinkingEfforts: ["high", "max"],
|
|
},
|
|
]);
|