package ocaml-ai-sdk

  1. Overview
  2. Docs
OCaml AI SDK - Provider abstraction for AI models

Install

dune-project
 Dependency

Authors

Maintainers

Sources

ocaml-ai-sdk-0.2.tbz
sha256=17063971a74ccd72619a43ecfcb29d28cdf08f90d406a960bd475f65fee1a0d9
sha512=1f3f2d1d7fa4f53843cc1b303cbf9d6dcc85780e7c768ced723f3de83ea897748fa231b48e729216abcc069dee818edc6751a45271541e8a007369bf6e9d23e3

doc/ocaml-ai-sdk.ai_provider_anthropic/Ai_provider_anthropic/Model_catalog/index.html

Module Ai_provider_anthropic.Model_catalogSource

Known Anthropic models with capabilities metadata.

Sourcetype model_capabilities = {
  1. max_output_tokens : int;
  2. supports_thinking : bool;
  3. supports_structured_output : bool;
  4. supports_prompt_caching : bool;
  5. min_cache_tokens : int;
  6. supports_vision : bool;
  7. supports_pdf : bool;
}
Sourcetype known_model =
  1. | Claude_opus_4_6
  2. | Claude_sonnet_4_6
  3. | Claude_haiku_4_5
  4. | Claude_sonnet_4_5
  5. | Claude_opus_4_5
  6. | Claude_opus_4_1
  7. | Claude_sonnet_4
  8. | Claude_opus_4
  9. | Custom of string
Sourceval to_model_id : known_model -> string

Convert a known model to its API model ID string.

Sourceval of_model_id : string -> known_model

Parse a model ID string. Returns Custom for unrecognized models. Accepts both dated versions and aliases.

Get the capabilities of a model. Custom models get conservative defaults.

Sourceval default_max_tokens : known_model -> int

Default max output tokens for a model.