fix(config): run the Claude CLI small tier on Sonnet, not Haiku - #558
Closed
piekstra wants to merge 1 commit into
Closed
fix(config): run the Claude CLI small tier on Sonnet, not Haiku#558piekstra wants to merge 1 commit into
piekstra wants to merge 1 commit into
Conversation
#557 mapped small to claude-haiku-4-5 to stop an agent's small tier from aborting the whole review. That fixed the abort and picked the wrong model: Haiku is not one a code review should rest on, and the tier existed so an agent could say "this job is narrow", not "grade this with the weakest model available". Map small to claude-sonnet-5, the same model medium resolves to. A tier is what an agent asks for and the built-in is what this CLI is willing to run a review on; nothing obliges the two smallest tiers to differ when the cheaper model is not one worth running. An operator who does want a smaller model for small still names it in llm.model_map, which is where a cost-quality judgment belongs.
Contributor
Author
|
Closing — this imposes one org's model preference on everyone else's CLI.
#557 (the mapping existing at all, so a |
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.
Follow-up to #557, which I got half right.
#557 mapped
smallforclaude_cliso that an agent declaringmodel_tier: smallwould stop aborting the entire review at plan time. That part was correct. Pointing it atclaude-haiku-4-5was not: Haiku is not a model a code review should rest on, and thesmalltier exists so an agent can say this job is narrow, not grade this with the weakest model available.Change
smallnow resolves toclaude-sonnet-5— the same modelmediumresolves to.That equality is deliberate, and the README now says so rather than leaving a reader to wonder whether it is a typo: a tier is what an agent asks for, and the built-in is what this CLI is willing to run a review on. Nothing obliges the two smallest tiers to differ when the cheaper model is not one worth running. An operator who genuinely wants a smaller model for
smallnames it inllm.model_map, which is where a cost-versus-quality judgment belongs — and it was already the workaround in use before #557 landed.Anything is still overridable, and
anthropic_api/pi_rpckeep empty built-in maps, so the unmapped-tier error (which #557 taught to name the entry that fixes it) stays reachable.Not changed
internal/cmd/initcmd/initcmd_test.gohas fixtures pairingclaude-haiku-4withclaude-sonnet-4-6as operator-supplied overrides. Those assert that an arbitrary configured value round-trips; they are not this CLI selecting a model, so I left them rather than churn another test's data.internal/pricingstill pricesclaude-haiku-4-5, correctly — a user can still map it deliberately.Verification
make lintclean.go test ./... -count=1passes exceptTestPiRPCReviewerExtensionLoadsInInstalledPi, which fails identically onmainin this environment (the locally installedpirejects--no-builtin-tools/--no-approve).Note the
-count=1:make testalone serves cached package results, which is exactly how a pinned expectation ininternal/viewreached CI on #557 instead of being caught locally. Every assertion of the built-in small model is updated here —internal/config,internal/stagemodel,internal/cmd/configcmd,internal/cmd/initcmd,internal/view, and the README table.