Introducing the LangSmith LLM Gateway
LangChain has announced the LangSmith LLM Gateway, a new tool designed to address the challenges of managing agents in production environments. The gateway acts as a central governance layer between agents and the models they call, offering controls like spend caps, rate limits, and sensitive data protection. This simplifies the process of deploying and managing agents, particularly those utilizing open-weight models.
Key Features and Controls
The Gateway offers granular control over LLM usage. It allows for setting spend caps at the organization, workspace, API key, and user levels. Rate limits can be applied at the same levels, preventing accidental abuse or overwhelming provider limits. Furthermore, the Gateway provides a mechanism for defining fallback rules across models and hosts, ensuring agent reliability even when a provider experiences issues. Sensitive data, such as PII and secrets, is automatically redacted before being sent to model providers, mitigating potential security risks.
Supporting Diverse Models and Providers
The Gateway supports popular providers like OpenAI, Anthropic, and Fireworks, as well as custom models with compatible endpoints. It also supports a hosted inference option for open models powered by Fireworks, directly through LangSmith using Gateway Credits. This allows teams to leverage the performance of open-weight models without the complexities of managing infrastructure themselves. The Gateway’s BYOK (Bring Your Own Key) approach allows teams to use their existing provider keys, avoiding the need for additional instrumentation.
Monitoring and Debugging
LangSmith traces Gateway events, logging metadata for each request. This allows engineers to monitor control behavior in real-time and investigate issues when a request is blocked. By examining the trace, teams can understand the context surrounding a violation and make informed decisions about adjustments. This centralized visibility is crucial for optimizing agent performance and ensuring operational stability.
Enabling Open-Weight Adoption
The Gateway’s support for open-weight models is a key element of LangChain’s strategy. By simplifying the adoption of these models, the Gateway empowers teams to optimize for cost, quality, latency, privacy, and deployment needs. The combination of Gateway and Fireworks provides a powerful platform for building and deploying production-ready agents using open-weight models.



