I tested on both chat completions api and responses api. This is related only to gpt-4.1-mini.
There you have a minimal reproduction using sdk
const response = await this.openai.responses.create({
model: "gpt-4.1-mini",
input: [
{
type: "message",
role: "developer",
content: [{ type: "input_text", text: "You are a helpful assistant." }],
},
{
type: "message",
role: "user",
content: [{ type: "input_text", text: "What's the status of task #1?" }],
},
],
store: true,
tools: [
{
type: "function",
name: "get_locations",
parameters: zodToJsonSchema(
z.object({}),
),
strict: true,
},
{
type: 'function',
name: "get_weather",
parameters: zodToJsonSchema(
z.object({
location: z.string(),
temperature: z.number(),
}),
),
strict: true,
},
],
text: {
format: {
type: "json_schema",
name: "weather-report",
schema: zodToJsonSchema(
z.object({
items: z.array(z.object({
location: z.string(),
temperature: z.number(),
})),
}),
),
strict: true,
}
}
});