Skip to content

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.6 alias.
  • Reasoning controls: reasoning.effort, reasoning.mode (Pro mode), and reasoning.context shaping, 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

Current implementation

Native compaction is implemented by:

  • openai_responses_native_compaction.py for API and ChatGPT transports;
  • openai_responses_native_compaction_extension.py for session-history selection, compaction application, and transcript rebuilding;
  • openai_responses_native_compaction_app.py and openai_responses_native_compaction_process.py for 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.