Repository navigation
fix(open-sse): declare Ollama Cloud reasoning models' supportedThinkingEfforts (#10788) - #10911
Merged
Merged
Conversation
…ngEfforts (#10788) glm-5.1, glm-5.2, deepseek-v4-pro and deepseek-v4-flash declared supportsReasoning:true but no supportedThinkingEfforts, so the catalog's appendSyncedEffortVariants() pass (which only synthesizes -low/-high/-max ids from an already-populated capabilities.effort_tiers) never exposed a selectable effort tier for them, unlike gpt-oss:20b/120b. Add the documented low/medium/high/max vocabulary (see supportsMaxEffortForProvider's isOllamaCloud comment in reasoningEffort.ts).
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…8-opencode-effort-tiers fix(open-sse): declare Ollama Cloud reasoning models' supportedThinkingEfforts (cheaper-inference#10788)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #10788
Root cause
Ollama Cloud's
glm-5.1,glm-5.2,deepseek-v4-proanddeepseek-v4-flashregistryentries declared
supportsReasoning: truebut never declaredsupportedThinkingEfforts.The catalog's
appendSyncedEffortVariants()pass (open-sse/utils/syncedEffortVariants.ts)only synthesizes selectable
<model>-<tier>catalog ids from an already-populatedcapabilities.effort_tiers; for static registry models that population only happens froma non-empty
supportedThinkingEfforts, and it runs beforeenrichCatalogModelEntry()(
src/lib/modelMetadataRegistry.ts) would otherwise derive it later. Since these fourmodels never declared the field, they never got a selectable
-low/-high/-maxcatalog id or effort selector — unlike
gpt-oss:20b/gpt-oss:120b, which already declaredit and worked correctly.
Fix
Declare
supportedThinkingEfforts: ["low", "medium", "high", "max"]on the four affectedmodels. This vocabulary is not a guess — it matches the pre-existing, in-repo documented
behavior for the Ollama Cloud provider as a whole (see
supportsMaxEffortForProvider'sisOllamaCloudcomment inopen-sse/executors/base/reasoningEffort.ts: "Ollama Cloudaccepts low|medium|high|max|none and rejects xhigh"), which already applied uniformly to
every Ollama Cloud model (including these four) before this change, just without a
catalog-visible tier selector.
Scope
This PR intentionally covers only ollama-cloud. The originating issue also flagged
nvidia (6 reasoning-capable models) and opencode-zen as missing tier exposure, but the
triage plan-file's risk section explicitly warns against guessing per-model effort
vocabulary there — nvidia's
z-ai/glm-5.2is a documented binaryenable_thinkingswitch elsewhere in this codebase (
mapNvidiaGlm52ReasoningParams), not a multi-tiermodel, so blindly copying the ollama-cloud low/medium/high/max shape onto nvidia's other
reasoning models risks advertising tiers the upstream will then 400 on. Those two
providers need live NVIDIA NIM / opencode-zen upstream verification before a tier
vocabulary can be safely declared, and are left for a follow-up. The issue's second part
(v3.8.50 not reaching npm) is a release-engineering concern, out of scope here.
Regression test (TDD)
tests/unit/ollama-cloud-reasoning-effort-tiers-10788.test.ts— asserts the four affectedmodels declare non-empty
supportedThinkingEffortsmatching the documentedlow/medium/high/max vocabulary, with
gpt-oss:20bas a passing control case.origin/release/v3.8.50tip, and reproduced in thetriage plan-file's own probe):
glm-5.2/deepseek-v4-pro/deepseek-v4-flash/glm-5.1fail with "supports reasoning but declares no supportedThinkingEfforts".node --import tsx/esm --test tests/unit/ollama-cloud-reasoning-effort-tiers-10788.test.ts→ 1/1 pass.Gates run locally
node --import tsx/esm --test tests/unit/ollama-cloud-reasoning-effort-tiers-10788.test.ts→ passnode --import tsx/esm --test tests/unit/base-executor-sanitize-effort.test.ts tests/unit/model-capabilities-registry.test.ts tests/unit/openai-responses-reasoning-effort.test.ts tests/unit/opencodeReasoningSanitizer.test.ts tests/unit/free-models.test.ts tests/unit/minimax-m3-model-registry.test.ts→ 111/111 passnpm run typecheck:core→ exit 0npx eslint --suppressions-location config/quality/eslint-suppressions.json <changed files>→ cleannode scripts/check/check-file-size.mjs→ OKnode scripts/check/check-complexity.mjs→ OK (2573 vs baseline 2774)node scripts/check/check-cognitive-complexity.mjs→ OK (1157 vs baseline 1223)node scripts/check/check-changelog-integrity.mjs→ OK