Exporting transactions for auditing¶
Warning
This feature is experimental and may change in future releases.
F5 AI Gateway supports exporting transaction data (or transactions, for brevity) for audit purposes.
A transaction corresponds to a client request handled by the AI Gateway.
Every transaction is assigned a unique ID.
Transaction IDs, also referred to as Request IDs, are assigned using the follwoing set of rules.
Copy HTTP Request Header X-Request-ID if present.
Copy HTTP Request Header traceparent if present.
If neither are present, generate a UUID and assign it to the transaction.
The exported transaction data includes:
The content of the client request.
The response from the service.
Any modifications, annotations, and rejections made by the processors on the request/response.
AI Gateway supports exporting transactions to:
The standard output (for debugging/troubleshooting purposes).
AWS S3 or an AWS S3-compatible storage.
Warning
AI Gateway does not guarantee that it will export all transactons. As a consequence, it is possible that some transaction data will be lost.
Before you begin¶
Exporting transactions requires the exporter
values in the Helm chart.
Exporting to standard output¶
Caution
This method is suited for debugging or troubleshooting purposes only.
To export transactions to the standard output, configure the values.yaml
to enable storage
and the stdout exporter:
aigw:
exporter:
enabled: true # Enables the exporter
type: stdout # Exports to stdout
See an example transaction of an exported transaction.
Exporting to AWS S3 or AWS S3-compatible storage¶
To export transactions to AWS S3 or an AWS S3-compatible storage, configure the values.yaml
:
aigw:
exporter:
enabled: true # Enables the exporter
type: s3 # Exports to s3
s3Bucket: my-bucket
where my-bucket
is the name of the bucket where AI Gateway will export
the transactions. The bucket must exist.
Additionally, configure the authentication to S3. You can use environmental variables or other methods supported by AWS Go SDK. For example:
aigw:
env:
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: aws-keys
key: AWS_ACCESS_KEY_ID
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: aws-keys
key: AWS_SECRET_ACCESS_KEY
- name: AWS_REGION
value: "us-east-1"
- name: AWS_ENDPOINT_URL # Required for an S3-compatible storage that isn't Amazon S3; omit for Amazon S3.
value: https://my-s3-compatible-storage.example.com:8080
If your S3-compatible storage requires path-style addressing,
set s3UsePathStyle
to true:
aigw:
exporter:
s3UsePathStyle: true
You can customize the timeout for exporting a transaction to S3 (default is 30s
). For example:
aigw:
exporter:
s3UploadTimeout: 60s
AI Gateway creates a file per transaction in the bucket. The file name is in
the format <transaction-id>.json
.
For example, 106e82cd377188b8d6c9d24c118cb76c.json
. See an
example transaction of the content of the file.
Retrying of failed operations¶
If an upload fails, AI Gateway will try again using the AWS Go SDK defaults. For details, see the AWS Go SDK documentation.
Exporting to Azure blob storage¶
To export transactions to Azure blob storage, configure the values.yaml
:
aigw:
exporter:
enabled: true # Enables the exporter
type: azblob # Exports to Azure blob storage
azblobAccountURL: https://myaccount.blob.core.windows.net
azblobContainer: my-container
where my-container
is the name of the container where AI Gateway will export
the transactions. The container must exist.
For best practices to secure your blob storage account and container, refer to Security recommendations for Blob storage.
Additionally, configure the authentication to Azure. You can use environmental variables or other methods supported by Azure Go SDK. For example:
aigw:
env:
- name: AZURE_CLIENT_ID
valueFrom:
secretKeyRef:
name: azure-creds
key: client-id
- name: AZURE_TENANT_ID
valueFrom:
secretKeyRef:
name: azure-creds
key: tenant-id
- name: AZURE_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: azure-creds
key: client-secret
You can customize the timeout and retries for exporting a transaction to Azure blob storage. For example:
aigw:
exporter:
azblobUploadTimeout: 60s
azblobMaxRetries: 5
AI Gateway creates a file per transaction in the container at the given path. The file name is in
the format <transaction-id>.json
.
For example, 106e82cd377188b8d6c9d24c118cb76c.json
. See an
example transaction of the content of the file.
Extra configuration¶
Additional configuration, such as worker pool size can be set. For more details, see the configuration documentation.
Error handling¶
If AI Gateway fails to export a transaction, it will:
Log the corresponding error.
Transaction format¶
Transaction exports are formatted as a series of self-containes events in the JSON Lines fromat.
The format of a transaction event is described in the JSON schema.
Warning
The transaction data includes the contents of all headers from the client request. Make sure the headers do not contain any sensitive data.
Example transaction¶
Below is an example of an exported transaction. For readability, we have added line breaks. Also, some strings in the OpenAI response were replaced with the string “example”.
Example:
{
"kind": "clientRequest/v1",
"origin": "$.profiles[0]",
"name": "openai",
"aigw_version": "edge",
"aigw_instance": "6bbf8adf-bdd0-4d3f-86c4-066a28314a47",
"aigw_configuration_digest": "kCvBAQRve9DfzE/kNKwR3SDGjrR8Cket8MCELfdVXIw=",
"route": "/openai",
"schema": "v1/chat_completions",
"policy": "openai",
"request_id": "b2ffc2a4651e83b2b72ee2d134e63dbf",
"trace_id": "b2ffc2a4651e83b2b72ee2d134e63dbf",
"span_id": "a78ae16bcc3bc98e",
"payload": {
"client": "10.244.0.3:58136",
"method": "POST",
"header": {
"Accept-Encoding": [
"gzip"
],
"Connection": [
"close"
],
"Content-Length": [
"89"
],
"Content-Type": [
"application/json"
],
"Traceparent": [
"00-b2ffc2a4651e83b2b72ee2d134e63dbf-913783913fcebaa2-01"
],
"User-Agent": [
"Go-http-client/1.1"
],
"X-Forwarded-For": [
"172.18.0.1"
],
"X-Forwarded-Host": [
"aigw.ai-gateway.testenv"
],
"X-Forwarded-Port": [
"80"
],
"X-Forwarded-Proto": [
"http"
],
"X-Real-Ip": [
"172.18.0.1"
]
},
"body": {
"model": "",
"messages": [
{
"role": "user",
"content": "Hello my name is Bob. Can you say hello to me?"
}
],
"stream": false
}
}
},
{
"kind": "processorRequest/v1",
"origin": "$.profiles[0].inputStages[0].steps[0]",
"name": "language-id",
"aigw_version": "edge",
"aigw_instance": "6bbf8adf-bdd0-4d3f-86c4-066a28314a47",
"aigw_configuration_digest": "kCvBAQRve9DfzE/kNKwR3SDGjrR8Cket8MCELfdVXIw=",
"route": "/openai",
"schema": "v1/chat_completions",
"policy": "openai",
"request_id": "b2ffc2a4651e83b2b72ee2d134e63dbf",
"trace_id": "b2ffc2a4651e83b2b72ee2d134e63dbf",
"span_id": "63d4e3466e472e5f",
"payload": {
"endpoint": "http://aigw-processors-f5.ai-gateway.svc.cluster.local:80/api/v1/execute/f5/language-id",
"method": "POST",
"header": {
"Aigw-Processor-Version": [
"v1"
],
"Content-Type": [
"multipart/form-data; boundary=6db9e16ce97aa9446ae46822a3252f107329cf8607c3ae7d1b1c26149d0f"
]
},
"body": {
"metadata": {
"request_id": "b2ffc2a4651e83b2b72ee2d134e63dbf",
"step_id": "63d4e3466e472e5f",
"params": {
"allowed_languages": [
"en"
],
"reject": true,
"threshold": 0.9
}
},
"messages": [
{
"role": "user",
"content": "Hello my name is Bob. Can you say hello to me?"
}
]
}
}
},
{
"kind": "processorResponse/v1",
"origin": "$.profiles[0].inputStages[0].steps[0]",
"name": "language-id",
"aigw_version": "edge",
"aigw_instance": "6bbf8adf-bdd0-4d3f-86c4-066a28314a47",
"aigw_configuration_digest": "kCvBAQRve9DfzE/kNKwR3SDGjrR8Cket8MCELfdVXIw=",
"route": "/openai",
"schema": "v1/chat_completions",
"policy": "openai",
"request_id": "b2ffc2a4651e83b2b72ee2d134e63dbf",
"trace_id": "b2ffc2a4651e83b2b72ee2d134e63dbf",
"span_id": "63d4e3466e472e5f",
"payload": {
"status": 200,
"header": {
"Content-Type": [
"multipart/form-data;charset=utf-8;boundary=\"dbQPqtMe4kmg1Q5Kq8G3yWck54dHKkrd8IuVMzQQxSxzKnqIu68kQEzAFbh57u6R\""
],
"Date": [
"Mon, 19 May 2025 15:37:59 GMT"
],
"Server": [
"uvicorn"
],
"Vary": [
"Accept-Encoding"
]
},
"body": {
"metadata": {
"request_id": "b2ffc2a4651e83b2b72ee2d134e63dbf",
"step_id": "63d4e3466e472e5f",
"processor_id": "f5:language-id",
"processor_version": "v1",
"processor_result": {
"detected_languages": {
"en": 0.9280844628810883
}
},
"tags": {
"language": [
"en"
]
},
"rejected": false,
"error": false
},
"error": null
}
}
},
{
"kind": "processorRequest/v1",
"origin": "$.profiles[0].inputStages[1].steps[0]",
"name": "prompt-injection",
"aigw_version": "edge",
"aigw_instance": "6bbf8adf-bdd0-4d3f-86c4-066a28314a47",
"aigw_configuration_digest": "kCvBAQRve9DfzE/kNKwR3SDGjrR8Cket8MCELfdVXIw=",
"route": "/openai",
"schema": "v1/chat_completions",
"policy": "openai",
"request_id": "b2ffc2a4651e83b2b72ee2d134e63dbf",
"trace_id": "b2ffc2a4651e83b2b72ee2d134e63dbf",
"span_id": "c70cfce4e842e146",
"payload": {
"endpoint": "http://aigw-processors-f5.ai-gateway.svc.cluster.local:80/api/v1/execute/f5/prompt-injection",
"method": "POST",
"header": {
"Aigw-Processor-Version": [
"v1"
],
"Content-Type": [
"multipart/form-data; boundary=97d6747d84b61c4b8641cc133b142ca8d82883e23dfbcb0df5616349e214"
]
},
"body": {
"metadata": {
"request_id": "b2ffc2a4651e83b2b72ee2d134e63dbf",
"step_id": "c70cfce4e842e146",
"params": {
"reject": true
}
},
"messages": [
{
"role": "user",
"content": "Hello my name is Bob. Can you say hello to me?"
}
]
}
}
},
{
"kind": "processorRequest/v1",
"origin": "$.profiles[0].inputStages[1].steps[1]",
"name": "repetition-detect",
"aigw_version": "edge",
"aigw_instance": "6bbf8adf-bdd0-4d3f-86c4-066a28314a47",
"aigw_configuration_digest": "kCvBAQRve9DfzE/kNKwR3SDGjrR8Cket8MCELfdVXIw=",
"route": "/openai",
"schema": "v1/chat_completions",
"policy": "openai",
"request_id": "b2ffc2a4651e83b2b72ee2d134e63dbf",
"trace_id": "b2ffc2a4651e83b2b72ee2d134e63dbf",
"span_id": "1ce74fb58b93647c",
"payload": {
"endpoint": "http://aigw-processors-f5.ai-gateway.svc.cluster.local:80/api/v1/execute/f5/repetition-detect",
"method": "POST",
"header": {
"Aigw-Processor-Version": [
"v1"
],
"Content-Type": [
"multipart/form-data; boundary=d19d96af4c7c4ff96192338c3c6f0557ce0fec76316abcb61314f24a3d1f"
]
},
"body": {
"metadata": {
"request_id": "b2ffc2a4651e83b2b72ee2d134e63dbf",
"step_id": "1ce74fb58b93647c",
"params": {
"reject": true
}
},
"messages": [
{
"role": "user",
"content": "Hello my name is Bob. Can you say hello to me?"
}
]
}
}
},
{
"kind": "processorResponse/v1",
"origin": "$.profiles[0].inputStages[1].steps[1]",
"name": "repetition-detect",
"aigw_version": "edge",
"aigw_instance": "6bbf8adf-bdd0-4d3f-86c4-066a28314a47",
"aigw_configuration_digest": "kCvBAQRve9DfzE/kNKwR3SDGjrR8Cket8MCELfdVXIw=",
"route": "/openai",
"schema": "v1/chat_completions",
"policy": "openai",
"request_id": "b2ffc2a4651e83b2b72ee2d134e63dbf",
"trace_id": "b2ffc2a4651e83b2b72ee2d134e63dbf",
"span_id": "1ce74fb58b93647c",
"payload": {
"status": 200,
"header": {
"Content-Type": [
"multipart/form-data;charset=utf-8;boundary=\"PXDH7ctexFJotgGFERLsGVvH4LYwmrYPs27ydH9JpsTyLLm7fDvSdHJISR7r7sA2\""
],
"Date": [
"Mon, 19 May 2025 15:37:59 GMT"
],
"Server": [
"uvicorn"
],
"Vary": [
"Accept-Encoding"
]
},
"body": {
"metadata": {
"request_id": "b2ffc2a4651e83b2b72ee2d134e63dbf",
"step_id": "1ce74fb58b93647c",
"processor_id": "f5:repetition-detect",
"processor_version": "v1",
"processor_result": {
"repetition_ratio": 0.71875
},
"rejected": false,
"error": false
},
"error": null
}
}
},
{
"kind": "processorResponse/v1",
"origin": "$.profiles[0].inputStages[1].steps[0]",
"name": "prompt-injection",
"aigw_version": "edge",
"aigw_instance": "6bbf8adf-bdd0-4d3f-86c4-066a28314a47",
"aigw_configuration_digest": "kCvBAQRve9DfzE/kNKwR3SDGjrR8Cket8MCELfdVXIw=",
"route": "/openai",
"schema": "v1/chat_completions",
"policy": "openai",
"request_id": "b2ffc2a4651e83b2b72ee2d134e63dbf",
"trace_id": "b2ffc2a4651e83b2b72ee2d134e63dbf",
"span_id": "c70cfce4e842e146",
"payload": {
"status": 200,
"header": {
"Content-Type": [
"multipart/form-data;charset=utf-8;boundary=\"uN4ot9fDCAzgxa70UY6u3LZWcPcDhNWJGPLsB38rlAKDHzrsEig6stEljh5Q255J\""
],
"Date": [
"Mon, 19 May 2025 15:37:59 GMT"
],
"Server": [
"uvicorn"
],
"Vary": [
"Accept-Encoding"
]
},
"body": {
"metadata": {
"request_id": "b2ffc2a4651e83b2b72ee2d134e63dbf",
"step_id": "c70cfce4e842e146",
"processor_id": "f5:prompt-injection",
"processor_version": "v1",
"processor_result": {
"confidence": 0.9997912049293518,
"detected": false
},
"rejected": false,
"error": false
},
"error": null
}
}
},
{
"kind": "processorRequest/v1",
"origin": "$.profiles[0].inputStages[2].steps[0]",
"name": "system-prompt",
"aigw_version": "edge",
"aigw_instance": "6bbf8adf-bdd0-4d3f-86c4-066a28314a47",
"aigw_configuration_digest": "kCvBAQRve9DfzE/kNKwR3SDGjrR8Cket8MCELfdVXIw=",
"route": "/openai",
"schema": "v1/chat_completions",
"policy": "openai",
"request_id": "b2ffc2a4651e83b2b72ee2d134e63dbf",
"trace_id": "b2ffc2a4651e83b2b72ee2d134e63dbf",
"span_id": "b707aeea902feead",
"payload": {
"endpoint": "http://aigw-processors-f5.ai-gateway.svc.cluster.local:80/api/v1/execute/f5/system-prompt",
"method": "POST",
"header": {
"Aigw-Processor-Version": [
"v1"
],
"Content-Type": [
"multipart/form-data; boundary=06679cb26fac416f7c4a1d01e1c41269b778b327f08ec92f0a4474ed90a5"
]
},
"body": {
"metadata": {
"request_id": "b2ffc2a4651e83b2b72ee2d134e63dbf",
"step_id": "b707aeea902feead",
"params": {
"modify": true
}
},
"messages": [
{
"role": "user",
"content": "Hello my name is Bob. Can you say hello to me?"
}
]
}
}
},
{
"kind": "processorResponse/v1",
"origin": "$.profiles[0].inputStages[2].steps[0]",
"name": "system-prompt",
"aigw_version": "edge",
"aigw_instance": "6bbf8adf-bdd0-4d3f-86c4-066a28314a47",
"aigw_configuration_digest": "kCvBAQRve9DfzE/kNKwR3SDGjrR8Cket8MCELfdVXIw=",
"route": "/openai",
"schema": "v1/chat_completions",
"policy": "openai",
"request_id": "b2ffc2a4651e83b2b72ee2d134e63dbf",
"trace_id": "b2ffc2a4651e83b2b72ee2d134e63dbf",
"span_id": "b707aeea902feead",
"payload": {
"status": 204,
"header": {
"Date": [
"Mon, 19 May 2025 15:38:00 GMT"
],
"Server": [
"uvicorn"
]
},
"body": {
"metadata": {
"request_id": "",
"step_id": "",
"processor_id": "",
"processor_version": "",
"rejected": false,
"error": false
},
"error": null
}
}
},
{
"kind": "serviceRequest/v1",
"origin": "$.profiles[0].services[0]",
"name": "openai-gpt-mini",
"aigw_version": "edge",
"aigw_instance": "6bbf8adf-bdd0-4d3f-86c4-066a28314a47",
"aigw_configuration_digest": "kCvBAQRve9DfzE/kNKwR3SDGjrR8Cket8MCELfdVXIw=",
"route": "/openai",
"schema": "v1/chat_completions",
"policy": "openai",
"request_id": "b2ffc2a4651e83b2b72ee2d134e63dbf",
"trace_id": "b2ffc2a4651e83b2b72ee2d134e63dbf",
"span_id": "f68cb02dd6acd946",
"payload": {
"endpoint": "https://api.openai.com/v1/chat/completions",
"method": "POST",
"header": {
"Authorization": [
"[redacted]"
],
"Content-Type": [
"application/json"
]
},
"body": {
"model": "gpt-4o",
"messages": [
{
"role": "user",
"content": "Hello my name is Bob. Can you say hello to me?"
}
],
"stream": false
}
}
},
{
"kind": "serviceResponse/v1",
"origin": "$.profiles[0].services[0]",
"name": "openai-gpt-mini",
"aigw_version": "edge",
"aigw_instance": "6bbf8adf-bdd0-4d3f-86c4-066a28314a47",
"aigw_configuration_digest": "kCvBAQRve9DfzE/kNKwR3SDGjrR8Cket8MCELfdVXIw=",
"route": "/openai",
"schema": "v1/chat_completions",
"policy": "openai",
"request_id": "b2ffc2a4651e83b2b72ee2d134e63dbf",
"trace_id": "b2ffc2a4651e83b2b72ee2d134e63dbf",
"span_id": "f68cb02dd6acd946",
"payload": {
"header": {
"Access-Control-Expose-Headers": [
"X-Request-ID"
],
"Alt-Svc": [
"h3=\":443\"; ma=86400"
],
"Cf-Cache-Status": [
"DYNAMIC"
],
"Cf-Ray": [
"9424adcc099ef0eb-DUB"
],
"Content-Type": [
"application/json"
],
"Date": [
"Mon, 19 May 2025 15:38:01 GMT"
],
"Openai-Organization": [
"aigwee"
],
"Openai-Processing-Ms": [
"601"
],
"Openai-Version": [
"2020-10-01"
],
"Server": [
"cloudflare"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains; preload"
],
"X-Content-Type-Options": [
"nosniff"
],
"X-Envoy-Upstream-Service-Time": [
"610"
],
"X-Ratelimit-Limit-Requests": [
"500"
],
"X-Ratelimit-Limit-Tokens": [
"30000"
],
"X-Ratelimit-Remaining-Requests": [
"499"
],
"X-Ratelimit-Remaining-Tokens": [
"29986"
],
"X-Ratelimit-Reset-Requests": [
"120ms"
],
"X-Ratelimit-Reset-Tokens": [
"28ms"
],
"X-Request-Id": [
"req_27862775aaea862d0bf12a132f7a260c"
]
},
"body": {
"id": "chatcmpl-BYwqv89LxhFpIFRCEgimNLiGuc2fA",
"object": "chat.completion",
"created": 1747669081,
"model": "gpt-4o-2024-08-06",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello, Bob! How are you today?",
"refusal": null,
"annotations": []
},
"logprobs": null,
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 20,
"completion_tokens": 9,
"total_tokens": 29,
"prompt_tokens_details": {
"cached_tokens": 0,
"audio_tokens": 0
},
"completion_tokens_details": {
"reasoning_tokens": 0,
"audio_tokens": 0,
"accepted_prediction_tokens": 0,
"rejected_prediction_tokens": 0
}
},
"service_tier": "default",
"system_fingerprint": "fp_f5bdcc3276"
}
}
},
{
"kind": "processorRequest/v1",
"origin": "$.profiles[0].responseStages[0].steps[0]",
"name": "repetition-detect",
"aigw_version": "edge",
"aigw_instance": "6bbf8adf-bdd0-4d3f-86c4-066a28314a47",
"aigw_configuration_digest": "kCvBAQRve9DfzE/kNKwR3SDGjrR8Cket8MCELfdVXIw=",
"route": "/openai",
"schema": "v1/chat_completions",
"policy": "openai",
"request_id": "b2ffc2a4651e83b2b72ee2d134e63dbf",
"trace_id": "b2ffc2a4651e83b2b72ee2d134e63dbf",
"span_id": "6c593a2861ab6c33",
"payload": {
"endpoint": "http://aigw-processors-f5.ai-gateway.svc.cluster.local:80/api/v1/execute/f5/repetition-detect",
"method": "POST",
"header": {
"Aigw-Processor-Version": [
"v1"
],
"Content-Type": [
"multipart/form-data; boundary=da9b8eb9d3601a84e899e4a53583f4cbcbd2580ba79605d036eee439552b"
]
},
"body": {
"metadata": {
"request_id": "b2ffc2a4651e83b2b72ee2d134e63dbf",
"step_id": "6c593a2861ab6c33",
"params": {
"reject": true
}
},
"messages": [
{
"role": "user",
"content": "Hello my name is Bob. Can you say hello to me?"
}
],
"choices": [
{
"finish_reason": "stop",
"message": {
"role": "assistant",
"content": "Hello, Bob! How are you today?"
}
}
]
}
}
},
{
"kind": "processorResponse/v1",
"origin": "$.profiles[0].responseStages[0].steps[0]",
"name": "repetition-detect",
"aigw_version": "edge",
"aigw_instance": "6bbf8adf-bdd0-4d3f-86c4-066a28314a47",
"aigw_configuration_digest": "kCvBAQRve9DfzE/kNKwR3SDGjrR8Cket8MCELfdVXIw=",
"route": "/openai",
"schema": "v1/chat_completions",
"policy": "openai",
"request_id": "b2ffc2a4651e83b2b72ee2d134e63dbf",
"trace_id": "b2ffc2a4651e83b2b72ee2d134e63dbf",
"span_id": "6c593a2861ab6c33",
"payload": {
"status": 200,
"header": {
"Content-Type": [
"multipart/form-data;charset=utf-8;boundary=\"0etwH3gVXDAi9zB9JcpD37H9LVL0uJEAISTrd67GwCCMZHJDNzTSMCSnpEcCnbsu\""
],
"Date": [
"Mon, 19 May 2025 15:38:00 GMT"
],
"Server": [
"uvicorn"
],
"Vary": [
"Accept-Encoding"
]
},
"body": {
"metadata": {
"request_id": "b2ffc2a4651e83b2b72ee2d134e63dbf",
"step_id": "6c593a2861ab6c33",
"processor_id": "f5:repetition-detect",
"processor_version": "v1",
"processor_result": {
"repetition_ratio": 0.625
},
"rejected": false,
"error": false
},
"error": null
}
}
},
{
"kind": "clientResponse/v1",
"origin": "$.profiles[0]",
"name": "openai",
"aigw_version": "edge",
"aigw_instance": "6bbf8adf-bdd0-4d3f-86c4-066a28314a47",
"aigw_configuration_digest": "kCvBAQRve9DfzE/kNKwR3SDGjrR8Cket8MCELfdVXIw=",
"route": "/openai",
"schema": "v1/chat_completions",
"policy": "openai",
"request_id": "b2ffc2a4651e83b2b72ee2d134e63dbf",
"trace_id": "b2ffc2a4651e83b2b72ee2d134e63dbf",
"span_id": "a78ae16bcc3bc98e",
"payload": {
"endpoint": "10.244.0.3:58136",
"header": {
"Accept-Encoding": [
"gzip"
],
"Connection": [
"close"
],
"Content-Length": [
"89"
],
"Content-Type": [
"application/json"
],
"Traceparent": [
"00-b2ffc2a4651e83b2b72ee2d134e63dbf-913783913fcebaa2-01"
],
"User-Agent": [
"Go-http-client/1.1"
],
"X-Forwarded-For": [
"172.18.0.1"
],
"X-Forwarded-Host": [
"aigw.ai-gateway.testenv"
],
"X-Forwarded-Port": [
"80"
],
"X-Forwarded-Proto": [
"http"
],
"X-Real-Ip": [
"172.18.0.1"
]
},
"body": {
"id": "chatcmpl-BYwqv89LxhFpIFRCEgimNLiGuc2fA",
"object": "chat.completion",
"model": "gpt-4o-2024-08-06",
"choices": [
{
"finish_reason": "stop",
"message": {
"role": "assistant",
"content": "Hello, Bob! How are you today?"
}
}
],
"usage": {
"prompt_tokens": 20,
"completion_tokens": 9,
"total_tokens": 29
}
}
}
}