Skip to content

GH-718: authenticate the GitHub release lookup in Model Gateway setup (PR #718) - #794

Merged
Eigenwise merged 7 commits into
developfrom
integrate/gh-718
Nov 9, 2026
Merged

Eigenwise merged 7 commits into
developfrom
integrate/gh-718

Conversation

@Eigenwise

Copy link
Copy Markdown
Owner

Lands MadaBurns's #718 on develop through an integrate branch, on top of #782 (integrate/gh-782, PR #793) because both touch lib/process-supervision.js; the merge was clean.

  • lib/github-release.js: fetchLatestRelease uses GH_TOKEN, then GITHUB_TOKEN, then gh auth token --hostname github.com, else anonymous. A 403/429 on an anonymous call says it is the rate limit and how to fix it; a refused token names its source, never the token.
  • fetchUrl drops the Authorization header when a redirect changes origin (other host or https to http), so the token never reaches the asset CDN.
  • SKILL.md and getting-started/model-gateway.md describe the token sources and the 403 meaning. 10 new tests.
  • Maintainer-added fragment .release/unreleased/GH-718.md (model-gateway patch); the PR had none because the contributor had no board ref.

Reviewed by the maintainer 2026-11-09: token only on the API request, redirect handling covers the downgrade case, behaviour unchanged with no token available.

🤖 Generated with Claude Code

MadaBurns and others added 7 commits October 30, 2026 10:25
setup looked up the latest claude-code-proxy release anonymously. Anonymous
GitHub API calls share 60 an hour per IP address, so on a machine running
several agents setup (and update.js / update-toolshed) failed with a bare
"GitHub API returned 403" although a working gh login was available.

- lib/github-release.js: token from GH_TOKEN, then GITHUB_TOKEN, then
  `gh auth token --hostname github.com` (5 s timeout, no shell); falls back
  to anonymous. The token is sent only as a bearer header on the API call.
  A 403/429 refusal names the rate limit and the fix; no message carries
  the token.
- fetchUrl drops Authorization when a redirect leaves the original host.
- SKILL.md and the getting-started page describe the token sources and
  what an anonymous 403 means.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Compare redirect origins (scheme, host and port), not hosts, so a downgrade
to http on the same host also drops Authorization. Pin it with a test that
fails on the host comparison.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…kup (patch)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@Eigenwise
Eigenwise merged commit d7a92a2 into develop Nov 9, 2026
20 checks passed
@Eigenwise
Eigenwise deleted the integrate/gh-718 branch November 9, 2026 20:54
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