azure-sdk-for-java icon indicating copy to clipboard operation
azure-sdk-for-java copied to clipboard

[FEATURE REQ] `azure-core-http-<netty/okhttp>` support for more granular request/response timeouts.

Open jpalvarezl opened this issue 3 weeks ago • 1 comments

Is your feature request related to a problem? Please describe.

In the azure-ai-agents and azure-ai-projects packages, we have the need to wrap OpenAI's official Java SDK. Their SDK provides a type called RequestOptions which provides the means to override timeout values per request for users of the SDK.

RequestOptions contains a Timeout instance with 4 different timeouts:

  • read
  • write
  • connect
  • request

Describe the solution you'd like

In our current implementation we are using read timeout as it's the functionally closest to the one that can be set via Context by the key "azure-response-timeout". We would like to have the means to map all the values in the Timeout class from OpenAI to the request in the HttpClients from azure-core.

Describe alternatives you've considered

There doesn't seem to be an API surface that would allow us to forward these values. We are currently using "read" as the "azure_response_timeout" as it's the functionally closest timeout judging by OpenAI's documentation of the Timeout class (linked above).

Additional context

This feature request stems from this PR.

Information Checklist

Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • [x] Description Added
  • [x] Expected solution specified

jpalvarezl avatar Dec 12 '25 08:12 jpalvarezl

This is great, though I feel like 10 seconds might be too long. I would maybe half it.

DogmaDragon avatar Aug 09 '23 15:08 DogmaDragon

Not sure if this one is still valid but might be good for me to pull in if I am going to be giving some love to the scraper system

Gykes avatar Dec 02 '25 02:12 Gykes