GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — chore(ai): drop five unused legacy provider entrypoint aliases (#59506) · abn/opencode@96ae220

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages
    • ai
      • package.json
    • core
      • src
        • aisdk-native.ts
        • provider.ts
        • variant.ts
      • test
        • aisdk-native.test.ts
        • provider.test.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/ai/package.json‎

Copy file name to clipboardExpand all lines: packages/ai/package.json
-5Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
"./providers/alibaba/messages": "./src/providers/alibaba/messages.ts",
2929
"./providers/alibaba/responses": "./src/providers/alibaba/responses.ts",
3030
"./providers/amazon-bedrock": "./src/providers/amazon-bedrock.ts",
31-
"./providers/amazon-bedrock-mantle": "./src/providers/amazon-bedrock-mantle.ts",
3231
"./providers/amazon-bedrock/mantle": "./src/providers/amazon-bedrock/mantle.ts",
3332
"./providers/amazon-bedrock/mantle/chat": "./src/providers/amazon-bedrock/mantle/chat.ts",
3433
"./providers/amazon-bedrock/mantle/messages": "./src/providers/amazon-bedrock/mantle/messages.ts",
@@ -63,11 +62,7 @@
6362
"./providers/fireworks": "./src/providers/fireworks.ts",
6463
"./providers/google": "./src/providers/google.ts",
6564
"./providers/google-vertex": "./src/providers/google-vertex.ts",
66-
"./providers/google-vertex-chat": "./src/providers/google-vertex-chat.ts",
67-
"./providers/google-vertex-interactions": "./src/providers/google-vertex-interactions.ts",
6865
"./providers/google-vertex-messages": "./src/providers/google-vertex-messages.ts",
69-
"./providers/google-vertex-mistral": "./src/providers/google-vertex-mistral.ts",
70-
"./providers/google-vertex-responses": "./src/providers/google-vertex-responses.ts",
7166
"./providers/google-vertex/chat": "./src/providers/google-vertex/chat.ts",
7267
"./providers/google-vertex/gemini": "./src/providers/google-vertex/gemini.ts",
7368
"./providers/google-vertex/images": "./src/providers/google-vertex/images.ts",
Collapse file

‎packages/core/src/aisdk-native.ts‎

Copy file name to clipboardExpand all lines: packages/core/src/aisdk-native.ts
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,21 @@ const mantle = (modelID: string | undefined) => {
137137
return `@opencode/ai/providers/amazon-bedrock/mantle/${modelID.includes("gpt-oss") ? "chat" : "responses"}`
138138
}
139139

140+
// Old hyphenated Vertex entrypoints that stale configs may still name.
141+
const LEGACY_VERTEX: Readonly<Record<string, string>> = {
142+
"@opencode/ai/providers/google-vertex-chat": "@opencode/ai/providers/google-vertex/chat",
143+
"@opencode/ai/providers/google-vertex-responses": "@opencode/ai/providers/google-vertex/responses",
144+
"@opencode/ai/providers/google-vertex-interactions": "@opencode/ai/providers/google-vertex/interactions",
145+
"@opencode/ai/providers/google-vertex-mistral": "@opencode/ai/providers/google-vertex/mistral",
146+
}
147+
140148
function resolve(specifier: string, context: Context & { readonly settings?: Provider.Settings }): string | undefined {
141149
const npm = Provider.packageName(specifier)
142150
if (Provider.isAISDK(specifier) || npm in PACKAGES || npm in (HOSTS[context.providerID] ?? {}))
143151
return native(npm, context)
144152
if (npm === "@opencode/ai/providers/amazon-bedrock/mantle" || npm === "@opencode/ai/providers/amazon-bedrock-mantle")
145153
return mantle(context.modelID)
154+
if (npm in LEGACY_VERTEX) return LEGACY_VERTEX[npm]
146155
if (
147156
(npm === "@opencode/ai/providers/azure" || npm === "@opencode/ai/providers/azure/responses") &&
148157
azureChat(context)
Collapse file

‎packages/core/src/provider.ts‎

Copy file name to clipboardExpand all lines: packages/core/src/provider.ts
-8Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ const builtins = new Map<string, () => Promise<unknown>>([
6565
"@opencode/ai/providers/amazon-bedrock/mantle/responses",
6666
() => import("@opencode/ai/providers/amazon-bedrock/mantle/responses"),
6767
],
68-
["@opencode/ai/providers/amazon-bedrock-mantle", () => import("@opencode/ai/providers/amazon-bedrock-mantle")],
6968
["@opencode/ai/providers/anthropic", () => import("@opencode/ai/providers/anthropic")],
7069
["@opencode/ai/providers/anthropic-compatible", () => import("@opencode/ai/providers/anthropic-compatible")],
7170
["@opencode/ai/providers/azure", () => import("@opencode/ai/providers/azure")],
@@ -111,14 +110,7 @@ const builtins = new Map<string, () => Promise<unknown>>([
111110
["@opencode/ai/providers/google-vertex/mistral", () => import("@opencode/ai/providers/google-vertex/mistral")],
112111
["@opencode/ai/providers/google-vertex/responses", () => import("@opencode/ai/providers/google-vertex/responses")],
113112
["@opencode/ai/providers/google-vertex/images", () => import("@opencode/ai/providers/google-vertex/images")],
114-
["@opencode/ai/providers/google-vertex-chat", () => import("@opencode/ai/providers/google-vertex-chat")],
115-
[
116-
"@opencode/ai/providers/google-vertex-interactions",
117-
() => import("@opencode/ai/providers/google-vertex-interactions"),
118-
],
119113
["@opencode/ai/providers/google-vertex-messages", () => import("@opencode/ai/providers/google-vertex-messages")],
120-
["@opencode/ai/providers/google-vertex-mistral", () => import("@opencode/ai/providers/google-vertex-mistral")],
121-
["@opencode/ai/providers/google-vertex-responses", () => import("@opencode/ai/providers/google-vertex-responses")],
122114
["@opencode/ai/providers/groq", () => import("@opencode/ai/providers/groq")],
123115
["@opencode/ai/providers/meta", () => import("@opencode/ai/providers/meta")],
124116
["@opencode/ai/providers/meta/chat", () => import("@opencode/ai/providers/meta/chat")],
Collapse file

‎packages/core/src/variant.ts‎

Copy file name to clipboardExpand all lines: packages/core/src/variant.ts
-5Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,6 @@ const PROTOCOLS: Readonly<Record<string, Protocol>> = {
610610
"@opencode/ai/providers/azure/responses": openaiResponses,
611611
"@opencode/ai/providers/amazon-bedrock/mantle": openaiResponses,
612612
"@opencode/ai/providers/amazon-bedrock/mantle/responses": openaiResponses,
613-
"@opencode/ai/providers/amazon-bedrock-mantle": openaiResponses,
614613
"@opencode/ai/providers/alibaba/responses": openaiResponses,
615614
"@opencode/ai/providers/meta": openaiResponses,
616615
"@opencode/ai/providers/meta/responses": openaiResponses,
@@ -621,15 +620,13 @@ const PROTOCOLS: Readonly<Record<string, Protocol>> = {
621620
"@opencode/ai/providers/openai-compatible/responses": openResponses,
622621
"@opencode/ai/providers/openai-compatible-responses": openResponses,
623622
"@opencode/ai/providers/google-vertex/responses": openResponses,
624-
"@opencode/ai/providers/google-vertex-responses": openResponses,
625623
"@opencode/ai/providers/xai": openResponses,
626624

627625
"@opencode/ai/providers/openai-compatible": openaiCompatible,
628626
"@opencode/ai/providers/openai/chat": openaiChat,
629627
"@opencode/ai/providers/azure/chat": openaiChat,
630628
"@opencode/ai/providers/amazon-bedrock/mantle/chat": openaiChat,
631629
"@opencode/ai/providers/google-vertex/chat": vertexChat,
632-
"@opencode/ai/providers/google-vertex-chat": vertexChat,
633630
"@opencode/ai/providers/alibaba": alibabaChat,
634631
"@opencode/ai/providers/alibaba/chat": alibabaChat,
635632
"@opencode/ai/providers/baseten": basetenChat,
@@ -645,7 +642,6 @@ const PROTOCOLS: Readonly<Record<string, Protocol>> = {
645642
"@opencode/ai/providers/minimax/chat": openaiChat,
646643
"@opencode/ai/providers/mistral": openaiChat,
647644
"@opencode/ai/providers/google-vertex/mistral": openaiChat,
648-
"@opencode/ai/providers/google-vertex-mistral": openaiChat,
649645
"@opencode/ai/providers/moonshot": moonshotChat,
650646
"@opencode/ai/providers/moonshot/chat": moonshotChat,
651647
"@opencode/ai/providers/togetherai": openaiChat,
@@ -674,7 +670,6 @@ const PROTOCOLS: Readonly<Record<string, Protocol>> = {
674670
"@opencode/ai/providers/google-vertex/images": gemini,
675671
"@opencode/ai/providers/google/interactions": googleInteractions,
676672
"@opencode/ai/providers/google-vertex/interactions": googleInteractions,
677-
"@opencode/ai/providers/google-vertex-interactions": googleInteractions,
678673

679674
"@opencode/ai/providers/amazon-bedrock": bedrockConverse,
680675
"@opencode/ai/providers/cohere": cohere,
Collapse file

‎packages/core/test/aisdk-native.test.ts‎

Copy file name to clipboardExpand all lines: packages/core/test/aisdk-native.test.ts
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,13 @@ describe("AISDKNative", () => {
252252
package: "@opencode/ai/providers/amazon-bedrock/mantle/messages",
253253
settings: { apiKey: "token" },
254254
})
255+
expect(rewrite("@opencode/ai/providers/amazon-bedrock-mantle", {}, "openai.gpt-oss-120b").package).toBe(
256+
"@opencode/ai/providers/amazon-bedrock/mantle/chat",
257+
)
258+
for (const name of ["chat", "responses", "interactions", "mistral"])
259+
expect(rewrite(`@opencode/ai/providers/google-vertex-${name}`, {}).package).toBe(
260+
`@opencode/ai/providers/google-vertex/${name}`,
261+
)
255262
expect(rewrite("@opencode/ai/providers/azure", { useCompletionUrls: true }).package).toBe(
256263
"@opencode/ai/providers/azure/chat",
257264
)
Collapse file

‎packages/core/test/provider.test.ts‎

Copy file name to clipboardExpand all lines: packages/core/test/provider.test.ts
+1-9Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,7 @@ describe("Provider", () => {
2626
})
2727

2828
test("keeps loading the hyphenated provider paths existing configs reference", async () => {
29-
for (const name of [
30-
"amazon-bedrock-mantle",
31-
"google-vertex-chat",
32-
"google-vertex-interactions",
33-
"google-vertex-messages",
34-
"google-vertex-mistral",
35-
"google-vertex-responses",
36-
"openai-compatible-responses",
37-
]) {
29+
for (const name of ["google-vertex-messages", "openai-compatible-responses"]) {
3830
const specifier = `@opencode/ai/providers/${name}`
3931
expect(Provider.builtinPackages.has(specifier)).toBe(true)
4032
const loaded = await Effect.runPromise(Provider.loadPackage(specifier))

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.