-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Kiro honors model config but doesn't advertise it via GetConfigSpec #2903
Copy link
Copy link
Open
Labels
P3Narrow, cosmetic, or low-impact work.Narrow, cosmetic, or low-impact work.area/agent-harnessWorker and reviewer harness discovery, launch, hooks, auth, and resume.Worker and reviewer harness discovery, launch, hooks, auth, and resume.comp/daemonGo daemon, process lifecycle, and backend control plane.Go daemon, process lifecycle, and backend control plane.help wantedMaintainers explicitly welcome external help.Maintainers explicitly welcome external help.type/bugExisting behavior is broken or incorrect.Existing behavior is broken or incorrect.
Description
Metadata
Metadata
Assignees
Labels
P3Narrow, cosmetic, or low-impact work.Narrow, cosmetic, or low-impact work.area/agent-harnessWorker and reviewer harness discovery, launch, hooks, auth, and resume.Worker and reviewer harness discovery, launch, hooks, auth, and resume.comp/daemonGo daemon, process lifecycle, and backend control plane.Go daemon, process lifecycle, and backend control plane.help wantedMaintainers explicitly welcome external help.Maintainers explicitly welcome external help.type/bugExisting behavior is broken or incorrect.Existing behavior is broken or incorrect.
Context (shared across all harnesses)
AO stores a per-role model in
agentConfig.model(backend/internal/domain/agentconfig.go:27), resolved and forwarded to every adapter ascfg.Config.Model. Adapters that honor the model are also expected to advertise it viaGetConfigSpec— Claude does (claudecode/claudecode.go:104-106, exposingmodel+ permission mode) and Codex's fix (#2869) added the same.This issue tracks Kiro for completeness of the harness-model-config audit (sibling issues: #2883–#2901).
Situation — Kiro honors the model but does NOT advertise it
Good news first: Kiro already forwards the configured model.
setKiroAgentDefaultswritesmodelinto Kiro's agent-config file whenagentConfig.Modelis non-blank (backend/internal/adapters/agent/kiro/hooks.go:268-272), and this is covered by tests (kiro/kiro_test.go:520 TestGetAgentHooksWritesConfiguredModel, plus a project-model preservation assertion at:167-208). So Kiro is not affected by the launch bug the sibling issues describe.The gap: Kiro has no
GetConfigSpecoverride (it inherits the emptyagentbase.Base.GetConfigSpec,agentbase/agentbase.go:20-21). So while Kiro consumesagentConfig.model, it never declares that it supports themodelfield — inconsistent with Claude and Codex, and it means the field isn't discoverable/validated through the config-spec surface for Kiro.Expected
Kiro should advertise the
modelconfig field it already honors, matching the Claude/Codex contract.Suggested fix (small)
GetConfigSpecin the Kiro adapter to report amodelfield (ports.ConfigFieldString), mirroringclaudecode/claudecode.go:104-106andcodex/codex.go.GetConfigSpectest asserting themodelfield is reported (see the codex/claude spec tests for the pattern).Notes
Low priority / consistency polish — Kiro's runtime behavior is already correct; this only aligns its declared config spec with the other model-aware adapters.
References
backend/internal/adapters/agent/kiro/kiro.go,backend/internal/adapters/agent/kiro/hooks.go:268-272