5. Configuration

Config home directory

Rayu resolves a single config home directory used for settings, providers, sessions, skills, projects, etc. Resolution order:

  1. RAYU_CONFIG_DIR — explicit override.
  2. ~/.rayu — if it exists (Rayu's own config).
  3. ~/.rayu — default for fresh installs.

Force a different directory with the env var:

RAYU_CONFIG_DIR=/tmp/rayu-test rayu  # isolated/throwaway config

Files & locations

Within the config home (e.g. ~/.rayu/):

PathPurposeNotes
providers.jsonRayu providers: id, kind, apiKey, baseURL, default/fetched models, context overrides, subagent/image/video selectionsmode 0600 (secrets)
settings.jsonUser settings, incl. the selected model
diagnostics.jsonlRecorded bugs/issues/vulnerabilitiesappend-only JSONL
rayu-auth.jsonRayu OAuth session token (when using Rayu hosted login)mode 0600
rayu-entitlements.jsonCached plan entitlements for the signed-in usermode 0600; refreshed every 30s
gemini-oauth.jsonVertex AI OAuth refresh tokenmode 0600
gemini-login.jsonLogin-with-Gemini (Code Assist) OAuth tokenmode 0600
projects/Per-project session transcripts
skills/, agents/, …Skills/agents/etc.

When RAYU_CONFIG_DIR is set, all config files live inside that directory instead of the default ~/.rayu.

providers.json schema

{
  "activeProvider": "nvidia",
  "subagent": { "providerId": "nvidia", "model": "meta/llama-3.3-70b-instruct" },
  "subagentByAgent": { "backend": { "providerId": "deepseek", "model": "deepseek-chat" } },
  "imageModel": "imagen-4.0-generate-001",
  "videoModel": "veo-3.1-generate-001",
  "projectProfile": "default",
  "providers": [
    {
      "id": "nvidia",
      "kind": "openai-compatible",
      "apiKey": "nvapi-xxxxx",
      "baseURL": "https://integrate.api.nvidia.com/v1",
      "defaultModel": "meta/llama-3.3-70b-instruct",
      "smallFastModel": "nvidia/llama-3.1-nemotron-nano-8b-v1",
      "models": ["my/custom-model"],
      "fetchedModels": ["...catalog from /v1/models..."],
      "contextWindow": 131072,
      "modelContextWindows": { "deepseek-ai/deepseek-v4-flash": 1000000 }
    },
    { "id": "anthropic", "kind": "anthropic", "apiKey": "sk-ant-xxxxx" },
    { "id": "bedrock", "kind": "bedrock", "bedrockApi": "converse", "apiKey": "aws-xxxxx", "awsRegion": "us-east-1" },
    { "id": "gemini-vertex", "kind": "vertex", "gcpProject": "my-project", "gcpRegion": "global" },
    { "id": "kiro", "kind": "kiro", "kiroAuthType": "oauth" }
  ]
}
FieldMeaning
activeProviderid of the provider currently in use
kindanthropic, openai-compatible, bedrock, vertex, genai, kiro, copilot, or rayu-hosted
apiKeyprovider API key (secret)
baseURLendpoint base (openai-compatible)
defaultModelmodel used until you switch / fallback
smallFastModelmodel for cheap requests (titles, etc.); defaults to defaultModel
modelsuser-pinned model ids (shown in /model)
fetchedModelscached catalog from GET {baseURL}/models
contextWindowprovider-wide context default (tokens)
modelContextWindowsper-model context overrides (tokens)
awsRegionAWS region for Bedrock (default us-east-1)
bedrockApiconverse, openai, or anthropic for Bedrock presets
gcpProjectGCP project id for Vertex AI
gcpRegionGCP region for Vertex AI (default global)
kiroAuthTypeapikey or oauth for Kiro providers

You can edit this file by hand; restart Rayu to pick up changes.

Environment variables

Config & providers

VariableEffect
RAYU_CONFIG_DIROverride config home dir
RAYU_OPENAI_COMPATIBLE=1Force the OpenAI-compatible client path
RAYU_OPENAI_BASE_URLBase URL for the OpenAI-compatible endpoint
RAYU_OPENAI_API_KEYAPI key for the OpenAI-compatible endpoint
ANTHROPIC_API_KEYAnthropic API key (auto-imported)
NVIDIA_API_KEYNVIDIA NIM (auto-imported)
DEEPSEEK_API_KEYDeepSeek (auto-imported)
DOUBLE_WORD_API_KEY / DOUBLEWORD_API_KEYDoubleword (auto-imported)
ZAI_API_KEY / ZHIPUAI_API_KEY / GLM_API_KEYGLM — Z.ai (auto-imported)
MINIMAX_API_KEYMiniMax (auto-imported)
KIMI_API_KEY / MOONSHOT_API_KEYKimi / Moonshot (auto-imported)
KIMI_FOR_CODE_API_KEYKimi for Code (auto-imported)
SAKANA_API_KEYFugu — Sakana AI (auto-imported)
OPENAI_API_KEYOpenAI (auto-imported)
GEMINI_API_KEY / GOOGLE_API_KEYGoogle Gemini API key (auto-imported)
OPENROUTER_API_KEYOpenRouter (auto-imported)
XAI_API_KEYxAI / Grok (auto-imported)
GROQ_API_KEYGroq (auto-imported)
FIREWORKS_API_KEYFireworks AI (auto-imported)
TOGETHER_API_KEY / TOGETHERAI_API_KEYTogether AI (auto-imported)
CEREBRAS_API_KEYCerebras (auto-imported)
BASETEN_API_KEYBaseten (auto-imported)
DEEPINFRA_API_KEYDeepInfra (auto-imported)
HF_TOKEN / HUGGINGFACE_API_KEY / HUGGING_FACE_HUB_TOKENHugging Face (auto-imported)
KIRO_API_KEYKiro (auto-imported)
AWS_BEARER_TOKEN_BEDROCKAWS Bedrock bearer token (auto-imported into bedrock preset)
AWS_REGION / AWS_DEFAULT_REGIONAWS region for Bedrock (default us-east-1)
OLLAMA_HOSTOverride Ollama server address (bare port, host:port, or full URL)

Models & context

VariableEffect
RAYU_CONTEXT_TOKENSForce the context window (tokens) for the active model
ANTHROPIC_MODELDefault model id (Anthropic-style precedence)
ANTHROPIC_SMALL_FAST_MODELOverride the small/fast model

Diagnostics & privacy

VariableEffect
RAYU_DIAGNOSTICS=1Also echo diagnostics to stderr
RAYU_DIAGNOSTICS_NO_FILE=1Don't persist diagnostics to disk
RAYU_TELEMETRY=1Opt back into telemetry (off by default)
DISABLE_TELEMETRYForce telemetry off (no-telemetry)

See Diagnostics & Privacy for the privacy model.

Project settings & memory

Rayu reads project files when present:

  • RAYU.md, .rayu/RAYU.md, .rayu/rules/*.md — project memory/instructions.
  • .rayu/settings.json, .rayu/settings.local.json — project/local settings.
  • .mcp.json — project MCP servers.

Next: CLI Reference →