Harmony is a structured output format specific to GPT-OSS, and its main roles include:
- Dual Channel Outputs: Split the model response into
analysis
(reasoning process) andfinal
(Final Answer) Two channels for easy debugging and result extraction - Standardized Interaction: Ensures consistency of API responses, especially for intelligent body workflow development
- Mandatory safety mechanisms: The model must be coded with the Harmony library to work properly!
The developer must use theopenai_harmony
library parsing output, the typical process is: load encoder → build dialog → render Token. note: if the Harmony format specification is not followed, the model will not be able to generate valid output; it is also recommended that end-users are only presented with thefinal
Channel Content.
This answer comes from the articleGPT-OSS: OpenAI's Open Source Big Model for Efficient ReasoningThe