feat(opencode): add reasoning variants support for SAP AI Core (#8753)

Co-authored-by: Github Action <action@github.com>
This commit is contained in:
Jérôme Benoit
2026-01-31 16:26:23 +01:00
committed by GitHub
parent 53f118c57a
commit feca42b025

View File

@@ -575,6 +575,26 @@ export namespace ProviderTransform {
case "@ai-sdk/perplexity":
// https://v5.ai-sdk.dev/providers/ai-sdk-providers/perplexity
return {}
case "@mymediset/sap-ai-provider":
case "@jerome-benoit/sap-ai-provider-v2":
if (model.api.id.includes("anthropic")) {
return {
high: {
thinking: {
type: "enabled",
budgetTokens: 16000,
},
},
max: {
thinking: {
type: "enabled",
budgetTokens: 31999,
},
},
}
}
return Object.fromEntries(WIDELY_SUPPORTED_EFFORTS.map((effort) => [effort, { reasoningEffort: effort }]))
}
return {}
}