mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
fix: add getModel to SAP AI Core provider for correct SDK initialization (#5086)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
This commit is contained in:
parent
095a1ab041
commit
bef4fdfc4b
1 changed files with 4 additions and 1 deletions
|
|
@ -279,7 +279,7 @@ export namespace Provider {
|
|||
project,
|
||||
location,
|
||||
},
|
||||
async getModel(sdk, modelID) {
|
||||
async getModel(sdk: any, modelID) {
|
||||
const id = String(modelID).trim()
|
||||
return sdk.languageModel(id)
|
||||
},
|
||||
|
|
@ -294,6 +294,9 @@ export namespace Provider {
|
|||
return {
|
||||
autoload: !!serviceKey,
|
||||
options: serviceKey ? { serviceKey, deploymentId, resourceGroup } : {},
|
||||
async getModel(sdk: any, modelID: string) {
|
||||
return sdk(modelID)
|
||||
},
|
||||
}
|
||||
},
|
||||
zenmux: async () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue