Repository navigation
feat(models): serve the KAS bundle picker from the engine model select - #23618
Conversation
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks: this PR adds no new controls, and the blind reader correctly read the newly filled model rows as models they could switch to. Notes
[UX-REVIEWED] f4b12b5 Description read[DESCRIPTION-READ] 715e2d9fd6c9602640e0813ab3b926ee1aa8d6a5e8b0665f64b61d2224125422 That sha256 names everything this verdict read: the PR description, plus the 7 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 |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS No design-level concerns: the bundle-route picker reads the engine's measured Notes
[DESIGN-REVIEWED] f4b12b5 Description read[DESCRIPTION-READ] 760862b5fa24084c22298562d7cf46cfccde9b5738487d048878cefd248368d7 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) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. Every item is aimed at the bundle route's missing model list and reuses the existing catalog admission, cache-clear and route predicate. One note: on the relay route the recording has no reader. Notes
What this change shipsInventory (8 items) — 7 justifiedIntent: let a user on the no-kiro-cli KAS bundle route choose a chat model and see its credit cost. This is an ADDITION.
[FIRST-PRINCIPLES-REVIEWED] f4b12b5 Description read[DESCRIPTION-READ] 1d9849098bb17e67c89cd172da50c314c577e47eefc9ded76c0567cc034fd4e1 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findings (all downgraded on adjudication)GPT 6.1 flagged blocking issues on This comment is updated in place on each push. Review detailsBLOCKING -- website/src/pages/developer/KiroSignInCard.tsx:39 -- In-flight model requests repopulate the cleared account cache
Adjudication (Opus 5.5) — is blocking on each finding proportionate?F1: The harm is LOW. The failure needs a False positive or not applicable? A repository writer can comment: |
94949cd to
b2b9b96
Compare
b2b9b96 to
7ea7f6c
Compare
|
Replying to the First Principles notes on
|
bdf8dd2 to
8515ccc
Compare
8515ccc to
50e7e2d
Compare
3eb50c7 to
a2a33c5
Compare
|
On the GPT finding at |
881b1ee to
99184c3
Compare
|
@iamwhatever -- re-review requested on
Since then the PR was rebased onto main twice (one doc conflict in The part you flagged for a maintainer's human sign-off -- the KAS sign-in service's credential write and sign-out paths in |
|
HOLD (sensitive change, human sign-off needed) at 99184c3. The r124 requests are met: #23858 covers the predicate consolidation and is linked, the multiplier badge has an accessible name with a test, and the popover rebuttal holds up against the evidence. I found no defect. Still blocking:
— crew-pr-reviewer (r126) |
|
Opus 5.5 blocking finding on The finding was right. A shell sign-in runs in its own process, so a hook in the dashboard's service never fires for it. Calling
Tests: |
|
First Principles blocker on
The
|
|
First Principles blocker 2 on The |
|
First Principles item 4 ( The vault-identity fence covers every case the generation covered: an account switch from any process, a late response from the previous account, and a switch during the handler's await (the fingerprint is read again after it). So the generation, |
|
@iamwhatever, the three First Principles notes from r126, one at a time (head
|
|
@iamwhatever, please re-review head
You flagged |
|
Findings on
|
|
GPT 6.1 blocking finding on The read now lives in the KAS harness's own session payload. Pinned by |
|
GPT 6.1 blocking finding on The finding is real. |
Human judgment recorded@CrysisDeu recorded a deferred release (class
This decision applies only to this commit. A new push requires a new judgment. |
|
/ai-review override gpt 91b321b pre-existing #24942: agent: per @CrysisDeu ruling, old bug. A same-provider switch with the same profileArn leaves vault_identity_fingerprint unchanged; main identity sweep already misses it. Fix tracked in #24942. |
On the KAS bundle route (agent.acp_backend "kas" with agent.kas_bundle on) the host may have no kiro-cli, yet GET /api/models only knew the `kiro-cli chat --list-models` catalog behind kiro-cli's readiness gate, so the picker stayed on `auto` with no context windows and no credit multipliers, and the degraded 503 poll kept trying to spawn kiro-cli. Measured on the bundled engine (KAS 0.66.33, no kiro-cli on PATH, Crew vault sign-in; fixture kas/bundle-session-live.jsonl): session/new has no `models` object. The list is the configOptions `model` select, each option carrying _meta.kiro.rateMultiplier and no structured context window. Both session drivers now record that select as the engine's catalog (acp/kas_model_catalog.py, positive KAS identity; the session's advertised list is untouched), and /api/models dispatches the bundle route to handlers/models_kas_bundle.py before the kiro-cli path: bundle readiness (installed engine, vault identity) instead of kiro-cli's latch, `auto` alone while cold, the recorded rows with rate_multiplier once a session has advertised, a context_window only where the registry knows the id, and the same refresh_kiro_catalog admission feeding the `acp` vocabulary bucket and the prices. The kiro-cli route is unchanged. A recording belongs to one account: each KAS session request is stamped with the vault identity fingerprint it went out under, and the picker serves the rows only while the vault still names that account. The fingerprint is read from the vault itself, so a sign-in or sign-out from the dashboard or from `kirocrew kas login` / `kas logout` in a shell turns the picker cold, with no hook in the sign-in service. Refs #21843 Refs #23858
|
AI-review override not recorded: |
Problem / Motivation
Goal: On the KAS bundle route, the chat model picker lists the models the engine serves, with their credit multipliers, without ever starting kiro-cli.
With
agent.acp_backend: kasandagent.kas_bundle: truethe host may have no kiro-cli at all.GET /api/modelsonly knew thekiro-cli chat --list-modelscatalog behind kiro-cli's readiness gate, so the picker stayed onauto, showed no context windows and no credit multipliers, and the degraded 503 poll kept trying to start kiro-cli every 8 seconds.Why it matters
The bundle route is the no-kiro-cli install (#21843). A picker stuck on
automeans a bundle user cannot choose a model at all, and the cost badge and context meter have nothing to show. It is also one of the kiro-cli call sites that blocks turning the bundle route on by default.Not a goal
--list-modelsand the kiro-cli readiness gate unchanged.auto; the first session fills it.whoami,update,--version).What changed (motivation → approach → change)
Measured first, on the bundled engine with kiro-cli off the PATH and Crew's own vault sign-in (
test/fixtures/acp_frames/kas/bundle-session-live.jsonl):session/newcarries nomodelsobject. The list is theconfigOptionsmodelselect alone; each option carries_meta.kiro.rateMultiplier, and none carries a structured context window. So the select is the catalog on this route, and the design follows the measurement.agent_sdk/kas_model_catalog.pymodelselect into--list-models-shaped rows (model_id,model_name,display_name,description,rate_multiplier) and keeps the last one in memory. Positive KAS identity; the session's own advertised list is untouched. A select is what ONE account is served, so everysession/newandsession/loadnotes the vault identity fingerprint it went out under (kas_model_catalog.vault_identityoverauth/bridge.vault_identity_fingerprint, read off the loop by the KAS harness as it builds the session payload --SessionExtras.vault_identity,""on every other host -- and carried on the handle asrequest_vault_identity),record_catalogkeeps it with the rows and refuses a response without one, andrecorded_catalog_snapshot(identity)yields the rows only to that fingerprint. The fingerprint is read from the vault itself, so the fence holds whichever process changed the account -- the dashboard's sign-in card orkirocrew kas login/kas logoutin a shell -- and the sign-in service needs no hook (auth/service.pyis unchanged). Per request, not per process: the engine takes its credential per call, so a long-lived runtime records for whoever is in the vault at its next session.acp/session_handle_model_selection.py,acp/session_handle_class.py,acp/runtime_session_create.py,acp/runtime_session_load.pyAcpRuntimeonly), stamped with the vault identity the session's request went out under, taken from the harness's own session payload (acp/harness/kas.py,acp/harness/base.py), so the Kiro construction path gains no step (H13) and nothing is read while a start permit is held.dashboard/handlers/models_kas_bundle.pyGET /api/models: readiness is the installed engine plus Crew's vault (coded 503skas_bundle_not_installed/kas_bundle_sign_in_required),autoalone while cold (a fresh process, or a vault that now names another account than the rows were recorded for -- the handler reads the vault's fingerprint on every request and again after its one await, the advertised-store persist), the recorded rows once a session has advertised,context_windowonly wheremodel_registry.model_windowknows the id, and the samerefresh_kiro_catalogadmission feeding theacpvocabulary bucket and the prices. No entitlement narrowing: the select already is the signed-in account's list.dashboard/handlers/agents.pyapi_modelsdispatches on the existing positive two-factagent_sdk.kas_bundle.kas_bundle_route()(off the loop) before the kiro-cli path. A route is not a harness, so this is not a capability set.components/KasLoginGate.tsx,pages/developer/KiroSignInCard.tsxclearCachedModels+ reset of['available-models'], the pair the Agent Harness switch uses), since that list is refetched only on a session spawn.model-selection.md,harness-parity.md,acp-client.md,agent-host-contract.md, the feature map andconfiguration.mddescribe the route.The picker's rows have the shape it already reads, and the dashboard already refetches the list when a session spawns; the picker component itself is unchanged (its credit-multiplier badge keeps main's sr-only explanation).
This PR adds no "is the bundle route on" predicate of its own: it calls the shared
agent_sdk.kas_bundle.kas_bundle_route(). Folding the other copies into it is #23858.Backwards compatibility
Compatible: the kiro-cli routes take exactly the code path they took before (pinned by
test_api_models_kas_bundle.py::TestDispatchFromApiModels); the bundle route previously answered a permanent 503.Removes nothing: only a new branch and new modules are added; no key, field, route or function goes away.
Tests
test/test_kas_model_catalog.py: the measurement (nomodelsobject on the bundle fixture), the row shape, the price field, grouped options, the id and count bounds, that only a KAS session records, the vault identity fence (rows served only to the fingerprint they were recorded for, a late response from the previous account not served to the next, an empty vault matching nothing, a request without a fingerprint refused, a long-lived runtime recording for each request's account, only a KAS request reading the vault), and that the driver never adopts the select as an advertised list.website/src/test/KiroSignInCard.test.tsx: sign-out and an authorized sign-in reset the['available-models']query and drop the localStorage model cache.test/test_api_models_kas_bundle.py: both coded 503s,autoalone while cold, multipliers and only known windows on recorded rows, the registry feed, an account switch during the persist await answering cold while an unchanged account serves the snapshot, and that the bundle route never reachesreject_if_kiro_unverified,_fetch_kiro_catalogor_entitled_kiro_models(a retained kiro-cli session's list must not narrow the bundle account's picker) while the kiro-cli routes still take their gate; and, against a real vault, that a sign-out plus sign-in throughKasLoginService(the service the dashboard and thekirocrew kasverbs both build) or a second sign-in over an outranked slot turns the picker cold, a sign-out answers the sign-in-required 503, and a same-account token rewrite keeps the rows.test/fixtures/acp_frames/kas/bundle-session-live.jsonl+.expected.json: the live bundled-engine capture (pruned to the product's own routing entry per the corpus rules).Manual verification
Isolated gateway from this worktree, own
KIROCREW_HOME,agent.kas_bundle: true, engine fromkirocrew kas install(KAS 0.66.33), Crew vault sign-in,PATHwithout kiro-cli:GET /api/modelscold → 200,autoalone.engines/kas/0.66.33/.../acp-server.js).GET /api/models→ 200, 21 rows, every row withrate_multiplier(1.0 … 4.4), 19 with acontext_window, 2 without (no source knows them).POST /api/chat/slots/{slot}/modelwith a non-autorow, then a turn → the engine'ssession/newfor the slot reportsmodel.currentValue= that id.gateway.loghas no kiro-cli spawn.Screenshots / video
The chat model picker on the isolated bundle-route gateway (KAS 0.66.33 from
kirocrew kas install, no kiro-cli onPATH, Crew vault sign-in), after one chat turn: 21 rows from the engine'smodelselect with their credit multipliers. The transcript behind it shows the first turn onauto(resolved by the engine) and the second on the pickedclaude-opus-5.5.Light:
Dark:
Those two frames were grabbed the instant the picker attached, mid-way through its 300ms
animate-slide-upentrance (opacity 0 → 1), which is why the user bubble under the popover shows through in them. The popover's surface isbg-bg-elevated, an opaque token in every palette; it does not let anything through once the entrance has settled.Picker after the entrance settles
The built SPA from this head through
website/scripts/lib/stub-dashboard-api.mjs(the same stub harness the repo's picker captures use), the same transcript under the popover, frame taken 700ms after the listbox attached. Computedbackground-colorof thedialog:rgb(33, 29, 37)dark,rgb(255, 255, 255)light;opacity: 1in both. (These frames were taken when this PR also renamed the badge; that change is dropped, and the badge renders as on main.)Dark:
Light:
Related Issues
Refs #21843
Refs #23858 (one predicate for "is the KAS bundle route on"; this PR adds the fourth copy, #23657 the fifth)
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.