OpenAI Harmony is OpenAI’s official renderer and guide for the Harmony response format, the conversation format that the open-weight gpt-oss models were trained on. The repository has earned more than 4,500 stars on GitHub and was updated in 2026.
The gpt-oss models expect prompts and outputs in the Harmony format, which defines conversation structure, separates reasoning into its own channel, structures function and tool calls, and supports a clear instruction hierarchy with structured outputs. If you run gpt-oss through an API or a provider such as Hugging Face, Ollama or vLLM, the format is handled for you; but if you are building your own inference solution, the model should not be used without it. This repository provides the renderer that converts conversations into correctly formatted input, together with a detailed guide that walks through channels, tool namespaces and preambles for anyone implementing Harmony support in their own stack.
The format’s design deliberately mirrors the OpenAI Responses API, so developers familiar with that API will recognise its message structure immediately. The accompanying guide explains how the reasoning, commentary and final-answer channels interact, how tool namespaces are declared for function calling, and how the instruction hierarchy decides which messages take precedence when instructions conflict. Getting these details right matters, because the gpt-oss models were trained against exactly this structure and behave noticeably worse when prompts are formatted any other way.
OpenAI Harmony is free and open source under the Apache-2.0 license. The renderer and documentation are available on GitHub at no cost, alongside the open-weight gpt-oss models themselves.
Harmony is for developers and inference engineers working directly with gpt-oss models outside hosted APIs: teams building serving stacks, fine-tuning pipelines or local deployments who need byte-correct formatting of prompts, reasoning channels and tool calls for OpenAI’s open-weight models.