Chapter 10

Why connect more than one AI provider?

Chapters 5–9 used OpenRouter as a single starting route. That is enough for many people. This chapter explains when a second, direct provider can add a useful capability or an independent fallback, so you can make a deliberate choice before Chapters 11–13.

Why use more than one provider?

Since Chapter 5, you have used one route: OpenRouter. It already gives you access to models from many developers and is enough for everyday conversation and simple automations. This chapter does not overturn that choice. It explains that using one route more often and for harder work exposes three practical limits, which come from depending on a single route rather than from OpenRouter itself.

Those three limits are:

  • Models have different strengths—a model that is good at code may be a poor choice for image analysis, and a fast model may miss details in a difficult planning task.
  • Costs vary widely—a quick household question does not need the same model as a consequential purchase or complex automation review. Check live pricing before choosing either one.
  • There is no independent fallback—providers and gateways can have outages, rate limits, or account problems. A separately configured direct provider gives you another path.

The key idea is simple: think of your model list as a toolbox, not a contest for one universal winner. Keep OpenRouter as the convenient starting point, then add a direct provider only when it solves a specific problem.

Chapter task: No configuration is required here. Read the trade-offs, then use Chapter 11 if you decide that another provider would help.

What differs from one model to another?

Provider pages and comparison articles use the terms below. Treat published values as snapshots and confirm current details in the live model catalog.

Term Plain-English meaning Why it matters
Model parameters A rough description of model size. Providers do not always publish comparable figures. Size alone does not prove quality, speed, or suitability.
Response speed (tokens per second, tok/s) How quickly output appears. Latency matters for short, interactive tasks.
Reasoning model A model designed to spend additional computation on a problem before answering. It may help on difficult work, but can cost more and take longer.
Context window The maximum amount of input and conversation history the model can process. A long file or Session can exceed a smaller window.
Multimodal The ability to process inputs such as images or audio as well as text. You need a compatible model to analyze a photo or screenshot.
Language performance How well the model understands and writes the language you use. Performance varies by model, language, and subject.
Mental model: Choose the right specialist for the task. Do not infer quality from a single benchmark or model-size claim.

Three useful model roles

Model catalogs contain many names, but most household work fits three broad roles. One model may fill more than one role.

Role Characteristics Examples Use it for
Everyday model (fast and affordable) Low latency and a price you are comfortable using often Choose a current lower-cost model in the OpenRouter catalog Short questions, drafts, and low-risk household tasks
Reasoning model (deep and slower) Uses extra computation; often slower and more expensive Current reasoning models from Anthropic, DeepSeek, GLM, or others Debugging, planning, and decisions with several constraints
Multimodal model (can process images) Accepts supported images or other media Choose a currently listed vision-capable model Appliance labels, screenshots, and floor plans

These roles can overlap: a reasoning model may also accept images and carry a premium price. Do not assume that a reasoning model never makes mistakes, or that every model from a named family accepts images; confirm capabilities on the exact model page.

Concept: Pi Agent lets you switch the selected model, as introduced in Chapter 4. OpenRouter can supply all three roles through one configured route; direct providers are optional additions.

Match the model to a household task

Use this table as a decision aid, not as a permanent ranking. Model availability and capabilities change.

Task Role What to select Why
“What should we cook tonight?” Everyday A current low-cost text model The task is simple and low risk.
“Write a sunset automation for the entry light.” Reasoning or capable general model A model with reliable coding performance You must still review and test the YAML.
“What model is this appliance?” with a photo Multimodal A model whose catalog page lists image input A text-only model cannot inspect the image.
“Should we replace the whole HVAC system?” Reasoning A current reasoning model Many constraints are involved; verify the result with a qualified installer.
“Find the error in these 200 log lines.” Large-context analysis A model with enough documented context The complete input must fit in the model window.
“Rewrite this article in fluent English.” Everyday or writing-focused A model that performs well in English Language quality matters more than deep reasoning.
“Explain this Home Assistant error.” Reasoning A model with good technical performance Ask it to cite the relevant log line or official documentation.
“Help me think through an idea.” Personal preference The model whose responses you find useful There is no single objective winner for conversation style.

