Open History to see the last commit
@tanstack/ai-lovable#
Lovable AI Gateway adapter for TanStack AI.
Installation#
npm install @tanstack/ai-lovable
Auth#
Set LOVABLE_API_KEY. Lovable creates this key per Cloud project.
export LOVABLE_API_KEY="..."
You can also pass the key to a create* factory.
Usage#
import { chat } from '@tanstack/ai'
import { lovableText } from '@tanstack/ai-lovable'
const adapter = lovableText('google/gemini-3.7-flash')
const stream = chat({
adapter,
messages: [{ role: 'user', content: 'Hello' }],
threadId: 'thread-1',
})
The default text adapter uses the Responses API. Pass { api: 'chat' } for Chat Completions.
See docs/adapters/lovable.md for chat, images, video, embeddings, speech, transcription, and BYOK.