Skip to content

OpenAI-compatible & local

Beyond the built-in providers, crab’d can talk to any OpenAI-compatible endpoint (a self-hosted model, an internal proxy, a niche vendor, or a local runtime) via providers.custom.

Declare the provider; its id becomes usable in model specifiers.

.crabd.yml
providers:
allowlist: [my-llm] # a custom id must be allowlisted to be used
custom:
- id: my-llm
base_url: https://llm.internal/v1
api: openai-completions # optional; the default
api_key_env: MY_LLM_KEY # optional; env var holding the key
model: my-llm/some-model
workflow
- uses: louisescher/crabd@v0
env:
MY_LLM_KEY: ${{ secrets.MY_LLM_KEY }}
Field Description
id Provider ID used in specifiers (my-llm/model).
base_url OpenAI-compatible endpoint root.
api Wire protocol. Default openai-completions.
api_key_env Env var whose value is the API key.

Ollama is a custom provider with a shortcut. Set its base URL via env and use ollama/*:

workflow env
CRABD_OLLAMA_BASE_URL: http://localhost:11434/v1
.crabd.yml
model: ollama/llama3.1:8b
providers:
allowlist: [ollama]

To route built-in providers through a gateway or proxy (central logging, caching, data-egress control) without changing model specifiers, set providers.gateway_url:

.crabd.yml
providers:
allowlist: [anthropic, openai]
gateway_url: https://gateway.example.com

Each allowlisted built-in provider is then reached at ${gateway_url}/<provider> (e.g. https://gateway.example.com/anthropic), keeping its normal credentials. Custom providers and ollama are untouched.