fix(kiro): normalize dashboard thinking intensity models

Strip the generic dashboard model(level) suffix before resolving Kiro
synthetic -thinking/-agentic variants so the upstream request no longer
carries an invalid parenthesized model id. Map explicit levels to native
Kiro effort fields only for supported Claude/GPT model families, and stop
advertising native levels for unsupported legacy Kiro models. Applies to
both OpenAI→Kiro and direct Claude→Kiro routes.
This commit is contained in:
ankit1324
2026-07-23 16:26:22 +07:00
committed by decolua
parent e45bd73d6e
commit 007d372724
7 changed files with 103 additions and 11 deletions

View File

@@ -0,0 +1,14 @@
import { describe, it, expect } from "vitest";
import { getThinkingLevels } from "../../open-sse/providers/thinkingLevels.js";
describe("getThinkingLevels for Kiro", () => {
it("does not advertise native intensity for legacy Kiro models", () => {
expect(getThinkingLevels("kiro", "claude-sonnet-4.5")).toBeNull();
expect(getThinkingLevels("kiro", "glm-5")).toBeNull();
});
it("advertises native levels for supported Kiro models", () => {
expect(getThinkingLevels("kiro", "claude-sonnet-5")).toContain("high");
expect(getThinkingLevels("kiro", "gpt-5.6-sol")).toContain("xhigh");
});
});