mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #5974] [MERGED] fix(gemini): stream reasoning on official Google endpoints #7006
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#7006
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/5974
Author: @SpicyMarinara
Created: 9/8/2026
Status: ✅ Merged
Merged: 9/9/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/google-thinking-stream-5904📝 Commits (5)
2fd3191chore: start Gemini thinking stream fix (#5904)8867ac9fix(gemini): scope buffered thinking to proxy endpoints5093525fix(google): cancel response body when streaming stops early0aa78ccMerge remote-tracking branch 'origin/staging' into fix/google-thinking-stream-59040e8b73dMerge remote-tracking branch 'origin/staging' into fix/google-thinking-stream-5904📊 Changes
3 files changed (+140 additions, -18 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
packages/server/src/services/llm/providers/google.provider.ts(+18 -10)📝
scripts/regressions/provider-compat.regression.ts(+121 -8)📄 Description
Linked issue
Closes #5904
Why this change
Gemini reasoning replies buffered the entire turn on Google's own API because a workaround for proxies that strip thought parts applied to every endpoint. Users waited with an empty reply even though the native API supports streaming thought summaries.
What changed
Both the ordinary and tool-calling paths use the same hostname check: thinking can stream on
generativelanguage.googleapis.com, while other endpoints retain their existing buffered compatibility path. Explicit non-streaming requests and tool calls without a token sink retain their existing behavior. No new setting or dependency.Validation
pnpm checkpassed, including the production build.The provider tests use controlled responses, not a paid live-provider call. Google's official Gemini 2.5 example demonstrates streaming with
include_thoughtsenabled.Docs and release impact
Unreleased changelog entry included. No user-facing documentation or release-version changes. Vertex and unrecognized proxies keep their existing compatibility behavior.
Summary by CodeRabbit
Bug Fixes
Tests
Documentation
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.