## Summary

An unpinned `pip install` or `npm update` in an AI app often breaks production with `ImportError: cannot import name`, `ModuleNotFoundError: No module named 'langchain.chains'`, or `TypeError: openai.ChatCompletion is no longer supported`. These failures come from major-version rewrites across LangChain (`0.1` -> `0.3+`), OpenAI (`0.x` -> `1.x`), and Anthropic SDKs.

If you want this upgraded cleanly, SazM fixes broken LLM SDK and dependency upgrades for a **fixed $99, delivered within 48 hours**, 100% in writing with zero calls. See our [AI integration services](/ai-integration-services) or [request the $99 fix](/contact?offer=emergency).

## 1. Pin Lockfiles & Separate `langchain-core` / Provider Packages

- Move legacy imports (`langchain.chat_models`, `langchain.llms`) to their split packages (`langchain-openai`, `langchain-anthropic`, `langchain-community`).
- Commit `requirements.txt` / `uv.lock` / `package-lock.json` so a routine deploy never pulls a breaking minor or major bump.

## 2. Migrate Legacy OpenAI `0.x` Calls to `1.x`

- Replace `openai.ChatCompletion.create(...)` with `const client = new OpenAI(); await client.chat.completions.create(...)` (Node) or `client = OpenAI(); client.chat.completions.create(...)` (Python).

## Need It Fixed?

We debug production Python/Node.js LLM integrations, OpenAI/Claude/Gemini API pipelines, and our 5-tool MCP server (`sazm.in/mcp`) for a **fixed $99 within 48 hours**, verified before you pay and 100% async. [Start your $99 fix](/contact?offer=emergency) or explore our [AI integration services](/ai-integration-services).
