feat: [Orchestration] Support Fallback Modules#743
Merged
Conversation
Jonas-Isr
commented
Jan 30, 2026
Comment on lines
59
to
61
| val requestConfig = | ||
| OrchestrationConfig.create().modules(moduleConfigs).stream( | ||
| configs[0].getGlobalStreamOptions()); |
Member
Author
There was a problem hiding this comment.
The stream options are taken from the first config only. (I don't think there is a way to change this.)
newtork
reviewed
Jan 30, 2026
orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationClient.java
Outdated
Show resolved
Hide resolved
CharlesDuboisSAP
previously approved these changes
Feb 3, 2026
sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/services/OrchestrationService.java
Outdated
Show resolved
Hide resolved
| Grounding.create() | ||
| .filters( | ||
| DocumentGroundingFilter.create() | ||
| .dataRepositoryType(DataRepositoryType.HELP_SAP_COM)); |
Contributor
There was a problem hiding this comment.
Grounding in testFallbackModules?
Member
Author
There was a problem hiding this comment.
I added this here to be able to test that the additional configs (like grounding or input filter) are correctly propagated when using the fallback modules. Since this is not an e2e test, this will not add flakyness.
CharlesDuboisSAP
previously approved these changes
Feb 3, 2026
newtork
reviewed
Feb 3, 2026
orchestration/src/main/java/com/sap/ai/sdk/orchestration/ConfigToRequestTransformer.java
Outdated
Show resolved
Hide resolved
newtork
approved these changes
Feb 3, 2026
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#342
This PR introduces support for using fallback modules when using orchestration chat completion. Instead of a single
OrchestrationModuleConfigobject, users can now add multiple of these module configs to a chat completion call (streaming or non-streaming). The configs are tried in the order they are given and if a call with a config failed, the next in line is used as fallback.This PR also introduces a convenience layer to do this:
In the above example, the call with
brokenConfigwill return an error so another call withworkingConfigis performed and the (positive) result of this call is returned.Feature scope:
Definition of Done
Aligned changes with the JavaScript SDK