Skip to content

FEAT: add GPT-6 Astra API pricing - #37

Merged
merefield merged 1 commit into
mainfrom
agent/gpt-6-astra-pricing
Sep 4, 2026
Merged

merefield merged 1 commit into
mainfrom
agent/gpt-6-astra-pricing

Conversation

@merefield

Copy link
Copy Markdown
Owner

Why

Codexometer currently fails closed when a Codex session resolves to GPT-6 Astra, leaving its API-equivalent cost unavailable even though OpenAI now publishes Standard token prices for the model.

What changed

  • add GPT-6 Astra Standard short- and long-context prices for input, cached input, cache writes, and output
  • audit every maintained model price against OpenAI's current official pricing and model documentation
  • refresh the embedded pricing provenance date to 2026-09-04
  • document the models covered by the maintained price table
  • lock all maintained rates with a table-level regression test
  • exercise GPT-6 Astra short- and long-context cost calculations directly

The estimator remains deliberately fail-closed where OpenAI does not publish a cache-write or long-context price. It continues to estimate Standard API-equivalent text-token cost only; Batch, Flex, Fast, regional uplift, and tool-call charges are outside this table.

Official source: https://developers.openai.com/api/docs/pricing

Validation

  • go test -race -cover ./...
  • go vet ./...
  • git diff --check

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The change set is narrowly scoped to pricing data plus deterministic regression tests, and the updated model pricing integrates cleanly with the existing fail-closed costing behavior.

Pull request overview

This PR updates Codexometer’s embedded Standard API-equivalent pricing table to include GPT-6 Astra and refreshes the published-pricing provenance date used across Quota/Benchmark reporting.

Changes:

  • Add GPT-6 Astra short- and long-context Standard token prices to the maintained pricing table.
  • Refresh the embedded pricing retrieval date to 2026-09-04 and document the covered models in the README.
  • Add regression tests to lock the maintained pricing table and directly validate GPT-6 Astra short/long cost calculations.
File summaries
File Description
README.md Updates embedded pricing provenance date and documents which models are covered by the maintained price table.
internal/codex/benchmark.go Updates pricing provenance constant and adds GPT-6 Astra rates to the compiled Standard pricing table.
internal/codex/benchmark_test.go Adds a table-level regression test for maintained rates and exercises GPT-6 Astra short/long context costing.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@merefield
merefield merged commit 940c3ec into main Sep 4, 2026
4 checks passed
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.

2 participants