fix: exclude "off" from reasoning_effort in requesty provider

The OpenAI API types do not include "off" as a valid reasoning_effort value,
so we need to exclude it similar to how we handle "minimal"
This commit is contained in:
Roo Code 2025-10-12 08:11:48 +00:00
parent f429e4acbf
commit 12bf42dd09

View file

@ -123,7 +123,9 @@ export class RequestyHandler extends BaseProvider implements SingleCompletionHan
model,
max_tokens,
temperature,
...(reasoning_effort && reasoning_effort !== "minimal" && { reasoning_effort }),
...(reasoning_effort &&
reasoning_effort !== "minimal" &&
reasoning_effort !== "off" && { reasoning_effort }),
...(thinking && { thinking }),
stream: true,
stream_options: { include_usage: true },