Skip to content

Commit 05eaf68

Browse files
refactor(provider): remove google-vertex-anthropic special case in getSDK
This workaround is no longer needed since models.dev has been updated to return the correct npm package path (@ai-sdk/google-vertex/anthropic) for this provider.
1 parent 6cc7397 commit 05eaf68

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

packages/opencode/src/provider/provider.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,12 +1023,9 @@ export namespace Provider {
10231023
})
10241024
}
10251025

1026-
// Special case: google-vertex-anthropic uses a subpath import
1027-
const bundledKey =
1028-
model.providerID === "google-vertex-anthropic" ? "@ai-sdk/google-vertex/anthropic" : model.api.npm
1029-
const bundledFn = BUNDLED_PROVIDERS[bundledKey]
1026+
const bundledFn = BUNDLED_PROVIDERS[model.api.npm]
10301027
if (bundledFn) {
1031-
log.info("using bundled provider", { providerID: model.providerID, pkg: bundledKey })
1028+
log.info("using bundled provider", { providerID: model.providerID, pkg: model.api.npm })
10321029
const loaded = bundledFn({
10331030
name: model.providerID,
10341031
...options,

0 commit comments

Comments
 (0)