Inference adapter for OpenAI-compatible APIs.
Handles wire protocol translation:
- Request serialization (messages, tools, provider routing, multimodal content)
- System role demotion at serialization time (profile-driven)
- Response parsing (faithful field mapping)
- Image generation via
/images/generations - Retry on transient HTTP errors (429, 502, 503, 529)
Model-specific normalization (content fallback, XML tool-call extraction)
is handled by Response.Normalizer in the Gateway layer.
Summary
Functions
Serializes content blocks to OpenAI wire format.