Skip to content

fix(openai): apply ReasoningEffort in applyOpenAIConfig#1959

Merged
EItanya merged 1 commit into
kagent-dev:mainfrom
mesutoezdil:fix/openai-reasoning-effort
Jun 5, 2026
Merged

fix(openai): apply ReasoningEffort in applyOpenAIConfig#1959
EItanya merged 1 commit into
kagent-dev:mainfrom
mesutoezdil:fix/openai-reasoning-effort

Conversation

@mesutoezdil
Copy link
Copy Markdown
Contributor

ReasoningEffort was set in OpenAIConfig but never forwarded to ChatCompletionNewParams, so o1 model reasoning settings were silently ignored.

This adds the missing field assignment in applyOpenAIConfig, matching the pattern used for other config fields.

Fixes: ReasoningEffort is now passed through to the OpenAI API call.

Copilot AI review requested due to automatic review settings June 3, 2026 21:14
@github-actions github-actions Bot added the bug Something isn't working label Jun 3, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds support for propagating a new ReasoningEffort configuration option into OpenAI chat completion params.

Changes:

  • Extend applyOpenAIConfig to map OpenAIConfig.ReasoningEffort onto openai.ChatCompletionNewParams.
  • Add a unit test case verifying ReasoningEffort is applied.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
go/adk/pkg/models/openai_adk.go Applies ReasoningEffort from config onto OpenAI request params.
go/adk/pkg/models/openai_adk_test.go Adds a test ensuring ReasoningEffort is set when configured.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread go/adk/pkg/models/openai_adk.go
Comment thread go/adk/pkg/models/openai_adk_test.go
@mesutoezdil
Copy link
Copy Markdown
Contributor Author

mesutoezdil commented Jun 3, 2026

The Copilot suggestions are not applicable here..

ReasoningEffort was set in OpenAIConfig but never forwarded to the
ChatCompletionNewParams, so o1 model reasoning settings were silently
ignored. Pass it through the same as the other config fields.

Signed-off-by: mesutoezdil <mesudozdil@gmail.com>
@mesutoezdil mesutoezdil force-pushed the fix/openai-reasoning-effort branch from fbf3fca to 7053ac4 Compare June 4, 2026 14:28
@EItanya EItanya merged commit d2429ce into kagent-dev:main Jun 5, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants