The following request does not return (curl
does not produce any output and does not exit), I waited for more than 10 min:
time curl https://api.openai.com/v1/responses -H "Content-Type: application/json" -H "Authorization: Bearer KEY" -d '{"instructions":"Is the person identified by the input an active scientist or FOSS dev?\nAnswer no, if he/she is an obvious science crackpot in his/her field.\nHowever, answer yes, even is he/she is a hobbyist.","input":"User account information:\nGitHub: vporton","model":"gpt-5-nano-2025-08-07","reasoning":null,"tools":[{"type":"web_search"}],"tool_choice":"required","text":{"format":{"type":"json_schema","name":"response","schema":{"type":"object","properties":{"isActiveScientistOrFOSSDev":{"type":"boolean","description":"Whether the person is an active scientist or FOSS developer"},"why":{"type":"string","description":"Explanation of the decision"}},"required":["isActiveScientistOrFOSSDev","why"],"additionalProperties":false},"strict":true},"verbosity":"medium"}}'
Not a bug. A problem with the API call.
- “tool_choice”: “required”, with an internal tool, is going to force the AI model to do nothing but be able to send to tools over and over, without forming a final output.
- gpt-5-nano and gpt-4.1-nano is a terrible model to try, it will go into loops of internal nonstop reasoning or internal tool calling.
- Ask the AI nice questions or you might get a refusal in the output list instead of a JSON.
I got a timeout with max_output_tokens: 5000. Without it, CURL is still going and will probably come up with a million tokens spent.
You need to cut off these tool calls gone crazy with "max_tool_calls": 3,
or so.
Request JSON:
{
"instructions": "Is the person identified by the input an active scientist or FOSS dev?\nAnswer no, if he/she is an obvious science crackpot in his/her field.\nHowever, answer yes, even is he/she is a hobbyist.",
"input": "User account information:\nGitHub: vporton",
"model": "gpt-5-mini-2025-08-07",
"reasoning": {
"effort": "low"
},
"tools": [
{
"type": "web_search"
}
],
"max_tool_calls": 3,
"text": {
"format": {
"type": "json_schema",
"name": "response",
"schema": {
"type": "object",
"properties": {
"isActiveScientistOrFOSSDev": {
"type": "boolean",
"description": "Whether the person is an active scientist or FOSS developer"
},
"why": {
"type": "string",
"description": "Explanation of the decision"
}
},
"required": [
"isActiveScientistOrFOSSDev",
"why"
],
"additionalProperties": false
},
"strict": true
},
"verbosity": "medium"
},
"max_output_tokens": 5000
}
Collected response text:
['{"isActiveScientistOrFOSSDev":true,"why":"The GitHub account \'vporton\' hosts active open-source projects (e.g., forks and repos for blockchain/IC, wrap-tokens, join-proxy, developer-portal fork, NacDB, etc.) and a research-oriented repository (algebraic-general-topology). That indicates ongoing FOSS development and self-published mathematical research. The profile also contains extraordinary personal/scientific claims (P=NP proof, ‘smartest person’ statements and unusual anecdotes) that suggest some fringe or non-standard views, but the presence of numerous maintained repositories and code contributions supports classifying the person as an active FOSS developer and as someone presenting themselves as an active researcher."}']
| ------------------- | ------------------ |
input tokens: 13055 | output tokens: 289 |
---|---|
uncached: 4735 | non-reasoning: 161 |
cached: 8320 | reasoning: 128 |
gpt-5-mini
Response JSON:
Summary
{
"id": "resp_1234",
"object": "response",
"created_at": 1757877941,
"status": "completed",
"background": false,
"error": null,
"incomplete_details": null,
"instructions": "Is the person identified by the input an active scientist or FOSS dev?\nAnswer no, if he/she is an obvious science crackpot in his/her field.\nHowever, answer yes, even is he/she is a hobbyist.",
"max_output_tokens": 5000,
"max_tool_calls": 3,
"model": "gpt-5-mini-2025-08-07",
"output": [
{
"id": "rs_1234",
"type": "reasoning",
"summary": []
},
{
"id": "ws_1234",
"type": "web_search_call",
"status": "completed",
"action": {
"type": "search",
"query": "vporton GitHub"
}
},
{
"id": "rs_1234",
"type": "reasoning",
"summary": []
},
{
"id": "msg_1234",
"type": "message",
"status": "completed",
"content": [
{
"type": "output_text",
"annotations": [],
"logprobs": [],
"text": "{\"isActiveScientistOrFOSSDev\":true,\"why\":\"The GitHub account 'vporton' hosts active open-source projects (e.g., forks and repos for blockchain/IC, wrap-tokens, join-proxy, developer-portal fork, NacDB, etc.) and a research-oriented repository (algebraic-general-topology). That indicates ongoing FOSS development and self-published mathematical research. The profile also contains extraordinary personal/scientific claims (P=NP proof, \u2018smartest person\u2019 statements and unusual anecdotes) that suggest some fringe or non-standard views, but the presence of numerous maintained repositories and code contributions supports classifying the person as an active FOSS developer and as someone presenting themselves as an active researcher.\"}"
}
],
"role": "assistant"
}
],
"parallel_tool_calls": true,
"previous_response_id": null,
"prompt_cache_key": null,
"reasoning": {
"effort": "low",
"summary": null
},
"safety_identifier": null,
"service_tier": "default",
"store": true,
"temperature": 1.0,
"text": {
"format": {
"type": "json_schema",
"description": null,
"name": "response",
"schema": {
"type": "object",
"properties": {
"isActiveScientistOrFOSSDev": {
"type": "boolean",
"description": "Whether the person is an active scientist or FOSS developer"
},
"why": {
"type": "string",
"description": "Explanation of the decision"
}
},
"required": [
"isActiveScientistOrFOSSDev",
"why"
],
"additionalProperties": false
},
"strict": true
},
"verbosity": "medium"
},
"tool_choice": "auto",
"tools": [
{
"type": "web_search",
"filters": null,
"search_context_size": "medium",
"user_location": {
"type": "approximate",
"city": null,
"country": "US",
"region": null,
"timezone": null
}
}
],
"top_logprobs": 0,
"top_p": 1.0,
"truncation": "disabled",
"usage": {
"input_tokens": 13055,
"input_tokens_details": {
"cached_tokens": 8320
},
"output_tokens": 289,
"output_tokens_details": {
"reasoning_tokens": 128
},
"total_tokens": 13344
},
"user": null,
"metadata": {}
}