Skip to content

Commit 5f42875

Browse files
jerome-benoitactions-user
authored andcommitted
feat(opencode): add reasoning variants support for SAP AI Core (anomalyco#8753)
Co-authored-by: Github Action <action@github.com>
1 parent 394abd3 commit 5f42875

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

packages/opencode/src/provider/transform.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,26 @@ export namespace ProviderTransform {
575575
case "@ai-sdk/perplexity":
576576
// https://v5.ai-sdk.dev/providers/ai-sdk-providers/perplexity
577577
return {}
578+
579+
case "@mymediset/sap-ai-provider":
580+
case "@jerome-benoit/sap-ai-provider-v2":
581+
if (model.api.id.includes("anthropic")) {
582+
return {
583+
high: {
584+
thinking: {
585+
type: "enabled",
586+
budgetTokens: 16000,
587+
},
588+
},
589+
max: {
590+
thinking: {
591+
type: "enabled",
592+
budgetTokens: 31999,
593+
},
594+
},
595+
}
596+
}
597+
return Object.fromEntries(WIDELY_SUPPORTED_EFFORTS.map((effort) => [effort, { reasoningEffort: effort }]))
578598
}
579599
return {}
580600
}

0 commit comments

Comments
 (0)