Skip to content

fix(collector): price Devin models by their dotted or OpenRouter name, release 0.5.2 - #49

Merged
cgaravitoq merged 3 commits into
mainfrom
cgaravitoq/devin-pricing
Oct 8, 2026
Merged

cgaravitoq merged 3 commits into
mainfrom
cgaravitoq/devin-pricing

Conversation

@cgaravitoq

Copy link
Copy Markdown
Owner

What

Devin rows for deepseek-v4-1-flash, glm-5-3-flash, swe-2 and swe-2-max were stored with cost_usd 0. Measured in D1 on 2026-10-08: about 1.41 billion deepseek-v4-1-flash tokens across the Mac mini and the MacBook Air at $0, plus glm-5-3-flash and swe-2 on the Air.

Two things stacked up:

  • litellmModel only turned gpt-X-Y- into gpt-X.Y-, while Devin dashes every minor version.
  • LiteLLM has no bare deepseek-v4.1-flash or glm-5.3-flash key. It lists them only by reseller (openrouter/deepseek/deepseek-v4.1-flash, azure_ai/deepseek-v4.1-flash, prism/..., zai/glm-5.3-flash), and the resellers disagree by up to 7x.

Change

  • priceFor in pricing.ts tries the bare key, then the openrouter/<vendor>/<model> listing, since OpenRouter passes the vendor's list price through.
  • A Devin name keeps its dashes unless only the dotted form has a price. claude-fable-5-1 stays as it is, gpt-5-6-sol still becomes gpt-5.6-sol, and deepseek-v4-1-flash becomes the deepseek-v4.1-flash that pi and opencode already report.
  • Antigravity tries the OpenRouter listing after gemini/.
  • swe-2 and swe-2-max have no public price anywhere and keep their warning.
  • bun audit --production failed on main after four new advisories. bun audit fix clears three of them within range. sharp is pinned exactly by miniflare, even in its latest release, so it joins undici in the miniflare override at the 0.35.5 patch.
  • The collector is released as 0.5.2.

Why now

The collector reports a 14-day window, and a day that leaves it is never repriced. The Air's $0 deepseek-v4-1-flash rows of 2026-09-27 leave the window on 2026-10-11, so both machines need 0.5.2 before then.

Verification

  • New specs in mapping.spec.ts and pricing.spec.ts cover the four measured Devin names, the Claude regression, the OpenRouter-only antigravity model, and the reseller that must not win.
  • A dry collect on the Mac mini with the real LiteLLM cache prices the Devin rows: deepseek-v4.1-flash on 2026-09-29 comes to $8.37, and the only warning left is devin: no price for swe-2-max.
  • bun install --frozen-lockfile, format, lint:slop, check-types, test, test:dependency-policy, test:package, audit:production, build and wrangler deploy --dry-run all pass locally.

…n OpenRouter

Devin dashes every minor version (deepseek-v4-1-flash, glm-5-3-flash) and
litellmModel only dotted gpt-X-Y-, so those rows were stored at $0. LiteLLM
also lists them only by reseller (openrouter/, azure_ai/, prism/), never bare.

The Devin name now keeps its dashes unless only the dotted form has a price,
which leaves claude-fable-5-1 as it was and turns deepseek-v4-1-flash into the
deepseek-v4.1-flash that pi and opencode already report. priceFor falls back to
the OpenRouter listing, the reseller that passes the vendor's list price
through, and antigravity tries it after gemini/. swe-2 and swe-2-max have no
public price and keep their warning.
The Devin price fix changes the costs the collector reports, and Devin rows
that leave the 14-day window keep whatever they were stored with, so the
machines need the new version before 2026-10-11 to reprice the $0 rows of
2026-09-27.
…mol-toml advisories

bun audit --production failed on main once GHSA-wq5f-xc86-pv6w,
GHSA-68fv-2mgg-jv7q, GHSA-ch52-4w7c-c8xp and GHSA-r4xh-jqrq-34v2 were
published, which blocks every pull request and the collector release.

bun audit fix moves source-map-js, http-cache-semantics and smol-toml within
their ranges. sharp stays at 0.35.4 under miniflare, which pins it exactly
even in its latest release, so it joins undici in the miniflare override at
the 0.35.5 patch.
@cgaravitoq
cgaravitoq merged commit 1724a3d into main Oct 8, 2026
4 checks passed
@cgaravitoq
cgaravitoq deleted the cgaravitoq/devin-pricing branch October 8, 2026 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant