OpenAI Java SDK issues with Azure OpenAI
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 1.5k
- Forks
- 264
- Avg merge
- 9h 46m
- Merged PRs (30d)
- 96
Description
We're using openai-java library version 4.17.0 through Spring AI.
The SDK is adding a lot of "x-stainless-*" headers - and recently Azure OpenAI has set a limit of max 10 headers for a request.
Error:
Azure OpenAI responds with a 431 http error.
Solution:
Make telemetry headers opt-in?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the openai-java request construction that adds x-stainless-* headers and reproduce the 431 response against Azure OpenAI with version 4.17.0 through Spring AI. Trace how telemetry headers are configured, then verify the resulting behavior against Azure's header limit and existing requests when telemetry remains enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, java
- Domain
- api, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100