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
{
"resourceSpans": [
{
"resource": {
"attributes": [
{
"key": "telemetry.sdk.language",
"value": {
"stringValue": "python"
}
},
{
"key": "telemetry.sdk.name",
"value": {
"stringValue": "opentelemetry"
}
},
{
"key": "telemetry.sdk.version",
"value": {
"stringValue": "1.42.1"
}
},
{
"key": "telemetry.auto.version",
"value": {
"stringValue": "0.63b1"
}
},
{
"key": "service.name",
"value": {
"stringValue": "unknown_service"
}
}
]
},
"scopeSpans": [
{
"scope": {
"name": "litellm.gateway.client"
},
"spans": [
{
"traceId": "cdd888fb2417b10d57e2b2cee4dd428c",
"spanId": "977a62497f2dda9d",
"parentSpanId": "1a4892aa3fae3307",
"name": "gateway.request",
"kind": 3,
"startTimeUnixNano": "1791061574509820000",
"endTimeUnixNano": "1791061576009220000",
"attributes": [
{
"key": "litellm.gateway.attempt",
"value": {
"boolValue": true
}
},
{
"key": "http.request.method",
"value": {
"stringValue": "POST"
}
},
{
"key": "url.full",
"value": {
"stringValue": "http://localhost:4002/v1/chat/completions"
}
},
{
"key": "server.address",
"value": {
"stringValue": "localhost"
}
},
{
"key": "http.response.status_code",
"value": {
"intValue": "503"
}
},
{
"key": "litellm.call_id",
"value": {
"stringValue": "4d1e094d-24e7-49f6-8d33-656a7d7712ae"
}
}
],
"status": {
"code": 2
},
"flags": 256
}
]
}
]
},
{
"resource": {
"attributes": [
{
"key": "telemetry.sdk.language",
"value": {
"stringValue": "python"
}
},
{
"key": "telemetry.sdk.name",
"value": {
"stringValue": "opentelemetry"
}
},
{
"key": "telemetry.sdk.version",
"value": {
"stringValue": "1.42.1"
}
},
{
"key": "telemetry.auto.version",
"value": {
"stringValue": "0.63b1"
}
},
{
"key": "service.name",
"value": {
"stringValue": "unknown_service"
}
}
]
},
"scopeSpans": [
{
"scope": {
"name": "litellm.gateway.client"
},
"spans": [
{
"traceId": "cdd888fb2417b10d57e2b2cee4dd428c",
"spanId": "2856caaa423beba1",
"parentSpanId": "1a4892aa3fae3307",
"name": "gateway.request",
"kind": 3,
"startTimeUnixNano": "1791061576507921000",
"endTimeUnixNano": "1791061577761649000",
"attributes": [
{
"key": "litellm.gateway.attempt",
"value": {
"boolValue": true
}
},
{
"key": "http.request.method",
"value": {
"stringValue": "POST"
}
},
{
"key": "url.full",
"value": {
"stringValue": "http://localhost:4002/v1/chat/completions"
}
},
{
"key": "server.address",
"value": {
"stringValue": "localhost"
}
},
{
"key": "http.response.status_code",
"value": {
"intValue": "200"
}
},
{
"key": "litellm.call_id",
"value": {
"stringValue": "38acfc26-d8f3-4adc-9528-0196c28b8640"
}
}
],
"status": {},
"flags": 256
}
]
},
{
"scope": {
"name": "openinference.instrumentation.google_adk",
"version": "1.0.2"
},
"spans": [
{
"traceId": "cdd888fb2417b10d57e2b2cee4dd428c",
"spanId": "1a4892aa3fae3307",
"parentSpanId": "dff96cfbe5a5cb73",
"name": "call_llm",
"kind": 1,
"startTimeUnixNano": "1791061573142809000",
"endTimeUnixNano": "1791061577770765000",
"attributes": [
{
"key": "session.id",
"value": {
"stringValue": "debug_session_id"
}
},
{
"key": "user.id",
"value": {
"stringValue": "debug_user_id"
}
},
{
"key": "gen_ai.operation.name",
"value": {
"stringValue": "generate_content"
}
},
{
"key": "gen_ai.agent.name",
"value": {
"stringValue": "research_agent"
}
},
{
"key": "gen_ai.conversation.id",
"value": {
"stringValue": "debug_session_id"
}
},
{
"key": "gen_ai.system",
"value": {
"stringValue": "gcp.vertex.agent"
}
},
{
"key": "gen_ai.request.model",
"value": {
"stringValue": "openai/openai/gpt-6-luna"
}
},
{
"key": "gcp.vertex.agent.invocation_id",
"value": {
"stringValue": "e-de6dbbd8-e192-415a-a15c-24e216046237"
}
},
{
"key": "gcp.vertex.agent.session_id",
"value": {
"stringValue": "debug_session_id"
}
},
{
"key": "gcp.vertex.agent.event_id",
"value": {
"stringValue": "e5d9e1dd-20e8-4715-96db-dcd96a5f4e35"
}
},
{
"key": "gcp.vertex.agent.llm_request",
"value": {
"stringValue": "{\"model\": \"openai/openai/gpt-6-luna\", \"config\": {\"system_instruction\": \"You are an agent. Your internal name is \\\"research_agent\\\".\", \"labels\": {\"adk_agent_name\": \"research_agent\"}}, \"contents\": [{\"parts\": [{\"text\": \"Reply with one short sentence about agent traces.\"}], \"role\": \"user\"}]}"
}
},
{
"key": "gcp.vertex.agent.llm_response",
"value": {
"stringValue": "{\"model_version\":\"openai/gpt-6-luna\",\"content\":{\"parts\":[{\"text\":\"Agent traces show the steps an agent takes to complete a task.\"}],\"role\":\"model\"},\"partial\":false,\"finish_reason\":\"STOP\",\"usage_metadata\":{\"cached_content_token_count\":0,\"candidates_token_count\":47,\"prompt_token_count\":32,\"thoughts_token_count\":25,\"total_token_count\":79}}"
}
},
{
"key": "gen_ai.usage.input_tokens",
"value": {
"intValue": "32"
}
},
{
"key": "gen_ai.usage.output_tokens",
"value": {
"intValue": "72"
}
},
{
"key": "gen_ai.usage.cache_read.input_tokens",
"value": {
"intValue": "0"
}
},
{
"key": "gen_ai.usage.reasoning.output_tokens",
"value": {
"intValue": "25"
}
},
{
"key": "gen_ai.response.finish_reasons",
"value": {
"arrayValue": {
"values": [
{
"stringValue": "stop"
}
]
}
}
},
{
"key": "llm.provider",
"value": {
"stringValue": "google"
}
},
{
"key": "input.value",
"value": {
"stringValue": "{\"model\":\"openai/openai/gpt-6-luna\",\"contents\":[{\"parts\":[{\"text\":\"Reply with one short sentence about agent traces.\"}],\"role\":\"user\"}],\"config\":{\"system_instruction\":\"You are an agent. Your internal name is \\\"research_agent\\\".\",\"labels\":{\"adk_agent_name\":\"research_agent\"}},\"live_connect_config\":{\"input_audio_transcription\":{},\"output_audio_transcription\":{}}}"
}
},
{
"key": "input.mime_type",
"value": {
"stringValue": "application/json"
}
},
{
"key": "llm.model_name",
"value": {
"stringValue": "openai/openai/gpt-6-luna"
}
},
{
"key": "llm.invocation_parameters",
"value": {
"stringValue": "{\"system_instruction\":\"You are an agent. Your internal name is \\\"research_agent\\\".\",\"labels\":{\"adk_agent_name\":\"research_agent\"}}"
}
},
{
"key": "llm.input_messages.0.message.role",
"value": {
"stringValue": "system"
}
},
{
"key": "llm.input_messages.0.message.content",
"value": {
"stringValue": "You are an agent. Your internal name is \"research_agent\"."
}
},
{
"key": "llm.input_messages.1.message.role",
"value": {
"stringValue": "user"
}
},
{
"key": "llm.input_messages.1.message.contents.0.message_content.text",
"value": {
"stringValue": "Reply with one short sentence about agent traces."
}
},
{
"key": "llm.input_messages.1.message.contents.0.message_content.type",
"value": {
"stringValue": "text"
}
},
{
"key": "output.value",
"value": {
"stringValue": "{\"model_version\":\"openai/gpt-6-luna\",\"content\":{\"parts\":[{\"text\":\"Agent traces show the steps an agent takes to complete a task.\"}],\"role\":\"model\"},\"partial\":false,\"finish_reason\":\"STOP\",\"usage_metadata\":{\"cached_content_token_count\":0,\"candidates_token_count\":47,\"prompt_token_count\":32,\"thoughts_token_count\":25,\"total_token_count\":79}}"
}
},
{
"key": "output.mime_type",
"value": {
"stringValue": "application/json"
}
},
{
"key": "llm.token_count.total",
"value": {
"intValue": "79"
}
},
{
"key": "llm.token_count.prompt",
"value": {
"intValue": "32"
}
},
{
"key": "llm.token_count.completion_details.reasoning",
"value": {
"intValue": "25"
}
},
{
"key": "llm.token_count.completion",
"value": {
"intValue": "47"
}
},
{
"key": "llm.output_messages.0.message.role",
"value": {
"stringValue": "model"
}
},
{
"key": "llm.output_messages.0.message.contents.0.message_content.text",
"value": {
"stringValue": "Agent traces show the steps an agent takes to complete a task."
}
},
{
"key": "llm.output_messages.0.message.contents.0.message_content.type",
"value": {
"stringValue": "text"
}
},
{
"key": "openinference.span.kind",
"value": {
"stringValue": "LLM"
}
}
],
"status": {
"code": 1
},
"flags": 256
},
{
"traceId": "cdd888fb2417b10d57e2b2cee4dd428c",
"spanId": "dff96cfbe5a5cb73",
"parentSpanId": "1effa85408e9e4f7",
"name": "agent_run [research_agent]",
"kind": 1,
"startTimeUnixNano": "1791061573129211000",
"endTimeUnixNano": "1791061577770883000",
"attributes": [
{
"key": "agent.name",
"value": {
"stringValue": "research_agent"
}
},
{
"key": "session.id",
"value": {
"stringValue": "debug_session_id"
}
},
{
"key": "user.id",
"value": {
"stringValue": "debug_user_id"
}
},
{
"key": "gen_ai.operation.name",
"value": {
"stringValue": "invoke_agent"
}
},
{
"key": "gen_ai.agent.description",
"value": {
"stringValue": ""
}
},
{
"key": "gen_ai.agent.name",
"value": {
"stringValue": "research_agent"
}
},
{
"key": "gen_ai.conversation.id",
"value": {
"stringValue": "debug_session_id"
}
},
{
"key": "output.value",
"value": {
"stringValue": "{\"model_version\":\"openai/gpt-6-luna\",\"content\":{\"parts\":[{\"text\":\"Agent traces show the steps an agent takes to complete a task.\"}],\"role\":\"model\"},\"partial\":false,\"finish_reason\":\"STOP\",\"usage_metadata\":{\"cached_content_token_count\":0,\"candidates_token_count\":47,\"prompt_token_count\":32,\"thoughts_token_count\":25,\"total_token_count\":79},\"invocation_id\":\"e-de6dbbd8-e192-415a-a15c-24e216046237\",\"author\":\"research_agent\",\"actions\":{\"state_delta\":{},\"artifact_delta\":{},\"requested_auth_configs\":{},\"requested_tool_confirmations\":{}},\"node_info\":{\"path\":\"\"},\"id\":\"e5d9e1dd-20e8-4715-96db-dcd96a5f4e35\",\"timestamp\":1791061573.14271}"
}
},
{
"key": "output.mime_type",
"value": {
"stringValue": "application/json"
}
},
{
"key": "openinference.span.kind",
"value": {
"stringValue": "AGENT"
}
}
],
"status": {
"code": 1
},
"flags": 256
},
{
"traceId": "cdd888fb2417b10d57e2b2cee4dd428c",
"spanId": "1effa85408e9e4f7",
"name": "invocation [research_app]",
"kind": 1,
"startTimeUnixNano": "1791061573075243000",
"endTimeUnixNano": "1791061577771095000",
"attributes": [
{
"key": "input.value",
"value": {
"stringValue": "{\"user_id\": \"debug_user_id\", \"session_id\": \"debug_session_id\", \"invocation_id\": null, \"new_message\": {\"parts\": [{\"text\": \"Reply with one short sentence about agent traces.\"}], \"role\": \"user\"}, \"state_delta\": null, \"run_config\": {\"save_input_blobs_as_artifacts\": false, \"support_cfc\": false, \"streaming_mode\": \"StreamingMode.NONE\", \"output_audio_transcription\": {}, \"input_audio_transcription\": {}, \"save_live_blob\": false, \"save_live_audio\": false, \"max_llm_calls\": 500, \"include_thoughts_from_other_agents\": false}, \"yield_user_message\": false, \"abort_signal\": null}"
}
},
{
"key": "input.mime_type",
"value": {
"stringValue": "application/json"
}
},
{
"key": "user.id",
"value": {
"stringValue": "debug_user_id"
}
},
{
"key": "session.id",
"value": {
"stringValue": "debug_session_id"
}
},
{
"key": "output.value",
"value": {
"stringValue": "{\"model_version\":\"openai/gpt-6-luna\",\"content\":{\"parts\":[{\"text\":\"Agent traces show the steps an agent takes to complete a task.\"}],\"role\":\"model\"},\"partial\":false,\"finish_reason\":\"STOP\",\"usage_metadata\":{\"cached_content_token_count\":0,\"candidates_token_count\":47,\"prompt_token_count\":32,\"thoughts_token_count\":25,\"total_token_count\":79},\"invocation_id\":\"e-de6dbbd8-e192-415a-a15c-24e216046237\",\"author\":\"research_agent\",\"actions\":{\"state_delta\":{},\"artifact_delta\":{},\"requested_auth_configs\":{},\"requested_tool_confirmations\":{}},\"node_info\":{\"path\":\"research_agent@1\"},\"id\":\"e5d9e1dd-20e8-4715-96db-dcd96a5f4e35\",\"timestamp\":1791061573.14271}"
}
},
{
"key": "output.mime_type",
"value": {
"stringValue": "application/json"
}
},
{
"key": "openinference.span.kind",
"value": {
"stringValue": "CHAIN"
}
}
],
"status": {
"code": 1
},
"flags": 256
}
]
}
]
}
]
}