Skip to content

fix(metrics): price OpenRouter stealth previews as a real $0 - #756

Merged
drewstone merged 2 commits into
mainfrom
fix/stealth-model-pricing
Sep 16, 2026
Merged

drewstone merged 2 commits into
mainfrom
fix/stealth-model-pricing

Conversation

@drewstone

Copy link
Copy Markdown
Contributor

Problem

traces ask --model stealth/union-alpha refuses before the first model call: no pricing is configured for 'stealth/union-alpha'; provide DspyRlmTraceEngineOptions.pricing. The Tangle router serves these OpenRouter stealth previews at $0 (usage.cost: 0 on every response), but the DSPy RLM budget ledger only admits ids the static table can price.

Change

  • src/metrics.ts: a /^stealth\// family row priced { input: 0, output: 0 }. It matches only the provider-prefixed id, so a bare union-alpha stays unpriced.
  • tests/metrics-pricing.test.ts: the row resolves, estimateCost is 0, isModelPriced distinguishes it from an unpriced id.
  • CHANGELOG under Unreleased.

Checked

  • vitest run tests/metrics-pricing.test.ts src/model-seats.test.ts: 34/34.
  • tsc --noEmit, biome check on the two files: clean.
  • With the same row applied to the installed 0.179.0 dist under ~/code/traces, traces ask --model stealth/union-alpha runs the analyst over a Codex session (previous refusal gone).

🤖 Generated with Claude Code

`traces ask --model stealth/union-alpha` refused before the first call:
"no pricing is configured for 'stealth/union-alpha'". The router bills
these previews at $0, but the ledger only admits ids the table knows.
A `stealth/*` family row with a zero price lets the budget ledger admit
them while keeping unpriced ids refused.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

…ricing row

`src/metrics.ts` is a bound source of the public analyst benchmark, so the
stealth pricing row changes the pinned implementation digest.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@drewstone
drewstone merged commit 9ac4ca5 into main Sep 16, 2026
2 checks passed
@drewstone
drewstone deleted the fix/stealth-model-pricing branch September 16, 2026 21:31
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