Use custom TLS certificates for model providers
This feature is currently only available for the following model providers:
- Azure OpenAI
- OpenAI
- Custom (our custom model server). Refer to the custom model server documentation for more information.
These TLS settings will apply to all invocations of the selected model providers including when used through Online Evaluation.
You can use custom TLS certificates to connect to model providers in the LangSmith playground. This is useful if you are using a self-signed certificate, a certificate from a custom certificate authority or mutual TLS authentication.
To use custom TLS certificates, you need to set the following environment variables. See the self hosted deployment section for more information on how to set up application configuration.
LANGSMITH_PLAYGROUND_TLS_MODEL_PROVIDERS
: A comma-separated list of model providers that require custom TLS certificates. Note thatazure_openai
,openai
andcustom
are currently the only supported model provider that supports custom TLS certificates, but more providers will be supported in the future.LANGSMITH_PLAYGROUND_TLS_CA
: The custom certificate authority (CA) certificate in PEM format. This must be a file path (for a mounted volume).- [Optional]
LANGSMITH_PLAYGROUND_TLS_KEY
: The private key in PEM format. This must be a file path (for a mounted volume). This is usually only necessary for mutual TLS authentication. - [Optional]
LANGSMITH_PLAYGROUND_TLS_CERT
: The certificate in PEM format. This must be a file path (for a mounted volume). This is usually only necessary for mutual TLS authentication.
Once you have set these environment variables, enter the playground and select the model provider that requires custom TLS certificates. Set your model provider configuration as usual, and the custom TLS certificates will be used when connecting to the model provider.