Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
96d84df
feat(ai-gemini): add geminiTextInteractions() adapter for stateful In…
tombeckenham Apr 24, 2026
b320a03
ci: apply automated fixes
autofix-ci[bot] Apr 24, 2026
f997231
refactor(ai-gemini): surface interactionId via CUSTOM event, drop cor…
tombeckenham Apr 24, 2026
0acb4ff
fix(ai-gemini): address CodeRabbit review feedback on Interactions ad…
tombeckenham Apr 24, 2026
d5aee8b
ci: apply automated fixes
autofix-ci[bot] Apr 24, 2026
a03aa0a
fix(ai-gemini): emit RUN_ERROR with spec-compliant flat message/code
tombeckenham Apr 24, 2026
6b86d53
feat(examples): wire Gemini Interactions into ts-react-chat, refresh …
tombeckenham Apr 24, 2026
6e66106
test(ai-gemini): route adapter tests through public core APIs
tombeckenham Apr 24, 2026
55d7210
feat(ai-gemini): built-in tools on geminiTextInteractions()
tombeckenham Apr 24, 2026
d2766b1
ci: apply automated fixes
autofix-ci[bot] Apr 24, 2026
1bd19b3
ci: apply automated fixes (attempt 2/3)
autofix-ci[bot] Apr 24, 2026
94a165c
refactor(ai-gemini)!: gate `geminiTextInteractions` behind `/experime…
tombeckenham Apr 27, 2026
c24f751
chore(ai-gemini): consolidate `geminiTextInteractions` changesets
tombeckenham Apr 27, 2026
9b51e63
Marked gemini interactions as experimental in example
tombeckenham Apr 27, 2026
4b23988
test(e2e): wire up stateful-interactions spec for geminiTextInteractions
tombeckenham Apr 29, 2026
5e0054d
chore(e2e): drop stale "aimock doesn't mock interactions" note
tombeckenham May 16, 2026
d9a9d23
ci: apply automated fixes
autofix-ci[bot] May 16, 2026
7969fab
feat(ai-gemini): include threadId + parentRunId on Interactions RUN_S…
tombeckenham May 18, 2026
7865a97
feat(ai-gemini): export GeminiInteractionsCustomEvent discriminated u…
tombeckenham May 18, 2026
1270f2e
fix(ai-gemini): send Interactions input as string | Content[], not Tu…
tombeckenham May 18, 2026
23d51e4
ci: apply automated fixes
autofix-ci[bot] May 18, 2026
73d78e8
fix(ai-gemini): wire useChat into the Interactions API correctly
tombeckenham May 18, 2026
a714977
fix(ai-gemini): correctly format Interactions API wire requests
tombeckenham May 18, 2026
658ea92
fix(ai-gemini): tighten experimental Interactions adapter type safety…
tombeckenham May 19, 2026
c1e53a9
ci: apply automated fixes
autofix-ci[bot] May 19, 2026
5f6f7b1
fix(ai-gemini): plug interactionId map leak; verify E2E chains the id
tombeckenham May 19, 2026
c17abc9
fix(ai-gemini): evict interactionId on abandonment after tool_calls turn
tombeckenham May 19, 2026
a2c0c3b
fix(ai-gemini): seal truncated AG-UI events + preserve interactionId …
tombeckenham May 19, 2026
c79255d
docs(ai-gemini): correct stale API Reference signatures
tombeckenham May 19, 2026
c16761b
chore(e2e): consistent error handling + harden stateful-interactions …
tombeckenham May 19, 2026
6b90e13
chore(e2e): bump @copilotkit/aimock to ^1.27.0 for Step[] envelope su…
tombeckenham May 21, 2026
d27c7f5
fix(ai-gemini): align experimental adapter + tests with tightened main
tombeckenham May 21, 2026
030720a
fix(e2e): restore AudioGenUI wiring incidentally dropped by PR #527
tombeckenham May 21, 2026
9ccd0da
fix(ai-gemini): clear lint errors in experimental Interactions adapter
tombeckenham May 21, 2026
3e4bf2a
docs(ai-gemini): refresh experimental Interactions section to 3.x models
tombeckenham May 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .changeset/gemini-text-interactions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
'@tanstack/ai-gemini': minor
---

feat(ai-gemini): add experimental `geminiTextInteractions()` adapter for Gemini's stateful Interactions API (Beta)

Routes through `client.interactions.create` instead of `client.models.generateContent`, so callers can pass `previous_interaction_id` via `modelOptions` and let the server retain conversation history. On each run, the returned interaction id is surfaced via an AG-UI `CUSTOM` event (`name: 'gemini.interactionId'`) emitted just before `RUN_FINISHED` β€” feed it back on the next turn via `modelOptions.previous_interaction_id`.

Exported from a dedicated `@tanstack/ai-gemini/experimental` subpath so the experimental status is load-bearing in your editor and bundle:

```ts
import { geminiTextInteractions } from '@tanstack/ai-gemini/experimental'
```

Scope: text/chat output with function tools, plus the built-in tools `google_search`, `code_execution`, `url_context`, `file_search`, and `computer_use`. Built-in tool activity is surfaced as AG-UI `CUSTOM` events named `gemini.googleSearchCall` / `gemini.googleSearchResult` (and the matching `codeExecutionCall`/`Result`, `urlContextCall`/`Result`, `fileSearchCall`/`Result` variants), carrying the raw Interactions delta payload. Function-tool `TOOL_CALL_*` events are unchanged, and `finishReason` stays `stop` when only built-in tools ran β€” the core chat loop has nothing to execute.

`google_search_retrieval`, `google_maps`, and `mcp_server` are not supported on this adapter and throw a targeted error explaining the alternative. Image/audio output via Interactions is also not routed through this adapter β€” use `geminiText()`, `geminiImage`, or `geminiSpeech` for those.

Marked `@experimental` β€” the underlying Interactions API is Beta and Google explicitly flags possible breaking changes.
Loading
Loading