thincoder 0.12.16 → 0.12.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/config.mjs +2 -0
- package/src/provider/core.mjs +4 -1
package/package.json
CHANGED
package/src/config.mjs
CHANGED
|
@@ -93,6 +93,8 @@ const MODEL_SPECS = [
|
|
|
93
93
|
["deepseek-chat", { context: 256_000, maxOutput: 384_000, thinking: false, prefixMode: true, cacheMode: "prompt", thinkApi: "type", reasoningEcho: "required", reasoningEffortEnum: ["high", "max"], tempRange: [0, 2] }],
|
|
94
94
|
// Kimi series
|
|
95
95
|
["kimi-k3", { context: 1_000_000, maxOutput: 131_072, thinking: true, partialMode: true, multimodal: true, cacheMode: "auto", thinkApi: "effort", reasoningEcho: "required", reasoningEffortEnum: ["low", "high", "max"] }],
|
|
96
|
+
// Qwen router prefixes model IDs with provider namespace: kimi/kimi-k3 → kimi-k3 (IK7K4V)
|
|
97
|
+
["kimi/kimi-k3", { context: 1_000_000, maxOutput: 131_072, thinking: true, partialMode: true, multimodal: true, cacheMode: "auto", thinkApi: "effort", reasoningEcho: "required", reasoningEffortEnum: ["low", "high", "max"] }],
|
|
96
98
|
// Kimi For Coding endpoint uses the short model ID "k3" (same specs as kimi-k3) — IK5VGJ
|
|
97
99
|
["k3", { context: 1_000_000, maxOutput: 131_072, thinking: true, partialMode: true, multimodal: true, cacheMode: "auto", thinkApi: "effort", reasoningEcho: "required", reasoningEffortEnum: ["low", "high", "max"] }],
|
|
98
100
|
["kimi-k2", { context: 256_000, maxOutput: 128_000, thinking: false, partialMode: true, multimodal: true, cacheMode: "none" }],
|
package/src/provider/core.mjs
CHANGED
|
@@ -83,7 +83,10 @@ export async function chat(provider, { messages, tools, onToken, onReasoning, on
|
|
|
83
83
|
body.temperature = t
|
|
84
84
|
}
|
|
85
85
|
if (provider.thinking) body.thinking = provider.thinking
|
|
86
|
-
|
|
86
|
+
// reasoning_effort is a provider-native parameter — routers/proxies (model ID with "/"
|
|
87
|
+
// prefix like kimi/kimi-k3) may misinterpret it, causing empty responses or 400s.
|
|
88
|
+
const isRouter = provider.model.includes("/")
|
|
89
|
+
if (provider.reasoningEffort && !isRouter && provider.format !== "anthropic" && provider.format !== "google") {
|
|
87
90
|
if (spec.reasoningEffortEnum && !spec.reasoningEffortEnum.includes(provider.reasoningEffort)) {
|
|
88
91
|
throw new Error(
|
|
89
92
|
`reasoning_effort "${provider.reasoningEffort}" not supported by model "${provider.model}"; ` +
|