package chatoyant
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
OCaml-first LLM SDK with Melange-generated JavaScript
Install
dune-project
Dependency
Authors
Maintainers
Sources
chatoyant-v0.12.1.tbz
sha256=72752addb69fe17825f43f5a861f8d0a7817f6a5a711916e722023e10679daff
sha512=d1a62989e34f8b9173d4c53f8e17c611900855df8a139888e73ee509b445ef1e65105c17bb399bf25712a893a251827513f18ed36d0e2b3fcc908fb00584c6f3
doc/CHANGELOG.html
Changelog
All notable changes to this project are documented here. The format follows Keep a Changelog, and the project adheres to Semantic Versioning.
0.12.1 — 2026-07-03
Fixed
- opam lower-bounds: constrain the TLS/crypto/HTTP stack (
tls,tls-eio,x509,ca-certs,mirage-crypto-rngto>= 1.0.0;cohttp-eioandhttpto>= 6.0.0). The native runtime uses the result-returningTls.Config.clientintroduced in tls 1.0, so pre-1.0 versions no longer resolve. - opam sandbox: the Eio HTTP transport test (
test_eio) moves from@runtestto a dedicated@integrationalias. It binds a local socket, which the network-less opam sandbox rejects (bind: EPERM); CI andmake teststill run it viadune build @integration.
0.12.0 — 2026-07-02
Changed
- Rewrote Chatoyant as an OCaml-first SDK. The library now exposes a native Eio API with result-returning calls and
.mlicontracts. The npm package is generated from the OCaml implementation with Melange and bundled with esbuild, and has no runtime npm dependencies. - JavaScript imports move to the package root. The former subpath entry points (
chatoyant/core,chatoyant/schema,chatoyant/tokens,chatoyant/providers/*) are collapsed into root exports and namespace objects. This is a breaking change for JavaScript consumers. - Provider errors are consolidated into
ProviderError. The per-provider error classes and guards (OpenAIError/isOpenAIError,AnthropicError,XAIError,LocalError, ...) are gone; catchProviderErrorand branch on itsproviderfield instead. - Low-level helper exports are removed. The preset lookup tables and helpers (
MODEL_PRESETS,CREATIVITY_PRESETS,REASONING_PRESETSand friends) are no longer exported — themodel: "fast",creativity, andreasoningoptions still resolve exactly as before. The per-provider SSE/accumulator toolkit (parseSSEStream,createAccumulator, ...),chatStreamToWritable/messageStreamToWritable, andbuildHeaders/buildUrlare internal now; use thechatStream*/messageStream*namespace methods. - The TypeScript type vocabulary is rebuilt. Provider wire types and per-call option interfaces from the old package are replaced by a smaller set of provider-neutral types (
GenerationOptions,GenerationResult,Usage,ProviderId, schema/JSON Schema types). Model name unions widen tostring. Some names change:MessageRole→Role,GenerateOptions→GenerationOptions,SchemaConstructor→SchemaClass,InferSchema→InferSchemaInstance/InferSchemaInput.
Added
- Native OCaml provider clients for OpenAI, Anthropic, xAI, OpenRouter, and local OpenAI-compatible servers.
- A standalone Draft 2020-12 JSON Schema parser and validator with OpenAI strict projection and typed OCaml codec generation.
- A
chatoyant.ppxproviding themodule%toolsyntax and[@@deriving chatoyant]codecs.
0.11.1 — 2026-04-15
- Final release of the TypeScript implementation. Earlier changelog history is available in the Git log prior to the OCaml port.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page