My agentic slop goes here. Not intended for anyone else!
1(** Claude AI model identifiers.
2
3 This module provides type-safe model identifiers based on the Python SDK's
4 model strings. Use polymorphic variants for known models with a custom
5 escape hatch for future or unknown models. *)
6
7type t = [
8 | `Sonnet_4_5 (** claude-sonnet-4-5 - Most recent Sonnet model *)
9 | `Sonnet_4 (** claude-sonnet-4 - Sonnet 4 model *)
10 | `Sonnet_3_5 (** claude-sonnet-3-5 - Sonnet 3.5 model *)
11 | `Opus_4 (** claude-opus-4 - Opus 4 model for complex tasks *)
12 | `Haiku_4 (** claude-haiku-4 - Fast, cost-effective Haiku model *)
13 | `Custom of string (** Custom model string for future/unknown models *)
14]
15(** The type of Claude models. *)
16
17val to_string : t -> string
18(** [to_string t] converts a model to its CLI string representation.
19
20 Examples:
21 - [`Sonnet_4_5] becomes "claude-sonnet-4-5"
22 - [`Opus_4] becomes "claude-opus-4"
23 - [`Custom "my-model"] becomes "my-model" *)
24
25val of_string : string -> t
26(** [of_string s] parses a model string into a typed model.
27
28 Known model strings are converted to their typed variants.
29 Unknown strings become [`Custom s].
30
31 Examples:
32 - "claude-sonnet-4-5" becomes [`Sonnet_4_5]
33 - "future-model" becomes [`Custom "future-model"] *)
34
35val pp : Format.formatter -> t -> unit
36(** [pp fmt t] pretty-prints a model identifier. *)