What Model are you using?
Description
Hi Instructor team, thanks for the great library.
OpenAI is recommending migration from Chat Completions to the Responses API (https://developers.openai.com/api/docs/guides/migrate-to-responses) , so we moved our production pipeline accordingly. During that migration, we found a reliability issue in RESPONSES_TOOLS mode.
Environment:
instructor==1.14.4
- OpenAI Python SDK
1.x
- Azure OpenAI
- Python
3.11
- Model:
gpt-5-nano
Context:
- With Chat Completions + Instructor, our Pydantic extraction flow was stable.
- We migrated because OpenAI guidance suggests using Responses API going forward.
- In Responses API mode, we now see intermittent empty tool arguments (
{}), which causes validation failures.
What we are sending:
mode=instructor.Mode.RESPONSES_TOOLS
response_model=ResponseModel (Pydantic)
text.format set to json_schema (strict true/false depending on schema compatibility)
Observed behavior:
- Response includes both:
- forced function tool call for ResponseModel
- text config present
- But generation often returns tool call
arguments='{}'
- Instructor then fails Pydantic validation (required fields missing)
- This appears more often when reasoning tokens are low
Representative failure:
ResponseFunctionToolCall(arguments='{}', name='ResponseModel', ...)
- Validation error similar to:
- 1 validation error for ResponseModel
- required top-level field missing (example: data)
Expected behavior:
- If
text.format is provided, either:
1. it is honored consistently, or
2. Instructor rejects this combination with a clear error/warning.
- In
RESPONSES_TOOLS, required schema fields should not degrade into empty {} tool args.
- Migration path from Chat Completions to Responses should preserve structured extraction reliability.
Why this matters:
- OpenAI recommends Responses API over Chat Completions, but current behavior makes migration risky for schema-driven extraction pipelines.
- We can’t reliably depend on required structured output if tool args can collapse to
{}.
- The constan retries make the requests too expensive.
Request / possible improvements:
- Add a Responses mode that uses
text.format as the primary structured output path (no forced function call).
- In
RESPONSES_TOOLS, harden schema/tool argument enforcement to prevent empty {} when required fields exist.
- Add explicit conflict handling for
text.format + RESPONSES_TOOLS (document precedence and/or fail fast).
- Add retry heuristic for empty tool args when response_model has required fields.
What Model are you using?
Description
Hi Instructor team, thanks for the great library.
OpenAI is recommending migration from Chat Completions to the Responses API (https://developers.openai.com/api/docs/guides/migrate-to-responses) , so we moved our production pipeline accordingly. During that migration, we found a reliability issue in
RESPONSES_TOOLSmode.Environment:
instructor==1.14.41.x3.11gpt-5-nanoContext:
{}), which causes validation failures.What we are sending:
mode=instructor.Mode.RESPONSES_TOOLSresponse_model=ResponseModel(Pydantic)text.formatset tojson_schema(strict true/false depending on schema compatibility)Observed behavior:
- forced function tool call for
ResponseModel-
textconfig presentarguments='{}'Representative failure:
ResponseFunctionToolCall(arguments='{}', name='ResponseModel', ...)-
1 validation error for ResponseModel- required top-level field missing (example:
data)Expected behavior:
text.formatis provided, either:1. it is honored consistently, or
2. Instructor rejects this combination with a clear error/warning.
RESPONSES_TOOLS, required schema fields should not degrade into empty{}tool args.Why this matters:
{}.Request / possible improvements:
text.formatas the primary structured output path (no forced function call).RESPONSES_TOOLS, harden schema/tool argument enforcement to prevent empty{}when required fields exist.text.format+RESPONSES_TOOLS(document precedence and/or fail fast).