This repository was archived by the owner on Mar 9, 2026. It is now read-only.
Repository navigation
Feature/gemini thinking params - #533
Merged
caarlos0 merged 4 commits intoJun 23, 2025
Merged
Conversation
added 2 commits
June 23, 2025 14:08
This commit introduces the `ThinkingBudget` parameter to the Google API configuration. This allows users to control the thinking budget for Google's AI models. The `ThinkingBudget` can now be specified in the `Model` struct within `config.go`. This value is then used to configure the Google API client in `internal/google/google.go` by setting the `ThinkingBudget` field in the `Config` struct. The `mods.go` file is updated to pass the `ThinkingBudget` from the model configuration to the Google client configuration. This change enhances the control users have over the AI model's behavior and resource utilization.
This commit updates the Google stream reader to gracefully handle the end of the stream by checking for `io.EOF`. When EOF is encountered, it now marks the stream as finished and returns `stream.ErrNoContent` to signal the end of data without being treated as a fatal error. This ensures more robust stream processing.
added 2 commits
June 23, 2025 16:47
The Gemini/Google API does not currently support tool calls. This commit updates the `CallTools` method in the `Stream` struct to return `nil` instead of panicking, reflecting the current implementation status.
The Gemini API may not not support returning streamed messages after the fact, so the Messages method in the google.go stream should return nil instead of panicking.
micke754
force-pushed
the
feature/gemini-thinking-params
branch
from
June 23, 2025 04:48
bdcfff9 to
ddaae0d
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Describe your changes
Related issue/discussion:
#532
Checklist before requesting a review
CONTRIBUTING.mdIf this is a feature
I'm actually unsure if you would classify this as a feature, or more of a fix of an existing one. I've raised a discussion to cover my basses.
Let me know if I've messed up somewhere. I'm Just a humble python dev here trying to get this working to "unblock" me.