Skip to content

Commit c332697

Browse files
authored
SAP AI Core as a Provider (RooCodeInc#3980)
* added changes over a the latest from upstream * cleanup some comments * fixed message mispelling and variable naming convention * added changeset for addition of SAP AI Core provider * fixed mispelled expires_at * added sapAiCoreClientId to hasKey * retrigger tests * removed bedrock-format.ts, added smal function for message formatting in sapaicore, removed models lazy loading, simplifying the code * reverted src/core/webview/index.ts to upstream version, once all the tailored implementation for sapaicore were removed * removed duplicated and not used interfaces * removed the deployments logic from ApiOptions.tsx, now it loads the list of models available only * removed references for deployments once it is not in use anymore * removed unused sapConfig from WebviewMessage and ExtensionMessage * moved previous state variable according to the request' * removed supportsComputerUse from sapaicore sonnet * added grpc fields and updated conversion methods for sap ai core
1 parent b0de639 commit c332697

File tree

12 files changed

+875
-0
lines changed

12 files changed

+875
-0
lines changed

.changeset/wet-emus-breathe.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"claude-dev": minor
3+
---
4+
5+
Add SAP AI Core as a provider for Cline

proto/state.proto

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,4 +205,11 @@ message ApiConfiguration {
205205

206206
// Favorited model IDs
207207
repeated string favorited_model_ids = 71;
208+
209+
// SAP AI Core specific
210+
optional string sap_ai_core_client_id = 72;
211+
optional string sap_ai_core_client_secret = 73;
212+
optional string sap_ai_core_base_url = 74;
213+
optional string sap_ai_core_token_url = 75;
214+
optional string sap_ai_resource_group = 76;
208215
}

src/api/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import { AskSageHandler } from "./providers/asksage"
2525
import { XAIHandler } from "./providers/xai"
2626
import { SambanovaHandler } from "./providers/sambanova"
2727
import { CerebrasHandler } from "./providers/cerebras"
28+
import { SapAiCoreHandler } from "./providers/sapaicore"
2829

2930
export interface ApiHandler {
3031
createMessage(systemPrompt: string, messages: Anthropic.Messages.MessageParam[]): ApiStream
@@ -87,6 +88,8 @@ export function buildApiHandler(configuration: ApiConfiguration): ApiHandler {
8788
return new SambanovaHandler(options)
8889
case "cerebras":
8990
return new CerebrasHandler(options)
91+
case "sapaicore":
92+
return new SapAiCoreHandler(options)
9093
default:
9194
return new AnthropicHandler(options)
9295
}

0 commit comments

Comments
 (0)