Repository navigation
fix(agent): prevent reasoning and tag leaks for Gemini 3/Antigravity models - #754
Merged
Merged
Conversation
- Added src/utils/provider-utils.ts to track reasoning provider logic - Updated isReasoningTagProvider to loosely match 'google-antigravity' (fixes sub-models) - Enabled enforceFinalTag in reply.ts when provider matches - Verified <final> tag stripping logic in pi-embedded-subscribe.ts - Updated pi-embedded-runner to use consistent provider check for prompt hints
- Enforces strict buffering when enforceFinalTag is enabled. - Prevents 'thinking out loud' planning steps (e.g. '*Locating Manulife*') from leaking to WhatsApp. - Hardens <final> tag stripping to remove nested/hallucinated tags.
Contributor
|
Landed via temp rebase onto main.
Thanks @mcinteerj! |
victorarias
pushed a commit
to victorarias/clawdbot
that referenced
this pull request
Jan 13, 2026
victorarias
pushed a commit
to victorarias/clawdbot
that referenced
this pull request
Jan 13, 2026
This restores the fix from PR openclaw#754 which was accidentally reverted in bf11a42.
dustin-olenslager
pushed a commit
to dustin-olenslager/ironclaw-supreme
that referenced
this pull request
Mar 24, 2026
This restores the fix from PR openclaw#754 which was accidentally reverted in 59c8704.
lovewanwan
pushed a commit
to lovewanwan/openclaw
that referenced
this pull request
Apr 28, 2026
lovewanwan
pushed a commit
to lovewanwan/openclaw
that referenced
this pull request
Apr 28, 2026
fix(agent): prevent reasoning and tag leaks for Gemini 3/Antigravity models
lovewanwan
pushed a commit
to lovewanwan/openclaw
that referenced
this pull request
Apr 28, 2026
This restores the fix from PR openclaw#754 which was accidentally reverted in 811fb69.
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
May 9, 2026
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
May 9, 2026
fix(agent): prevent reasoning and tag leaks for Gemini 3/Antigravity models
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
May 9, 2026
This restores the fix from PR openclaw#754 which was accidentally reverted in e0d3e41.
jameslcowan
pushed a commit
to jameslcowan/openclaw
that referenced
this pull request
Jun 2, 2026
This restores the fix from PR openclaw#754 which was accidentally reverted in 08d261a.
zeekay
pushed a commit
to Dream-AI-4444/bot
that referenced
this pull request
Sep 11, 2026
zeekay
pushed a commit
to Dream-AI-4444/bot
that referenced
this pull request
Sep 11, 2026
fix(agent): prevent reasoning and tag leaks for Gemini 3/Antigravity models
zeekay
pushed a commit
to Dream-AI-4444/clawdbot
that referenced
this pull request
Sep 11, 2026
This restores the fix from PR openclaw#754 which was accidentally reverted in bf11a42.
zooqueen
pushed a commit
to zooqueen/openclaw
that referenced
this pull request
Sep 11, 2026
This restores the fix from PR openclaw#754 which was accidentally reverted in bf11a42.
lhfer
pushed a commit
to lhfer/openclaw
that referenced
this pull request
Oct 11, 2026
lhfer
pushed a commit
to lhfer/openclaw
that referenced
this pull request
Oct 11, 2026
fix(agent): prevent reasoning and tag leaks for Gemini 3/Antigravity models
lhfer
pushed a commit
to lhfer/openclaw
that referenced
this pull request
Oct 11, 2026
This restores the fix from PR openclaw#754 which was accidentally reverted in bf11a42.
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.
Problem
google-antigravity/gemini-3-flashwere outputting 'thinking out loud' text (e.g.,*Locating Manulife*) directly to WhatsApp because they weren't always wrapping these thoughts in<think>tags.<final>tags was failing because:enforceFinalTagto default tofalse.<final><final>...) could leak through regex filters.Changes
enforceFinalTagis enabled, the agent now buffers all streaming output until it detects a<final>tag. This prevents untagged 'planning' steps from leaking as partial messages.src/utils/provider-utils.tsto correctly identify reasoning providers (including model variations likegemini-3-pro-low).pi-embedded-subscribe.tsto forcibly remove any remaining<final>tags from the output, ensuring users never see raw XML tags even if the model hallucinates them.Verification
isReasoningTagProviderreturnstrueforgoogle-antigravity/gemini-3-flash.enforceFinalTag is ENABLED.