fix(ai): use adaptive thinking for Kimi Coding
This commit is contained in:
@@ -1641,6 +1641,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";
|
||||
const allowEmptySignature = isKimiK3 || normalizedId === "kimi-for-coding";
|
||||
|
||||
models.push({
|
||||
id: normalizedId,
|
||||
@@ -1650,6 +1651,10 @@ 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 },
|
||||
compat: {
|
||||
...(allowEmptySignature ? { allowEmptySignature: true } : {}),
|
||||
forceAdaptiveThinking: true,
|
||||
},
|
||||
reasoning: isKimiK3 || m.reasoning === true,
|
||||
...(isKimiK3 ? { thinkingLevelMap: KIMI_K3_THINKING_LEVEL_MAP } : {}),
|
||||
input: m.modalities?.input?.includes("image") ? ["text", "image"] : ["text"],
|
||||
|
||||
Reference in New Issue
Block a user