Repository navigation
feat(provider): let custom providers declare reasoning effort levels - #1307
TheGreatAxios merged 6 commits into
Conversation
TheGreatAxios
left a comment
There was a problem hiding this comment.
Review · Comment
Custom OpenAI-compatible providers persist an operator effort ladder and default; Shift+Tab, the prompt label, and the openai-compatible fall-through use that set instead of the family table.
Findings
-
src/config/index.ts:1150—loadConfigstill callsvalidateEffort(model, local.reasoningEffort, isCodex)with noproviderEfforts. A custom ladder that includesnone(or any level the family table rejects for that model id) cannot round-trip through.corbits/settings.json: restart throwsInvalid reasoningEffort in local settings. The same miss is atsrc/subagent/agent-fleet.ts:1039, sospawn_agentrejects an inherited custom-only pin against the family table. Passentry.reasoningEffortsinto both calls. Verified:validateEffort("fp-custom-model", "none")is{ok:false}while the same call with["none","low","high"]is{ok:true}. -
src/config/inference-sources.ts:191andsrc/provider/reasoning-effort.ts:244— the prompt label resolvesdefaultReasoningEffortviaresolveSessionEffort(..., providerDefault), but the custom source only computescustomEffortwhenconfigured !== undefined, andcycleReasoningEffortnever forwardsproviderDefault. A fresh session shows the operator default and sends nothing; the first Shift+Tab starts atsupported[0], not the picked default. Hydrate sessionreasoningEffortfromresolveSessionEffortat startup (includingproviderDefault), and passproviderDefaultthroughcycleReasoningEffort. -
src/tui/runner/wiring.ts:459— Shift+Tab and the model label readsettings.providers[name].reasoningEffortswith no custom-path guard. The second commit closed that leak on the wire for first-class builders; the TUI still honors a hand-edited ladder on Go/Claude/Codex and can cycle onto a level the source will clamp away. Gate the TUI the same way asbuildInferenceSourceForRef(only the openai-compatible fall-through).
TheGreatAxios
left a comment
There was a problem hiding this comment.
All five initial reasoning findings are resolved: defaults serialize without session pins; the form represents the explicit six-level set and rejects an empty ladder; config/profile and role resolution honor enabled levels; cycling advances from the effective default; toggles keep cursor focus. Further test-first regressions establish current-settings precedence over stale catalogs and complete reasoning/sampling serialization without resurrecting disabled/cleared values. Twelve overlap conflicts are composed without dropping either feature or its tests. Original changed files and follow-ups are reviewed. Full bun run check with all four PRs composed passes: 8,314 tests, zero failures. No remaining actionable findings or live API smoke claims.
Summary
Verification
bun run checkwith all four PRs composed passes: 8,314 tests, zero failures.Fixes CL-9833