Skip to content

feat(cli): support --model flag to override adapter model per run#232

Open
nextlevelshit wants to merge 1 commit intomainfrom
198-model-flag-override
Open

feat(cli): support --model flag to override adapter model per run#232
nextlevelshit wants to merge 1 commit intomainfrom
198-model-flag-override

Conversation

@nextlevelshit
Copy link
Collaborator

Summary

  • Adds a --model flag to wave run, wave do, and wave meta commands
  • The flag overrides runtime.adapter.model from wave.yaml for a single invocation
  • Per-persona model pinning takes precedence over the CLI flag
  • The override is threaded through RunOptions → executor → adapter cleanly
  • Invalid or empty model identifiers are rejected with clear error messages

Closes #198

Changes

  • cmd/wave/commands/run.go — Added --model persistent flag to the run command, threaded into RunOptions
  • cmd/wave/commands/do.go — Added --model persistent flag to the do command
  • cmd/wave/commands/meta.go — Added --model persistent flag to the meta command
  • internal/pipeline/executor.go — Extended RunOptions with ModelOverride field; executor applies override to adapter options when persona doesn't pin a model
  • internal/pipeline/executor_test.go — Added comprehensive tests for override logic, per-persona precedence, and empty-override passthrough
  • cmd/wave/commands/run_test.go, do_test.go, meta_test.go — Added flag registration tests
  • specs/198-model-flag-override/ — Added specification, plan, and task artifacts

Test Plan

  • Unit tests cover: flag parsing on all three commands, model override application, per-persona model pinning precedence, no-op when flag is absent
  • All existing tests continue to pass (go test ./...)

Add a --model CLI flag to wave run, wave do, and wave meta that
overrides the adapter model for a single invocation. The override is
threaded through a new WithModelOverride executor option and applied
in runStepExecution with three-tier precedence: per-persona model
pinning > CLI --model flag > adapter default.

Closes #198
@nextlevelshit nextlevelshit force-pushed the 198-model-flag-override branch from 46d9d75 to a282ee8 Compare March 3, 2026 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(cli): support --model flag to override adapter model per run

1 participant