Metadata-Version: 2.4
Name: somm-langchain
Version: 0.7.1
Summary: LangChain BaseChatModel adapter for somm — lets LangChain/LangGraph/deepagents apps use somm as their LLM substrate
Project-URL: Homepage, https://github.com/lavallee/somm
Project-URL: Repository, https://github.com/lavallee/somm
Project-URL: Issues, https://github.com/lavallee/somm/issues
Project-URL: Changelog, https://github.com/lavallee/somm/blob/main/CHANGELOG.md
Author: Marc Lavallee
License: MIT
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.12
Requires-Dist: langchain-core>=0.3
Requires-Dist: somm-core==0.7.1
Requires-Dist: somm==0.7.1
Description-Content-Type: text/markdown

# somm-langchain

LangChain `BaseChatModel` adapter for [`somm`](https://github.com/lavallee/somm).

Lets LangChain / LangGraph / `deepagents` apps use somm as their LLM substrate — telemetry, routing, cost tracking, provider fallback, sommelier model memory — all without changing the agent-framework call sites.

```python
import somm
from somm_langchain import SommChatModel

llm = somm.llm(project="my_agent")
chat = SommChatModel(somm_llm=llm, workload="agent_thinking")

from deepagents import create_deep_agent
agent = create_deep_agent(model=chat, tools=[...])
```

`SommChatModel` supports `bind_tools()` and routes tool-using calls through somm's neutral tool-calling shape (see [docs/tool-calling.md](https://github.com/lavallee/somm/blob/main/docs/tool-calling.md)). The adapter is thin: message translation in, somm.llm().generate() through, ChatGeneration out.

Built for agent orchestrators that run on `deepagents` and similar LangChain-based stacks, which mandate a tool-calling `BaseChatModel`.
