Files
decolua--9router/tests/unit/kiro-model-slots.test.js
wehub-resource-sync 05fcd08057
Deploy GitBook to 9router.github.io / build-deploy (push) Failing after 2s
chore: import upstream snapshot with attribution
2026-07-13 12:21:01 +08:00

41 lines
1.5 KiB
JavaScript

import { describe, expect, it } from "vitest";
import { PROVIDER_MODELS } from "../../open-sse/config/providerModels.js";
import { MITM_TOOLS } from "../../src/shared/constants/cliTools.js";
// Guards Kiro model ids that still need mappable defaultModels slots. Without
// a slot, getMappedModel (src/mitm/server.js) returns null and the request is
// passed through to AWS instead of being routed to the user's chosen provider.
describe("Kiro MITM model slots", () => {
const kiro = MITM_TOOLS.kiro;
it("exposes the kiro mitm tool", () => {
expect(kiro).toBeTruthy();
expect(kiro.configType).toBe("mitm");
expect(Array.isArray(kiro.defaultModels)).toBe(true);
});
it("offers a mappable slot for Claude Sonnet 5", () => {
const sonnet5 = kiro.defaultModels.find((m) => m.id === "claude-sonnet-5");
expect(sonnet5).toBeTruthy();
expect(sonnet5.alias).toBe("claude-sonnet-5");
});
it("offers a mappable slot for the background sub-task model id 'simple-task'", () => {
const simpleTask = kiro.defaultModels.find((m) => m.id === "simple-task");
expect(simpleTask).toBeTruthy();
expect(simpleTask.alias).toBe("simple-task");
});
});
describe("Kiro static provider models", () => {
it("includes Claude Sonnet 5 and its synthetic Kiro variants", () => {
const ids = (PROVIDER_MODELS.kr || []).map((model) => model.id);
expect(ids).toEqual(expect.arrayContaining([
"claude-sonnet-5",
"claude-sonnet-5-thinking",
"claude-sonnet-5-agentic",
"claude-sonnet-5-thinking-agentic",
]));
});
});