Skip to main content
The LLM Gateway is in beta.
Direct model access exposes each provider API through a provider-specific gateway path. The gateway still handles authentication, provider secrets, policies, and tracing, but it does not translate the request and response into another provider’s API format. Prefer standard model access for model calls across providers. Use direct model access when you want to access a provider’s API directly, preserve its native request and response behavior, and avoid the gateway’s standardization layer.

Choose a provider path

Append a provider path to your regional gateway base URL: Gateway Credits models use the standard endpoint rather than a provider-specific path. These hosted models require no provider secret of your own.

Configure provider SDKs

Set each provider SDK’s base URL to its direct gateway path and use your LangSmith API key as the provider API key:
The gateway resolves the actual provider key from your workspace’s Provider Secrets, so the provider key does not need to be stored locally.
Direct paths use the provider’s native model name without a provider prefix.

Configure LangChain and Deep Agents

LangChain chat models and Deep Agents, including Deep Agents Code, reach these provider paths through the LANGSMITH_GATEWAY environment variable:
Each supported integration appends its own provider path, so ChatAnthropic calls https://gateway.smith.langchain.com/anthropic and ChatOpenAI calls https://gateway.smith.langchain.com/openai/v1. To route requests through the standard endpoint instead, see the LLM Gateway quickstart.

Use a regional gateway

If your LangSmith account is on a regional instance, use the corresponding regional gateway and append the provider path. For example, use https://eu.gateway.smith.langchain.com/anthropic for direct Anthropic access in GCP EU.

See also