mirror of
https://github.com/router-for-me/CLIProxyAPIPlus.git
synced 2026-04-17 20:03:42 +00:00
578c312660637e3a3329305295f0cd2204a228ad
The Copilot API enforces per-account prompt token limits (128K individual, 168K business) that are lower than the total context window (200K). When the dynamic /models API fetch fails or returns no capabilities.limits, the static fallback of 200K exceeds the real enforced limit, causing intermittent "prompt token count exceeds the limit" errors. Two complementary fixes: 1. Lower static Copilot Claude model ContextLength from 200000 to 128000 (the conservative default matching defaultCopilotContextLength). Dynamic API limits override this when available. 2. Add context_length and max_completion_tokens to Claude-format model responses so Claude Code CLI can learn the actual Copilot limit instead of relying on its built-in 1M context configuration.
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.
Languages
Go
99.7%
Shell
0.2%