Dani Ariyanto (Discord) asked for Vertex AI's partner/open models, such as
DeepSeek V4.1 Flash, beside Gemini. Google serves them (Model as a Service)
on an OpenAI-compatible chat completions endpoint in the same project,
https://<host>/v1/projects/<p>/locations/<loc>/endpoints/openapi/chat/completions,
with the same OAuth token. The model goes in the body as publisher/model
(deepseek-ai/deepseek-v4.1-flash-maas). Source: Google's
maas/call-open-model-apis page.
An existing Vertex provider needs no change. A model id with a slash
(VertexPartner) is a partner model, as is every publisher/model id that
models.dev lists for google-vertex as @ai-sdk/openai-compatible. It is
asked on Base(Chat) = <project base>/endpoints/openapi (ListedAPIs, so
ModelAPI can't move it). Gemini ids have no slash and stay on
streamGenerateContent. Speaks is now [chat, gemini].
- vertexEffort (Gemini's levels) no longer applies to a partner model.
Before, a Codex xhigh was clamped to high.
- The provider's own test probes Gemini only. A partner model answers
only after the project enables it in Model Garden, so an unenabled
partner model would turn every Gemini user's test red. A partner model
is tested by its own model test.
- tinyBody's chat probe uses Base(Chat), so the probe goes to the openapi
address. That address is the only one Sign lets the token go to.
- A test as Codex is refused for Vertex, as it already is for Claude Code
("only of a relay").
The global list adds the three partner models that Google's docs list as
live at global on 2026-10-28:
- deepseek-ai/deepseek-v4.1-flash-maas (Preview, global only)
- zai-org/glm-5.2-maas
- openai/gpt-oss-120b-maas
Left out of the list: Gemma 4 (Experimental) and the models retired on
10-21 (v3.x, glm-4.7/5, qwen3, llama-3.3...). Gemma 4 still routes when
typed in by its full id. us/eu/regions are unchanged.
Docs: providers-accounts.md and gateway-routing.md Vertex rows;
reference.md (the global row, how a partner id routes, Model Garden
enablement, typing one in).
Run (on mote via mote-run):
- go test -tags nogui -run TestVertex ./internal/provider ./internal/gateway: ok.
- New: TestVertexPartnerModel (gateway). It covers Chat, Anthropic and
Responses clients, streamed and whole, against a fake openapi endpoint
answering in the shape of Google's docs. It checks the path, the Bearer
token, the body model and the client's text, that Gemini stays on
streamGenerateContent, and that xhigh is kept.
- New: TestVertexPartnerModels (provider). It covers Speaks/Base,
APIs per model, the global list, no partner model at us/us-central1,
that Test() probes Gemini alone, and TestModels on openapi with the
minted token.
- TestVertexProviderListed now pins Speaks [chat gemini].
- go vet ./..., GOOS=linux go vet -tags nogui ./..., GOOS=windows go vet
./..., go build ./...: all ok; gofmt -l clean.
- Full suite: go test -tags nogui -count=1 -timeout 45m ./... at
80f2bda50 (this change on cb167fcbd): SUITE-EXIT=0, 77 packages ok.
- An earlier full run at base 396e0e463 was red only in
TestPluginStreamsPastTheBudgetWait. That is #3946, fixed in 7fd77a944
after that base. It passed 3 of 3 alone at origin/main cb167fcbd.
- The final rebase onto b5d2858f4 (usage, a gateway test, LESSONS) was
followed by go build and the TestVertex runs again; the suite was not
run again.
Broken by hand:
- All nine non-test files restored to main, with VertexPartner kept so
the tests compile: TestVertexPartnerModel red (asked
publishers/google/models/deepseek-ai/...:streamGenerateContent with a
Gemini body), TestVertexPartnerModels and TestVertexProviderListed red
(speaks [gemini]).
- vertexEffort guard removed: red, "effort xhigh sent ... as high".
- Test()'s Vertex chat skip removed: TestVertexTestRequest and
TestVertexPartnerModels red (a chat probe of the partner model).
- tinyBody back to q.Chat: TestVertexPartnerModels red ("asked only at
Vertex AI, at its project's address").
Not tried:
- No real Vertex AI account or project here. Nothing reached Google:
the endpoint, auth and response shapes come from Google's docs only.
- Per-model thinking controls (chat_template_kwargs: DeepSeek thinking,
GLM enable_thinking) are not mapped. A partner model gets the generic
chat completions reasoning_effort, and gpt-oss takes it natively.
- Claude on Vertex (publishers/anthropic rawPredict) is out of scope. It
takes its own request shape and its ids have no slash.
- No GUI change (the API picker reads URL fields, which Vertex has
none of), so no GUI suite was run.
Subsystem design references
These pages describe current responsibilities, runtime paths, state, and contracts. Start with the subsystem relevant to your task, then follow its source links to verify the implementation you change.
| Subsystem | Reference |
|---|---|
| Built-in subscriptions moving to plugins | Provider and plugin ownership |
| Built-in plugins: registry, lifecycle, plugins.yml, presets, settings schemas, the window's kernel (slots, error boundary, kit) | Plugin runtime |
| Plugins that run on the gateway's requests and replies | Gateway middleware |
| Tools that plugins give, offered to every agent as an MCP server | Plugin tools |
| Plugins that await context recall and observe completed replies | Asynchronous gateway request hooks |
| Claude subscription turns across Claude Code runs | Claude subscription bridge |
| How the gateway picks a provider, key or account, and falls back | Gateway routing and fallback |
| Gateway Session Aggregation | Gateway Session Aggregation |
| Connecting an agent's config to the gateway, drift, disconnect, WSL twins | Agent wiring |
| Providers, keys, subscription accounts, refresh and allowance | Providers and accounts |
| Instructions, MCP servers, skills and RTK written into agents | Library |
Tray, panel, window, magpie web and the page's JSON API |
GUI app shell |
| Encrypted backups and setup synchronization over WebDAV, S3 or GitHub | Sync and backup |
A subsystem can span several packages or repositories. Its reference describes the behavior those parts provide together; it does not need to list every function.
Maintain a reference
Update the owning reference in the same PR when a change alters a documented responsibility, interface, state transition, runtime path, compatibility rule, or failure behavior. An internal refactor that preserves these contracts does not require a prose change.
Keep each fact in one reference and link to it from agent instructions or other pages. Link to source files and named symbols rather than copying implementation details that change frequently. Explain field meanings and constraints that signatures alone do not express.
For a new reference, include the responsibilities and boundaries, source of truth, main runtime paths, state transitions, important constraints, and existing verification commands. Include failure and compatibility behavior where relevant. Document current behavior separately from proposed changes; the proposal belongs in its issue or PR.
Describe a PR's semantic changes
For each affected subsystem, explain the observable change with its trigger and before/after behavior. Include changes to interfaces, state, compatibility, and failure behavior when relevant. Link the affected reference, implementation, and verification evidence. State when a refactor preserves the documented behavior.
For example, a change to plugin adoption should explain which migration state and account condition trigger it, which implementation handles requests before and after adoption, and which test exercises that transition.
This is an author-provided explanation that a reviewer verifies against the diff and surrounding code. It is not an automatically proven compatibility verdict.
Review a change
- Identify the affected subsystem and the actual runtime path, including plugin or built-in ownership.
- Compare the claimed before/after behavior with the base and head implementation. Trace relevant callers and state transitions beyond the changed lines.
- Check that changed contracts appear in the owning reference and that source links still resolve.
- Check that the cited tests or runtime evidence exercise the claimed behavior. Report checks that were not run.
A documentation update alone does not prove the implementation. Existing tests and runtime evidence remain necessary for behavior changes.