Skip to main content
This feature is only available on Helm chart versions 0.10.27 (application version 0.10.74) and later.
Many model providers support setting credentials and other configuration options through environment variables. This is useful for self-hosted deployments where you want to avoid hardcoding sensitive information in your code or configuration files. In LangSmith, most model interactions are done through the playground service, which allows you to configure many of those environment variables directly on the pod itself. This can be useful to avoid having to set credentials in the UI.

Requirements

  • A self-hosted LangSmith instance with the playground service running.
  • The provider you want to configure must support environment variables for configuration. Check the provider’s Chat Model documentation for more information.
  • The secrets/roles you may want to attach to the playground service.
    • Note that for IRSA you may need to grant the langsmith-playground service account the necessary permissions to access the secrets or roles in your cloud provider.

Configuration

With the parameters from above, you can configure your LangSmith instance to use environment variables for model providers. You can do this by modifying the langsmith_config.yaml file for your LangSmith Helm Chart installation.
Helm

Gemini Enterprise Agent Platform configuration

You can configure Gemini Enterprise Agent Platform credentials for the playground service using either environment variables with secrets or GCP Workload Identity for GKE.

Using secrets

Configure Gemini Enterprise Agent Platform credentials using Kubernetes secrets:
Helm

Using workload identity

You can configure the playground service account to use GCP Workload Identity to assume a GCP service account role without storing credentials. This is the recommended approach for GKE clusters.

GCP Workload Identity (GKE)

For GKE clusters, use GCP Workload Identity:
When using GCP Workload Identity, ensure the GCP service account has the required Gemini Enterprise Agent Platform permissions (e.g., roles/aiplatform.user).

AWS IRSA (EKS)

For EKS clusters, you can use AWS IRSA (IAM Roles for Service Accounts) to grant the playground service account access to AWS resources without storing credentials. Annotate the service account with your IAM role ARN:
Ensure your AWS IAM role has the necessary permissions for the AWS resources the playground service needs to access.