feat: [OpenAI] An AiCore wrapper for Responses API only#819
Merged
rpanackal merged 35 commits intoApr 15, 2026
Conversation
- Streaming no fully enabled
… API creation forModel
…openai-wrapper # Conflicts: # foundation-models/openai/pom.xml # foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/AiCoreOpenAiClient.java # foundation-models/openai/src/test/java/com/sap/ai/sdk/foundationmodels/openai/AiCoreOpenAiClientTest.java # pom.xml # sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/services/AiCoreOpenAiService.java
9 tasks
n-o-u-r-h-a-n
added a commit
that referenced
this pull request
Jul 3, 2026
* Minimal new module setup including spec * Generation partial-success * Remove examples * Successfully filter by path * Attach spec filter command * Initial setup * Successful PoC with OpenAI Models * Version 1 * Stable api * Change class name * Rebase with main * fix dependency analyse issues * Initial draft untested * Second draft - Streaming no fully enabled * Successful E2E * Streaming initial draft * Streaming E2E with chat completion * isStreaming check simplified * Cleanup PoC and rename module * Reduce Javadoc verbosity * Restrict to `/responses` api * Cleanup comments * Charles review suggestions * Charles review - round 2 suggestions * Add dependency * Mark openai dependency optional and new client `@Beta` * Javadoc on sample code for store * Update allowed endpoints with method check * feat: [OpenAI] An AiCore wrapper for Responses API only (#819) * Minimal new module setup including spec * Generation partial-success * Remove examples * Successfully filter by path * Attach spec filter command * Initial setup * Successful PoC with OpenAI Models * Version 1 * Stable api * Change class name * Add tests * fix dependency analyse issues * Initial draft untested * Second draft - Streaming no fully enabled * Successful E2E * Streaming initial draft * Streaming E2E with chat completion * isStreaming check simplified * Cleanup PoC and rename module * Reduce Javadoc verbosity * Restrict to `/responses` api * Cleanup comments * Charles review suggestions * Charles review - round 2 suggestions * Add dependency * Mark openai dependency optional and new client `@Beta` * Cleanup and no throw on missing model * pmd * Responses API complete * ChatCompletionCreateParams throws without model. Needs rethink client API creation forModel * Cleanup and close with test documenting limitation * First draft responses only * jacoco limits * Remove ResponseService wrapper since remote API behaviour changed * Sync and Async nested class option * Only Async kept with minimal code * Exhaustive assertion and test streaming * Strip down assertions * Cleanup streaming case test * Transition to v1 api and add full unit testing * Improve e2e and coverage numbers * Remove unnecessary indentation * Add release notes and remove endpoint unsupported in v1 * formatting release notes * fix release note * fix CI coverage discrepancy * Update spring controller and index.html * Remove /cancel endpoint out of stability concerns * json files for newely supported endpoints * code change * controller and tests * coverage up * Potential fix for pull request finding 'CodeQL / Cross-site scripting' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Update foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/AiCoreOpenAiClient.java Co-authored-by: Jonas-Isr <jonas.israel@sap.com> * fixes * isValid() fix * Update sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/controllers/OpenAiController.java Co-authored-by: Jonas-Isr <jonas.israel@sap.com> * .md features * Update sample-code/spring-app/src/test/java/com/sap/ai/sdk/app/controllers/AiCoreOpenAiTest.java Co-authored-by: Charles Dubois <103174266+CharlesDuboisSAP@users.noreply.github.com> * Update docs/release_notes.md Co-authored-by: Charles Dubois <103174266+CharlesDuboisSAP@users.noreply.github.com> * Update docs/release_notes.md Co-authored-by: Charles Dubois <103174266+CharlesDuboisSAP@users.noreply.github.com> * Update docs/release_notes.md Co-authored-by: Charles Dubois <103174266+CharlesDuboisSAP@users.noreply.github.com> * update release notes with cancel endpoint * supporting all endpoints in index page * Formatting * Update docs/release_notes.md Co-authored-by: Charles Dubois <103174266+CharlesDuboisSAP@users.noreply.github.com> * fixing duplication in release_notes.md * format handling for json * OpenAI divided to 2 subsections * retruning message in else case * separting to 2 controllers * all fixes done --------- Co-authored-by: Roshin Rajan Panackal <roshin.rajan.panackal@sap.com> Co-authored-by: Roshin Rajan Panackal <36329474+rpanackal@users.noreply.github.com> Co-authored-by: I538344 <charles.dubois@sap.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Co-authored-by: Jonas-Isr <jonas.israel@sap.com> Co-authored-by: Charles Dubois <103174266+CharlesDuboisSAP@users.noreply.github.com> Co-authored-by: SAP Cloud SDK Bot <cloudsdk@sap.com>
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#364.
An alternative to #806
The above mentioned PR introduced wrapper for all openai endpoints and failed to scale. So, we have stripped down the scope of the wrapper to be limited to Responses API alone.
The motivation for this decision is because, the OpenAI SDK integration is not decidedly "the way to go" but an approach that enables Responses API until we can support code generation for OAS3.2, the original blocker for OpenAI Responses API.
Feature scope:
AiCoreOpenAiClient.response(OpenAiModel.GPT_5)returns a wrapperAiCoreResponseServiceAiCoreResponseServiceprovides model injection if left out in params and throws there is a model mismatch against deployment modelDefinition of Done
Error handling created / updated & covered by the tests aboveAligned changes with the JavaScript SDKDocumentation updatedRelease notes updated