feat(llm): add compatible and vertex provider entrypoints (#36900)

This commit is contained in:
Shoubhit Dash
2026-07-15 22:08:19 +05:30
committed by GitHub
parent 22334b94c8
commit 4f1298063b
22 changed files with 860 additions and 53 deletions
+15
View File
@@ -360,6 +360,21 @@ import { model } from "@opencode-ai/llm/providers/openai/responses"
model("gpt-4o", { apiKey, transport: "websocket" })
```
Vertex keeps Gemini and Anthropic Messages as separate package-like entrypoints,
while sharing project/location resolution and ADC authentication internally:
```ts
import { model } from "@opencode-ai/llm/providers/google-vertex"
model("gemini-3.5-flash", { project, location: "global" })
```
```ts
import { model } from "@opencode-ai/llm/providers/google-vertex/anthropic"
model("claude-sonnet-4-6", { project, location: "global" })
```
The client should not require a different public layer just because a selected
route uses WebSocket. Use one `LLMClient.layer` with HTTP and WebSocket runtime
capabilities available; routes that do not need WebSocket simply never touch it.