diff --git a/.changeset/typed-video-duration.md b/.changeset/typed-video-duration.md new file mode 100644 index 000000000..fb6618348 --- /dev/null +++ b/.changeset/typed-video-duration.md @@ -0,0 +1,34 @@ +--- +'@tanstack/ai': major +'@tanstack/ai-fal': major +--- + +Add per-model typed durations for video generation. + +`VideoAdapter` gains a fifth generic, `TModelDurationByName`, plus two +introspection methods on every adapter: + +- `availableDurations()` — returns a `DurationOptions` tagged union + (`discrete | range | mixed | none`) describing the durations the current + model accepts. +- `snapDuration(seconds)` — coerces raw seconds to the closest valid duration + for the current model. + +The `duration` field on `generateVideo({ adapter, ... })` is now per-model +typed via `VideoDurationForAdapter`. For FAL, the type is derived +from `@fal-ai/client`'s `EndpointTypeMap`, so: + +- `falVideo('fal-ai/kling-video/v1.6/standard/text-to-video')` → `duration?: '5' | '10'` +- `falVideo('fal-ai/veo3')` → `duration?: '4s' | '6s' | '8s'` +- `falVideo('fal-ai/minimax/video-01')` → `duration` not accepted + +**Breaking**: callers passing `duration: ` to FAL video models must +either pass the typed string union directly or call +`adapter.snapDuration(seconds)`. Adapters that have not yet declared their +per-model duration map get a sensible default (`{ kind: 'none' }`, +`undefined`) so existing behaviour is preserved. + +Builds on `@tanstack/ai-schemas` (#622); once that PR's FAL pipeline syncs +runtime constraint data, the hand-curated map in +`packages/typescript/ai-fal/src/video/video-provider-options.ts` will be +replaced with schema-derived lookups. diff --git a/README.md b/README.md index 26e3db048..1c98040b8 100644 --- a/README.md +++ b/README.md @@ -1,93 +1,253 @@
- + TanStack AI

- - - - - - - - - + + NPM downloads + + + GitHub stars + + + Release + + + Bundle size + + + Follow @TanStack +
-
- - semantic-release - - - Release - - - Follow @TanStack - -
+# TanStack AI -
- -### [Become a Sponsor!](https://github.com/sponsors/tannerlinsley/) -
+Type-safe, provider-agnostic TypeScript SDK for building streaming chat, +tool-calling agents, structured outputs, realtime voice, media generation, and +framework-native AI apps. -# TanStack AI +TanStack AI is built from composable activities and provider adapters. Use one +provider or switch between many. Import only chat, or add image, audio, video, +speech, transcription, summarization, realtime, Code Mode, devtools, and +framework bindings as your app needs them. + +## Read the docs -> + +## Start Here + +- [Overview](https://tanstack.com/ai/latest/docs/getting-started/overview) - + what TanStack AI is and how the packages fit together. +- [Quick Start: React](https://tanstack.com/ai/latest/docs/getting-started/quick-start) - + add streaming chat to a React app. +- [Quick Start: Vue](https://tanstack.com/ai/latest/docs/getting-started/quick-start-vue) - + build with Vue composables. +- [Quick Start: Svelte](https://tanstack.com/ai/latest/docs/getting-started/quick-start-svelte) - + build with Svelte 5 runes. +- [Quick Start: Server Only](https://tanstack.com/ai/latest/docs/getting-started/quick-start-server) - + use TanStack AI from a server endpoint, script, or backend service. +- [TanStack AI vs Vercel AI SDK](https://tanstack.com/ai/latest/docs/comparison/vercel-ai-sdk) - + compare architecture, feature coverage, and tradeoffs. + +## What You Can Build + +- Streaming chat experiences with typed messages, tool calls, reasoning parts, + and configurable connection adapters. +- Type-safe tools that can run on the server or client from one shared + `toolDefinition()` contract. +- Structured output flows backed by JSON Schema, Zod, ArkType, Valibot, or + plain JSON Schema. +- Multimodal prompts and responses that include text, images, audio, video, and + documents. +- Image, audio, video, speech, transcription, and summarization workflows using + a shared generation client pattern. +- Realtime voice chat with provider adapters for realtime sessions and token + minting. +- Code Mode agents that let an LLM write and execute TypeScript in an isolated + sandbox to orchestrate tools with loops, branches, and parallel calls. +- Devtools and observability pipelines for inspecting messages, tool calls, + stream chunks, errors, usage, and OpenTelemetry traces. +- Framework-native clients for React, Solid, Vue, Svelte, and Preact, plus a + headless client for custom runtimes. + +## Install -A powerful, type-safe AI SDK for building AI-powered applications. +Install the core package and the provider/framework packages your app uses: -- Provider-agnostic adapters (OpenAI, Anthropic, Gemini, Ollama, etc.) -- **Tree-shakeable adapters** - Import only what you need for smaller bundles -- **Multimodal content support** - Send images, audio, video, and documents -- **Image generation** - Generate images with OpenAI DALL-E/GPT-Image and Gemini Imagen -- Chat completion, streaming, and agent loop strategies -- Headless chat state management with adapters (SSE, HTTP stream, custom) -- Isomorphic type-safe tools with server/client execution -- **Enhanced integration with TanStack Start** - Share implementations between AI tools and server functions -- **Observability events** - Structured, typed events for text, tools, image, speech, transcription, and video ([docs](./docs/guides/observability.md)) +```bash +pnpm add @tanstack/ai @tanstack/ai-openai +``` + +For a React chat UI: + +```bash +pnpm add @tanstack/ai @tanstack/ai-client @tanstack/ai-react @tanstack/ai-openai +``` -### Read the docs → +OpenRouter is also a good starting point if you want access to many providers +through one API key: -## Tree-Shakeable Adapters +```bash +pnpm add @tanstack/ai @tanstack/ai-openrouter +``` -Import only the functionality you need for smaller bundle sizes: +## Streaming Chat ```typescript -// Only chat functionality - no summarization code bundled -import { openaiText } from '@tanstack/ai-openai/adapters' -import { generate } from '@tanstack/ai' +import { chat, toServerSentEventsResponse } from '@tanstack/ai' +import { openaiText } from '@tanstack/ai-openai' -const textAdapter = openaiText() +export async function POST(request: Request) { + const body = await request.json() -const result = generate({ - adapter: textAdapter, - model: 'gpt-4o', - messages: [{ role: 'user', content: [{ type: 'text', content: 'Hello!' }] }], -}) + const stream = chat({ + adapter: openaiText('gpt-5.2'), + messages: body.messages, + }) -for await (const chunk of result) { - console.log(chunk) + return toServerSentEventsResponse(stream) } ``` -Available adapters: `openaiText`, `openaiEmbed`, `openaiSummarize`, `anthropicText`, `geminiText`, `ollamaText`, and more. +Learn more in the +[Chat & Streaming docs](https://tanstack.com/ai/latest/docs/chat/streaming) and +[Connection Adapters docs](https://tanstack.com/ai/latest/docs/chat/connection-adapters). + +## Type-Safe Tools + +Define a tool once, then attach a server or client implementation with the same +input and output types: + +```typescript +import { toolDefinition } from '@tanstack/ai' +import { z } from 'zod' + +const getProducts = toolDefinition({ + name: 'getProducts', + description: 'Search the product catalog', + inputSchema: z.object({ query: z.string() }), + outputSchema: z.array( + z.object({ + id: z.string(), + name: z.string(), + }), + ), +}).server(async ({ query }) => { + return db.products.search(query) +}) +``` + +Learn more in the +[Tools docs](https://tanstack.com/ai/latest/docs/tools/tools), +[Tool Approval Flow docs](https://tanstack.com/ai/latest/docs/tools/tool-approval), +and +[Lazy Tool Discovery docs](https://tanstack.com/ai/latest/docs/tools/lazy-tool-discovery). + +## Structured Outputs + +Use `outputSchema` when you need typed objects instead of freeform text: + +```typescript +import { chat } from '@tanstack/ai' +import { openaiText } from '@tanstack/ai-openai' +import { z } from 'zod' + +const Person = z.object({ + name: z.string(), + age: z.number(), +}) + +const person = await chat({ + adapter: openaiText('gpt-5.2'), + messages: [{ role: 'user', content: 'Ada Lovelace, 36' }], + outputSchema: Person, +}) +``` + +Learn more in the +[Structured Outputs docs](https://tanstack.com/ai/latest/docs/structured-outputs/overview). + +## Media, Realtime, and Code Mode + +- [Generations](https://tanstack.com/ai/latest/docs/media/generations) - one + pattern for image generation, text-to-speech, transcription, summarization, + audio generation, and video generation. +- [Realtime Voice Chat](https://tanstack.com/ai/latest/docs/media/realtime-chat) - + build low-latency realtime voice experiences. +- [Code Mode](https://tanstack.com/ai/latest/docs/code-mode/code-mode) - let + models write and execute TypeScript inside a secure isolate. +- [Code Mode with Skills](https://tanstack.com/ai/latest/docs/code-mode/code-mode-with-skills) - + give Code Mode reusable runtime capabilities. + +## Providers + +Official adapters include: + +| Package | Use it for | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| [`@tanstack/ai-openrouter`](https://tanstack.com/ai/latest/docs/adapters/openrouter) | 300+ models through one OpenRouter API | +| [`@tanstack/ai-openai`](https://tanstack.com/ai/latest/docs/adapters/openai) | OpenAI chat, image, video, speech, transcription, realtime, and provider tools | +| [`@tanstack/ai-anthropic`](https://tanstack.com/ai/latest/docs/adapters/anthropic) | Anthropic Claude chat, thinking, tools, and structured outputs | +| [`@tanstack/ai-gemini`](https://tanstack.com/ai/latest/docs/adapters/gemini) | Google Gemini chat, image, speech, and audio generation | +| [`@tanstack/ai-ollama`](https://tanstack.com/ai/latest/docs/adapters/ollama) | Local Ollama models | +| [`@tanstack/ai-grok`](https://tanstack.com/ai/latest/docs/adapters/grok) | xAI Grok chat, images, and realtime | +| [`@tanstack/ai-groq`](https://tanstack.com/ai/latest/docs/adapters/groq) | Groq low-latency inference | +| [`@tanstack/ai-elevenlabs`](https://tanstack.com/ai/latest/docs/adapters/elevenlabs) | ElevenLabs realtime voice, speech, transcription, music, and sound effects | +| [`@tanstack/ai-fal`](https://tanstack.com/ai/latest/docs/adapters/fal) | fal.ai image, video, audio, speech, and transcription models | + +The adapter system is tree-shakeable by activity. Import `openaiText` for chat, +`openaiImage` for images, `falVideo` for video, `geminiSpeech` for TTS, and so +on. + +## Framework Packages + +| Package | What it provides | +| -------------------------------------------------------------------------- | ------------------------------------------------------------------------ | +| [`@tanstack/ai-client`](https://tanstack.com/ai/latest/docs/api/ai-client) | Headless chat, realtime, and generation clients | +| [`@tanstack/ai-react`](https://tanstack.com/ai/latest/docs/api/ai-react) | React hooks including `useChat`, `useRealtimeChat`, and generation hooks | +| [`@tanstack/ai-solid`](https://tanstack.com/ai/latest/docs/api/ai-solid) | Solid hooks for chat and generations | +| [`@tanstack/ai-vue`](https://tanstack.com/ai/latest/docs/api/ai-vue) | Vue composables for chat and generations | +| [`@tanstack/ai-svelte`](https://tanstack.com/ai/latest/docs/api/ai-svelte) | Svelte 5 factories for chat and generations | +| [`@tanstack/ai-preact`](https://tanstack.com/ai/latest/docs/api/ai-preact) | Preact hooks for chat | +| `@tanstack/ai-react-ui`, `@tanstack/ai-solid-ui`, `@tanstack/ai-vue-ui` | Headless UI components for chat interfaces | + +## Advanced Docs + +- [Middleware](https://tanstack.com/ai/latest/docs/advanced/middleware) - hook + into chat configuration, chunks, tool calls, usage, errors, and structured + outputs. +- [OpenTelemetry](https://tanstack.com/ai/latest/docs/advanced/otel) - emit + vendor-neutral GenAI traces and metrics. +- [Observability](https://tanstack.com/ai/latest/docs/advanced/observability) - + subscribe to typed TanStack AI events. +- [Per-Model Type Safety](https://tanstack.com/ai/latest/docs/advanced/per-model-type-safety) - + narrow model options and content modalities to the selected model. +- [Runtime Adapter Switching](https://tanstack.com/ai/latest/docs/advanced/runtime-adapter-switching) - + switch providers at runtime. +- [Tree-Shaking](https://tanstack.com/ai/latest/docs/advanced/tree-shaking) - + ship only the activities and adapters you use. +- [Agent Skills](https://tanstack.com/ai/latest/docs/getting-started/agent-skills) - + install TanStack AI skills into Claude Code, Cursor, GitHub Copilot, Codex, + and other coding agents with TanStack Intent. ## Get Involved -- We welcome issues and pull requests! -- Participate in [GitHub discussions](https://github.com/TanStack/ai/discussions) -- Chat with the community on [Discord](https://discord.com/invite/WrRKjPJ) -- See [CONTRIBUTING.md](./CONTRIBUTING.md) for setup instructions +- Read the [docs](https://tanstack.com/ai). +- Participate in [GitHub discussions](https://github.com/TanStack/ai/discussions). +- Chat with the community on [Discord](https://discord.com/invite/WrRKjPJ). +- See [CONTRIBUTING.md](https://github.com/TanStack/ai/blob/main/CONTRIBUTING.md) + for setup instructions. +- [Become a sponsor](https://github.com/sponsors/tannerlinsley/). ## Partners
- + - + CodeRabbit @@ -96,7 +256,7 @@ Available adapters: `openaiText`, `openaiEmbed`, `openaiSummarize`, `anthropicTe - + Cloudflare @@ -106,28 +266,39 @@ Available adapters: `openaiText`, `openaiEmbed`, `openaiSummarize`, `anthropicTe
-AI & you? -

-We're looking for TanStack AI Partners to join our mission! Partner with us to push the boundaries of TanStack AI and build amazing things together. -

-LET'S CHAT + AI and you? +

+ We're looking for TanStack AI partners to join our mission. Partner with us + to push the boundaries of TanStack AI and build amazing things together. +

