thincoder 0.12.17 → 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/provider/core.mjs +4 -1
package/package.json
CHANGED
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}"; ` +
|