Skip to content

feat: add reasoning effort configuration to model request#20

Merged
xavidop merged 2 commits intogenkit-ai:mainfrom
crazywako:feature/reasoning-effort
Feb 11, 2026
Merged

feat: add reasoning effort configuration to model request#20
xavidop merged 2 commits intogenkit-ai:mainfrom
crazywako:feature/reasoning-effort

Conversation

@crazywako
Copy link
Contributor

@crazywako crazywako commented Feb 11, 2026

Added a reasoning effort to speed up the output for gpt-5 models. All gpt-5 models are reasoning models, making those slow by default, even for gpt-5-nano.

After this you may set the reasoning_effort into the request to either "none", "minimal", "low", "medium", "high", "xhigh"

ai.WithConfig(map[string]interface{}{ "reasoningEffort": "minimal", }))

@crazywako crazywako requested a review from xavidop as a code owner February 11, 2026 20:28
@google-cla
Copy link

google-cla bot commented Feb 11, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@gemini-code-assist
Copy link

Summary of Changes

Hello @crazywako, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the Azure AI Foundry plugin by adding a new configuration option, reasoningEffort, to model requests. This feature allows users to specify the desired level of reasoning for GPT-5 models, which are known for their default slowness due to advanced reasoning capabilities. By providing granular control over this setting, the change aims to optimize response times and improve efficiency for various use cases, particularly for models like gpt-5-nano.

Highlights

  • New Configuration Option: Introduced a reasoningEffort configuration option for Azure AI Foundry model requests.
  • Performance Optimization: Enabled control over the reasoning effort for GPT-5 models, allowing users to speed up output by setting levels like 'none', 'minimal', 'low', 'medium', 'high', and 'xhigh'.
  • Integration with OpenAI API: Mapped the string-based reasoningEffort values from the request to corresponding openai.ReasoningEffort constants for API calls.
Changelog
  • azureaifoundry_plugin.go
    • Added a reasoningEffort field to the modelConfig struct to store the new configuration.
    • Implemented logic to parse the reasoningEffort string value from the incoming model request configuration.
    • Mapped the parsed reasoningEffort string to the appropriate openai.ReasoningEffort constant within the buildChatCompletionParams function, allowing the plugin to pass this setting to the Azure AI Foundry API.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a reasoningEffort configuration option for model requests, specifically targeting gpt-5 models to control their reasoning level and potentially speed up responses. The implementation correctly adds the new field to the model configuration, extracts it from the request, and applies it when building the chat completion parameters. My feedback includes a suggestion to refactor the logic that maps the string value to the corresponding constant, aiming for better code maintainability.

@xavidop
Copy link
Collaborator

xavidop commented Feb 11, 2026

@crazywako can you please apply the Gemini code assist suggestions?

Copy link
Collaborator

@xavidop xavidop left a comment

Choose a reason for hiding this comment

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

apply thegemini code assist improvements

@crazywako
Copy link
Contributor Author

I applied the Gemini suggestions and made a commit.

@xavidop xavidop merged commit 53af95f into genkit-ai:main Feb 11, 2026
3 of 4 checks passed
@crazywako crazywako deleted the feature/reasoning-effort branch February 11, 2026 21:18
github-actions bot pushed a commit that referenced this pull request Feb 11, 2026
## [1.2.0](v1.1.6...v1.2.0) (2026-02-11)

### 🚀 Features

* add reasoning effort configuration to model request ([#20](#20)) ([53af95f](53af95f))
* force release ([758a741](758a741))

### 🐛 Bug Fixes

* added licencese ([b1b411c](b1b411c))

### ⚙️ Continuous Integration

* **deps:** bump actions/checkout from 4 to 6 ([#17](#17)) ([f7fb6d6](f7fb6d6))
@github-actions
Copy link

🎉 This PR is included in version 1.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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