LangChain integration for Ferro Labs AI Gateway — chat, streaming, embeddings, and tool calling across 30+ LLM providers via a single OpenAI-compatible endpoint
Project description
langchain-ferrolabsai
LangChain integration for Ferro Labs AI Gateway — route LangChain chat, streaming, tool-calling, and embedding workloads across 30+ LLM providers through a single OpenAI-compatible endpoint, with automatic fallback, load balancing, cost tracking, and observability.
Status: 0.0.1 placeholder. The full adapter (
FerroChatModel,FerroEmbeddings,FerroLLM) is in active development as part of the OSS Ecosystem Roadmap, Appendix A, Phase C. The 0.0.1 release exists to reserve the package name on PyPI and signal upcoming work.
Install
pip install langchain-ferrolabsai
Planned API
from langchain_ferrolabsai import FerroChatModel, FerroEmbeddings
llm = FerroChatModel(
model="gpt-4o",
base_url="http://localhost:8080", # any Ferro Labs AI Gateway instance
api_key="sk-ferro-...",
)
response = llm.invoke("Hello, world")
print(response.content)
print(response.response_metadata["provider"]) # which provider handled it
print(response.response_metadata["cost_usd"]) # cost for this request
print(response.response_metadata["latency_ms"]) # observed latency
print(response.response_metadata["trace_id"]) # gateway trace ID
Why use this instead of ChatOpenAI(base_url=...)?
ChatOpenAI pointed at a Ferro Labs gateway already works as a drop-in. This package adds:
- First-class
provider,cost_usd,latency_ms,trace_idexposure onresponse_metadata. - Native support for Ferro extras:
route_tag,template_id,template_variables. - Streaming + async + tool calling that surfaces all 30+ providers transparently.
- Optional LangSmith bridge so non-OpenAI providers (Anthropic, Bedrock, Vertex, etc.) appear in your existing LangSmith dashboards.
Related
ferrolabsai— the core Python SDK this package wraps.- Ferro Labs AI Gateway — the open-source gateway server.
- Documentation
License
Apache-2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langchain_ferrolabsai-0.0.1.tar.gz.
File metadata
- Download URL: langchain_ferrolabsai-0.0.1.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4afa2b2182516907788a8a27b5210b8faf4c7e38c1f72ba9801f1de458ef448b
|
|
| MD5 |
8ccdfda95ee6514eae641a8c18ce78d5
|
|
| BLAKE2b-256 |
76b3f20be257e33f54b1e7801e4a416bac2471eec5218f77f6db5258b0a17e6b
|
Provenance
The following attestation bundles were made for langchain_ferrolabsai-0.0.1.tar.gz:
Publisher:
publish-langchain-ferrolabsai.yml on ferro-labs/ferrolabs-python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langchain_ferrolabsai-0.0.1.tar.gz -
Subject digest:
4afa2b2182516907788a8a27b5210b8faf4c7e38c1f72ba9801f1de458ef448b - Sigstore transparency entry: 1531804159
- Sigstore integration time:
-
Permalink:
ferro-labs/ferrolabs-python-sdk@432c7a3cf39142c96d40b82b5282a719535182ae -
Branch / Tag:
refs/tags/langchain-ferrolabsai-v0.0.1 - Owner: https://github.com/ferro-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-langchain-ferrolabsai.yml@432c7a3cf39142c96d40b82b5282a719535182ae -
Trigger Event:
push
-
Statement type:
File details
Details for the file langchain_ferrolabsai-0.0.1-py3-none-any.whl.
File metadata
- Download URL: langchain_ferrolabsai-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1b49414a3cfd282de643c2581affe4ec702c16fe73246d7e5018fa711263a7f
|
|
| MD5 |
63ed13a72a1efa0c8b8efe8ac21c1bd2
|
|
| BLAKE2b-256 |
a3dee7b824ae8f44e4aa6ad4d1d4d6ad26abf42bcfaa95eb4cc5e5ffa23456c0
|
Provenance
The following attestation bundles were made for langchain_ferrolabsai-0.0.1-py3-none-any.whl:
Publisher:
publish-langchain-ferrolabsai.yml on ferro-labs/ferrolabs-python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langchain_ferrolabsai-0.0.1-py3-none-any.whl -
Subject digest:
e1b49414a3cfd282de643c2581affe4ec702c16fe73246d7e5018fa711263a7f - Sigstore transparency entry: 1531804307
- Sigstore integration time:
-
Permalink:
ferro-labs/ferrolabs-python-sdk@432c7a3cf39142c96d40b82b5282a719535182ae -
Branch / Tag:
refs/tags/langchain-ferrolabsai-v0.0.1 - Owner: https://github.com/ferro-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-langchain-ferrolabsai.yml@432c7a3cf39142c96d40b82b5282a719535182ae -
Trigger Event:
push
-
Statement type: