-
Notifications
You must be signed in to change notification settings - Fork 528
[mcp-client] Allow arbitrary endpoint via URL (in both McpClient and Agent) #1396
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
Changes from 4 commits
b2f0461
acd7444
f40e1f9
21ae7c7
a623bb7
19468c5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,18 +49,28 @@ export class Agent extends McpClient { | |
|
||
constructor({ | ||
provider, | ||
baseUrl, | ||
model, | ||
apiKey, | ||
servers, | ||
prompt, | ||
}: { | ||
provider: InferenceProvider; | ||
}: ( | ||
| { | ||
provider: InferenceProvider; | ||
baseUrl?: undefined; | ||
} | ||
| { | ||
baseUrl: string; | ||
provider?: undefined; | ||
} | ||
) & { | ||
model: string; | ||
apiKey: string; | ||
servers: StdioServerParameters[]; | ||
prompt?: string; | ||
}) { | ||
super({ provider, model, apiKey }); | ||
super(provider ? { provider, baseUrl, model, apiKey } : { provider, baseUrl, model, apiKey }); | ||
/// ^This shenanigan is just here to please an overzealous TS type-checker. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🫠 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. cc @coyotte508 if he has an idea to "fix" (in a later PR?) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I also had to write something like this in #1322 I think (before the force-push) |
||
this.servers = servers; | ||
this.messages = [ | ||
{ | ||
|
Uh oh!
There was an error while loading. Please reload this page.