Skip to content

OpenAI Java SDK issues with Azure OpenAI #715

@s-jepsen

Description

@s-jepsen

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.

https://learn.microsoft.com/en-us/azure/foundry-classic/foundry-models/faq#do-foundry-models-support-custom-api-headers--we-append-custom-headers-to-our-api-requests-and-are-seeing-http-431-failure-errors-

Error:
Azure OpenAI responds with a 431 http error.

Solution:
Make telemetry headers opt-in?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions