LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • Agent
  • Middleware
  • Backends
  • Sandboxes
  • Skills
  • Subagents
  • Types
Modal
Daytona
Deno
Node VFS
Sandbox Standard Tests
  • Vitest
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

OverviewAgentMiddlewareBackendsSandboxesSkillsSubagentsTypes
Modal
Daytona
Deno
Node VFS
Sandbox Standard Tests
Vitest
Language
Theme
JavaScriptdeepagentsagentisAnthropicModel
Function●Since v1.8

isAnthropicModel

Copy
isAnthropicModel(model: string | BaseLanguageModel<any, BaseLanguageModelCallOptions>): boolean
View source on GitHub

Parameters

NameTypeDescription
model*string | BaseLanguageModel<any, BaseLanguageModelCallOptions>

Detect whether a model is an Anthropic model. Used to gate Anthropic-specific prompt caching optimizations (cache_control breakpoints).