mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-13 18:52:18 +03:00
* fix(api): reach DeepSeek V4's native max reasoning tier DeepSeek V4 accepts reasoning_effort low | high | max, defaults to high, and maps medium and xhigh down to high (https://api-docs.deepseek.com/api/create-chat-completion; the upstream 400 on an invalid value enumerates none, minimal, low, medium, high, xhigh, max). OmniRoute's canonical vocabulary is none|low|medium|high|xhigh, where `max` is an alias collapsing onto `xhigh`. DeepSeek then maps `xhigh` back down to `high`, so a client sending {"effort":"max"} silently got high — the model's top reasoning tier was unreachable through the canonical field, and the catalog never advertised `max` as an available tier. Mirror the existing extendCodexGpt56EffortValues precedent: expose the provider-native tier for these models only, without widening the global request vocabulary. CANONICAL_EFFORT_VALUES and normalizeEffort() are unchanged, so every other provider keeps collapsing max -> xhigh. Scoped to the native `deepseek`/`ds` provider. Routed namespaces that merely carry "deepseek" in the id (openrouter/deepseek/..., tllm/deepseek_v4, oc/deepseek-v4-flash-free) terminate at a different upstream whose effort vocabulary we do not control, so they keep the canonical behavior. The provider is not resolved yet where the canonical params are folded in (chat.ts), so the check also accepts a `<prefix>/<model>` id. An explicit client reasoning_effort / reasoning.effort still wins, as before. Covered by tests/unit/deepseek-native-max-effort.test.ts: 4 of its 6 cases fail without this change. * chore(changelog): add fragment for #10230