Docs
Providers

Providers

How Facio selects model providers and how to configure them.

Facio separates provider identity from model choice. A model name, forced provider setting, configured API key, API base, and provider registry metadata all contribute to routing.

At runtime, the provider pool can switch the active provider when settings change, so a Placet settings update does not always require a restart.

Provider fields

Every non-OAuth provider can use these fields:

FieldMeaning
apiKeySecret used by the provider. Stored in config for provider credentials, or captured via Placet/API.
apiBaseOptional OpenAI-compatible base URL. Required for custom, azure_openai, and vllm.
extraHeadersExtra headers for OpenAI-compatible providers.
extraBodyExtra request body fields for provider-specific options.

Provider credentials can be set from Placet settings, the management API, config files, or supported environment variables. Provider values are never returned in clear text by the API; responses use masked state such as hasValue.

Routing rules operators should know

RuleEffect
Forced providerprovider overrides auto-routing when set to a provider name.
Model prefixA model like openrouter/anthropic/claude-... can explicitly select a provider family.
Keyword matchProvider keywords such as claude, gpt, gemini, qwen, or ollama help auto-routing.
Local fallbackConfigured local providers with an apiBase can handle plain local model names.
Gateway fallbackGateways such as OpenRouter can route many models once credentials exist.
OAuth providersOpenAI Codex and GitHub Copilot require explicit selection and stored OAuth tokens.

Provider credential API

curl http://localhost:8900/api/v1/credentials/providers \
  -H "Authorization: Bearer $FACIO_MANAGEMENT_TOKEN"

Use PUT /api/v1/credentials/providers/{name} to upsert a provider API key or base URL:

curl -X PUT http://localhost:8900/api/v1/credentials/providers/openrouter \
  -H "Authorization: Bearer $FACIO_MANAGEMENT_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"value":"sk-or-...","apiBase":"https://openrouter.ai/api/v1"}'

For create-only behavior, use POST /api/v1/credentials/providers with a body that includes name.

Provider groups

PageUse it for
Hosted providersOpenAI, Anthropic, OpenRouter, Azure, Bedrock, Gemini, DeepSeek, and other managed APIs.
Local providersOllama, LM Studio, vLLM, OVMS, and custom OpenAI-compatible endpoints.
OAuth providersOpenAI Codex and GitHub Copilot login flows.

Practical setup order

  1. Pick the provider family and model.
  2. Add the provider key or OAuth login.
  3. Set apiBase when the provider requires it.
  4. Set the default model and optional forced provider.
  5. Run /check or a small Placet test task.
  6. Add subagent, vision, image, or video model overrides only when needed.

On this page