Loading workspace insights... Statistics interval
7 days30 daysLatest CI Pipeline Executions
cc3d1a78 docs: fix outdated adapter/tool APIs and add typed-options guide
Sweep across docs to bring examples back in line with the current
public surface, plus a new guide for the createXxxOptions family.
Broken-import fixes (would have failed for users on copy-paste):
- openai/gemini: openaiTTS/geminiTTS -> openaiSpeech/geminiSpeech
- openai/anthropic/gemini: OpenAIChatConfig/AnthropicChatConfig/
GeminiChatConfig -> *TextConfig
- openai/anthropic/gemini: corrected the createXxxChat curry pattern
to the real (model, apiKey, config?) signature
- groq: removed fictional groqSpeech TTS section
- grok: corrected false "no TTS / no transcription" limitations and
documented grokSpeech, grokTranscription, grokRealtime; fixed
toStreamResponse -> toServerSentEventsResponse
- fal: removed fictional createFalImage / createFalVideo aliases
- elevenlabs: added Speech / Audio / Transcription sections
- ollama: corrected ollamaText / createOllamaChat factory signatures
- media/text-to-speech: global TTS -> Speech rename, fixed missing
model args and explicit-API-key examples
- advanced/multimodal-content: removed fabricated assertMessages
section, replaced with a Standard-Schema validation example
- advanced/middleware: toolCacheMiddleware imports point at the
@tanstack/ai/middlewares subpath where the symbol actually lives
- getting-started overview / quick-start: added missing `z` imports
- getting-started quick-start-vue + api/ai-vue: corrected Vue
template antipattern (refs auto-unwrap in templates; .value is
only needed inside <script setup>)
- tools/tool-approval: corrected ToolCallState lifecycle to the
real enum (awaiting-input, input-streaming, input-complete,
approval-requested, approval-responded, complete); use part.input
instead of stringifying the JSON-string part.arguments
- tools/client-tools: replaced invented `completed` state with the
real `complete` state and fixed a broken state-check snippet
- tools/tool-architecture: part.arguments.to (string treated as
object) -> part.input.to
- tools/tools, server-tools: "JSON Schema infers `any`" -> the real
behavior is `unknown` (Standard Schema validators give full
inference)
- code-mode: removed legacy chat({ model: "..." }) field
- generateSpeech JSDoc + auto-generated reference: openaiTTS ->
openaiSpeech so docs stay correct after the next regenerate
New content:
- docs/advanced/typed-options.md — covers the full createXxxOptions
family (chat, summarize, image, audio, video, speech,
transcription), what they do (capture an adapter's full type so
options stay narrowed when spread), what they don't (no runtime
behavior), with journey-style examples. Added to config.json nav.
Verified with `pnpm test:docs` (298 markdown files, no broken links)
and `pnpm --filter @tanstack/ai test:types`.