8 views
-/https://github.com/berriai/litellm/issues/31837
GitHub · issue

#31837 [Bug]: OpenAI Responses served service_tier=default is billed as priority when requested priority

  • State: open
  • Author: @silencedoctor
  • Labels: llm translation, SDK

### What happened?

OpenAI Responses cost tracking can bill a request at priority rates even when the provider response says the request was served as `default`.

This is a cost-calculation precedence bug for `/v1/responses`, not a UI configuration issue.

The problematic case is:

- the request asks for `service_tier="priority"` - the OpenAI Responses response contains `service_tier="default"` - LiteLLM cost calculation prefers the request-level tier before the response tier

That means cost tracking can select `input_cost_per_token_priority` / `output_cost_per_token_priority` even though the served tier reported by the provider was `default`.

Expected behavior: when a provider reports the served tier on the response, cost tracking should prefer that concrete served tier over the request preference. A response-level `default` should map to standard/default pricing.

### Steps to reproduce

```python import litellm from litellm import completion_cost from litellm.types.llms.openai import ResponsesAPIResponse

model = "test-openai-responses-default-tier-cost-model" litellm.register_model( model_cost={ model: { "input_cost_per_token": 0.001, "outp…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (1 events)
#0 of 0 · 31d19h8m22s ago — entered · #import:https:::github.com:berriai:litellm post #1930
The right-side change is harder because it spans multiple translation paths, terminal-state handling, metadata propagation, fallback behavior, and regression coverage. The left-side change is a comparatively localized pricing-precedence correction with narrower behavioral scope.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search