refactor(ai): separate Vertex API routes (#37275)

This commit is contained in:
Shoubhit Dash 2026-07-16 17:17:15 +05:30 committed by GitHub
commit 282f3f7eb2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 120 additions and 126 deletions

View file

@ -360,17 +360,17 @@ import { model } from "@opencode-ai/ai/providers/openai/responses"
model("gpt-4o", { apiKey, transport: "websocket" })
```
Vertex keeps Gemini and Anthropic Messages as separate package-like entrypoints,
Vertex keeps Gemini and Messages as separate package-like entrypoints,
while sharing project/location resolution and ADC authentication internally:
```ts
import { model } from "@opencode-ai/ai/providers/google-vertex"
import { model } from "@opencode-ai/ai/providers/google-vertex/gemini"
model("gemini-3.5-flash", { project, location: "global" })
```
```ts
import { model } from "@opencode-ai/ai/providers/google-vertex/anthropic"
import { model } from "@opencode-ai/ai/providers/google-vertex/messages"
model("claude-sonnet-4-6", { project, location: "global" })
```