Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add timeout middleware for clients #572

Open
wants to merge 10 commits into
base: v1.0
Choose a base branch
from

Conversation

salman1993
Copy link
Collaborator

  • make TransportHandle a generic service so that we can add middlewares like Timeout
  • sadly, i had to revert to make McpClientTrait - or else there was no easy way to create a collection of clients (other option was an enum that brances over the different clients but that's more work)

@salman1993 salman1993 requested review from kalvinnchau and baxen and removed request for kalvinnchau and baxen January 10, 2025 19:58
Copy link

Desktop App for this PR

The following build is available for testing:

The app is signed and notarized for macOS. After downloading, unzip the file and drag the Goose.app to your Applications folder.

This link is provided by nightly.link and will work even if you're not logged into GitHub.

Copy link

Desktop App for this PR

The following build is available for testing:

The app is signed and notarized for macOS. After downloading, unzip the file and drag the Goose.app to your Applications folder.

This link is provided by nightly.link and will work even if you're not logged into GitHub.

Copy link
Collaborator

@kalvinnchau kalvinnchau left a comment

Choose a reason for hiding this comment

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

Verified timeout with a local gdrive-mcp-server that has invalid credentials, on v1.0 goose session hangs indefinitely when waiting for a response.

On this branch it exits out:

( O)> what can you do
◐  Quantifying quantum queries...                                                                                                                                         
Error starting reply stream: Failed a client call to an MCP server

The underlying error isn't clear so I think we should at least update https://github.com/block/goose/blob/v1.0/crates/goose/src/agents/system.rs#L10-L11

To include the error:

#[error("Failed a client call to an MCP server: {0}")]
Client(#[from] ClientError),

To give us the following, which is verbose, but provides some detail:

Error starting reply stream: Failed a client call to an MCP server: Box error: request timed out

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.

2 participants