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]

Resolve merge conflicts with main branch

uzaxirrd8d5581f2920
diff --cc litellm/main.py
index 549c108d7b4,44f591d49ae..908c364220c
--- a/litellm/main.py
+++ b/litellm/main.py
@@@ -2447,12 -2411,12 +2411,8 @@@ def completion( # type: ignore # noqa
or "https://api.cohere.ai/v1/chat"
)
-- headers = headers or litellm.headers or {}
-- if headers is None:
-- headers = {}
--
-- if extra_headers is not None:
-- headers.update(extra_headers)
++ # Use the consolidated headers that were already merged at the top of the function
++ # No need for additional merging here as it's already done
response = base_llm_http_handler.completion(
model=model,
@@@ -4177,10 -4147,10 +4137,8 @@@ def embedding( # noqa: PLR091
or litellm.api_key
)
-- if extra_headers is not None and isinstance(extra_headers, dict):
-- headers = extra_headers
-- else:
-- headers = {}
++ # Use the consolidated headers that were already merged at the top of the function
++ # No need for additional merging here as it's already done
response = base_llm_http_handler.embedding(
model=model,