Repository navigation
✨ feat: plumb --model through to claude and codex executors - #23
Merged
Merged
Conversation
--model was silently dropped by the claude and codex providers: NewClaudeExecutor/NewCodexExecutor took no config, so only Ollama honored the flag. - Add ClaudeConfig/CodexConfig (matching the OllamaConfig idiom) with Model and ExtraArgs, appended to the spawned CLI args when set - Forward provider.Config through both providers' NewExec - Stamp the resolved model in worker.Result so fix_attempt telemetry attributes outcomes per model - Regression test in pkg/provider covering the exact silent-drop bug Fixes #20
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.
Fixes #20
Problem
--modelwas silently ignored for theclaudeandcodexproviders —NewExecdroppedprovider.Configand the executors took no configuration. Only Ollama honored the flag, sosweeper run --provider claude --model haikuran on the CLI's default model with no warning.Changes
ClaudeConfig/CodexConfiginpkg/worker(matching the existingOllamaConfigidiom) withModelandExtraArgs; executors append--model <x>and extra args to the spawned CLI when set, before the promptprovider.Configinstead of dropping it; the agent's defensive claude fallback passescfg.ProviderModeltooResult.Modelis stamped on every attempt, sofix_attempttelemetry (andsweeper observe) can attribute outcomes per modelVerification
pkg/providercovering the exact silent-drop bug (TestCLIProvidersForwardModel)--model claude-haiku-4-5→claude --print --dangerously-skip-permissions --model claude-haiku-4-5 <prompt>--model→ flag omitted (default behavior unchanged)paperinstalled →paper start claude -- --print ... --model fable-5 <prompt>(survives the gateway path)--provider codex --model o4-mini→codex --quiet --approval-mode full-auto --model o4-mini <prompt>"model":"claude-haiku-4-5"/"fable-5"/"o4-mini"per attemptOut of scope (noted on #20)
pkg/worker/vm.go) still hardcodesclaude --print—--vmruns ignore--modelExtraArgsis threaded through executors but nothing populates it from TOML/CLI yet