+ LET'S CHAT
## Explore the TanStack Ecosystem -- TanStack Config – Tooling for JS/TS packages -- TanStack DB – Reactive sync client store -- TanStack Devtools – Unified devtools panel -- TanStack Form – Type‑safe form state -- TanStack Pacer – Debouncing, throttling, batching -- TanStack Query – Async state & caching -- TanStack Ranger – Range & slider primitives -- TanStack Router – Type‑safe routing, caching & URL state -- TanStack Start – Full‑stack SSR & streaming -- TanStack Store – Reactive data store -- TanStack Table – Headless datagrids -- TanStack Virtual – Virtualized rendering - -… and more at TanStack.com » - - +- TanStack Config - + tooling for JS/TS packages +- TanStack DB - reactive + sync client store +- TanStack Devtools - + unified devtools panel +- TanStack Form - + type-safe form state +- TanStack Pacer - + debouncing, throttling, batching +- TanStack Query - + async state and caching +- TanStack Ranger - + range and slider primitives +- TanStack Router - + type-safe routing, caching, and URL state +- TanStack Start - + full-stack SSR and streaming +- TanStack Store - + reactive data store +- TanStack Table - + headless datagrids +- TanStack Virtual - + virtualized rendering + +...and more at TanStack.com. diff --git a/docs/media/image-generation.md b/docs/media/image-generation.md index 6c3c6e115..1fb23499f 100644 --- a/docs/media/image-generation.md +++ b/docs/media/image-generation.md @@ -90,6 +90,7 @@ All image adapters support these common options: | Model | Supported Sizes | |-------|----------------| +| `gpt-image-2` | `1024x1024`, `1536x1024`, `1024x1536`, `auto` | | `gpt-image-1` | `1024x1024`, `1536x1024`, `1024x1536`, `auto` | | `gpt-image-1-mini` | `1024x1024`, `1536x1024`, `1024x1536`, `auto` | | `dall-e-3` | `1024x1024`, `1792x1024`, `1024x1792` | @@ -138,11 +139,11 @@ const result = await generateImage({ OpenAI models support model-specific Model Options: -#### GPT-Image-1 / GPT-Image-1-Mini +#### GPT-Image-2 / GPT-Image-1 / GPT-Image-1-Mini ```typescript const result = await generateImage({ - adapter: openaiImage('gpt-image-1'), + adapter: openaiImage('gpt-image-2'), prompt: 'A cat wearing a hat', modelOptions: { quality: 'high', // 'high' | 'medium' | 'low' | 'auto' @@ -223,6 +224,7 @@ interface GeneratedImage { | Model | Images per Request | |-------|-------------------| +| `gpt-image-2` | 1-10 | | `gpt-image-1` | 1-10 | | `gpt-image-1-mini` | 1-10 | | `dall-e-3` | 1 | diff --git a/docs/reference/classes/StreamProcessor.md b/docs/reference/classes/StreamProcessor.md index a17fcc9db..39a831082 100644 --- a/docs/reference/classes/StreamProcessor.md +++ b/docs/reference/classes/StreamProcessor.md @@ -177,7 +177,7 @@ Useful for auto-continue logic clearMessages(): void; ``` -Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:419](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L419) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:420](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L420) Clear all messages @@ -193,7 +193,7 @@ Clear all messages finalizeStream(): void; ``` -Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:1683](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L1683) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:1684](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L1684) Finalize the stream — complete all pending operations. @@ -251,7 +251,7 @@ Get current messages getRecording(): ChunkRecording | null; ``` -Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:1844](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L1844) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:1845](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L1845) Get the current recording @@ -267,7 +267,7 @@ Get the current recording getState(): ProcessorState; ``` -Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:1801](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L1801) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:1802](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L1802) Get current processor state (aggregated across all messages) @@ -303,7 +303,7 @@ auto-continuation produces no content. process(stream): Promise; ``` -Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:436](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L436) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:437](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L437) Process a stream and emit events through handlers @@ -325,7 +325,7 @@ Process a stream and emit events through handlers processChunk(chunk): void; ``` -Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:470](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L470) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:471](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L471) Process a single chunk from the stream. @@ -355,7 +355,7 @@ docs/chat-architecture.md#adapter-contract — Expected event types and ordering removeMessagesAfter(index): void; ``` -Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:390](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L390) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:391](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L391) Remove messages after a certain index (for reload/retry) @@ -377,7 +377,7 @@ Remove messages after a certain index (for reload/retry) reset(): void; ``` -Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:1868](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L1868) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:1869](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L1869) Full reset (including messages) @@ -440,7 +440,7 @@ an assistant message which can cause empty message flicker. startRecording(): void; ``` -Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:1831](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L1831) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:1832](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L1832) Start recording chunks @@ -478,7 +478,7 @@ Get the conversation as ModelMessages (for sending to LLM) static replay(recording, options?): Promise; ``` -Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:1887](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L1887) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:1888](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L1888) Replay a recording through the processor diff --git a/docs/reference/functions/convertMessagesToModelMessages.md b/docs/reference/functions/convertMessagesToModelMessages.md index 81194e231..233941e5d 100644 --- a/docs/reference/functions/convertMessagesToModelMessages.md +++ b/docs/reference/functions/convertMessagesToModelMessages.md @@ -12,7 +12,7 @@ function convertMessagesToModelMessages(messages): ModelMessage< | null>[]; ``` -Defined in: [packages/typescript/ai/src/activities/chat/messages.ts:71](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/messages.ts#L71) +Defined in: [packages/typescript/ai/src/activities/chat/messages.ts:79](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/messages.ts#L79) Convert UIMessages or ModelMessages to ModelMessages diff --git a/docs/reference/functions/createReplayStream.md b/docs/reference/functions/createReplayStream.md index 33cd60824..a85dd2ded 100644 --- a/docs/reference/functions/createReplayStream.md +++ b/docs/reference/functions/createReplayStream.md @@ -9,7 +9,7 @@ title: createReplayStream function createReplayStream(recording): AsyncIterable; ``` -Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:1899](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L1899) +Defined in: [packages/typescript/ai/src/activities/chat/stream/processor.ts:1900](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/stream/processor.ts#L1900) Create an async iterable from a recording diff --git a/docs/reference/functions/generateMessageId.md b/docs/reference/functions/generateMessageId.md index 9dfc5c4e7..8a865bd86 100644 --- a/docs/reference/functions/generateMessageId.md +++ b/docs/reference/functions/generateMessageId.md @@ -9,7 +9,7 @@ title: generateMessageId function generateMessageId(): string; ``` -Defined in: [packages/typescript/ai/src/activities/chat/messages.ts:529](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/messages.ts#L529) +Defined in: [packages/typescript/ai/src/activities/chat/messages.ts:549](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/messages.ts#L549) Generate a unique message ID diff --git a/docs/reference/functions/modelMessageToUIMessage.md b/docs/reference/functions/modelMessageToUIMessage.md index d67c90872..0319a3ddf 100644 --- a/docs/reference/functions/modelMessageToUIMessage.md +++ b/docs/reference/functions/modelMessageToUIMessage.md @@ -9,7 +9,7 @@ title: modelMessageToUIMessage function modelMessageToUIMessage(modelMessage, id?): UIMessage; ``` -Defined in: [packages/typescript/ai/src/activities/chat/messages.ts:385](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/messages.ts#L385) +Defined in: [packages/typescript/ai/src/activities/chat/messages.ts:394](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/messages.ts#L394) Convert a ModelMessage to UIMessage diff --git a/docs/reference/functions/modelMessagesToUIMessages.md b/docs/reference/functions/modelMessagesToUIMessages.md index 1cbd5b110..98aa4a182 100644 --- a/docs/reference/functions/modelMessagesToUIMessages.md +++ b/docs/reference/functions/modelMessagesToUIMessages.md @@ -9,7 +9,7 @@ title: modelMessagesToUIMessages function modelMessagesToUIMessages(modelMessages): UIMessage[]; ``` -Defined in: [packages/typescript/ai/src/activities/chat/messages.ts:456](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/messages.ts#L456) +Defined in: [packages/typescript/ai/src/activities/chat/messages.ts:465](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/messages.ts#L465) Convert an array of ModelMessages to UIMessages diff --git a/docs/reference/functions/normalizeToUIMessage.md b/docs/reference/functions/normalizeToUIMessage.md index 9d1533c8e..47e6b208f 100644 --- a/docs/reference/functions/normalizeToUIMessage.md +++ b/docs/reference/functions/normalizeToUIMessage.md @@ -9,7 +9,7 @@ title: normalizeToUIMessage function normalizeToUIMessage(message, generateId): UIMessage; ``` -Defined in: [packages/typescript/ai/src/activities/chat/messages.ts:506](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/messages.ts#L506) +Defined in: [packages/typescript/ai/src/activities/chat/messages.ts:526](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/messages.ts#L526) Normalize a message (UIMessage or ModelMessage) to a UIMessage Ensures the message has an ID and createdAt timestamp diff --git a/docs/reference/functions/uiMessageToModelMessages.md b/docs/reference/functions/uiMessageToModelMessages.md index 294fdc978..bbba0bdfa 100644 --- a/docs/reference/functions/uiMessageToModelMessages.md +++ b/docs/reference/functions/uiMessageToModelMessages.md @@ -12,7 +12,7 @@ function uiMessageToModelMessages(uiMessage): ModelMessage< | null>[]; ``` -Defined in: [packages/typescript/ai/src/activities/chat/messages.ts:146](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/messages.ts#L146) +Defined in: [packages/typescript/ai/src/activities/chat/messages.ts:154](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/activities/chat/messages.ts#L154) Convert a UIMessage to ModelMessage(s) diff --git a/docs/reference/interfaces/AgentLoopState.md b/docs/reference/interfaces/AgentLoopState.md index 22bc28351..8bd41ddf1 100644 --- a/docs/reference/interfaces/AgentLoopState.md +++ b/docs/reference/interfaces/AgentLoopState.md @@ -5,7 +5,7 @@ title: AgentLoopState # Interface: AgentLoopState -Defined in: [packages/typescript/ai/src/types.ts:702](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L702) +Defined in: [packages/typescript/ai/src/types.ts:703](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L703) State passed to agent loop strategy for determining whether to continue @@ -17,7 +17,7 @@ State passed to agent loop strategy for determining whether to continue finishReason: string | null; ``` -Defined in: [packages/typescript/ai/src/types.ts:708](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L708) +Defined in: [packages/typescript/ai/src/types.ts:709](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L709) Finish reason from the last response @@ -29,7 +29,7 @@ Finish reason from the last response iterationCount: number; ``` -Defined in: [packages/typescript/ai/src/types.ts:704](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L704) +Defined in: [packages/typescript/ai/src/types.ts:705](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L705) Current iteration count (0-indexed) @@ -44,6 +44,6 @@ messages: ModelMessage< | null>[]; ``` -Defined in: [packages/typescript/ai/src/types.ts:706](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L706) +Defined in: [packages/typescript/ai/src/types.ts:707](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L707) Current messages array diff --git a/docs/reference/interfaces/ApprovalRequestedEvent.md b/docs/reference/interfaces/ApprovalRequestedEvent.md index ae3340884..04ee822e5 100644 --- a/docs/reference/interfaces/ApprovalRequestedEvent.md +++ b/docs/reference/interfaces/ApprovalRequestedEvent.md @@ -5,7 +5,7 @@ title: ApprovalRequestedEvent # Interface: ApprovalRequestedEvent -Defined in: [packages/typescript/ai/src/types.ts:1195](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1195) +Defined in: [packages/typescript/ai/src/types.ts:1196](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1196) Emitted when a server tool requires approval before execution. The agent loop yields this and pauses — `structured-output.complete` will not fire @@ -31,7 +31,7 @@ for that run. The shape is fixed by the orchestrator's tool-approval flow optional model: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1147](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1147) +Defined in: [packages/typescript/ai/src/types.ts:1148](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1148) Model identifier for multi-model support @@ -47,7 +47,7 @@ Model identifier for multi-model support name: "approval-requested"; ``` -Defined in: [packages/typescript/ai/src/types.ts:1196](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1196) +Defined in: [packages/typescript/ai/src/types.ts:1197](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1197) #### Overrides @@ -63,7 +63,7 @@ CustomEvent.name value: object; ``` -Defined in: [packages/typescript/ai/src/types.ts:1197](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1197) +Defined in: [packages/typescript/ai/src/types.ts:1198](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1198) #### approval diff --git a/docs/reference/interfaces/AudioGenerationOptions.md b/docs/reference/interfaces/AudioGenerationOptions.md index 59edbeefe..2eee2baea 100644 --- a/docs/reference/interfaces/AudioGenerationOptions.md +++ b/docs/reference/interfaces/AudioGenerationOptions.md @@ -5,7 +5,7 @@ title: AudioGenerationOptions # Interface: AudioGenerationOptions\ -Defined in: [packages/typescript/ai/src/types.ts:1489](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1489) +Defined in: [packages/typescript/ai/src/types.ts:1490](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1490) Options for audio generation (music, sound effects, etc.). These are the common options supported across providers. @@ -24,7 +24,7 @@ These are the common options supported across providers. optional duration: number; ``` -Defined in: [packages/typescript/ai/src/types.ts:1497](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1497) +Defined in: [packages/typescript/ai/src/types.ts:1498](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1498) Desired duration in seconds @@ -36,7 +36,7 @@ Desired duration in seconds logger: InternalLogger; ``` -Defined in: [packages/typescript/ai/src/types.ts:1505](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1505) +Defined in: [packages/typescript/ai/src/types.ts:1506](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1506) Internal logger threaded from the generateAudio() entry point. Adapters must call logger.request() before the SDK call and logger.errors() in @@ -50,7 +50,7 @@ catch blocks. model: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1493](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1493) +Defined in: [packages/typescript/ai/src/types.ts:1494](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1494) The model to use for audio generation @@ -62,7 +62,7 @@ The model to use for audio generation optional modelOptions: TProviderOptions; ``` -Defined in: [packages/typescript/ai/src/types.ts:1499](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1499) +Defined in: [packages/typescript/ai/src/types.ts:1500](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1500) Model-specific options for audio generation @@ -74,6 +74,6 @@ Model-specific options for audio generation prompt: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1495](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1495) +Defined in: [packages/typescript/ai/src/types.ts:1496](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1496) Text description of the desired audio diff --git a/docs/reference/interfaces/AudioGenerationResult.md b/docs/reference/interfaces/AudioGenerationResult.md index 1643aa73e..eacc87acd 100644 --- a/docs/reference/interfaces/AudioGenerationResult.md +++ b/docs/reference/interfaces/AudioGenerationResult.md @@ -5,7 +5,7 @@ title: AudioGenerationResult # Interface: AudioGenerationResult -Defined in: [packages/typescript/ai/src/types.ts:1521](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1521) +Defined in: [packages/typescript/ai/src/types.ts:1522](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1522) Result of audio generation @@ -17,7 +17,7 @@ Result of audio generation audio: GeneratedAudio; ``` -Defined in: [packages/typescript/ai/src/types.ts:1527](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1527) +Defined in: [packages/typescript/ai/src/types.ts:1528](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1528) The generated audio @@ -29,7 +29,7 @@ The generated audio id: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1523](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1523) +Defined in: [packages/typescript/ai/src/types.ts:1524](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1524) Unique identifier for the generation @@ -41,7 +41,7 @@ Unique identifier for the generation model: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1525](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1525) +Defined in: [packages/typescript/ai/src/types.ts:1526](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1526) Model used for generation @@ -53,7 +53,7 @@ Model used for generation optional usage: object; ``` -Defined in: [packages/typescript/ai/src/types.ts:1529](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1529) +Defined in: [packages/typescript/ai/src/types.ts:1530](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1530) Token usage information (if available) diff --git a/docs/reference/interfaces/AudioPart.md b/docs/reference/interfaces/AudioPart.md index 47459e925..df3c3c8ad 100644 --- a/docs/reference/interfaces/AudioPart.md +++ b/docs/reference/interfaces/AudioPart.md @@ -5,7 +5,7 @@ title: AudioPart # Interface: AudioPart\ -Defined in: [packages/typescript/ai/src/types.ts:225](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L225) +Defined in: [packages/typescript/ai/src/types.ts:226](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L226) Audio content part for multimodal messages. @@ -25,7 +25,7 @@ Provider-specific metadata type optional metadata: TMetadata; ``` -Defined in: [packages/typescript/ai/src/types.ts:230](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L230) +Defined in: [packages/typescript/ai/src/types.ts:231](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L231) Provider-specific metadata (e.g., format, sample rate) @@ -37,7 +37,7 @@ Provider-specific metadata (e.g., format, sample rate) source: ContentPartSource; ``` -Defined in: [packages/typescript/ai/src/types.ts:228](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L228) +Defined in: [packages/typescript/ai/src/types.ts:229](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L229) Source of the audio content @@ -49,4 +49,4 @@ Source of the audio content type: "audio"; ``` -Defined in: [packages/typescript/ai/src/types.ts:226](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L226) +Defined in: [packages/typescript/ai/src/types.ts:227](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L227) diff --git a/docs/reference/interfaces/BaseAGUIEvent.md b/docs/reference/interfaces/BaseAGUIEvent.md index eb492bbdb..66e5fdfac 100644 --- a/docs/reference/interfaces/BaseAGUIEvent.md +++ b/docs/reference/interfaces/BaseAGUIEvent.md @@ -5,7 +5,7 @@ title: BaseAGUIEvent # Interface: BaseAGUIEvent -Defined in: [packages/typescript/ai/src/types.ts:890](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L890) +Defined in: [packages/typescript/ai/src/types.ts:891](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L891) Base structure for AG-UI events. Extends @ag-ui/core BaseEvent with TanStack AI additions. @@ -31,6 +31,6 @@ TanStack AI adds: `model?` optional model: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:892](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L892) +Defined in: [packages/typescript/ai/src/types.ts:893](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L893) Model identifier for multi-model support diff --git a/docs/reference/interfaces/ContentPartDataSource.md b/docs/reference/interfaces/ContentPartDataSource.md index a3576c7c1..c0977cd4c 100644 --- a/docs/reference/interfaces/ContentPartDataSource.md +++ b/docs/reference/interfaces/ContentPartDataSource.md @@ -5,7 +5,7 @@ title: ContentPartDataSource # Interface: ContentPartDataSource -Defined in: [packages/typescript/ai/src/types.ts:166](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L166) +Defined in: [packages/typescript/ai/src/types.ts:167](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L167) Source specification for inline data content (base64). Requires a mimeType to ensure providers receive proper content type information. @@ -18,7 +18,7 @@ Requires a mimeType to ensure providers receive proper content type information. mimeType: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:179](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L179) +Defined in: [packages/typescript/ai/src/types.ts:180](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L180) The MIME type of the content (e.g., 'image/png', 'audio/wav'). Required for data sources to ensure proper handling by providers. @@ -31,7 +31,7 @@ Required for data sources to ensure proper handling by providers. type: "data"; ``` -Defined in: [packages/typescript/ai/src/types.ts:170](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L170) +Defined in: [packages/typescript/ai/src/types.ts:171](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L171) Indicates this is inline data content. @@ -43,6 +43,6 @@ Indicates this is inline data content. value: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:174](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L174) +Defined in: [packages/typescript/ai/src/types.ts:175](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L175) The base64-encoded content value. diff --git a/docs/reference/interfaces/ContentPartUrlSource.md b/docs/reference/interfaces/ContentPartUrlSource.md index 48596bcfa..fad2b1764 100644 --- a/docs/reference/interfaces/ContentPartUrlSource.md +++ b/docs/reference/interfaces/ContentPartUrlSource.md @@ -5,7 +5,7 @@ title: ContentPartUrlSource # Interface: ContentPartUrlSource -Defined in: [packages/typescript/ai/src/types.ts:186](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L186) +Defined in: [packages/typescript/ai/src/types.ts:187](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L187) Source specification for URL-based content. mimeType is optional as it can often be inferred from the URL or response headers. @@ -18,7 +18,7 @@ mimeType is optional as it can often be inferred from the URL or response header optional mimeType: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:198](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L198) +Defined in: [packages/typescript/ai/src/types.ts:199](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L199) Optional MIME type hint for cases where providers can't infer it from the URL. @@ -30,7 +30,7 @@ Optional MIME type hint for cases where providers can't infer it from the URL. type: "url"; ``` -Defined in: [packages/typescript/ai/src/types.ts:190](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L190) +Defined in: [packages/typescript/ai/src/types.ts:191](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L191) Indicates this is URL-referenced content. @@ -42,6 +42,6 @@ Indicates this is URL-referenced content. value: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:194](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L194) +Defined in: [packages/typescript/ai/src/types.ts:195](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L195) HTTP(S) URL or data URI pointing to the content. diff --git a/docs/reference/interfaces/CustomEvent.md b/docs/reference/interfaces/CustomEvent.md index 3ae9b180f..9d1c4aaca 100644 --- a/docs/reference/interfaces/CustomEvent.md +++ b/docs/reference/interfaces/CustomEvent.md @@ -5,7 +5,7 @@ title: CustomEvent # Interface: CustomEvent -Defined in: [packages/typescript/ai/src/types.ts:1145](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1145) +Defined in: [packages/typescript/ai/src/types.ts:1146](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1146) Custom event for extensibility. @@ -37,6 +37,6 @@ TanStack AI adds: `model?` optional model: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1147](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1147) +Defined in: [packages/typescript/ai/src/types.ts:1148](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1148) Model identifier for multi-model support diff --git a/docs/reference/interfaces/DefaultMessageMetadataByModality.md b/docs/reference/interfaces/DefaultMessageMetadataByModality.md index afd161320..bfeeb4401 100644 --- a/docs/reference/interfaces/DefaultMessageMetadataByModality.md +++ b/docs/reference/interfaces/DefaultMessageMetadataByModality.md @@ -5,7 +5,7 @@ title: DefaultMessageMetadataByModality # Interface: DefaultMessageMetadataByModality -Defined in: [packages/typescript/ai/src/types.ts:1741](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1741) +Defined in: [packages/typescript/ai/src/types.ts:1742](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1742) Default metadata type for adapters that don't define custom metadata. Uses unknown for all modalities. @@ -18,7 +18,7 @@ Uses unknown for all modalities. audio: unknown; ``` -Defined in: [packages/typescript/ai/src/types.ts:1744](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1744) +Defined in: [packages/typescript/ai/src/types.ts:1745](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1745) *** @@ -28,7 +28,7 @@ Defined in: [packages/typescript/ai/src/types.ts:1744](https://github.com/TanSta document: unknown; ``` -Defined in: [packages/typescript/ai/src/types.ts:1746](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1746) +Defined in: [packages/typescript/ai/src/types.ts:1747](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1747) *** @@ -38,7 +38,7 @@ Defined in: [packages/typescript/ai/src/types.ts:1746](https://github.com/TanSta image: unknown; ``` -Defined in: [packages/typescript/ai/src/types.ts:1743](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1743) +Defined in: [packages/typescript/ai/src/types.ts:1744](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1744) *** @@ -48,7 +48,7 @@ Defined in: [packages/typescript/ai/src/types.ts:1743](https://github.com/TanSta text: unknown; ``` -Defined in: [packages/typescript/ai/src/types.ts:1742](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1742) +Defined in: [packages/typescript/ai/src/types.ts:1743](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1743) *** @@ -58,4 +58,4 @@ Defined in: [packages/typescript/ai/src/types.ts:1742](https://github.com/TanSta video: unknown; ``` -Defined in: [packages/typescript/ai/src/types.ts:1745](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1745) +Defined in: [packages/typescript/ai/src/types.ts:1746](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1746) diff --git a/docs/reference/interfaces/DocumentPart.md b/docs/reference/interfaces/DocumentPart.md index 847ec3c4a..afa56d6d1 100644 --- a/docs/reference/interfaces/DocumentPart.md +++ b/docs/reference/interfaces/DocumentPart.md @@ -5,7 +5,7 @@ title: DocumentPart # Interface: DocumentPart\ -Defined in: [packages/typescript/ai/src/types.ts:249](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L249) +Defined in: [packages/typescript/ai/src/types.ts:250](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L250) Document content part for multimodal messages (e.g., PDFs). @@ -25,7 +25,7 @@ Provider-specific metadata type (e.g., Anthropic's media_type) optional metadata: TMetadata; ``` -Defined in: [packages/typescript/ai/src/types.ts:254](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L254) +Defined in: [packages/typescript/ai/src/types.ts:255](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L255) Provider-specific metadata (e.g., media_type for PDFs) @@ -37,7 +37,7 @@ Provider-specific metadata (e.g., media_type for PDFs) source: ContentPartSource; ``` -Defined in: [packages/typescript/ai/src/types.ts:252](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L252) +Defined in: [packages/typescript/ai/src/types.ts:253](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L253) Source of the document content @@ -49,4 +49,4 @@ Source of the document content type: "document"; ``` -Defined in: [packages/typescript/ai/src/types.ts:250](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L250) +Defined in: [packages/typescript/ai/src/types.ts:251](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L251) diff --git a/docs/reference/interfaces/ImageGenerationOptions.md b/docs/reference/interfaces/ImageGenerationOptions.md index 670054dc1..4f2b44fa8 100644 --- a/docs/reference/interfaces/ImageGenerationOptions.md +++ b/docs/reference/interfaces/ImageGenerationOptions.md @@ -5,7 +5,7 @@ title: ImageGenerationOptions # Interface: ImageGenerationOptions\ -Defined in: [packages/typescript/ai/src/types.ts:1416](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1416) +Defined in: [packages/typescript/ai/src/types.ts:1417](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1417) Options for image generation. These are the common options supported across providers. @@ -28,7 +28,7 @@ These are the common options supported across providers. logger: InternalLogger; ``` -Defined in: [packages/typescript/ai/src/types.ts:1434](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1434) +Defined in: [packages/typescript/ai/src/types.ts:1435](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1435) Internal logger threaded from the generateImage() entry point. Adapters must call logger.request() before the SDK call and logger.errors() in catch blocks. @@ -41,7 +41,7 @@ call logger.request() before the SDK call and logger.errors() in catch blocks. model: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1421](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1421) +Defined in: [packages/typescript/ai/src/types.ts:1422](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1422) The model to use for image generation @@ -53,7 +53,7 @@ The model to use for image generation optional modelOptions: TProviderOptions; ``` -Defined in: [packages/typescript/ai/src/types.ts:1429](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1429) +Defined in: [packages/typescript/ai/src/types.ts:1430](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1430) Model-specific options for image generation @@ -65,7 +65,7 @@ Model-specific options for image generation optional numberOfImages: number; ``` -Defined in: [packages/typescript/ai/src/types.ts:1425](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1425) +Defined in: [packages/typescript/ai/src/types.ts:1426](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1426) Number of images to generate (default: 1) @@ -77,7 +77,7 @@ Number of images to generate (default: 1) prompt: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1423](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1423) +Defined in: [packages/typescript/ai/src/types.ts:1424](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1424) Text description of the desired image(s) @@ -89,6 +89,6 @@ Text description of the desired image(s) optional size: TSize; ``` -Defined in: [packages/typescript/ai/src/types.ts:1427](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1427) +Defined in: [packages/typescript/ai/src/types.ts:1428](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1428) Image size in WIDTHxHEIGHT format (e.g., "1024x1024") diff --git a/docs/reference/interfaces/ImageGenerationResult.md b/docs/reference/interfaces/ImageGenerationResult.md index 1d8a003af..d0a3a42ca 100644 --- a/docs/reference/interfaces/ImageGenerationResult.md +++ b/docs/reference/interfaces/ImageGenerationResult.md @@ -5,7 +5,7 @@ title: ImageGenerationResult # Interface: ImageGenerationResult -Defined in: [packages/typescript/ai/src/types.ts:1466](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1466) +Defined in: [packages/typescript/ai/src/types.ts:1467](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1467) Result of image generation @@ -17,7 +17,7 @@ Result of image generation id: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1468](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1468) +Defined in: [packages/typescript/ai/src/types.ts:1469](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1469) Unique identifier for the generation @@ -29,7 +29,7 @@ Unique identifier for the generation images: GeneratedImage[]; ``` -Defined in: [packages/typescript/ai/src/types.ts:1472](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1472) +Defined in: [packages/typescript/ai/src/types.ts:1473](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1473) Array of generated images @@ -41,7 +41,7 @@ Array of generated images model: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1470](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1470) +Defined in: [packages/typescript/ai/src/types.ts:1471](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1471) Model used for generation @@ -53,7 +53,7 @@ Model used for generation optional usage: object; ``` -Defined in: [packages/typescript/ai/src/types.ts:1474](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1474) +Defined in: [packages/typescript/ai/src/types.ts:1475](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1475) Token usage information (if available) diff --git a/docs/reference/interfaces/ImagePart.md b/docs/reference/interfaces/ImagePart.md index 66a9ca8c4..57bbc77f9 100644 --- a/docs/reference/interfaces/ImagePart.md +++ b/docs/reference/interfaces/ImagePart.md @@ -5,7 +5,7 @@ title: ImagePart # Interface: ImagePart\ -Defined in: [packages/typescript/ai/src/types.ts:213](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L213) +Defined in: [packages/typescript/ai/src/types.ts:214](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L214) Image content part for multimodal messages. @@ -25,7 +25,7 @@ Provider-specific metadata type (e.g., OpenAI's detail level) optional metadata: TMetadata; ``` -Defined in: [packages/typescript/ai/src/types.ts:218](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L218) +Defined in: [packages/typescript/ai/src/types.ts:219](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L219) Provider-specific metadata (e.g., OpenAI's detail: 'auto' | 'low' | 'high') @@ -37,7 +37,7 @@ Provider-specific metadata (e.g., OpenAI's detail: 'auto' | 'low' | 'high') source: ContentPartSource; ``` -Defined in: [packages/typescript/ai/src/types.ts:216](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L216) +Defined in: [packages/typescript/ai/src/types.ts:217](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L217) Source of the image content @@ -49,4 +49,4 @@ Source of the image content type: "image"; ``` -Defined in: [packages/typescript/ai/src/types.ts:214](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L214) +Defined in: [packages/typescript/ai/src/types.ts:215](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L215) diff --git a/docs/reference/interfaces/JSONSchema.md b/docs/reference/interfaces/JSONSchema.md index b6d0b5155..2fcb41550 100644 --- a/docs/reference/interfaces/JSONSchema.md +++ b/docs/reference/interfaces/JSONSchema.md @@ -5,7 +5,7 @@ title: JSONSchema # Interface: JSONSchema -Defined in: [packages/typescript/ai/src/types.ts:56](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L56) +Defined in: [packages/typescript/ai/src/types.ts:57](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L57) JSON Schema type for defining tool input/output schemas as raw JSON Schema objects. This allows tools to be defined without schema libraries when you have JSON Schema definitions available. @@ -24,7 +24,7 @@ This allows tools to be defined without schema libraries when you have JSON Sche optional $defs: Record; ``` -Defined in: [packages/typescript/ai/src/types.ts:66](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L66) +Defined in: [packages/typescript/ai/src/types.ts:67](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L67) *** @@ -34,7 +34,7 @@ Defined in: [packages/typescript/ai/src/types.ts:66](https://github.com/TanStack optional $ref: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:65](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L65) +Defined in: [packages/typescript/ai/src/types.ts:66](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L66) *** @@ -44,7 +44,7 @@ Defined in: [packages/typescript/ai/src/types.ts:65](https://github.com/TanStack optional additionalItems: boolean | JSONSchema; ``` -Defined in: [packages/typescript/ai/src/types.ts:87](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L87) +Defined in: [packages/typescript/ai/src/types.ts:88](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L88) *** @@ -54,7 +54,7 @@ Defined in: [packages/typescript/ai/src/types.ts:87](https://github.com/TanStack optional additionalProperties: boolean | JSONSchema; ``` -Defined in: [packages/typescript/ai/src/types.ts:86](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L86) +Defined in: [packages/typescript/ai/src/types.ts:87](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L87) *** @@ -64,7 +64,7 @@ Defined in: [packages/typescript/ai/src/types.ts:86](https://github.com/TanStack optional allOf: JSONSchema[]; ``` -Defined in: [packages/typescript/ai/src/types.ts:68](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L68) +Defined in: [packages/typescript/ai/src/types.ts:69](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L69) *** @@ -74,7 +74,7 @@ Defined in: [packages/typescript/ai/src/types.ts:68](https://github.com/TanStack optional anyOf: JSONSchema[]; ``` -Defined in: [packages/typescript/ai/src/types.ts:69](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L69) +Defined in: [packages/typescript/ai/src/types.ts:70](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L70) *** @@ -84,7 +84,7 @@ Defined in: [packages/typescript/ai/src/types.ts:69](https://github.com/TanStack optional const: unknown; ``` -Defined in: [packages/typescript/ai/src/types.ts:62](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L62) +Defined in: [packages/typescript/ai/src/types.ts:63](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L63) *** @@ -94,7 +94,7 @@ Defined in: [packages/typescript/ai/src/types.ts:62](https://github.com/TanStack optional default: unknown; ``` -Defined in: [packages/typescript/ai/src/types.ts:64](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L64) +Defined in: [packages/typescript/ai/src/types.ts:65](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L65) *** @@ -104,7 +104,7 @@ Defined in: [packages/typescript/ai/src/types.ts:64](https://github.com/TanStack optional definitions: Record; ``` -Defined in: [packages/typescript/ai/src/types.ts:67](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L67) +Defined in: [packages/typescript/ai/src/types.ts:68](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L68) *** @@ -114,7 +114,7 @@ Defined in: [packages/typescript/ai/src/types.ts:67](https://github.com/TanStack optional description: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:63](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L63) +Defined in: [packages/typescript/ai/src/types.ts:64](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L64) *** @@ -124,7 +124,7 @@ Defined in: [packages/typescript/ai/src/types.ts:63](https://github.com/TanStack optional else: JSONSchema; ``` -Defined in: [packages/typescript/ai/src/types.ts:74](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L74) +Defined in: [packages/typescript/ai/src/types.ts:75](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L75) *** @@ -134,7 +134,7 @@ Defined in: [packages/typescript/ai/src/types.ts:74](https://github.com/TanStack optional enum: unknown[]; ``` -Defined in: [packages/typescript/ai/src/types.ts:61](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L61) +Defined in: [packages/typescript/ai/src/types.ts:62](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L62) *** @@ -144,7 +144,7 @@ Defined in: [packages/typescript/ai/src/types.ts:61](https://github.com/TanStack optional examples: unknown[]; ``` -Defined in: [packages/typescript/ai/src/types.ts:93](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L93) +Defined in: [packages/typescript/ai/src/types.ts:94](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L94) *** @@ -154,7 +154,7 @@ Defined in: [packages/typescript/ai/src/types.ts:93](https://github.com/TanStack optional exclusiveMaximum: number; ``` -Defined in: [packages/typescript/ai/src/types.ts:78](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L78) +Defined in: [packages/typescript/ai/src/types.ts:79](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L79) *** @@ -164,7 +164,7 @@ Defined in: [packages/typescript/ai/src/types.ts:78](https://github.com/TanStack optional exclusiveMinimum: number; ``` -Defined in: [packages/typescript/ai/src/types.ts:77](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L77) +Defined in: [packages/typescript/ai/src/types.ts:78](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L78) *** @@ -174,7 +174,7 @@ Defined in: [packages/typescript/ai/src/types.ts:77](https://github.com/TanStack optional format: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:82](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L82) +Defined in: [packages/typescript/ai/src/types.ts:83](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L83) *** @@ -184,7 +184,7 @@ Defined in: [packages/typescript/ai/src/types.ts:82](https://github.com/TanStack optional if: JSONSchema; ``` -Defined in: [packages/typescript/ai/src/types.ts:72](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L72) +Defined in: [packages/typescript/ai/src/types.ts:73](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L73) *** @@ -194,7 +194,7 @@ Defined in: [packages/typescript/ai/src/types.ts:72](https://github.com/TanStack optional items: JSONSchema | JSONSchema[]; ``` -Defined in: [packages/typescript/ai/src/types.ts:59](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L59) +Defined in: [packages/typescript/ai/src/types.ts:60](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L60) *** @@ -204,7 +204,7 @@ Defined in: [packages/typescript/ai/src/types.ts:59](https://github.com/TanStack optional maximum: number; ``` -Defined in: [packages/typescript/ai/src/types.ts:76](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L76) +Defined in: [packages/typescript/ai/src/types.ts:77](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L77) *** @@ -214,7 +214,7 @@ Defined in: [packages/typescript/ai/src/types.ts:76](https://github.com/TanStack optional maxItems: number; ``` -Defined in: [packages/typescript/ai/src/types.ts:84](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L84) +Defined in: [packages/typescript/ai/src/types.ts:85](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L85) *** @@ -224,7 +224,7 @@ Defined in: [packages/typescript/ai/src/types.ts:84](https://github.com/TanStack optional maxLength: number; ``` -Defined in: [packages/typescript/ai/src/types.ts:80](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L80) +Defined in: [packages/typescript/ai/src/types.ts:81](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L81) *** @@ -234,7 +234,7 @@ Defined in: [packages/typescript/ai/src/types.ts:80](https://github.com/TanStack optional maxProperties: number; ``` -Defined in: [packages/typescript/ai/src/types.ts:91](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L91) +Defined in: [packages/typescript/ai/src/types.ts:92](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L92) *** @@ -244,7 +244,7 @@ Defined in: [packages/typescript/ai/src/types.ts:91](https://github.com/TanStack optional minimum: number; ``` -Defined in: [packages/typescript/ai/src/types.ts:75](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L75) +Defined in: [packages/typescript/ai/src/types.ts:76](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L76) *** @@ -254,7 +254,7 @@ Defined in: [packages/typescript/ai/src/types.ts:75](https://github.com/TanStack optional minItems: number; ``` -Defined in: [packages/typescript/ai/src/types.ts:83](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L83) +Defined in: [packages/typescript/ai/src/types.ts:84](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L84) *** @@ -264,7 +264,7 @@ Defined in: [packages/typescript/ai/src/types.ts:83](https://github.com/TanStack optional minLength: number; ``` -Defined in: [packages/typescript/ai/src/types.ts:79](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L79) +Defined in: [packages/typescript/ai/src/types.ts:80](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L80) *** @@ -274,7 +274,7 @@ Defined in: [packages/typescript/ai/src/types.ts:79](https://github.com/TanStack optional minProperties: number; ``` -Defined in: [packages/typescript/ai/src/types.ts:90](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L90) +Defined in: [packages/typescript/ai/src/types.ts:91](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L91) *** @@ -284,7 +284,7 @@ Defined in: [packages/typescript/ai/src/types.ts:90](https://github.com/TanStack optional not: JSONSchema; ``` -Defined in: [packages/typescript/ai/src/types.ts:71](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L71) +Defined in: [packages/typescript/ai/src/types.ts:72](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L72) *** @@ -294,7 +294,7 @@ Defined in: [packages/typescript/ai/src/types.ts:71](https://github.com/TanStack optional oneOf: JSONSchema[]; ``` -Defined in: [packages/typescript/ai/src/types.ts:70](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L70) +Defined in: [packages/typescript/ai/src/types.ts:71](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L71) *** @@ -304,7 +304,7 @@ Defined in: [packages/typescript/ai/src/types.ts:70](https://github.com/TanStack optional pattern: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:81](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L81) +Defined in: [packages/typescript/ai/src/types.ts:82](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L82) *** @@ -314,7 +314,7 @@ Defined in: [packages/typescript/ai/src/types.ts:81](https://github.com/TanStack optional patternProperties: Record; ``` -Defined in: [packages/typescript/ai/src/types.ts:88](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L88) +Defined in: [packages/typescript/ai/src/types.ts:89](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L89) *** @@ -324,7 +324,7 @@ Defined in: [packages/typescript/ai/src/types.ts:88](https://github.com/TanStack optional properties: Record; ``` -Defined in: [packages/typescript/ai/src/types.ts:58](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L58) +Defined in: [packages/typescript/ai/src/types.ts:59](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L59) *** @@ -334,7 +334,7 @@ Defined in: [packages/typescript/ai/src/types.ts:58](https://github.com/TanStack optional propertyNames: JSONSchema; ``` -Defined in: [packages/typescript/ai/src/types.ts:89](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L89) +Defined in: [packages/typescript/ai/src/types.ts:90](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L90) *** @@ -344,7 +344,7 @@ Defined in: [packages/typescript/ai/src/types.ts:89](https://github.com/TanStack optional required: string[]; ``` -Defined in: [packages/typescript/ai/src/types.ts:60](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L60) +Defined in: [packages/typescript/ai/src/types.ts:61](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L61) *** @@ -354,7 +354,7 @@ Defined in: [packages/typescript/ai/src/types.ts:60](https://github.com/TanStack optional then: JSONSchema; ``` -Defined in: [packages/typescript/ai/src/types.ts:73](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L73) +Defined in: [packages/typescript/ai/src/types.ts:74](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L74) *** @@ -364,7 +364,7 @@ Defined in: [packages/typescript/ai/src/types.ts:73](https://github.com/TanStack optional title: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:92](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L92) +Defined in: [packages/typescript/ai/src/types.ts:93](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L93) *** @@ -374,7 +374,7 @@ Defined in: [packages/typescript/ai/src/types.ts:92](https://github.com/TanStack optional type: string | string[]; ``` -Defined in: [packages/typescript/ai/src/types.ts:57](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L57) +Defined in: [packages/typescript/ai/src/types.ts:58](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L58) *** @@ -384,4 +384,4 @@ Defined in: [packages/typescript/ai/src/types.ts:57](https://github.com/TanStack optional uniqueItems: boolean; ``` -Defined in: [packages/typescript/ai/src/types.ts:85](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L85) +Defined in: [packages/typescript/ai/src/types.ts:86](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L86) diff --git a/docs/reference/interfaces/MessagesSnapshotEvent.md b/docs/reference/interfaces/MessagesSnapshotEvent.md index a335df929..28c23743f 100644 --- a/docs/reference/interfaces/MessagesSnapshotEvent.md +++ b/docs/reference/interfaces/MessagesSnapshotEvent.md @@ -5,7 +5,7 @@ title: MessagesSnapshotEvent # Interface: MessagesSnapshotEvent -Defined in: [packages/typescript/ai/src/types.ts:1107](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1107) +Defined in: [packages/typescript/ai/src/types.ts:1108](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1108) Emitted to provide a snapshot of all messages in a conversation. @@ -36,6 +36,6 @@ Use converters to transform to/from TanStack UIMessage format. optional model: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1109](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1109) +Defined in: [packages/typescript/ai/src/types.ts:1110](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1110) Model identifier for multi-model support diff --git a/docs/reference/interfaces/ModelMessage.md b/docs/reference/interfaces/ModelMessage.md index 2020904c7..15f4a4e43 100644 --- a/docs/reference/interfaces/ModelMessage.md +++ b/docs/reference/interfaces/ModelMessage.md @@ -5,7 +5,7 @@ title: ModelMessage # Interface: ModelMessage\ -Defined in: [packages/typescript/ai/src/types.ts:312](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L312) +Defined in: [packages/typescript/ai/src/types.ts:313](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L313) ## Type Parameters @@ -21,7 +21,7 @@ Defined in: [packages/typescript/ai/src/types.ts:312](https://github.com/TanStac content: TContent; ``` -Defined in: [packages/typescript/ai/src/types.ts:319](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L319) +Defined in: [packages/typescript/ai/src/types.ts:320](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L320) *** @@ -31,7 +31,7 @@ Defined in: [packages/typescript/ai/src/types.ts:319](https://github.com/TanStac optional name: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:320](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L320) +Defined in: [packages/typescript/ai/src/types.ts:321](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L321) *** @@ -41,7 +41,7 @@ Defined in: [packages/typescript/ai/src/types.ts:320](https://github.com/TanStac role: "user" | "assistant" | "tool"; ``` -Defined in: [packages/typescript/ai/src/types.ts:318](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L318) +Defined in: [packages/typescript/ai/src/types.ts:319](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L319) *** @@ -51,7 +51,7 @@ Defined in: [packages/typescript/ai/src/types.ts:318](https://github.com/TanStac optional thinking: object[]; ``` -Defined in: [packages/typescript/ai/src/types.ts:323](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L323) +Defined in: [packages/typescript/ai/src/types.ts:324](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L324) #### content @@ -73,7 +73,7 @@ optional signature: string; optional toolCallId: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:322](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L322) +Defined in: [packages/typescript/ai/src/types.ts:323](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L323) *** @@ -83,4 +83,4 @@ Defined in: [packages/typescript/ai/src/types.ts:322](https://github.com/TanStac optional toolCalls: ToolCall[]; ``` -Defined in: [packages/typescript/ai/src/types.ts:321](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L321) +Defined in: [packages/typescript/ai/src/types.ts:322](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L322) diff --git a/docs/reference/interfaces/ProviderTool.md b/docs/reference/interfaces/ProviderTool.md index a257fcf77..7034dd9f2 100644 --- a/docs/reference/interfaces/ProviderTool.md +++ b/docs/reference/interfaces/ProviderTool.md @@ -65,7 +65,7 @@ Defined in: [packages/typescript/ai/src/tools/provider-tool.ts:24](https://githu description: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:509](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L509) +Defined in: [packages/typescript/ai/src/types.ts:510](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L510) Clear description of what the tool does. @@ -90,7 +90,7 @@ Be specific about what the tool does, what parameters it needs, and what it retu optional execute: (args, context?) => any; ``` -Defined in: [packages/typescript/ai/src/types.ts:589](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L589) +Defined in: [packages/typescript/ai/src/types.ts:590](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L590) Optional function to execute when the model calls this tool. @@ -138,7 +138,7 @@ execute: async (args) => { optional inputSchema: SchemaInput; ``` -Defined in: [packages/typescript/ai/src/types.ts:549](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L549) +Defined in: [packages/typescript/ai/src/types.ts:550](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L550) Schema describing the tool's input parameters. @@ -196,7 +196,7 @@ type({ optional lazy: boolean; ``` -Defined in: [packages/typescript/ai/src/types.ts:597](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L597) +Defined in: [packages/typescript/ai/src/types.ts:598](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L598) If true, this tool is lazy and will only be sent to the LLM after being discovered via the lazy tool discovery mechanism. Only meaningful when used with chat(). @@ -212,7 +212,7 @@ If true, this tool is lazy and will only be sent to the LLM after being discover optional metadata: Record; ``` -Defined in: [packages/typescript/ai/src/types.ts:600](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L600) +Defined in: [packages/typescript/ai/src/types.ts:601](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L601) Additional metadata for adapters or custom extensions @@ -228,7 +228,7 @@ Additional metadata for adapters or custom extensions name: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:499](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L499) +Defined in: [packages/typescript/ai/src/types.ts:500](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L500) Unique name of the tool (used by the model to call it). @@ -253,7 +253,7 @@ Must be unique within the tools array. optional needsApproval: boolean; ``` -Defined in: [packages/typescript/ai/src/types.ts:594](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L594) +Defined in: [packages/typescript/ai/src/types.ts:595](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L595) If true, tool execution requires user approval before running. Works with both server and client tools. @@ -269,7 +269,7 @@ If true, tool execution requires user approval before running. Works with both s optional outputSchema: SchemaInput; ``` -Defined in: [packages/typescript/ai/src/types.ts:570](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L570) +Defined in: [packages/typescript/ai/src/types.ts:571](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L571) Optional schema for validating tool output. diff --git a/docs/reference/interfaces/ReasoningEncryptedValueEvent.md b/docs/reference/interfaces/ReasoningEncryptedValueEvent.md index c5d32cba8..b96ae838f 100644 --- a/docs/reference/interfaces/ReasoningEncryptedValueEvent.md +++ b/docs/reference/interfaces/ReasoningEncryptedValueEvent.md @@ -5,7 +5,7 @@ title: ReasoningEncryptedValueEvent # Interface: ReasoningEncryptedValueEvent -Defined in: [packages/typescript/ai/src/types.ts:1323](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1323) +Defined in: [packages/typescript/ai/src/types.ts:1324](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1324) Emitted for encrypted reasoning values. @@ -30,6 +30,6 @@ TanStack AI adds: `model?` optional model: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1325](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1325) +Defined in: [packages/typescript/ai/src/types.ts:1326](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1326) Model identifier for multi-model support diff --git a/docs/reference/interfaces/ReasoningEndEvent.md b/docs/reference/interfaces/ReasoningEndEvent.md index a1b8d96fb..5492c9858 100644 --- a/docs/reference/interfaces/ReasoningEndEvent.md +++ b/docs/reference/interfaces/ReasoningEndEvent.md @@ -5,7 +5,7 @@ title: ReasoningEndEvent # Interface: ReasoningEndEvent -Defined in: [packages/typescript/ai/src/types.ts:1312](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1312) +Defined in: [packages/typescript/ai/src/types.ts:1313](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1313) Emitted when reasoning ends for a message. @@ -30,6 +30,6 @@ TanStack AI adds: `model?` optional model: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1314](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1314) +Defined in: [packages/typescript/ai/src/types.ts:1315](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1315) Model identifier for multi-model support diff --git a/docs/reference/interfaces/ReasoningMessageContentEvent.md b/docs/reference/interfaces/ReasoningMessageContentEvent.md index e66f0de99..45d1c5a87 100644 --- a/docs/reference/interfaces/ReasoningMessageContentEvent.md +++ b/docs/reference/interfaces/ReasoningMessageContentEvent.md @@ -5,7 +5,7 @@ title: ReasoningMessageContentEvent # Interface: ReasoningMessageContentEvent -Defined in: [packages/typescript/ai/src/types.ts:1290](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1290) +Defined in: [packages/typescript/ai/src/types.ts:1291](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1291) Emitted when reasoning message content is generated. @@ -30,6 +30,6 @@ TanStack AI adds: `model?` optional model: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1292](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1292) +Defined in: [packages/typescript/ai/src/types.ts:1293](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1293) Model identifier for multi-model support diff --git a/docs/reference/interfaces/ReasoningMessageEndEvent.md b/docs/reference/interfaces/ReasoningMessageEndEvent.md index 5c4661c31..3607a4b18 100644 --- a/docs/reference/interfaces/ReasoningMessageEndEvent.md +++ b/docs/reference/interfaces/ReasoningMessageEndEvent.md @@ -5,7 +5,7 @@ title: ReasoningMessageEndEvent # Interface: ReasoningMessageEndEvent -Defined in: [packages/typescript/ai/src/types.ts:1301](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1301) +Defined in: [packages/typescript/ai/src/types.ts:1302](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1302) Emitted when a reasoning message ends. @@ -30,6 +30,6 @@ TanStack AI adds: `model?` optional model: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1303](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1303) +Defined in: [packages/typescript/ai/src/types.ts:1304](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1304) Model identifier for multi-model support diff --git a/docs/reference/interfaces/ReasoningMessageStartEvent.md b/docs/reference/interfaces/ReasoningMessageStartEvent.md index 46c58f7b2..8fbeb2ef6 100644 --- a/docs/reference/interfaces/ReasoningMessageStartEvent.md +++ b/docs/reference/interfaces/ReasoningMessageStartEvent.md @@ -5,7 +5,7 @@ title: ReasoningMessageStartEvent # Interface: ReasoningMessageStartEvent -Defined in: [packages/typescript/ai/src/types.ts:1279](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1279) +Defined in: [packages/typescript/ai/src/types.ts:1280](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1280) Emitted when a reasoning message starts. @@ -30,6 +30,6 @@ TanStack AI adds: `model?` optional model: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1281](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1281) +Defined in: [packages/typescript/ai/src/types.ts:1282](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1282) Model identifier for multi-model support diff --git a/docs/reference/interfaces/ReasoningStartEvent.md b/docs/reference/interfaces/ReasoningStartEvent.md index e38c2ddd1..e39647ca0 100644 --- a/docs/reference/interfaces/ReasoningStartEvent.md +++ b/docs/reference/interfaces/ReasoningStartEvent.md @@ -5,7 +5,7 @@ title: ReasoningStartEvent # Interface: ReasoningStartEvent -Defined in: [packages/typescript/ai/src/types.ts:1268](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1268) +Defined in: [packages/typescript/ai/src/types.ts:1269](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1269) Emitted when reasoning starts for a message. @@ -30,6 +30,6 @@ TanStack AI adds: `model?` optional model: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1270](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1270) +Defined in: [packages/typescript/ai/src/types.ts:1271](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1271) Model identifier for multi-model support diff --git a/docs/reference/interfaces/ResponseFormat.md b/docs/reference/interfaces/ResponseFormat.md index 98650721d..4c0ad5010 100644 --- a/docs/reference/interfaces/ResponseFormat.md +++ b/docs/reference/interfaces/ResponseFormat.md @@ -5,7 +5,7 @@ title: ResponseFormat # Interface: ResponseFormat\ -Defined in: [packages/typescript/ai/src/types.ts:618](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L618) +Defined in: [packages/typescript/ai/src/types.ts:619](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L619) Structured output format specification. @@ -33,7 +33,7 @@ TypeScript type of the expected data structure (for type safety) optional __data: TData; ``` -Defined in: [packages/typescript/ai/src/types.ts:696](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L696) +Defined in: [packages/typescript/ai/src/types.ts:697](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L697) **`Internal`** @@ -50,7 +50,7 @@ Allows the SDK to know what type to expect when parsing the response. optional json_schema: object; ``` -Defined in: [packages/typescript/ai/src/types.ts:635](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L635) +Defined in: [packages/typescript/ai/src/types.ts:636](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L636) JSON schema specification (required when type is "json_schema"). @@ -139,7 +139,7 @@ https://platform.openai.com/docs/guides/structured-outputs#strict-mode type: "json_object" | "json_schema"; ``` -Defined in: [packages/typescript/ai/src/types.ts:627](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L627) +Defined in: [packages/typescript/ai/src/types.ts:628](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L628) Type of structured output. diff --git a/docs/reference/interfaces/RunErrorEvent.md b/docs/reference/interfaces/RunErrorEvent.md index 983527687..4d03019ee 100644 --- a/docs/reference/interfaces/RunErrorEvent.md +++ b/docs/reference/interfaces/RunErrorEvent.md @@ -5,7 +5,7 @@ title: RunErrorEvent # Interface: RunErrorEvent -Defined in: [packages/typescript/ai/src/types.ts:936](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L936) +Defined in: [packages/typescript/ai/src/types.ts:937](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L937) Emitted when an error occurs during a run. @@ -30,7 +30,7 @@ TanStack AI adds: `model?`, `error?` (deprecated nested form) optional error: object; ``` -Defined in: [packages/typescript/ai/src/types.ts:943](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L943) +Defined in: [packages/typescript/ai/src/types.ts:944](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L944) #### ~~code?~~ @@ -57,6 +57,6 @@ Kept for backward compatibility. optional model: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:938](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L938) +Defined in: [packages/typescript/ai/src/types.ts:939](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L939) Model identifier for multi-model support diff --git a/docs/reference/interfaces/RunFinishedEvent.md b/docs/reference/interfaces/RunFinishedEvent.md index 1396492fb..a51c86978 100644 --- a/docs/reference/interfaces/RunFinishedEvent.md +++ b/docs/reference/interfaces/RunFinishedEvent.md @@ -5,7 +5,7 @@ title: RunFinishedEvent # Interface: RunFinishedEvent -Defined in: [packages/typescript/ai/src/types.ts:917](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L917) +Defined in: [packages/typescript/ai/src/types.ts:918](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L918) Emitted when a run completes successfully. @@ -30,7 +30,7 @@ TanStack AI adds: `model?`, `finishReason?`, `usage?` optional finishReason: "length" | "stop" | "content_filter" | "tool_calls" | null; ``` -Defined in: [packages/typescript/ai/src/types.ts:921](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L921) +Defined in: [packages/typescript/ai/src/types.ts:922](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L922) Why the generation stopped @@ -42,7 +42,7 @@ Why the generation stopped optional model: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:919](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L919) +Defined in: [packages/typescript/ai/src/types.ts:920](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L920) Model identifier for multi-model support @@ -54,7 +54,7 @@ Model identifier for multi-model support optional usage: object; ``` -Defined in: [packages/typescript/ai/src/types.ts:923](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L923) +Defined in: [packages/typescript/ai/src/types.ts:924](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L924) Token usage statistics diff --git a/docs/reference/interfaces/RunStartedEvent.md b/docs/reference/interfaces/RunStartedEvent.md index d3b774b01..a5ef6fbf4 100644 --- a/docs/reference/interfaces/RunStartedEvent.md +++ b/docs/reference/interfaces/RunStartedEvent.md @@ -5,7 +5,7 @@ title: RunStartedEvent # Interface: RunStartedEvent -Defined in: [packages/typescript/ai/src/types.ts:906](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L906) +Defined in: [packages/typescript/ai/src/types.ts:907](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L907) Emitted when a run starts. This is the first event in any streaming response. @@ -31,6 +31,6 @@ TanStack AI adds: `model?` optional model: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:908](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L908) +Defined in: [packages/typescript/ai/src/types.ts:909](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L909) Model identifier for multi-model support diff --git a/docs/reference/interfaces/ServerTool.md b/docs/reference/interfaces/ServerTool.md index 8471b6eb6..85a515872 100644 --- a/docs/reference/interfaces/ServerTool.md +++ b/docs/reference/interfaces/ServerTool.md @@ -45,7 +45,7 @@ Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-definition.ts description: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:509](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L509) +Defined in: [packages/typescript/ai/src/types.ts:510](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L510) Clear description of what the tool does. @@ -70,7 +70,7 @@ Be specific about what the tool does, what parameters it needs, and what it retu optional execute: (args, context?) => any; ``` -Defined in: [packages/typescript/ai/src/types.ts:589](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L589) +Defined in: [packages/typescript/ai/src/types.ts:590](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L590) Optional function to execute when the model calls this tool. @@ -118,7 +118,7 @@ execute: async (args) => { optional inputSchema: TInput; ``` -Defined in: [packages/typescript/ai/src/types.ts:549](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L549) +Defined in: [packages/typescript/ai/src/types.ts:550](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L550) Schema describing the tool's input parameters. @@ -176,7 +176,7 @@ type({ optional lazy: boolean; ``` -Defined in: [packages/typescript/ai/src/types.ts:597](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L597) +Defined in: [packages/typescript/ai/src/types.ts:598](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L598) If true, this tool is lazy and will only be sent to the LLM after being discovered via the lazy tool discovery mechanism. Only meaningful when used with chat(). @@ -192,7 +192,7 @@ If true, this tool is lazy and will only be sent to the LLM after being discover optional metadata: Record; ``` -Defined in: [packages/typescript/ai/src/types.ts:600](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L600) +Defined in: [packages/typescript/ai/src/types.ts:601](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L601) Additional metadata for adapters or custom extensions @@ -208,7 +208,7 @@ Additional metadata for adapters or custom extensions name: TName; ``` -Defined in: [packages/typescript/ai/src/types.ts:499](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L499) +Defined in: [packages/typescript/ai/src/types.ts:500](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L500) Unique name of the tool (used by the model to call it). @@ -233,7 +233,7 @@ Must be unique within the tools array. optional needsApproval: boolean; ``` -Defined in: [packages/typescript/ai/src/types.ts:594](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L594) +Defined in: [packages/typescript/ai/src/types.ts:595](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L595) If true, tool execution requires user approval before running. Works with both server and client tools. @@ -249,7 +249,7 @@ If true, tool execution requires user approval before running. Works with both s optional outputSchema: TOutput; ``` -Defined in: [packages/typescript/ai/src/types.ts:570](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L570) +Defined in: [packages/typescript/ai/src/types.ts:571](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L571) Optional schema for validating tool output. diff --git a/docs/reference/interfaces/StateDeltaEvent.md b/docs/reference/interfaces/StateDeltaEvent.md index fccf0d948..5c7e0aeb2 100644 --- a/docs/reference/interfaces/StateDeltaEvent.md +++ b/docs/reference/interfaces/StateDeltaEvent.md @@ -5,7 +5,7 @@ title: StateDeltaEvent # Interface: StateDeltaEvent -Defined in: [packages/typescript/ai/src/types.ts:1134](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1134) +Defined in: [packages/typescript/ai/src/types.ts:1135](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1135) Emitted to provide an incremental state update. @@ -30,6 +30,6 @@ TanStack AI adds: `model?` optional model: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1136](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1136) +Defined in: [packages/typescript/ai/src/types.ts:1137](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1137) Model identifier for multi-model support diff --git a/docs/reference/interfaces/StateSnapshotEvent.md b/docs/reference/interfaces/StateSnapshotEvent.md index 98e82878e..a6af812bc 100644 --- a/docs/reference/interfaces/StateSnapshotEvent.md +++ b/docs/reference/interfaces/StateSnapshotEvent.md @@ -5,7 +5,7 @@ title: StateSnapshotEvent # Interface: StateSnapshotEvent -Defined in: [packages/typescript/ai/src/types.ts:1118](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1118) +Defined in: [packages/typescript/ai/src/types.ts:1119](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1119) Emitted to provide a full state snapshot. @@ -30,7 +30,7 @@ TanStack AI adds: `model?`, `state?` (deprecated alias for snapshot) optional model: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1120](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1120) +Defined in: [packages/typescript/ai/src/types.ts:1121](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1121) Model identifier for multi-model support @@ -42,7 +42,7 @@ Model identifier for multi-model support optional state: Record; ``` -Defined in: [packages/typescript/ai/src/types.ts:1125](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1125) +Defined in: [packages/typescript/ai/src/types.ts:1126](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1126) #### Deprecated diff --git a/docs/reference/interfaces/StepFinishedEvent.md b/docs/reference/interfaces/StepFinishedEvent.md index 5ca35ca04..111dcef4b 100644 --- a/docs/reference/interfaces/StepFinishedEvent.md +++ b/docs/reference/interfaces/StepFinishedEvent.md @@ -5,7 +5,7 @@ title: StepFinishedEvent # Interface: StepFinishedEvent -Defined in: [packages/typescript/ai/src/types.ts:1079](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1079) +Defined in: [packages/typescript/ai/src/types.ts:1080](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1080) Emitted when a thinking/reasoning step finishes. @@ -30,7 +30,7 @@ TanStack AI adds: `model?`, `stepId?` (deprecated alias), `delta?`, `content?` optional content: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1090](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1090) +Defined in: [packages/typescript/ai/src/types.ts:1091](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1091) Full accumulated thinking content (TanStack AI internal) @@ -42,7 +42,7 @@ Full accumulated thinking content (TanStack AI internal) optional delta: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1088](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1088) +Defined in: [packages/typescript/ai/src/types.ts:1089](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1089) Incremental thinking content (TanStack AI internal) @@ -54,7 +54,7 @@ Incremental thinking content (TanStack AI internal) optional model: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1081](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1081) +Defined in: [packages/typescript/ai/src/types.ts:1082](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1082) Model identifier for multi-model support @@ -66,7 +66,7 @@ Model identifier for multi-model support optional signature: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1092](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1092) +Defined in: [packages/typescript/ai/src/types.ts:1093](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1093) Provider signature for the thinking block @@ -78,7 +78,7 @@ Provider signature for the thinking block optional stepId: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1086](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1086) +Defined in: [packages/typescript/ai/src/types.ts:1087](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1087) #### Deprecated diff --git a/docs/reference/interfaces/StepStartedEvent.md b/docs/reference/interfaces/StepStartedEvent.md index 629459f66..a701d2ed2 100644 --- a/docs/reference/interfaces/StepStartedEvent.md +++ b/docs/reference/interfaces/StepStartedEvent.md @@ -5,7 +5,7 @@ title: StepStartedEvent # Interface: StepStartedEvent -Defined in: [packages/typescript/ai/src/types.ts:1061](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1061) +Defined in: [packages/typescript/ai/src/types.ts:1062](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1062) Emitted when a thinking/reasoning step starts. @@ -30,7 +30,7 @@ TanStack AI adds: `model?`, `stepId?` (deprecated alias), `stepType?` optional model: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1063](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1063) +Defined in: [packages/typescript/ai/src/types.ts:1064](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1064) Model identifier for multi-model support @@ -42,7 +42,7 @@ Model identifier for multi-model support optional stepId: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1068](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1068) +Defined in: [packages/typescript/ai/src/types.ts:1069](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1069) #### Deprecated @@ -57,6 +57,6 @@ Kept for backward compatibility. optional stepType: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1070](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1070) +Defined in: [packages/typescript/ai/src/types.ts:1071](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1071) Type of step (e.g., 'thinking', 'planning') diff --git a/docs/reference/interfaces/StructuredOutputCompleteEvent.md b/docs/reference/interfaces/StructuredOutputCompleteEvent.md index 7f7b28398..9470572a4 100644 --- a/docs/reference/interfaces/StructuredOutputCompleteEvent.md +++ b/docs/reference/interfaces/StructuredOutputCompleteEvent.md @@ -5,7 +5,7 @@ title: StructuredOutputCompleteEvent # Interface: StructuredOutputCompleteEvent\ -Defined in: [packages/typescript/ai/src/types.ts:1168](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1168) +Defined in: [packages/typescript/ai/src/types.ts:1169](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1169) Final event of a streaming structured-output run. Carries the validated `object` (typed as `T` after the orchestrator runs Standard Schema parsing), @@ -48,7 +48,7 @@ if (chunk.type === 'CUSTOM' && chunk.name === 'structured-output.complete') { optional model: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1147](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1147) +Defined in: [packages/typescript/ai/src/types.ts:1148](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1148) Model identifier for multi-model support @@ -64,7 +64,7 @@ Model identifier for multi-model support name: "structured-output.complete"; ``` -Defined in: [packages/typescript/ai/src/types.ts:1171](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1171) +Defined in: [packages/typescript/ai/src/types.ts:1172](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1172) #### Overrides @@ -80,7 +80,7 @@ CustomEvent.name value: object; ``` -Defined in: [packages/typescript/ai/src/types.ts:1172](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1172) +Defined in: [packages/typescript/ai/src/types.ts:1173](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1173) #### object diff --git a/docs/reference/interfaces/StructuredOutputPart.md b/docs/reference/interfaces/StructuredOutputPart.md index feebc7b6d..926c1b4e3 100644 --- a/docs/reference/interfaces/StructuredOutputPart.md +++ b/docs/reference/interfaces/StructuredOutputPart.md @@ -5,7 +5,7 @@ title: StructuredOutputPart # Interface: StructuredOutputPart\ -Defined in: [packages/typescript/ai/src/types.ts:390](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L390) +Defined in: [packages/typescript/ai/src/types.ts:391](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L391) StructuredOutputPart — a typed structured response attached to the assistant message that produced it. Generic over the schema-inferred data type so @@ -27,7 +27,7 @@ to `messages[i].parts[j].data`. Defaults to `unknown` so untyped consumers optional data: TData; ``` -Defined in: [packages/typescript/ai/src/types.ts:396](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L396) +Defined in: [packages/typescript/ai/src/types.ts:397](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L397) Validated final object — only set when `status === 'complete'`. @@ -39,7 +39,7 @@ Validated final object — only set when `status === 'complete'`. optional errorMessage: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:402](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L402) +Defined in: [packages/typescript/ai/src/types.ts:403](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L403) Populated when `status === 'error'`. @@ -51,7 +51,7 @@ Populated when `status === 'error'`. optional partial: DeepPartial; ``` -Defined in: [packages/typescript/ai/src/types.ts:394](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L394) +Defined in: [packages/typescript/ai/src/types.ts:395](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L395) Progressive parse of `raw` via parsePartialJSON — populated while streaming and after complete. @@ -63,7 +63,7 @@ Progressive parse of `raw` via parsePartialJSON — populated while streaming an raw: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:398](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L398) +Defined in: [packages/typescript/ai/src/types.ts:399](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L399) Accumulating JSON buffer. Source of truth for wire round-trip. @@ -75,7 +75,7 @@ Accumulating JSON buffer. Source of truth for wire round-trip. optional reasoning: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:400](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L400) +Defined in: [packages/typescript/ai/src/types.ts:401](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L401) Optional chain-of-thought surfaced by reasoning models alongside the structured output. @@ -84,10 +84,10 @@ Optional chain-of-thought surfaced by reasoning models alongside the structured ### status ```ts -status: "error" | "streaming" | "complete"; +status: "error" | "complete" | "streaming"; ``` -Defined in: [packages/typescript/ai/src/types.ts:392](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L392) +Defined in: [packages/typescript/ai/src/types.ts:393](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L393) *** @@ -97,4 +97,4 @@ Defined in: [packages/typescript/ai/src/types.ts:392](https://github.com/TanStac type: "structured-output"; ``` -Defined in: [packages/typescript/ai/src/types.ts:391](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L391) +Defined in: [packages/typescript/ai/src/types.ts:392](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L392) diff --git a/docs/reference/interfaces/StructuredOutputStartEvent.md b/docs/reference/interfaces/StructuredOutputStartEvent.md index f949533fe..19bb8134d 100644 --- a/docs/reference/interfaces/StructuredOutputStartEvent.md +++ b/docs/reference/interfaces/StructuredOutputStartEvent.md @@ -5,7 +5,7 @@ title: StructuredOutputStartEvent # Interface: StructuredOutputStartEvent -Defined in: [packages/typescript/ai/src/types.ts:1183](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1183) +Defined in: [packages/typescript/ai/src/types.ts:1184](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1184) Emitted at the start of a streaming structured-output run, before the JSON deltas. Tells consumers that the upcoming `TEXT_MESSAGE_CONTENT` deltas @@ -32,7 +32,7 @@ made per-message rather than globally. optional model: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1147](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1147) +Defined in: [packages/typescript/ai/src/types.ts:1148](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1148) Model identifier for multi-model support @@ -48,7 +48,7 @@ Model identifier for multi-model support name: "structured-output.start"; ``` -Defined in: [packages/typescript/ai/src/types.ts:1184](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1184) +Defined in: [packages/typescript/ai/src/types.ts:1185](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1185) #### Overrides @@ -64,7 +64,7 @@ CustomEvent.name value: object; ``` -Defined in: [packages/typescript/ai/src/types.ts:1185](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1185) +Defined in: [packages/typescript/ai/src/types.ts:1186](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1186) #### messageId diff --git a/docs/reference/interfaces/SummarizationOptions.md b/docs/reference/interfaces/SummarizationOptions.md index 62036ec39..0c7e1ea37 100644 --- a/docs/reference/interfaces/SummarizationOptions.md +++ b/docs/reference/interfaces/SummarizationOptions.md @@ -5,7 +5,7 @@ title: SummarizationOptions # Interface: SummarizationOptions\ -Defined in: [packages/typescript/ai/src/types.ts:1380](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1380) +Defined in: [packages/typescript/ai/src/types.ts:1381](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1381) ## Type Parameters @@ -21,7 +21,7 @@ Defined in: [packages/typescript/ai/src/types.ts:1380](https://github.com/TanSta optional focus: string[]; ``` -Defined in: [packages/typescript/ai/src/types.ts:1387](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1387) +Defined in: [packages/typescript/ai/src/types.ts:1388](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1388) *** @@ -31,7 +31,7 @@ Defined in: [packages/typescript/ai/src/types.ts:1387](https://github.com/TanSta logger: InternalLogger; ``` -Defined in: [packages/typescript/ai/src/types.ts:1394](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1394) +Defined in: [packages/typescript/ai/src/types.ts:1395](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1395) Internal logger threaded from the summarize() entry point. Adapters must call logger.request() before the SDK call and logger.errors() in catch blocks. @@ -44,7 +44,7 @@ call logger.request() before the SDK call and logger.errors() in catch blocks. optional maxLength: number; ``` -Defined in: [packages/typescript/ai/src/types.ts:1385](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1385) +Defined in: [packages/typescript/ai/src/types.ts:1386](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1386) *** @@ -54,7 +54,7 @@ Defined in: [packages/typescript/ai/src/types.ts:1385](https://github.com/TanSta model: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1383](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1383) +Defined in: [packages/typescript/ai/src/types.ts:1384](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1384) *** @@ -64,7 +64,7 @@ Defined in: [packages/typescript/ai/src/types.ts:1383](https://github.com/TanSta optional modelOptions: TProviderOptions; ``` -Defined in: [packages/typescript/ai/src/types.ts:1389](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1389) +Defined in: [packages/typescript/ai/src/types.ts:1390](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1390) Provider-specific options forwarded by the summarize() activity. @@ -76,7 +76,7 @@ Provider-specific options forwarded by the summarize() activity. optional style: "bullet-points" | "paragraph" | "concise"; ``` -Defined in: [packages/typescript/ai/src/types.ts:1386](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1386) +Defined in: [packages/typescript/ai/src/types.ts:1387](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1387) *** @@ -86,4 +86,4 @@ Defined in: [packages/typescript/ai/src/types.ts:1386](https://github.com/TanSta text: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1384](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1384) +Defined in: [packages/typescript/ai/src/types.ts:1385](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1385) diff --git a/docs/reference/interfaces/SummarizationResult.md b/docs/reference/interfaces/SummarizationResult.md index ba2ab6718..7d48b8ec0 100644 --- a/docs/reference/interfaces/SummarizationResult.md +++ b/docs/reference/interfaces/SummarizationResult.md @@ -5,7 +5,7 @@ title: SummarizationResult # Interface: SummarizationResult -Defined in: [packages/typescript/ai/src/types.ts:1397](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1397) +Defined in: [packages/typescript/ai/src/types.ts:1398](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1398) ## Properties @@ -15,7 +15,7 @@ Defined in: [packages/typescript/ai/src/types.ts:1397](https://github.com/TanSta id: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1398](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1398) +Defined in: [packages/typescript/ai/src/types.ts:1399](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1399) *** @@ -25,7 +25,7 @@ Defined in: [packages/typescript/ai/src/types.ts:1398](https://github.com/TanSta model: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1399](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1399) +Defined in: [packages/typescript/ai/src/types.ts:1400](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1400) *** @@ -35,7 +35,7 @@ Defined in: [packages/typescript/ai/src/types.ts:1399](https://github.com/TanSta summary: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1400](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1400) +Defined in: [packages/typescript/ai/src/types.ts:1401](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1401) *** @@ -45,7 +45,7 @@ Defined in: [packages/typescript/ai/src/types.ts:1400](https://github.com/TanSta usage: object; ``` -Defined in: [packages/typescript/ai/src/types.ts:1401](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1401) +Defined in: [packages/typescript/ai/src/types.ts:1402](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1402) #### completionTokens diff --git a/docs/reference/interfaces/TTSOptions.md b/docs/reference/interfaces/TTSOptions.md index 59352a580..1cd054cf1 100644 --- a/docs/reference/interfaces/TTSOptions.md +++ b/docs/reference/interfaces/TTSOptions.md @@ -5,7 +5,7 @@ title: TTSOptions # Interface: TTSOptions\ -Defined in: [packages/typescript/ai/src/types.ts:1617](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1617) +Defined in: [packages/typescript/ai/src/types.ts:1618](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1618) Options for text-to-speech generation. These are the common options supported across providers. @@ -24,7 +24,7 @@ These are the common options supported across providers. optional format: "mp3" | "opus" | "aac" | "flac" | "wav" | "pcm"; ``` -Defined in: [packages/typescript/ai/src/types.ts:1625](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1625) +Defined in: [packages/typescript/ai/src/types.ts:1626](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1626) The output audio format @@ -36,7 +36,7 @@ The output audio format logger: InternalLogger; ``` -Defined in: [packages/typescript/ai/src/types.ts:1635](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1635) +Defined in: [packages/typescript/ai/src/types.ts:1636](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1636) Internal logger threaded from the generateSpeech() entry point. Adapters must call logger.request() before the SDK call and logger.errors() in @@ -50,7 +50,7 @@ catch blocks. model: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1619](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1619) +Defined in: [packages/typescript/ai/src/types.ts:1620](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1620) The model to use for TTS generation @@ -62,7 +62,7 @@ The model to use for TTS generation optional modelOptions: TProviderOptions; ``` -Defined in: [packages/typescript/ai/src/types.ts:1629](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1629) +Defined in: [packages/typescript/ai/src/types.ts:1630](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1630) Model-specific options for TTS generation @@ -74,7 +74,7 @@ Model-specific options for TTS generation optional speed: number; ``` -Defined in: [packages/typescript/ai/src/types.ts:1627](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1627) +Defined in: [packages/typescript/ai/src/types.ts:1628](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1628) The speed of the generated audio (0.25 to 4.0) @@ -86,7 +86,7 @@ The speed of the generated audio (0.25 to 4.0) text: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1621](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1621) +Defined in: [packages/typescript/ai/src/types.ts:1622](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1622) The text to convert to speech @@ -98,6 +98,6 @@ The text to convert to speech optional voice: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1623](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1623) +Defined in: [packages/typescript/ai/src/types.ts:1624](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1624) The voice to use for generation diff --git a/docs/reference/interfaces/TTSResult.md b/docs/reference/interfaces/TTSResult.md index 16834a09e..d80ad7010 100644 --- a/docs/reference/interfaces/TTSResult.md +++ b/docs/reference/interfaces/TTSResult.md @@ -5,7 +5,7 @@ title: TTSResult # Interface: TTSResult -Defined in: [packages/typescript/ai/src/types.ts:1641](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1641) +Defined in: [packages/typescript/ai/src/types.ts:1642](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1642) Result of text-to-speech generation. @@ -17,7 +17,7 @@ Result of text-to-speech generation. audio: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1647](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1647) +Defined in: [packages/typescript/ai/src/types.ts:1648](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1648) Base64-encoded audio data @@ -29,7 +29,7 @@ Base64-encoded audio data optional contentType: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1653](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1653) +Defined in: [packages/typescript/ai/src/types.ts:1654](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1654) Content type of the audio (e.g., 'audio/mp3') @@ -41,7 +41,7 @@ Content type of the audio (e.g., 'audio/mp3') optional duration: number; ``` -Defined in: [packages/typescript/ai/src/types.ts:1651](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1651) +Defined in: [packages/typescript/ai/src/types.ts:1652](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1652) Duration of the audio in seconds, if available @@ -53,7 +53,7 @@ Duration of the audio in seconds, if available format: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1649](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1649) +Defined in: [packages/typescript/ai/src/types.ts:1650](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1650) Audio format of the generated audio @@ -65,7 +65,7 @@ Audio format of the generated audio id: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1643](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1643) +Defined in: [packages/typescript/ai/src/types.ts:1644](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1644) Unique identifier for the generation @@ -77,6 +77,6 @@ Unique identifier for the generation model: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1645](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1645) +Defined in: [packages/typescript/ai/src/types.ts:1646](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1646) Model used for generation diff --git a/docs/reference/interfaces/TextCompletionChunk.md b/docs/reference/interfaces/TextCompletionChunk.md index 0ff40f268..8168ef0dd 100644 --- a/docs/reference/interfaces/TextCompletionChunk.md +++ b/docs/reference/interfaces/TextCompletionChunk.md @@ -5,7 +5,7 @@ title: TextCompletionChunk # Interface: TextCompletionChunk -Defined in: [packages/typescript/ai/src/types.ts:1367](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1367) +Defined in: [packages/typescript/ai/src/types.ts:1368](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1368) ## Properties @@ -15,7 +15,7 @@ Defined in: [packages/typescript/ai/src/types.ts:1367](https://github.com/TanSta content: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1370](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1370) +Defined in: [packages/typescript/ai/src/types.ts:1371](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1371) *** @@ -25,7 +25,7 @@ Defined in: [packages/typescript/ai/src/types.ts:1370](https://github.com/TanSta optional finishReason: "length" | "stop" | "content_filter" | null; ``` -Defined in: [packages/typescript/ai/src/types.ts:1372](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1372) +Defined in: [packages/typescript/ai/src/types.ts:1373](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1373) *** @@ -35,7 +35,7 @@ Defined in: [packages/typescript/ai/src/types.ts:1372](https://github.com/TanSta id: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1368](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1368) +Defined in: [packages/typescript/ai/src/types.ts:1369](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1369) *** @@ -45,7 +45,7 @@ Defined in: [packages/typescript/ai/src/types.ts:1368](https://github.com/TanSta model: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1369](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1369) +Defined in: [packages/typescript/ai/src/types.ts:1370](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1370) *** @@ -55,7 +55,7 @@ Defined in: [packages/typescript/ai/src/types.ts:1369](https://github.com/TanSta optional role: "assistant"; ``` -Defined in: [packages/typescript/ai/src/types.ts:1371](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1371) +Defined in: [packages/typescript/ai/src/types.ts:1372](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1372) *** @@ -65,7 +65,7 @@ Defined in: [packages/typescript/ai/src/types.ts:1371](https://github.com/TanSta optional usage: object; ``` -Defined in: [packages/typescript/ai/src/types.ts:1373](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1373) +Defined in: [packages/typescript/ai/src/types.ts:1374](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1374) #### completionTokens diff --git a/docs/reference/interfaces/TextMessageContentEvent.md b/docs/reference/interfaces/TextMessageContentEvent.md index 07a937b9a..c2750cfe9 100644 --- a/docs/reference/interfaces/TextMessageContentEvent.md +++ b/docs/reference/interfaces/TextMessageContentEvent.md @@ -5,7 +5,7 @@ title: TextMessageContentEvent # Interface: TextMessageContentEvent -Defined in: [packages/typescript/ai/src/types.ts:968](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L968) +Defined in: [packages/typescript/ai/src/types.ts:969](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L969) Emitted when text content is generated (streaming tokens). @@ -30,7 +30,7 @@ TanStack AI adds: `model?`, `content?` (accumulated) optional content: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:972](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L972) +Defined in: [packages/typescript/ai/src/types.ts:973](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L973) Full accumulated content so far (TanStack AI internal, for debugging) @@ -42,6 +42,6 @@ Full accumulated content so far (TanStack AI internal, for debugging) optional model: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:970](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L970) +Defined in: [packages/typescript/ai/src/types.ts:971](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L971) Model identifier for multi-model support diff --git a/docs/reference/interfaces/TextMessageEndEvent.md b/docs/reference/interfaces/TextMessageEndEvent.md index 548e619e5..89d23d341 100644 --- a/docs/reference/interfaces/TextMessageEndEvent.md +++ b/docs/reference/interfaces/TextMessageEndEvent.md @@ -5,7 +5,7 @@ title: TextMessageEndEvent # Interface: TextMessageEndEvent -Defined in: [packages/typescript/ai/src/types.ts:981](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L981) +Defined in: [packages/typescript/ai/src/types.ts:982](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L982) Emitted when a text message completes. @@ -30,6 +30,6 @@ TanStack AI adds: `model?` optional model: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:983](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L983) +Defined in: [packages/typescript/ai/src/types.ts:984](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L984) Model identifier for multi-model support diff --git a/docs/reference/interfaces/TextMessageStartEvent.md b/docs/reference/interfaces/TextMessageStartEvent.md index ed0e38fb6..a32a9b957 100644 --- a/docs/reference/interfaces/TextMessageStartEvent.md +++ b/docs/reference/interfaces/TextMessageStartEvent.md @@ -5,7 +5,7 @@ title: TextMessageStartEvent # Interface: TextMessageStartEvent -Defined in: [packages/typescript/ai/src/types.ts:957](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L957) +Defined in: [packages/typescript/ai/src/types.ts:958](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L958) Emitted when a text message starts. @@ -30,6 +30,6 @@ TanStack AI adds: `model?` optional model: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:959](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L959) +Defined in: [packages/typescript/ai/src/types.ts:960](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L960) Model identifier for multi-model support diff --git a/docs/reference/interfaces/TextOptions.md b/docs/reference/interfaces/TextOptions.md index b5d184e9d..e70fe0f20 100644 --- a/docs/reference/interfaces/TextOptions.md +++ b/docs/reference/interfaces/TextOptions.md @@ -5,7 +5,7 @@ title: TextOptions # Interface: TextOptions\ -Defined in: [packages/typescript/ai/src/types.ts:728](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L728) +Defined in: [packages/typescript/ai/src/types.ts:729](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L729) Options passed into the SDK and further piped to the AI provider. @@ -27,7 +27,7 @@ Options passed into the SDK and further piped to the AI provider. optional abortController: AbortController; ``` -Defined in: [packages/typescript/ai/src/types.ts:832](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L832) +Defined in: [packages/typescript/ai/src/types.ts:833](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L833) AbortController for request cancellation. @@ -54,7 +54,7 @@ https://developer.mozilla.org/en-US/docs/Web/API/AbortController optional agentLoopStrategy: AgentLoopStrategy; ``` -Defined in: [packages/typescript/ai/src/types.ts:750](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L750) +Defined in: [packages/typescript/ai/src/types.ts:751](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L751) *** @@ -64,7 +64,7 @@ Defined in: [packages/typescript/ai/src/types.ts:750](https://github.com/TanStac optional conversationId: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:818](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L818) +Defined in: [packages/typescript/ai/src/types.ts:819](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L819) #### Deprecated @@ -85,7 +85,7 @@ Will be removed in a future major release. logger: InternalLogger; ``` -Defined in: [packages/typescript/ai/src/types.ts:839](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L839) +Defined in: [packages/typescript/ai/src/types.ts:840](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L840) Internal logger threaded from the chat entry point. Adapter implementations must call `logger.request()` before SDK calls, `logger.provider()` for each @@ -99,7 +99,7 @@ chunk received, and `logger.errors()` in catch blocks. optional maxTokens: number; ``` -Defined in: [packages/typescript/ai/src/types.ts:785](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L785) +Defined in: [packages/typescript/ai/src/types.ts:786](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L786) The maximum number of tokens to generate in the response. @@ -119,7 +119,7 @@ messages: ModelMessage< | null>[]; ``` -Defined in: [packages/typescript/ai/src/types.ts:733](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L733) +Defined in: [packages/typescript/ai/src/types.ts:734](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L734) *** @@ -129,7 +129,7 @@ Defined in: [packages/typescript/ai/src/types.ts:733](https://github.com/TanStac optional metadata: Record; ``` -Defined in: [packages/typescript/ai/src/types.ts:796](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L796) +Defined in: [packages/typescript/ai/src/types.ts:797](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L797) Additional metadata to attach to the request. Can be used for tracking, debugging, or passing custom information. @@ -148,7 +148,7 @@ Provider usage: model: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:732](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L732) +Defined in: [packages/typescript/ai/src/types.ts:733](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L733) *** @@ -158,7 +158,7 @@ Defined in: [packages/typescript/ai/src/types.ts:732](https://github.com/TanStac optional modelOptions: TProviderOptionsForModel; ``` -Defined in: [packages/typescript/ai/src/types.ts:797](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L797) +Defined in: [packages/typescript/ai/src/types.ts:798](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L798) *** @@ -168,7 +168,7 @@ Defined in: [packages/typescript/ai/src/types.ts:797](https://github.com/TanStac optional outputSchema: SchemaInput; ``` -Defined in: [packages/typescript/ai/src/types.ts:807](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L807) +Defined in: [packages/typescript/ai/src/types.ts:808](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L808) Schema for structured output. When provided, the adapter should use the provider's native structured output API @@ -184,7 +184,7 @@ Supports any Standard JSON Schema compliant library (Zod, ArkType, Valibot, etc. optional parentRunId: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:856](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L856) +Defined in: [packages/typescript/ai/src/types.ts:857](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L857) Parent run ID for AG-UI protocol nested run correlation. Surfaced for observability/middleware; not consumed by the LLM call. @@ -197,7 +197,7 @@ Surfaced for observability/middleware; not consumed by the LLM call. optional request: Request | RequestInit; ``` -Defined in: [packages/typescript/ai/src/types.ts:798](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L798) +Defined in: [packages/typescript/ai/src/types.ts:799](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L799) *** @@ -207,7 +207,7 @@ Defined in: [packages/typescript/ai/src/types.ts:798](https://github.com/TanStac optional runId: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:851](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L851) +Defined in: [packages/typescript/ai/src/types.ts:852](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L852) Run ID for AG-UI protocol run correlation. When provided, this will be used in RunStartedEvent and RunFinishedEvent. @@ -221,7 +221,7 @@ If not provided, a unique ID will be generated. optional systemPrompts: SystemPrompt[]; ``` -Defined in: [packages/typescript/ai/src/types.ts:749](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L749) +Defined in: [packages/typescript/ai/src/types.ts:750](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L750) System prompts to include with the request. @@ -246,7 +246,7 @@ SystemPrompt optional temperature: number; ``` -Defined in: [packages/typescript/ai/src/types.ts:763](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L763) +Defined in: [packages/typescript/ai/src/types.ts:764](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L764) Controls the randomness of the output. Higher values (e.g., 0.8) make output more random, lower values (e.g., 0.2) make it more focused and deterministic. @@ -267,7 +267,7 @@ Provider usage: optional threadId: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:845](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L845) +Defined in: [packages/typescript/ai/src/types.ts:846](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L846) Thread ID for AG-UI protocol run correlation. When provided, this will be used in RunStartedEvent and RunFinishedEvent. @@ -280,7 +280,7 @@ When provided, this will be used in RunStartedEvent and RunFinishedEvent. optional tools: Tool[]; ``` -Defined in: [packages/typescript/ai/src/types.ts:734](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L734) +Defined in: [packages/typescript/ai/src/types.ts:735](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L735) *** @@ -290,7 +290,7 @@ Defined in: [packages/typescript/ai/src/types.ts:734](https://github.com/TanStac optional topP: number; ``` -Defined in: [packages/typescript/ai/src/types.ts:776](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L776) +Defined in: [packages/typescript/ai/src/types.ts:777](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L777) Nucleus sampling parameter. An alternative to temperature sampling. The model considers the results of tokens with topP probability mass. diff --git a/docs/reference/interfaces/TextPart.md b/docs/reference/interfaces/TextPart.md index 4e530b355..c97cde6de 100644 --- a/docs/reference/interfaces/TextPart.md +++ b/docs/reference/interfaces/TextPart.md @@ -5,7 +5,7 @@ title: TextPart # Interface: TextPart\ -Defined in: [packages/typescript/ai/src/types.ts:329](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L329) +Defined in: [packages/typescript/ai/src/types.ts:330](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L330) Message parts - building blocks of UIMessage @@ -23,7 +23,7 @@ Message parts - building blocks of UIMessage content: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:331](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L331) +Defined in: [packages/typescript/ai/src/types.ts:332](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L332) *** @@ -33,7 +33,7 @@ Defined in: [packages/typescript/ai/src/types.ts:331](https://github.com/TanStac optional metadata: TMetadata; ``` -Defined in: [packages/typescript/ai/src/types.ts:332](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L332) +Defined in: [packages/typescript/ai/src/types.ts:333](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L333) *** @@ -43,4 +43,4 @@ Defined in: [packages/typescript/ai/src/types.ts:332](https://github.com/TanStac type: "text"; ``` -Defined in: [packages/typescript/ai/src/types.ts:330](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L330) +Defined in: [packages/typescript/ai/src/types.ts:331](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L331) diff --git a/docs/reference/interfaces/ThinkingPart.md b/docs/reference/interfaces/ThinkingPart.md index 8973001bd..8a1907571 100644 --- a/docs/reference/interfaces/ThinkingPart.md +++ b/docs/reference/interfaces/ThinkingPart.md @@ -5,7 +5,7 @@ title: ThinkingPart # Interface: ThinkingPart -Defined in: [packages/typescript/ai/src/types.ts:362](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L362) +Defined in: [packages/typescript/ai/src/types.ts:363](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L363) ## Properties @@ -15,7 +15,7 @@ Defined in: [packages/typescript/ai/src/types.ts:362](https://github.com/TanStac content: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:364](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L364) +Defined in: [packages/typescript/ai/src/types.ts:365](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L365) *** @@ -25,7 +25,7 @@ Defined in: [packages/typescript/ai/src/types.ts:364](https://github.com/TanStac optional signature: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:366](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L366) +Defined in: [packages/typescript/ai/src/types.ts:367](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L367) *** @@ -35,7 +35,7 @@ Defined in: [packages/typescript/ai/src/types.ts:366](https://github.com/TanStac optional stepId: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:365](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L365) +Defined in: [packages/typescript/ai/src/types.ts:366](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L366) *** @@ -45,4 +45,4 @@ Defined in: [packages/typescript/ai/src/types.ts:365](https://github.com/TanStac type: "thinking"; ``` -Defined in: [packages/typescript/ai/src/types.ts:363](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L363) +Defined in: [packages/typescript/ai/src/types.ts:364](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L364) diff --git a/docs/reference/interfaces/Tool.md b/docs/reference/interfaces/Tool.md index 17a3a7277..b75a8ba7f 100644 --- a/docs/reference/interfaces/Tool.md +++ b/docs/reference/interfaces/Tool.md @@ -5,7 +5,7 @@ title: Tool # Interface: Tool\ -Defined in: [packages/typescript/ai/src/types.ts:486](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L486) +Defined in: [packages/typescript/ai/src/types.ts:487](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L487) Tool/Function definition for function calling. @@ -49,7 +49,7 @@ or plain JSON Schema objects for runtime validation and type safety. description: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:509](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L509) +Defined in: [packages/typescript/ai/src/types.ts:510](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L510) Clear description of what the tool does. @@ -70,7 +70,7 @@ Be specific about what the tool does, what parameters it needs, and what it retu optional execute: (args, context?) => any; ``` -Defined in: [packages/typescript/ai/src/types.ts:589](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L589) +Defined in: [packages/typescript/ai/src/types.ts:590](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L590) Optional function to execute when the model calls this tool. @@ -114,7 +114,7 @@ execute: async (args) => { optional inputSchema: TInput; ``` -Defined in: [packages/typescript/ai/src/types.ts:549](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L549) +Defined in: [packages/typescript/ai/src/types.ts:550](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L550) Schema describing the tool's input parameters. @@ -168,7 +168,7 @@ type({ optional lazy: boolean; ``` -Defined in: [packages/typescript/ai/src/types.ts:597](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L597) +Defined in: [packages/typescript/ai/src/types.ts:598](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L598) If true, this tool is lazy and will only be sent to the LLM after being discovered via the lazy tool discovery mechanism. Only meaningful when used with chat(). @@ -180,7 +180,7 @@ If true, this tool is lazy and will only be sent to the LLM after being discover optional metadata: Record; ``` -Defined in: [packages/typescript/ai/src/types.ts:600](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L600) +Defined in: [packages/typescript/ai/src/types.ts:601](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L601) Additional metadata for adapters or custom extensions @@ -192,7 +192,7 @@ Additional metadata for adapters or custom extensions name: TName; ``` -Defined in: [packages/typescript/ai/src/types.ts:499](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L499) +Defined in: [packages/typescript/ai/src/types.ts:500](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L500) Unique name of the tool (used by the model to call it). @@ -213,7 +213,7 @@ Must be unique within the tools array. optional needsApproval: boolean; ``` -Defined in: [packages/typescript/ai/src/types.ts:594](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L594) +Defined in: [packages/typescript/ai/src/types.ts:595](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L595) If true, tool execution requires user approval before running. Works with both server and client tools. @@ -225,7 +225,7 @@ If true, tool execution requires user approval before running. Works with both s optional outputSchema: TOutput; ``` -Defined in: [packages/typescript/ai/src/types.ts:570](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L570) +Defined in: [packages/typescript/ai/src/types.ts:571](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L571) Optional schema for validating tool output. diff --git a/docs/reference/interfaces/ToolCall.md b/docs/reference/interfaces/ToolCall.md index 4cca14c2d..fc6e27f6c 100644 --- a/docs/reference/interfaces/ToolCall.md +++ b/docs/reference/interfaces/ToolCall.md @@ -5,7 +5,7 @@ title: ToolCall # Interface: ToolCall\ -Defined in: [packages/typescript/ai/src/types.ts:135](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L135) +Defined in: [packages/typescript/ai/src/types.ts:136](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L136) ## Type Parameters @@ -21,7 +21,7 @@ Defined in: [packages/typescript/ai/src/types.ts:135](https://github.com/TanStac function: object; ``` -Defined in: [packages/typescript/ai/src/types.ts:138](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L138) +Defined in: [packages/typescript/ai/src/types.ts:139](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L139) #### arguments @@ -43,7 +43,7 @@ name: string; id: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:136](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L136) +Defined in: [packages/typescript/ai/src/types.ts:137](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L137) *** @@ -53,7 +53,7 @@ Defined in: [packages/typescript/ai/src/types.ts:136](https://github.com/TanStac optional metadata: TMetadata; ``` -Defined in: [packages/typescript/ai/src/types.ts:145](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L145) +Defined in: [packages/typescript/ai/src/types.ts:146](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L146) Provider-specific metadata to carry through the tool call lifecycle. Typed per-adapter via `TToolCallMetadata`. For example, @@ -67,4 +67,4 @@ Typed per-adapter via `TToolCallMetadata`. For example, type: "function"; ``` -Defined in: [packages/typescript/ai/src/types.ts:137](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L137) +Defined in: [packages/typescript/ai/src/types.ts:138](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L138) diff --git a/docs/reference/interfaces/ToolCallArgsEvent.md b/docs/reference/interfaces/ToolCallArgsEvent.md index 20c36c756..b6519fa20 100644 --- a/docs/reference/interfaces/ToolCallArgsEvent.md +++ b/docs/reference/interfaces/ToolCallArgsEvent.md @@ -5,7 +5,7 @@ title: ToolCallArgsEvent # Interface: ToolCallArgsEvent -Defined in: [packages/typescript/ai/src/types.ts:1015](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1015) +Defined in: [packages/typescript/ai/src/types.ts:1016](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1016) Emitted when tool call arguments are streaming. @@ -30,7 +30,7 @@ TanStack AI adds: `model?`, `args?` (accumulated) optional args: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1019](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1019) +Defined in: [packages/typescript/ai/src/types.ts:1020](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1020) Full accumulated arguments so far (TanStack AI internal) @@ -42,6 +42,6 @@ Full accumulated arguments so far (TanStack AI internal) optional model: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1017](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1017) +Defined in: [packages/typescript/ai/src/types.ts:1018](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1018) Model identifier for multi-model support diff --git a/docs/reference/interfaces/ToolCallEndEvent.md b/docs/reference/interfaces/ToolCallEndEvent.md index 33edfb237..86c24565b 100644 --- a/docs/reference/interfaces/ToolCallEndEvent.md +++ b/docs/reference/interfaces/ToolCallEndEvent.md @@ -5,7 +5,7 @@ title: ToolCallEndEvent # Interface: ToolCallEndEvent -Defined in: [packages/typescript/ai/src/types.ts:1028](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1028) +Defined in: [packages/typescript/ai/src/types.ts:1029](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1029) Emitted when a tool call completes. @@ -30,7 +30,7 @@ TanStack AI adds: `model?`, `toolCallName?`, `toolName?` (deprecated), `input?`, optional input: unknown; ``` -Defined in: [packages/typescript/ai/src/types.ts:1039](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1039) +Defined in: [packages/typescript/ai/src/types.ts:1040](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1040) Final parsed input arguments (TanStack AI internal) @@ -42,7 +42,7 @@ Final parsed input arguments (TanStack AI internal) optional model: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1030](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1030) +Defined in: [packages/typescript/ai/src/types.ts:1031](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1031) Model identifier for multi-model support @@ -54,7 +54,7 @@ Model identifier for multi-model support optional result: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1041](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1041) +Defined in: [packages/typescript/ai/src/types.ts:1042](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1042) Tool execution result (TanStack AI internal) @@ -66,7 +66,7 @@ Tool execution result (TanStack AI internal) optional toolCallName: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1032](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1032) +Defined in: [packages/typescript/ai/src/types.ts:1033](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1033) Name of the tool that completed @@ -78,7 +78,7 @@ Name of the tool that completed optional toolName: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1037](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1037) +Defined in: [packages/typescript/ai/src/types.ts:1038](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1038) #### Deprecated diff --git a/docs/reference/interfaces/ToolCallPart.md b/docs/reference/interfaces/ToolCallPart.md index fc944fd5c..eced9abaf 100644 --- a/docs/reference/interfaces/ToolCallPart.md +++ b/docs/reference/interfaces/ToolCallPart.md @@ -5,7 +5,7 @@ title: ToolCallPart # Interface: ToolCallPart\ -Defined in: [packages/typescript/ai/src/types.ts:335](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L335) +Defined in: [packages/typescript/ai/src/types.ts:336](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L336) ## Type Parameters @@ -21,7 +21,7 @@ Defined in: [packages/typescript/ai/src/types.ts:335](https://github.com/TanStac optional approval: object; ``` -Defined in: [packages/typescript/ai/src/types.ts:342](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L342) +Defined in: [packages/typescript/ai/src/types.ts:343](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L343) Approval metadata if tool requires user approval @@ -51,7 +51,7 @@ needsApproval: boolean; arguments: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:339](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L339) +Defined in: [packages/typescript/ai/src/types.ts:340](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L340) *** @@ -61,7 +61,7 @@ Defined in: [packages/typescript/ai/src/types.ts:339](https://github.com/TanStac id: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:337](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L337) +Defined in: [packages/typescript/ai/src/types.ts:338](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L338) *** @@ -71,7 +71,7 @@ Defined in: [packages/typescript/ai/src/types.ts:337](https://github.com/TanStac optional metadata: TMetadata; ``` -Defined in: [packages/typescript/ai/src/types.ts:351](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L351) +Defined in: [packages/typescript/ai/src/types.ts:352](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L352) Provider-specific metadata that round-trips with the tool call. Typed per-adapter via `TToolCallMetadata`. @@ -84,7 +84,7 @@ Typed per-adapter via `TToolCallMetadata`. name: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:338](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L338) +Defined in: [packages/typescript/ai/src/types.ts:339](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L339) *** @@ -94,7 +94,7 @@ Defined in: [packages/typescript/ai/src/types.ts:338](https://github.com/TanStac optional output: any; ``` -Defined in: [packages/typescript/ai/src/types.ts:348](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L348) +Defined in: [packages/typescript/ai/src/types.ts:349](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L349) Tool execution output (for client tools or after approval) @@ -106,7 +106,7 @@ Tool execution output (for client tools or after approval) state: ToolCallState; ``` -Defined in: [packages/typescript/ai/src/types.ts:340](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L340) +Defined in: [packages/typescript/ai/src/types.ts:341](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L341) *** @@ -116,4 +116,4 @@ Defined in: [packages/typescript/ai/src/types.ts:340](https://github.com/TanStac type: "tool-call"; ``` -Defined in: [packages/typescript/ai/src/types.ts:336](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L336) +Defined in: [packages/typescript/ai/src/types.ts:337](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L337) diff --git a/docs/reference/interfaces/ToolCallResultEvent.md b/docs/reference/interfaces/ToolCallResultEvent.md index d49a9ffa1..8d1ba0d2a 100644 --- a/docs/reference/interfaces/ToolCallResultEvent.md +++ b/docs/reference/interfaces/ToolCallResultEvent.md @@ -5,7 +5,7 @@ title: ToolCallResultEvent # Interface: ToolCallResultEvent -Defined in: [packages/typescript/ai/src/types.ts:1050](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1050) +Defined in: [packages/typescript/ai/src/types.ts:1051](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1051) Emitted when a tool call result is available. @@ -30,6 +30,6 @@ TanStack AI adds: `model?` optional model: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1052](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1052) +Defined in: [packages/typescript/ai/src/types.ts:1053](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1053) Model identifier for multi-model support diff --git a/docs/reference/interfaces/ToolCallStartEvent.md b/docs/reference/interfaces/ToolCallStartEvent.md index a62db2335..864509ceb 100644 --- a/docs/reference/interfaces/ToolCallStartEvent.md +++ b/docs/reference/interfaces/ToolCallStartEvent.md @@ -5,7 +5,7 @@ title: ToolCallStartEvent # Interface: ToolCallStartEvent -Defined in: [packages/typescript/ai/src/types.ts:992](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L992) +Defined in: [packages/typescript/ai/src/types.ts:993](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L993) Emitted when a tool call starts. @@ -30,7 +30,7 @@ TanStack AI adds: `model?`, `toolName` (deprecated alias), `index?`, `metadata?` optional index: number; ``` -Defined in: [packages/typescript/ai/src/types.ts:1001](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1001) +Defined in: [packages/typescript/ai/src/types.ts:1002](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1002) Index for parallel tool calls @@ -42,7 +42,7 @@ Index for parallel tool calls optional metadata: Record; ``` -Defined in: [packages/typescript/ai/src/types.ts:1006](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1006) +Defined in: [packages/typescript/ai/src/types.ts:1007](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1007) Provider-specific metadata to carry into the ToolCall. Untyped at the event layer because events flow through a discriminated @@ -57,7 +57,7 @@ union that does not survive generics; adapters cast it to their typed optional model: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:994](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L994) +Defined in: [packages/typescript/ai/src/types.ts:995](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L995) Model identifier for multi-model support @@ -69,7 +69,7 @@ Model identifier for multi-model support toolName: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:999](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L999) +Defined in: [packages/typescript/ai/src/types.ts:1000](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1000) #### Deprecated diff --git a/docs/reference/interfaces/ToolConfig.md b/docs/reference/interfaces/ToolConfig.md index b6609558c..c64a66f35 100644 --- a/docs/reference/interfaces/ToolConfig.md +++ b/docs/reference/interfaces/ToolConfig.md @@ -5,7 +5,7 @@ title: ToolConfig # Interface: ToolConfig -Defined in: [packages/typescript/ai/src/types.ts:603](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L603) +Defined in: [packages/typescript/ai/src/types.ts:604](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L604) ## Indexable diff --git a/docs/reference/interfaces/ToolDefinition.md b/docs/reference/interfaces/ToolDefinition.md index 728f8da6c..6dfb7b144 100644 --- a/docs/reference/interfaces/ToolDefinition.md +++ b/docs/reference/interfaces/ToolDefinition.md @@ -73,7 +73,7 @@ Create a client-side tool with optional execute function description: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:509](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L509) +Defined in: [packages/typescript/ai/src/types.ts:510](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L510) Clear description of what the tool does. @@ -98,7 +98,7 @@ Be specific about what the tool does, what parameters it needs, and what it retu optional execute: (args, context?) => any; ``` -Defined in: [packages/typescript/ai/src/types.ts:589](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L589) +Defined in: [packages/typescript/ai/src/types.ts:590](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L590) Optional function to execute when the model calls this tool. @@ -146,7 +146,7 @@ execute: async (args) => { optional inputSchema: TInput; ``` -Defined in: [packages/typescript/ai/src/types.ts:549](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L549) +Defined in: [packages/typescript/ai/src/types.ts:550](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L550) Schema describing the tool's input parameters. @@ -204,7 +204,7 @@ type({ optional lazy: boolean; ``` -Defined in: [packages/typescript/ai/src/types.ts:597](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L597) +Defined in: [packages/typescript/ai/src/types.ts:598](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L598) If true, this tool is lazy and will only be sent to the LLM after being discovered via the lazy tool discovery mechanism. Only meaningful when used with chat(). @@ -220,7 +220,7 @@ If true, this tool is lazy and will only be sent to the LLM after being discover optional metadata: Record; ``` -Defined in: [packages/typescript/ai/src/types.ts:600](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L600) +Defined in: [packages/typescript/ai/src/types.ts:601](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L601) Additional metadata for adapters or custom extensions @@ -236,7 +236,7 @@ Additional metadata for adapters or custom extensions name: TName; ``` -Defined in: [packages/typescript/ai/src/types.ts:499](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L499) +Defined in: [packages/typescript/ai/src/types.ts:500](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L500) Unique name of the tool (used by the model to call it). @@ -261,7 +261,7 @@ Must be unique within the tools array. optional needsApproval: boolean; ``` -Defined in: [packages/typescript/ai/src/types.ts:594](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L594) +Defined in: [packages/typescript/ai/src/types.ts:595](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L595) If true, tool execution requires user approval before running. Works with both server and client tools. @@ -277,7 +277,7 @@ If true, tool execution requires user approval before running. Works with both s optional outputSchema: TOutput; ``` -Defined in: [packages/typescript/ai/src/types.ts:570](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L570) +Defined in: [packages/typescript/ai/src/types.ts:571](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L571) Optional schema for validating tool output. diff --git a/docs/reference/interfaces/ToolDefinitionInstance.md b/docs/reference/interfaces/ToolDefinitionInstance.md index df0cd4e1b..ee0776c9e 100644 --- a/docs/reference/interfaces/ToolDefinitionInstance.md +++ b/docs/reference/interfaces/ToolDefinitionInstance.md @@ -49,7 +49,7 @@ Defined in: [packages/typescript/ai/src/activities/chat/tools/tool-definition.ts description: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:509](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L509) +Defined in: [packages/typescript/ai/src/types.ts:510](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L510) Clear description of what the tool does. @@ -74,7 +74,7 @@ Be specific about what the tool does, what parameters it needs, and what it retu optional execute: (args, context?) => any; ``` -Defined in: [packages/typescript/ai/src/types.ts:589](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L589) +Defined in: [packages/typescript/ai/src/types.ts:590](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L590) Optional function to execute when the model calls this tool. @@ -122,7 +122,7 @@ execute: async (args) => { optional inputSchema: TInput; ``` -Defined in: [packages/typescript/ai/src/types.ts:549](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L549) +Defined in: [packages/typescript/ai/src/types.ts:550](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L550) Schema describing the tool's input parameters. @@ -180,7 +180,7 @@ type({ optional lazy: boolean; ``` -Defined in: [packages/typescript/ai/src/types.ts:597](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L597) +Defined in: [packages/typescript/ai/src/types.ts:598](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L598) If true, this tool is lazy and will only be sent to the LLM after being discovered via the lazy tool discovery mechanism. Only meaningful when used with chat(). @@ -196,7 +196,7 @@ If true, this tool is lazy and will only be sent to the LLM after being discover optional metadata: Record; ``` -Defined in: [packages/typescript/ai/src/types.ts:600](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L600) +Defined in: [packages/typescript/ai/src/types.ts:601](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L601) Additional metadata for adapters or custom extensions @@ -212,7 +212,7 @@ Additional metadata for adapters or custom extensions name: TName; ``` -Defined in: [packages/typescript/ai/src/types.ts:499](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L499) +Defined in: [packages/typescript/ai/src/types.ts:500](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L500) Unique name of the tool (used by the model to call it). @@ -237,7 +237,7 @@ Must be unique within the tools array. optional needsApproval: boolean; ``` -Defined in: [packages/typescript/ai/src/types.ts:594](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L594) +Defined in: [packages/typescript/ai/src/types.ts:595](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L595) If true, tool execution requires user approval before running. Works with both server and client tools. @@ -253,7 +253,7 @@ If true, tool execution requires user approval before running. Works with both s optional outputSchema: TOutput; ``` -Defined in: [packages/typescript/ai/src/types.ts:570](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L570) +Defined in: [packages/typescript/ai/src/types.ts:571](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L571) Optional schema for validating tool output. diff --git a/docs/reference/interfaces/ToolExecutionContext.md b/docs/reference/interfaces/ToolExecutionContext.md index c0563de17..a86c0637e 100644 --- a/docs/reference/interfaces/ToolExecutionContext.md +++ b/docs/reference/interfaces/ToolExecutionContext.md @@ -5,7 +5,7 @@ title: ToolExecutionContext # Interface: ToolExecutionContext -Defined in: [packages/typescript/ai/src/types.ts:449](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L449) +Defined in: [packages/typescript/ai/src/types.ts:450](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L450) Context passed to tool execute functions, providing capabilities like emitting custom events during execution. @@ -18,7 +18,7 @@ emitting custom events during execution. emitCustomEvent: (eventName, value) => void; ``` -Defined in: [packages/typescript/ai/src/types.ts:470](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L470) +Defined in: [packages/typescript/ai/src/types.ts:471](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L471) Emit a custom event during tool execution. Events are streamed to the client in real-time as AG-UI CUSTOM events. @@ -61,6 +61,6 @@ const tool = toolDefinition({ ... }).server(async (args, context) => { optional toolCallId: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:451](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L451) +Defined in: [packages/typescript/ai/src/types.ts:452](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L452) The ID of the tool call being executed diff --git a/docs/reference/interfaces/ToolInputAvailableEvent.md b/docs/reference/interfaces/ToolInputAvailableEvent.md index d26793d72..663e08fa2 100644 --- a/docs/reference/interfaces/ToolInputAvailableEvent.md +++ b/docs/reference/interfaces/ToolInputAvailableEvent.md @@ -5,7 +5,7 @@ title: ToolInputAvailableEvent # Interface: ToolInputAvailableEvent -Defined in: [packages/typescript/ai/src/types.ts:1211](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1211) +Defined in: [packages/typescript/ai/src/types.ts:1212](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1212) Emitted when a client tool is invoked. The agent loop yields this and pauses to let the caller run the tool client-side — `structured-output.complete` @@ -30,7 +30,7 @@ will not fire for that run. Shape fixed by the agent-loop forwarding in optional model: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1147](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1147) +Defined in: [packages/typescript/ai/src/types.ts:1148](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1148) Model identifier for multi-model support @@ -46,7 +46,7 @@ Model identifier for multi-model support name: "tool-input-available"; ``` -Defined in: [packages/typescript/ai/src/types.ts:1212](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1212) +Defined in: [packages/typescript/ai/src/types.ts:1213](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1213) #### Overrides @@ -62,7 +62,7 @@ CustomEvent.name value: object; ``` -Defined in: [packages/typescript/ai/src/types.ts:1213](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1213) +Defined in: [packages/typescript/ai/src/types.ts:1214](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1214) #### input diff --git a/docs/reference/interfaces/ToolResultPart.md b/docs/reference/interfaces/ToolResultPart.md index 0ec0877de..5833f8985 100644 --- a/docs/reference/interfaces/ToolResultPart.md +++ b/docs/reference/interfaces/ToolResultPart.md @@ -5,7 +5,7 @@ title: ToolResultPart # Interface: ToolResultPart -Defined in: [packages/typescript/ai/src/types.ts:354](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L354) +Defined in: [packages/typescript/ai/src/types.ts:355](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L355) ## Properties @@ -15,7 +15,7 @@ Defined in: [packages/typescript/ai/src/types.ts:354](https://github.com/TanStac content: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:357](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L357) +Defined in: [packages/typescript/ai/src/types.ts:358](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L358) *** @@ -25,7 +25,7 @@ Defined in: [packages/typescript/ai/src/types.ts:357](https://github.com/TanStac optional error: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:359](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L359) +Defined in: [packages/typescript/ai/src/types.ts:360](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L360) *** @@ -35,7 +35,7 @@ Defined in: [packages/typescript/ai/src/types.ts:359](https://github.com/TanStac state: ToolResultState; ``` -Defined in: [packages/typescript/ai/src/types.ts:358](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L358) +Defined in: [packages/typescript/ai/src/types.ts:359](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L359) *** @@ -45,7 +45,7 @@ Defined in: [packages/typescript/ai/src/types.ts:358](https://github.com/TanStac toolCallId: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:356](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L356) +Defined in: [packages/typescript/ai/src/types.ts:357](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L357) *** @@ -55,4 +55,4 @@ Defined in: [packages/typescript/ai/src/types.ts:356](https://github.com/TanStac type: "tool-result"; ``` -Defined in: [packages/typescript/ai/src/types.ts:355](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L355) +Defined in: [packages/typescript/ai/src/types.ts:356](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L356) diff --git a/docs/reference/interfaces/TranscriptionOptions.md b/docs/reference/interfaces/TranscriptionOptions.md index 040a3b135..7ba6f7cd1 100644 --- a/docs/reference/interfaces/TranscriptionOptions.md +++ b/docs/reference/interfaces/TranscriptionOptions.md @@ -5,7 +5,7 @@ title: TranscriptionOptions # Interface: TranscriptionOptions\ -Defined in: [packages/typescript/ai/src/types.ts:1664](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1664) +Defined in: [packages/typescript/ai/src/types.ts:1665](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1665) Options for audio transcription. These are the common options supported across providers. @@ -24,7 +24,7 @@ These are the common options supported across providers. audio: string | File | Blob | ArrayBuffer; ``` -Defined in: [packages/typescript/ai/src/types.ts:1670](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1670) +Defined in: [packages/typescript/ai/src/types.ts:1671](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1671) The audio data to transcribe - can be base64 string, File, Blob, or Buffer @@ -36,7 +36,7 @@ The audio data to transcribe - can be base64 string, File, Blob, or Buffer optional language: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1672](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1672) +Defined in: [packages/typescript/ai/src/types.ts:1673](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1673) The language of the audio in ISO-639-1 format (e.g., 'en') @@ -48,7 +48,7 @@ The language of the audio in ISO-639-1 format (e.g., 'en') logger: InternalLogger; ``` -Defined in: [packages/typescript/ai/src/types.ts:1684](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1684) +Defined in: [packages/typescript/ai/src/types.ts:1685](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1685) Internal logger threaded from the generateTranscription() entry point. Adapters must call logger.request() before the SDK call and logger.errors() @@ -62,7 +62,7 @@ in catch blocks. model: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1668](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1668) +Defined in: [packages/typescript/ai/src/types.ts:1669](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1669) The model to use for transcription @@ -74,7 +74,7 @@ The model to use for transcription optional modelOptions: TProviderOptions; ``` -Defined in: [packages/typescript/ai/src/types.ts:1678](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1678) +Defined in: [packages/typescript/ai/src/types.ts:1679](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1679) Model-specific options for transcription @@ -86,7 +86,7 @@ Model-specific options for transcription optional prompt: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1674](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1674) +Defined in: [packages/typescript/ai/src/types.ts:1675](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1675) An optional prompt to guide the transcription @@ -98,6 +98,6 @@ An optional prompt to guide the transcription optional responseFormat: "text" | "json" | "srt" | "verbose_json" | "vtt"; ``` -Defined in: [packages/typescript/ai/src/types.ts:1676](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1676) +Defined in: [packages/typescript/ai/src/types.ts:1677](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1677) The format of the transcription output diff --git a/docs/reference/interfaces/TranscriptionResult.md b/docs/reference/interfaces/TranscriptionResult.md index e1c5a4f6f..1c4b21118 100644 --- a/docs/reference/interfaces/TranscriptionResult.md +++ b/docs/reference/interfaces/TranscriptionResult.md @@ -5,7 +5,7 @@ title: TranscriptionResult # Interface: TranscriptionResult -Defined in: [packages/typescript/ai/src/types.ts:1720](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1720) +Defined in: [packages/typescript/ai/src/types.ts:1721](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1721) Result of audio transcription. @@ -17,7 +17,7 @@ Result of audio transcription. optional duration: number; ``` -Defined in: [packages/typescript/ai/src/types.ts:1730](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1730) +Defined in: [packages/typescript/ai/src/types.ts:1731](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1731) Duration of the audio in seconds @@ -29,7 +29,7 @@ Duration of the audio in seconds id: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1722](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1722) +Defined in: [packages/typescript/ai/src/types.ts:1723](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1723) Unique identifier for the transcription @@ -41,7 +41,7 @@ Unique identifier for the transcription optional language: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1728](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1728) +Defined in: [packages/typescript/ai/src/types.ts:1729](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1729) Language detected or specified @@ -53,7 +53,7 @@ Language detected or specified model: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1724](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1724) +Defined in: [packages/typescript/ai/src/types.ts:1725](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1725) Model used for transcription @@ -65,7 +65,7 @@ Model used for transcription optional segments: TranscriptionSegment[]; ``` -Defined in: [packages/typescript/ai/src/types.ts:1732](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1732) +Defined in: [packages/typescript/ai/src/types.ts:1733](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1733) Detailed segments with timing, if available @@ -77,7 +77,7 @@ Detailed segments with timing, if available text: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1726](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1726) +Defined in: [packages/typescript/ai/src/types.ts:1727](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1727) The full transcribed text @@ -89,6 +89,6 @@ The full transcribed text optional words: TranscriptionWord[]; ``` -Defined in: [packages/typescript/ai/src/types.ts:1734](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1734) +Defined in: [packages/typescript/ai/src/types.ts:1735](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1735) Word-level timestamps, if available diff --git a/docs/reference/interfaces/TranscriptionSegment.md b/docs/reference/interfaces/TranscriptionSegment.md index ed01bec92..f67ec35fe 100644 --- a/docs/reference/interfaces/TranscriptionSegment.md +++ b/docs/reference/interfaces/TranscriptionSegment.md @@ -5,7 +5,7 @@ title: TranscriptionSegment # Interface: TranscriptionSegment -Defined in: [packages/typescript/ai/src/types.ts:1690](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1690) +Defined in: [packages/typescript/ai/src/types.ts:1691](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1691) A single segment of transcribed audio with timing information. @@ -17,7 +17,7 @@ A single segment of transcribed audio with timing information. optional confidence: number; ``` -Defined in: [packages/typescript/ai/src/types.ts:1700](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1700) +Defined in: [packages/typescript/ai/src/types.ts:1701](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1701) Confidence score (0-1), if available @@ -29,7 +29,7 @@ Confidence score (0-1), if available end: number; ``` -Defined in: [packages/typescript/ai/src/types.ts:1696](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1696) +Defined in: [packages/typescript/ai/src/types.ts:1697](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1697) End time of the segment in seconds @@ -41,7 +41,7 @@ End time of the segment in seconds id: number; ``` -Defined in: [packages/typescript/ai/src/types.ts:1692](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1692) +Defined in: [packages/typescript/ai/src/types.ts:1693](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1693) Unique identifier for the segment @@ -53,7 +53,7 @@ Unique identifier for the segment optional speaker: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1702](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1702) +Defined in: [packages/typescript/ai/src/types.ts:1703](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1703) Speaker identifier, if diarization is enabled @@ -65,7 +65,7 @@ Speaker identifier, if diarization is enabled start: number; ``` -Defined in: [packages/typescript/ai/src/types.ts:1694](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1694) +Defined in: [packages/typescript/ai/src/types.ts:1695](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1695) Start time of the segment in seconds @@ -77,6 +77,6 @@ Start time of the segment in seconds text: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1698](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1698) +Defined in: [packages/typescript/ai/src/types.ts:1699](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1699) Transcribed text for this segment diff --git a/docs/reference/interfaces/TranscriptionWord.md b/docs/reference/interfaces/TranscriptionWord.md index 28c3983df..58fe5a77c 100644 --- a/docs/reference/interfaces/TranscriptionWord.md +++ b/docs/reference/interfaces/TranscriptionWord.md @@ -5,7 +5,7 @@ title: TranscriptionWord # Interface: TranscriptionWord -Defined in: [packages/typescript/ai/src/types.ts:1708](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1708) +Defined in: [packages/typescript/ai/src/types.ts:1709](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1709) A single word with timing information. @@ -17,7 +17,7 @@ A single word with timing information. end: number; ``` -Defined in: [packages/typescript/ai/src/types.ts:1714](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1714) +Defined in: [packages/typescript/ai/src/types.ts:1715](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1715) End time in seconds @@ -29,7 +29,7 @@ End time in seconds start: number; ``` -Defined in: [packages/typescript/ai/src/types.ts:1712](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1712) +Defined in: [packages/typescript/ai/src/types.ts:1713](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1713) Start time in seconds @@ -41,6 +41,6 @@ Start time in seconds word: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1710](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1710) +Defined in: [packages/typescript/ai/src/types.ts:1711](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1711) The transcribed word diff --git a/docs/reference/interfaces/UIMessage.md b/docs/reference/interfaces/UIMessage.md index fcb575f24..89a38f280 100644 --- a/docs/reference/interfaces/UIMessage.md +++ b/docs/reference/interfaces/UIMessage.md @@ -5,7 +5,7 @@ title: UIMessage # Interface: UIMessage\ -Defined in: [packages/typescript/ai/src/types.ts:423](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L423) +Defined in: [packages/typescript/ai/src/types.ts:424](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L424) UIMessage - Domain-specific message format optimized for building chat UIs Contains parts that can be text, tool calls, or tool results. Generic over @@ -27,7 +27,7 @@ consumer side without manual casts. optional createdAt: Date; ``` -Defined in: [packages/typescript/ai/src/types.ts:427](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L427) +Defined in: [packages/typescript/ai/src/types.ts:428](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L428) *** @@ -37,7 +37,7 @@ Defined in: [packages/typescript/ai/src/types.ts:427](https://github.com/TanStac id: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:424](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L424) +Defined in: [packages/typescript/ai/src/types.ts:425](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L425) *** @@ -47,7 +47,7 @@ Defined in: [packages/typescript/ai/src/types.ts:424](https://github.com/TanStac parts: MessagePart[]; ``` -Defined in: [packages/typescript/ai/src/types.ts:426](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L426) +Defined in: [packages/typescript/ai/src/types.ts:427](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L427) *** @@ -57,4 +57,4 @@ Defined in: [packages/typescript/ai/src/types.ts:426](https://github.com/TanStac role: "user" | "assistant" | "system"; ``` -Defined in: [packages/typescript/ai/src/types.ts:425](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L425) +Defined in: [packages/typescript/ai/src/types.ts:426](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L426) diff --git a/docs/reference/interfaces/VideoGenerationOptions.md b/docs/reference/interfaces/VideoGenerationOptions.md index 1e300ac1b..03696e688 100644 --- a/docs/reference/interfaces/VideoGenerationOptions.md +++ b/docs/reference/interfaces/VideoGenerationOptions.md @@ -5,7 +5,7 @@ title: VideoGenerationOptions # Interface: VideoGenerationOptions\ -Defined in: [packages/typescript/ai/src/types.ts:1546](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1546) +Defined in: [packages/typescript/ai/src/types.ts:1547](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1547) **`Experimental`** @@ -32,7 +32,7 @@ These are the common options supported across providers. optional duration: number; ``` -Defined in: [packages/typescript/ai/src/types.ts:1557](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1557) +Defined in: [packages/typescript/ai/src/types.ts:1558](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1558) **`Experimental`** @@ -46,7 +46,7 @@ Video duration in seconds logger: InternalLogger; ``` -Defined in: [packages/typescript/ai/src/types.ts:1564](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1564) +Defined in: [packages/typescript/ai/src/types.ts:1565](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1565) **`Experimental`** @@ -61,7 +61,7 @@ call logger.request() before the SDK call and logger.errors() in catch blocks. model: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1551](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1551) +Defined in: [packages/typescript/ai/src/types.ts:1552](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1552) **`Experimental`** @@ -75,7 +75,7 @@ The model to use for video generation optional modelOptions: TProviderOptions; ``` -Defined in: [packages/typescript/ai/src/types.ts:1559](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1559) +Defined in: [packages/typescript/ai/src/types.ts:1560](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1560) **`Experimental`** @@ -89,7 +89,7 @@ Model-specific options for video generation prompt: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1553](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1553) +Defined in: [packages/typescript/ai/src/types.ts:1554](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1554) **`Experimental`** @@ -103,7 +103,7 @@ Text description of the desired video optional size: TSize; ``` -Defined in: [packages/typescript/ai/src/types.ts:1555](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1555) +Defined in: [packages/typescript/ai/src/types.ts:1556](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1556) **`Experimental`** diff --git a/docs/reference/interfaces/VideoJobResult.md b/docs/reference/interfaces/VideoJobResult.md index 47047af3d..da036cc56 100644 --- a/docs/reference/interfaces/VideoJobResult.md +++ b/docs/reference/interfaces/VideoJobResult.md @@ -5,7 +5,7 @@ title: VideoJobResult # Interface: VideoJobResult -Defined in: [packages/typescript/ai/src/types.ts:1572](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1572) +Defined in: [packages/typescript/ai/src/types.ts:1573](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1573) **`Experimental`** @@ -21,7 +21,7 @@ Result of creating a video generation job. jobId: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1574](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1574) +Defined in: [packages/typescript/ai/src/types.ts:1575](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1575) **`Experimental`** @@ -35,7 +35,7 @@ Unique job identifier for polling status model: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1576](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1576) +Defined in: [packages/typescript/ai/src/types.ts:1577](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1577) **`Experimental`** diff --git a/docs/reference/interfaces/VideoPart.md b/docs/reference/interfaces/VideoPart.md index 02efcf91e..70f1f5d71 100644 --- a/docs/reference/interfaces/VideoPart.md +++ b/docs/reference/interfaces/VideoPart.md @@ -5,7 +5,7 @@ title: VideoPart # Interface: VideoPart\ -Defined in: [packages/typescript/ai/src/types.ts:237](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L237) +Defined in: [packages/typescript/ai/src/types.ts:238](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L238) Video content part for multimodal messages. @@ -25,7 +25,7 @@ Provider-specific metadata type optional metadata: TMetadata; ``` -Defined in: [packages/typescript/ai/src/types.ts:242](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L242) +Defined in: [packages/typescript/ai/src/types.ts:243](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L243) Provider-specific metadata (e.g., duration, resolution) @@ -37,7 +37,7 @@ Provider-specific metadata (e.g., duration, resolution) source: ContentPartSource; ``` -Defined in: [packages/typescript/ai/src/types.ts:240](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L240) +Defined in: [packages/typescript/ai/src/types.ts:241](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L241) Source of the video content @@ -49,4 +49,4 @@ Source of the video content type: "video"; ``` -Defined in: [packages/typescript/ai/src/types.ts:238](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L238) +Defined in: [packages/typescript/ai/src/types.ts:239](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L239) diff --git a/docs/reference/interfaces/VideoStatusResult.md b/docs/reference/interfaces/VideoStatusResult.md index a7b1c6e4a..46de10fba 100644 --- a/docs/reference/interfaces/VideoStatusResult.md +++ b/docs/reference/interfaces/VideoStatusResult.md @@ -5,7 +5,7 @@ title: VideoStatusResult # Interface: VideoStatusResult -Defined in: [packages/typescript/ai/src/types.ts:1584](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1584) +Defined in: [packages/typescript/ai/src/types.ts:1585](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1585) **`Experimental`** @@ -21,7 +21,7 @@ Status of a video generation job. optional error: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1592](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1592) +Defined in: [packages/typescript/ai/src/types.ts:1593](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1593) **`Experimental`** @@ -35,7 +35,7 @@ Error message if status is 'failed' jobId: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1586](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1586) +Defined in: [packages/typescript/ai/src/types.ts:1587](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1587) **`Experimental`** @@ -49,7 +49,7 @@ Job identifier optional progress: number; ``` -Defined in: [packages/typescript/ai/src/types.ts:1590](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1590) +Defined in: [packages/typescript/ai/src/types.ts:1591](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1591) **`Experimental`** @@ -63,7 +63,7 @@ Progress percentage (0-100), if available status: "pending" | "processing" | "completed" | "failed"; ``` -Defined in: [packages/typescript/ai/src/types.ts:1588](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1588) +Defined in: [packages/typescript/ai/src/types.ts:1589](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1589) **`Experimental`** diff --git a/docs/reference/interfaces/VideoUrlResult.md b/docs/reference/interfaces/VideoUrlResult.md index 8e97a1964..4d11c2427 100644 --- a/docs/reference/interfaces/VideoUrlResult.md +++ b/docs/reference/interfaces/VideoUrlResult.md @@ -5,7 +5,7 @@ title: VideoUrlResult # Interface: VideoUrlResult -Defined in: [packages/typescript/ai/src/types.ts:1600](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1600) +Defined in: [packages/typescript/ai/src/types.ts:1601](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1601) **`Experimental`** @@ -21,7 +21,7 @@ Result containing the URL to a generated video. optional expiresAt: Date; ``` -Defined in: [packages/typescript/ai/src/types.ts:1606](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1606) +Defined in: [packages/typescript/ai/src/types.ts:1607](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1607) **`Experimental`** @@ -35,7 +35,7 @@ When the URL expires, if applicable jobId: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1602](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1602) +Defined in: [packages/typescript/ai/src/types.ts:1603](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1603) **`Experimental`** @@ -49,7 +49,7 @@ Job identifier url: string; ``` -Defined in: [packages/typescript/ai/src/types.ts:1604](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1604) +Defined in: [packages/typescript/ai/src/types.ts:1605](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1605) **`Experimental`** diff --git a/docs/reference/type-aliases/AGUIEvent.md b/docs/reference/type-aliases/AGUIEvent.md index a18f4c779..88ffb1be4 100644 --- a/docs/reference/type-aliases/AGUIEvent.md +++ b/docs/reference/type-aliases/AGUIEvent.md @@ -31,6 +31,6 @@ type AGUIEvent = | ReasoningEncryptedValueEvent; ``` -Defined in: [packages/typescript/ai/src/types.ts:1335](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1335) +Defined in: [packages/typescript/ai/src/types.ts:1336](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1336) Union of all AG-UI events. diff --git a/docs/reference/type-aliases/AGUIEventType.md b/docs/reference/type-aliases/AGUIEventType.md index 4548f511e..369b22b45 100644 --- a/docs/reference/type-aliases/AGUIEventType.md +++ b/docs/reference/type-aliases/AGUIEventType.md @@ -9,7 +9,7 @@ title: AGUIEventType type AGUIEventType = `${EventType}`; ``` -Defined in: [packages/typescript/ai/src/types.ts:875](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L875) +Defined in: [packages/typescript/ai/src/types.ts:876](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L876) AG-UI Protocol event types. diff --git a/docs/reference/type-aliases/AgentLoopStrategy.md b/docs/reference/type-aliases/AgentLoopStrategy.md index fe2cd0a03..bfd56d2a1 100644 --- a/docs/reference/type-aliases/AgentLoopStrategy.md +++ b/docs/reference/type-aliases/AgentLoopStrategy.md @@ -9,7 +9,7 @@ title: AgentLoopStrategy type AgentLoopStrategy = (state) => boolean; ``` -Defined in: [packages/typescript/ai/src/types.ts:723](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L723) +Defined in: [packages/typescript/ai/src/types.ts:724](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L724) Strategy function that determines whether the agent loop should continue diff --git a/docs/reference/type-aliases/ConstrainedContent.md b/docs/reference/type-aliases/ConstrainedContent.md index bbca04e1c..ea401b4fd 100644 --- a/docs/reference/type-aliases/ConstrainedContent.md +++ b/docs/reference/type-aliases/ConstrainedContent.md @@ -12,7 +12,7 @@ type ConstrainedContent = | ContentPartForInputModalitiesTypes[]; ``` -Defined in: [packages/typescript/ai/src/types.ts:305](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L305) +Defined in: [packages/typescript/ai/src/types.ts:306](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L306) Type for message content constrained by supported modalities. When modalities is ['text', 'image'], only TextPart and ImagePart are allowed in the array. diff --git a/docs/reference/type-aliases/ConstrainedModelMessage.md b/docs/reference/type-aliases/ConstrainedModelMessage.md index c43183db8..f357b0178 100644 --- a/docs/reference/type-aliases/ConstrainedModelMessage.md +++ b/docs/reference/type-aliases/ConstrainedModelMessage.md @@ -9,7 +9,7 @@ title: ConstrainedModelMessage type ConstrainedModelMessage = Omit & object; ``` -Defined in: [packages/typescript/ai/src/types.ts:439](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L439) +Defined in: [packages/typescript/ai/src/types.ts:440](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L440) A ModelMessage with content constrained to only allow content parts matching the specified input modalities. diff --git a/docs/reference/type-aliases/ContentPart.md b/docs/reference/type-aliases/ContentPart.md index b48c9fe1b..4d008313b 100644 --- a/docs/reference/type-aliases/ContentPart.md +++ b/docs/reference/type-aliases/ContentPart.md @@ -14,7 +14,7 @@ type ContentPart = | DocumentPart; ``` -Defined in: [packages/typescript/ai/src/types.ts:264](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L264) +Defined in: [packages/typescript/ai/src/types.ts:265](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L265) Union type for all multimodal content parts. diff --git a/docs/reference/type-aliases/ContentPartForInputModalitiesTypes.md b/docs/reference/type-aliases/ContentPartForInputModalitiesTypes.md index cd5b7eec2..3555179e8 100644 --- a/docs/reference/type-aliases/ContentPartForInputModalitiesTypes.md +++ b/docs/reference/type-aliases/ContentPartForInputModalitiesTypes.md @@ -11,7 +11,7 @@ type ContentPartForInputModalitiesTypes = Extract; ``` -Defined in: [packages/typescript/ai/src/types.ts:281](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L281) +Defined in: [packages/typescript/ai/src/types.ts:282](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L282) Helper type to filter ContentPart union to only include specific modalities. Used to constrain message content based on model capabilities. diff --git a/docs/reference/type-aliases/ContentPartSource.md b/docs/reference/type-aliases/ContentPartSource.md index b6b4bae06..e5ca93b8f 100644 --- a/docs/reference/type-aliases/ContentPartSource.md +++ b/docs/reference/type-aliases/ContentPartSource.md @@ -11,7 +11,7 @@ type ContentPartSource = | ContentPartUrlSource; ``` -Defined in: [packages/typescript/ai/src/types.ts:207](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L207) +Defined in: [packages/typescript/ai/src/types.ts:208](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L208) Source specification for multimodal content. Discriminated union supporting both inline data (base64) and URL-based content. diff --git a/docs/reference/type-aliases/DeepPartial.md b/docs/reference/type-aliases/DeepPartial.md index e89237cf3..b5ed55504 100644 --- a/docs/reference/type-aliases/DeepPartial.md +++ b/docs/reference/type-aliases/DeepPartial.md @@ -9,7 +9,7 @@ title: DeepPartial type DeepPartial = T extends ReadonlyArray ? DeepPartial[] : T extends object ? { [K in keyof T]?: DeepPartial } : T; ``` -Defined in: [packages/typescript/ai/src/types.ts:376](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L376) +Defined in: [packages/typescript/ai/src/types.ts:377](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L377) Recursive `Partial` — every nested field becomes optional. Used as the `partial` type on a streaming structured-output part since the progressive diff --git a/docs/reference/type-aliases/GeneratedAudio.md b/docs/reference/type-aliases/GeneratedAudio.md index a7fd36e3b..5f744ef9d 100644 --- a/docs/reference/type-aliases/GeneratedAudio.md +++ b/docs/reference/type-aliases/GeneratedAudio.md @@ -9,7 +9,7 @@ title: GeneratedAudio type GeneratedAudio = GeneratedMediaSource & object; ``` -Defined in: [packages/typescript/ai/src/types.ts:1511](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1511) +Defined in: [packages/typescript/ai/src/types.ts:1512](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1512) A single generated audio output diff --git a/docs/reference/type-aliases/GeneratedImage.md b/docs/reference/type-aliases/GeneratedImage.md index 263078e81..dff804e42 100644 --- a/docs/reference/type-aliases/GeneratedImage.md +++ b/docs/reference/type-aliases/GeneratedImage.md @@ -9,7 +9,7 @@ title: GeneratedImage type GeneratedImage = GeneratedMediaSource & object; ``` -Defined in: [packages/typescript/ai/src/types.ts:1458](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1458) +Defined in: [packages/typescript/ai/src/types.ts:1459](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1459) A single generated image diff --git a/docs/reference/type-aliases/GeneratedMediaSource.md b/docs/reference/type-aliases/GeneratedMediaSource.md index a4eb69d9c..288dc4b15 100644 --- a/docs/reference/type-aliases/GeneratedMediaSource.md +++ b/docs/reference/type-aliases/GeneratedMediaSource.md @@ -17,7 +17,7 @@ type GeneratedMediaSource = }; ``` -Defined in: [packages/typescript/ai/src/types.ts:1443](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1443) +Defined in: [packages/typescript/ai/src/types.ts:1444](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1444) Source of a generated media asset. Exactly one of `url` or `b64Json` is present; the other is absent. Modeled as a mutually-exclusive union so the diff --git a/docs/reference/type-aliases/InferSchemaType.md b/docs/reference/type-aliases/InferSchemaType.md index 18def9a4d..5f52c2894 100644 --- a/docs/reference/type-aliases/InferSchemaType.md +++ b/docs/reference/type-aliases/InferSchemaType.md @@ -9,7 +9,7 @@ title: InferSchemaType type InferSchemaType = T extends StandardJSONSchemaV1 ? TInput : T extends StandardSchemaV1 ? TInput : unknown; ``` -Defined in: [packages/typescript/ai/src/types.ts:128](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L128) +Defined in: [packages/typescript/ai/src/types.ts:129](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L129) Infer the TypeScript type from a schema. For Standard JSON Schema compliant schemas, extracts the input type. diff --git a/docs/reference/type-aliases/InputModalitiesTypes.md b/docs/reference/type-aliases/InputModalitiesTypes.md index 2ee0c10d8..f67bf8e78 100644 --- a/docs/reference/type-aliases/InputModalitiesTypes.md +++ b/docs/reference/type-aliases/InputModalitiesTypes.md @@ -9,7 +9,7 @@ title: InputModalitiesTypes type InputModalitiesTypes = object; ``` -Defined in: [packages/typescript/ai/src/types.ts:430](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L430) +Defined in: [packages/typescript/ai/src/types.ts:431](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L431) ## Properties @@ -19,7 +19,7 @@ Defined in: [packages/typescript/ai/src/types.ts:430](https://github.com/TanStac inputModalities: ReadonlyArray; ``` -Defined in: [packages/typescript/ai/src/types.ts:431](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L431) +Defined in: [packages/typescript/ai/src/types.ts:432](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L432) *** @@ -29,4 +29,4 @@ Defined in: [packages/typescript/ai/src/types.ts:431](https://github.com/TanStac messageMetadataByModality: DefaultMessageMetadataByModality; ``` -Defined in: [packages/typescript/ai/src/types.ts:432](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L432) +Defined in: [packages/typescript/ai/src/types.ts:433](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L433) diff --git a/docs/reference/type-aliases/MessagePart.md b/docs/reference/type-aliases/MessagePart.md index 0599f324c..19a9eadc3 100644 --- a/docs/reference/type-aliases/MessagePart.md +++ b/docs/reference/type-aliases/MessagePart.md @@ -18,7 +18,7 @@ type MessagePart = | StructuredOutputPart; ``` -Defined in: [packages/typescript/ai/src/types.ts:405](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L405) +Defined in: [packages/typescript/ai/src/types.ts:406](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L406) ## Type Parameters diff --git a/docs/reference/type-aliases/ModalitiesArrayToUnion.md b/docs/reference/type-aliases/ModalitiesArrayToUnion.md index 66112dadd..f3e11364a 100644 --- a/docs/reference/type-aliases/ModalitiesArrayToUnion.md +++ b/docs/reference/type-aliases/ModalitiesArrayToUnion.md @@ -9,7 +9,7 @@ title: ModalitiesArrayToUnion type ModalitiesArrayToUnion = T[number]; ``` -Defined in: [packages/typescript/ai/src/types.ts:298](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L298) +Defined in: [packages/typescript/ai/src/types.ts:299](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L299) Helper type to convert a readonly array of modalities to a union type. e.g., readonly ['text', 'image'] -> 'text' | 'image' diff --git a/docs/reference/type-aliases/Modality.md b/docs/reference/type-aliases/Modality.md index f71059b1a..121a9b5d8 100644 --- a/docs/reference/type-aliases/Modality.md +++ b/docs/reference/type-aliases/Modality.md @@ -9,7 +9,7 @@ title: Modality type Modality = "text" | "image" | "audio" | "video" | "document"; ``` -Defined in: [packages/typescript/ai/src/types.ts:160](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L160) +Defined in: [packages/typescript/ai/src/types.ts:161](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L161) Supported input modality types for multimodal content. - 'text': Plain text content diff --git a/docs/reference/type-aliases/SchemaInput.md b/docs/reference/type-aliases/SchemaInput.md index 465237e48..15570fba7 100644 --- a/docs/reference/type-aliases/SchemaInput.md +++ b/docs/reference/type-aliases/SchemaInput.md @@ -12,7 +12,7 @@ type SchemaInput = | JSONSchema; ``` -Defined in: [packages/typescript/ai/src/types.ts:115](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L115) +Defined in: [packages/typescript/ai/src/types.ts:116](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L116) Union type for schema input - can be any Standard Schema compliant validator, any Standard JSON Schema compliant schema, or a plain JSONSchema object. diff --git a/docs/reference/type-aliases/StreamChunk.md b/docs/reference/type-aliases/StreamChunk.md index 7491c3837..8ab1ffccd 100644 --- a/docs/reference/type-aliases/StreamChunk.md +++ b/docs/reference/type-aliases/StreamChunk.md @@ -9,7 +9,7 @@ title: StreamChunk type StreamChunk = AGUIEvent; ``` -Defined in: [packages/typescript/ai/src/types.ts:1363](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1363) +Defined in: [packages/typescript/ai/src/types.ts:1364](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1364) Chunk returned by the SDK during streaming chat completions. Uses the AG-UI protocol event format. diff --git a/docs/reference/type-aliases/StreamChunkType.md b/docs/reference/type-aliases/StreamChunkType.md index 105769336..62b33b74f 100644 --- a/docs/reference/type-aliases/StreamChunkType.md +++ b/docs/reference/type-aliases/StreamChunkType.md @@ -9,7 +9,7 @@ title: StreamChunkType type StreamChunkType = AGUIEventType; ``` -Defined in: [packages/typescript/ai/src/types.ts:881](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L881) +Defined in: [packages/typescript/ai/src/types.ts:882](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L882) Stream chunk/event types (AG-UI protocol). diff --git a/docs/reference/type-aliases/StructuredOutputStream.md b/docs/reference/type-aliases/StructuredOutputStream.md index 40ad238f7..441333f55 100644 --- a/docs/reference/type-aliases/StructuredOutputStream.md +++ b/docs/reference/type-aliases/StructuredOutputStream.md @@ -14,7 +14,7 @@ type StructuredOutputStream = AsyncIterable< | ToolInputAvailableEvent>; ``` -Defined in: [packages/typescript/ai/src/types.ts:1250](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1250) +Defined in: [packages/typescript/ai/src/types.ts:1251](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L1251) Public type for streams returned by `chat({ outputSchema, stream: true })`. diff --git a/docs/reference/type-aliases/ToolCallState.md b/docs/reference/type-aliases/ToolCallState.md index 3bae5441d..fcd672915 100644 --- a/docs/reference/type-aliases/ToolCallState.md +++ b/docs/reference/type-aliases/ToolCallState.md @@ -11,7 +11,8 @@ type ToolCallState = | "input-streaming" | "input-complete" | "approval-requested" - | "approval-responded"; + | "approval-responded" + | "complete"; ``` Defined in: [packages/typescript/ai/src/types.ts:37](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L37) diff --git a/docs/reference/type-aliases/ToolResultState.md b/docs/reference/type-aliases/ToolResultState.md index 6877ca823..6b6b1f0b7 100644 --- a/docs/reference/type-aliases/ToolResultState.md +++ b/docs/reference/type-aliases/ToolResultState.md @@ -9,6 +9,6 @@ title: ToolResultState type ToolResultState = "streaming" | "complete" | "error"; ``` -Defined in: [packages/typescript/ai/src/types.ts:47](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L47) +Defined in: [packages/typescript/ai/src/types.ts:48](https://github.com/TanStack/ai/blob/main/packages/typescript/ai/src/types.ts#L48) Tool result states - track the lifecycle of a tool result diff --git a/examples/ts-react-chat/src/routeTree.gen.ts b/examples/ts-react-chat/src/routeTree.gen.ts index 45a3107ea..d0966d88a 100644 --- a/examples/ts-react-chat/src/routeTree.gen.ts +++ b/examples/ts-react-chat/src/routeTree.gen.ts @@ -10,6 +10,7 @@ import { Route as rootRouteImport } from './routes/__root' import { Route as RealtimeRouteImport } from './routes/realtime' +import { Route as Issue176ToolResultRouteImport } from './routes/issue-176-tool-result' import { Route as ImageGenRouteImport } from './routes/image-gen' import { Route as IndexRouteImport } from './routes/index' import { Route as GenerationsVideoRouteImport } from './routes/generations.video' @@ -38,6 +39,11 @@ const RealtimeRoute = RealtimeRouteImport.update({ path: '/realtime', getParentRoute: () => rootRouteImport, } as any) +const Issue176ToolResultRoute = Issue176ToolResultRouteImport.update({ + id: '/issue-176-tool-result', + path: '/issue-176-tool-result', + getParentRoute: () => rootRouteImport, +} as any) const ImageGenRoute = ImageGenRouteImport.update({ id: '/image-gen', path: '/image-gen', @@ -155,6 +161,7 @@ const ApiGenerateAudioRoute = ApiGenerateAudioRouteImport.update({ export interface FileRoutesByFullPath { '/': typeof IndexRoute '/image-gen': typeof ImageGenRoute + '/issue-176-tool-result': typeof Issue176ToolResultRoute '/realtime': typeof RealtimeRoute '/api/image-gen': typeof ApiImageGenRoute '/api/structured-chat': typeof ApiStructuredChatRoute @@ -180,6 +187,7 @@ export interface FileRoutesByFullPath { export interface FileRoutesByTo { '/': typeof IndexRoute '/image-gen': typeof ImageGenRoute + '/issue-176-tool-result': typeof Issue176ToolResultRoute '/realtime': typeof RealtimeRoute '/api/image-gen': typeof ApiImageGenRoute '/api/structured-chat': typeof ApiStructuredChatRoute @@ -206,6 +214,7 @@ export interface FileRoutesById { __root__: typeof rootRouteImport '/': typeof IndexRoute '/image-gen': typeof ImageGenRoute + '/issue-176-tool-result': typeof Issue176ToolResultRoute '/realtime': typeof RealtimeRoute '/api/image-gen': typeof ApiImageGenRoute '/api/structured-chat': typeof ApiStructuredChatRoute @@ -233,6 +242,7 @@ export interface FileRouteTypes { fullPaths: | '/' | '/image-gen' + | '/issue-176-tool-result' | '/realtime' | '/api/image-gen' | '/api/structured-chat' @@ -258,6 +268,7 @@ export interface FileRouteTypes { to: | '/' | '/image-gen' + | '/issue-176-tool-result' | '/realtime' | '/api/image-gen' | '/api/structured-chat' @@ -283,6 +294,7 @@ export interface FileRouteTypes { | '__root__' | '/' | '/image-gen' + | '/issue-176-tool-result' | '/realtime' | '/api/image-gen' | '/api/structured-chat' @@ -309,6 +321,7 @@ export interface FileRouteTypes { export interface RootRouteChildren { IndexRoute: typeof IndexRoute ImageGenRoute: typeof ImageGenRoute + Issue176ToolResultRoute: typeof Issue176ToolResultRoute RealtimeRoute: typeof RealtimeRoute ApiImageGenRoute: typeof ApiImageGenRoute ApiStructuredChatRoute: typeof ApiStructuredChatRoute @@ -341,6 +354,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof RealtimeRouteImport parentRoute: typeof rootRouteImport } + '/issue-176-tool-result': { + id: '/issue-176-tool-result' + path: '/issue-176-tool-result' + fullPath: '/issue-176-tool-result' + preLoaderRoute: typeof Issue176ToolResultRouteImport + parentRoute: typeof rootRouteImport + } '/image-gen': { id: '/image-gen' path: '/image-gen' @@ -501,6 +521,7 @@ declare module '@tanstack/react-router' { const rootRouteChildren: RootRouteChildren = { IndexRoute: IndexRoute, ImageGenRoute: ImageGenRoute, + Issue176ToolResultRoute: Issue176ToolResultRoute, RealtimeRoute: RealtimeRoute, ApiImageGenRoute: ApiImageGenRoute, ApiStructuredChatRoute: ApiStructuredChatRoute, diff --git a/examples/ts-react-chat/src/routes/issue-176-tool-result.tsx b/examples/ts-react-chat/src/routes/issue-176-tool-result.tsx new file mode 100644 index 000000000..0eac5c48d --- /dev/null +++ b/examples/ts-react-chat/src/routes/issue-176-tool-result.tsx @@ -0,0 +1,292 @@ +import { useMemo, useState } from 'react' +import { createFileRoute } from '@tanstack/react-router' +import { fetchServerSentEvents, useChat } from '@tanstack/ai-react' +import { clientTools } from '@tanstack/ai-client' +import { modelMessagesToUIMessages, type ModelMessage } from '@tanstack/ai' +import { recommendGuitarToolDef } from '@/lib/guitar-tools' + +const modelMessages: Array = [ + { + role: 'assistant', + content: 'Let me check the weather.', + toolCalls: [ + { + id: 'issue-176-tool-call', + type: 'function', + function: { + name: 'getWeather', + arguments: '{"city":"NYC"}', + }, + }, + ], + }, + { + role: 'tool', + content: '{"temp":72,"condition":"sunny"}', + toolCallId: 'issue-176-tool-call', + }, +] + +function Issue176ToolResultRepro() { + const [prompt, setPrompt] = useState( + 'I want an acoustic guitar recommendation. Use the required tools.', + ) + const initialMessages = useMemo( + () => modelMessagesToUIMessages(modelMessages), + [], + ) + const liveTools = useMemo( + () => + clientTools( + recommendGuitarToolDef.client(({ id }) => ({ + id: Number(id), + })), + ), + [], + ) + + const { messages: fixtureMessages } = useChat({ + id: 'issue-176-tool-result-repro', + connection: fetchServerSentEvents('/api/tanchat'), + initialMessages, + }) + const { + messages: liveMessages, + sendMessage, + isLoading, + error, + } = useChat({ + id: 'issue-176-live-tool-result-repro', + connection: fetchServerSentEvents('/api/tanchat'), + tools: liveTools, + body: { + provider: 'openai', + model: 'gpt-4o', + }, + }) + + const toolCall = fixtureMessages + .flatMap((message) => message.parts) + .find( + (part) => part.type === 'tool-call' && part.id === 'issue-176-tool-call', + ) + const toolResult = fixtureMessages + .flatMap((message) => message.parts) + .find( + (part) => + part.type === 'tool-result' && + part.toolCallId === 'issue-176-tool-call', + ) + const isFixed = + toolCall?.type === 'tool-call' && + toolCall.state === 'complete' && + toolCall.output !== undefined + const liveServerToolCall = liveMessages + .flatMap((message) => message.parts) + .find((part) => part.type === 'tool-call' && part.name === 'getGuitars') + const liveServerToolResult = liveMessages + .flatMap((message) => message.parts) + .find( + (part) => + part.type === 'tool-result' && + liveServerToolCall?.type === 'tool-call' && + part.toolCallId === liveServerToolCall.id, + ) + const isLiveFixed = + liveServerToolCall?.type === 'tool-call' && + liveServerToolCall.state === 'complete' && + liveServerToolCall.output !== undefined + + return ( +
+
+
+

+ Issue #176 manual repro +

+

+ Server tool result hydration +

+

+ This page initializes a chat from model-message history containing + an assistant server tool call followed by a matching tool result. + The original tool-call part should be complete and include output. +

+
+ +
+
+

Live LLM repro

+
+
+
+