The pattern is clear: no provider covers every need perfectly. Start with the OpenRouter route you already configured. Add a direct provider only for a documented feature, independent availability, or separate account controls.

Compare costs without relying on stale prices

Providers usually meter input and output in tokens. A token is not exactly a word, and tokenization differs by language and model. Long prompts, files, tool results, reasoning output, and repeated Session history can all increase usage.

Pricing changes too quickly for a converted local-currency table to remain authoritative. Compare the live provider page using the same workload and the exact model ID:

Model class Typical role Check for input Check for output Also verify
Small or low-latency model Everyday work Current price per token unit Current price per token unit Free-tier and rate-limit terms, if any
General model Balanced work Cached and uncached rates Standard output rate Image or tool-call pricing
Multimodal model Image analysis Image-input calculation Text-output rate Supported formats and limits
Premium reasoning model Difficult analysis Prompt and cache rates Reasoning and answer rates Reasoning controls and maximum output
Open-weight model through a host Low-cost or fast work Host-specific rate Host-specific rate Availability and model retirement policy

The same model family can have different prices and features through different routes. Check the exact model ID and provider before estimating a budget.

A cheap answer is not automatically good value, and an expensive answer is not automatically correct. Match effort to risk, then verify consequential advice independently.

Important pricing note: The comparison above describes categories, not fixed quotes. Prices, credits, rate limits, and account controls change frequently. Review the provider's current official pricing before estimating a budget (search for “provider name pricing” and open the official page). Use this table to compare the kinds of charges that matter, not as an invoice calculator.

Three risks of relying on one route

“Single point of failure” sounds abstract until it interrupts a real task.

  1. The selected model cannot handle the task

    A text-only model cannot inspect an image, and every provider applies its own safety and product policies. Without another suitable model or route, the task stops there.

  2. Every task uses an unnecessarily expensive model

    If one premium model is your only choice, routine questions can consume a budget intended for difficult work. Keep a lower-cost option available and monitor actual usage.

  3. The route is unavailable

    A gateway or direct provider can experience an outage, rate limit, or account issue. A separately configured route may let you continue, but it is not a guarantee of availability. Check official status pages such as status.anthropic.com or status.openai.com when diagnosing an outage.

Danger: Never make a safety-critical automation depend entirely on a cloud model. Locks, alarms, gas, and electrical safeguards need deterministic, non-AI fallback logic.

Five benefits of multiple providers

An additional provider is useful when it gives you one of these concrete benefits:

  • Specialization: Use a lower-cost model for routine work, a reasoning model for difficult analysis, and a multimodal model for images.
  • Fallback: Continue through an independent route when the primary route is unavailable or rate-limited.
  • Comparison: Compare important answers, while remembering that agreement between models is not proof.
  • Account separation: Keep usage and access controls separate for different purposes.
  • Better judgment: Learn which model characteristics matter for your own work instead of following a generic ranking.

OpenRouter is an API gateway or aggregator: one key and one endpoint can reach many models. Because this guide starts with OpenRouter, you may already have enough breadth. Use a direct provider as a focused addition when its native API features, terms, or independent route matter to you.

Before you add a direct provider

The workflow resembles Chapters 5–6: create an account and key, enter the documented API mode and endpoint, add an exact current model ID, run Test, and save. Add one direct provider only once you can name the requirement it meets.

Step What to verify Ongoing maintenance
Create the provider account Current eligibility and account requirements Review provider notices
Create and copy an API key Scope and storage location Rotate or revoke it when needed
Add it in the pi-web Models panel API mode, base URL, and exact model ID, following the pattern in Chapter 6 Update retired model IDs
Give the provider card a clear name Distinguish direct routes from OpenRouter routes Keep names understandable
Save and select it when needed Test with a low-risk prompt Monitor live usage
Tip: Add one route at a time. A defined requirement is a better reason than collecting providers.

