The brain: cloud or local, decided with your numbers
The AI model is the easiest part to swap. In the cloud, OpenRouter gives you access to more than a hundred models with one key. On your computer, Ollama runs at no cost per message and sends nothing outside your machine. The choice isn't a matter of taste: it's a table with speed, quality, and cost.
Goal: compare one cloud model and one local model using the same question, then decide what to use each for based on your numbers.
01 · One contract, two brains
Click each block.
Click each block in the diagram to see what it does.
Cloud for power, local for privacy. You can use both.
02 · How to compare fairly
Click each step.
1. A real question
Choose a question you would actually ask the assistant, preferably one related to a task in your meu-jarvis.md.
Use exactly the same text with both models.
ExampleOrganize these into three priorities: finish the sales report, reply to two clients, and prepare for Thursday’s meeting.
2. Measure the time
Time it from sending until the full response arrives. Run it twice: the first call to the local model is usually slower because it needs to load.
Write down the second time.
Write downTime in seconds, cloud and local.
3. Give it a rating
Read both responses without knowing which is which, if you can ask someone to switch their order. Rate each from 1 to 5: Was it accurate? Did it follow your style? Was it useful?
A short note for each response is enough.
CriterionWould I use this response without rewriting it? Yes = 4 or 5.
4. Check the cost
For the cloud model, check the OpenRouter dashboard to see how much the question cost. Locally, each message costs nothing; the cost is keeping the computer on.
Write your decision in one line: which model for what.
DecisionDaily routine locally; client messages in the cloud.
03 · Configuration and table
The cloud key follows the same rule as the token: only in .env or the vault.
.env · cloud key
OPENROUTER_API_KEY=<paste the key you created at openrouter.ai/keys>
Switch the default provider to ollama (model llama3.2), keep openrouter as an alternative, and run the tests again. Don’t change anything outside the configuration.
minha-comparacao.md
Question:
| Model | Time (s) | Rating 1-5 | Cost |
|--------|----------|------------|------|
| Cloud: | | | |
| Local: | | | 0 |
Decision: I’ll use ____ for ____ and ____ for ____.
Simulation: illustrative example
Difficult questions, long text, and multi-step reasoning.
A computer without enough memory or a graphics card for a good local model.
You’re willing to pay for usage and send the text outside your machine.
Sensitive data that can’t leave the machine.
Many simple messages per day, where usage costs would add up.
Working without internet, or as a backup when the cloud goes down.
04 · Practice: cloud or local
Exercise E5 in sequence 2.
E5 · Cloud or local
20 min
Run the same question through a cloud model (OpenRouter) and a local one (Ollama), if your computer can handle it. Fill in the minha-comparacao.md table.
Done when: you can say which model to use for what, using your own numbers.
E5b · The saved key
5 min
Check that the OpenRouter key is only in .env (or in the vault) and that .env does not appear in git status.
Done when: A search for the key outside .env finds nothing.
05 · Test what you learned
The explanation appears after your answer.
Question 1 of 3
When does a local model (Ollama) make sense?competency
Correct
The choice is based on measurement: same question in both, table, decision. Privacy is the other strong reason: with a local model, nothing leaves your machine.
Not this one
The choice is based on measurement: same question in both, table, decision. Privacy is the other strong reason: with a local model, nothing leaves your machine.Review: How to compare fairly
Question 2 of 3
You switched from OpenRouter to Ollama. What needs to change in the channel and memory?
Correct
The loop calls the provider through the contract. Switching brains is a configuration change; the tests run the same way.
Not this one
The loop calls the provider through the contract. Switching brains is a configuration change; the tests run the same way.Review: One contract, two brains
Question 3 of 3
Why run the question twice on the local model before recording the time?
Correct
A fair comparison measures normal use. The first call includes loading the model into memory.
Not this one
A fair comparison measures normal use. The first call includes loading the model into memory.Review: How to compare fairly
Test complete
You got {a} out of {n} right. Get them all right to mark the lesson as complete.
Choose an option. The explanation appears after your attempt.