DOCS
Modelos
Keys en el runtime. El cliente elige un model id; el failover es transparente para la UI.
Modelos
Keys en el runtime. El cliente elige un model id; el failover es transparente para la UI.
Filas de catálogo, keys OpenAI y Anthropic, SVEDA_FAILOVER y URLs propias.
Bring your own key
Catalog lives on the runtime, not in the JS client. Add an OpenAI (ChatGPT) or Anthropic (Claude) key, or point a row at any Responses / Anthropic-compatible URL. DeepSeek ids in the builtin list are one optional wrapper — not a lock-in. Product: models.
responses ChatGPT / OpenAI-compatible
Protocol Responses. Your OpenAI key, or any host that speaks POST {url}/responses.
anthropic Claude / Anthropic-compatible
Protocol Anthropic. Your Anthropic key, or any host that speaks POST {url}/messages.
deepseek-v4-flash-responses DeepSeek wrapper (optional)
One builtin wrapper, not the product. Protocol Responses. Filled by DEEPSEEK_API_KEY if you use it.
Protocols
Custom catalog entries set
protocol
to
responses
or
anthropic,
plus
url,
key, and
api_model.
The HTTP client posts to:
Responses POST {url}/responses
Anthropic POST {url}/messagesResponses POST {url}/responses
Anthropic POST {url}/messages Env
-
Catalog rows in sveda.yaml take
url,protocol(responsesoranthropic), key, andapi_model. That is how you attach ChatGPT, Claude, or a self-hosted compatible API. -
DEEPSEEK_API_KEY(orSVEDA_DEEPSEEK_API_KEY) fills the optional DeepSeek wrappers only. -
SVEDA_DEFAULT_MODELsetsdefault_id. -
SVEDA_FAILOVERis a comma-separated list of catalog ids, walked after the primary.
Failover is ordered: primary model first, then
failover_ids.
The client still calls
session.send
once. Stream event types do not change.
Model failover.
# sveda.yaml — keys may also come from the environment.
default_model: gpt-4.1-mini
failover:
- claude-sonnet
models:
- id: gpt-4.1-mini
label: ChatGPT
protocol: responses
api_model: gpt-4.1-mini
url: https://api.openai.com/v1
key: ""
- id: claude-sonnet
label: Claude
protocol: anthropic
api_model: claude-sonnet-4-5
url: https://api.anthropic.com
key: ""
# Optional DeepSeek wrapper, from the environment:
# DEEPSEEK_API_KEY=sk-...# sveda.yaml — keys may also come from the environment.
default_model: gpt-4.1-mini
failover:
- claude-sonnet
models:
- id: gpt-4.1-mini
label: ChatGPT
protocol: responses
api_model: gpt-4.1-mini
url: https://api.openai.com/v1
key: ""
- id: claude-sonnet
label: Claude
protocol: anthropic
api_model: claude-sonnet-4-5
url: https://api.anthropic.com
key: ""
# Optional DeepSeek wrapper, from the environment:
# DEEPSEEK_API_KEY=sk-... Per-turn model
session.send
may pass
model
(catalog id, alias, or API model name). Empty uses the runtime default. Failover still applies to that resolved primary.
await session.send('Ship the copilot.', {
model: 'your-catalog-id',
})await session.send('Ship the copilot.', {
model: 'your-catalog-id',
})