fix(ai): expose max thinking for Kimi Coding K3

Closes #6737
This commit is contained in:
Armin Ronacher
2026-07-16 19:58:17 +02:00
parent f7e0603745
commit 78ff249436
4 changed files with 14 additions and 1 deletions
+4
View File
@@ -2,6 +2,10 @@
## [Unreleased]
### Fixed
- Fixed Kimi Coding K3 thinking-level metadata to expose only the supported `max` level ([#6737](https://github.com/earendil-works/pi/issues/6737)).
## [0.80.9] - 2026-07-16
### Added
+3 -1
View File
@@ -1627,6 +1627,7 @@ async function loadModelsDevData(): Promise<Model<any>[]> {
const normalizedId = kimiAliases.has(modelId) ? "kimi-for-coding" : modelId;
const normalizedName = kimiAliases.has(modelId) ? "Kimi For Coding" : m.name || normalizedId;
const isKimiK3 = normalizedId === "k3";
models.push({
id: normalizedId,
@@ -1636,7 +1637,8 @@ async function loadModelsDevData(): Promise<Model<any>[]> {
// Kimi For Coding's Anthropic-compatible API - SDK appends /v1/messages
baseUrl: "https://api.kimi.com/coding",
headers: { ...KIMI_STATIC_HEADERS },
reasoning: m.reasoning === true,
reasoning: isKimiK3 || m.reasoning === true,
...(isKimiK3 ? { thinkingLevelMap: KIMI_K3_THINKING_LEVEL_MAP } : {}),
input: m.modalities?.input?.includes("image") ? ["text", "image"] : ["text"],
cost: {
input: m.cost?.input || 0,
@@ -30,6 +30,7 @@ export const KIMI_CODING_MODELS = {
baseUrl: "https://api.kimi.com/coding",
headers: {"User-Agent":"KimiCLI/1.5"},
reasoning: true,
thinkingLevelMap: {"off":null,"minimal":null,"low":null,"medium":null,"high":null,"xhigh":null,"max":"max"},
input: ["text", "image"],
cost: {
input: 0,
+6
View File
@@ -110,6 +110,12 @@ describe("getSupportedThinkingLevels", () => {
}
});
it("includes only max for Kimi Coding K3", () => {
const model = getModel("kimi-coding", "k3");
expect(model).toBeDefined();
expect(getSupportedThinkingLevels(model!)).toEqual(["max"]);
});
it("includes only high for OpenCode Grok Build", () => {
const model = getModel("opencode", "grok-build-0.1");
expect(model).toBeDefined();