Repository navigation
fix(claude): default the Claude backends to the CLI's sonnet alias - #425
Open
JodyeJack (2vqmgh2pbd-cmyk) wants to merge 1 commit into
Open
JodyeJack (2vqmgh2pbd-cmyk) wants to merge 1 commit into
JodyeJack (2vqmgh2pbd-cmyk) wants to merge 1 commit into
Conversation
claude_chat and claude_code_exec defaulted to claude-sonnet-4-6, so --backend claude without model.optimizer or model.target ran both roles on that model after Sonnet 5 and Sonnet 5.5 shipped. The Claude CLI documents 'sonnet' as an alias for the latest Sonnet, and skillopt_sleep's Claude backend already defaults to it. claude_backend.py and claude_code_backend.py also kept their own copy of the dated ID as the module fallback. They now read it from default_model_for_backend(), so the defaults cannot drift apart.
Contributor
|
JodyeJack (@2vqmgh2pbd-cmyk) please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
This branch has not been deployed
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
The Claude backends now default to
sonnet, which the Claude CLI resolves to the latest Sonnet, instead ofclaude-sonnet-4-6. With the old default,--backend claudewithoutmodel.optimizerormodel.targetran both roles on Sonnet 4.6 after Sonnet 5 and Sonnet 5.5 shipped.skillopt_sleep's Claude backend already defaults tosonnet.User impact: unconfigured
claude_chatandclaude_code_execruns used an older model than the current Sonnet.Proof: the new default test fails on
mainat22c1ed8and passes with this change.Reproduce
On
mainthis printsclaude-sonnet-4-6 claude-sonnet-4-6.scripts/train.pyandscripts/eval_only.pyfilloptimizer_modelandtarget_modelfrom this default when a config leaves them empty or at the base config's OpenAI model.claude --helpsays--modelaccepts an alias for the latest model, such assonnet, or a full model name.Changes
common.py:claude,claude_chatandclaude_code_execdefault tosonnet.claude_backend.pyandclaude_code_backend.pytake their module fallback fromdefault_model_for_backend()instead of repeating the ID.tests/test_claude_code_exec_resolution.pyexpectssonnetwhere it expectedclaude-sonnet-4-6.tests/test_claude_default_model.py: the Claude backend names resolve tosonnet, and both modules fall back todefault_model_for_backend()whenOPTIMIZER_DEPLOYMENTandTARGET_DEPLOYMENTare unset.If you would rather pin, set the three entries to
claude-sonnet-5-5and update the expected values in the two test files.Tests
python -m pytest -qon macOS, rebased onmainat22c1ed8: 2348 passed (2342 onmain). The only failures are the two tests intests/test_sleep_adopt_skill_subset.pythat also fail onmainon macOS, where the temporary directory sits behind the/varsymlink.