Compare the supported AI providers
You already configured OpenRouter as the first provider. Use this comparison to decide whether a direct provider adds a capability, native API feature, or independent route that you actually need. Model catalogs and commercial terms change, so verify every model ID before saving it.
Why compare providers and routes?
Chapter 10 explained that one configured route can be enough, especially when that route is OpenRouter. The practical question is now what requirement is your current route missing? Compare native features, account controls, and independent routes rather than asking which company wins.
This chapter gives you two practical outcomes:
- Understand the trade-offs—compare native features, model availability, account controls, and route independence rather than relying on a universal ranking.
- Configure the protocol correctly—the API mode, baseUrl, model ID, and thinkingFormat must match the exact provider route.
If you have not configured a key, follow Chapter 5 and Chapter 6 to start with OpenRouter. Return here only when you can name a reason to add a direct provider. GLM is one optional later provider, not the starting requirement for this English guide.
Six fields for comparing providers
Each section uses the same six fields.
| Field | What it describes | How to use it |
|---|---|---|
| Position | The provider's role in this guide | Gateway, direct model provider, or inference host |
| Model IDs | Identifiers sent in API requests | Copy an exact current ID into Pi Agent’s Models field, such as glm-4.6, gpt-5, or claude-sonnet-4-6; never infer one from a marketing name. |
| Strengths | Documented route advantages | Native features, catalog breadth, or latency characteristics |
| Limits | Constraints you must check | Availability, data policy, rate limits, and model retirement |
| Good fit | Tasks that benefit from the route | Add it only when the fit matches your work |
| Pi Agent configuration | API mode, baseUrl, and reasoning format | Use the repository-verified values and live model catalog |
The three Pi Agent fields that cause most mistakes are:
- api mode: A supported protocol identifier. Most routes use
openai-completions. Anthropic direct usesanthropic-messages. Other supported modes includeopenai-responses,google-generative-ai,mistral-conversations, andbedrock-converse-stream. - baseUrl: The endpoint for that route. An OpenAI-compatible protocol does not imply the OpenAI endpoint.
- thinkingFormat: The parser for route-specific reasoning data. Legal values include
openai,openrouter,deepseek,together,baseten,zai,qwen,chat-template,qwen-chat-template,string-thinking, andant-ling. Anthropic direct uses native blocks throughanthropic-messagesand leaves this field blank.
GLM: An optional direct provider
| Field | Details |
|---|---|
| Position | A direct Z.ai/GLM route that you may add after the OpenRouter setup. |
| Model IDs | The add-on baseline documents glm-4.6, glm-4-flash, and glm-4-air. Confirm each ID in the current provider catalog. |
| Strengths | Direct access to the provider's OpenAI-compatible endpoint and GLM-specific reasoning parsing. |
| Limits | Account eligibility, payment, availability, capability, context, and data handling are provider-specific and may change. |
| Good fit | Use when a current GLM model or direct GLM route meets a defined need. |
| Portal | https://open.bigmodel.cn/. Confirm the current international availability and documentation before registering with +886; see Chapter 5 for the first-key workflow used by this guide. |
Illustrative Pi Agent configuration:
Provider name: GLM
API mode: openai-completions
Base URL: https://open.bigmodel.cn/api/paas/v4
API key: (paste your GLM API key)
Thinking format: zai
Models: glm-4.6
zai is the documented Pi reasoning parser for this route. It is not a general setting for other providers.OpenAI: Direct API access
| Field | Details |
|---|---|
| Position | A direct route to OpenAI APIs, separate from OpenRouter. |
| Model IDs | Copy exact current API model IDs from OpenAI documentation. Versioned examples in the source include gpt-5, gpt-5-mini, and gpt-5-nano; older IDs such as gpt-4o, gpt-4o-mini, and o1-mini may have different lifecycle status, so verify before use. |
| Strengths | Direct access to OpenAI-specific API features and account controls. |
| Limits | Model lifecycle, regional availability, payment terms, rate limits, and data policies can change. |
| Good fit | Use when you require a documented OpenAI-native capability or direct route. |
| Portal | https://platform.openai.com/. Check current eligibility and billing requirements there. |
Illustrative configuration:
Provider name: OpenAI
API mode: openai-responses
Base URL: https://api.openai.com/v1
API key: (paste your OpenAI API key)
Thinking format: (copy the documented value for the exact model and route)
Models: (copy exact current model IDs from the official API documentation)
gpt-4o and every other ID here as versioned examples, and check the live API documentation before saving.Anthropic: Native Messages API
| Field | Details |
|---|---|
| Position | A direct Claude route using Anthropic's Messages API. |
| Model IDs | Use the alias format when currently documented (officially recommended, with hyphens rather than decimal points): claude-sonnet-4-6, claude-opus-4-7, and claude-haiku-4-5. A dated ID such as claude-haiku-4-5-20251001 pins a version. Direct IDs and marketing labels differ: use 4-6, not claude-sonnet-4.6, when the direct API documentation requires it. |
| Strengths | Native Anthropic content blocks and provider-specific API features when supported by the selected model. |
| Limits | Features, context, retention, eligibility, pricing, and rate limits vary by model and account. |
| Good fit | Use when you need a documented Anthropic-native feature rather than an OpenAI-compatible gateway route. |
| Portal | https://console.anthropic.com/. Check current account requirements. |
Illustrative configuration:
Provider name: Anthropic
API mode: anthropic-messages
Base URL: https://api.anthropic.com/v1
API key: (paste your Anthropic API key)
Thinking format: (leave blank for native Messages API blocks)
Models: (copy exact current model IDs from the official API documentation)
openai-completions only through a compatible gateway; direct access uses anthropic-messages. Older documentation may call this mode anthropic. Select the current documented mode or the request can fail or render incorrectly.cache_control request field. Its behavior and rates depend on Anthropic and the exact request; do not assume Pi Agent automatically caches every repeated prompt through anthropic-messages.DeepSeek: Direct OpenAI-compatible route
| Field | Details |
|---|---|
| Position | A direct provider with an OpenAI-compatible chat endpoint. |
| Model IDs | The current repository baseline and DeepSeek documentation use deepseek-chat and deepseek-reasoner. |
| Strengths | A separate direct route with a documented reasoning field for deepseek-reasoner. |
| Limits | Availability, latency, rate limits, context, prices, and account requirements may change. |
| Good fit | Use when you want the documented direct models or an independent route from OpenRouter. |
| Portal | https://platform.deepseek.com/. |
Repository-verified configuration:
Provider name: DeepSeek
API mode: openai-completions
Base URL: https://api.deepseek.com/v1
API key: (paste your DeepSeek API key)
Thinking format: deepseek <- use for deepseek-reasoner; chat can be left blank
Models: deepseek-chat
deepseek-reasoner
Groq: Hosted open-weight models
| Field | Details |
|---|---|
| Position | An inference provider that hosts a changing catalog of models. |
| Model IDs | The source lists llama-3.3-70b-versatile, llama-3.1-8b-instant, openai/gpt-oss-120b, and openai/gpt-oss-20b. Older IDs such as mixtral-8x7b-32768 and moonshotai/kimi-k2 may be retired; a Kimi route once used the -instruct-0905 suffix and may now be preview-only. Copy exact IDs from Groq’s current production list. |
| Strengths | Low-latency inference for supported models, subject to current service conditions. |
| Limits | The catalog, rate limits, context, availability, and commercial terms change. |
| Good fit | Use when a currently hosted model and its documented latency or cost fit your workload. |
| Portal | https://console.groq.com/. |
Illustrative configuration:
Provider name: Groq
API mode: openai-completions
Base URL: https://api.groq.com/openai/v1
API key: (paste your Groq API key)
Thinking format: (leave blank unless the selected model requires a documented format)
Models: (copy exact current production IDs from the Groq model documentation)
OpenRouter: The first route in this guide
| Field | Details |
|---|---|
| Position | An API gateway or aggregator that exposes models from multiple developers through one OpenAI-compatible endpoint. |
| Model IDs | Namespaced IDs use provider/model. OpenRouter commonly follows provider-facing catalog names, with examples such as anthropic/claude-sonnet-4.5, anthropic/claude-opus-5, anthropic/claude-haiku-4.5, openai/gpt-5, meta-llama/llama-3.3-70b-instruct, google/gemini-2.5-flash, and deepseek/deepseek-chat. Direct Anthropic naming can instead use 4-6, while an OpenRouter catalog entry may use 4.5; always copy the exact route ID. |
| Strengths | One initial key, one baseUrl, and access to a broad changing catalog. |
| Limits | Features and data flow can differ from a direct API. Pricing, routing, provider selection, and retention are governed by current OpenRouter terms. |
| Good fit | Start here, compare model families, and add a direct provider later only for a defined need. |
| Portal | https://openrouter.ai/. Review current account, privacy, and payment terms. |
Illustrative configuration:
Provider name: OpenRouter
API mode: openai-completions
Base URL: https://openrouter.ai/api/v1
API key: (paste your OpenRouter API key)
Thinking format: openrouter (use only for a documented reasoning route; otherwise leave blank)
Models: anthropic/claude-sonnet-4
MiniMax: An optional later provider
| Field | Details |
|---|---|
| Position | A Shanghai-based provider offering consumer and developer products. Its documented differentiator includes large context windows, but exact limits depend on the current model and route. |
| Model IDs | Copy current model IDs from MiniMax documentation. The repository’s verified editorial baseline maps MiniMax-M3 for English; source examples also include abab7-chat-preview and abab6.5s-chat. |
| Strengths | Direct access to documented MiniMax models and route-specific reasoning handling. |
| Limits | Model names, context limits, region-specific endpoints, terms, and costs require live verification. |
| Good fit | Use only when a current MiniMax model provides a capability you need. |
| Portal | International portal: https://www.minimax.io/ with api.minimax.io; mainland China portal: https://platform.minimaxi.com/ with api.minimaxi.com (note the extra i). Use the portal and matching endpoint documented for your account; credentials are not interchangeable. |
Illustrative configuration (select the Base URL matching your account):
Provider name: MiniMax
API mode: openai-completions
Base URL: https://api.minimax.io/v1 <- international account
https://api.minimaxi.com/v1 <- mainland China account
API key: (paste your MiniMax API key)
Thinking format: deepseek <- repository-tested M-series reasoning format
Models: MiniMax-M3
Six steps to add an optional direct provider
This example adds DeepSeek after the OpenRouter setup from Chapters 5–6. Other providers require their own documented API mode and endpoint.
-
Create a provider key
Open
https://platform.deepseek.com/, follow the current account process, create a key namedpi-agent-home, and store it in a password manager. Account requirements vary. -
Open the Pi Agent Models panel
Keep the existing OpenRouter card. In the Models panel, select + Add Provider or the equivalent control in your version.
-
Enter the provider fields
Name it
DeepSeek, chooseopenai-completions, enterhttps://api.deepseek.com/v1, and paste the key. Usedeepseekfor the reasoning route. -
Add exact model IDs
In Models, select + Add Model, add
deepseek-chat, and then adddeepseek-reasoner. Recheck these exact IDs in the official model page before saving. -
Run Test, then save
Select Test and wait for the displayed result. If it fails, inspect the actual error before changing fields; do not infer a fixed response-time guarantee. After a successful test, select Save.
-
Verify with a low-risk prompt
Select the direct model in Composer and send a short test. Confirm the selected route and check its provider usage record.
Choose by task, not brand ranking
Use this table after checking live catalogs.
| Task | First route to try | Optional alternative | Why |
|---|---|---|---|
| Routine household questions | A current lower-cost OpenRouter model | A direct lower-cost model | Low-risk work rarely needs premium reasoning. |
| Complex Home Assistant YAML | A current capable OpenRouter model | Anthropic, DeepSeek, or GLM direct | Review and test matter more than brand. |
| Image analysis | A current OpenRouter model with image input | A direct multimodal provider | The exact model must accept images. |
| Long log analysis | A model whose documented context fits | MiniMax or another direct large-context route | Measure input size and verify limits first. |
| Complex code | A current coding-capable model | A direct provider with required native features | Use tests and review, not reputation alone. |
| Low-latency chat | A current fast OpenRouter route | Groq direct | Measure latency in your environment. |
| A provider refuses or cannot handle a request | Choose an appropriate alternative model | An independently configured direct route | Do not try to bypass safety controls. |
| Experiment without a direct account | OpenRouter | None required | This is the guide's first-provider workflow. |
| Many model families through one key | OpenRouter | — | That is the gateway's core role. |
| Video-workflow drafting (Chapter 17) | A current model suited to the output language | An optional direct provider | Test the generated script and narration. |
Common provider problems
-
I do not know which provider to choose first
There is no universal winner. For this English guide, start with OpenRouter. Add a direct provider only when you can name the missing feature, account control, or independent route.
-
Anthropic reasoning looks different through OpenRouter
Gateway and direct APIs can expose different fields and controls. When you require a documented native feature, use Anthropic direct with API mode
anthropic-messages. That route difference is why the Anthropic section above documents a separate configuration. -
My account or payment method is rejected
Do not use informal resellers, borrowed identities, or fabricated addresses. Check current regional eligibility and payment methods. Use OpenRouter only if its terms permit your account and verify the exact model route, such as
openai/gpt-5. -
A Groq request is rate-limited
Inspect the 429 response and your account limits before assuming the quota resets that day. Reset periods and upgrade options vary by account and service.
-
Test passes, but chat times out
Test may not reproduce a long generation. Check status, request size, selected model, network path, and logs. Do not raise timeouts blindly without understanding the failed request.
-
I get 404 or model not found
Copy exact IDs from the provider’s current docs → Models page. For OpenRouter use
https://openrouter.ai/models; for Groq usehttps://console.groq.com/docs/models. Check capitalization, punctuation, namespaces, and retirement notices.
Provider FAQ
Can Pi Agent use Perplexity, xAI, or Google models?
openai-completions with the documented baseUrl, credential, and model ID. Examples include https://api.x.ai/v1 and Google’s compatibility endpoint https://generativelanguage.googleapis.com/v1beta/openai/. OpenRouter may also list these models.Can several models share one provider entry?
glm-4.6, glm-4-flash, and glm-4-air.Which route is most private?
Does switching providers break an existing Session?
Does Anthropic prompt caching work through OpenRouter?
cache_control. Support through a gateway depends on the current route, model, and request fields. Chapter 12 explains the concept. Do not assume it always fails through anthropic-messages or always receives a fixed discount through openai-completions.What does zai mean in thinkingFormat?
zai is the abbreviation used for the Zhipu AI parser ID. Compatible GLM reasoning may include <think>...</think>; use thinkingFormat: zai only when the documented route requires it. The next chapter covers reasoning formats.