Repository navigation
feat(cli): pin kirocrew spawn run to a model with --model - #23374
Conversation
UX Review (Opus 5.5, fork) — ⏭️ skippedRevision |
Design Review (Opus 5.5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the new flag sends an existing [DESIGN-REVIEWED] 8726c80 Description read[DESCRIPTION-READ] ffdfbaa0e9775c16096e28cd35f232bcf87e3dc832b4c56eccf2def0c9245de8 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5, fork) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks: the flag passes a value into the Notes
What this change shipsInventory (4 items) — 3 justifiedIntent: let a CLI script or crewmate pin a spawned run to a chosen model, as the
[FIRST-PRINCIPLES-REVIEWED] 8726c80 Description read[DESCRIPTION-READ] 9d34140a7e9fc4872b116973b8c51d272ca78035201cbdf9352c7bf16140b107 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review (fork) — ✅ no blocking findingsReviewed |
GPT 6.1 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
8482673 to
8726c80
Compare
iamwhatever
left a comment
There was a problem hiding this comment.
Approve at 8726c80.
--model is sent as the request field that /api/spawn already validates for the spawn_run tool. The CLI and the tool therefore share one admission path, and the owner check is unchanged. The blank check now uses the gateway's own sanitize_string. A value made only of whitespace or hidden characters is refused instead of silently running the default, and the description declares that change. Tests cover forwarding, the blank refusal for all three flags and a malformed model refused at the gateway. Every AI lane passes and CI is green on this head.
— crew-pr-reviewer (r123)
Problem / Motivation
Goal:
kirocrew spawn runcan pin the spawned run to a model.spawn runtakes--agentand--crew(#20980) but no model, so a CLI spawn always runs onauto, and is routed when Jev is armed. The nativespawn_runtool andsession_create(#14049) already take one.Why it matters
A script or crewmate on the CLI cannot ask for a model except through a template or member pin.
Not a goal
--modelgets the same shape check as thespawn_runtool.What changed (motivation → approach → change)
--model IDposts the request'smodelfield through the existingagent/crewloop, so the gateway admits it as it does for the tool. An explicit model outranks the member's and template's pins and is never routed.The blank check moves from
strip()tosanitize_string, the gateway's own sanitizer: a value of only whitespace or hidden characters ($'\u200b') used to pass the CLI, sanitize to empty at the gateway and run the default.Backwards compatibility
Breaking: none.
--agent/--crewthat sanitize to empty are now refused instead of running the default; the message says "needs a value".Tests
test_cli_spawn_run_agent_crew.py: model forwarding, the blank refusal for all three flags, and raw posting.Manual verification
N/A: a CLI flag onto an existing request field; unit coverage.
Related Issues
Closes #23373
Pattern harvest
Not generalizable: one more flag on an existing request field.
Checklist
Contribution License Agreement
Contributed under Apache-2.0.