Fix: Nonetype object has no method .get() for call tool

This commit is contained in:
Sameer Kankute 2026-01-07 10:42:02 +05:30
parent 7dca991a5f
commit cc45423294
3 changed files with 200 additions and 4 deletions

View file

@ -405,7 +405,23 @@
"supports_video_input": true,
"supports_vision": true
},
"amazon.nova-2-multimodal-embeddings-v1:0": {
"litellm_provider": "bedrock",
"max_input_tokens": 8172,
"max_tokens": 8172,
"mode": "embedding",
"input_cost_per_token": 1.35e-7,
"input_cost_per_image": 6e-5,
"input_cost_per_video_per_second": 0.0007,
"input_cost_per_audio_per_second": 0.00014,
"output_cost_per_token": 0.0,
"output_vector_size": 3072,
"source": "https://us-east-1.console.aws.amazon.com/bedrock/home?region=us-east-1#/model-catalog/serverless/amazon.nova-2-multimodal-embeddings-v1:0",
"supports_embedding_image_input": true,
"supports_image_input": true,
"supports_video_input": true,
"supports_audio_input": true
},
"amazon.nova-micro-v1:0": {
"input_cost_per_token": 3.5e-08,
"litellm_provider": "bedrock_converse",
@ -32152,6 +32168,181 @@
"output_cost_per_token": 2e-07,
"litellm_provider": "fireworks_ai",
"mode": "chat"
},
"llamagate/llama-3.1-8b": {
"max_tokens": 8192,
"max_input_tokens": 131072,
"max_output_tokens": 8192,
"input_cost_per_token": 3e-08,
"output_cost_per_token": 5e-08,
"litellm_provider": "llamagate",
"mode": "chat",
"supports_function_calling": true,
"supports_response_schema": true
},
"llamagate/llama-3.2-3b": {
"max_tokens": 8192,
"max_input_tokens": 131072,
"max_output_tokens": 8192,
"input_cost_per_token": 4e-08,
"output_cost_per_token": 8e-08,
"litellm_provider": "llamagate",
"mode": "chat",
"supports_function_calling": true,
"supports_response_schema": true
},
"llamagate/mistral-7b-v0.3": {
"max_tokens": 8192,
"max_input_tokens": 32768,
"max_output_tokens": 8192,
"input_cost_per_token": 1e-07,
"output_cost_per_token": 1.5e-07,
"litellm_provider": "llamagate",
"mode": "chat",
"supports_function_calling": true,
"supports_response_schema": true
},
"llamagate/qwen3-8b": {
"max_tokens": 8192,
"max_input_tokens": 32768,
"max_output_tokens": 8192,
"input_cost_per_token": 4e-08,
"output_cost_per_token": 1.4e-07,
"litellm_provider": "llamagate",
"mode": "chat",
"supports_function_calling": true,
"supports_response_schema": true
},
"llamagate/dolphin3-8b": {
"max_tokens": 8192,
"max_input_tokens": 128000,
"max_output_tokens": 8192,
"input_cost_per_token": 8e-08,
"output_cost_per_token": 1.5e-07,
"litellm_provider": "llamagate",
"mode": "chat",
"supports_function_calling": true,
"supports_response_schema": true
},
"llamagate/deepseek-r1-8b": {
"max_tokens": 16384,
"max_input_tokens": 65536,
"max_output_tokens": 16384,
"input_cost_per_token": 1e-07,
"output_cost_per_token": 2e-07,
"litellm_provider": "llamagate",
"mode": "chat",
"supports_function_calling": true,
"supports_response_schema": true,
"supports_reasoning": true
},
"llamagate/deepseek-r1-7b-qwen": {
"max_tokens": 16384,
"max_input_tokens": 131072,
"max_output_tokens": 16384,
"input_cost_per_token": 8e-08,
"output_cost_per_token": 1.5e-07,
"litellm_provider": "llamagate",
"mode": "chat",
"supports_function_calling": true,
"supports_response_schema": true,
"supports_reasoning": true
},
"llamagate/openthinker-7b": {
"max_tokens": 8192,
"max_input_tokens": 32768,
"max_output_tokens": 8192,
"input_cost_per_token": 8e-08,
"output_cost_per_token": 1.5e-07,
"litellm_provider": "llamagate",
"mode": "chat",
"supports_function_calling": true,
"supports_response_schema": true,
"supports_reasoning": true
},
"llamagate/qwen2.5-coder-7b": {
"max_tokens": 8192,
"max_input_tokens": 32768,
"max_output_tokens": 8192,
"input_cost_per_token": 6e-08,
"output_cost_per_token": 1.2e-07,
"litellm_provider": "llamagate",
"mode": "chat",
"supports_function_calling": true,
"supports_response_schema": true
},
"llamagate/deepseek-coder-6.7b": {
"max_tokens": 4096,
"max_input_tokens": 16384,
"max_output_tokens": 4096,
"input_cost_per_token": 6e-08,
"output_cost_per_token": 1.2e-07,
"litellm_provider": "llamagate",
"mode": "chat",
"supports_function_calling": true,
"supports_response_schema": true
},
"llamagate/codellama-7b": {
"max_tokens": 4096,
"max_input_tokens": 16384,
"max_output_tokens": 4096,
"input_cost_per_token": 6e-08,
"output_cost_per_token": 1.2e-07,
"litellm_provider": "llamagate",
"mode": "chat",
"supports_function_calling": true,
"supports_response_schema": true
},
"llamagate/qwen3-vl-8b": {
"max_tokens": 8192,
"max_input_tokens": 32768,
"max_output_tokens": 8192,
"input_cost_per_token": 1.5e-07,
"output_cost_per_token": 5.5e-07,
"litellm_provider": "llamagate",
"mode": "chat",
"supports_function_calling": true,
"supports_response_schema": true,
"supports_vision": true
},
"llamagate/llava-7b": {
"max_tokens": 2048,
"max_input_tokens": 4096,
"max_output_tokens": 2048,
"input_cost_per_token": 1e-07,
"output_cost_per_token": 2e-07,
"litellm_provider": "llamagate",
"mode": "chat",
"supports_response_schema": true,
"supports_vision": true
},
"llamagate/gemma3-4b": {
"max_tokens": 8192,
"max_input_tokens": 128000,
"max_output_tokens": 8192,
"input_cost_per_token": 3e-08,
"output_cost_per_token": 8e-08,
"litellm_provider": "llamagate",
"mode": "chat",
"supports_function_calling": true,
"supports_response_schema": true,
"supports_vision": true
},
"llamagate/nomic-embed-text": {
"max_tokens": 8192,
"max_input_tokens": 8192,
"input_cost_per_token": 2e-08,
"output_cost_per_token": 0,
"litellm_provider": "llamagate",
"mode": "embedding"
},
"llamagate/qwen3-embedding-8b": {
"max_tokens": 40960,
"max_input_tokens": 40960,
"input_cost_per_token": 2e-08,
"output_cost_per_token": 0,
"litellm_provider": "llamagate",
"mode": "embedding"
}
}

