feat(kiro): add Claude Opus 4.8 to the Kiro model catalog (#3131)

Kiro (AWS CodeWhisperer) tops out at Claude Opus 4.7 in the registry, but the latest Opus 4.8 is already served by the Claude Code provider and Kiro's executor passes the model id through to CodeWhisperer verbatim. Expose claude-opus-4.8 on the kiro provider so clients can select it via kiro/claude-opus-4.8.

- providerRegistry: add claude-opus-4.8 (1M context, 128k output) above 4.7

- pricing: add claude-opus-4.8 (and the previously-missing 4.7) to the kiro pricing block at Kiro's standard Opus rate so usage cost is non-zero

- tests: assert kiro exposes claude-opus-4.8 with matching context/output + pricing
This commit is contained in:
NOXX - Commiter
2026-06-04 05:51:21 +03:00
committed by GitHub
parent 74ce4fd76d
commit 223374221f
3 changed files with 37 additions and 0 deletions

View File

@@ -1066,6 +1066,12 @@ const _REGISTRY_EAGER: Record<string, RegistryEntry> = {
},
models: [
{ id: "auto-kiro", name: "Auto (Kiro picks best model)" },
{
id: "claude-opus-4.8",
name: "Claude Opus 4.8",
contextLength: 1000000,
maxOutputTokens: 128000,
},
{
id: "claude-opus-4.7",
name: "Claude Opus 4.7",

View File

@@ -1304,6 +1304,20 @@ export const DEFAULT_PRICING = {
reasoning: 15.0,
cache_creation: 3.0,
},
"claude-opus-4.8": {
input: 15.0,
output: 75.0,
cached: 7.5,
reasoning: 75.0,
cache_creation: 15.0,
},
"claude-opus-4.7": {
input: 15.0,
output: 75.0,
cached: 7.5,
reasoning: 75.0,
cache_creation: 15.0,
},
"claude-opus-4.6": {
input: 15.0,
output: 75.0,

View File

@@ -3,6 +3,7 @@ import assert from "node:assert/strict";
import { getModelsByProviderId } from "../../open-sse/config/providerModels.ts";
import { resolveCanonicalProviderModel } from "../../open-sse/services/model.ts";
import { DEFAULT_PRICING } from "../../src/shared/constants/pricing.ts";
test("Pollinations catalog mirrors the current public text model lineup", () => {
const models = getModelsByProviderId("pollinations");
@@ -45,3 +46,19 @@ test("NVIDIA catalog includes the verified 2026 additions and GPT OSS 20B alias
model: "openai/gpt-oss-20b",
});
});
test("Kiro catalog exposes Claude Opus 4.8 alongside 4.7 with matching pricing", () => {
const models = getModelsByProviderId("kiro");
const ids = new Set(models.map((model) => model.id));
assert.ok(ids.has("claude-opus-4.8"), "kiro must expose claude-opus-4.8");
assert.ok(ids.has("claude-opus-4.7"), "kiro must still expose claude-opus-4.7");
const opus48 = models.find((model) => model.id === "claude-opus-4.8");
assert.equal(opus48?.contextLength, 1000000);
assert.equal(opus48?.maxOutputTokens, 128000);
// Pricing for the Kiro channel must cover the new model so usage cost is non-zero.
const kiroPricing = (DEFAULT_PRICING as Record<string, Record<string, unknown>>).kiro;
assert.ok(kiroPricing["claude-opus-4.8"], "kiro pricing must include claude-opus-4.8");
});