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]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
call spend logs endpoint
Ishaan Jaff414d2dcb523d
diff --git a/litellm/proxy/example_config_yaml/pass_through_config.yaml b/litellm/proxy/example_config_yaml/pass_through_config.yamlindex db9558b3cf3..41d581249f1 100644--- a/litellm/proxy/example_config_yaml/pass_through_config.yaml+++ b/litellm/proxy/example_config_yaml/pass_through_config.yaml@@ -6,4 +6,4 @@ model_list:api_base: https://exampleopenaiendpoint-production.up.railway.app/general_settings:master_key: sk-1234- custom_auth: example_config_yaml.custom_auth.user_api_key_auth\ No newline at end of file+ custom_auth: custom_auth_basic.user_api_key_auth\ No newline at end of filediff --git a/tests/pass_through_tests/test_vertex_ai.py b/tests/pass_through_tests/test_vertex_ai.pyindex 10660ddb95e..30600c97d6c 100644--- a/tests/pass_through_tests/test_vertex_ai.py+++ b/tests/pass_through_tests/test_vertex_ai.py@@ -57,6 +57,23 @@ def load_vertex_ai_credentials():os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = os.path.abspath(temp_file.name)+async def call_spend_logs_endpoint():+ """+ Call this+ curl -X GET "http://0.0.0.0:4000/spend/logs?start_date={}" -H "Authorization: Bearer sk-1234"+ """+ import datetime+ import requests++ todays_date = datetime.datetime.now().strftime("%Y-%m-%d")+ url = f"http://0.0.0.0:4000/spend/logs?start_date={todays_date}"+ headers = {"Authorization": f"Bearer sk-1234"}+ response = requests.get(url, headers=headers)+ print("response from call_spend_logs_endpoint", response)++ return response++LITE_LLM_ENDPOINT = "http://localhost:4000"@@ -74,4 +91,7 @@ async def test_basic_vertex_ai_pass_through_with_spendlog():print("response", response)+ _spend_logs_response = await call_spend_logs_endpoint()+ print("spend logs response", _spend_logs_response)+pass