model is a "provider/model" string.
The provider registry resolves each string to one runtime:
- Veryfront Cloud
- a direct vendor such as OpenAI, Anthropic, or Google
- an OpenAI-compatible service such as OpenRouter
- a local model
model in most agents to use openai/gpt-5.4-nano.
Prerequisites
- At least one agent defined under
agents/(see Agents). - One of the following:
- A Veryfront Cloud token (
VERYFRONT_API_TOKENplusVERYFRONT_PROJECT_SLUG), - An API key for a direct provider (
OPENAI_API_KEY,ANTHROPIC_API_KEY, orGOOGLE_API_KEY), or - A local inference target if you want to run without external providers.
- A Veryfront Cloud token (
Runtime conventions (recommended)
For most projects, omitmodel entirely to use openai/gpt-5.4-nano. Set
model: "auto" only when you want runtime conventions to choose the backend:
useChat() also exposes inferenceMode so you can confirm
whether the response used cloud or server-local inference.
For model: "auto", runtime conventions are:
- local development without cloud bootstrap uses explicit provider env vars or
an explicit
local/*model - Veryfront Cloud is selected automatically when
VERYFRONT_API_TOKENand project context such asVERYFRONT_PROJECT_SLUGare available VERYFRONT_DEFAULT_MODEL,VERYFRONT_DEFAULT_EMBEDDING_MODEL, andVERYFRONT_RAG_BACKENDare escape hatches, not required config
Set provider environment variables
Set only the variables for the provider you use:OPENAI_API_KEYfor OpenAI.ANTHROPIC_API_KEYfor Anthropic.GOOGLE_API_KEYfor Google.MISTRAL_API_KEYfor direct Mistral requests. Without this key, hosted Mistral models route through Veryfront Cloud when cloud bootstrap is available.OPENAI_BASE_URLfor OpenAI-compatible services.
Explicit local AI
Local inference is explicit. Use alocal/* model when you want the server to
run a curated ONNX model through @huggingface/transformers.
503 setup error. The browser never
starts a local model automatically.
Local AI uses CPU by default. To request WebGPU for local inference, use:
Model strings
Agents reference models as"provider/model". The framework splits on the first /, so nested model IDs work:
OpenAI-compatible services
Override the base URL to route through OpenRouter, Azure OpenAI, Ollama, or any OpenAI-compatible API:apiKey and baseURL are resolved per-request, so each project in a multi-tenant setup can have its own configuration.
Custom provider registration
For providers not covered by env vars, useregisterModelProvider():
doGenerate() and doStream().
Direct model resolution
For cases outside the agent system:Verify it worked
Call your agent’s AG-UI route once provider env vars are set:inferenceMode field on useChat reports
whether the call used cloud, server-local, or browser inference.