Providers
Models and providers

Providers

3. Providers#

A provider is where model requests actually go. RayuCode v3 supports two credential shapes, but the shipped public build enables only the first.

BuildProvidersCredentials
Public release (default)Rayu onlyRayu account session, or a Rayu API key
ENABLE_OTHER_PROVIDER=trueRayu + third-partyThe above, plus provider keys and OAuth subscriptions

Check which one you have:

bash
rayu provider list

A public build prints a single row:

text
rayu	Rayu	Rayu hosted models with live catalog

Rayu hosted models#

Rayu's catalog is served by Rayu's gateway and billed to your plan credits. It is not "connect a provider": the provider registers itself as soon as you have a Rayu credential.

Sign in with an account session:

bash
rayu login --provider rayu

or set an API key:

bash
export RAYU_API_KEY=rayu_sk_live_...

Both reach the same catalog. A Rayu API key and an account session are either-or; /logout and a fresh /login replace one with the other.

What you get:

  • The model list, labels, context windows and capabilities come live from Rayu, so a newly added model appears without a rayu update. See Models.
  • Usage is metered in credits against your plan. See Credits & limits.
  • The catalog your credential may use is narrowed by the plan and, for API keys, by the key's own allowlist.

Where the credential lives#

CredentialLocation
Account session~/.rayu/rayu-auth.json (refresh handled automatically)
API key from the environmentRAYU_API_KEY
API key stored by the CLI~/.rayu/providers.json (rayu.apiKey) or ~/.config/rayucode/rayu.env

Nothing is written to a system-level store, and no provider secret is ever attached to a dashboard or API request.

Choosing a model#

text
/model

The picker aggregates everything the credential can use. Type to filter against model ids, ↑/↓ to move, Enter to select, Esc to cancel. Selecting a model persists across restarts.

rayu model list                    # ids you can pass to --model
rayu --model deepseek-v4.1-flash-cloud

Shift+Tab cycles your favorites without opening the picker. Ctrl+N toggles a favorite and Ctrl+O sets the default while the picker is open.

Reasoning effort and speed#

Effort changes how much reasoning budget a model spends. It is per session and persisted in [provider] for OpenAI/Anthropic-shaped models when you set it on the command line.

text
/effort low
/effort medium
/effort high
/effort max

Valid levels are none, minimal, low, medium, high, xhigh, max and swarm. Alt+Left/Alt+Right (or Option on macOS) cycle effort without typing. /fast toggles fast mode where the provider supports a priority tier.

Diagnosing a credential#

bash
rayu auth status                  # what is configured
rayu account status               # email, plan, credits, reset date
rayu auth doctor                  # auth problems and next steps
rayu auth-test                    # full end-to-end probe + smoke turn
rayu usage                        # live plan/credit usage

Inside a session the equivalents are /auth, /account rayu status, and /usage.

If a request fails with 401, Rayu renews the session once and replays it. If the refresh token itself is dead, the stale session is cleared so /login opens instead of claiming you are already signed in.

Bring-your-own-key builds#

A source build with ENABLE_OTHER_PROVIDER=true adds third-party providers. Everything below applies only to those builds; on a public release the commands answer with "Other providers are disabled in this build".

bash
rayu login claude                 # Anthropic (OAuth or API key)
rayu login openai                 # OpenAI
rayu login gemini                 # Google
rayu login deepseek               # DeepSeek
rayu provider list                # every enabled provider id

Provider ids accepted by --provider in such a build include rayu, claude, anthropic-api, openai, openai-api, openrouter, bedrock, azure, opencode, opencode-go, zai, kimi, 302ai, baseten, conifer, cortecs, comtegra, deepseek, fpt, firmware, hugging-face, moonshot-ai, nebius, scaleway, stackit, groq, mistral, perplexity, together-ai, deepinfra, fireworks, novita, minimax, xai, grok-build, nvidia-nim, xiaomi-mimo, meta-muse, muse-subscription, celeris, venice, yolo-auto, lmstudio, ollama, chutes, cerebras, belvedir, orcarouter, alibaba-coding-plan, openai-compatible, cursor, copilot, gemini, gemini-api, antigravity, google.

Provider keys from the environment#

Keys found in the environment or a .env-style provider env file are picked up automatically:

env
ANTHROPIC_API_KEY=sk-ant-xxxxx
OPENAI_API_KEY=sk-xxxxx
DEEPSEEK_API_KEY=sk-xxxxx
GEMINI_API_KEY=xxxxx

Provider env files live in ~/.config/rayucode/<provider>.env (anthropic.env, openai.env, deepseek.env, gemini.env, …). rayu login <provider> --api-key-stdin writes them with owner-only permissions.

Custom OpenAI-compatible endpoints#

bash
rayu provider add my-gateway \
  --base-url https://llm.example.com/v1 \
  -m qwen3-coder \
  --api-key-env MY_GATEWAY_API_KEY \
  --set-default

That writes a [providers.my-gateway] entry into ~/.rayu/config.toml, and the profile is then usable with --provider-profile my-gateway.

Security#

  • A provider credential is only ever sent to that provider's configured host.
  • Keys are never logged and never echoed back to the terminal.
  • OAuth tokens refresh automatically and are stored under ~/.rayu or the provider env directory, not in a project.

Next: Models →