v0.9.0 — OpenAI standard response_format on /openai/v1/chat/completions
Support OpenAI's standard `response_format` body field — stock SDKs
(LangChain, official openai-python, LlamaIndex, etc.) now drive
schema-validated JSON without our custom header.
response_format=text → no schema (default)
response_format=json_object → permissive — forces parseable JSON
response_format=json_schema → uses .json_schema.schema dict as
the constraint (OpenAI structured
outputs shape)
Failure semantics identical to v0.8.x header path:
success → canonical JSON in message.content
exhaustion → 422 with validation error
agent crash → 500 with exit code + stderr
stream=true → 400
Body field wins if both body and x-aicodebox-json-schema header are
set (OAI standard). INFO log on conflict. Header stays supported as
a fallback.
Entry log: has_schema=<bool> → schema_via=<source> where source is
response_format.json_schema, response_format.json_object,
x-aicodebox-json-schema, or none.
The old 400 on response_format=json_object is removed — callers
relying on it for control flow must update.
158 tests pass (151 from v0.8.3 + 7 new in test_oai_schema.py
covering both standard paths, precedence, malformed shapes, and the
streaming guard).
Migration: fully additive for new callers. Stock OpenAI SDKs work
with schema enforcement out of the box. Existing header-using
callers unchanged.