Your Jarvis|INEMA.CLUB-PRO

Lesson 6 · 15 min

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.

Start lesson
A small desktop computer beside a laptop, with cables neatly arranged on a dark desk.

In this lesson, you will

  1. 1What OpenRouter and Ollama do
  2. 2Why changing the brain doesn't change the rest
  3. 3Build the speed × quality × cost table
  4. 4Where the cloud key is stored

Goal: compare one cloud model and one local model using the same question, then decide what to use each for based on your numbers.

01One 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.

02How 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.

03Configuration 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>
config.json · both providers (from the README)
"providers": {
  "default": "openrouter",
  "openrouter": { "model": "anthropic/claude-sonnet-4-20250514" },
  "ollama": { "model": "llama3.2", "base_url": "http://localhost:11434" }
}
Request to the agent · switch the brain
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.

04Practice: 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.

05Test what you learned

The explanation appears after your answer.

Question 1 of 3

When does a local model (Ollama) make sense?competency

Go further

Previous lessonNext lesson