Repository navigation
Conversation
…ist price lookup_pricing matched every claude-opus-4* id to $15/$75 per 1M tokens, the Opus 4/4.1 price, so Opus 4.5, 4.6 and 4.7 calls were recorded at 3x their cost; claude-haiku-4* was $0.80/$4 (list $1/$5) and gemini-2.5-flash $0.075/$0.30 (list $0.30/$2.50). Anthropic, OpenAI and Google ids are now priced from llm-prices first (rows read from each provider's pricing page, dated, no dependencies), and the prefix table stays for DeepSeek, older ids and the fallback; the Haiku 4 arm is split from Haiku 3.5. The new test_list_prices covers Opus 4.6/4.7, Haiku 4.5, Gemini 2.5 Flash, gpt-5.4 and that Opus 4.1 keeps its price. I ran the pricing module's tests against llm-prices 1.4 in a standalone crate, since the full build needs protoc for lance-encoding; rustfmt and clippy are clean on it.
This branch has not been deployed
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.
lookup_pricingmatches everyclaude-opus-4*id to $15/$75 per 1M tokens, which is the Opus 4 / 4.1 price, so Opus 4.5, 4.6 and 4.7 calls are recorded at 3x their cost (Anthropic lists $5/$25);claude-haiku-4*is $0.80/$4 (list $1/$5) andgemini-2.5-flashshares Gemini 2.0 Flash's $0.075/$0.30 (list $0.30/$2.50). This PR prices Anthropic, OpenAI and Google ids from the llm-prices crate first (rows read from each provider's pricing page and dated, no dependencies) and keeps the prefix table for DeepSeek, older ids and the conservative fallback; the Haiku 4 arm is split from Haiku 3.5 so the table is right too. The newtest_list_pricescovers Opus 4.6/4.7, Haiku 4.5, Gemini 2.5 Flash,gpt-5.4, and that Opus 4.1 keeps $15/$75. I could not build the whole crate here (lance-encoding needsprotoc), so I ransrc/llm/pricing.rsand its tests (4 passed) against llm-prices 1.4 in a standalone crate, with rustfmt and clippy clean; theCargo.lockchange is only the new package. I maintain llm-prices (MIT).