What problem does it solve?
Developers integrating TanStack AI need concise, up-to-date guidance to choose and configure the right tree-shakeable provider adapters, ensure per-model type safety, set the correct environment variables, and avoid mixing legacy monolithic patterns.
Core Features & Use Cases
- Adapter Coverage: Documents how to create tree-shakeable adapters for OpenAI, Anthropic, Gemini, Grok, Groq, OpenRouter, and Ollama, including the factory signatures and env vars for each provider.
- Reasoning & Runtime Control: Explains how to tune provider-specific
modelOptions for reasoning, thinking, safety, structured output, and GPU budgeting, plus how to map provider/model combos for runtime switching.
- Extension & Guardrails: Shows how to use
extendAdapter() and createModel() for custom or fine-tuned models while keeping compile-time safety, and highlights common mistakes such as using deprecated monolithic adapters or wrong env var names.
Quick Start
Configure the OpenAI text adapter for gpt-5.2 with the OPENAI_API_KEY and reasoning effort high before starting a chat session.