fix(reasoning): preserve effort through Codex translations
Carry Claude reasoning_effort/reasoning into OpenAI Chat, map into OpenAI Responses reasoning.effort, and keep request-level effort (incl. xhigh) across tool-result turns instead of collapsing to high. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -80,6 +80,16 @@ export function claudeToOpenAIRequest(model, body, stream) {
|
||||
result.tool_choice = convertToolChoice(body.tool_choice);
|
||||
}
|
||||
|
||||
if (body.reasoning_effort !== undefined) {
|
||||
result.reasoning_effort = body.reasoning_effort;
|
||||
} else if (body.reasoning?.effort !== undefined) {
|
||||
result.reasoning_effort = body.reasoning.effort;
|
||||
}
|
||||
|
||||
if (body.reasoning !== undefined) {
|
||||
result.reasoning = body.reasoning;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user