fix(code): honor configured preset instead of hardcoding flash#824
Merged
Conversation
`reasonix code` was passing `opts.model ?? "deepseek-v4-flash"` into chatCommand + the system-prompt builder, so a user with preset=pro or preset=auto in their config was silently downgraded to flash. Resolve the preset (`loadPreset()` → `resolvePreset()`) and use its model id instead — mirrors the same fix #819 landed on the desktop path. Original implementation by @rokyplay in #820; cherry-picked here as a standalone fix so it can land independently of the typeahead/steer work in that PR.
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.
Summary
reasonix codewas passingopts.model ?? "deepseek-v4-flash"into bothchatCommandand the system-prompt builder. A user withpreset: proorpreset: autoin their config was silently downgraded to flash whenever they ranreasonix codewithout an explicit--modelflag. Resolve the preset (loadPreset()→resolvePreset()) and use its model id instead — mirrors the fix #819 landed on the desktop path.Attribution
Original implementation by @rokyplay in #820 (their PR bundles this fix with a separate typeahead/steer feature). Splitting it out here so it can land independently — the preset fix is unambiguous and small, while the typeahead work needs tests + cleanup before it's ready (see review on #820).
Test plan
npm run typechecknpm run verifypreset: proin config, runreasonix codeand confirm the status bar / first-turn cost reflects pro pricing