mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-26 17:12:27 +03:00
* feat(kiro): register GPT-5.6 Sol/Terra/Luna model family Kiro announced its first OpenAI-family models on 2026-07-14 (kiro.dev/changelog/models): GPT-5.6 Sol (flagship), Terra (balanced mid-tier) and Luna (fastest/cheapest), all sharing a 272k context window. Registers the three base model ids in the kiro provider registry with contextLength/maxOutputTokens so getResolvedModelCapabilities() resolves the real 272k window instead of falling back to the generic default. OmniRoute derives the thinking/agentic synthetic variants and per-account rate multipliers dynamically at discovery time (open-sse/services/kiroModels.ts), so only the three base entries need static registration here. Co-authored-by: Edison42 <gn00742754@gmail.com> Inspired-by: https://github.com/decolua/9router/pull/2596 * chore(changelog): fragment for #7209 * fix(kiro): add GPT-5.6 Sol/Terra/Luna pricing rows The registry additions in this PR exposed three new Kiro model ids without matching pricing rows, tripping the catalog invariant that every Kiro registry model must resolve a non-zero pricing row (tests/unit/catalog-updates-v3x.test.ts) — the models would have billed at $0.00. Reuses the shared GPT_5_6_{SOL,TERRA,LUNA}_PRICING tiers already used by the codex and openai aliases. --------- Co-authored-by: Edison42 <gn00742754@gmail.com>
64 lines
2.6 KiB
TypeScript
64 lines
2.6 KiB
TypeScript
import test from "node:test";
|
|
import assert from "node:assert/strict";
|
|
|
|
import { REGISTRY } from "@omniroute/open-sse/config/providers/index.ts";
|
|
import { FREE_MODEL_BUDGETS } from "@omniroute/open-sse/config/freeModelCatalog.data.ts";
|
|
|
|
// Kiro's upstream (`generateAssistantResponse`) returns 400 "Invalid model.
|
|
// Please select a different model" for any model id it does not recognize. The
|
|
// registry must therefore expose ONLY ids Kiro actually serves. These ids were
|
|
// fabricated (copied from OmniRoute's own Anthropic catalog) and live-verified
|
|
// to 400 on the VPS — they must never reappear. Regression guard for the kiro
|
|
// cluster (#6112/#6113/#6099).
|
|
const FABRICATED_KIRO_IDS = [
|
|
"auto-kiro", // no "auto" model id on Kiro — was sent verbatim and 400'd
|
|
"claude-fable-5", // Kiro offers no Fable
|
|
"claude-opus-4.8", // Kiro offers no Opus
|
|
"claude-opus-4.7",
|
|
"claude-opus-4.6",
|
|
"claude-sonnet-4.6", // Kiro's Sonnet is 4.5, not 4.6
|
|
];
|
|
|
|
// Ids proven to return 200 on the VPS (or a real, plan-gated Kiro model).
|
|
const REAL_KIRO_IDS = [
|
|
"claude-sonnet-5", // real model, plan-gated per account (kept)
|
|
"claude-sonnet-4.5", // proven 200 (replaces the fabricated 4.6)
|
|
"claude-haiku-4.5", // proven 200
|
|
"deepseek-3.2", // proven 200
|
|
"glm-5", // proven 200
|
|
"minimax-m2.5", // proven 200
|
|
"minimax-m2.1", // proven 200
|
|
"qwen3-coder-next", // proven 200
|
|
// Kiro's first OpenAI-family models, per kiro.dev/changelog/models
|
|
// (2026-07-14) — not yet independently live-VPS-verified like the ids above.
|
|
"gpt-5.6-sol",
|
|
"gpt-5.6-terra",
|
|
"gpt-5.6-luna",
|
|
];
|
|
|
|
test("kiro registry exposes no fabricated model ids", () => {
|
|
const ids = new Set((REGISTRY.kiro?.models || []).map((m) => m.id));
|
|
for (const bad of FABRICATED_KIRO_IDS) {
|
|
assert.ok(!ids.has(bad), `kiro registry must not expose fabricated id "${bad}"`);
|
|
}
|
|
});
|
|
|
|
test("kiro registry exposes exactly the real Kiro model ids", () => {
|
|
const ids = (REGISTRY.kiro?.models || []).map((m) => m.id).sort();
|
|
assert.deepEqual(ids, [...REAL_KIRO_IDS].sort());
|
|
});
|
|
|
|
test("kiro free-model catalog carries no fabricated ids", () => {
|
|
const kiroCatalogIds = new Set(
|
|
FREE_MODEL_BUDGETS.filter((e) => e.provider === "kiro").map((e) => e.modelId)
|
|
);
|
|
for (const bad of FABRICATED_KIRO_IDS) {
|
|
assert.ok(!kiroCatalogIds.has(bad), `free catalog must not list fabricated kiro id "${bad}"`);
|
|
}
|
|
// Every kiro free-catalog entry must exist in the registry (no orphans).
|
|
const registryIds = new Set((REGISTRY.kiro?.models || []).map((m) => m.id));
|
|
for (const id of kiroCatalogIds) {
|
|
assert.ok(registryIds.has(id), `free catalog kiro id "${id}" is not in the registry`);
|
|
}
|
|
});
|