Skip to content

feat: compatible gpt thinking to nil - #3418

Open
feitianbubu wants to merge 1 commit into
QuantumNous:mainfrom
feitianbubu:pr/1bd2362c39b649cacc99238eba70fa195ec7032c
Open

feat: compatible gpt thinking to nil#3418
feitianbubu wants to merge 1 commit into
QuantumNous:mainfrom
feitianbubu:pr/1bd2362c39b649cacc99238eba70fa195ec7032c

Conversation

@feitianbubu

@feitianbubu feitianbubu commented Mar 24, 2026

Copy link
Copy Markdown
Member

gpt5不再支持thinking, 兼容一下客户端误传报错的问题

Summary by CodeRabbit

  • Bug Fixes
    • Improved compatibility with newer GPT model versions by ensuring unsupported parameters are properly disabled during request processing.

@coderabbitai

coderabbitai Bot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ba437f60-9c82-451e-8785-f5e41d8056f9

📥 Commits

Reviewing files that changed from the base of the PR and between 9ae9040 and b2003d5.

📒 Files selected for processing (1)
  • relay/channel/openai/adaptor.go

Walkthrough

The OpenAI adaptor is modified to clear the request.THINKING field when processing upstream models with names starting with "gpt-5", disabling this unsupported parameter alongside existing temperature, top-p, and logprobs adjustments.

Changes

Cohort / File(s) Summary
Request Parameter Handling
relay/channel/openai/adaptor.go
Clears request.THINKING field for upstream models starting with "gpt-5" to disable unsupported parameters.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Poem

🐰 When gpt-5 comes to play,
Thinking gets whisked away,
Parameters trimmed with care,
One line fix, swift and fair! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: compatible gpt thinking to nil' directly relates to the main change of clearing the THINKING field for gpt-5 models to ensure compatibility.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ghost

This comment was marked as spam.

@Calcium-Ion
Calcium-Ion force-pushed the main branch 2 times, most recently from 51fdfc5 to 2b6f1df Compare August 30, 2026 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant