-
Notifications
You must be signed in to change notification settings - Fork 3.3k
No default timeout for requests (unlike TS SDK) #1374
Copy link
Copy link
Open
Labels
P2Moderate issues affecting some users, edge cases, potentially valuable featureModerate issues affecting some users, edge cases, potentially valuable featureenhancementRequest for a new feature that's not currently supportedRequest for a new feature that's not currently supportedimproves sdk consistencyImproves consistency with other SDKs such as TyepscriptImproves consistency with other SDKs such as Tyepscriptready for workEnough information for someone to start working onEnough information for someone to start working on
Metadata
Metadata
Assignees
Labels
P2Moderate issues affecting some users, edge cases, potentially valuable featureModerate issues affecting some users, edge cases, potentially valuable featureenhancementRequest for a new feature that's not currently supportedRequest for a new feature that's not currently supportedimproves sdk consistencyImproves consistency with other SDKs such as TyepscriptImproves consistency with other SDKs such as Tyepscriptready for workEnough information for someone to start working onEnough information for someone to start working on
Initial Checks
Description
Spec states:
Implementations SHOULD establish timeouts for all sent requests, to prevent hung connections and resource exhaustion.The TypeScript SDK does have a default timeout of 60 seconds on requests, and the difference between Python & TypeScript is the crux of modelcontextprotocol/typescript-sdk#245 (which also suggests 60 seconds might not be long enough). Also related, TypeScript has a
resetTimeoutOnProgressoption (defaulting to falst), which would probably be useful if we do introduce a default to the Python SDK.Example Code
Python & MCP Python SDK