kunish 87bf0b73d5 fix(copilot): use dynamic API limits to prevent prompt token overflow
The Copilot API enforces per-account prompt token limits (128K individual,
168K business) that differ from the static 200K context length advertised
by the proxy. This mismatch caused Claude Code to accumulate context
beyond the actual limit, triggering "prompt token count exceeds the limit
of 128000" errors.

Changes:
- Extract max_prompt_tokens and max_output_tokens from the Copilot
  /models API response (capabilities.limits) and use them as the
  authoritative ContextLength and MaxCompletionTokens values
- Add CopilotModelLimits struct and Limits() helper to parse limits
  from the existing Capabilities map
- Fix GitLab Duo context-1m beta header not being set when routing
  through the Anthropic gateway (gitlab_duo_force_context_1m attr
  was set but only gin headers were checked)
- Fix flaky parallel tests that shared global model registry state
2026-04-03 23:54:17 +08:00
2026-03-16 00:36:19 +08:00
2025-09-25 10:32:48 +08:00
2026-03-25 10:14:14 +08:00
2026-03-10 22:20:40 +04:00
2026-04-02 21:31:21 +08:00
2025-10-15 11:47:35 +08:00
2026-04-02 21:31:21 +08:00
2026-03-28 04:51:18 +08:00
2026-04-02 12:15:33 +08:00
2025-09-25 10:32:48 +08:00
2026-04-02 12:15:33 +08:00
2026-04-02 12:15:33 +08:00
2026-03-25 10:14:14 +08:00

CLIProxyAPI Plus

English | Chinese

This is the Plus version of CLIProxyAPI, adding support for third-party providers on top of the mainline project.

All third-party provider support is maintained by community contributors; CLIProxyAPI does not provide technical support. Please contact the corresponding community maintainer if you need assistance.

The Plus release stays in lockstep with the mainline features.

Contributing

This project only accepts pull requests that relate to third-party provider support. Any pull requests unrelated to third-party provider support will be rejected.

If you need to submit any non-third-party provider changes, please open them against the mainline repository.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Description
No description provided
Readme MIT 297 MiB
Languages
Go 99.7%
Shell 0.2%