DevTools AI

Configuration

Environment variables

VariableRequiredDescription
OPENROUTER_API_KEYYesServer-only. Read exclusively in src/lib/ai/openrouter-client.ts and never sent to the browser.
NEXT_PUBLIC_SITE_URLNoUsed for metadata, OpenGraph tags, and the sitemap.

Allowed models

The tools endpoint rejects any model not present in src/config/models.ts. This keeps the app limited to a curated list of free OpenRouter models rather than accepting arbitrary model IDs from the client. Add a model there to make it selectable in Settings.

User preferences

Model, temperature, and max tokens are stored in a Zustand store persisted to localStorage under the key devtools-ai:settings (see src/lib/store/settings-store.ts). Theme is managed separately by next-themes. Neither is sent to a server.