Provider Comparison
On this page
A single-glance summary of behavioral differences across the seven interfaces. Every row below is drawn directly from the source of each module — see the linked API page for details and code.
Choosing an interface
- Need multi-turn message-history calls? All seven interfaces now accept
messagesdirectly — see Architecture §promptvsmessagesfor the payload-shape differences per provider (Gemini's role translation, Ollama's endpoint switch, AWS's block-shape requirement). - Need tool/function calling? All seven interfaces accept the same unified
toolsschema — see Tool Calling for the per-provider conversion table and the one caveat (Ollama forces a non-streaming request whentoolsis set). - Calling many models through one AWS account/IAM setup, including non-Anthropic models? AWS Bedrock via
AWSInterfacelets you swapmodel_name(e.g. Claude, Llama, Titan, Mistral, Nova) without changing code. - Running fully offline/local, no API key?
OllamaInterface— but budget for its extra startup behavior (auto-startingollama serve, or reachability checks) at construction time. - Working against Gemini's free tier?
GeminiInterface's built-in rate limiting and retry logic exist specifically for this — but be aware every call can add up to ~5 seconds of enforced spacing. - Need the error path to be easy to detect programmatically? OpenAI/Anthropic/Groq/AWS return a
dictwith an"error"key on failure; Gemini/Mistral/Ollama return a plain"Error: ..."-prefixed string, so you'd check withresult.startswith("Error")/"❌"instead ofisinstance(result, dict)— but see theValueError-uncaught row above before assuming every failure mode on Gemini/Ollama comes back as a string rather than an exception.
Related pages
- Architecture for the shared contract every interface follows.
- Tool Calling for the unified
toolsschema and per-provider conversion. - Configuration for exactly which
llm_configfields are (and aren't) wired up per provider.