Overview
Providers are selected via themodel field on each agent definition using a provider:model URI:
OpenAI
Uses the official OpenAI Python SDK. URI format:openai:<model-name>
Any model name supported by the OpenAI chat completions API can be used.
Anthropic
Uses the official Anthropic Python SDK. URI format:anthropic:<model-name>
The Anthropic provider extracts any
system-role message and passes it as the top-level system parameter, as required by the Anthropic Messages API. max_tokens defaults to 4096 but is overridden per node by max_tokens_per_call.Ollama
Uses Ollama’s OpenAI-compatible API via the OpenAI Python SDK. URI format:ollama:<model-name>
Start Ollama locally:
Ollama must be running and the model must be pulled locally before running a workflow that references it.
Mixing Providers
You can use different providers in a single workflow. Each agent independently resolves its own provider:Error Handling
Provider URIs are validated when the workflow is executed. An invalid URI raisessirenspec.exceptions.ProviderError (a subclass of SirenSpecError):
ProviderError is raised:
Token Tracking
Each provider records prompt and completion token counts from every call. This usage data is surfaced in the execution trace under theusage field:
tokens field is the sum of prompt and completion tokens; the usage field provides the detailed breakdown. estimated_usd is computed from a bundled LiteLLM pricing snapshot — it is null for models without a pricing entry (Ollama and other local backends), so the examples above show null. See Budget & Cost Control for details.