openai/harmony
72.3
Strong · 14 November 2026
5.9k
lines of production code
Rust
with TypeScript, Python
5
measurements over time
What this system is
This system is a Rust-based library, exposed via Python and WebAssembly bindings, that handles the encoding, parsing, and rendering of AI conversation messages. It provides strict control over token generation and message structure, including support for function tools and special content types. The project also includes a Next.js demo application and comprehensive testing infrastructure to ensure cross-language consistency.
Behavioural changes
Enhanced message rendering and parsing strictness in HarmonyEncoding
The HarmonyEncoding class now supports passing RenderOptions to the render method, allowing users to explicitly control whether the conversation includes function tools, which affects token generation. Additionally, the parse\_messages\_from\_completion\_tokens method and the StreamableParser now accept a strict mode parameter to control parsing behavior, and the StreamableParser includes a new process\_eos method for handling end-of-stream signals. The DeveloperContent class has also been added to the public API exports.
openai-harmony · high confidence
Fixes
Added utility function for class merging in the demo
The demo application now includes a \cn\ utility function in \src/lib/utils.ts\ that combines \clsx\ and \tailwind-merge\ to safely merge Tailwind CSS classes, resolving issues with the previous shadcn utils implementation.
demo/harmony-demo · high confidence
Fixes concurrent rendering safety and adds strict parsing options
The \HarmonyEncoding\ struct no longer uses a shared \Arc\<AtomicBool\>\ for tracking function tools, removing a concurrency hazard and allowing the encoding to be used safely across multiple threads. Rendering methods now accept an explicit \RenderOptions\ struct to pass context, and the message parser exposes a \ParseOptions\ struct with a \strict\ flag (defaulting to true) to control parsing behavior. These options are exposed in both the Python and WebAssembly bindings, allowing users to configure strictness and render context directly from their host applications.
src · high confidence
Test coverage
Added Python test runner and updated documentation; Added tests for constrain token handling and standardized test file encoding.
Dependencies
Library version bump and demo dependency updates
The openai-harmony library has been updated to version 0.0.8, with its Cargo.toml manifest adding a description and enabling the abi3-py38 feature for the optional pyo3 Python binding. The demo application's Next.js dependency has been upgraded from 15.4.4 to 15.4.10, and the Python project configuration now includes a description, readme reference, and pytest test path settings.
(dependencies) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 74 → 72 (-2.1)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.
Lenses
- Code Health 92 → 88 (-4.2)
- Architecture 98 → 98 (-0.5)
- Maturity 66 → 66 (+0.0)
- Readiness 71 → 64 (-6.9)
- Security 89 → 94 (+4.8)
- Performance 100 → 100 (+0.0)
Resolved (1)
- Medium vulnerability: [GHSA redacted] (Cargo.lock)
New (17)
- Edited copies of one member (3 members, 22+ corresponding lines) (src/wasm_module.rs)
- Edited copies of one member (4 members, 21+ corresponding lines) (src/py_module.rs)
- Edited copy of a member (12 corresponding lines) (src/py_module.rs)
- Edited copy of a member (13 corresponding lines) (src/encoding.rs)
- Edited copy of a member (19 corresponding lines) (src/py_module.rs)
- Edited copy of a member (38 corresponding lines) (src/registry.rs)
- Edited copy of a member (6 corresponding lines) (src/py_module.rs)
- Edited copy of a member (6 corresponding lines) (src/py_module.rs)
- Edited copy of a member (6 corresponding lines) (src/py_module.rs)
- Low coverage: src/chat.rs (src/chat.rs)
- Low coverage: src/encoding.rs (src/encoding.rs)
- Low coverage: src/lib.rs (src/lib.rs)
- Low coverage: src/registry.rs (src/registry.rs)
- Low coverage: src/tiktoken.rs (src/tiktoken.rs)
- Low coverage: src/tiktoken_ext/public_encodings.rs (src/tiktoken_ext/public_encodings.rs)
- Medium advisory (unmaintained): RUSTSEC-2026-0441 (Cargo.lock)
- Medium vulnerability: RUSTSEC-2026-0538 (Cargo.lock)
Architecture
- Unchanged — 0 containers · 1 contexts · 0 edges
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
openai/harmony was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 14 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit abd677f7ac962629c808197caa1feb9e3e95d2b0 — the exact code this score is about.
- Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-3c33c1882dc1.