Repository navigation
pricing: add model weights for DeepSeek and Qwen models - #308
Open
Xinghan Pan (PStarH) wants to merge 1 commit into
Open
Xinghan Pan (PStarH) wants to merge 1 commit into
Xinghan Pan (PStarH) wants to merge 1 commit into
Conversation
DeepSeek (deepseek-chat V3, deepseek-reasoner R1) and Alibaba Qwen (qwen-2.5-coder-32b, qwen-plus, qwen-max) are widely used in agent coding sessions (via OpenCode, Cursor, and custom proxies). Without model weight entries, sessions on these models fall back to the default curve (cache hit 0.10x, output 6x), which misprices DeepSeek output cost (output is 2.0x for V3 and ~3.98x for R1) and cache hit ratios. Add published Standard-tier price ratios for: - deepseek-chat (zsh.14 in / zsh.014 cached / zsh.28 out => cr 0.10, out 2.0) - deepseek-reasoner (zsh.55 in / zsh.14 cached / .19 out => cr 0.2545, out 3.982) - qwen-2.5-coder-32b (zsh.07 in / zsh.014 cached / zsh.28 out => cr 0.20, out 4.0) - qwen-plus (zsh.40 in / zsh.08 cached / .20 out => cr 0.20, out 3.0) - qwen-max (.60 in / zsh.40 cached / .40 out => cr 0.25, out 4.0)
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.
Summary
DeepSeek (
deepseek-chatV3,deepseek-reasonerR1) and Alibaba Qwen (qwen-2.5-coder-32b,qwen-plus,qwen-max) are widely used in coding agent sessions (e.g. via OpenCode, Cline, and proxy adapters).Without explicit price ratio entries in
MODEL_WEIGHTS, sessions on these models fall back to the generic fallback curve (cache hit 0.10x, output 6x). This significantly distorts effective cost accounting:Changes
tokeneconomizer/pricing.py: adddeepseek-chat,deepseek-reasoner,qwen-2.5-coder-32b,qwen-plus, andqwen-maxwith published Standard-tier price ratios.tests/test_pricing_new_models.py: add all 5 models to the parameterized price verification table.Verification
All 38 tests in
tests/test_pricing_new_models.pypass.