pi-model-auto-router drops target thinkingLevelMap #9
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
weisanju/pi-plugins#9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Routed target models lose their
thinkingLevelMap, so Pi reasoning levels can be forwarded unchanged even when the target model explicitly maps them to a supported provider value.This breaks models whose provider effort names differ from Pi's level names. For example, GPT-5.6 Sol rejects
minimaland expectsnone | low | medium | high | xhigh | max.Environment
openai-responsesReproduction
Target model in
models.json:Route that targets this model, then request the route with
reasoning: "minimal"(or run):Actual behavior
The downstream request contains:
The model rejects it:
Directly selecting the target provider/model applies the mapping correctly.
Root cause
buildModel(target)copiesreasoning,input,compat, context and token limits from the target model, but omitsthinkingLevelMap. The downstream provider therefore receives a model without mapping metadata and falls back to the raw Pi level.Suggested fix
Propagate the target model mapping in
buildModel:A regression test should assert that a routed model with
minimal: "low"sendslowto the downstream provider.