web_search on the free tier, a dashboard that charts days, first-party upstream health - #6
Merged
Merged
Conversation
…t upstream Three changes that each started as a measurement. **web_search works on the free tier.** The old refusal argued that a server-side tool "performs billed work that never appears in the usage object". Measured against the live API: one search request made eleven server-side calls and billed 40,260 input tokens (32k cached), and the account balance moved by nothing beyond those tokens — eleven searches at a frontier vendor's $10/1k rate would have been 0.79 CNY and unmistakable. There is no per-search fee; the whole cost arrives as input tokens the meter already reads exactly. What the measurement did break is the reservation. `meter.Estimate` bounded input at one token per body byte, which is true for every request except this one — DeepSeek chooses how many pages to read. So a search reserves a 256k input allowance (~6x the observed case) and spends one of three daily searches, a new quota dimension because one search costs about what ten ordinary turns cost and the request counter alone would let one caller take a quarter of the day's budget while looking ordinary. Every other server-side tool stays refused. Within the allowance the budget is still a hard ceiling; the overshoot past it is bounded and stated in DESIGN.md. **The dashboard charts a day per bar.** It charted output tokens/sec over five minutes, which is the wrong instrument for a pool serving a few requests an hour: flat at zero whenever anyone looked. The 30-day series comes from `quota.History`, reading the same journals the money settles from, so the chart cannot disagree with the ledger. Quiet days are zeroes, not gaps. The live rates are still on the page, demoted to where their usual zero is honest rather than alarming. **"Is it us or DeepSeek?"** Every upstream round trip is recorded and `/v1/status` carries the last success, the fault streak and the last fault shape — first-party, because `status.deepseek.com` turns out to be both unparseable and unreachable from our host (Aliyun Beijing; TCP connects, TLS never completes, while api.deepseek.com answers fine from the same box). A status page also cannot see a route broken only from here. Probe results and the reasoning are in TASTE.md. Also: the economics page now cites measured cost-per-task from Artificial Analysis and SWE-rebench instead of only rate-card arithmetic — including the two figures that cut against the argument, since a page that hid them would be propaganda. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The gateway now carries DeepSeek's server-side web_search, so the browser playground should offer it too — it is a first-class client on the same gateway and quota, not a demo. The control only exists on the Responses format, because that is the only format DeepSeek offers the tool on; a checkbox that silently did nothing on the other three would be worse than no checkbox. The equivalent-command panel gains --web-search so the copy-paste stays honest, and the note says what a search costs against the daily ration. Markup lives in build.py, which generates the page; editing the generated HTML directly leaves the two disagreeing and build.py --check catches it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A user refused for searches could not see the ration anywhere in the tool — free status listed requests and tokens only. Both the enrol blurb and free status now carry it. A gateway that does not offer search sends no ration, and a bare "0 searches" would read as "you have used them all", so the line is omitted rather than zeroed when the field is absent. That keeps this build honest against older gateways. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
lroolle
force-pushed
the
feat/search-and-dashboard
branch
from
August 8, 2026 02:51
f5344ca to
de0fef1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #4 (
feat/status-dashboard) so the diff is only this work; it will retarget tomainwhen #4 merges.Three changes that each began as a measurement, plus the site copy that follows from them.
web_searchworks on the free tierThe old refusal argued a server-side tool "performs billed work that never appears in the usage object". Measured against the live API on 2026-08-07: one search request made eleven server-side calls and billed 40,260 input tokens (32k cached) — and the account balance moved by nothing beyond those tokens. Eleven searches at a frontier vendor's $10/1k rate would have been 0.79 CNY against a 14.26 CNY balance, i.e. unmistakable. There is no per-search fee; the whole cost arrives as input tokens the meter already reads exactly.
What the measurement did break is the reservation.
meter.Estimatebounded input at one token per body byte — true for every request except this one, because DeepSeek chooses how many pages to read. So:Within the allowance the budget is still a hard ceiling; the overshoot past it is bounded and stated plainly in
DESIGN.md. Reasoning and expiry condition inTASTE.md.Verified in production (
v0.3.0-13): the previously-failing command returns a sourced answer for $0.0013, the 4th search is refused with a message that says ordinary requests still work, and an ordinary request then succeeds.The dashboard charts a day per bar
It charted output tokens/sec over five minutes — the wrong instrument for a pool serving a few requests an hour, so it was flat at zero whenever anyone looked. The 30-day series comes from
quota.History, which reads the same journals the money settles from, so the chart cannot disagree with the ledger. Finished days are immutable and memoised; quiet days are zeroes, not gaps. The live rates stay on the page, demoted to where their usual zero reads as honest rather than broken."Is it us or DeepSeek?"
Every upstream round trip is recorded;
/v1/statuscarries the last success, the consecutive-fault streak and the last fault shape. Only DeepSeek's own failures (429/5xx/transport) count as faults — a caller's 4xx would otherwise read as an outage. Before the first forwarded request the state isunknown, not a cheerful all-clear it has not earned.Deliberately not a scrape of
status.deepseek.com. Probed from the production host: no JSON endpoint exists, and the host resolves to an Aliyun Beijing load balancer that accepts TCP and never completes TLS from outside China, whileapi.deepseek.comanswers fine from the same box. A status page also cannot see a route broken only from here. The incident page stays linked for humans.Site
/economicsnow cites measured cost per task — Artificial Analysis ($0.03 for v4-flash vs $2.34 Opus 5 and $3.14 Fable 5; $72 vs $3,836 vs $5,455 to run the whole index) and SWE-rebench ($0.15/problem at 40.2% for v4-pro vs $4.40 at 64.5% for Fable 5) — instead of only rate-card arithmetic. It also publishes the two figures that cut against the argument: GPT-5.6 Luna matches flash's intelligence score at $0.05 vs $0.03, and beats v4-pro on both cost and resolve rate on SWE-rebench. The advantage is real against the flagship tier and largely evaporates against the cheap frontier tier; a page that hid that would be propaganda.The playground gains a web-search toggle (Responses only, the one format DeepSeek offers it on) and
deepseek free statusshows the ration.Verify
🤖 Generated with Claude Code