Improve reporting of response.error SSE event

This commit is contained in:
Gabriel Gavilan
2025-11-21 16:33:35 +01:00
parent f098684fc5
commit 45ac30325a
6 changed files with 1001 additions and 0 deletions
@@ -0,0 +1,478 @@
{
"model": "gpt-medium",
"temperature": 0,
"user": "REDACTED",
"messages": [
{
"role": "system",
"content": "REDACTED"
},
{
"role": "user",
"content": "REDACTED"
},
{
"role": "user",
"content": "REDACTED"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "REDACTED",
"description": "REDACTED",
"parameters": {
"type": "object",
"properties": {
"explanation": {
"type": "string",
"description": "REDACTED"
},
"query": {
"type": "string",
"description": "REDACTED"
},
"target_directories": {
"type": "array",
"items": {
"type": "string"
},
"description": "REDACTED"
}
},
"required": [
"explanation",
"query",
"target_directories"
]
}
}
},
{
"type": "function",
"function": {
"name": "REDACTED",
"description": "REDACTED",
"parameters": {
"type": "object",
"properties": {
"command": {
"type": "string",
"description": "REDACTED"
},
"is_background": {
"type": "boolean",
"description": "REDACTED"
},
"explanation": {
"type": "string",
"description": "REDACTED"
}
},
"required": [
"command",
"is_background"
]
}
}
},
{
"type": "function",
"function": {
"name": "REDACTED",
"description": "REDACTED",
"parameters": {
"type": "object",
"properties": {
"pattern": {
"type": "string",
"description": "REDACTED"
},
"path": {
"type": "string",
"description": "REDACTED"
},
"glob": {
"type": "string",
"description": "REDACTED"
},
"output_mode": {
"type": "string",
"description": "REDACTED",
"enum": [
"content",
"files_with_matches",
"count"
]
},
"-B": {
"type": "number",
"description": "REDACTED"
},
"-A": {
"type": "number",
"description": "REDACTED"
},
"-C": {
"type": "number",
"description": "REDACTED"
},
"-i": {
"type": "boolean",
"description": "REDACTED"
},
"type": {
"type": "string",
"description": "REDACTED"
},
"head_limit": {
"type": "number",
"description": "REDACTED"
},
"multiline": {
"type": "boolean",
"description": "REDACTED"
}
},
"required": [
"pattern"
]
}
}
},
{
"type": "function",
"function": {
"name": "REDACTED",
"description": "REDACTED",
"parameters": {
"type": "object",
"properties": {
"target_file": {
"type": "string",
"description": "REDACTED"
},
"explanation": {
"type": "string",
"description": "REDACTED"
}
},
"required": [
"target_file"
]
}
}
},
{
"type": "function",
"function": {
"name": "REDACTED",
"description": "REDACTED",
"parameters": {
"type": "object",
"required": [
"search_term"
],
"properties": {
"search_term": {
"type": "string",
"description": "REDACTED"
},
"explanation": {
"type": "string",
"description": "REDACTED"
}
}
}
}
},
{
"type": "function",
"function": {
"name": "REDACTED",
"description": "REDACTED",
"parameters": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "REDACTED"
},
"knowledge_to_store": {
"type": "string",
"description": "REDACTED"
},
"action": {
"type": "string",
"enum": [
"create",
"update",
"delete"
],
"description": "REDACTED"
},
"existing_knowledge_id": {
"type": "string",
"description": "REDACTED"
}
},
"required": []
}
}
},
{
"type": "function",
"function": {
"name": "REDACTED",
"description": "REDACTED",
"parameters": {
"type": "object",
"properties": {
"paths": {
"description": "REDACTED",
"type": "array",
"items": {
"type": "string"
}
}
},
"required": []
}
}
},
{
"type": "function",
"function": {
"name": "REDACTED",
"description": "REDACTED",
"parameters": {
"type": "object",
"properties": {
"target_notebook": {
"type": "string",
"description": "REDACTED"
},
"cell_idx": {
"type": "number",
"description": "REDACTED"
},
"is_new_cell": {
"type": "boolean",
"description": "REDACTED"
},
"cell_language": {
"type": "string",
"description": "REDACTED"
},
"old_string": {
"type": "string",
"description": "REDACTED"
},
"new_string": {
"type": "string",
"description": "REDACTED"
}
},
"required": [
"target_notebook",
"cell_idx",
"is_new_cell",
"cell_language",
"old_string",
"new_string"
]
}
}
},
{
"type": "function",
"function": {
"name": "REDACTED",
"description": "REDACTED",
"parameters": {
"type": "object",
"properties": {
"merge": {
"type": "boolean",
"description": "REDACTED"
},
"todos": {
"type": "array",
"description": "REDACTED",
"items": {
"type": "object",
"properties": {
"content": {
"type": "string",
"description": "REDACTED",
"maxLength": 70
},
"status": {
"type": "string",
"enum": [
"pending",
"in_progress",
"completed",
"cancelled"
],
"description": "REDACTED"
},
"id": {
"type": "string",
"description": "REDACTED"
}
},
"required": [
"content",
"status",
"id"
]
},
"minItems": 2
}
},
"required": [
"merge",
"todos"
]
}
}
},
{
"type": "function",
"function": {
"name": "REDACTED",
"description": "REDACTED",
"parameters": {
"type": "object",
"properties": {
"target_file": {
"type": "string",
"description": "REDACTED"
},
"instructions": {
"type": "string",
"description": "REDACTED"
},
"code_edit": {
"type": "string",
"description": "REDACTED"
}
},
"required": [
"target_file",
"instructions",
"code_edit"
]
}
}
},
{
"type": "function",
"function": {
"name": "REDACTED",
"description": "REDACTED",
"parameters": {
"type": "object",
"properties": {
"target_file": {
"type": "string",
"description": "REDACTED"
},
"offset": {
"type": "integer",
"description": "REDACTED"
},
"limit": {
"type": "integer",
"description": "REDACTED"
}
},
"required": [
"target_file"
]
}
}
},
{
"type": "function",
"function": {
"name": "REDACTED",
"description": "REDACTED",
"parameters": {
"type": "object",
"properties": {
"target_directory": {
"type": "string",
"description": "REDACTED"
},
"ignore_globs": {
"type": "array",
"items": {
"type": "string"
},
"description": "REDACTED"
}
},
"required": [
"target_directory"
]
}
}
},
{
"type": "function",
"function": {
"name": "REDACTED",
"description": "REDACTED",
"parameters": {
"type": "object",
"properties": {
"target_directory": {
"type": "string",
"description": "REDACTED"
},
"glob_pattern": {
"type": "string",
"description": "REDACTED"
}
},
"required": [
"glob_pattern"
]
}
}
},
{
"type": "function",
"function": {
"name": "REDACTED",
"description": "REDACTED",
"parameters": {
"type": "object",
"properties": {
"mcpServer": {
"type": "string",
"description": "REDACTED"
},
"toolName": {
"type": "string",
"description": "REDACTED"
},
"toolArgs": {
"type": "object",
"description": "REDACTED"
}
},
"required": [
"mcpServer",
"toolName"
]
}
}
}
],
"tool_choice": "auto",
"stream": true
}
@@ -0,0 +1,6 @@
data: {"id":"chatcmpl-KogZjSdcCS0nceNEoJOKpvxP","object":"chat.completion.chunk","created":1763739042,"model":"gpt-medium","choices":[{"index":0,"delta":{"role":"assistant","content":"Azure raised a 'server_error' error with the following message:\n\n\n_**An error occurred while processing your request. You can retry your request, or contact us through an Azure support request at: https://go.microsoft.com/fwlink/?linkid=2213926 if the error persists. Please include the request ID 713be208-602c-456e-b2b9-71f3c793875d in your message.**_\n\n\nThis might be a genuine error on Azure's side and not a problem of Cursor-Azure-GPT-5."},"finish_reason":null}]}
data: {"id":"chatcmpl-KogZjSdcCS0nceNEoJOKpvxP","object":"chat.completion.chunk","created":1763739042,"model":"gpt-medium","choices":[{"index":0,"delta":{},"finish_reason":"stop"}]}
data: [DONE]
@@ -0,0 +1,479 @@
{
"instructions": "REDACTED",
"input": [
{
"role": "user",
"content": [
{
"type": "input_text",
"text": "REDACTED"
}
]
},
{
"role": "user",
"content": [
{
"type": "input_text",
"text": "REDACTED"
}
]
}
],
"model": "gpt-5.1-codex",
"tools": [
{
"type": "function",
"name": "REDACTED",
"description": "REDACTED",
"parameters": {
"type": "object",
"properties": {
"explanation": {
"type": "string",
"description": "REDACTED"
},
"query": {
"type": "string",
"description": "REDACTED"
},
"target_directories": {
"type": "array",
"items": {
"type": "string"
},
"description": "REDACTED"
}
},
"required": [
"explanation",
"query",
"target_directories"
]
},
"strict": false
},
{
"type": "function",
"name": "REDACTED",
"description": "REDACTED",
"parameters": {
"type": "object",
"properties": {
"command": {
"type": "string",
"description": "REDACTED"
},
"is_background": {
"type": "boolean",
"description": "REDACTED"
},
"explanation": {
"type": "string",
"description": "REDACTED"
}
},
"required": [
"command",
"is_background"
]
},
"strict": false
},
{
"type": "function",
"name": "REDACTED",
"description": "REDACTED",
"parameters": {
"type": "object",
"properties": {
"pattern": {
"type": "string",
"description": "REDACTED"
},
"path": {
"type": "string",
"description": "REDACTED"
},
"glob": {
"type": "string",
"description": "REDACTED"
},
"output_mode": {
"type": "string",
"description": "REDACTED",
"enum": [
"content",
"files_with_matches",
"count"
]
},
"-B": {
"type": "number",
"description": "REDACTED"
},
"-A": {
"type": "number",
"description": "REDACTED"
},
"-C": {
"type": "number",
"description": "REDACTED"
},
"-i": {
"type": "boolean",
"description": "REDACTED"
},
"type": {
"type": "string",
"description": "REDACTED"
},
"head_limit": {
"type": "number",
"description": "REDACTED"
},
"multiline": {
"type": "boolean",
"description": "REDACTED"
}
},
"required": [
"pattern"
]
},
"strict": false
},
{
"type": "function",
"name": "REDACTED",
"description": "REDACTED",
"parameters": {
"type": "object",
"properties": {
"target_file": {
"type": "string",
"description": "REDACTED"
},
"explanation": {
"type": "string",
"description": "REDACTED"
}
},
"required": [
"target_file"
]
},
"strict": false
},
{
"type": "function",
"name": "REDACTED",
"description": "REDACTED",
"parameters": {
"type": "object",
"required": [
"search_term"
],
"properties": {
"search_term": {
"type": "string",
"description": "REDACTED"
},
"explanation": {
"type": "string",
"description": "REDACTED"
}
}
},
"strict": false
},
{
"type": "function",
"name": "REDACTED",
"description": "REDACTED",
"parameters": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "REDACTED"
},
"knowledge_to_store": {
"type": "string",
"description": "REDACTED"
},
"action": {
"type": "string",
"enum": [
"create",
"update",
"delete"
],
"description": "REDACTED"
},
"existing_knowledge_id": {
"type": "string",
"description": "REDACTED"
}
},
"required": []
},
"strict": false
},
{
"type": "function",
"name": "REDACTED",
"description": "REDACTED",
"parameters": {
"type": "object",
"properties": {
"paths": {
"description": "REDACTED",
"type": "array",
"items": {
"type": "string"
}
}
},
"required": []
},
"strict": false
},
{
"type": "function",
"name": "REDACTED",
"description": "REDACTED",
"parameters": {
"type": "object",
"properties": {
"target_notebook": {
"type": "string",
"description": "REDACTED"
},
"cell_idx": {
"type": "number",
"description": "REDACTED"
},
"is_new_cell": {
"type": "boolean",
"description": "REDACTED"
},
"cell_language": {
"type": "string",
"description": "REDACTED"
},
"old_string": {
"type": "string",
"description": "REDACTED"
},
"new_string": {
"type": "string",
"description": "REDACTED"
}
},
"required": [
"target_notebook",
"cell_idx",
"is_new_cell",
"cell_language",
"old_string",
"new_string"
]
},
"strict": false
},
{
"type": "function",
"name": "REDACTED",
"description": "REDACTED",
"parameters": {
"type": "object",
"properties": {
"merge": {
"type": "boolean",
"description": "REDACTED"
},
"todos": {
"type": "array",
"description": "REDACTED",
"items": {
"type": "object",
"properties": {
"content": {
"type": "string",
"description": "REDACTED",
"maxLength": 70
},
"status": {
"type": "string",
"enum": [
"pending",
"in_progress",
"completed",
"cancelled"
],
"description": "REDACTED"
},
"id": {
"type": "string",
"description": "REDACTED"
}
},
"required": [
"content",
"status",
"id"
]
},
"minItems": 2
}
},
"required": [
"merge",
"todos"
]
},
"strict": false
},
{
"type": "function",
"name": "REDACTED",
"description": "REDACTED",
"parameters": {
"type": "object",
"properties": {
"target_file": {
"type": "string",
"description": "REDACTED"
},
"instructions": {
"type": "string",
"description": "REDACTED"
},
"code_edit": {
"type": "string",
"description": "REDACTED"
}
},
"required": [
"target_file",
"instructions",
"code_edit"
]
},
"strict": false
},
{
"type": "function",
"name": "REDACTED",
"description": "REDACTED",
"parameters": {
"type": "object",
"properties": {
"target_file": {
"type": "string",
"description": "REDACTED"
},
"offset": {
"type": "integer",
"description": "REDACTED"
},
"limit": {
"type": "integer",
"description": "REDACTED"
}
},
"required": [
"target_file"
]
},
"strict": false
},
{
"type": "function",
"name": "REDACTED",
"description": "REDACTED",
"parameters": {
"type": "object",
"properties": {
"target_directory": {
"type": "string",
"description": "REDACTED"
},
"ignore_globs": {
"type": "array",
"items": {
"type": "string"
},
"description": "REDACTED"
}
},
"required": [
"target_directory"
]
},
"strict": false
},
{
"type": "function",
"name": "REDACTED",
"description": "REDACTED",
"parameters": {
"type": "object",
"properties": {
"target_directory": {
"type": "string",
"description": "REDACTED"
},
"glob_pattern": {
"type": "string",
"description": "REDACTED"
}
},
"required": [
"glob_pattern"
]
},
"strict": false
},
{
"type": "function",
"name": "REDACTED",
"description": "REDACTED",
"parameters": {
"type": "object",
"properties": {
"mcpServer": {
"type": "string",
"description": "REDACTED"
},
"toolName": {
"type": "string",
"description": "REDACTED"
},
"toolArgs": {
"type": "object",
"description": "REDACTED"
}
},
"required": [
"mcpServer",
"toolName"
]
},
"strict": false
}
],
"tool_choice": "auto",
"prompt_cache_key": "REDACTED",
"stream": true,
"reasoning": {
"effort": "medium",
"summary": "detailed"
},
"store": false,
"stream_options": {
"include_obfuscation": false
},
"truncation": "auto"
}
File diff suppressed because one or more lines are too long
+10
View File
@@ -116,3 +116,13 @@ Check "azure_response" for the error details:
If the issue persists, report it to:
\thttps://github.com/gabrii/Cursor-Azure-GPT-5/issues
Including all the details above"""
class TestCompletionError(ReplyBase):
"""Test a successful HTTP request but with a streamed response.error event."""
def modify_settings(self, app) -> None:
"""Set gpt-5.1-codex model, which is currently causing this issue."""
app.config["AZURE_DEPLOYMENT"] = "gpt-5.1-codex"
recording = "response_error"