#Structured Response Error with require_parameters: true in GPT-4.1-mini

14 messages · Page 1 of 1 (latest)

peak swallow
#

Hey team,

openai/gpt-4.1-mini with
providers: { require_parameters: true }
and
response_format: zodResponseFormat(z.object({ tags: z.array(z.string()) }), 'tags')

was working fine, but started throwing errors since today.

If I remove require_parameters, it works, but response is often unstructured.

Expected:
Should return structured data without errors.

did something change on your end? Please check.

#

Error: 404 No endpoints found that can handle the requested parameters. To learn more about provider routing, visit: https://openrouter.ai/docs/provider-routing

brisk cargo
#

We are having the same issues with Claude-Sonnet-4 and Devstral. Surprisingly, Gemini-2.5-Flash is working correctly, which didn't work until today.

peak swallow
#

I had this response_format logic with require_parameters in many places using Gemini and Sonnet OpenAI. I seriously don't know what they changed, but it basically broke our product.

brisk cargo
#

As a temporal solution we are moving al formatting to gemini flash and gemini pro as they seem to be working correctly

peak swallow
#

Thanks, let me test it.

#

But it is unprofessional to change a core feature overnight with no announcements.

brisk cargo
#

I agree

primal geode
#

cc @tight fern

tight fern
#

@peak swallow sorry about the breaking change here. The below query is working for me.

  -H "Authorization: <Api Key>" \
  -d '{
    "model": "openai/gpt-4.1-mini",
    "messages": [
      {"role": "user", "content": "Whats the weather like in Boston, MA?"}
    ],
    "provider": {
      "require_parameters": true,
    },
    "response_format": {
      "type": "json_schema",
      "json_schema": {
        "name": "weather",
        "strict": true,
        "schema": {
          "type": "object",
          "properties": {
            "location": {
              "type": "string",
              "description": "City or location name"
            },
            "temperature": {
              "type": "number",
              "description": "Temperature in Celsius"
            },
            "conditions": {
              "type": "string",
              "description": "Weather conditions description"
            }
          },
          "required": ["location", "temperature", "conditions"],
          "additionalProperties": false
        }
      }
    },
    "usage": {
      "include": true
    }
  }'
lilac hemlock
#

Is it back to working again? I was having this issue too

#

Moved to cohere to get it working as well

tight fern
#

Should be working again! Sorry about the issue here. 😦

lilac hemlock
#

Thanks