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.6.2.tbz
sha256=637f60398f673dfb2e661f6ed7da169b823a870d27b48e729d5b9200e46a52b2
sha512=5aec259473395025edb6689b544e57e821cfbef9352987f95eb2182034979ce898040e06e60a9d89a40a187b77fb5b1b7183c7ec4264da9d9a834864860a5fed

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 disabled_thinking_support =
  1. | Allowed
  2. | Up_to_high
  3. | Unsupported
Sourcetype thinking_capabilities = {
  1. manual : bool;
  2. adaptive : bool;
  3. defaults_to_adaptive : bool;
  4. disabled : disabled_thinking_support;
  5. effort_levels : Effort.t list;
  6. display_default : Thinking.display option;
}
Sourcetype model_capabilities = {
  1. max_output_tokens : int;
  2. thinking : thinking_capabilities option;
  3. rejects_sampling_parameters : bool;
  4. supports_structured_output : bool;
  5. supports_prompt_caching : bool;
  6. min_cache_tokens : int;
  7. supports_vision : bool;
  8. supports_pdf : bool;
}
Sourcetype known_model =
  1. | Claude_fable_5
  2. | Claude_mythos_5
  3. | Claude_opus_5
  4. | Claude_opus_4_8
  5. | Claude_sonnet_5
  6. | Claude_haiku_4_5
  7. | 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.

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.