Route chat models built in this context through the LangSmith gateway.
Unlike the LANGSMITH_GATEWAY env var, which applies to the whole process,
this applies only to the current context (thread or asyncio task), so a
server can route some requests through the gateway and not others.
The gateway is resolved when a model is constructed, so wrap construction
(for example load() of a serialized model), not invocation.
While the context is active, the gateway URL and key take precedence over any base URL or API key passed to the model or set in the environment. This lets a caller load an untrusted serialized model without it redirecting the gateway key to another host or bypassing the gateway.
Key used to authenticate to the gateway.
Gateway host. The provider's path is appended per model.