Skip to content

fix(google): stop treating Gemma as a Gemini thought_signature consumer - #84717

Closed
JoaoMarcos44 wants to merge 1 commit into
NousResearch:mainfrom
JoaoMarcos44:fix/84707-gemma-thought-signature
Closed

JoaoMarcos44 wants to merge 1 commit into
NousResearch:mainfrom
JoaoMarcos44:fix/84707-gemma-thought-signature

Conversation

@JoaoMarcos44

Copy link
Copy Markdown
Contributor

Summary

_model_consumes_thought_signature matched "gemma" in m in addition to "gemini", so google/gemma-3-27b-it inherited a stale Gemini thought_signature and replayed it to the wrong family. Gemma has no thought_signature contract.

Changes

  • Drop the "gemma" clause; only Gemini-family model names keep extra_content.

Test Plan

  • New tests in tests/agent/transports/test_chat_completions.py: family gating (gemini=True, gemma=False, mistral=False) and convert_messages stripping stale extra_content for google/gemma-3-27b-it.
  • scripts/run_tests.sh tests/agent/transports/test_chat_completions.py → 48/48.

Closes #84707

_model_consumes_thought_signature matched any model name containing
'gemma' as well as 'gemini', so google/gemma-3-27b-it inherited a stale
Gemini thought_signature and replayed it to the wrong family. Gemma is a
distinct family with no thought_signature contract; match only 'gemini'.

Closes NousResearch#84707
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint provider/gemini Google Gemini (AI Studio, Cloud Code) duplicate This issue or pull request already exists labels Aug 12, 2026
@alt-glitch

Copy link
Copy Markdown
Contributor

This was generated by AI during triage.

Duplicate of #49218. Both PRs make the same Gemini-only predicate correction in _model_consumes_thought_signature() and add regression coverage for stripping a stale thought signature before Gemma requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint duplicate This issue or pull request already exists P2 Medium — degraded but workaround exists provider/gemini Google Gemini (AI Studio, Cloud Code) type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Gemma models inherit Gemini thought_signature replay (substring match)

2 participants