Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/providers/kiro-models.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
export const KIRO_MODELS = [
"kiro-auto",
// OpenAI GPT-5.6 (Kiro experimental, us-east-1) — added to official catalog 2026-07-13
"gpt-5.6-sol",
"gpt-5.6-terra",
"gpt-5.6-luna",
"claude-sonnet-5",
"claude-opus-4.8",
"claude-opus-4.7",
Expand All @@ -17,11 +21,12 @@ export const KIRO_MODELS = [
];

// Per-model context windows as documented on Kiro's official model catalog
// (https://kiro.dev/docs/models/ — "Quick comparison", page updated 2026-06-19).
// claude-sonnet-5 is pre-seeded from Anthropic/OpenRouter 1M metadata until Kiro's
// public catalog catches up.
// (https://kiro.dev/docs/models/ — "Quick comparison", page updated 2026-07-14).
// "Auto" is a router with no fixed window on Kiro's table, so it is intentionally omitted.
export const KIRO_MODEL_CONTEXT_WINDOWS: Record<string, number> = {
"gpt-5.6-sol": 272_000,
"gpt-5.6-terra": 272_000,
"gpt-5.6-luna": 272_000,
"claude-sonnet-5": 1_000_000,
"claude-opus-4.8": 1_000_000,
"claude-opus-4.7": 1_000_000,
Expand Down
4 changes: 4 additions & 0 deletions src/providers/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,10 @@ export const PROVIDER_REGISTRY: readonly ProviderRegistryEntry[] = [
note: "Import-first: reuses your installed kiro-cli login (no browser). Experimental third-party harness — see Kiro ToS.",
models: KIRO_MODELS,
defaultModel: "kiro-auto",
// Kiro speaks CodeWhisperer wire, not OpenAI-style GET /models. Keep the static
// catalog authoritative so a spurious 2xx from runtime.../models cannot drop seeded ids
// (e.g. newly listed GPT-5.6 tiers) via live-discovery reconciliation.
liveModels: false,
// Per-model context metadata is maintained next to the Kiro model list.
modelContextWindows: KIRO_MODEL_CONTEXT_WINDOWS,
modelReasoningEfforts: KIRO_MODEL_REASONING_EFFORTS,
Expand Down
21 changes: 20 additions & 1 deletion tests/kiro-adapter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ describe("kiro adapter — buildRequest", () => {
["claude-4.5-sonnet-high", "claude-sonnet-4.5"],
["claude-4-5-opus-max", "claude-opus-4.5"],
["minimax-m2-1", "minimax-m2.1"],
// GPT-5.6 tiers (Kiro 2026-07-13): keep dotted minor + tier suffix intact
["gpt-5.6-sol", "gpt-5.6-sol"],
["kiro/gpt-5.6-terra", "gpt-5.6-terra"],
["gpt-5-6-luna", "gpt-5.6-luna"],
["gpt-5.6-sol-high", "gpt-5.6-sol"],
]) {
expect(normalizeKiroModelId(input)).toBe(expected);
const { body } = await createKiroAdapter(provider).buildRequest(parsedWith([{ role: "user", content: "hi" }], undefined, input));
Expand Down Expand Up @@ -560,7 +565,14 @@ describe("kiro adapter — per-model context windows (kiro.dev/docs/models)", ()
const cw = kiro.modelContextWindows ?? {};

test("registry includes the currently documented Kiro models", () => {
for (const id of ["claude-opus-4.5", "claude-sonnet-4.0", "minimax-m2.1"]) {
for (const id of [
"gpt-5.6-sol",
"gpt-5.6-terra",
"gpt-5.6-luna",
"claude-opus-4.5",
"claude-sonnet-4.0",
"minimax-m2.1",
]) {
expect(kiro.models ?? []).toContain(id);
}
});
Expand All @@ -573,6 +585,9 @@ describe("kiro adapter — per-model context windows (kiro.dev/docs/models)", ()
});

test("smaller-context models match Kiro's published limits", () => {
expect(cw["gpt-5.6-sol"]).toBe(272_000);
expect(cw["gpt-5.6-terra"]).toBe(272_000);
expect(cw["gpt-5.6-luna"]).toBe(272_000);
expect(cw["claude-opus-4.5"]).toBe(200_000);
expect(cw["claude-sonnet-4.5"]).toBe(200_000);
expect(cw["claude-sonnet-4.0"]).toBe(200_000);
Expand All @@ -584,6 +599,10 @@ describe("kiro adapter — per-model context windows (kiro.dev/docs/models)", ()
expect(cw["qwen3-coder-next"]).toBe(256_000);
});

test("kiro catalog is static (no OpenAI-style live /models)", () => {
expect(kiro.liveModels).toBe(false);
});

test("Auto router has no fixed window (omitted)", () => {
expect(cw["kiro-auto"]).toBeUndefined();
});
Expand Down