Registry / ai-ml / langchain-upstage

langchain-upstage

JSON →
library0.7.7pypypi✓ verified 84d ago

An integration package connecting Upstage (including Solar LLM, OCR, and layout analysis) with LangChain. Current version 0.7.7, requires Python >=3.10. Released under the langchain-ai organization with a cadence that follows LangChain integration updates.

pip install langchain-upstage
INSTALL
IMPORT
SIG · LANGCHAIN-UPSTAGE
L
langchain-upstage
ai-mlpythonv0.7.7
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ChatUpstage
from langchain_upstage import ChatUpstage
from langchain_upstage.chat_models import ChatUpstage
In early versions, the import might have been from chat_models submodule. Current recommended import is from top-level package.
UpstageLayoutAnalysis
from langchain_upstage import UpstageLayoutAnalysis
from langchain_upstage.layout_analysis import UpstageLayoutAnalysis
Similarly, layout analysis is exposed at the package root.

Initialize ChatUpstage with an API key set as environment variable and invoke a simple message.

import os from langchain_upstage import ChatUpstage os.environ['UPSTAGE_API_KEY'] = '' llm = ChatUpstage() response = llm.invoke("Hello, how are you?") print(response.content)
Debug
Known issues
breakingRequires Python >=3.10. Using older Python versions will fail on install.
fix
Upgrade Python to 3.10 or newer.
affects: 0.7.x
gotchaThe Upstage API key must be set via the UPSTAGE_API_KEY environment variable. Passing as a parameter to ChatUpstage(api_key=...) is not supported in some versions.
fix
Set environment variable: export UPSTAGE_API_KEY='your_key'
affects: 0.x
deprecatedThe ChatUpstage model parameter 'model' may be deprecated in favor of 'model_name'. Always check the latest docs.
fix
Use model_name='solar-1-mini-chat' or the appropriate model string.
affects: >=0.6.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'upstage'
Missing the core Upstage SDK package.
fix
Run: pip install upstage
ImportError: cannot import name 'ChatUpstage' from 'langchain_upstage'
Incorrect import path or outdated package version.
fix
Use correct import: from langchain_upstage import ChatUpstage. Also update to latest version: pip install -U langchain-upstage
Upgrade
Version history
0.7.7latest on PyPI · released Mar 5, 2026
Audit
Dependencies
langchain-corerequiredCore dependency for LangChain integrations.
upstagerequiredOfficial Upstage Python SDK.
Agent activity
13 hits · last 30 days
node
12
Resources
langchain-upstage — pip install langchain-upstage · libregistry