Skip to content

[Bug]: Gemini model leaks <think>/<final> tags to user output #6328

Description

@Aloira-ai

Summary

When using Gemini models (e.g., gemini-3-pro-high), the <think>...</think> and <final>...</final> tags are sent directly to the user instead of being filtered out. Claude models do not have this issue.

Expected Behavior

Only the content inside <final> should be visible to the user. The <think> block should be hidden/stripped by the Gateway before sending to the channel.

Actual Behavior

The entire response including <think> and <final> tags is sent to the user via Telegram.

Environment

  • OpenClaw version: 2026.1.30
  • Channel: Telegram
  • Model: google-antigravity/gemini-3-pro-high
  • Provider: google-antigravity (OAuth)

Additional Context

Claude models (e.g., claude-opus-4-5-thinking) correctly hide the <think> block and only output <final> content. This suggests the Gateway may need model-specific post-processing for Gemini.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleMarked as stale due to inactivity

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions