-
Notifications
You must be signed in to change notification settings - Fork 149
Open
Labels
Description
Description
We need access to the x-request-id
header to debug API requests with the OpenAI team, as described in the official docs:
👉 https://platform.openai.com/docs/api-reference/debugging-requests
Although x-request-id
can be obtained when using:
OpenAIClientAsync.withRawResponse()
We are using SSE streaming in our project, below is example code:
OpenAIClientAsync currentClient = OpenAIOkHttpClientAsync.builder().build();
currentClient.responses().createStreaming(params)
.subscribe(event -> {
// business logic
})
.onCompleteFuture()
.thenAccept(result -> {
// handle completion
})
.exceptionally(ex -> {
// handle error
return null;
});
Feature request
Please provide a way to access the x-request-id header in SSE streaming responses (e.g., via callback, metadata, or event property).
This would make debugging and support much easier without requiring a full switch to withRawResponse().