Skip to content

fix(google): use includeThoughts/part.thought for thinking handling#7593

Merged
jamadeo merged 1 commit intoblock:mainfrom
rabi:gemini-refactor
Mar 11, 2026
Merged

fix(google): use includeThoughts/part.thought for thinking handling#7593
jamadeo merged 1 commit intoblock:mainfrom
rabi:gemini-refactor

Conversation

@rabi
Copy link
Contributor

@rabi rabi commented Mar 1, 2026

Summary

Use includeThoughts/part.thought to simplify thinking content handling and preserve thought signatures across active tool loops, including synthetic signature fallback for the first tool call.

Align thinking config by model family:

  • includeThoughts for 2.5/3.X
  • thinkingLevel for 3.x
  • thinkingBudget for 2.5
  • no thinking config for 2.0

This simplifies Gemini thinking handling across model families.

Type of Change

  • Feature
  • Bug fix
  • Refactor / Code quality
  • Performance improvement
  • Documentation
  • Tests
  • Security fix
  • Build / Release
  • Other (specify below)

AI Assistance

  • This PR was created or reviewed with AI assistance

Testing

Tested locally with all gemini models.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e108e2aa15

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@rabi rabi force-pushed the gemini-refactor branch from e108e2a to bf33a85 Compare March 1, 2026 11:25
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bf33a85cb8

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@rabi rabi force-pushed the gemini-refactor branch from bf33a85 to 9bf89d2 Compare March 1, 2026 11:36
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9bf89d27b8

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Use includeThoughts/part.thought to handle thinking content and preserve
thought signatures across active tool loops, including synthetic signature
fallback for the first model tool call. Align thinking config by model family:
- includeThoughts for 2.5/3
- thinkingLevel for 3.x
- thinkingBudget for 2.5
- no thinking config for 2.0

This simplifies Gemini thinking handling across model families.

Change-Id: I7ab897c5e423939ae38ab322dbf4f91898d3df8b
Signed-off-by: rabi <ramishra@redhat.com>
) -> Option<MessageContent> {
let signature = part.get(THOUGHT_SIGNATURE_KEY).and_then(|v| v.as_str());
let is_thought = part
.get("thought")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you think these would benefit from defining structs that are serde::Deserialize? I see we're working a lot with Values here

@jamadeo jamadeo added this pull request to the merge queue Mar 11, 2026
Merged via the queue into block:main with commit d04b761 Mar 11, 2026
20 checks passed
lifeizhou-ap added a commit that referenced this pull request Mar 12, 2026
* main: (270 commits)
  test(acp): align provider and server test parity (#7822)
  fix(acp): register MCP extensions when resuming a session (#7806)
  fix(goose): load .gitignore in prompt_manager for hint file filtering (#7795)
  fix: remap max_completion_tokens to max_tokens for OpenAI-compatible providers (#7765)
  fix(openai): preserve Responses API tool call/output linkage (#7759)
  chore(deps): bump @hono/node-server from 1.19.9 to 1.19.11 in /evals/open-model-gym/mcp-harness (#7687)
  fix: return ContextLengthExceeded when prompt exceeds effective KV cache size (#7815)
  feat: MCP Roots support (#7790)
  fix(google): use `includeThoughts/part.thought` for thinking handling (#7593)
  refactor: simplify tokenizer initialization — remove unnecessary Result wrapper (#7744)
  Fix model selector showing wrong model in tabs (#7784)
  Stop collecting goosed stderr after startup (#7814)
  fix: avoid word splitting by space for windows shell commands (#7781) (#7810)
  Simplify and make it not break on linux (#7813)
  Add preferred microphone selection  (#7805)
  Remove dependency on posthog-rs (#7811)
  feat: load hints in nested subdirs (#7772)
  feat(acp): add read tool and delegate filesystem I/O to ACP clients (#7668)
  Support secret interpolation in streamable HTTP extension URLs (#7782)
  More logging for command injection classifier model training (#7779)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants