What Happens When You Ask a Chatbot the Weather
Every inference step behind one chat answer, run for real in Claude Code. Which model ran, what it read, what it produced, and which parts were hidden from me.
Taken from WeatherBug and The Weather Network. The page snapshots carried no timestamp and disagree a little, which is why the rain figure is a range. For a forecast you can trust, use weather.gov (NWS Mobile/Pensacola).
Who computed what, in order
Each step, with its inputs and outputs
-
Harness · no model 0 · Build the prompt
- reads
- Claude Code's system prompt and tool definitions, your three CLAUDE.md files, the memory index, the summary of our earlier conversation, file-change notices, and your question.
- does
- Joins them into one long text and turns it into tokens.
- why it's cheap
- Almost all of it matches the previous turn, so its KV state likely comes from the prefix cache. It's the same mechanism projects/15 used to time pure decode.
-
Opus 5.5 · round 1 1 · Decide a tool is needed
- prefill
- One forward pass over the new, uncached tokens. Most of the time to first token is spent here.
- decode
- One token at a time: a short reasoning trace, then a tool call. WebSearch was deferred: I knew its name but not its definition, so I had to fetch that first.
- emits
ToolSearch("select:WebSearch")- stops
- Generation ends at the tool call. The harness runs ToolSearch locally and returns the definition. No model runs here.
-
Opus 5.5 · round 2 2 · Write the search
- prefill
- Only the appended tool definition. Everything before it is cached.
- decode
- The date comes from the context the harness supplies (2026-10-09). The model has no clock of its own.
- emits
WebSearch(query="Destin FL weather today October 9 2026", mode="standard")
-
Search backend+ unseen model 3 · Search and summarize, server side
- search
- Claude Code's documentation says WebSearch "returns result titles and URLs. It doesn't fetch the result pages." Nine links came back. Five were low-quality SEO pages on one domain. The others were WeatherBug and two Weather Network pages (city and airport).
- summary
- Yet the result reached me with prose attached: a digest saying the snapshots were undated and contradicted each other, and an instruction to cite sources. The docs don't describe that step. I didn't write it, so something on the server side did, most likely a model; I can't see which one, its size, or its prompt. This is an observation from this session, not documented behaviour.
- lesson
- The facts went through two models before you saw them: summarized once by that model, then again by me. Neither one checked a weather API.
-
Opus 5.5 · round 3 4 · Write the answer
- prefill
- The search result.
- decode
- The reply you read. It kept the rain chance as a range, flagged that the pages were undated, and pointed to weather.gov, all because the sources disagreed.
- emits
- Text, streamed to your terminal token by token.
The bill of compute
| Who | Calls | Kind of work | Visible to me |
|---|---|---|---|
| Opus 5.5 | 3 | prefill (mostly cached) + decode, each round ending in a tool call or the answer | yes |
| Search summarizer | ≥ 1 | read the pages and wrote a prose digest | only its output |
| Auto-mode classifier | 0–2 | reviews each tool call before it runs; auto mode was on. The docs say it runs on Claude Sonnet 5 by default, not on the session's model: a separate model, but not a small one | no |
| Background (Haiku-class) model | 0–1 | the docs name a Haiku-class model "for background functionality", and list conversation summaries for claude --resume among background jobs. Whether it titled this session is not documented | no |
| Harness | 3 | prompt assembly, ToolSearch, and sending the search request: plain code, no model | yes |
The small models around the big one
A chat product is rarely one model. Around the large model that writes the answer sit smaller ones doing quick, narrow jobs: naming the conversation, digesting a web page, summarising a session so it can be resumed, deciding whether a request is safe. "Small" means fewer parameters, which means fewer bytes to read for every token. That makes them faster and cheaper, and for a narrow job the extra reasoning a large model brings goes unused.
What Claude Code documents, and what it doesn't
| Claim | Status | What the docs say |
|---|---|---|
| A Haiku-class model does background work | documented | ANTHROPIC_DEFAULT_HAIKU_MODEL: "Model ID that the haiku alias resolves to, also used for background functionality". The older ANTHROPIC_SMALL_FAST_MODEL ("Haiku-class model for background tasks") is deprecated. |
| Which background jobs run | documented | "Conversation summarization: background jobs that summarize previous conversations for the claude --resume feature", and "command processing" for commands like /usage. The page does not say which model runs each one. |
| WebFetch digests the page with another model call | documented | "it then runs the prompt against the content in a separate model call, and Claude receives the result of that call rather than the raw page." The model is not named. |
| The auto-mode permission check is a separate model | documented | "The classifier runs on Claude Sonnet 5 by default rather than on your /model selection." Separate, but not small. |
| WebSearch results arrive as titles and URLs | documented observed otherwise | "returns result titles and URLs. It doesn't fetch the result pages." In this session the result also carried a prose digest, which the docs don't explain. |
| A small model writes session titles | not documented | Nothing in the docs says this. An earlier version of this page said it as fact; that was an assumption and is withdrawn. |
Quotes from code.claude.com (environment variables, model configuration, costs, tools reference and permission modes pages), read 2026-10-10.
Six jobs a small model does well, with examples from this session
illustrative The inputs come from this conversation. The outputs are written for this page to show the shape of each job; they were not captured from Claude Code.
Session title
What is today's weather in Destin, FL?outDestin, FL weather todayA few words from one sentence. No reasoning, one short pass.
Resume summary
this whole conversation: tens of thousands of tokensoutTraced the models behind a Destin weather answer, built a trace page, then designed and pushed a GPU node-readiness tool.The documented background job. Compression, not judgement.
Page digest
~40 kB of a forecast page's HTML + "today's weather in Destin"out81 °F, feels like 86; high 86, low 78; partly cloudyExtraction. The big model then reads 20 tokens instead of 10,000.
Topic change
title "Destin, FL weather today" + "show me an html"outsame topicA choice between two labels: should the title change?
Command prefix for a permission rule
git -C ~/Projects/my-tool push -u origin mainoutgit pushParsing into a fixed format, so "allow git push" can match.
Search query rewrite
What is today's weather in Destin, FL? + today's dateoutDestin FL weather today October 9 2026In this session the large model wrote this query itself. Many search pipelines hand it to a small one.
Where small models sit in other systems
- Routers: a classifier picks which model answers, sending easy requests to a cheap model.
- Safety and moderation classifiers screen inputs and outputs before and after the main model.
- Retrieval: embedding models (often well under 1B parameters) turn documents and questions into vectors; a reranker orders the hits; only the best few reach the large model.
- Speculative decoding: a small "draft" model guesses the next few tokens and the large model checks them all in one forward pass. Accepted guesses cost a fraction of a large-model step, and the output matches what the large model would have produced alone. Here the small model speeds up the large one instead of doing a separate job.
Why small is cheap: the arithmetic
Generating a token reads every weight once, so on one request decode speed is roughly memory bandwidth divided by the size of the weights. Anthropic doesn't publish its models' sizes, so these numbers use open models on one H100.
| Model | Weights (BF16) | Decode, one request | A 6-token title | Kind |
|---|---|---|---|---|
| Qwen3-8B | 16.4 GB | 136 tokens/s | ≈ 44 ms | measured llm-masters projects/15, 2026-10-01 |
| a ~1B model | ≈ 2.2 GB | up to ≈ 1,000 tokens/s | ≈ 6 ms | estimate scaled by bytes; fixed per-step costs lower it |
| a ~70B model | ≈ 141 GB | ≈ 30 tokens/s on two GPUs | ≈ 0.2 s | estimate doesn't fit one 80 GB card; split across two |
For one title the difference is milliseconds. Across millions of conversations, and with the small model often running on cheaper hardware, it is the difference between a background feature that costs almost nothing and one that costs as much as the answers. That is the "bigger vs overkill" trade in practice: a title doesn't get better with more parameters, so a product spends them only where they improve the answer.
What did not run
- No subagents.
- No open-weight model: no vLLM, SGLang or TRT-LLM box was up, and nothing ran on your Mac.
- No weather API, only web text.
Why it looks like AA-AgentPerf
- Three short prefill+decode rounds in a row, not one long generation.
- Each round's prefill is small because the prefix cache holds the long, shared context.
- Each round's TTFT is mostly prefill. With a fresh cache it would be the whole context, every round.
- End-to-end time is dominated by the round trips and the tool wait, not by token rate.