You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When making requests with stream=true and stream_options: { include_usage: true } enabled, the request_id column in the spend logs is empty, causing only the first request to be saved. Subsequent requests fail to be logged correctly due to request_id being a primary key. However, when making requests with only stream=true (without stream_options: { include_usage: true }), the spend logs are saved correctly, with request_id populated as expected.
Steps to Reproduce
Enable the spend tracking feature that saves spend logs to a database.
Make a request with the following parameters:
stream=true
stream_options: { include_usage: true }
Observe the spend logs saved in the database.
Expected Result:
Each successful request should have a unique request_id populated and logged in the spend logs.
Actual Result:
Only the first request is saved in the spend logs. The request_id is empty for subsequent requests, preventing additional entries due to it being the primary key.
What happened?
Description
When making requests with
stream=true
andstream_options: { include_usage: true }
enabled, therequest_id
column in the spend logs is empty, causing only the first request to be saved. Subsequent requests fail to be logged correctly due torequest_id
being a primary key. However, when making requests with onlystream=true
(withoutstream_options: { include_usage: true }
), the spend logs are saved correctly, withrequest_id
populated as expected.Steps to Reproduce
stream=true
stream_options: { include_usage: true }
Expected Result:
request_id
populated and logged in the spend logs.Actual Result:
request_id
is empty for subsequent requests, preventing additional entries due to it being the primary key.Environment
config.yaml
Relevant log output
Twitter / LinkedIn details
No response
The text was updated successfully, but these errors were encountered: