feat: Convenience for custom headers for orchestration and OpenAI#550
Merged
feat: Convenience for custom headers for orchestration and OpenAI#550
Conversation
newtork
reviewed
Aug 22, 2025
foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/OpenAiClient.java
Outdated
Show resolved
Hide resolved
newtork
reviewed
Aug 22, 2025
foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/OpenAiClient.java
Outdated
Show resolved
Hide resolved
newtork
reviewed
Aug 22, 2025
orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationHttpExecutor.java
Outdated
Show resolved
Hide resolved
newtork
reviewed
Aug 22, 2025
foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/OpenAiClient.java
Show resolved
Hide resolved
newtork
reviewed
Aug 22, 2025
orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationClient.java
Outdated
Show resolved
Hide resolved
# Conflicts: # docs/release_notes.md
…onmodels/openai/OpenAiClient.java Co-authored-by: Alexander Dümont <22489773+newtork@users.noreply.github.com>
newtork
reviewed
Aug 27, 2025
foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/OpenAiClient.java
Outdated
Show resolved
Hide resolved
newtork
reviewed
Aug 27, 2025
orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationHttpExecutor.java
Show resolved
Hide resolved
rpanackal
reviewed
Sep 1, 2025
foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/OpenAiClient.java
Outdated
Show resolved
Hide resolved
...ion-models/openai/src/test/java/com/sap/ai/sdk/foundationmodels/openai/OpenAiClientTest.java
Show resolved
Hide resolved
newtork
approved these changes
Sep 4, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
AI/ai-sdk-java-backlog#300
This PR introduces
withHeadermethods forOrchestrationClientandOpenAiClient. These methods either take tow strings (key and value of the header) or aHeaderobject and return a new client where this header will be added to each call made from this client. This allows for convenient ways of adding custom headers to single calls (or groups thereof).Feature scope:
withHeadermethods toOrchestrationClientwithHeadermethods toOpenAiClientDefinition of Done
Aligned changes with the JavaScript SDK