ReqLLM. ToolCallIdCompat
(ReqLLM v1.12.0)
View Source
Tool call ID compatibility helpers for cross-provider conversations.
This module normalizes tool call identifiers for providers with stricter requirements while preserving passthrough behavior for OpenAI-compatible APIs.
Summary
Types
@type mode() :: :passthrough | :sanitize | :strict | :drop
@type policy() :: %{ optional(:mode) => mode(), optional(:invalid_chars_regex) => Regex.t(), optional(:max_length) => pos_integer(), optional(:enforce_turn_boundary) => boolean(), optional(:drop_function_call_ids) => boolean() }
Functions
@spec apply_context( module(), atom(), LLMDB.Model.t() | map(), ReqLLM.Context.t(), keyword() | map() ) :: ReqLLM.Context.t()
@spec apply_context_with_policy( ReqLLM.Context.t(), policy() | keyword(), keyword() | map() ) :: ReqLLM.Context.t()