-
Notifications
You must be signed in to change notification settings - Fork 2.6k
feat(provider): add SAP AI Core provider (types, API, extension wiring, UI, validation, tests) #7385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
feat(provider): add SAP AI Core provider (types, API, extension wiring, UI, validation, tests) #7385
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
6d5d3a7
feat: Add SAP AI Core provider integration
junaidsap 6442a53
Fix review and compilation
junaidsap 41d017e
Fix review
junaidsap fe2e124
Merge branch 'main' into feature/sap-ai-core-provider
junaid88 b25494d
add SAP AI Core configuration messages in multiple languages
junaidsap 1a015e1
Remove the usd price because SAP calculate based on Capacity Unit. Al…
junaidsap f1f89ed
Fix unknown property issue
junaidsap 7e56172
Update SAP AI Core models to include maxThinkingTokens and adjust con…
junaidsap 4b10dce
Fix anothropic Streaming issue error in parsing json.
junaidsap 995f20f
Merge branch 'main' into feature/sap-ai-core-provider
junaid88 c33ab3f
Make SAP AI Core as per the architecture pattern by using fetcher. Fi…
junaidsap 260de94
Merge branch 'main' into feature/sap-ai-core-provider
junaid88 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,156 @@ | ||
| import type { ModelInfo } from "../model.js" | ||
|
|
||
| export type SapAiCoreModelId = keyof typeof sapAiCoreModels | ||
| export const sapAiCoreDefaultModelId: SapAiCoreModelId = "anthropic--claude-3.5-sonnet" | ||
| const sapAiCoreModelDescription = "Pricing is calculated using SAP's Capacity Units rather than direct USD pricing." | ||
| export const sapAiCoreModels = { | ||
| "anthropic--claude-4-sonnet": { | ||
| maxTokens: 8192, | ||
| contextWindow: 200_000, | ||
| supportsImages: true, | ||
| supportsPromptCache: true, | ||
| description: sapAiCoreModelDescription, | ||
| }, | ||
| "anthropic--claude-4-opus": { | ||
| maxTokens: 8192, | ||
| contextWindow: 200_000, | ||
| supportsImages: true, | ||
| supportsPromptCache: true, | ||
| description: sapAiCoreModelDescription, | ||
| }, | ||
| "anthropic--claude-3.7-sonnet": { | ||
| maxTokens: 64_000, | ||
| contextWindow: 200_000, | ||
| supportsImages: true, | ||
| supportsPromptCache: true, | ||
| description: sapAiCoreModelDescription, | ||
| }, | ||
| "anthropic--claude-3.5-sonnet": { | ||
| maxTokens: 8192, | ||
| contextWindow: 200_000, | ||
| supportsImages: true, | ||
| supportsPromptCache: false, | ||
| description: sapAiCoreModelDescription, | ||
| }, | ||
| "anthropic--claude-3-sonnet": { | ||
| maxTokens: 4096, | ||
| contextWindow: 200_000, | ||
| supportsImages: true, | ||
| supportsPromptCache: false, | ||
| description: sapAiCoreModelDescription, | ||
| }, | ||
| "anthropic--claude-3-haiku": { | ||
| maxTokens: 4096, | ||
| contextWindow: 200_000, | ||
| supportsImages: true, | ||
| supportsPromptCache: false, | ||
| description: sapAiCoreModelDescription, | ||
| }, | ||
| "anthropic--claude-3-opus": { | ||
| maxTokens: 4096, | ||
| contextWindow: 200_000, | ||
| supportsImages: true, | ||
| supportsPromptCache: false, | ||
| description: sapAiCoreModelDescription, | ||
| }, | ||
| "gemini-2.5-pro": { | ||
| maxTokens: 65536, | ||
| contextWindow: 1_048_576, | ||
| supportsImages: true, | ||
| supportsPromptCache: true, | ||
| maxThinkingTokens: 32_768, | ||
| description: sapAiCoreModelDescription, | ||
| }, | ||
| "gemini-2.5-flash": { | ||
| maxTokens: 65536, | ||
| contextWindow: 1_048_576, | ||
| supportsImages: true, | ||
| supportsPromptCache: true, | ||
| maxThinkingTokens: 24_576, | ||
| description: sapAiCoreModelDescription, | ||
| }, | ||
| "gpt-4": { | ||
| maxTokens: 4096, | ||
| contextWindow: 200_000, | ||
| supportsImages: true, | ||
| supportsPromptCache: false, | ||
| description: sapAiCoreModelDescription, | ||
| }, | ||
| "gpt-4o": { | ||
| maxTokens: 4096, | ||
| contextWindow: 200_000, | ||
| supportsImages: true, | ||
| supportsPromptCache: false, | ||
| description: sapAiCoreModelDescription, | ||
| }, | ||
| "gpt-4o-mini": { | ||
| maxTokens: 4096, | ||
| contextWindow: 200_000, | ||
| supportsImages: true, | ||
| supportsPromptCache: false, | ||
| description: sapAiCoreModelDescription, | ||
| }, | ||
| "gpt-4.1": { | ||
| maxTokens: 32_768, | ||
| contextWindow: 1_047_576, | ||
| supportsImages: true, | ||
| supportsPromptCache: true, | ||
| description: sapAiCoreModelDescription, | ||
| }, | ||
| "gpt-4.1-nano": { | ||
| maxTokens: 32_768, | ||
| contextWindow: 1_047_576, | ||
| supportsImages: true, | ||
| supportsPromptCache: true, | ||
| description: sapAiCoreModelDescription, | ||
| }, | ||
| "gpt-5": { | ||
junaid88 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| maxTokens: 128_000, | ||
| contextWindow: 272_000, | ||
| supportsImages: true, | ||
| supportsPromptCache: true, | ||
| description: sapAiCoreModelDescription, | ||
| }, | ||
| "gpt-5-nano": { | ||
| maxTokens: 128_000, | ||
| contextWindow: 272_000, | ||
| supportsImages: true, | ||
| supportsPromptCache: true, | ||
| description: sapAiCoreModelDescription, | ||
| }, | ||
| "gpt-5-mini": { | ||
| maxTokens: 128_000, | ||
| contextWindow: 272_000, | ||
| supportsImages: true, | ||
| supportsPromptCache: true, | ||
| description: sapAiCoreModelDescription, | ||
| }, | ||
| o1: { | ||
| maxTokens: 4096, | ||
| contextWindow: 200_000, | ||
| supportsImages: true, | ||
| supportsPromptCache: false, | ||
| description: sapAiCoreModelDescription, | ||
| }, | ||
| o3: { | ||
| maxTokens: 100_000, | ||
| contextWindow: 200_000, | ||
| supportsImages: true, | ||
| supportsPromptCache: true, | ||
| description: sapAiCoreModelDescription, | ||
| }, | ||
| "o3-mini": { | ||
| maxTokens: 4096, | ||
| contextWindow: 200_000, | ||
| supportsImages: true, | ||
| supportsPromptCache: false, | ||
| description: sapAiCoreModelDescription, | ||
| }, | ||
| "o4-mini": { | ||
| maxTokens: 100_000, | ||
| contextWindow: 200_000, | ||
| supportsImages: true, | ||
| supportsPromptCache: true, | ||
| description: sapAiCoreModelDescription, | ||
| }, | ||
| } as const satisfies Record<string, ModelInfo> | ||
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.