Skip to content

Weave fixes - tools and claude - #25

Merged
T-rav merged 5 commits into
mainfrom
weave
Jun 18, 2025
Merged

Weave fixes - tools and claude #25
T-rav merged 5 commits into
mainfrom
weave

Conversation

@T-rav

@T-rav T-rav commented Jun 18, 2025

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features

    • Improved database reliability with automatic retries for transient connection errors.
    • Enhanced database connection pooling for better performance and stability.
    • Updated configuration to support new Anthropic Claude model versions and names.
    • Added support for new environment variables for API keys.
  • Bug Fixes

    • Corrected model naming and identifiers for Anthropic Claude models in configuration.
    • Fixed a typo in model names in the configuration.
  • Chores

    • Disabled MCP tool execution in the RAG pipeline.
    • Updated logging for database error messages during Slack user lookup.
    • Removed obsolete MCP tool integration code and related environment variables.

@coderabbitai

coderabbitai Bot commented Jun 18, 2025

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

Walkthrough

The updates introduce robust database connection pooling and retry logic, correct and update Anthropic Claude model configurations, and enhance environment variable handling in configuration files. MCP tool execution is fully disabled in the RAG pipeline hook, and a log message is clarified in the main server. No changes are made to core application logic or public APIs.

Changes

Files/Paths Change Summary
mcp-server/database.py Added connection pool parameters, implemented async retry logic for DB ops, refactored all DB functions to use retry wrapper.
config/litellm_config.yaml Updated Anthropic Claude model names/versions, removed explicit API base URLs, added API key env variables.
docker-compose.yml Added ENABLE_MCP_TOOL_EXECUTION and ANTHROPIC_API_KEY environment variables to service config.
rag_pipeline/pre_request_hook.py Removed all MCP tool execution code; disabled feature; simplified post-call hook; removed related private method.
mcp-server/main.py Clarified warning log message for Slack user DB lookup errors.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant RAGHandler
    Note over RAGHandler: MCP tool execution logic removed<br>Post-call hook is now a stub
    User->>RAGHandler: async_post_call_success_hook(...)
    RAGHandler-->>User: Returns response unchanged<br>(MCP tool execution disabled)
Loading
sequenceDiagram
    participant App
    participant Database
    loop Up to 3 retries
        App->>Database: Perform DB operation
        alt Connection error
            App->>App: Exponential backoff, retry
        else Success or non-connection error
            App->>App: Return or raise error
        end
    end
Loading

Poem

In the warren, code hops anew,
With retries strong and models true.
The tools have napped, the logs are neat,
Configs updated, pooling complete.
A carrot raised, a whiskered cheer—
For robust code and changes here!
🥕🐇


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d89b18b and fff3eac.

📒 Files selected for processing (5)
  • config/litellm_config.yaml (1 hunks)
  • docker-compose.yml (1 hunks)
  • mcp-server/database.py (4 hunks)
  • mcp-server/main.py (1 hunks)
  • rag_pipeline/pre_request_hook.py (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@T-rav
T-rav merged commit d1a162c into main Jun 18, 2025
10 checks passed

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Parameter Mismatch in `async_post_call_success_hook`

The async_post_call_success_hook method's signature was changed to **kwargs. However, it attempts to retrieve the response using kwargs.get('response'), while the LiteLLM framework passes the response object as response_obj. This parameter name mismatch causes the method to return None instead of the actual response, breaking the LiteLLM CustomLogger interface contract and the LLM response pipeline.

rag_pipeline/pre_request_hook.py#L429-L438

async def async_post_call_success_hook(
self,
**kwargs
):
"""Handle tool calls in LLM responses - DISABLED since not using LiteLLM proxy for MCP tools"""
# MCP tool execution disabled - just return the response as-is
response = kwargs.get('response')
logger.debug(f"Post-call hook completed (MCP tool execution disabled)")
return response

Fix in Cursor


BugBot free trial expires on June 19, 2025
You have used $0.00 of your $20.00 spend limit so far. Manage your spend limit in the Cursor dashboard.

Was this report helpful? Give feedback by reacting with 👍 or 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant