Closed
Description
Due to OpenAI, Windsurf and Gemini all handling JSON schemas in a conflicting manner, we need to remove commenting from create_pull_request_review
. The LLM should still be able to leave comments on PRs using add_pull_request_review_comment
. More info on modelcontextprotocol/modelcontextprotocol/issues/410.
Activity
williammartin commentedon Apr 25, 2025
To do this we're going to need to adjust
add_pull_request_review_comment
to use the GraphQL API, because the REST API doesn't allow you to add new comments to an existing review: microsoft/vscode-pull-request-github#908 (comment)williammartin commentedon Apr 25, 2025
I have a branch now that implements most of this in an MVP manner: 1e9fbbc
Here's the results of the e2e test running:
All that said, if we move to GQL, we might still be able to expose adding threads and submission in one flow since the types might be different. Haven't explored it yet.
MrOrz commentedon Apr 27, 2025
For those who encountering argument schema type issue when connecting Github MCP with OpenAI / Gemini Github: pin docker image's version to v0.1.1 helps.
Tried out v0.2.0 and v0.2.1, both have errors:
OpenAIException - Invalid schema for function 'create_pull_request_review': 'STRING' is not valid under any of the given schemas.
{'error': {'code': 400, 'message': 'Unable to submit request because
create_pull_request_reviewfunctionDeclaration
parameters.comments.sideschema specified other fields alongside any_of. When using any_of, it must be the only field set. Learn more: https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/function-calling', 'status': 'INVALID_ARGUMENT'}}