Mirror: Fix ZenMux model metadata and native tool message handling (#5831)#30
Mirror: Fix ZenMux model metadata and native tool message handling (#5831)#30jeremylongshore merged 5 commits intomainfrom
Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello @jeremylongshore, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on enhancing the stability and functionality of the ZenMux provider and improving overall error handling within the system. Key updates include refining ZenMux model metadata to better support native tools and ensuring reliable tool-calling behavior. Additionally, the changes introduce more robust error processing for streaming operations across various AI providers, allowing for more accurate error reporting and retry mechanisms. A significant fix addresses the processing of slash commands within tool results, ensuring user commands are correctly interpreted in all contexts. Finally, the integration with the Model Context Protocol now dynamically updates available capabilities, leading to a more responsive and up-to-date user experience. Highlights
Changelog
Ignored Files
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Review Summary by QodoMirror: Fix ZenMux model metadata and native tool message handling
WalkthroughsDescription• **ZenMux native tools reliability**: Fixed native tool metadata merging, message format handling, and context window detection to prevent "tool not used" loops • **Slash command processing in tool results**: Extended parseKiloSlashCommands to handle tool_result blocks, fixing a regression where slash commands were not processed in tool results • **ZenMux model cache validation**: Added self-healing logic to reject stale cache entries with invalid context window values from v5.7.0 • **Enhanced error handling**: Improved nested error payload extraction and status code resolution for better error propagation from providers • **MCP notification handlers**: Added support for ResourceListChanged, ToolListChanged, and PromptListChanged notifications with dynamic capability refresh • **Stream error handling**: Added error handling for AI SDK stream error parts to surface provider-specific errors • **Comprehensive test coverage**: Added test suites for ZenMux native tools, MCP notifications, error handling, model fetching, and slash command processing • **GitHub Actions auto-triage**: Added workflow for automatic issue and PR labeling Diagramflowchart LR
A["ZenMux Model Fetcher"] -->|"native tools defaults"| B["Model Info"]
B -->|"merge metadata"| C["ZenMux Stream"]
C -->|"OpenAI format messages"| D["Native Tool Support"]
E["Tool Results"] -->|"parse slash commands"| F["Content Processing"]
G["MCP Server"] -->|"list change notifications"| H["Notification Service"]
H -->|"refresh callback"| I["Capability Refresh"]
J["Provider Errors"] -->|"extract nested payload"| K["Error Handler"]
K -->|"normalized errors"| L["Stream Processing"]
File Changes1. src/services/mcp/kilocode/__tests__/NotificationService.spec.ts
|
There was a problem hiding this comment.
Code Review
This pull request introduces several significant improvements and fixes. It correctly handles ZenMux model metadata, particularly the contextWindow, and adds support for native tools. Error handling has been made more robust across providers, with better extraction of details from streaming and nested errors. A bug preventing slash command processing in tool_result blocks has been fixed through a nice refactoring. Additionally, the MCP client is now more dynamic, capable of refreshing its capabilities in response to server notifications. The changes are well-tested and improve the overall stability and functionality of the system.
| tools, | ||
| tool_choice: tools ? "auto" : undefined, | ||
| tool_choice: toolChoice ?? "auto", | ||
| parallel_tool_calls: enableParallelToolCalls ? true : false, |
|
Failed to generate code suggestions for PR |
Mirror of upstream PR #5831
Verdict: APPROVE | Tier 5
Review: kilocode-5831-review.md