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.1.tbz
sha256=cb3b82428abcda76c02ec92f8103a4db28edf3f42795794a37135e9a3c40af96
sha512=11be8889ee25bee67b2be00553c42a4692bc73e5ce23985e8bb87f8a07e9d8f556b5a63b219fe5fe30366c8b0d4edae494afa80ccfbfcb112f1fa1e458de55bf

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.