Fix Custom Gemini 3.X Models#199
Closed
nzoschke wants to merge 2 commits intoboldsoftware:mainfrom
Closed
Conversation
The gem.Service was ignoring the reasoning_effort column entirely: 3.x models defaulted to "high" silently, and 2.5 models had no way to set thinking_budget. Now ThinkingLevel/ReasoningEffort map to thinkingLevel (3.x string) or thinkingBudget (2.5 int), matching how oai.ResponsesService plumbs the same field. Also adds the gemini-3.1 preview models to the context-window switch. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: exe.dev user.
|
…ature presence Gemini 3.x attaches thoughtSignature to ordinary final-answer text parts to round-trip encrypted reasoning state, not just to thought summaries. convertGeminiResponseToContent was treating any text with a signature as ContentTypeThinking, hiding the actual answer — every Gemini 3 turn produced an empty Text response, and "Test" against gemini-3.x failed with "empty response from model". Add the missing thought boolean to gemini.Part and classify on it. Preserve thoughtSignature on outgoing ContentTypeText so cache state survives the round trip, and set thought=true on outgoing Thinking/RedactedThinking parts. Update the existing tests that encoded the old assumption and add a regression test for the bug. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
28865e6 to
255bc2a
Compare
Contributor
Author
Contributor
|
I pushed these outside of the PR process. THANK YOU! |
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.



Currently adding Google Gemini model
gemini-2.5-proworks fine, butgemini-3.1-pro-previewfails the test withTest failed: empty response from model.This is due to a change the Gemini API for 3.x attaching
thoughtSignatureto final answer text parts, not just thought summaries, which Shelley converts to an emptyTextresponse.thoughtboolean togemini.Partand classify on itthoughtSignatureon outgoingContentTypeTextso cache state survives the round tripthought=trueon outgoingThinking/RedactedThinkingpartsPatch and parts of this PR description generated by Claude Code / Opus 4.7