Repository navigation
docs(credentials): re-measure the account token on both gateway families - #193
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The credential docs carry a measurement from 2026-10 — "an OAuth token is not an API key on the Zen model endpoint" — that was made with a JWT-shaped string, not the account's real token, and that has since been superseded. This re-measures it against the live gateway and corrects the record.
The device-flow access token authenticates a real completion on both endpoint families, on the Go plane where the controls are unambiguous (model
beam-free, with the turn'sx-opencode-sessionheader as the client sends it):POST /zen/go/v1/chat/completions(legacy)POST /inference/go/v1/chat/completions(modern)401 OpenCode Go requires an API key401 OpenCode Go requires an API keyBearer [REDACTED]401 Invalid credential401 Invalid credentialBearer <the account's access token>200, a completion200, a completionThe same token answers the Console API (
GET /console/api/userand/api/orgs:200; garbage and no credential:401 Unauthorized) and the Go quota endpoint on both families (200, three windows). The Zen free rows answer429 FreeUsageLimitErrorwith the token and keyless alike — both reach the entitlement check — while garbage stays401.What that means for the plugin, and why this is docs-only:
usableKey), send the value in the wire's own slot, and let the endpoint answer (401auth,403 EntitlementError,429free tier).Scope of the measurement: one account, one day (2026-11-19), the Go free model for the model-call rows and the Zen free rows for the free-tier behaviour; no paid model was called. The org header is not required for the token measured — it authenticates without one, and
credentialOrgstays an explicit override.The
docs/deep-dive.mdV1/V2 diagram gains the same correction beside it: the credential split is a product shape, not a hard boundary between the two endpoint levels.No source, config or generated data changes; the unit tests that reference the two documents pass.