Skip to content

OpenAI reasoning #182

Description

@AnthonyRonning

OpenAI-compatible reasoning models like GPT‑OSS do separate out reasoning text from the final “delta content” answer in the API response.

Here’s how it works:
• GPT‑OSS (20B and 120B) produces explicit chain-of-thought (CoT) output that’s sent in a dedicated reasoning channel. The actual answer content is separately delivered in the content property .
• In streaming mode, these models emit reasoning prose incrementally via events such as response.reasoning_text.delta, and signal completion with response.reasoning_text.done. This ensures the reasoning log is traceable and separable from the final output .
• The final channel only shows the final answer. Developers can configure whether to exclude the reasoning entirely (e.g. setting reasoning: { exclude: true }) if they want a clean, concise response .

This architecture is part of OpenAI’s Harmony response format, supported when using the OpenAI-compatible Responses API. It is specifically designed to keep the reasoning trace and output message as separate structured items — making it easier to interpret, audit, or hide the reasoning path if needed .

⸻

🧠 Summary table

Feature GPT‑OSS Behavior
Reasoning Text / CoT Provided in a separate reasoning channel
Final Answer Content Delivered purely in the content property
Streaming Support Yes — via response.reasoning_text.delta and …done events
Exclude Reasoning Option Yes — can disable reasoning output explicitly

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions