fix(metrics): price OpenRouter stealth previews as a real $0 - #756
Merged
Merged
Conversation
`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>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…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>
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.
Problem
traces ask --model stealth/union-alpharefuses 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: 0on 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 bareunion-alphastays unpriced.tests/metrics-pricing.test.ts: the row resolves,estimateCostis 0,isModelPriceddistinguishes it from an unpriced id.Checked
vitest run tests/metrics-pricing.test.ts src/model-seats.test.ts: 34/34.tsc --noEmit,biome checkon the two files: clean.~/code/traces,traces ask --model stealth/union-alpharuns the analyst over a Codex session (previous refusal gone).🤖 Generated with Claude Code