Proto.ModelClaude AI model identifiers for protocol encoding.
This module provides type-safe model identifiers with JSON encoding/decoding support via Jsont. Use polymorphic variants for known models with a custom escape hatch for future or unknown models.
type t = [ | `Sonnet_4_5claude-sonnet-4-5 - Most recent Sonnet model
*)| `Sonnet_4claude-sonnet-4 - Sonnet 4 model
*)| `Sonnet_3_5claude-sonnet-3-5 - Sonnet 3.5 model
*)| `Opus_4_5claude-opus-4-5 - Most recent Opus model
*)| `Opus_4_1claude-opus-4-1 - Opus 4.1 model
*)| `Opus_4claude-opus-4 - Opus 4 model for complex tasks
*)| `Haiku_4claude-haiku-4 - Fast, cost-effective Haiku model
*)| `Custom of stringCustom model string for future/unknown models
*) ]The type of Claude models.
val to_string : t -> stringto_string t converts a model to its string representation.
Examples:
`Sonnet_4_5 becomes "claude-sonnet-4-5"`Opus_4_5 becomes "claude-opus-4-5"`Opus_4 becomes "claude-opus-4"`Custom "my-model" becomes "my-model"val of_string : string -> tof_string s parses a model string into a typed model.
Known model strings are converted to their typed variants. Unknown strings become `Custom s.
Examples:
`Sonnet_4_5`Custom "future-model"