You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Z.AI rate limit handling and GitHub Copilot PAT support
Problem: Multiple issues with rate limit detection and API authentication.
Solution: Comprehensive fixes for Z.AI rate limit handling, improved header
capture for curl streaming, and static PAT support for GitHub Copilot.
Rate Limit Handling (Z.AI):
- Handle Z.AI rate limit code 1310 (weekly/monthly limit exhaustion)
- Parse x-ratelimit-user-retry-after header for accurate reset times
- Improve human-readable time formatting (hours/days instead of seconds)
- Add debug logging to capture all rate limit headers for diagnosis
- Fix header parsing to properly extract X-RateLimit-User-Retry-After
Curl Streaming Fixes:
- Buffer chunks during streaming and deliver after headers are parsed
- Create response object lazily with correct headers after header file is read
- Add debug logging for header parsing to diagnose header capture issues
- Ensure callback receives correct response object with parsed headers
GitHub Copilot Static PAT Support:
- Allow static API key fallback when GitHub authentication is unavailable
- Support fine-grained PATs (ghu_ prefix) with individual endpoint directly
- Set using_exchanged_token flag when using PAT for proper header support
- Skip GitHub auth checks when static API key is configured
- Fix billing multiplier check for when model prefix is used
Config Storage Fix:
- Prevent flat api_base from overriding per-provider storage
- Check for provider-specific api_keys before falling back
Documentation:
- Standardize MiniMax model recommendation for all sub-agents
- Add comprehensive system prompt and documentation review
Bug Fixes:
- Add missing log_info import in PromptManager
- Remove duplicate empty elsif block in ResponseHandler error handling
Testing:
- Verified Z.AI rate limit codes 1308 and 1310 are handled correctly
- Verified curl streaming properly captures and delivers rate limit headers
- Verified GitHub Copilot works with both GitHub auth and static PATs
- All unit tests pass
MiniMax-M2.7 via MiniMax is the recommended default for all standard tasks: investigation, QA, implementation, code review, refactoring, documentation.
0 commit comments