OpenAI Responses development documentation
This documentation covers implementation and maintenance of the
openai_responses plugin package.
Implementation guides
- Model discovery: API-key and ChatGPT model discovery
precedence, Codex snapshot, last-resort fallback, and the bare
gpt-5.6alias. - Reasoning controls:
reasoning.effort,reasoning.mode(Pro mode), andreasoning.contextshaping, per-model effort sets, silent drops, metadata footers, and Pro mode billing. - Cost estimation: pricing snapshot format, token-bucket splitting, ChatGPT cached-token estimation, and explicit cache boundaries.
- Bundle layout: responsibility split across provider and extensions, implementation classes, and background compaction notification handling.
Specifications
- Native conversation compaction: target behavior, API and ChatGPT protocols, compatibility, and live requirements.
Current implementation
Native compaction is implemented by:
openai_responses_native_compaction.pyfor API and ChatGPT transports;openai_responses_native_compaction_extension.pyfor session-history selection, compaction application, and transcript rebuilding;openai_responses_native_compaction_app.pyandopenai_responses_native_compaction_process.pyfor the background action, cancellation, notifications, and reconciled persistence.
Package tests under tests/ cover transport contracts, session-history
behavior, application-owned background execution, and hosted integration.