Skip to content

fix(ai-gemini): read/write thoughtSignature at Part level for Gemini 3.x#459

Open
pemontto wants to merge 5 commits intoTanStack:mainfrom
pemontto:fix/gemini-thought-signature-part-level
Open

fix(ai-gemini): read/write thoughtSignature at Part level for Gemini 3.x#459
pemontto wants to merge 5 commits intoTanStack:mainfrom
pemontto:fix/gemini-thought-signature-part-level

Conversation

@pemontto
Copy link
Copy Markdown

@pemontto pemontto commented Apr 16, 2026

Summary

Gemini 3.x models emit thoughtSignature as a Part-level sibling of functionCall (per the @google/genai Part type definition), not nested inside functionCall. The FunctionCall interface has no thoughtSignature property at all.

The adapter was:

  • Reading from functionCall.thoughtSignature (wrong location, doesn't exist in SDK types)
  • Writing it back nested inside functionCall (wrong location, API ignores it there)

This causes Gemini 3.x to reject subsequent tool-call turns with:

400 INVALID_ARGUMENT: "Function call is missing a thought_signature"

The @google/genai Part type (for reference)

export declare interface Part {
    functionCall?: FunctionCall;
    thoughtSignature?: string;  // <-- Part-level sibling
    // ...
}

export declare interface FunctionCall {
    id?: string;
    args?: Record<string, unknown>;
    name?: string;
    // no thoughtSignature here
}

Changes

  • Read side (processStreamChunks): reads part.thoughtSignature first, falls back to functionCall.thoughtSignature for Gemini 2.x compatibility
  • Write side (formatMessages): emits thoughtSignature as a Part-level sibling of functionCall instead of nesting it inside

Test plan

  • Existing tests pass (66/66)
  • Added test: reads Part-level thoughtSignature from Gemini 3.x streaming response and round-trips it at the Part level
  • Added test: falls back to functionCall.thoughtSignature for Gemini 2.x wire format
  • Verified fix against live gemini-3.1-pro-preview and gemini-3.1-flash-lite-preview sessions (multi-turn tool calling with thinking enabled)

Closes #403
Related: #218, #401, #404

Summary by CodeRabbit

  • Bug Fixes

    • Read and emit tool-call thought signatures at the correct Part level and preserve signatures from streamed chunks to avoid validation errors.
  • Tests

    • Updated and added tests to verify Part-level signature handling and legacy nested-signature fallback and non-propagation cases.
  • Chores / Breaking Changes

    • Tool-call metadata renamed and typed: providerMetadata → metadata (now generic/typed) and is preserved through the message pipeline.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 16, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Reads Gemini thoughtSignature from Part-level (part.thoughtSignature) and emits it as a Part-level sibling to functionCall; renames providerMetadatametadata, makes tool-call metadata generic and threads typed metadata through tool-call types, state, and adapter interfaces; exports GeminiToolCallMetadata { thoughtSignature?: string }.

Changes

Cohort / File(s) Summary
Changeset
\.changeset/fix-gemini-thought-signature-part-level.md
Documents Part-level thoughtSignature handling and typed ToolCall metadata rename from providerMetadatametadata.
Gemini Adapter Implementation
packages/typescript/ai-gemini/src/adapters/text.ts
Read part.thoughtSignature from stream chunks (fallback from legacy functionCall.thoughtSignature only if missing); initialize/backfill tool-call state with it; emit outgoing requests with part.thoughtSignature (sibling to functionCall) and use typed metadata on TOOL_CALL_START.
Gemini Tests
packages/typescript/ai-gemini/tests/gemini-adapter.test.ts
Updated tests to expect Part-level thoughtSignature; added negative-path that nested functionCall.thoughtSignature in streaming chunks must not be propagated into history payload.
Core Types / Events
packages/typescript/ai-event-client/src/index.ts, packages/typescript/ai/src/types.ts, packages/typescript/ai/src/activities/chat/...
Make Tool/ToolCall/ToolCallPart generic over TMetadata = unknown with metadata?: TMetadata; rename providerMetadatametadata on ToolCallStartEvent and related types; add adapter generic param TToolCallMetadata.
Stream Processing & Tool-Call State
packages/typescript/ai/src/activities/chat/stream/types.ts, .../processor.ts, .../message-updaters.ts, .../tools/tool-calls.ts
Add optional metadata to InternalToolCallState; read/store chunk.metadata at TOOL_CALL_START; thread metadata through update/complete flows so UI-message building and completions preserve provider metadata.
Message Conversion
packages/typescript/ai/src/activities/chat/messages.ts
Carry metadata through UIMessage↔ModelMessage conversions for assistant tool-call parts when present.
Adapter Types / Exports
packages/typescript/ai/src/activities/chat/adapter.ts, packages/typescript/ai-gemini/src/message-types.ts
Add sixth generic parameter for tool-call metadata to TextAdapter/BaseTextAdapter (default unknown); export GeminiToolCallMetadata { thoughtSignature?: string }.
Tests & Mocks
packages/typescript/ai/tests/*, packages/typescript/ai/tests/test-utils.ts, packages/typescript/ai/tests/type-check.test.ts, packages/typescript/ai/tests/strip-to-spec-middleware.test.ts
Update mocks and tests to include new adapter ~types.toolCallMetadata typing and rename test fixtures from providerMetadatametadata; add assertions for Part-level placement and negative-path.

Sequence Diagram(s)

sequenceDiagram
    participant Client as Client (StreamProcessor / UI)
    participant Server as Server (chat() + Adapter)
    participant Gemini as Gemini API

    Client->>Server: Send conversation (ModelMessages with toolCalls and `metadata`)
    Server->>Server: Adapter.formatMessages()\n(read part.thoughtSignature || functionCall.thoughtSignature)\n(attach `part.thoughtSignature` and `metadata`)
    Server->>Gemini: POST chat request (parts[] with Part-level `thoughtSignature`)
    Gemini-->>Server: Stream response (parts[] with part.thoughtSignature or functionCall.thoughtSignature)
    Server->>Server: processStreamChunks()\n(store InternalToolCallState.metadata and thoughtSignature)\n(build assistant UI messages including `metadata`)
    Server->>Client: Stream events / UIMessages (TOOL_CALL_START / updates) with `metadata`
    Client->>Server: Send next request (history converted back to ModelMessage.toolCalls includes `metadata`)
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🐰 I found the thoughts that liked to hide,

moved them to siblings, kept metadata beside.
I threaded data through stream and part,
so tools wake singing, all set to start. 🥕

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is well-structured, covers the root cause, API expectations, and changes made. However, it does not follow the provided template with required sections like 'Changes', 'Checklist', and 'Release Impact'. Add missing template sections: explicitly fill the 'Checklist' (Contributing guide, testing), and 'Release Impact' (changeset creation status) sections to match the required format.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly describes the primary change: fixing how the Gemini adapter reads and writes thoughtSignature at the Part level for Gemini 3.x compatibility.
Linked Issues check ✅ Passed The PR addresses the adapter-level read/write fixes for #403 (thoughtSignature positioning) and correctly implements Part-level handling. However, the linked issue #403 also requires client-side threading through ToolCallPart, InternalToolCallState, updateToolCallPart, handleToolCallStart, buildAssistantMessages, and modelMessageToUIMessage—all addressed in this changeset as evidenced by modifications to those files and the generic TToolCallMetadata plumbing.
Out of Scope Changes check ✅ Passed All changes are directly scoped to fixing thoughtSignature handling and implementing the required metadata threading through the client-side pipeline. No extraneous modifications detected.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@pemontto
Copy link
Copy Markdown
Author

Re: the pre-merge check about #403 scope.

This PR fixes the server-side adapter (the GeminiTextAdapter read/write paths), which is the direct cause of the 400 INVALID_ARGUMENT: "Function call is missing a thought_signature" errors on Gemini 3.x models.

The client-side providerMetadata pipeline issue (threading through ToolCallPart, InternalToolCallState, StreamProcessor, etc.) is a separate concern tracked in #404. That PR addresses whether providerMetadata survives the client-side UIMessage round-trip. Both fixes are needed for a complete solution, but they're independent: this adapter fix stops the API rejections, and #404 ensures the metadata persists through the client layer.

@mattsoltani
Copy link
Copy Markdown

mattsoltani commented Apr 17, 2026

Can confirm this also fixes the issue we were experiencing missing thought signature

Comment thread packages/typescript/ai-gemini/src/adapters/text.ts Outdated
@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Apr 20, 2026

View your CI Pipeline Execution ↗ for commit 48cf4a2

Command Status Duration Result
nx run-many --targets=build --exclude=examples/** ✅ Succeeded 48s View ↗

☁️ Nx Cloud last updated this comment at 2026-04-20 15:23:42 UTC

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Apr 20, 2026

View your CI Pipeline Execution ↗ for commit 48cf4a2

Command Status Duration Result
nx run-many --targets=build --exclude=examples/** ✅ Succeeded 48s View ↗

☁️ Nx Cloud last updated this comment at 2026-04-20 15:22:47 UTC

@pemontto
Copy link
Copy Markdown
Author

Good call, addressed in ab05e4c. The @google/genai SDK actually types thoughtSignature on Part properly, so both as any casts in this area were unnecessary:

  • Read side: removed (part as any).thoughtSignaturepart.thoughtSignature (typed). Also removed the (functionCall as any).thoughtSignature fallback entirely. The SDK has never had thoughtSignature on FunctionCall, so that fallback was based on a misconception from the original PR fix(ai-gemini): preserve thoughtSignature and fix tool call IDs for Gemini 3+ thinking models #401 and was never a real code path.
  • Write side: replaced the } as Part) spread-literal cast with an explicit typed const part: Part = {...} construction and conditional assignment.

Only remaining as any in the Gemini adapter is the pre-existing functionResponse cast (line ~714), which is unrelated to this fix.

All 66 tests still pass, typecheck clean.

@mattsoltani
Copy link
Copy Markdown

mattsoltani commented Apr 22, 2026

@pemontto After some further testing, it seems there are a few more places in the tool call life cycle where the provider meta data should be added to avoid more errors. See the following file locations:

  1. ai/packages/typescript/ai/src/activities/chat/messages.ts#L206
  2. ai/packages/typescript/ai/src/activities/chat/messages.ts#L342
  3. ai/packages/typescript/ai/src/activities/chat/stream/message-updaters.ts#L78
  4. ai/packages/typescript/ai/src/activities/chat/stream/processor.ts#L922

@pemontto
Copy link
Copy Markdown
Author

pemontto commented Apr 22, 2026

Good catch @mattsoltani, those locations are exactly what #404 (by @houmark, opened 2026-03-28) addresses. It threads providerMetadata through ToolCallPart, InternalToolCallState, updateToolCallPart, handleToolCallStart, buildAssistantMessages, and modelMessageToUIMessage, the full client-side pipeline.

That PR has been open for nearly a month without a maintainer review. Could we get it reviewed alongside this one? Without both, the adapter write-side fix here never actually has a signature to write because it's dropped upstream in the pipeline.

If preferred, I'm happy to pull those changes into this PR (with attribution to @houmark) so it's a single comprehensive fix. Just let me know which you'd like.

@mattsoltani
Copy link
Copy Markdown

I see @pemontto and agree with your points. Don't know about the preference here, but would be good to get both fixes in so we can remove the local patches. @AlemTuzlak what do you think is the best path forward?

@AlemTuzlak
Copy link
Copy Markdown
Contributor

Would you mind pulling it in? Also adding e2e tests if possible?

@AlemTuzlak
Copy link
Copy Markdown
Contributor

also #404 should use modelOptions instead of providerOptions

@pemontto
Copy link
Copy Markdown
Author

@AlemTuzlak before pulling #404 in: it threads providerMetadata?: Record<string, unknown> through ToolCallPart/InternalToolCallState, matching the existing ToolCall.providerMetadata shape from #401. Want that as-is, or refactored into a per-adapter typed metadata generic (similar to TMessageMetadataByModality)?

@AlemTuzlak
Copy link
Copy Markdown
Contributor

@pemontto I think that's outdated, we moved away from providerMetadata and providerOptions to modelOptions and modelMetadata

pemontto and others added 3 commits April 28, 2026 12:43
Gemini 3.x models emit thoughtSignature as a Part-level sibling of
functionCall (per @google/genai Part type), not nested inside
functionCall. The adapter was reading from functionCall.thoughtSignature
(which does not exist in the SDK types) and writing it back nested,
causing the API to reject subsequent tool-call turns with
400 INVALID_ARGUMENT: "Function call is missing a thought_signature".

Read side: check part.thoughtSignature first, fall back to
functionCall.thoughtSignature for Gemini 2.x compatibility.

Write side: emit thoughtSignature as a Part-level sibling of
functionCall instead of nesting it inside.

Closes TanStack#403
Related: TanStack#218, TanStack#401, TanStack#404
Per review feedback: use the @google/genai typed `Part` interface
directly instead of `as any` casts.

- Read side: `part.thoughtSignature` is properly typed on `Part`, so
  the cast is removed entirely. The Gemini 2.x fallback to
  `functionCall.thoughtSignature` is also removed since the SDK has
  never typed it there and Gemini has always emitted it at Part level.
- Write side: construct a typed `Part` and conditionally assign
  `thoughtSignature`, avoiding the `as Part` cast on a spread literal.

The only remaining `as any` in this area is the pre-existing
functionResponse cast, which is unrelated to this fix.
@pemontto
Copy link
Copy Markdown
Author

@AlemTuzlak I might be being obtuse, I can see modelOptions but no trace of modelMetadata in the codebase. Closest typed pattern I can find is messageMetadataByModality / metadata?: TMetadata on content parts. Is the intent to apply that same shape to ToolCall (typed metadata? via a per-adapter generic), replacing the generic providerMetadata: Record<string, unknown>?

@AlemTuzlak
Copy link
Copy Markdown
Contributor

Yeah then it should be metadata, i hallucinated providerOptions 💀

Renames `providerMetadata` to `metadata` and types it per-adapter via a
new `TToolCallMetadata` generic on `BaseTextAdapter`, mirroring the
existing typed-metadata pattern on content parts (`ImagePart<TMetadata>`,
etc.).

Also threads metadata through the client-side UIMessage pipeline so it
round-trips with each tool call, fixing the silent drop surfaced in
TanStack#403/TanStack#404 (incorporates that PR's plumbing under the new name).

Gemini adapter now declares `TToolCallMetadata = GeminiToolCallMetadata`,
giving consumers typed `toolCall.metadata?.thoughtSignature` end-to-end.

Per maintainer feedback on TanStack#459 (AlemTuzlak): use `metadata` (typed
per-adapter generic) rather than the previous `providerMetadata` bag.
The `ToolCallStartEvent` event remains non-generic with
`metadata?: Record<string, unknown>` because making it generic breaks
the AGUIEvent discriminated-union narrowing.

Breaking: consumers reading `toolCall.providerMetadata` or
`toolCallStartEvent.providerMetadata` should rename to `metadata`.

Co-authored-by: houmark <noreply@github.com>
@pemontto pemontto force-pushed the fix/gemini-thought-signature-part-level branch from ab05e4c to 1ce6e29 Compare April 29, 2026 16:50
pemontto pushed a commit to pemontto/ai that referenced this pull request Apr 29, 2026
Renames `providerMetadata` to `metadata` and types it per-adapter via a
new `TToolCallMetadata` generic on `BaseTextAdapter`, mirroring the
existing typed-metadata pattern on content parts (`ImagePart<TMetadata>`,
etc.).

Also threads metadata through the client-side UIMessage pipeline so it
round-trips with each tool call, fixing the silent drop surfaced in
TanStack#403/TanStack#404 (incorporates that PR's plumbing under the new name).

Gemini adapter now declares `TToolCallMetadata = GeminiToolCallMetadata`,
giving consumers typed `toolCall.metadata?.thoughtSignature` end-to-end.

Per maintainer feedback on TanStack#459 (AlemTuzlak): use `metadata` (typed
per-adapter generic) rather than the previous `providerMetadata` bag.
The `ToolCallStartEvent` event remains non-generic with
`metadata?: Record<string, unknown>` because making it generic breaks
the AGUIEvent discriminated-union narrowing.

Breaking: consumers reading `toolCall.providerMetadata` or
`toolCallStartEvent.providerMetadata` should rename to `metadata`.

Co-authored-by: houmark <noreply@github.com>
Added the new TToolCallMetadata generic to BaseTextAdapter requires
mock adapters in tests/test-utils.ts and tests/type-check.test.ts to
include toolCallMetadata in their `~types` block.
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
packages/typescript/ai-event-client/src/index.ts (1)

89-100: ToolCall is now generic, but ToolCallPart still can’t carry typed metadata.

Line 89 correctly introduces ToolCall<TMetadata>, but ToolCallPart (Line 52-64) still lacks metadata and a matching generic, which leaves part-level metadata untyped and out of sync with the mirrored core types (packages/typescript/ai/src/types.ts:313-330).

Proposed alignment patch
-export interface ToolCallPart {
+export interface ToolCallPart<TMetadata = unknown> {
   type: 'tool-call'
   id: string
   name: string
   arguments: string
   state: ToolCallState
@@
   }
   output?: any
+  metadata?: TMetadata
 }
@@
-export type MessagePart =
+export type MessagePart<TMetadata = unknown> =
   | TextPart
   | ImagePart
   | AudioPart
   | VideoPart
   | DocumentPart
-  | ToolCallPart
+  | ToolCallPart<TMetadata>
   | ToolResultPart
   | ThinkingPart
@@
-export interface TextMessageCreatedEvent extends BaseEventContext {
+export interface TextMessageCreatedEvent<TMetadata = unknown>
+  extends BaseEventContext {
@@
-  parts?: Array<MessagePart>
-  toolCalls?: Array<ToolCall>
+  parts?: Array<MessagePart<TMetadata>>
+  toolCalls?: Array<ToolCall<TMetadata>>
   messageIndex?: number
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/typescript/ai-event-client/src/index.ts` around lines 89 - 100,
ToolCall is generic (ToolCall<TMetadata>) but ToolCallPart is missing a matching
generic and metadata field; update the ToolCallPart interface to accept the same
generic (e.g. ToolCallPart<TMetadata = unknown>) and add metadata?: TMetadata to
its shape so part-level metadata is typed and mirrors ToolCall; also update any
related type references/usages in this file (and exports) to propagate the
generic default where needed so signatures like ToolCallPart<T> and ToolCall<T>
remain consistent.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@packages/typescript/ai-event-client/src/index.ts`:
- Around line 89-100: ToolCall is generic (ToolCall<TMetadata>) but ToolCallPart
is missing a matching generic and metadata field; update the ToolCallPart
interface to accept the same generic (e.g. ToolCallPart<TMetadata = unknown>)
and add metadata?: TMetadata to its shape so part-level metadata is typed and
mirrors ToolCall; also update any related type references/usages in this file
(and exports) to propagate the generic default where needed so signatures like
ToolCallPart<T> and ToolCall<T> remain consistent.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: cff574eb-ec93-48a4-a410-c1226235317c

📥 Commits

Reviewing files that changed from the base of the PR and between ab05e4c and 1ce6e29.

📒 Files selected for processing (2)
  • .changeset/fix-gemini-thought-signature-part-level.md
  • packages/typescript/ai-event-client/src/index.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • .changeset/fix-gemini-thought-signature-part-level.md

@pemontto pemontto force-pushed the fix/gemini-thought-signature-part-level branch from 6c68bd1 to 5de2d4c Compare April 30, 2026 10:42
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/typescript/ai/src/activities/chat/stream/processor.ts (1)

1391-1397: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Preserve metadata in ProcessorResult.toolCalls too.

This keeps metadata on the UI path, but getCompletedToolCalls() still rebuilds each ToolCall with only { id, type, function }. Any caller using process()/getResult().toolCalls will still lose Gemini's thoughtSignature before the next round-trip.

Patch
       result.push({
         id: tc.id,
         type: 'function' as const,
         function: {
           name: tc.name,
           arguments: tc.arguments,
         },
+        ...(tc.metadata !== undefined && { metadata: tc.metadata }),
       })
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/typescript/ai/src/activities/chat/stream/processor.ts` around lines
1391 - 1397, getCompletedToolCalls() rebuilds ToolCall objects without carrying
over metadata, so ProcessorResult.toolCalls loses Gemini's thoughtSignature;
update getCompletedToolCalls() to include the metadata when reconstructing each
ToolCall (preserve any existing toolCall.metadata) so
process()/getResult().toolCalls retains metadata across round-trips—ensure the
rebuilt objects include the metadata field (same shape used by
updateToolCallPart call that sets state 'input-complete') and update any tests
or callers that depend on ProcessorResult.toolCalls accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@packages/typescript/ai/src/activities/chat/stream/processor.ts`:
- Around line 1391-1397: getCompletedToolCalls() rebuilds ToolCall objects
without carrying over metadata, so ProcessorResult.toolCalls loses Gemini's
thoughtSignature; update getCompletedToolCalls() to include the metadata when
reconstructing each ToolCall (preserve any existing toolCall.metadata) so
process()/getResult().toolCalls retains metadata across round-trips—ensure the
rebuilt objects include the metadata field (same shape used by
updateToolCallPart call that sets state 'input-complete') and update any tests
or callers that depend on ProcessorResult.toolCalls accordingly.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2c65d95f-6325-440f-93f8-033fffe71104

📥 Commits

Reviewing files that changed from the base of the PR and between 6c68bd1 and 5de2d4c.

📒 Files selected for processing (15)
  • .changeset/fix-gemini-thought-signature-part-level.md
  • packages/typescript/ai-event-client/src/index.ts
  • packages/typescript/ai-gemini/src/adapters/text.ts
  • packages/typescript/ai-gemini/src/message-types.ts
  • packages/typescript/ai-gemini/tests/gemini-adapter.test.ts
  • packages/typescript/ai/src/activities/chat/adapter.ts
  • packages/typescript/ai/src/activities/chat/messages.ts
  • packages/typescript/ai/src/activities/chat/stream/message-updaters.ts
  • packages/typescript/ai/src/activities/chat/stream/processor.ts
  • packages/typescript/ai/src/activities/chat/stream/types.ts
  • packages/typescript/ai/src/activities/chat/tools/tool-calls.ts
  • packages/typescript/ai/src/types.ts
  • packages/typescript/ai/tests/strip-to-spec-middleware.test.ts
  • packages/typescript/ai/tests/test-utils.ts
  • packages/typescript/ai/tests/type-check.test.ts
✅ Files skipped from review due to trivial changes (5)
  • packages/typescript/ai/tests/type-check.test.ts
  • packages/typescript/ai/tests/test-utils.ts
  • packages/typescript/ai/src/activities/chat/stream/types.ts
  • packages/typescript/ai/tests/strip-to-spec-middleware.test.ts
  • packages/typescript/ai-gemini/src/message-types.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • .changeset/fix-gemini-thought-signature-part-level.md

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.

providerMetadata lost in client-side UIMessage pipeline — breaks Gemini 3 thoughtSignature on multi-turn tool calls

3 participants