fix(kiro): deliver system prompt natively, add Opus 4.5/4.7/4.8, tolerate dash version ids (#2366)

- Pass system prompt via native systemInstruction field (+ <instructions> fallback)
  so Claude models stop treating it as info-only <system-reminder>
- Add Opus 4.5/4.7/4.8 (base/thinking/agentic/thinking+agentic) to Kiro registry
- normalizeModelId(): dash->dot version separator, scoped to Kiro provider only
- Replace <system-reminder> with <instructions> in claude-to-openai/openai-to-kiro

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
VitzS7
2026-07-05 17:34:04 +07:00
committed by decolua
co-authored by Cursor
parent 7f436e2792
commit 5041494e1c
7 changed files with 111 additions and 26 deletions
+23 -1
View File
@@ -1,7 +1,7 @@
// Guards C2: regex name fallback (no catalog). Terse entries derive name; existing names untouched.
import { describe, it, expect } from "vitest";
import { deriveModelName } from "../../open-sse/providers/models/namePatterns.js";
import { normalizeModel } from "../../open-sse/providers/models/schema.js";
import { normalizeModel, normalizeModelId } from "../../open-sse/providers/models/schema.js";
describe("model name regex fallback (C2)", () => {
it("derives display name from id per family", () => {
@@ -25,4 +25,26 @@ describe("model name regex fallback (C2)", () => {
expect(m.id).toBe("glm-5");
expect(m.name).toBe("GLM 5");
});
it("normalizeModelId: dash between digits becomes a dot (version separator)", () => {
expect(normalizeModelId("claude-sonnet-4-5")).toBe("claude-sonnet-4.5");
expect(normalizeModelId("minimax-m2-5")).toBe("minimax-m2.5");
expect(normalizeModelId("deepseek-3-2")).toBe("deepseek-3.2");
});
it("normalizeModelId: preserves word-suffix hyphens (-thinking, -agentic)", () => {
expect(normalizeModelId("claude-sonnet-4-5-thinking")).toBe("claude-sonnet-4.5-thinking");
expect(normalizeModelId("claude-sonnet-4-5-thinking-agentic")).toBe("claude-sonnet-4.5-thinking-agentic");
});
it("normalizeModelId: leaves ids with no digit-digit hyphen untouched", () => {
expect(normalizeModelId("qwen3-coder-next")).toBe("qwen3-coder-next");
expect(normalizeModelId("claude-sonnet-5")).toBe("claude-sonnet-5");
expect(normalizeModelId("glm-5")).toBe("glm-5");
});
it("normalizeModelId: non-string input passes through", () => {
expect(normalizeModelId(undefined)).toBeUndefined();
expect(normalizeModelId(null)).toBeNull();
});
});