[GH-ISSUE #4071] [langchain]: refresh stale Anthropic model IDs in example docstrings #2779

Open
opened 2026-06-05 17:26:45 -04:00 by yindo · 0 comments
Owner

Originally created by @zhang-liz on GitHub (May 19, 2026).
Original GitHub issue: https://github.com/langchain-ai/docs/issues/4071

Type of issue

issue / bug

Language

Python

Description

The langchain-core package has two public docstrings whose Example:
blocks reference deprecated Anthropic model identifiers, which contradicts
the contributor guideline that example snippets should reference current
GA models ("Outdated model names signal stale code and confuse users.").

Affected:

RunnableWithMessageHistory (langchain_core/runnables/history.py) — two
occurrences of ChatAnthropic(model="claude-2") in the class docstring
examples.
FewShotChatMessagePromptTemplate (langchain_core/prompts/few_shot.py) —
one occurrence of ChatAnthropic(model="claude-3-haiku-20240307") in the
class docstring example.
Proposed fix: bump to claude-sonnet-4-6 and claude-haiku-4-5
respectively (docstring Example: blocks only — no code defaults change,
non-breaking).

Happy to send a small PR. Could a maintainer assign me?

Originally created by @zhang-liz on GitHub (May 19, 2026). Original GitHub issue: https://github.com/langchain-ai/docs/issues/4071 ### Type of issue issue / bug ### Language Python ### Description The langchain-core package has two public docstrings whose Example: blocks reference deprecated Anthropic model identifiers, which contradicts the contributor guideline that example snippets should reference current GA models ("Outdated model names signal stale code and confuse users."). Affected: RunnableWithMessageHistory (langchain_core/runnables/history.py) — two occurrences of ChatAnthropic(model="claude-2") in the class docstring examples. FewShotChatMessagePromptTemplate (langchain_core/prompts/few_shot.py) — one occurrence of ChatAnthropic(model="claude-3-haiku-20240307") in the class docstring example. Proposed fix: bump to claude-sonnet-4-6 and claude-haiku-4-5 respectively (docstring Example: blocks only — no code defaults change, non-breaking). Happy to send a small PR. Could a maintainer assign me?
yindo added the langchainexternal labels 2026-06-05 17:26:45 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/docs#2779