Model routing and cost control
A question stops at the cheapest layer that can deal with it. Rules come first, one small classifier second and the answering model last, and the whole agent runs inside a $20 monthly ceiling that the providers enforce.
The rule behind the routing is that nothing calls a model for what a rule, a lookup or a click can resolve. So a question passes through three tiers, each more expensive than the last, and it stops at the first one that can deal with it. Only the last tier loads the corpus. The spend of the whole system has a fixed ceiling, and when the money runs out the assistant stops spending rather than getting worse.
Three tiers and one classifier
Tier 0 runs no model at all (ADR-0040). It rejects an empty or over-long message, enforces the rate and budget limits, and answers a short list of questions about the assistant itself, such as whether you are talking to a person, from answers written in advance in English and Italian. Each of those answers still cites the page it quotes. The list is matched by rule. Letting a classifier match it was measured and declined, because it replaced real answers about the projects with canned ones about the site (ADR-0082).
Tier 1 is the one classifier in the system: a scope gate (ADR-0081). It is a single call to Jev, a small decision model from TypeSafe reached through Cloudflare. It receives your message and the public list of Francesco's project and organisation names, and nothing else: no corpus, no conversation, no page context. It returns in, out or unclear, plus the language of the message. The turn is refused only when the gate puts more than half its probability on out. The refusal you then see is one of two sentences written in advance, one English and one Italian, so it cannot be talked into saying anything else. If the gate fails, returns something unreadable or takes longer than 800 ms, the question goes through. Refusing a recruiter by mistake is a product failure, while letting an off-topic question through costs a fraction of a cent.
The names are what made the gate work. Without them, every model tried called his own project names general knowledge: the gate as first specified refused 38% of the in-scope questions in the test set. With the 16 names, generated from the corpus at build time so a new project is admitted the day it is published, Jev refused none (deep-dive 16).
Tier 2 is the answering model, with the corpus, the tools and a bounded loop of at most four tool calls and five model calls (ADR-0041). Nothing before it classifies intent or depth. The answering model makes both decisions anyway, with the whole corpus in front of it, and a second classifier would only add a way to route a question wrongly.
Which model answers
GPT-5.6 Luna writes the answers (ADR-0062). It was chosen by disqualification. The pass mark was written before any candidate ran: all 14 injection cases clean, at least 49 of 51 test questions passed, at most 5 invented citations per 1,000, no answer below 3 out of 5 from either of two judge models, and no markup outside the allowed subset. Six models from two vendors were run over two rounds.
In the final round GPT-5.6 Luna passed all 51 test questions, all 28 held-out questions and all 14 injection cases, and invented none of its 153 citations. Two of its answers got a 2 from the Claude judge and passed with the OpenAI judge. I read both and accepted the model. That is a human decision over one criterion, recorded as such, and the pass mark is unchanged for the next model change. It needs the answer format enforced as a strict JSON schema: without the schema it passed 3 of 51.
The model sits behind a narrow interface of six capabilities, and its name is configuration (ADR-0043). Changing it is a deploy that has to pass the whole test set again first, like a change to the prompt or the corpus.
Twenty dollars a month
The agent's spend is capped at $20 a month, and the cap is enforced by the providers rather than by a promise (ADR-0050, ADR-0073). The answering model runs in a dedicated project with a hard spending limit. The gate is paid from a prepaid balance with no automatic top-up, and an empty balance means the gate is skipped, not that the site stops. Inside that, the agent keeps three counters: 10 questions per conversation, a daily spend limit and the monthly one. Each address is limited to 12 questions an hour and 40 a day. Every limit is checked before any model runs, so a refused question costs nothing.
When a counter runs out, the assistant drops to answers that need no model: the prepared answers and links to the site's pages, and otherwise an honest "not right now". It never switches itself to a cheaper model. A cheaper model is a quality decision, and it belongs to a person with a test set, not to a counter. I can switch the whole agent off with one setting. Every page keeps working on every one of these rungs.
At list prices read on 2026-09-22, a ten-question conversation with GPT-5.6 Luna costs about $0.0056 in answering calls, and a gate call about $0.00007, since it also records the question's topic (ADR-0087). So the $20 ceiling now allows far more traffic than a portfolio will see. The limits above were sized when the answering model cost 44 times more, and working them out again for the new price is still to do. Hosting is separate, about $6 a month. The monthly test runs have their own $5 budget.
What is cached is the part of the prompt that never changes within a build: the instructions, the tool definitions and the corpus. There is no cache of answers and none of the gate's decisions, because either would be keyed on what visitors typed (ADR-0039).
How far this has been proved
- Measured: the scope gate refused 0% of in-scope questions on a 133-case set and on a 30-case holdout written separately, and it lets a question through whenever it cannot decide.
- Designed: the $20 monthly cap on provider-side limits. The limits are set by hand before launch.
- Measured once, before launch: the model comparison and the per-conversation cost above, on questions written for the purpose. No real visitor has asked anything yet.
- Measured from a local machine, not the edge: the gate's latency, 0.49 s at the 95th percentile, against its 800 ms budget.