Skip to main content

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

PyPI version License

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_id exposure on response_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

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langchain_ferrolabsai-0.0.1.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

langchain_ferrolabsai-0.0.1-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

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

Hashes for langchain_ferrolabsai-0.0.1.tar.gz
Algorithm Hash digest
SHA256 4afa2b2182516907788a8a27b5210b8faf4c7e38c1f72ba9801f1de458ef448b
MD5 8ccdfda95ee6514eae641a8c18ce78d5
BLAKE2b-256 76b3f20be257e33f54b1e7801e4a416bac2471eec5218f77f6db5258b0a17e6b

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file langchain_ferrolabsai-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_ferrolabsai-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e1b49414a3cfd282de643c2581affe4ec702c16fe73246d7e5018fa711263a7f
MD5 63ed13a72a1efa0c8b8efe8ac21c1bd2
BLAKE2b-256 a3dee7b824ae8f44e4aa6ad4d1d4d6ad26abf42bcfaa95eb4cc5e5ffa23456c0

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page