feat(cli): support per-run LLM provider and model overrides - #687
feat(cli): support per-run LLM provider and model overrides#687Makishima wants to merge 9 commits into
Conversation
|
✅ OpenCodeReview: Review complete: 0 finding(s) across 6 selected item(s). |
lizhengfeng101
left a comment
There was a problem hiding this comment.
It is not recommended to add too much content to the README; instead, it is suggested to add the descriptions of these commands to the official documentation section.
ref:pages/src/pages/DocsPage.tsx
|
Addressed in 1afd06e: the per-run provider/model documentation was removed from the localized READMEs and moved to the official localized CLI reference pages rendered by DocsPage. One clarification regarding the added command-summary row:
The row only documents this existing command because the PR adds
|
There was a problem hiding this comment.
Thanks for this PR! The feature design is solid, with thorough tests and documentation.
One change needed: please keep the strategy resolution order unchanged for the non---provider path (i.e., maintain config → env → Claude Code env → Shell RC).
Reasons:
- The
--providershort-circuit logic is independent of the strategy list order — the feature works either way - The precedence change is a separate breaking change that would silently alter behavior for existing users
- There is no need to take on this compatibility risk
Specifically, the strategies slice in ResolveEndpointWithOptions should be restored to:
strategies := []struct {
name string
fn func() (ResolvedEndpoint, bool, error)
}{
{"OCR config file", func() (ResolvedEndpoint, bool, error) { return tryOCRConfig(configPath, opts) }},
{"OCR environment", func() (ResolvedEndpoint, bool, error) { return tryOCREnv(opts.Model) }},
{"Claude Code environment", func() (ResolvedEndpoint, bool, error) { return tryCCEnv(opts.Model) }},
{"Shell rc file", func() (ResolvedEndpoint, bool, error) { return tryShellRC(opts.Model) }},
}The corresponding tests (e.g., TestResolveEndpoint_OCREnvironmentPrecedesConfig) should be adjusted accordingly. Everything else LGTM.
lizhengfeng101
left a comment
There was a problem hiding this comment.
@Makishima please keep the strategy resolution order unchanged for the non---provider path
|
Addressed in 67a0b14. Restored the legacy non-
The explicit
|
Description
Implements #680 by adding per-run LLM provider and model selection for both
reviewandscan.--providerflag alongside the existing--modelflag.providersandcustom_providers.llmfield.Compatibility note: a complete
OCR_LLM_*environment configuration now takes precedence over file-based provider configuration.Type of Change
How Has This Been Tested?
make testpasses locallyreview --helpexposes--providerand--model.scan --helpexposes--providerand--model.Additional verification:
go vet ./...make buildChecklist
go fmt,go vet)Related Issues
Closes #680