Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -683,14 +683,20 @@ Built-in model maps:
|----------|---------|-------|--------|-------|
| `openai` | `codex_cli` | `gpt-5.4-mini` | `gpt-5.4` | `gpt-5.5` |
| `openai` | `openai_api` | `gpt-5.4-mini` | `gpt-5.4` | `gpt-5.5` |
| `anthropic` | `claude_cli` | `claude-haiku-4-5` | `claude-sonnet-5` | `claude-opus-5` |
| `anthropic` | `claude_cli` | `claude-sonnet-5` | `claude-sonnet-5` | `claude-opus-5` |
| `anthropic` | `anthropic_api` | unset | unset | unset |
| `pi` | `pi_rpc` | unset | unset | unset |

`anthropic_api` and `pi_rpc` require explicit `llm.model_map` entries for every
tier an agent asks for; an unmapped tier fails the run and names the entry to
add. A built-in mapping is a floor, not a recommendation: override the tier in
`llm.model_map` when a stage deserves a stronger model than its tier implies.
`llm.model_map` when a stage deserves a different model than its tier implies.

`claude_cli` maps `small` and `medium` to the same model deliberately. 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 a review should rest on. An operator who wants a genuinely
smaller model for `small` names it in `llm.model_map`.

For Anthropic subscription profiles, `adapter: claude_cli` runs Claude Code
background jobs, writes the full review task to `cr-prompt.txt` in an
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/configcmd/configcmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2130,7 +2130,7 @@ func TestConfigLLMModelsListAndResolve(t *testing.T) {
if err := root.Execute(cmd, []string{"--profile", "home", "config", "llm", "models", "list"}); err != nil {
t.Fatalf("Execute list: %v", err)
}
if !strings.Contains(out.String(), "small: claude-haiku-4-5 (built_in)") ||
if !strings.Contains(out.String(), "small: claude-sonnet-5 (built_in)") ||
!strings.Contains(out.String(), "medium: claude-sonnet-5 (built_in)") ||
!strings.Contains(out.String(), "large: claude-opus-5 (built_in)") {
t.Fatalf("list stdout = %q, want effective Claude CLI defaults", out.String())
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/initcmd/initcmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10365,7 +10365,7 @@ func TestInitProfileV2LLMRuntimeSelectionRefreshesModelMapFields(t *testing.T) {
},
}
model := newInitProfileV2ReadOnlyModel(newTestInitProfileV2EditorWithRuntimeAndModelMap("monit", "github.com/SignalFT", llmRuntimes, "claude-work"), 160, 24)
if got := model.document.fieldValue(initProfileV2FieldModelMap(config.ModelTierSmall)); got != "claude-haiku-4-5" {
if got := model.document.fieldValue(initProfileV2FieldModelMap(config.ModelTierSmall)); got != "claude-sonnet-5" {
t.Fatalf("initial small model = %q, want Claude built-in", got)
}
if got := model.document.fieldValue(initProfileV2FieldModelMap(config.ModelTierMedium)); got != "claude-sonnet-5" {
Expand Down
2 changes: 1 addition & 1 deletion internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ var llmRuntimeSpecs = []LLMRuntimeSpec{
SuggestedName: "claude-cli",
DisplayName: "Claude CLI",
BuiltInModelMap: ModelMap{
string(ModelTierSmall): "claude-haiku-4-5",
string(ModelTierSmall): "claude-sonnet-5",
string(ModelTierMedium): "claude-sonnet-5",
string(ModelTierLarge): "claude-opus-5",
},
Expand Down
2 changes: 1 addition & 1 deletion internal/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ func TestBuiltInModelMapIsProviderAdapterSpecific(t *testing.T) {
provider: LLMProviderAnthropic,
adapter: LLMAdapterClaudeCLI,
want: ModelMap{
"small": "claude-haiku-4-5",
"small": "claude-sonnet-5",
"medium": "claude-sonnet-5",
"large": "claude-opus-5",
},
Expand Down
2 changes: 1 addition & 1 deletion internal/stagemodel/resolver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ func TestResolveStageModelMapsSmallTierForClaudeCLI(t *testing.T) {
if err != nil {
t.Fatalf("ResolveStageModel: %v", err)
}
if resolved.Model != "claude-haiku-4-5" || resolved.Source != config.ModelMapSourceBuiltIn {
if resolved.Model != "claude-sonnet-5" || resolved.Source != config.ModelMapSourceBuiltIn {
t.Fatalf("resolved = %#v, want the built-in Claude CLI small model", resolved)
}
}
Expand Down
2 changes: 1 addition & 1 deletion internal/view/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ LLM:
Adapter: claude_cli
Credential name: adapter-managed; not stored by cr
Model map:
small: claude-haiku-4-5 (built_in)
small: claude-sonnet-5 (built_in)
medium: claude-sonnet-5 (built_in)
large: claude-opus-5 (built_in)
Credentials:
Expand Down
Loading