langchain-common-errors

Featured

Diagnose and fix common LangChain errors and exceptions. Use when encountering LangChain import errors, auth failures, output parsing issues, agent loops, or version conflicts. Trigger: "langchain error", "langchain exception", "debug langchain", "langchain not working", "langchain troubleshoot".

AI & Automation 2,266 stars 315 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# LangChain Common Errors ## Overview Quick reference for the most frequent LangChain errors with exact error messages, root causes, and copy-paste fixes. ## Import Errors ### `Cannot find module '@langchain/openai'` ```bash # Provider package not installed npm install @langchain/openai # Also: @langchain/anthropic, @langchain/google-genai, @langchain/community ``` ### `Cannot import name 'ChatOpenAI' from 'langchain'` (Python) ```python # Old import path (pre-0.2). Use provider packages: # OLD: from langchain.chat_models import ChatOpenAI # NEW: from langchain_openai import ChatOpenAI ``` ### `@langchain/core version mismatch` ```bash # All @langchain/* packages must share the same minor version npm ls @langchain/core # Fix: update all together npm install @langchain/core@latest @langchain/openai@latest @langchain/anthropic@latest ``` ## Authentication Errors ### `AuthenticationError: Incorrect API key provided` ```typescript // Key not set or wrong format // Check: console.log("Key present:", !!process.env.OPENAI_API_KEY); console.log("Key prefix:", process.env.OPENAI_API_KEY?.slice(0, 7)); // Should be "sk-..." for OpenAI, "sk-ant-..." for Anthropic // Fix: ensure dotenv is loaded BEFORE imports import "dotenv/config"; import { ChatOpenAI } from "@langchain/openai"; ``` ### `Error: OPENAI_API_KEY is not set` ```typescript // Model constructor can't find the key // Option 1: environment variable process.env.OPENAI_API_KEY = "sk-..."; // Option 2: pass direct...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

langchain-install-auth

Install and configure LangChain SDK with provider authentication. Use when setting up a new LangChain project, configuring API keys for OpenAI/Anthropic/Google, or initializing @langchain/core in Node.js or Python. Trigger: "install langchain", "setup langchain", "langchain auth", "configure langchain API key", "langchain credentials".

2,266 Updated today
jeremylongshore
AI & Automation Featured

langchain-upgrade-migration

Upgrade LangChain SDK versions safely with import path migration, LCEL conversion from legacy chains, and agent API updates. Trigger: "upgrade langchain", "langchain migration", "langchain breaking changes", "update langchain version", "langchain 0.3", "langchain deprecation".

2,266 Updated today
jeremylongshore
AI & Automation Featured

langchain-prod-checklist

Production readiness checklist for LangChain applications. Use when preparing for launch, validating deployment readiness, or auditing existing production LangChain systems. Trigger: "langchain production", "langchain prod ready", "deploy langchain", "langchain launch checklist", "go-live langchain".

2,266 Updated today
jeremylongshore
AI & Automation Featured

langchain-incident-runbook

Incident response procedures for LangChain production issues: provider outages, high error rates, latency spikes, and cost overruns. Trigger: "langchain incident", "langchain outage", "langchain production issue", "langchain emergency", "langchain down", "LLM provider outage".

2,266 Updated today
jeremylongshore
AI & Automation Featured

langchain

Framework for building LLM-powered applications with agents, chains, and RAG. Supports multiple providers (OpenAI, Anthropic, Google), 500+ integrations, ReAct agents, tool calling, memory management, and vector store retrieval. Use for building chatbots, question-answering systems, autonomous agents, or RAG applications. Best for rapid prototyping and production deployments.

27,681 Updated today
davila7