Describe the Bug
When an app forwards a thinkingLevel for a model registered via registerProvider() whose id is not in pi-ai's catalog (gateway presets, OpenRouter @preset/... ids), the level is silently dropped. The resolved model hydrates with reasoning: false, the registration API offers no way to override it, and pi-ai skips thinking emission for non-reasoning models — so the outgoing request carries no reasoning field and the model answers without thinking. No error is raised anywhere. Catalog models are unaffected; this hits exactly the gateway and preset ids that registerProvider() exists for. Sibling of #418, which is the same missing override for input.
Expected Behavior
A registration can declare a model as reasoning-capable, mirroring the existing contextWindow/maxTokens overrides at registration and per-model level, so that a forwarded thinkingLevel reaches the wire (e.g. OpenRouter's reasoning: { effort }).
Steps to Reproduce
- Register a provider with a reasoning-capable model id the catalog doesn't know (e.g. an OpenRouter
@preset/... id)
- Resolve the model and observe
reasoning is false, with no registration option to change it
- Prompt with
thinkingLevel: 'high' and capture the outgoing request: it contains no reasoning field, and the model responds without thinking
Tested patch (registration-level + per-model reasoning override, mirroring the contextWindow/maxTokens layering; full runtime suite and tsc --noEmit green): steven4354@3bc9fed
🤖 Filed with Claude Code
Describe the Bug
When an app forwards a
thinkingLevelfor a model registered viaregisterProvider()whose id is not in pi-ai's catalog (gateway presets, OpenRouter@preset/...ids), the level is silently dropped. The resolved model hydrates withreasoning: false, the registration API offers no way to override it, and pi-ai skips thinking emission for non-reasoning models — so the outgoing request carries noreasoningfield and the model answers without thinking. No error is raised anywhere. Catalog models are unaffected; this hits exactly the gateway and preset ids thatregisterProvider()exists for. Sibling of #418, which is the same missing override forinput.Expected Behavior
A registration can declare a model as reasoning-capable, mirroring the existing
contextWindow/maxTokensoverrides at registration and per-model level, so that a forwardedthinkingLevelreaches the wire (e.g. OpenRouter'sreasoning: { effort }).Steps to Reproduce
@preset/...id)reasoningisfalse, with no registration option to change itthinkingLevel: 'high'and capture the outgoing request: it contains noreasoningfield, and the model responds without thinkingTested patch (registration-level + per-model
reasoningoverride, mirroring thecontextWindow/maxTokenslayering; full runtime suite andtsc --noEmitgreen): steven4354@3bc9fed🤖 Filed with Claude Code