Skip to content

fix: record provider cost from JSON text errors - #18814

Merged
ElliotEtag merged 2 commits into
mainfrom
codex/json-error-provider-cost
Oct 30, 2026
Merged

ElliotEtag merged 2 commits into
mainfrom
codex/json-error-provider-cost

Conversation

@ElliotEtag

@ElliotEtag ElliotEtag commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor
  • Record provider cost from valid OpenAI-compatible usage in failed JSON text responses, including failed attempts rescued by fallback. Use the attempted model's rates; keep caller charges at zero.
  • Preserve existing explicitly billable video errors. Ignore absent, malformed or invalid usage.
  • Pin e0e99d0, the squash commit on main from merged gateway #18; its tree matches the tested b6c7de7 revision. This also brings Create accounts for external services #15 (Bedrock stream errors), Add "debounce" or smt similar to frontend updates otherwise the frontend locks up when updates/sec is too hig #16 (CI), and Simpify and separate IPFS handling #17 (Gemini refusals/zero-output usage).
  • Verified 95 Gen tracking tests, Gen typecheck/staging build, 89 gateway tests, formatting and shell syntax. Nine E2E cases cover five live Google calls and four native fixtures through Gen/auth/wallet/telemetry. The documented JSON block records seven input tokens of provider cost, returns 422, and debits zero.
  • E2E uses local telemetry and the JSON inline coordinator helper. Gateway retains its 11 pre-existing typecheck diagnostics. Costs follow reported usage; Google's invoicing for blocked prompts remains unverified. Production deployment still requires promotion. Reverting this PR restores prior tracking and gateway pin.

@ElliotEtag
ElliotEtag added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit a69766c Oct 30, 2026
21 checks passed
@ElliotEtag
ElliotEtag deleted the codex/json-error-provider-cost branch October 30, 2026 23:53
@github-project-automation github-project-automation Bot moved this to Done in Dev Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant