fix: do not enable OpenRouter reasoning by default
This commit is contained in:
@@ -160,15 +160,15 @@ export function modelPatch(body: Record<string, any>, baseURL?: string) {
|
|||||||
// openrouter use reasoning object instead of reasoning_effort
|
// openrouter use reasoning object instead of reasoning_effort
|
||||||
|
|
||||||
const reasoningEffort = body.reasoning_effort
|
const reasoningEffort = body.reasoning_effort
|
||||||
let reasoningEnabled = true
|
const reasoningDisabled =
|
||||||
if (body.thinking?.type === 'disabled') reasoningEnabled = false
|
body.thinking?.type === 'disabled' ||
|
||||||
if (body.enable_thinking === false) reasoningEnabled = false
|
body.enable_thinking === false ||
|
||||||
if (reasoningEffort === 'none') reasoningEnabled = false
|
reasoningEffort === 'none'
|
||||||
|
|
||||||
body.reasoning = { enabled: reasoningEnabled }
|
if (reasoningDisabled) {
|
||||||
|
body.reasoning = { enabled: false }
|
||||||
if (reasoningEnabled && reasoningEffort) {
|
} else if (reasoningEffort) {
|
||||||
body.reasoning.effort = reasoningEffort
|
body.reasoning = { enabled: true, effort: reasoningEffort }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user