Bug Fixes
- Fixed oversized prompts being surfaced as generic provider errors and retried multiple times. For providers that return an unexplained 400, 413, 422, or 5xx response, the gateway now detects when the prompt estimate is at least 1.2 times the model’s context window and returns a clear “prompt is too long” error instead.
- Fixed Qoder token usage being reported as 0 tokens by updating the Qoder plugin to version 0.2.4.
Improvements
- Requests that are close to or under the context window, as well as rate limit, authentication, and low-balance errors, continue to be handled normally.
- Added test coverage for overflow responses where the provider does not explicitly say the prompt is too long.
Install
Download from usemagpie.ai, or curl -fsSL https://usemagpie.ai/install.sh | sh. An installed magpie updates itself.
- macOS (Apple Silicon):
magpie-darwin-arm64.dmg - macOS (Intel):
magpie-darwin-amd64.dmg - Windows:
magpie-windows-amd64.exe(ARM:magpie-windows-arm64.exe) - Linux:
magpie-linux-amd64/magpie-linux-arm64(needs GTK 3 and WebKitGTK 4.1) - Terminal only:
magpie-cli-<os>-<arch>
错误修复
- 修复了超大提示被显示为通用提供商错误并被多次重试的问题。对于返回未说明原因的 400、413、422 或 5xx 响应的提供商,网关现在会检测提示预估长度是否至少为模型上下文窗口的 1.2 倍,并改为返回明确的“提示过长”错误。
- 修复了 Qoder token 使用量被报告为 0 token 的问题,方法是将 Qoder 插件更新到版本 0.2.4。
改进
- 接近或低于上下文窗口的请求,以及速率限制、身份验证和余额不足错误,将继续正常处理。
- 为提供商未明确说明提示过长的溢出响应添加了测试覆盖。
安装
从 usemagpie.ai 下载,或运行 curl -fsSL https://usemagpie.ai/install.sh | sh。已安装的 magpie 会自动更新。