fix(provider): map NaN reasoning levels per model - #1637
Merged
Merged
Conversation
Align Pi thinking levels with the efforts each NaN model accepts: GLM maps minimal/xhigh onto low/max and cannot be disabled; Qwen 3.6 and Gemma 4 map off to none so reasoning can actually be turned off; fixed-depth models (DeepSeek V4 Flash, Qwen 3.8 Flash, MiMo) expose a single medium level. Advertise GLM 5.3 image input and raise output caps so reasoning that shares max_tokens does not starve the answer.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
2 tasks done
barbatdev
added a commit
that referenced
this pull request
Oct 2, 2026
) NaN's gateway accepts reasoning_effort "none" for deepseek-v4-flash, which deterministically disables its reasoning phase. Give the model its own thinking level map exposing off (matching qwen3.6 and gemma4 from #1637) instead of inheriting the shared fixed-depth map that nulls it, and correct the shared map's comment. qwen3.8-flash and mimo-v2.6-flash keep their existing behavior. Closes #1645
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.
Closes #1635
Summary
reasoning_effortvalues each NaN model actually accepts, per https://nan.builders/docs/models.max_tokensdoes not starve the answer.thinkingLevelMapso catalog snapshots stay isolated.Changes
lib/nan-provider.tsthinkingLevelMap,glm5.3image input, configured output caps, map cloningtests/nan-provider.test.tsglm5.3,glm5.3-flashminimal→low,xhigh→max,offunsupportedqwen3.6,gemma4off→none(disables reasoning),xhigh→maxdeepseek-v4-flashmediumonly (fixed depth)qwen3.8-flashmediumonlymimo-v2.6-flashmediumonlyCaps without a published maximum are configured values, not NaN limits.
Test Plan
node --experimental-strip-types --test tests/nan-provider.test.ts).node scripts/check-types.mjs: 187 recorded diagnostics, no regressions.node scripts/run-test-suite.mjs: 4533 passed, 34 skipped, 0 failed.git diff --check: clean.Checklist
status:approved)type:*labelCo-Authored-BytrailersSummary by CodeRabbit