Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions libs/deepagents/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from langchain.agents.middleware.summarization import SummarizationMiddleware
from langchain.agents.middleware.types import AgentMiddleware
from langchain.agents.structured_output import ResponseFormat
from langchain_anthropic import ChatAnthropic
from langchain_anthropic.middleware import AnthropicPromptCachingMiddleware
from langchain_core.language_models import BaseChatModel
from langchain_core.tools import BaseTool
Expand All @@ -25,12 +24,14 @@
BASE_AGENT_PROMPT = "In order to complete the objective that the user asks of you, you have access to a number of standard tools."


def get_default_model() -> ChatAnthropic:
def get_default_model() -> BaseChatModel:
"""Get the default model for deep agents.

Returns:
ChatAnthropic instance configured with Claude Sonnet 4.
BaseChatModel instance configured with Claude Sonnet 4.
"""
from langchain_anthropic import ChatAnthropic

return ChatAnthropic(
model_name="claude-sonnet-4-5-20250929",
max_tokens=20000,
Expand Down