To give an example of this issue, I managed to replicate it in a basic form in the OpenAI playground.
- Model:
gpt-4.1-mini-2025-04-14 - Variables:
none - Tools:
get_weather(The stock example in playground)
{
"name": "get_weather",
"description": "Determine weather in my location",
"strict": true,
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The city and state e.g. San Francisco, CA"
},
"unit": {
"type": "string",
"enum": [
"c",
"f"
]
}
},
"additionalProperties": false,
"required": [
"location",
"unit"
]
}
}
- Tool choice:
auto - Temp :
1.0
Json Schema, I used the “Generate” button to create this.
{
"name": "weather_variables",
"strict": true,
"schema": {
"type": "object",
"properties": {
"temperature_celsius": {
"type": "number",
"description": "Current air temperature in degrees Celsius."
},
"humidity_percent": {
"type": "number",
"description": "Relative humidity as a percentage (0-100).",
"minimum": 0,
"maximum": 100
},
"wind_speed_kph": {
"type": "number",
"description": "Wind speed in kilometers per hour.",
"minimum": 0
},
"pressure_hpa": {
"type": "number",
"description": "Atmospheric pressure in hectopascals (hPa)."
},
"precipitation_mm": {
"type": "number",
"description": "Precipitation in the past hour in millimeters.",
"minimum": 0
},
"condition": {
"type": "string",
"description": "Textual description of the current weather condition (e.g., clear, cloudy, rain, snow).",
"minLength": 2,
"maxLength": 32
}
},
"required": [
"temperature_celsius",
"humidity_percent",
"wind_speed_kph",
"pressure_hpa",
"precipitation_mm",
"condition"
],
"additionalProperties": false
}
}
Now I gave it a confusing line to process.
- Get me the weather
- Get me the weather in Dorstone
- Get me the pothole weather in dorstone
- I need the pothole weather in dorstone
- but specifically the pothole weather
- get the weather
(Then it just endlessly looped) this repsonse.
{"temperature_celsius":21,"humidity_percent":55,"wind_speed_kph":13,"pressure_hpa":1015,"precipitation_mm":0,"condition":"clear"}
Any ideas? Bug or something to note. Happens with API calling too.
