fix: sap provider - set sapAiCoreUseOrchestrationMode in state-helper instead of in sap provider components (#6221)

* fix: sap provider - handle undefined apiConfiguration.sapAiCoreUseOrchestrationMode

* fix: sap provider - handle undefined apiConfiguration.sapAiCoreUseOrchestrationMode

* fix: sap provider - handle undefined apiConfiguration.sapAiCoreUseOrchestrationMode
This commit is contained in:
yuvalman authored and GitHub committed 2025-09-16 14:57:30 -07:00
1 parent 81299d26d8
commit fadcd7e3ad
4 files changed
+9 -4

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
---
"claude-dev": patch
---
sap provider - set sapAiCoreUseOrchestrationMode in state-helper instead of in sap provider components
+1 -1
View File
@@ -455,7 +455,7 @@ export class SapAiCoreHandler implements ApiHandler {
}
async *createMessage(systemPrompt: string, messages: Anthropic.Messages.MessageParam[]): ApiStream {
if (this.options.sapAiCoreUseOrchestrationMode ?? true) {
if (this.options.sapAiCoreUseOrchestrationMode) {
yield* this.createMessageWithOrchestration(systemPrompt, messages)
} else {
yield* this.createMessageWithDeployments(systemPrompt, messages)
+1 -1
View File
@@ -372,7 +372,7 @@ export async function readGlobalStateFromDisk(context: ExtensionContext): Promis
sapAiCoreTokenUrl,
sapAiResourceGroup,
difyBaseUrl,
sapAiCoreUseOrchestrationMode,
sapAiCoreUseOrchestrationMode: sapAiCoreUseOrchestrationMode ?? true,
// Plan mode configurations
planModeApiProvider: planModeApiProvider || apiProvider,
planModeApiModelId,
@@ -194,7 +194,7 @@ export const SapAiCoreProvider = ({ showModelOptions, isPopup, currentMode }: Sa
<div className="flex items-center gap-2">
<VSCodeCheckbox
aria-label="Orchestration Mode"
checked={apiConfiguration?.sapAiCoreUseOrchestrationMode ?? true}
checked={apiConfiguration?.sapAiCoreUseOrchestrationMode}
onChange={(e) => handleOrchestrationChange((e.target as HTMLInputElement).checked)}
/>
<span className="font-medium">Orchestration Mode</span>
@@ -243,7 +243,7 @@ export const SapAiCoreProvider = ({ showModelOptions, isPopup, currentMode }: Sa
]
}
selectedModelId={selectedModelId || ""}
useOrchestrationMode={apiConfiguration?.sapAiCoreUseOrchestrationMode ?? true}
useOrchestrationMode={apiConfiguration?.sapAiCoreUseOrchestrationMode}
/>
</>
) : (