Anahata OpenAI

High-fidelity Responses API mapping for the ultimate O-Series integration.

The OpenAI module is engineered to support the latest advancements in OpenAI's ecosystem, supporting models up to GPT-5.5. It integrates with both the standard Chat Completions API and the modern, stateful Responses API.

Dual-Endpoint Strategy

Anahata provides specialized providers for different architectural needs within the OpenAI ecosystem:

Responses API (/v1/responses)

The OpenAiResponsesProvider maps Anahata's context directly into OpenAI's stateful items architecture, ensuring strict referential integrity between messages, reasoning blocks, and tool calls.

Chat Completions (/v1/chat/completions)

The OpenAiChatCompletionsProvider guarantees robust fallback compatibility with standard conversational pipelines and third-party compatible endpoints.

Native Hosted Tools

OpenAI provides powerful server-side tools that we expose natively through the Anahata container via the Responses API.

Web Search

We seamlessly integrate OpenAI's native web_search, allowing the model to browse live data. Results, citations, and entry points are harvested and injected straight into Anahata's GroundingMetadata.

Code Interpreter

Enables secure Python execution within OpenAI's sandbox. The adapter harvests execution logs and generated images, mapping them perfectly to Anahata BlobParts.

Multimodal Harvesting & Encrypted Reasoning

When working with elite reasoning models (up to GPT-5.5), handling "Thinking" is paramount. Our adapter intelligently processes the reasoning blocks, distinguishing between plain-text summaries for verified organizations and encrypted hashes for standard API users.