Skip to content

fix(kas): name kiro-cli's chat.defaultModel when a KAS chat does not start on it - #33222

Merged
KiroCrewCaptain merged 1 commit into
mainfrom
fix/kas-chat-default-model-notice
Nov 8, 2026
Merged

KiroCrewCaptain merged 1 commit into
mainfrom
fix/kas-chat-default-model-notice

Conversation

@iamwhatever

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: A KAS chat that does not start on the user's kiro-cli default model says so, names that model, and says how to pick it in Crew.

kiro-cli starts a chat on its cli.json chat.defaultModel when nothing pins a model. KAS reads no cli.json, so on KAS an unpinned chat silently starts on KAS's own default instead (P1-37 in the kiro-cli -> KAS migration list).

Why it matters

Users moving from kiro-cli to KAS lose their chosen default model with no sign of it. They see answers from a different model and do not know why or how to get theirs back.

Not a goal

  • Carrying chat.defaultModel onto the session. Four local review rounds each found a real defect where an inherited model becomes the session's pin. The last one was the engine-fallback promotion at acp/engine_fallback.py:468-469. A full carry needs the pin mark to live with the session handle; that design stays open in KAS ignores kiro-cli's chat.defaultModel #33023.
  • Changing any model the user, the slot, the agent spec or the config pins.
  • Subagent sessions and warm-pool processes.

What changed (motivation → approach → change)

Symptom: an unpinned KAS chat runs on KAS's default with no explanation. Root cause: KAS reads no cli.json, and Crew does not yet carry the setting. Change, notice only:

  • acp/kas_cli_settings.py: kiro_cli_default_model reads chat.defaultModel through the same credential-gated reader as the telemetry opt-out. The workspace file wins, as in kiro-cli. A value that is not a plain model id, or an unreadable file, is skipped. default_model_notice builds the sentence.
  • providers/acp_runtime_start.py: on a KAS cold start whose configured model is empty or auto, the setting is read off the event loop, and the notice is put on the new session provider (kas_default_model_notice). Nothing else on the start path changes: no model is sent, no pin is written, and engine_fallback.py is untouched.
  • providers/acp.py (kiro_cli_model_notice) and dashboard/chat_turn/turn_spec_hooks._notice_steer_upgrade: the notice is one more session-start row, shown once per new session, like the other KAS notices.
  • Spec: docs/system-specs/modules/acp-client.md, new section "kiro-cli chat.defaultModel on KAS".

Backwards compatibility

Compatible: the only new behavior is a notice row on unpinned KAS chats whose kiro-cli settings name a default model. Model selection is unchanged.

Removes nothing: the diff adds a reader, a provider field and property, and a notice row.

Tests

  • test/test_acp_provider.py::test_an_unpinned_kas_start_names_kiro_cli_chat_default_model: an unpinned KAS start (empty or auto) records the notice and sends no model. A Crew pin, or the kiro backend, records none, and the pin still goes out as before.
  • test/test_kas_cli_settings.py: the workspace file wins; bad values and unreadable files are skipped; the notice names the model and the picker; the notice reaches the session-start row.
  • test/test_acp_bindings.py: the new kiro_cli_model_notice property row.

Proof: PROVEN test/test_acp_bindings.py::test_the_member_set_is_the_frozen_inventory (head a858c61)

Manual verification

N/A — unit coverage sufficient: the change is a notice string and the condition that records it, both asserted on the real start path and the real row function.

Related Issues

Part of #33023. That issue stays open for carrying the setting; the four review findings and every model reader and writer are listed in this comment.

Sibling sweep

Swept: git grep -n "chat.defaultModel" -- src/kiro_crew
Siblings: none -- kiro-cli reads its own cli.json, and no other Crew harness reads chat.defaultModel

Pattern harvest

Not generalizable: one setting that one engine does not read; the general carry problem is tracked in #33023.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license.

@iamwhatever
iamwhatever requested review from a team and KiroCrewCaptain as code owners November 8, 2026 14:33
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 8, 2026
@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ⏭️ skipped

Revision ea22b7e2886198807b85dcfe6bede32f88a340dd touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Does not block merge.

@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of ea22b7e2886198807b85dcfe6bede32f88a340dd — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: this only adds a notice row. Model selection and pins are unchanged, so a revert walks it back cleanly.