View file

@ -218,10 +218,10 @@ if MCP_AVAILABLE:
from fastapi import HTTPException
from litellm.exceptions import BlockedPiiEntityError, GuardrailRaisedException
from litellm.proxy.proxy_server import add_litellm_data_to_request, proxy_config
from litellm.proxy._experimental.mcp_server.auth.user_api_key_auth_mcp import (
MCPRequestHandler,
)
from litellm.proxy.proxy_server import add_litellm_data_to_request, proxy_config
try:
data = await request.json()
@ -252,7 +252,12 @@ if MCP_AVAILABLE:
if mcp_server_auth_headers:
data["mcp_server_auth_headers"] = mcp_server_auth_headers
data["raw_headers"] = raw_headers_from_request
# Extract user_api_key_auth from metadata and add to top level
# call_mcp_tool expects user_api_key_auth as a top-level parameter
if "metadata" in data and "user_api_key_auth" in data["metadata"]:
data["user_api_key_auth"] = data["metadata"]["user_api_key_auth"]
result = await call_mcp_tool(**data)
return result
except BlockedPiiEntityError as e:

View file

@ -1195,7 +1195,7 @@ class ProxyLogging:
and _callback.__class__.async_pre_call_hook
!= CustomLogger.async_pre_call_hook
):
if call_type == "mcp_call" and user_api_key_dict is None:
if call_type == "call_mcp_tool" and user_api_key_dict is None:
continue
response = await _callback.async_pre_call_hook(