sdytman (#feedback, 10-20) found that Cline doesn't send every model
through Vercel's AI Gateway: glm-5.3-flash goes through OpenRouter
directly, which ignores providerOptions.gateway.only, so the Upstream
tick (dd70c5e6a) didn't pin it. OpenRouter reads a top-level
provider.only with its own slug, "z-ai" for Z.AI
(openrouter.ai/api/v1/providers; its glm-5.3-flash endpoints list
"Z.AI z-ai/fp8"). deepseek-v4.1-flash and deepseek-v4.1-flash-1017 do go
through Vercel, so they keep providerOptions.gateway.only ["deepseek"].
provider.ClinePin now returns the upstream and whether the model's route
is OpenRouter, from a table whose first entry is glm-5.3-flash by exact
name (glm-5.3-flashx and glm-5.3 stay on Vercel's "zai" as before; which
router Cline uses isn't visible from its feed or either router's model
list, both of which list every one of these models). clinePin appends
"provider":{"only":["z-ai"]} at the body's end for such a model, so the
cached prefix is unchanged, and leaves a body naming provider or
providerOptions itself as sent. Applies to the Cline plugin's provider
too, since magpie writes its requests before the plugin sends them.
Not tried with a real request: there is no Cline account here.
Broken by hand, each red: no glm-5.3-flash entry (gets providerOptions
zai), a client's own provider field not checked (two pin keys), and
providerOptions for every model (flash has no provider.only). Not tried
with a real ClinePass request: no account here.
Run: gofmt -l (none); go vet ./... on darwin, GOOS=linux -tags nogui and
GOOS=windows: clean. `set -o pipefail; go test -timeout 45m ./...` at
1ebda9026 (this batch on 318697dce, movers then at qoder 0.2.21,
workbuddy 0.1.26, no devin raise): 65 packages ok, exit 0. Rebased onto
a9304efe0 (codex images, codex list tag, sessions decoders): gofmt, the
three vets and go test of internal/gateway, internal/provider,
internal/plugin and internal/sessions ok. Then the mover mins were raised
to qoder 0.2.23, workbuddy 0.1.27 and devin 0.1.21 (the only change
since, three strings): gofmt, the three vets of internal/provider and
go test ./internal/provider/ ok at the head of this batch.