Notes

  • The notice fires whenever the configured model (_model) is empty or auto. A KAS agent spec can still pin its own model, and on such a session the row would wrongly say the chat "started on KAS's own default model". Also check that the agent spec pins nothing, or reword the notice so it does not claim which model was used.

[DESIGN-REVIEWED] ea22b7e

Description read

[DESCRIPTION-READ] 280728ddaab91a8be591500a94dc147927207ab280d8845f166dcfd8da5b64d3

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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of ea22b7e2886198807b85dcfe6bede32f88a340dd — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

This change only adds a notice. The description says it sits at the symptom level and leaves the real fix, carrying the setting onto the session, to #33023. It reads cli.json through the existing credential-gated _read/_settings_files and adds no second reader.

What this change ships

Inventory (4 items) — 4 justified

Intent: users moving from kiro-cli to KAS should find out that their chat.defaultModel was not used, and how to pick it in Crew. The title says FIX; the change itself is a small ADDITION (a notice only).

  1. A KAS chat with no pinned model (empty or auto) shows a one-time notice that names kiro-cli's default model and points to the model picker. — justified
  2. On a KAS cold start, Crew reads chat.defaultModel from the global and workspace cli.json (workspace wins; values that are not a plain model id are skipped). — justified
  3. Two new surfaces: the session provider field kas_default_model_notice and the AcpProvider.kiro_cli_model_notice property. The notice-row loop in _notice_steer_upgrade is the one consumer of each. — justified
  4. A new acp-client spec section describes the notice. — justified

[FIRST-PRINCIPLES-REVIEWED] ea22b7e

Description read

[DESCRIPTION-READ] 76ed79bf67e1d4a6623ab18f5cfe0dec0fac1af9dfd7888e2048126b3dfcb993

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings (all downgraded on adjudication)

GPT 6.1 flagged blocking issues on ea22b7e2886198807b85dcfe6bede32f88a340dd; Opus 5.5 adjudication downgraded every one of them. Downgraded: the remedy each one needs is disproportionate to the harm it prevents. Adjudication downgraded all 1 blocking finding(s): the remedy each one requires is disproportionate to the harm it prevents.

This comment is updated in place on each push.

Review details

BLOCKING -- src/kiro_crew/providers/acp_runtime_start.py:1027 -- Suppress the mismatch notice when the session already serves the configured default

if self._client.backend == ACP_BACKEND_KAS and configured_model in ("", DEFAULT_MODEL):
Trigger: Crew’s model is auto, chat.defaultModel is claude-sonnet-4.5, and KAS’s model select omits auto with Sonnet first. _start_kiro_runtime_impl → create_session → ensure_served_default switches the session to Sonnet before this condition records the notice.
Outcome: _notice_steer_upgrade tells the user the chat started on KAS’s own default and instructs them to select Sonnet, although the session already serves Sonnet.
Anchor: defect
Fix: Compare the settings model with handle.served_model and suppress the notice when they match; do not claim a backend-default start when the handle reports a substitute.
[BLOCK-MERGE-DOWNGRADED] ea22b7e
[GPT-REVIEWED] ea22b7e

Adjudication (Opus 5.5) — is blocking on each finding proportionate?

F1 — LOW. The finding is wrong only in what one notice says. The session runs the right model either way, and following the notice's advice changes nothing. All of these must be true for it to happen:

  • The backend is KAS and the chat has no model pinned (src/kiro_crew/providers/acp_runtime_start.py:1027).
  • kiro-cli's chat.defaultModel is set to something other than auto (src/kiro_crew/acp/kas_cli_settings.py:169).
  • KAS's model select leaves out auto, so _kas_auto_fallback is set (src/kiro_crew/acp/session_handle_model_selection.py:829), and that fallback happens to be the same model as chat.defaultModel (src/kiro_crew/acp/session_handle_model_selection.py:840).

There is no recovery path because none is needed: the session already serves the model the notice suggests, and picking it again does nothing. The real fix is cheap but not free. It needs a served-model comparison plus a second wording for the case where KAS switched the session to a substitute model, which ties this notice to the substitute logic for good. Either way it is more than a one-off mislabelled notice in a rare account setup is worth blocking on.

[ADJUDICATION] ea22b7e2886198807b85dcfe6bede32f88a340dd total=1 uphold=0 downgrade=1
DOWNGRADE F1 src/kiro_crew/providers/acp_runtime_start.py:1027 reason=disproportionate-remedy
[GPT-ADJUDICATED] ea22b7e2886198807b85dcfe6bede32f88a340dd

