mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-20 10:20:15 +01:00
🔁 feat: Allow "http" as Alias for "streamable-http" in MCP Options (#8624)
- Updated StreamableHTTPOptionsSchema to accept "http" alongside "streamable-http". - Enhanced isStreamableHTTPOptions function to handle both types and validate URLs accordingly. - Added tests to ensure correct processing of "http" type options and rejection of websocket URLs.
This commit is contained in:
parent
a01536ddb7
commit
365e3bca95
3 changed files with 65 additions and 4 deletions
|
|
@ -125,7 +125,7 @@ export const SSEOptionsSchema = BaseOptionsSchema.extend({
|
|||
});
|
||||
|
||||
export const StreamableHTTPOptionsSchema = BaseOptionsSchema.extend({
|
||||
type: z.literal('streamable-http'),
|
||||
type: z.union([z.literal('streamable-http'), z.literal('http')]),
|
||||
headers: z.record(z.string(), z.string()).optional(),
|
||||
url: z
|
||||
.string()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue