Skip to content

feat(identity): refresh pinned CLI versions from their release feeds - #15642

Merged
diegosouzapw merged 2 commits into
diegosouzapw:release/v3.8.52from
HouMinXi:fix/dynamic-client-versions
Oct 6, 2026
Merged

diegosouzapw merged 2 commits into
diegosouzapw:release/v3.8.52from
HouMinXi:fix/dynamic-client-versions

Conversation

@HouMinXi

@HouMinXi HouMinXi commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Four clients pin a version that the upstream checks before it serves a model: Claude Code, Codex, GitHub Copilot, and the Cursor CLI. A pin that falls behind comes back as a 400 or a "requires a newer version". Each one now reads the current version from the vendor's own feed, caches it for six hours, and keeps the pin when the feed is down or returns something older.

The request path does not wait on the fetch. The getter returns the cache or the pin immediately and starts the fetch in the background, so the next request picks up the new version. Tests run with NODE_TEST_CONTEXT set, which skips the background fetch so a unit test never opens a socket.

Feeds: npm @anthropic-ai/claude-code, GitHub openai/codex releases, npm @github/copilot, and cursor.com/install.

Test plan

  • Each feed has a test that stubs fetch: a newer version is kept, a rejected fetch stays on the pin, and an env override beats both.
  • Removing the fetch makes the newer-version assertion fail; restoring it passes.
  • 23 tests pass across two runs.

Claude Code, Codex, Copilot and the Cursor CLI pin a client version
that the upstream gates models on. Each pin rots until someone bumps it
by hand. Read the current version from the vendor feed, keep a six hour
cache, and fall back to the pin when the feed is unreachable. The
request path never waits on the fetch.

Signed-off-by: Minxi Hou <houminxi@gmail.com>
@HouMinXi
HouMinXi requested a review from diegosouzapw as a code owner October 6, 2026 12:08
Gemini CLI, Qwen Code, CodeBuddy, Kimi Code and Zed pin a version the
same way the first four do. Read each from its vendor feed in the
background, cache for six hours, and keep the pin when the feed is
down. The request path does not wait.

Signed-off-by: Minxi Hou <houminxi@gmail.com>
@diegosouzapw
diegosouzapw merged commit ef3b71c into diegosouzapw:release/v3.8.52 Oct 6, 2026
41 of 87 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants