fix(grok): bump pinned Grok CLI version to 0.2.114

`cli-chat-proxy.grok.com` turns away requests that do not name a
supported client version — the failure mode #3952 was opened for. The
pin has sat at 0.2.93 since 2026-07-17, while https://x.ai/cli/stable
and `npm view @xai-official/grok version` both report 0.2.114.

The version was written out in three places, which is how they came to
drift:

- `repository/http_upstream.go` (OAuth traffic through the CLI proxy)
- `pkg/xai/billing.go` (billing and quota probes)
- `service/openai_gateway_grok.go` (gateway request headers)

`xai.CLIClientVersion` is now the single source, and the other two build
their own client identity from it, so the next bump is one line.
`internal/pkg/xai` is a leaf package both layers already import, so this
adds no cycle. `CLIUserAgent` derives from the same constant.

Checked against the real 0.2.114 binary rather than the version feed
alone: the `x-grok-client-version` header name, the `xai-grok-cli`
token-auth value, and the version string all match what the CLI sends.

The pinned value is also the floor an operator override must clear, so
some fixtures carried a meaning relative to it rather than a fixed
number. Those were moved, not search-and-replaced:

- the "valid override" case now uses 0.2.115-alpha.1; at 0.2.95-alpha.1
  it would fall below the new floor, be dropped, and stop testing
  acceptance at all
- the prerelease-at-the-minimum case tracks the pin to 0.2.114-beta.1,
  or it becomes a copy of the below-minimum case
- three of the five malformed-semver entries sat below the new floor and
  would have been turned away for being old, not for being malformed

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
NickandClaude Opus 5 committed 2026-07-29 13:31:18 +07:00
1 parent 5a6143097d
commit b74cb7891c
5 files changed
+30 -24

No files matched your search

+4 -1
View File
@@ -15,8 +15,11 @@ const (
CLITokenAuthHeader = "x-xai-token-auth"
CLITokenAuthValue = "xai-grok-cli"
CLIClientVersionHeader = "x-grok-client-version"
// CLIClientVersion is the one place the pinned Grok CLI version lives. The
// repository and service layers build their own client identity from it, so
// one bump here covers OAuth traffic and billing probes together.
// Keep in sync with https://x.ai/cli/stable.
CLIClientVersion = "0.2.93"
CLIClientVersion = "0.2.114"
CLIUserAgent = "grok-pager/" + CLIClientVersion + " grok-shell/" + CLIClientVersion + " (macos; aarch64)"
BillingWeeklyPath = "/billing?format=credits"