diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.json index 6d399d25bf6c..d3038d13a1e1 100644 --- a/litellm/model_prices_and_context_window_backup.json +++ b/litellm/model_prices_and_context_window_backup.json @@ -24419,6 +24419,31 @@ "supports_tool_choice": true, "supports_function_calling": true }, + "openrouter/qwen/qwen3-235b-a22b-2507": { + "input_cost_per_token": 7.1e-08, + "litellm_provider": "openrouter", + "max_input_tokens": 262144, + "max_output_tokens": 262144, + "max_tokens": 262144, + "mode": "chat", + "output_cost_per_token": 1e-07, + "source": "https://openrouter.ai/qwen/qwen3-235b-a22b-2507", + "supports_function_calling": true, + "supports_tool_choice": true + }, + "openrouter/qwen/qwen3-235b-a22b-thinking-2507": { + "input_cost_per_token": 1.1e-07, + "litellm_provider": "openrouter", + "max_input_tokens": 262144, + "max_output_tokens": 262144, + "max_tokens": 262144, + "mode": "chat", + "output_cost_per_token": 6e-07, + "source": "https://openrouter.ai/qwen/qwen3-235b-a22b-thinking-2507", + "supports_function_calling": true, + "supports_reasoning": true, + "supports_tool_choice": true + }, "openrouter/switchpoint/router": { "input_cost_per_token": 8.5e-07, "litellm_provider": "openrouter", diff --git a/litellm/proxy/anthropic_endpoints/endpoints.py b/litellm/proxy/anthropic_endpoints/endpoints.py index 0033deb07668..77bb1f53e621 100644 --- a/litellm/proxy/anthropic_endpoints/endpoints.py +++ b/litellm/proxy/anthropic_endpoints/endpoints.py @@ -80,6 +80,7 @@ async def anthropic_response( # noqa: PLR0915 # Create Anthropic-formatted response with violation message import uuid + from litellm.types.utils import AnthropicMessagesResponse _anthropic_response = AnthropicMessagesResponse( @@ -240,3 +241,19 @@ async def count_tokens( raise HTTPException( status_code=500, detail={"error": f"Internal server error: {str(e)}"} ) + + +@router.post( + "/api/event_logging/batch", + tags=["[beta] Anthropic Event Logging"], +) +async def event_logging_batch( + request: Request, +): + """ + Stubbed endpoint for Anthropic event logging batch requests. + + This endpoint accepts event logging requests but does nothing with them. + It exists to prevent 404 errors from Claude Code clients that send telemetry. + """ + return {"status": "ok"} diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index 022626e29925..637893872d9f 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -1864,6 +1864,7 @@ class ProxyConfig: def __init__(self) -> None: self.config: Dict[str, Any] = {} + self._last_semantic_filter_config: Optional[Dict[str, Any]] = None def is_yaml(self, config_file_path: str) -> bool: if not os.path.isfile(config_file_path): diff --git a/tests/test_litellm/proxy/anthropic_endpoints/test_endpoints.py b/tests/test_litellm/proxy/anthropic_endpoints/test_endpoints.py index 4024983e260e..f6189382d741 100644 --- a/tests/test_litellm/proxy/anthropic_endpoints/test_endpoints.py +++ b/tests/test_litellm/proxy/anthropic_endpoints/test_endpoints.py @@ -7,6 +7,7 @@ from unittest.mock import AsyncMock, MagicMock, patch import pytest +from fastapi.testclient import TestClient from litellm.proxy.common_request_processing import ProxyBaseLLMRequestProcessing @@ -66,3 +67,22 @@ async def test_async_data_generator_anthropic_dict_handling(self, mock_safe_dump assert ( mock_safe_dumps.call_count == 2 ) # Called twice, once for each dict object + + +class TestEventLoggingBatchEndpoint: + """Test the stubbed event logging batch endpoint""" + + def test_event_logging_batch_endpoint_exists(self): + """Test that the event_logging_batch endpoint exists and returns 200""" + from fastapi import FastAPI + + from litellm.proxy.anthropic_endpoints.endpoints import router + + app = FastAPI() + app.include_router(router) + + client = TestClient(app) + response = client.post("/api/event_logging/batch", json={"events": []}) + + assert response.status_code == 200 + assert response.json() == {"status": "ok"}