feat: allow a dedicated model for auto-review classifier requests - #72
Merged
Merged
Conversation
Resolve the conflicts caused by the documentation site, native Responses API, and server compaction changes on main while retaining dedicated routing for Claude Code's Bash security-review classifier. Use gpt-5.6-luna automatically when the classifier's original provider is Codex. Preserve the requested model for other providers, and let an explicit autoReviewModel select any registered provider without changing session affinity. Bypass the global Codex model override for these one-off requests so the selected classifier model reaches the upstream. Document the provider-aware default and cover default routing, explicit overrides, request exclusions, configuration precedence, and affinity preservation.
Owner
|
Thanks |
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
CCP_AUTO_REVIEW_MODELor the top-levelautoReviewModelconfig keyMotivation
Claude Code sends autonomous Bash permission reviews as separate model requests. When the active session uses a large model or high reasoning effort, those small classifier calls use the same expensive route even though a smaller model is sufficient.
This complements the compact-effort specialization added in #67, but applies to a different request class: the Bash auto-review classifier rather than conversation compaction.
Configuration
Environment:
config.json:{ "autoReviewModel": "gpt-5.6-luna" }Use a direct model ID for deterministic provider selection. When the option is unset, request routing is unchanged.
The override is deliberately narrow: it does not apply to normal messages, streaming requests, tool-using requests, or
/v1/messages/count_tokens.Verification
cargo fmt --all -- --checkcargo test --locked— 623 tests passedgpt-5.6-solreached the mock Codex upstream asgpt-5.6-terra, while the following normal request still reached it asgpt-5.6-sol