Native OpenAI Ultrafast requests show Standard API value in Logs and usage totals

Open
#9,138 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
46/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript
Domain
analytics, backend

Research direction

Read the native OpenAI request and response tier handling, then trace the pricing path used by Logs and usage totals, including per-attempt pricing for mixed routes. Check how transmitted and authoritative tiers affect fresh input, cached input, and output prices across model and date schedules. Reproduce with the synthetic token counts in the issue; done when Ultrafast is estimated only from a transmitted tier, while authoritative Standard responses and explicit refusals take precedence.

Written by the indexing model from the issue text.

Description

Reproduction

On OpenCodex 2.100.8, send a native Codex Responses request to gpt-6.2-sol using the Ultrafast service tier. In Logs the request has the Ultrafast badge, but its estimated API value uses Standard rates. The same pricing path feeds usage totals.

Here is a synthetic example with no user data. During the published 3× pricing period, use 100,000 input tokens (90,000 cached) and 100 output tokens. The Standard quote is $0.0300. With an authoritative Ultrafast response, the Ultrafast quote should be $0.0900.

Native tier evidence

In the affected native path the recorded outcome has wireKind: "service-tier", wireValue: "ultrafast", responseServiceTier: "default", and responseTierAuthoritative: false. It can also report fastDowngradeReason: "wire-unavailable" even though the outgoing tier was serialized. For that case, an estimate based on the transmitted tier should be labeled as estimated. An authoritative Standard response or explicit refusal should still take precedence. A requested-only tier is insufficient to infer the Ultrafast price.

Please apply the published model- and date-specific schedule to fresh input, cached input and output in both Logs and usage totals, including per-attempt pricing for mixed routes. The example describes API-equivalent value, not a subscription charge.

OpenAI API pricing, Ultrafast

Dominant language
TypeScript
Stars
16.9k
Forks
1.3k
Avg merge
1d 4h
Merged PRs (30d)
814

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from lidge-jun/opencodex

All issues in lidge-jun/opencodex

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.