🤖 fix: budget accounting ignores OpenAI service-tier (priority) pricing
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- backend
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- TypeScript
- Estrellas
- 2.1k
- Forks
- 140
- Merge medio
- 4 h 55 min
- PR fusionados (30 d)
- 897
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de coder/xum
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
🤖 fix: a Daytona connection test started before a settings save can show the old key as connectedAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
coder/xum#7121 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Issues similares
-
level/task type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
wazuh/wazuh-dashboard-plugins#9508 ·
Los mantenedores suelen responder en 1 día
-
Testnet EOL page links Zonescan mainnetPosiblemente ocupada @napelvs la tomó hoy. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 76/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Azure-Samples/azure-search-openai-demo#3249 ·
Los mantenedores suelen responder en 1 día
-
[Docs] docs/architecture.mermaid leaves out 21 of the 51 src/ directoriesPosiblemente ocupada @uyg7x la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
enhancement status:needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
dongdongbh/Mindwtr#1438 ·
Los mantenedores suelen responder en 1 día