-
Notifications
You must be signed in to change notification settings - Fork 76
Fix #23 Add Hosted MCP server tool support #33
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
Conversation
🦋 Changeset detectedLatest commit: 9779f1c The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
const mcpServerLabel = providerData.serverLabel; | ||
const mcpServerTool = mcpToolMap.get(mcpServerLabel); | ||
if (mcpServerTool !== undefined) { | ||
const toolName = JSON.stringify({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having both server label and tool name is helpful for MCP server usage, so I've included both in JSON format.
0ec80e0
to
4ea61dc
Compare
@dkundel-openai Updated this PR based on the previous review comments. It should be ready for review again |
5239872
to
20c708c
Compare
7fcef85
to
9779f1c
Compare
@@ -88,7 +88,7 @@ describe('Runner.run', () => { | |||
|
|||
const rawItem = { | |||
name: 'toolZ', | |||
call_id: 'c1', | |||
callId: 'c1', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was this just broken or did this change somewhere? I didn't see the related change anywhere else
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is associated with this change. i don't have any strong opinion about the additional validation but it should be good to go: https://github.com/openai/openai-agents-js/pull/33/files#r2139160148
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah this was actually broken. It's always been callId for a function_call
but because in this test it was typed as any
it didn't cause trouble
.filter( | ||
(item) => | ||
item instanceof RunToolApprovalItem && | ||
'callId' in item.rawItem && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dkundel-openai this is the change that is not compatible with run.test.ts's call_id; do you think both callId and call_id should be supported? I don't think so though.
This pull request resolves #23