Skip to content

fix(doubao): set reasoning_effort field in doubao reasoning conversion#616

Merged
zijiren233 merged 2 commits into
labring:mainfrom
yumushang:main
Jul 17, 2026
Merged

fix(doubao): set reasoning_effort field in doubao reasoning conversion#616
zijiren233 merged 2 commits into
labring:mainfrom
yumushang:main

Conversation

@yumushang

Copy link
Copy Markdown
Contributor

Summary

Previously, ApplyReasoningToDoubaoNode and ApplyReasoningToDoubaoRequest only set the thinking field when applying reasoning config. This PR adds the reasoning_effort field, mapped to doubao-specific effort values (minimal/low/medium/high), consistent with how other providers handle reasoning effort.

Changes

  • core/relay/utils/reasoning.go:

    • ApplyReasoningToDoubaoNode now sets reasoning_effort in addition to thinking
    • ApplyReasoningToDoubaoRequest now sets reasoning_effort in addition to thinking
    • Added doubaoReasoningEffort() helper that maps normalized reasoning levels to doubao-specific effort values
  • core/relay/adaptor/doubao/main_test.go:

    • Updated 4 test cases to verify reasoning_effort is correctly set
    • Fixed assertion message formatting (thinking.type enabledthinking.type=enabled)

Previously, ApplyReasoningToDoubaoNode/Request only set the thinking field
when applying reasoning config. Now they also set the reasoning_effort field
mapped to doubao-specific values (minimal/low/medium/high), consistent with
how other providers handle reasoning effort.

Updated corresponding tests to verify reasoning_effort is correctly set.
@cla-assistant

cla-assistant Bot commented Jul 16, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@zijiren233

Copy link
Copy Markdown
Member

please fix the ci lint

@yumushang

Copy link
Copy Markdown
Contributor Author

please fix the ci lint

Fixed, thanks!

@zijiren233 zijiren233 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zijiren233
zijiren233 merged commit 20b8969 into labring:main Jul 17, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants