langchain - 💡(How to fix) Fix docs(core): refresh stale Anthropic model IDs in example docstrings

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
RAW_BUFFERClick to expand / collapse

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?

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

langchain - 💡(How to fix) Fix docs(core): refresh stale Anthropic model IDs in example docstrings