False positive or not applicable? A repository writer can comment:
/ai-review override gpt ea22b7e2886198807b85dcfe6bede32f88a340dd false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed ea22b7e2886198807b85dcfe6bede32f88a340dd — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] ea22b7e

Verdict parsed from the review's SHA-scoped output markers for commit ea22b7e2886198807b85dcfe6bede32f88a340dd.

False positive or not applicable? A repository writer can comment:
/ai-review override fable ea22b7e2886198807b85dcfe6bede32f88a340dd false-positive: <reason, 20 to 500 characters>

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 8, 2026
…start on it

KAS reads no cli.json, and carrying chat.defaultModel safely needs a pin
mark on the session handle (#33023). Until then an unpinned KAS chat keeps
main's model behaviour, and the session gets one notice that names the
kiro-cli default model and says how to pick it in Crew.
@iamwhatever
iamwhatever force-pushed the fix/kas-chat-default-model-notice branch from a858c61 to ea22b7e Compare November 8, 2026 14:53
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Nov 8, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor Author

Disposition for the GPT 6.1 block on ea22b7e2886198807b85dcfe6bede32f88a340dd.

The finding is in website/src/components/SvgShadow.tsx, which this PR does not touch. gh pr diff --name-only lists only the KAS settings module, the start path, the session provider, the provider facade, the session-start notice list, their tests and the spec. The code comes from main (#33187), and the defect is tracked in #33251. It is not fixed here, so this PR stays a notice-only change for #33023. No override is posted from this side.

@iamwhatever

Copy link
Copy Markdown
Contributor Author

Correction to my comment above: the GPT 6.1 lane on ea22b7e2886198807b85dcfe6bede32f88a340dd reports no blocking findings. Its one finding was downgraded on adjudication, and it is not about SvgShadow.tsx.

Downgraded finding, providers/acp_runtime_start.py:1027: the notice can show when the session already serves the model chat.defaultModel names, for example when that model is KAS's own default. The sentence stays true, because KAS did not read the setting, and picking that model again is harmless. So I am answering it here and not pushing. Comparing the setting against handle.served_model belongs with the full carry tracked in #33023.

website/src/components/SvgShadow.tsx: this PR does not touch it. The finding there comes from main (#33187) and is tracked in #33251. No fix and no override from this side.

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 8, 2026
@KiroCrewCaptain
KiroCrewCaptain enabled auto-merge (squash) November 8, 2026 16:05

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving. On this head the review checked several things. The new notice only reads settings: it sends no model and writes no pin, and the test asserts that the set_model calls do not change. The cli.json read reuses the existing credential-gated reader, runs off the event loop, and catches the full unreadable-settings error set. The harness check is a positive == ACP_BACKEND_KAS. Reverting the provider assignment or the notice row makes the new tests fail. The branch also merges cleanly onto current main, which already has #33221.

Done well: the PR keeps its scope honest. It leaves the real carry of chat.defaultModel to #33023 and gives a concrete reason, so it does not ship a half fix.

Optional:

  • acp_runtime_start.py:1027 does not compare the setting with the model the session is actually serving. So when the served-default fallback already picked that model, the notice can still say "pick it". One way to fix this is to skip the row when the two match.
  • test/test_acp_provider.py:1089: add a parametrize row with a non-Kiro, non-KAS backend (for example the Claude backend). Then loosening the guard to "not kiro" would make the test fail.
  • test/test_acp_provider.py:1106: have the default_model_notice stub record its argument and assert that it is the session folder. Today, passing None would drop the workspace cli.json and the tests would still pass.

@KiroCrewCaptain
KiroCrewCaptain merged commit 04fbd9e into main Nov 8, 2026
99 checks passed
@KiroCrewCaptain
KiroCrewCaptain deleted the fix/kas-chat-default-model-notice branch November 8, 2026 16:05
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 8, 2026
buluoray added a commit that referenced this pull request Nov 8, 2026
…start on it (#33222)

KAS reads no cli.json, and carrying chat.defaultModel safely needs a pin
mark on the session handle (#33023). Until then an unpinned KAS chat keeps
main's model behaviour, and the session gets one notice that names the
kiro-cli default model and says how to pick it in Crew.

Original author: Joe Guo
(cherry picked from commit 04fbd9e)
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.

2 participants