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": "host.name",
"value": {
"stringValue": "fixture-host"
}
},
{
"key": "host.arch",
"value": {
"stringValue": "arm64"
}
},
{
"key": "host.id",
"value": {
"stringValue": "00000000-0000-0000-0000-000000000000"
}
},
{
"key": "process.pid",
"value": {
"intValue": "85502"
}
},
{
"key": "process.executable.name",
"value": {
"stringValue": "node"
}
},
{
"key": "process.executable.path",
"value": {
"stringValue": "/home/user/.local/share/fnm/node-versions/v25.8.1/installation/bin/node"
}
},
{
"key": "process.command_args",
"value": {
"arrayValue": {
"values": [
{
"stringValue": "/home/user/.local/share/fnm/node-versions/v25.8.1/installation/bin/node"
},
{
"stringValue": "--env-file=.env"
},
{
"stringValue": "/home/user/dev/litellm-lens-example/vercel-ai-sdk-js/validate-attempts.ts"
},
{
"stringValue": "retry"
}
]
}
}
},
{
"key": "process.runtime.version",
"value": {
"stringValue": "25.8.1"
}
},
{
"key": "process.runtime.name",
"value": {
"stringValue": "nodejs"
}
},
{
"key": "process.runtime.description",
"value": {
"stringValue": "Node.js"
}
},
{
"key": "process.command",
"value": {
"stringValue": "/home/user/dev/litellm-lens-example/vercel-ai-sdk-js/validate-attempts.ts"
}
},
{
"key": "process.owner",
"value": {
"stringValue": "user"
}
},
{
"key": "service.name",
"value": {
"stringValue": "unknown_service:node"
}
},
{
"key": "telemetry.sdk.language",
"value": {
"stringValue": "nodejs"
}
},
{
"key": "telemetry.sdk.name",
"value": {
"stringValue": "opentelemetry"
}
},
{
"key": "telemetry.sdk.version",
"value": {
"stringValue": "2.11.0"
}
}
]
},
"scopeSpans": [
{
"scope": {
"name": "litellm.gateway.client"
},
"spans": [
{
"traceId": "18b74e8029c4c62d6ee2acbfaccd05d7",
"spanId": "c2bdb1aefaca871b",
"parentSpanId": "a06df2bcb5afedd9",
"name": "gateway.request",
"kind": 3,
"startTimeUnixNano": "1791061413988000000",
"endTimeUnixNano": "1791061415446111584",
"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": "cd72f919-eb8e-4854-8c74-1a2d22fbe271"
}
}
],
"status": {
"code": 2
},
"flags": 257
},
{
"traceId": "18b74e8029c4c62d6ee2acbfaccd05d7",
"spanId": "75cf929b3549bf74",
"parentSpanId": "a06df2bcb5afedd9",
"name": "gateway.request",
"kind": 3,
"startTimeUnixNano": "1791061417449000000",
"endTimeUnixNano": "1791061418712098416",
"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": "13406f69-913c-4ed9-87fd-03785496f128"
}
}
],
"status": {},
"flags": 257
}
]
},
{
"scope": {
"name": "gen_ai"
},
"spans": [
{
"traceId": "18b74e8029c4c62d6ee2acbfaccd05d7",
"spanId": "a06df2bcb5afedd9",
"parentSpanId": "07480d8af91ab2a5",
"name": "chat openai/gpt-6-luna",
"kind": 3,
"startTimeUnixNano": "1791061413986000000",
"endTimeUnixNano": "1791061418714608083",
"attributes": [
{
"key": "gen_ai.operation.name",
"value": {
"stringValue": "chat"
}
},
{
"key": "gen_ai.provider.name",
"value": {
"stringValue": "litellm.chat"
}
},
{
"key": "gen_ai.request.model",
"value": {
"stringValue": "openai/gpt-6-luna"
}
},
{
"key": "gen_ai.input.messages",
"value": {
"stringValue": "[{\"role\":\"user\",\"parts\":[{\"type\":\"text\",\"content\":\"Reply with one short sentence about agent traces.\"}]}]"
}
},
{
"key": "gen_ai.client.operation.duration",
"value": {
"doubleValue": 4.727941082999999
}
},
{
"key": "gen_ai.response.finish_reasons",
"value": {
"arrayValue": {
"values": [
{
"stringValue": "stop"
}
]
}
}
},
{
"key": "gen_ai.response.id",
"value": {
"stringValue": "chatcmpl-EV1BJQ4BvQRI5X8f1m4LZ7uTX4sKt"
}
},
{
"key": "gen_ai.response.model",
"value": {
"stringValue": "openai/gpt-6-luna"
}
},
{
"key": "gen_ai.usage.input_tokens",
"value": {
"intValue": "15"
}
},
{
"key": "gen_ai.usage.output_tokens",
"value": {
"intValue": "42"
}
},
{
"key": "gen_ai.usage.cache_read.input_tokens",
"value": {
"intValue": "0"
}
},
{
"key": "gen_ai.output.messages",
"value": {
"stringValue": "[{\"role\":\"assistant\",\"parts\":[{\"type\":\"text\",\"content\":\"Agent traces record an agent\u2019s actions, decisions, and tool calls over time.\"}],\"finish_reason\":\"stop\"}]"
}
}
],
"status": {},
"flags": 257
},
{
"traceId": "18b74e8029c4c62d6ee2acbfaccd05d7",
"spanId": "07480d8af91ab2a5",
"parentSpanId": "7f3f5611278bf45d",
"name": "step 1",
"kind": 1,
"startTimeUnixNano": "1791061413986000000",
"endTimeUnixNano": "1791061418715245250",
"attributes": [
{
"key": "gen_ai.operation.name",
"value": {
"stringValue": "agent_step"
}
}
],
"status": {},
"flags": 257
},
{
"traceId": "18b74e8029c4c62d6ee2acbfaccd05d7",
"spanId": "7f3f5611278bf45d",
"name": "invoke_agent openai/gpt-6-luna",
"kind": 1,
"startTimeUnixNano": "1791061413984000000",
"endTimeUnixNano": "1791061418716212750",
"attributes": [
{
"key": "gen_ai.operation.name",
"value": {
"stringValue": "invoke_agent"
}
},
{
"key": "gen_ai.provider.name",
"value": {
"stringValue": "litellm.chat"
}
},
{
"key": "gen_ai.request.model",
"value": {
"stringValue": "openai/gpt-6-luna"
}
},
{
"key": "gen_ai.agent.name",
"value": {
"stringValue": "vercel_retry"
}
},
{
"key": "gen_ai.input.messages",
"value": {
"stringValue": "[{\"role\":\"user\",\"parts\":[{\"type\":\"text\",\"content\":\"Reply with one short sentence about agent traces.\"}]}]"
}
},
{
"key": "gen_ai.response.finish_reasons",
"value": {
"arrayValue": {
"values": [
{
"stringValue": "stop"
}
]
}
}
},
{
"key": "gen_ai.usage.input_tokens",
"value": {
"intValue": "15"
}
},
{
"key": "gen_ai.usage.output_tokens",
"value": {
"intValue": "42"
}
},
{
"key": "gen_ai.usage.cache_read.input_tokens",
"value": {
"intValue": "0"
}
},
{
"key": "gen_ai.output.messages",
"value": {
"stringValue": "[{\"role\":\"assistant\",\"parts\":[{\"type\":\"text\",\"content\":\"Agent traces record an agent\u2019s actions, decisions, and tool calls over time.\"}],\"finish_reason\":\"stop\"}]"
}
}
],
"status": {},
"flags": 257
}
]
}
]
}
]
}