fix: map adaptive thinking to xhigh reasoning_effort instead of high

When thinking.type is "adaptive" (Claude's maximum thinking mode) and
output_config.effort is absent, resolve_reasoning_effort() incorrectly
mapped it to "high" instead of "xhigh" in OpenAI format conversions.
This commit is contained in:
Jason
2026-04-10 19:22:39 +08:00
parent a83bd90fa9
commit af679cda25
2 changed files with 7 additions and 7 deletions
@@ -1047,7 +1047,7 @@ mod tests {
}
#[test]
fn test_responses_thinking_adaptive_sets_reasoning_high() {
fn test_responses_thinking_adaptive_sets_reasoning_xhigh() {
let input = json!({
"model": "gpt-5.4",
"max_tokens": 1024,
@@ -1056,7 +1056,7 @@ mod tests {
});
let result = anthropic_to_responses(input, None, false).unwrap();
assert_eq!(result["reasoning"]["effort"], "high");
assert_eq!(result["reasoning"]["effort"], "xhigh");
}
#[test]