AI & AgentsLanguage models

Modified

A model guesses what comes next

It sounds simple, but that is exactly what happens. A language model has read billions of sentences and learned which words tend to follow which. Ask it something, and it computes the most likely answer — by token.

The difference between models comes down to how long they trained, how much data they saw, and how powerful the hardware running them is. That decides whether the answer holds up, how fast it arrives, and what it costs.

How models differ
Frontier

Powerful but expensive. Choose for complex reasoning and hard problems.

GPT-4o, Claude Opus, Gemini Ultra
Balanced

Good quality at a reasonable price. The most common choice in agent systems.

Claude Sonnet, GPT-4o mini, Gemini Pro
Fast

Cheap and fast. Best for simple tasks at high volume.

Claude Haiku, Gemini Flash, GPT-3.5
Where does your data go?

The flags on each provider card show where data is stored. What that actually means for you, GDPR, EU vs. US vs. China — all collected on a separate page. Go to Data Sovereignty →

OpenAI

🇺🇸 US storage · GPT

The one that started it all. Broadest support across third-party tools and integrations. Pick GPT-4o for general tasks with the best ecosystem around it.

Anthropic

🇺🇸 US storage · Claude

Best for long, complex assignments and agents that need to follow careful instructions. Claude reads and remembers huge documents in a single call.

Google

🇺🇸 US storage · Gemini

Strong at handling images, documents, and video in the same call. Flash is fast and cheap for high volume. Built into Google Workspace.

MistralEU choice

🇪🇺 EU storage · Mistral

French company, servers in the EU. Data never leaves the EEA, no third-country transfers. Codestral specializes in code. The right pick for EU operations with sensitive data.

DeepSeek

🇨🇳 China storage · DeepSeek · Reasoning

Chinese open-source model. R1 is strong at reasoning at a fraction of the price. Data is stored in China — use the local version if data sovereignty is critical.

OpenRouter

Aggregator · 200+ models

One API for every model. Switch between Claude, GPT, and Gemini without code changes. Data storage depends on the chosen model — verify per provider.

Quantization — what are Q4 and Q8?

Local models are compressed at different levels to fit your hardware. is 4-bit precision: smallest file size, fits most GPUs, with marginally lower quality. is 8-bit precision: twice the file size and near-full quality. F16 is full precision: largest and best, but it demands a lot of . Start with or depending on how much you have.

Ollama

Open Source · Self-hosted · Private

Run language models locally on your GPU. Free per call, private, works without internet. The standard for agents you run yourself. Supports Q4, Q8, and F16.

LM Studio

Free · Self-hosted · Private

Graphical interface for local models. Easy to download and test models without a terminal. Pick the quantization level directly in the UI.

Technically not a language model — but we have to mention it

An embedding model generates no text. It does just one thing: takes text in and spits out a of numbers — a coordinate in a mathematical space where similar sentences end up close to each other.

"agentminne" and "agent memory" land at almost the same coordinate. That is semantic search — and it is the foundation for systems where an agent pulls relevant context from a knowledge store before answering.

The reason we mention it here: when you choose a local LLM via Ollama, you are also implicitly choosing whether you have semantic search or not. Without an embedding model in the chain, your agent falls back to keyword matches — with noticeably worse precision. The full architecture →

multilingual-e5-large

1024-dim · 100+ languages · Local

560M parameters, ~2.3 GB. Runs locally via fastembed. Swedish works natively — ask in Swedish, hit English chunks, and vice versa. The standard for serious RAG pipelines.

all-MiniLM-L6-v2

384-dim · English · Fast

Small and fast. Good for English text with low-latency requirements. Works poorly on Swedish and misses cross-lingual matches. Pick this only with strict speed requirements and English-only data.

text-embedding-3-large

OpenAI API · 3,072-dim

High quality but requires an API call per embedding — costs money and sends data to the US. Justified if you are already in the OpenAI ecosystem and not running locally.

What is a reasoning model?

A regular model answers right away — like googling. A sits down and thinks the problem through, writes internal notes, checks its own answers, and turns the question over from several angles before responding. You only see the final answer, but behind it is a chain of thought that can take seconds or minutes.

Pick reasoning when the problem is hard and the answer really has to be right — math, logic, complex analysis. Pick a regular model when speed and cost matter.

o3 / o4-mini

🇺🇸 US storage

OpenAI’s reasoning models. o3 is powerful and expensive; o4-mini is fast and cheap. Pick o4-mini for everyday use.

DeepSeek R1

Open Source · 🇨🇳 China storage

Chinese open-source reasoning model that matches o1 on benchmark tests. Can be run locally via Ollama if you have enough VRAM.

Claude: Extended thinking

🇺🇸 US storage

Anthropic’s Sonnet and Opus models with extended thinking enabled. You can see the model reason step by step directly in the API response.

What is a token, and why does it cost money?

Models do not read words, they read tokens — pieces of text roughly equal to three or four characters. "Agentakademin" is three tokens. An A4 page of text is about 600 tokens.

Every token requires computation on powerful GPUs that draw a lot of electricity. The more capable the model, the more compute per token — and the higher the cost. What you really pay for is power and processing, per chunk of text.

Worked example

Claude Sonnet 4 costs about $3 per million input tokens and about $15 per million output tokens. At an exchange rate of ~10 SEK/USD: 1 million input ≈ 30 SEK, 1 million output ≈ 150 SEK.

A realistic agent run: 10,000 input tokens + 2,000 output tokens = 0.30 SEK + 0.30 SEK = ~0.60 SEK per run. Run it 1,000 times a month = ~600 SEK/month.

1,000 agent runs per month costs about as much as a coffee a day.

The AI market moves fast. Prices change often and may have shifted since this was written. Always check the current price with each provider.

Prompt caching

90% discount

Sending the same prompt every time? Cached tokens cost a tenth of the regular price. Anthropic and OpenAI both support prompt caching via API.

Fast models

~10% of frontier price

Claude Haiku and Gemini Flash cost a fraction of the top models. They handle classification, summarization, and simple decisions just fine.

Shorter context

Easy fix

Do not send the entire conversation history on every call. Send only what is relevant to the next step — the fastest cost optimization there is.

Tip

Most expensive is not always best. Start with a balanced model and upgrade only when you can see exactly where it falls short.