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]

fix typo of orginal (#16255)

Bowen Liang4e12e3f90da9
diff --git a/litellm/litellm_core_utils/prompt_templates/factory.py b/litellm/litellm_core_utils/prompt_templates/factory.py
index ba83e3c72c1..1dd4590a0f3 100644
--- a/litellm/litellm_core_utils/prompt_templates/factory.py
+++ b/litellm/litellm_core_utils/prompt_templates/factory.py
@@ -1490,7 +1490,7 @@ def convert_to_anthropic_tool_invoke(
_content_element = add_cache_control_to_content(
anthropic_content_element=_anthropic_tool_use_param,
- orignal_content_element=dict(tool),
+ original_content_element=dict(tool),
)
if "cache_control" in _content_element:
@@ -1512,9 +1512,9 @@ def add_cache_control_to_content(
AnthropicMessagesToolUseParam,
ChatCompletionThinkingBlock,
],
- orignal_content_element: Union[dict, AllMessageValues],
+ original_content_element: Union[dict, AllMessageValues],
):
- cache_control_param = orignal_content_element.get("cache_control")
+ cache_control_param = original_content_element.get("cache_control")
if cache_control_param is not None and isinstance(cache_control_param, dict):
transformed_param = ChatCompletionCachedContent(**cache_control_param) # type: ignore
@@ -1727,7 +1727,7 @@ def anthropic_messages_pt( # noqa: PLR0915
)
_content_element = add_cache_control_to_content(
anthropic_content_element=_anthropic_content_element,
- orignal_content_element=dict(m),
+ original_content_element=dict(m),
)
if "cache_control" in _content_element:
@@ -1745,7 +1745,7 @@ def anthropic_messages_pt( # noqa: PLR0915
)
_content_element = add_cache_control_to_content(
anthropic_content_element=_anthropic_text_content_element,
- orignal_content_element=dict(m),
+ original_content_element=dict(m),
)
_content_element = cast(
AnthropicMessagesTextParam, _content_element
@@ -1767,7 +1767,7 @@ def anthropic_messages_pt( # noqa: PLR0915
}
_content_element = add_cache_control_to_content(
anthropic_content_element=_anthropic_content_text_element,
- orignal_content_element=dict(user_message_types_block),
+ original_content_element=dict(user_message_types_block),
)
if "cache_control" in _content_element:
@@ -1825,7 +1825,7 @@ def anthropic_messages_pt( # noqa: PLR0915
)
_cached_message = add_cache_control_to_content(
anthropic_content_element=anthropic_message,
- orignal_content_element=dict(m),
+ original_content_element=dict(m),
)
assistant_content.append(
@@ -1845,7 +1845,7 @@ def anthropic_messages_pt( # noqa: PLR0915
_content_element = add_cache_control_to_content(
anthropic_content_element=_anthropic_text_content_element,
- orignal_content_element=dict(assistant_content_block),
+ original_content_element=dict(assistant_content_block),
)
if "cache_control" in _content_element:
diff --git a/litellm/litellm_core_utils/streaming_handler.py b/litellm/litellm_core_utils/streaming_handler.py
index a5c3862cf30..4d8e109d882 100644
--- a/litellm/litellm_core_utils/streaming_handler.py
+++ b/litellm/litellm_core_utils/streaming_handler.py
@@ -1305,7 +1305,7 @@ class CustomStreamWrapper:
else: # openai / azure chat model
if self.custom_llm_provider == "azure":
if isinstance(chunk, BaseModel) and hasattr(chunk, "model"):
- # for azure, we need to pass the model from the orignal chunk
+ # for azure, we need to pass the model from the original chunk
self.model = getattr(chunk, "model", self.model)
response_obj = self.handle_openai_chat_completion_chunk(chunk)
if response_obj is None:
diff --git a/litellm/proxy/auth/auth_exception_handler.py b/litellm/proxy/auth/auth_exception_handler.py
index 268e3bb1b20..2b9c4cdce6e 100644
--- a/litellm/proxy/auth/auth_exception_handler.py
+++ b/litellm/proxy/auth/auth_exception_handler.py
@@ -44,7 +44,7 @@ class UserAPIKeyAuthExceptionHandler:
- UserAPIKeyAuth: If general_settings.allow_requests_on_db_unavailable is True
Raises:
- - Orignal Exception in all other cases
+ - Original Exception in all other cases
"""
from litellm.proxy.proxy_server import (
general_settings,
diff --git a/litellm/proxy/management_endpoints/model_management_endpoints.py b/litellm/proxy/management_endpoints/model_management_endpoints.py
index 9e9301dbbe8..5e9f2544020 100644
--- a/litellm/proxy/management_endpoints/model_management_endpoints.py
+++ b/litellm/proxy/management_endpoints/model_management_endpoints.py
@@ -287,7 +287,7 @@ async def _add_model_to_db(
) -> Optional[LiteLLM_ProxyModelTable]:
# encrypt litellm params #
_litellm_params_dict = model_params.litellm_params.dict(exclude_none=True)
- _orignal_litellm_model_name = model_params.litellm_params.model
+ _original_litellm_model_name = model_params.litellm_params.model
for k, v in _litellm_params_dict.items():
encrypted_value = encrypt_value_helper(
value=v, new_encryption_key=new_encryption_key
diff --git a/tests/proxy_unit_tests/test_proxy_token_counter.py b/tests/proxy_unit_tests/test_proxy_token_counter.py
index 41132a65f2c..39606ef7ce9 100644
--- a/tests/proxy_unit_tests/test_proxy_token_counter.py
+++ b/tests/proxy_unit_tests/test_proxy_token_counter.py
@@ -694,7 +694,7 @@ async def test_vertex_ai_gemini_token_counting_with_contents(model_name):
print("Vertex AI Gemini token counting response:", response)
- # validate we have orignal response
+ # validate we have original response
assert response.original_response is not None
assert response.original_response.get("totalTokens") is not None
assert response.original_response.get("promptTokensDetails") is not None