fix(opencode): add Gemini 2.5 thinkingConfig variants for SAP AI providers#14958
Open
jerome-benoit wants to merge 5 commits intoanomalyco:devfrom
Open
fix(opencode): add Gemini 2.5 thinkingConfig variants for SAP AI providers#14958jerome-benoit wants to merge 5 commits intoanomalyco:devfrom
jerome-benoit wants to merge 5 commits intoanomalyco:devfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for Gemini 2.5 models' reasoning capabilities when accessed through SAP AI providers (@mymediset/sap-ai-provider and @jerome-benoit/sap-ai-provider-v2). Previously, these models fell through to a generic reasoningEffort fallback which doesn't work for Gemini models, which require the thinkingConfig format instead.
Changes:
- Added Gemini 2.5 detection logic for SAP AI providers that returns
thinkingConfigwiththinkingBudgetvalues matching the native@ai-sdk/googleprovider - Enables proper reasoning support for Gemini 2.5 Pro/Flash models when proxied through SAP AI Core
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
419fcc2 to
e82a204
Compare
…iders SAP AI providers now correctly handle Gemini 2.5 models with thinkingConfig instead of falling back to reasoningEffort which doesn't work for Gemini. Fixes anomalyco#14957
e82a204 to
374b84e
Compare
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Use word boundary (\b) instead of --o pattern to correctly match o1, o3, o3-mini models.
74ded42 to
7b72411
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #14957
Type of change
What does this PR do?
Fixes Gemini 2.5 reasoning variants for SAP AI provider (
@jerome-benoit/sap-ai-provider-v2).Previously, Gemini 2.5 models via SAP AI Core fell through to the generic
reasoningEffortfallback, which does not work for Gemini. Now they correctly receivethinkingConfigwiththinkingBudgetvalues matching the native@ai-sdk/googleprovider.Also restricts
reasoningEffortto GPT and o-series models only (not all SAP AI models).How did you verify your code works?
Screenshots / recordings
N/A - no UI changes
Checklist