Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.cake.ai/llms.txt

Use this file to discover all available pages before exploring further.

Providers are configured by administrators in the Cake Agents settings UI and made available to user sessions.

What You Configure

Providers define which OpenCode providers and models Cake Agents can use for session execution. They typically include:
  • provider identity
  • display name
  • base URL or endpoint
  • authentication details such as API keys or auth headers
  • the list of models users may select
Cake passes these provider definitions into the OpenCode runtime for each session. For the provider schema and provider-specific examples, see the OpenCode providers documentation.

How Cake Uses Providers

When a session starts, Cake builds the OpenCode configuration for that session from the providers currently configured in the control plane. That means:
  • providers are managed centrally
  • sessions use the approved provider definitions
  • users can only pick from models that admins have configured
If no providers are configured, users cannot start sessions.

Configure Providers in the UI

  1. Sign in to Cake Agents as an administrator.
  2. Open Settings.
  3. Navigate to Providers.
  4. Add or edit the provider JSON configuration.
  5. Enter the provider details you want to expose.
  6. Add any required secrets such as API keys or authorization headers.
  7. Define the models that users should be able to select.
  8. Save the provider configuration.
  9. Create a test session and verify the expected models appear in the model picker.
  1. Decide which provider backends you want to expose.
  2. Start from the provider format documented by OpenCode.
  3. Add only the models you intend users to access.
  4. Save the configuration in Settings > Providers.
  5. Verify that new sessions can start successfully.

Example Configurations

Anthropic example:
{
  "anthropic": {
    "models": {
      "claude-sonnet-4-6": {}
    },
    "npm": "@ai-sdk/anthropic",
    "options": {
      "apiKey": "%%SECRET%%"
    }
  }
}
OpenAI example:
{
  "openai": {
    "models": {
      "gpt-5": {},
      "gpt-5-mini": {}
    },
    "npm": "@ai-sdk/openai",
    "options": {
      "apiKey": "%%SECRET%%"
    }
  }
}
In these examples:
  • the top-level key is the provider ID
  • models defines the models users can choose from
  • npm selects the OpenCode provider package
  • options contains provider-specific configuration such as the API key
Use the redacted %%SECRET%% placeholder in the UI when editing an existing saved secret value. If your settings UI supports separate secret fields, prefer storing API keys and auth headers as secrets rather than inline JSON.

Operational Notes

  • Treat provider credentials as environment-scoped secrets.
  • Limit the available models to the set you want users to rely on.
  • Review provider settings whenever endpoint URLs, auth material, or model names change.
  • Test session creation after any provider change.