✨ Add --model CLI flag and ASKCC_CLAUDE_MODEL env var (closes #110)#111
Merged
Conversation
Mirrors the existing --effort precedence chain for model. The CLI resolves precedence (CLI > env > frontmatter > unset), the runner consumes the resolved value. Unset everywhere returns None and no --model flag is emitted, preserving today's behavior for templates without a model field.
Closed
7 tasks
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
--modelCLI flag andASKCC_CLAUDE_MODELenv var, completing the precedence chain symmetry started in ✨ Add subagent frontmatter to agent action definitions #84_resolve_modelhelper inaskcc/cli.pymirrors_resolve_effort: CLI > env > frontmatter > unset (returnsNone, no flag emitted)Runner.rungains amodel: str | Nonekwarg;_frontmatter_cli_flagsaccepts an override and falls back toconfig.modelBehavior
askcc --model sonnet develop <url>overridesmodel: opusinDEVELOP_SYSTEM_PROMPT.mdASKCC_CLAUDE_MODEL=sonnet askcc develop <url>does the same when no--modelflag is set--model opuzrejected by argparse (exit 2);ASKCC_CLAUDE_MODEL=opuzlogs a warning and falls through--modelflag emitted,claudepicks its own default (unchanged behavior)Tests
TestModelPrecedence— CLI > env > frontmatter > unset (Nonepropagates)TestModelCLIFlags— CLI flag and env var both reachrunner.run(model=...); invalid CLI value rejected by argparseTestResolveModel— unit tests for the helper including warn-and-ignore on invalid env varTestRunnerFrontmatterFlagsextensions — runner-level override and config fallbackTest plan
uv run pytest— 272 passeduv run ruff check— all checks passeduv run pyright— 0 errorsCloses #110