72c03a5
feat(copilot): implement token-based api for fresh model data (#167)
Click to expand commit body
GitHub Copilot now requires a token-based flow to access the actual API endpoint:
- Added token request to https://api.github.com/copilot_internal/v2/token
- Parse dynamic API endpoint from token response
- Use dynamic endpoint to fetch models with fresh data
- Added required headers: Copilot-Integration-Id and User-Agent
Result: fetches ~38 models with updated context windows including newer
models like gpt-5 series with 264K-400K context windows.
Update generates copilot.json with refreshed model capabilities.
💘 Generated with Crush
Assisted-by: Kimi K2 Thinking via Crush <crush@charm.land>
* feat: add vercel ai gateway
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* fix: wiring
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* chore: gofumpt
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* ci: add to jobs as well
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* Update .github/workflows/update.yml
Co-authored-by: Andrey Nering <andreynering@users.noreply.github.com>
---------
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Co-authored-by: Andrey Nering <andreynering@users.noreply.github.com>
* feat(synthetic): add pricing and Pro/Max provider
Synthetic's API doesn't include pricing, so we add manual overrides from
their pricing page. Also generates synthetic-promax.json for Pro/Max
subscribers with zero pricing.
- Set default large model to GLM 4.7
- Add priceOverrides map with per-model pricing
- Set cached rates equal to regular (they don't have separate cached rates
afaict)
- Add DeepSeek V3.2 metadata override (tools + reasoning)
- Generate separate config for Pro/Max subscription
Assisted-by: Claude Opus 4.5 via Crush
* refactor(synthetic): parse pricing from API
Assisted-by: Claude Opus 4.5 via Crush
* refactor(synthetic): remove Pro/Max provider generation
Assisted-by: Claude Opus 4.5 via Crush <crush@charm.land>