-
Notifications
You must be signed in to change notification settings - Fork 169
fix(pricing): add GPT-6 Astra short-context rates and update GPT-5.6 Sol pricing #591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -59,6 +59,28 @@ test("MODEL_PRICING + getModelPricing are byte-identical across all 5 edge files | |
| } | ||
| }); | ||
|
|
||
| test("cloud Astra and Sol pricing matches current local short-context rates", () => { | ||
| const { getModelPricing } = require("../src/lib/pricing"); | ||
| const block = extractBlock(CANONICAL); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win Exercise every pricing mirror in the parity test. Line 64 extracts only Suggested test change- const block = extractBlock(CANONICAL);
const cases = [
["gpt-6-astra", { input: 10, output: 50, cache_read: 1, cache_write: 12.5 }],
["gpt-5.6-sol", { input: 4, output: 20, cache_read: 0.4, cache_write: 5 }],
];
- for (const [model, rates] of cases) {
- ...
+ for (const edge of CLOUD_EDGES) {
+ const block = extractBlock(edge);
+ for (const [model, rates] of cases) {
+ ...
+ }
}Define As per path instructions: pricing must stay in sync across ALL locations ( 🤖 Prompt for AI AgentsSource: Path instructions |
||
| const cases = [ | ||
| ["gpt-6-astra", { input: 10, output: 50, cache_read: 1, cache_write: 12.5 }], | ||
| ["gpt-5.6-sol", { input: 4, output: 20, cache_read: 0.4, cache_write: 5 }], | ||
| ]; | ||
| for (const [model, rates] of cases) { | ||
| for (const [field, value] of Object.entries(rates)) { | ||
| assert.strictEqual(getModelPricing(model)[field], value, `${model} local ${field}`); | ||
| } | ||
| assert.ok( | ||
| block.includes(`"${model}": { input: ${rates.input}, output: ${rates.output}, cache_read: ${rates.cache_read}, cache_write: ${rates.cache_write} },`), | ||
| `${model} cloud rates must match the official short-context rates`, | ||
| ); | ||
| assert.ok( | ||
| block.includes(`if (lower.includes("${model}")) return MODEL_PRICING["${model}"];`), | ||
| `${model} cloud matcher must cover reasoning-effort variants`, | ||
| ); | ||
| } | ||
| }); | ||
|
|
||
| test("canonical pricing block retains regression-prone entries and matcher order", () => { | ||
| const block = extractBlock(CANONICAL); | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: xiufengsun/TokenTracker
Length of output: 307
🤖 get_repo_knowledge executed:
get_repo_knowledge xiufengsun/TokenTracker /tmp/coderabbit-repo-knowledge/xiufengsun-tokentracker-4a8cd9e9/conventions /tmp/coderabbit-repo-knowledge/xiufengsun-tokentracker-4a8cd9e9/learningsLength of output: 3259
🏁 Script executed:
Repository: xiufengsun/TokenTracker
Length of output: 50379
🏁 Script executed:
Repository: xiufengsun/TokenTracker
Length of output: 1081
Add both pricing entries to
src/lib/pricing/seed-snapshot.json.The seed snapshot is missing
gpt-6-astraandgpt-5.6-sol, including all four rates. Add them and keep all edge patches synchronized to prevent stale or zero pricing.🤖 Prompt for AI Agents
Source: Path instructions