-
-
Notifications
You must be signed in to change notification settings - Fork 630
fix(OpenAI): augment support for Response API - MCP Connectors #654
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Connector Sample
Error sample - appears to just return a regular structured OpenAI error |
{
"id": "resp_68a9a190f694819f83fab13668831b990dc2c249e6fcf322",
"object": "response",
"created_at": 1755947409,
"status": "completed",
"background": false,
"error": null,
"incomplete_details": null,
"instructions": null,
"max_output_tokens": null,
"max_tool_calls": null,
"model": "gpt-5-2025-08-07",
"output": [
{
"id": "mcpl_68a9a19112dc819f8b4e923b4641db250dc2c249e6fcf322",
"type": "mcp_list_tools",
"server_label": "Dropbox",
"tools": [
{
"annotations": {
"read_only": true
},
"description": "Fetches a file by path.If `download_raw_file` is set to True, the file will be downloaded as a raw file. Otherwise, the file will be displayed as text.",
"input_schema": {
"properties": {
"path": {
"title": "Path",
"type": "string"
},
"download_raw_file": {
"default": false,
"title": "Download Raw File",
"type": "boolean"
}
},
"required": [
"path"
],
"title": "fetch_input",
"type": "object"
},
"name": "fetch"
},
{
"annotations": {
"read_only": true
},
"description": "Fetch a file from Dropbox given its path. If `download_raw_file` is set to True, the file will be downloaded as a raw file. Otherwise, the file will be displayed as text.",
"input_schema": {
"properties": {
"path": {
"title": "Path",
"type": "string"
},
"download_raw_file": {
"default": false,
"title": "Download Raw File",
"type": "boolean"
}
},
"required": [
"path"
],
"title": "fetch_file_input",
"type": "object"
},
"name": "fetch_file"
},
{
"annotations": {
"read_only": true
},
"description": "Retrieve the Dropbox profile for the current user.",
"input_schema": {
"properties": {},
"title": "get_profile_input",
"type": "object"
},
"name": "get_profile"
},
{
"annotations": {
"read_only": true
},
"description": "Return the most recently modified files accessible to the user.",
"input_schema": {
"properties": {
"topk": {
"title": "Topk",
"type": "integer"
}
},
"required": [
"topk"
],
"title": "list_recent_files_input",
"type": "object"
},
"name": "list_recent_files"
},
{
"annotations": {
"read_only": true
},
"description": "Searches Dropbox for files matching a query. Queries work best with short filenames or concise phrases such as ``\"budget.csv\"`` or ``\"Q1 meeting notes\"``. ``recency_days`` is currently ignored.",
"input_schema": {
"properties": {
"query": {
"title": "Query",
"type": "string"
},
"topn": {
"default": 5,
"title": "Topn",
"type": "integer"
},
"recency_days": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Recency Days"
}
},
"required": [
"query"
],
"title": "search_input",
"type": "object"
},
"name": "search"
},
{
"annotations": {
"read_only": true
},
"description": "Search Dropbox files and return matching results. Queries work best with short filenames or concise phrases such as ``\"budget.csv\"`` or ``\"Q1 meeting notes\"``. ``recency_days`` is currently ignored.",
"input_schema": {
"properties": {
"query": {
"title": "Query",
"type": "string"
},
"topn": {
"default": 5,
"title": "Topn",
"type": "integer"
},
"recency_days": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Recency Days"
},
"filter_file_extensions": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Filter File Extensions"
}
},
"required": [
"query"
],
"title": "search_files_input",
"type": "object"
},
"name": "search_files"
}
]
},
{
"id": "rs_68a9a191b888819fbeda4509cceca3920dc2c249e6fcf322",
"type": "reasoning",
"summary": []
},
{
"id": "mcp_68a9a196db04819f86810859684ab11a0dc2c249e6fcf322",
"type": "mcp_call",
"approval_request_id": null,
"arguments": "{\"topk\":50}",
"error": {
"type": "http_error",
"code": 401,
"message": "An unknown error occurred while executing the tool."
},
"name": "list_recent_files",
"output": null,
"server_label": "Dropbox"
},
{
"id": "rs_68a9a19767f0819f83461056d88646f40dc2c249e6fcf322",
"type": "reasoning",
"summary": []
},
{
"id": "mcp_68a9a198dc38819f833426f045d82ee40dc2c249e6fcf322",
"type": "mcp_call",
"approval_request_id": null,
"arguments": "{\"query\":\"draft\",\"topn\":25,\"recency_days\":null,\"filter_file_extensions\":[\"pptx\",\"ppt\",\"key\",\"odp\",\"pdf\"]}",
"error": {
"type": "http_error",
"code": 401,
"message": "An unknown error occurred while executing the tool."
},
"name": "search_files",
"output": null,
"server_label": "Dropbox"
},
{
"id": "rs_68a9a199760c819fbee7cd33dfb77f120dc2c249e6fcf322",
"type": "reasoning",
"summary": []
},
{
"id": "msg_68a9a19c8344819f97fa1e911ee70bec0dc2c249e6fcf322",
"type": "message",
"status": "completed",
"content": [
{
"type": "output_text",
"annotations": [],
"logprobs": [],
"text": "I tried to check your Dropbox for slide decks but couldn\u2019t access it due to an authorization error. If you connect Dropbox, I can scan for in\u2011progress decks (e.g., recent .pptx/.key/.odp files with names like \u201cdraft,\u201d \u201cWIP,\u201d \u201cv0,\u201d etc., or in folders like Drafts/In Progress) and list them.Would you like me to try again after reconnecting Dropbox, or should I look in another location (Google Drive, OneDrive, local)? If you prefer to search manually, filter for:- File types: pptx, ppt, key, odp- Name keywords: draft, wip, in progress, v0, v1, review, temp- Modified in the last 60\u201390 daysTell me where to look and I\u2019ll pull the list."
}
],
"role": "assistant"
}
],
"parallel_tool_calls": true,
"previous_response_id": null,
"prompt_cache_key": null,
"reasoning": {
"effort": "medium",
"summary": null
},
"safety_identifier": null,
"service_tier": "auto",
"store": true,
"temperature": 1.0,
"text": {
"format": {
"type": "text"
},
"verbosity": "medium"
},
"tool_choice": "auto",
"tools": [
{
"type": "mcp",
"allowed_tools": null,
"authorization": "<redacted>",
"connector_id": "connector_dropbox",
"headers": null,
"require_approval": "never",
"server_description": null,
"server_label": "Dropbox",
"server_url": null
}
],
"top_logprobs": 0,
"top_p": 1.0,
"truncation": "disabled",
"usage": {
"input_tokens": 2764,
"input_tokens_details": {
"cached_tokens": 1280
},
"output_tokens": 956,
"output_tokens_details": {
"reasoning_tokens": 704
},
"total_tokens": 3720
},
"user": null,
"metadata": {}
} Full raw sample of Dropbox (no auth) Connector |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What:
Description:
Adds support for MCP Connectors (Official MCP Servers). While on that journey I kept having crashes due to the
error
property swapping between 3 things (null, string or a json-array). So I've added support for that as well by turning the Response API exception class to be generic for any endpoint to leverage.Related:
fixes: #653 (connector), closes: #619 (error mcp handling)