LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • Agent
  • Middleware
  • Backends
  • Sandboxes
  • Skills
  • Subagents
  • Configuration
  • 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

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

isAnthropicModel

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

Copy
isAnthropicModel(model: string | BaseLanguageModel<any, BaseLanguageModelCallOptions>): boolean

Parameters

NameTypeDescription
model*string | BaseLanguageModel<any, BaseLanguageModelCallOptions>
View source on GitHub