* fix(mcp): only fall back to legacy SSE transport on a 4xx Streamable HTTP error The MCP client caught any Streamable HTTP connection error and immediately retried with the legacy HTTP+SSE transport. For a Streamable-HTTP-only server, a failure unrelated to protocol support (network error, 5xx, or an error after a successful initialize) was masked by a misleading SSE error such as "Non-200 status code (405)", hiding the real root cause. Follow the MCP spec's backwards-compatibility flow: fall back to SSE only when the server rejects the Streamable HTTP request with a 4xx (e.g. 404/405), which signals it does not speak Streamable HTTP. Other errors now surface as-is, and when the SSE fallback also fails both errors are reported. * test(mcp): cover conditional SSE fallback behavior Update the fallback test to use a 4xx StreamableHTTPError and add cases for: non-HTTP errors and 5xx not triggering fallback, and both errors being surfaced when the SSE fallback also fails. * perf: code * perf: code --------- Co-authored-by: archer <545436317@qq.com>
| Name |
Last commit
|
Last Update |
|---|---|---|
| .agents | Loading commit data... | |
| .github | Loading commit data... | |
| .husky | Loading commit data... | |
| .vscode | Loading commit data... | |
| bin | Loading commit data... | |
| deploy | Loading commit data... | |
| document | Loading commit data... | |
| packages | Loading commit data... | |
| pro @ 722e7f70 | ||
| projects | Loading commit data... | |
| scripts | Loading commit data... | |
| sdk | Loading commit data... | |
| test | Loading commit data... | |
| .dockerignore | Loading commit data... | |
| .gitignore | Loading commit data... | |
| .gitmodules | Loading commit data... | |
| .imgbotconfig | Loading commit data... | |
| .npmrc | Loading commit data... | |
| .prettierignore | Loading commit data... | |
| .prettierrc.js | Loading commit data... | |
| AGENTS.md | Loading commit data... | |
| LICENSE | Loading commit data... | |
| Makefile | Loading commit data... | |
| README.md | Loading commit data... | |
| README_en.md | Loading commit data... | |
| README_id.md | Loading commit data... | |
| README_ja.md | Loading commit data... | |
| README_th.md | Loading commit data... | |
| README_vi.md | Loading commit data... | |
| SECURITY.md | Loading commit data... | |
| dev.md | Loading commit data... | |
| eslint.config.mjs | Loading commit data... | |
| lint-staged.config.mjs | Loading commit data... | |
| package.json | Loading commit data... | |
| pnpm-lock.yaml | Loading commit data... | |
| pnpm-workspace.yaml | Loading commit data... | |
| tsconfig.json | Loading commit data... | |
| turbo.json | Loading commit data... | |
| vitest.config.mts | Loading commit data... |