feat: add per-prompt model selection field#36
Open
mtibbits wants to merge 2 commits into
Open
Conversation
Allow users to specify a Claude model ID (e.g. claude-haiku-4-5-20251001) per queued prompt via YAML frontmatter or `claude-queue add --model`. When set, the value is passed to the claude CLI via `--model <id>`. - models.py: add `model: Optional[str]` field to QueuedPrompt - storage.py: R7 type-safe coercion in parse, round-trip in write, include in templates and bank list output - claude_interface.py: inject `--model` flag before positional prompt - cli.py: add `--model/-m` to `add` subparser, display in `bank list` - CLAUDE.md: add model field to YAML schema, --model to CLI reference - 14 new tests across all 4 test files Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Matthew Tibbits <mtibbits@users.noreply.github.com>
32b0c5c to
53e0fa4
Compare
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Matthew Tibbits <mtibbits@users.noreply.github.com>
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
modelfield toQueuedPromptYAML frontmatter, allowing users to specify a Claude model ID (e.g.claude-haiku-4-5-20251001) per queued prompt--model <id>to theclaudeCLI subprocess; when unset, behavior is unchanged (backward compatible)model: true→"True")--model / -mflag toclaude-queue addCLI commandclaude-queue bank listoutput and template frontmatterChanges
models.pymodel: Optional[str] = Nonefield onQueuedPromptstorage.pyclaude_interface.py--modelflag injected before positional prompt argcli.py--model/-monaddsubparser, display inbank listTest plan
pytest tests/ -m "not llm_eval"— all 547 tests pass (verified locally)claude-queue add "test" --model claude-haiku-4-5-20251001creates prompt with model setclaude-queue add "test"(no flag) creates prompt withmodel=Noneclaude-queue template foooutput includesmodel: nullin frontmatterclaude-queue bank save foo && claude-queue bank listshows model fieldmodel: truein frontmatter →"True"string (invalid model, handled by CLI exit + retry)🤖 Generated with Claude Code