Skip to content

fix(google): preserve text thought signatures across continuations - #1127

Merged
mikehostetler merged 4 commits into
agentjido:mainfrom
gabrielrinaldi:fix/google-text-thought-signatures
Oct 26, 2026
Merged

mikehostetler merged 4 commits into
agentjido:mainfrom
gabrielrinaldi:fix/google-text-thought-signatures

Conversation

@gabrielrinaldi

@gabrielrinaldi gabrielrinaldi commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Description

Preserve Gemini thoughtSignature values on ordinary text parts, including empty signature-only parts, through buffered decoding, stream assembly, and continuation encoding.

  • store text signatures in existing thought_signature metadata
  • preserve signed text boundaries in the Google response builder
  • keep preserved content in response.message and response.context
  • replay signatures through buffered and streaming request encoders
  • apply the same behavior to Google Vertex Gemini
  • keep unsigned text, thinking, and tool-signature behavior unchanged

Compatibility drift

This PR also resolves #1153.

  • run broad replay selections only for active models that have fixture evidence
  • run only scenarios that have a complete fixture contract
  • report catalog models without fixtures as untested
  • report retired models without running them
  • keep exact model selections and recording behavior strict
  • detect current reasoning capability metadata in usage tests
  • align Google fixture requests with current provider requests, including thought signatures
  • keep recorded provider responses unchanged

Current status

Rebased onto main through 9377b99. The current head is 514fac9.

All required GitHub checks pass, including the Elixir and OTP test matrix, formatting, Credo, Dialyzer, audit, docs, and package validation.

Testing

  • mix mc 'google:*' --max-concurrency 4: 10 covered models pass, 29 models are untested, and 5 models are retired
  • main test run: 5,427 tests passed, 11 skipped, and 240 excluded
  • release build test: passed in an isolated rerun with the worktree dependency path
  • mix quality: passed
  • fixture validation: encoded requests match canonical JSON, and recorded provider responses are unchanged
  • focused buffered and streaming tests cover signed text, empty signatures, mixed thinking and tool signatures, string-key metadata, continuation replay, and Google Vertex Gemini

Checklist

Related work

Closes #1153

  • Downstream tracking: STR-47

@gabrielrinaldi

Copy link
Copy Markdown
Contributor Author

The fix passes the default test suite and quality checks. I’ve left this as a draft because the Google compatibility matrix fails. The one fixture mismatch is confirmed on the upstream baseline.

Would you prefer the fixture issues handled separately, or resolved before marking this PR ready for review?

@mikehostetler mikehostetler added the needs_work Changes requested before merge label Oct 20, 2026
@mikehostetler
mikehostetler marked this pull request as ready for review October 26, 2026 13:10
@mikehostetler mikehostetler added ready_to_merge needs_work Changes requested before merge and removed needs_work Changes requested before merge ready_to_merge labels Oct 26, 2026
@mikehostetler mikehostetler added ready_to_merge and removed needs_work Changes requested before merge labels Oct 26, 2026
@mikehostetler
mikehostetler merged commit 20a9669 into agentjido:main Oct 26, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reconcile Google model-compatibility fixtures and scenarios

2 participants