Skip to content

fix(llm): gate OpenAI reasoning effort by model - #555

Merged
H-Chris233 merged 1 commit into
Open-Less:betafrom
H-Chris233:fix/issue-542-openai-reasoning-effort
May 29, 2026
Merged

H-Chris233 merged 1 commit into
Open-Less:betafrom
H-Chris233:fix/issue-542-openai-reasoning-effort

Conversation

@H-Chris233

@H-Chris233 H-Chris233 commented May 29, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • avoid sending OpenAI reasoning_effort to non-reasoning chat models that reject it with HTTP 400
  • keep OpenAI reasoning-capable models on medium when possible, with gpt-5-pro constrained to high
  • document the OpenAI-specific thinking control boundary in shared preference types

Root Cause

Issue #542 logs show OpenAI /v1/chat/completions rejecting gpt-4o-mini, gpt-4o, and gpt-4.1-nano requests with Unrecognized request argument supplied: reasoning_effort.

Verification

  • cargo test --manifest-path "openless-all/app/src-tauri/Cargo.toml" openai_chat_body -- --test-threads=1
  • git diff --check

Closes #542

@github-actions

Copy link
Copy Markdown
Contributor

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis ✅

542 - Fully compliant

Compliant requirements:

  • Validate OpenAI API without HTTP 400
  • Keep LLM polishing working for OpenAI providers
⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 PR contains tests
🔒 No security concerns identified
⚡ No major issues detected

@H-Chris233
H-Chris233 merged commit f7bcf25 into Open-Less:beta May 29, 2026
4 checks passed
@H-Chris233
H-Chris233 deleted the fix/issue-542-openai-reasoning-effort branch August 3, 2026 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[llm] LLM 润色在 validate OpenAI API 时 HTTP 400

1 participant