Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

mypy lint fix

Ishaan Jaffer9632b96df71a
diff --git a/litellm/proxy/common_utils/openapi_schema_compat.py b/litellm/proxy/common_utils/openapi_schema_compat.py
index 600b3909ec5..f97cee9415d 100644
--- a/litellm/proxy/common_utils/openapi_schema_compat.py
+++ b/litellm/proxy/common_utils/openapi_schema_compat.py
@@ -62,7 +62,7 @@ def get_openapi_schema_with_compat(
return core_schema.str_schema()
# Apply patch
- GenerateSchema._unknown_type_schema = patched_unknown_type_schema
+ setattr(GenerateSchema, '_unknown_type_schema', patched_unknown_type_schema)
try:
openapi_schema = get_openapi_func(
@@ -73,7 +73,7 @@ def get_openapi_schema_with_compat(
)
finally:
# Restore original method
- GenerateSchema._unknown_type_schema = original_unknown_type_schema
+ setattr(GenerateSchema, '_unknown_type_schema', original_unknown_type_schema)
return openapi_schema