For security, remember that provider keys are stored in plaintext—not encrypted at rest—in /data/pi-agent/models.json. Pi Agent uses the selected route's key when sending a request to that route's configured endpoint. Anyone who can read the file can read every key stored there, so protect Home Assistant and host access, verify each base URL, limit key scope where supported, and revoke a key if you suspect exposure. Provider budget controls vary; confirm them in the current dashboard rather than assuming they exist.

Common concerns

  1. “I will lose track of several keys.”

    The practical answer is simple: name each provider card clearly, such as “OpenRouter — household” or “Anthropic — direct.” Store keys in a password manager and never put the key itself in the display name.

  2. “Usage could increase without my noticing.”

    Review usage in each provider dashboard and use any current limits or alerts the provider offers. Do not assume Pi Agent automatically enforces a monthly budget. Chapter 12 explains how reasoning can affect usage.

  3. “Do I need to understand every API?”

    No. Pi Agent handles several API modes for you. Choose the mode and base URL documented for the provider; do not assume every endpoint is OpenAI-compatible.

  4. “Does Nabu Casa include these model APIs?”

    No. Nabu Casa is Home Assistant's cloud service, and it is not a third-party model provider. Check the current Home Assistant and Nabu Casa documentation for included features; a Pi Agent provider still requires the credentials for that route.

  5. “What if I choose the wrong provider?”

    Test with a small, low-risk task. If the route does not meet your needs, remove it from Pi Agent and revoke its key in the provider dashboard. Account and payment terms vary, so check them before signing up.

Provider FAQ

Do I need several providers?
No. OpenRouter may already expose every model type you need. If you do not have a specific pain point, keep using one route. Add a direct provider only for a specific native feature, separate account controls, or an independent route.
Which direct provider should I add first?
Start from the missing capability, not a universal ranking. For deeper reasoning, compare current reasoning models. For images, choose a model whose exact page lists image input. For low latency, compare current hosted options. For broad model access, remember that OpenRouter may already provide it. Check Chapter 11, then verify the exact model and feature in current documentation.
Which provider types does Pi Agent support?
The authoritative API-mode list includes openai-completions, openai-responses, anthropic-messages, google-generative-ai, mistral-conversations, and bedrock-converse-stream. A provider still needs a compatible endpoint and configuration. Compare routes in Chapter 11 and consult the Appendix for key details.
Can one provider see another provider's key?
Pi Agent uses the selected route's credential for a request to its configured endpoint; verify the base URL before saving or testing a route. All keys are plaintext in /data/pi-agent/models.json, so anyone who can read that file can read every stored key. Other providers do not receive unrelated keys through this request flow. The main risk is unauthorized access to Home Assistant or the host itself, so secure both and revoke exposed credentials.
Can Pi Agent choose a model automatically?
The documented Pi Agent workflow uses the model selector described in Chapter 13. Some gateways offer routing features, but their behavior and controls are gateway-specific. Verify the current route before relying on it.
Will Pi Agent automatically switch when a quota is exhausted?
Do not assume it will. If a request fails, inspect the error and select another configured model yourself. Automatic provider routing, where offered, has separate terms and behavior.
How much should I budget each month?
There is no reliable universal figure because all fixed estimates become stale. A low-cost everyday model, a balanced reasoning model, and a premium model can have very different rates. Set a monthly budget from live provider prices and your measured usage, including prompt length, output, tools, images, and reasoning.
Does adding another provider slow down pi-web?
Adding entries mainly adds choices to the model selector. Requests use the selected route and do not all run at once. The only extra overhead is choosing which model fits the task; test performance in your environment rather than assuming a fixed latency.