Skip to content

Configuration

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:

typescript
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 apiKeys cookie (JSON format, 365-day expiry, sameSite: lax). Provider settings are stored in the providers cookie. 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.tsx component saves keys to both localStorage AND js-cookie for maximum persistence.

Feature flags and settings

Feature flags are managed via localStorage stores defined in app/lib/stores/settings.ts:

StorelocalStorage KeyDefaultDescription
latestBranchStoreisLatestBranchfalseCheck for main branch updates
autoSelectStarterTemplateautoSelectTemplatetrueAuto-select template based on prompt
enableContextOptimizationStorecontextOptimizationEnabledtrueEnable context budget optimization
isEventLogsEnabledisEventLogsEnabledtrueEnable event logging
promptStorepromptId'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 StoreKeyPathPurpose
chatsidChat messages (indexes: id unique, urlId unique)
snapshotschatIdFile state snapshots per chat
project_filesprojectIdGlobal per-project file state
project_commitsidVersioned file snapshots (indexes: projectId, createdAt)
project_screenshotsprojectIdOne PNG screenshot per project

Vector store database: amplify_vector_stores (version 1)

StoreKeyPurpose
storesnameSerialized Orama database snapshots

Rate limit configuration

Rate limits are configured per-provider and stored in localStorage key amplify:rate-limits:

typescript
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:

ProviderRPMTPMRPDautoShrinkToTpm
Google10250,0001,000false
Anthropic5080,000false
OpenAI500200,000false
Deepseek60100,000false
xAI6016,000true
Groq3030,00014,400true
OpenRouter20200,0001,000false
Local (Ollama, LMStudio, OpenAILike)000false

Docker-specific configuration

When running in Docker, additional settings apply:

SettingValueReason
RUNNING_IN_DOCKERtrueEnables localhost → host.docker.internal URL rewriting
extra_hostshost.docker.internal:host-gatewayAllows connecting to host services (Ollama, etc.)
NODE_ENVproductionProduction build optimization
COMPOSE_PROFILES`productiondevelopment
Healthcheckcurl -fsS http://localhost:5173/Container health monitoring
Docker URL rewriting

When RUNNING_IN_DOCKER=true, the resolveDockerUrl() method automatically rewrites:

  • localhosthost.docker.internal
  • 127.0.0.1host.docker.internal

This ensures Docker containers can connect to Ollama, LMStudio, and other services running on the host machine.

Learn about self-hosting deployment