Skip to content

feat(openai): expose none and xhigh reasoning effort levels - #995

Open
gargsajal9 wants to merge 1 commit into
cloudwego:mainfrom
gargsajal9:gargsajal9-openai-reasoning-levels-fb7
Open

gargsajal9 wants to merge 1 commit into
cloudwego:mainfrom
gargsajal9:gargsajal9-openai-reasoning-levels-fb7

Conversation

@gargsajal9

Copy link
Copy Markdown

What type of PR is this?

feat

Check the PR title.

  • This PR title matches the format: <type>(optional scope): <description>.
  • The description is user-oriented and clear enough for others to understand.
  • User-facing behavior is documented in the component's English and Chinese READMEs.

(Optional) Translate the PR title into Chinese.

feat(openai): 支持 none 和 xhigh 推理强度级别

(Optional) More detailed description for this PR(en: English/zh: Chinese).

en:

Expose ReasoningEffortLevelNone and ReasoningEffortLevelXHigh from the public components/model/openai package, bringing the wrapper API in line with the reasoning levels supported by OpenAI and ACL main.

The component currently pins released ACL v0.1.17, which does not contain the corresponding named constants. To preserve standalone module compatibility without a dependency upgrade, the new public values are explicitly typed string constants. Existing string pass-through, omission behavior, and provider/model defaults remain unchanged.

This also:

  • documents model-dependent support and the difference between explicit none and an omitted value;
  • documents per-call overrides through WithReasoningEffort;
  • adds external-package HTTP serialization tests for both Generate and Stream, covering new and existing levels, omission, custom values, overrides, and config preservation.

Validation:

  • GOWORK=off go test -mod=readonly -race -gcflags="all=-l -N" ./...
  • GOWORK=off go vet -mod=readonly ./...
  • GOWORK=off go mod tidy -diff
  • gofmt and git diff --check

The isolated module validation resolves github.com/cloudwego/eino-ext/libs/acl/openai v0.1.17 with no workspace replacement.

zh(optional):

在公共 components/model/openai 包中新增 ReasoningEffortLevelNoneReasoningEffortLevelXHigh,并补充配置、单次调用覆盖及请求序列化测试。由于当前组件依赖的 ACL v0.1.17 尚未发布对应命名常量,本 PR 使用显式类型化字符串常量,以保持独立模块兼容性且不升级依赖。

(Optional) Which issue(s) this PR fixes:

Fixes #947

(optional) The PR that updates user documentation:

N/A — the component's English and Chinese READMEs are updated in this PR.

Add public reasoning effort constants without changing the released ACL dependency. Document model-specific defaults and cover serialized configuration and per-call options.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@CLAassistant

CLAassistant commented Sep 10, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@gargsajal9
gargsajal9 marked this pull request as ready for review September 10, 2026 17:27
@gargsajal9
gargsajal9 force-pushed the gargsajal9-openai-reasoning-levels-fb7 branch from 06246e4 to 4a4370e Compare September 11, 2026 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

OpenAI Reasoning Levels

2 participants