Amplify's configuration spans environment variables, localStorage settings, cookies, and feature flags. This page documents every configurable option with its default value.
Environment variables
Environment variables are set in .env.local (local) or via Cloudflare bindings (deployed). The priority chain for resolution is: cookies → localStorage → env vars → config defaults.
Provider settings
Provider-specific settings are stored in localStorage key provider_settings and cookies.
IProviderSetting interface:
interface IProviderSetting {
enabled?: boolean; // Enable/disable a provider
baseUrl?: string; // Override the default base URL
OPENAI_LIKE_API_MODELS?: string; // Fallback model list for OpenAILike
}
Custom providers are stored separately in localStorage key amplify_custom_providers with cross-tab sync via the storage event listener.
Cookie-based provider switching
API keys are stored in the
apiKeyscookie (JSON format, 365-day expiry, sameSite: lax). Provider settings are stored in theproviderscookie. This enables:- API key persistence across browser sessions
- Per-browser provider configuration (different browsers can use different providers)
- Server-side API key reading from cookies during SSE streaming
The
APIKeyPopup.tsxcomponent saves keys to both localStorage ANDjs-cookiefor maximum persistence.
Feature flags and settings
Feature flags are managed via localStorage stores defined in app/lib/stores/settings.ts:
| Store | localStorage Key | Default | Description |
latestBranchStore | isLatestBranch | false | Check for main branch updates |
autoSelectStarterTemplate | autoSelectTemplate | true | Auto-select template based on prompt |
enableContextOptimizationStore | contextOptimizationEnabled | true | Enable context budget optimization |
isEventLogsEnabled | isEventLogsEnabled | true | Enable event logging |
promptStore | promptId | 'default' | Prompt library selection |
Settings panel tabs (from app/components/@settings/core/types.ts): profile, settings, notifications, features, data, memory, cloud-providers, local-providers, github, gitlab, netlify, vercel, supabase, event-logs, mcp
IndexedDB persistence
Amplify uses IndexedDB for all persistent data storage:
Database name: amplifyHistory (version 4)
| Object Store | KeyPath | Purpose |
chats | id | Chat messages (indexes: id unique, urlId unique) |
snapshots | chatId | File state snapshots per chat |
project_files | projectId | Global per-project file state |
project_commits | id | Versioned file snapshots (indexes: projectId, createdAt) |
project_screenshots | projectId | One PNG screenshot per project |
Vector store database: amplify_vector_stores (version 1)
| Store | Key | Purpose |
stores | name | Serialized Orama database snapshots |
Rate limit configuration
Rate limits are configured per-provider and stored in localStorage key amplify:rate-limits:
interface RateLimitConfig {
rpm: number; // Requests per minute (0 = unlimited)
tpm: number; // Tokens per minute (0 = unlimited)
rpd: number; // Requests per day (0 = unlimited)
autoShrinkToTpm: boolean; // Auto-shrink context to fit TPM
}
Default values per provider:
| Provider | RPM | TPM | RPD | autoShrinkToTpm |
| 10 | 250,000 | 1,000 | false | |
| Anthropic | 50 | 80,000 | — | false |
| OpenAI | 500 | 200,000 | — | false |
| Deepseek | 60 | 100,000 | — | false |
| xAI | 60 | 16,000 | — | true |
| Groq | 30 | 30,000 | 14,400 | true |
| OpenRouter | 20 | 200,000 | 1,000 | false |
| Local (Ollama, LMStudio, OpenAILike) | 0 | 0 | 0 | false |
Docker-specific configuration
When running in Docker, additional settings apply:
| Setting | Value | Reason |
RUNNING_IN_DOCKER | true | Enables localhost → host.docker.internal URL rewriting |
extra_hosts | host.docker.internal:host-gateway | Allows connecting to host services (Ollama, etc.) |
NODE_ENV | production | Production build optimization |
COMPOSE_PROFILES | `production | development |
| Healthcheck | curl -fsS http://localhost:5173/ | Container health monitoring |
Docker URL rewriting
When RUNNING_IN_DOCKER=true, the resolveDockerUrl() method automatically rewrites:
localhost→host.docker.internal127.0.0.1→host.docker.internal
This ensures Docker containers can connect to Ollama, LMStudio, and other services running on the host machine.
Learn about self-hosting deployment