Skip to content

isAnthropicLanguageModel

function isAnthropicLanguageModel(model): boolean;

Returns true when the model is an Anthropic Claude model (direct provider, OpenRouter pass-through, or Vertex Anthropic). Used to gate the cache-control wiring — applying it to non-Anthropic providers is a wasted property on the message that other providers ignore but it adds clutter we don’t need to ship.

Parameter Type

model

unknown

boolean