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
commit 4f1298063b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 860 additions and 53 deletions

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.