fix(kiro): add mappable "auto" model slot for Kiro agent mode

Kiro sends modelId "auto" for the main agent turn; without a defaultModels
slot getMappedModel returned null and the call leaked to AWS instead of the
configured provider. Adds the slot + guard test.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Delcado19
2026-06-06 10:31:39 +07:00
committed by decolua
co-authored by Cursor
parent 12c97ad46f
commit 3dda651bad
2 changed files with 35 additions and 0 deletions
+5
View File
@@ -45,6 +45,11 @@ export const MITM_TOOLS = {
configType: "mitm",
mitmDomain: "q.us-east-1.amazonaws.com",
defaultModels: [
// Kiro's agent/"vibe" mode sends modelId "auto" for the main turn and "simple-task"
// for background sub-tasks (verified via MITM request dump of generateAssistantResponse).
// Both need a mappable slot — otherwise getMappedModel returns null and the chat call
// is passed through to AWS instead of being routed to the chosen provider.
{ id: "auto", name: "Auto (Kiro Agent)", alias: "auto" },
{ id: "claude-sonnet-4.5", name: "Claude Sonnet 4.5", alias: "claude-sonnet-4.5" },
{ id: "claude-sonnet-4", name: "Claude Sonnet 4", alias: "claude-sonnet-4" },
{ id: "claude-haiku-4.5", name: "Claude Haiku 4.5", alias: "claude-haiku-4.5" },