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: TypeError: Object of type function is not JSON serializable

Sameer Kankuted590c820c212
diff --git a/litellm/utils.py b/litellm/utils.py
index df0b2317123..fd1ee48850a 100644
--- a/litellm/utils.py
+++ b/litellm/utils.py
@@ -2990,6 +2990,8 @@ def get_optional_params_embeddings( # noqa: PLR0915
drop_params = passed_params.pop("drop_params", None)
additional_drop_params = passed_params.pop("additional_drop_params", None)
+ # Remove function objects from passed_params to avoid JSON serialization errors
+ passed_params.pop("get_supported_openai_params", None)
def _check_valid_arg(supported_params: Optional[list]):
if supported_params is None: