Skip to content

[codex] Support DeepSeek V4 Pro, Grok 4.6, and tiered pricing - #176

Closed
LeenHawk wants to merge 1 commit into
mainfrom
codex/deepseek-v4-pro-grok-4-6
Closed

[codex] Support DeepSeek V4 Pro, Grok 4.6, and tiered pricing#176
LeenHawk wants to merge 1 commit into
mainfrom
codex/deepseek-v4-pro-grok-4-6

Conversation

@LeenHawk

Copy link
Copy Markdown
Owner

What changed

  • add official model metadata and request shaping support for DeepSeek V4 Pro/Flash
  • add Grok 4.6 model metadata, reasoning support, and 500K context information
  • preserve DeepSeek reasoning_effort and raise its documented output limit to 384K
  • add generic multi-level prompt-token pricing tiers across billing, persistence, import/export, API, and console UI
  • import OpenRouter pricing overrides, including 59 tiered models and multi-threshold Qwen rules
  • enrich upstream model parsing with display names and explicit thinking capability metadata

Why

Grok 4.6 uses higher token prices after 200K prompt tokens, but this behavior is not xAI-specific. OpenAI, Google, Qwen, Seed, and other model families use different thresholds and sometimes multiple tiers. A generic tier representation avoids hard-coded model multipliers and keeps billing aligned with current provider catalogs.

Impact

Existing price rules continue to use their base rates. Rules may optionally provide pricing_tiers_json; the highest matching prompt-token threshold overrides only the rate categories it declares. Old SQLite/libSQL schemas are repaired automatically, and migration coverage verifies tier JSON can be written and read after upgrade.

Validation

  • cargo check --all-targets --all-features
  • cargo fmt --all -- --check
  • database migration tests: 11 passed
  • billing tier tests: 2 passed
  • console Vitest suite: 22 files / 81 tests passed
  • frontend typecheck, i18n parity, OpenRouter generator tests, and production build passed during implementation
  • git diff --check

@LeenHawk LeenHawk closed this Aug 12, 2026
@LeenHawk
LeenHawk deleted the codex/deepseek-v4-pro-grok-4-6 branch August 12, 2026 16:36
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