🤖 fix: budget accounting ignores OpenAI service-tier (priority) pricing
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- backend
Direzione di ricerca
Start with displayUsage.ts and models-extra.ts, then trace the callers of createDisplayUsage to see where the effective service tier is available for direct OpenAI and Coder gateway requests. Confirm how budget admission and metering use the catalog, then ensure priority-tier runs are priced correctly or rejected when budgeted until tier pricing exists.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
Cost accounting and budget enforcement price every OpenAI request at the model's base rates, regardless of the effective service tier. createDisplayUsage(usage, model, providerMetadata, metadataModelOverride) has no tier input and models-extra.ts carries base-tier rates only, so a goal run with --service-tier priority (a higher-cost tier that the app labels as such) and --budget is admitted and metered as if it ran on the default tier. The represented dollar cap therefore under-counts real spend on priority runs.
Scope
- Applies to every model that supports OpenAI service tiers (GPT-5.x, GPT-6 Astra/Sol/Luna), on direct OpenAI and the Coder gateway OpenAI path. It is not specific to any single model's pricing entry.
- Surfaced by Codex security review on #4259 (https://github.com/coder/xum/pull/4259#discussion_r4076486238); deferred there because the fix needs a new accounting input (effective tier) rather than repairing a defect that PR introduced.
Proposed fix (either)
- Carry the effective tier into usage accounting: extend
createDisplayUsage(or its caller) with the pinnedserviceTierand apply per-tier rate multipliers/rates from the catalog. - Or fail closed: reject budgeted runs when the effective tier is non-default until tier pricing exists.
Follow-up trigger
Next change to usage accounting or the OpenAI pricing catalog; owner: whoever next touches displayUsage.ts / models-extra.ts.
Generated with xum • Model: coder:anthropic/claude-fable-5-1 • Thinking: xhigh • Cost: $174.60
- Lingua principale
- TypeScript
- Stelle
- 2.1k
- Fork
- 142
- Merge medio
- 4h 58m
- PR unite (30g)
- 905
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di coder/xum
-
🤖 fix: stream-error card header actions reach 2.6px into the card padding in a 170px VS Code sidebarAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
I maintainer di solito rispondono entro 1 giorno
-
tech-debt
Difficoltà 2/5 Mezza giornata Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
tech-debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
approved backlog
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
Issue simili
-
area:editor bug issue-form:bug P0 platform:windows review: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
1lck/Lithe-IDEA#1388 ·
I maintainer di solito rispondono entro 1 giorno
-
fix(api): isToolAuditEnabled swallows database read errors on auditToolOperations without loggingApertaarea: backend bug priority: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
snapotter-hq/SnapOtter#3238 ·
I maintainer di solito rispondono entro 1 giorno
-
rig up --plan times out after 5 s and reports an UNKNOWN outcome while the daemon completes the planAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
filesystem: search_files does not expand non-wildcard excludePatterns like directory_tree doesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
modelcontextprotocol/servers#5216 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno