Commit b35e549
Fix GitHub API rate limiting by using proper package managers
GitHub API 403 errors were occurring due to rate limiting (60 req/hour
for unauthenticated requests). Fixed by using the correct package manager
for each agent instead of GitHub releases.
Changes:
- Added PyPI package manager support in version.go
- New getPyPILatestVersion() function
- Fetches from https://pypi.org/pypi/{package}/json
- No rate limits, more reliable
- Updated Kimi CLI to use PyPI
- Changed package_manager from "github" to "pypi"
- Package name: "kimi-cli"
- Aligns with actual installation method (uv/pip)
- Updated Qwen to use npm registry
- Changed package_manager from "github" to "npm"
- Package name: "@qwen-code/qwen-code"
- Aligns with actual installation method (npm)
- Updated .golangci.yml
- Added dupl exclusion for internal/registry/
- Allows intentional duplication across package manager functions
Benefits:
- No more GitHub API 403 errors
- More reliable version detection
- Uses correct source for each package
- Faster response times (no rate limiting)
Testing:
- Verified Kimi version detection: 0.40 from PyPI ✅
- Verified Qwen version detection: 0.0.14 from npm ✅
- All tests pass: go test ./... ✅
- Linting clean: golangci-lint run ✅
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent cbb73c3 commit b35e549
3 files changed
+52
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
82 | 87 | | |
83 | 88 | | |
84 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | | - | |
201 | | - | |
| 200 | + | |
| 201 | + | |
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
249 | | - | |
| 248 | + | |
| 249 | + | |
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
| |||
300 | 302 | | |
301 | 303 | | |
302 | 304 | | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
303 | 346 | | |
304 | 347 | | |
305 | 348 | | |
| |||
0 commit comments