fix: complete image pricing metadata and stabilize OpenAPI descriptions

This commit is contained in:
jibanez-staticduo 2026-09-13 11:04:09 +02:00
parent 9af75b23e1
commit 9ef11699e5
No known key found for this signature in database
5 changed files with 9 additions and 2 deletions

View file

@ -18968,7 +18968,7 @@
}
}
},
"description": "\nUnified rate-limit error.\n\nEvery rate-limit condition surfaced by litellm \u2014 whether it originated from\nan upstream LLM provider, a vendor batch endpoint, or one of litellm's own\nproxy-side limiters (parallel-requests, dynamic-rate, batch-rate, budget,\nmax-iterations, etc.) \u2014 is raised as an instance of this class.\n\nThe :attr:`category` attribute lets callers distinguish the source. See\n:class:`RateLimitErrorCategory` for the available values.\n"
"description": "Unified rate-limit error.\n\nEvery rate-limit condition surfaced by litellm \u2014 whether it originated from\nan upstream LLM provider, a vendor batch endpoint, or one of litellm's own\nproxy-side limiters (parallel-requests, dynamic-rate, batch-rate, budget,\nmax-iterations, etc.) \u2014 is raised as an instance of this class.\n\nThe :attr:`category` attribute lets callers distinguish the source. See\n:class:`RateLimitErrorCategory` for the available values."
},
"500": {
"content": {

View file

@ -1,3 +1,4 @@
import inspect
from typing import Any, Final
from pydantic import BaseModel, Field
@ -35,7 +36,7 @@ def get_status_code(exception):
ERROR_RESPONSES: Final = {
get_status_code(exception): {
"model": ErrorResponse,
"description": exception.__doc__ or exception.__name__,
"description": inspect.cleandoc(exception.__doc__ or exception.__name__),
}
for exception in LITELLM_EXCEPTION_TYPES
}

View file

@ -3560,6 +3560,7 @@ class CustomPricingLiteLLMParams(MirroredPricingParams):
cache_read_input_token_cost_above_272k_tokens_priority: float | None = None
cache_read_input_token_cost_above_272k_tokens_flex: float | None = None
cache_read_input_audio_token_cost: float | None = None
cache_read_input_image_token_cost: float | None = None
input_cost_per_character_above_128k_tokens: float | None = None
input_cost_per_audio_token: float | None = None
input_cost_per_token_cache_hit: float | None = None

View file

@ -1432,6 +1432,7 @@ def test_openai_models_in_model_info(monkeypatch):
if (
info.get("litellm_provider") == "openai"
and info.get("supports_vision") is True
and info.get("mode") != "image_generation"
):
if info.get("supports_pdf_input") is not True:
violated_models.append(model)

View file

@ -29729,6 +29729,8 @@ export interface components {
cache_creation_input_token_cost_ultrafast?: number | null;
/** Cache Read Input Audio Token Cost */
cache_read_input_audio_token_cost?: number | null;
/** Cache Read Input Image Token Cost */
cache_read_input_image_token_cost?: number | null;
/** Cache Read Input Token Cost */
cache_read_input_token_cost?: number | null;
/** Cache Read Input Token Cost Above 200K Tokens */
@ -39943,6 +39945,8 @@ export interface components {
cache_creation_input_token_cost_ultrafast?: number | null;
/** Cache Read Input Audio Token Cost */
cache_read_input_audio_token_cost?: number | null;
/** Cache Read Input Image Token Cost */
cache_read_input_image_token_cost?: number | null;
/** Cache Read Input Token Cost */
cache_read_input_token_cost?: number | null;
/** Cache Read Input Token Cost Above 200K Tokens */