Skip to content

fix(pricing): add OpenAI/Codex model pricing, stop hardcoding cost to $0 - #23

Merged
ClaudiaFang merged 1 commit into
masterfrom
fix/codex-pricing-updates
Jul 23, 2026
Merged

fix(pricing): add OpenAI/Codex model pricing, stop hardcoding cost to $0#23
ClaudiaFang merged 1 commit into
masterfrom
fix/codex-pricing-updates

Conversation

@ClaudiaFang

Copy link
Copy Markdown
Member

Summary

  • Codex CLI sessions always showed $0 estimated cost — estimatedCostUsd was hardcoded to 0 in codex.ts with a "Codex pricing not public" comment, and pricing.ts had zero OpenAI/GPT entries in its pricing table.
  • Added pricing for the current GPT-5.x/Codex, GPT-4.x, and o-series (o1/o3/o4) models to MODEL_PRICING.
  • Wired codex.ts to call calculateCost() instead of hardcoding 0.
  • Fixed a stale test that used gpt-4o-mini as an "unknown model" placeholder (it's now a known model) and added a coverage test for gpt-5.6-terra.

Related follow-up tracked separately: #22 — move pricing to a DB-backed table with periodic updates instead of a hardcoded map, so new models/price changes don't require a code release.

Test plan

  • pnpm build passes
  • pnpm test — 918/918 tests pass

Codex CLI sessions always reported $0 estimated cost because
estimatedCostUsd was hardcoded in codex.ts, and the shared pricing
table had no entries for any OpenAI/GPT model at all. Adds pricing
for the current GPT-5.x/Codex, GPT-4.x, and o-series models, and
wires codex.ts to actually calculate cost from usage.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@ClaudiaFang
ClaudiaFang merged commit 44c655f into master Jul 23, 2026
1 check passed
@ClaudiaFang
ClaudiaFang deleted the fix/codex-pricing-updates branch July 23, 2026 10:09
ClaudiaFang pushed a commit that referenced this pull request Jul 23, 2026
feat: add sourceTool field to session uploads
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