|
| 1 | +# Using Multiple Providers |
| 2 | + |
| 3 | +Configure multiple AI providers to give users flexibility in choosing models through the Robusta UI. |
| 4 | + |
| 5 | +!!! note "UI Feature Only" |
| 6 | + Multiple provider configuration currently only impacts investigations run from the **Robusta UI**. When multiple providers are defined, users can select which model to use from a dropdown in the UI. This feature does not affect CLI usage or investigations triggered from other sources. |
| 7 | + |
| 8 | +## Configuration |
| 9 | + |
| 10 | +Configure multiple models using the `modelList` parameter in your Helm values, along with the necessary environment variables. |
| 11 | + |
| 12 | +### Step 1: Create the Kubernetes Secret |
| 13 | + |
| 14 | +First, create a secret with your API keys (only include the ones you need): |
| 15 | + |
| 16 | +```bash |
| 17 | +# Example with all providers - only include what you're using |
| 18 | +kubectl create secret generic holmes-secrets \ |
| 19 | + --from-literal=openai-api-key="sk-..." \ |
| 20 | + --from-literal=anthropic-api-key="sk-ant-..." \ |
| 21 | + --from-literal=azure-api-key="..." \ |
| 22 | + --from-literal=aws-access-key-id="AKIA..." \ |
| 23 | + --from-literal=aws-secret-access-key="..." \ |
| 24 | + -n <namespace> |
| 25 | + |
| 26 | +# Example with just OpenAI and Anthropic |
| 27 | +kubectl create secret generic holmes-secrets \ |
| 28 | + --from-literal=openai-api-key="sk-..." \ |
| 29 | + --from-literal=anthropic-api-key="sk-ant-..." \ |
| 30 | + -n <namespace> |
| 31 | +``` |
| 32 | + |
| 33 | +### Step 2: Configure Helm Values |
| 34 | + |
| 35 | +```yaml |
| 36 | +# values.yaml |
| 37 | +# Reference only the API keys you created in the secret |
| 38 | +additionalEnvVars: |
| 39 | + - name: AZURE_API_KEY |
| 40 | + valueFrom: |
| 41 | + secretKeyRef: |
| 42 | + name: holmes-secrets |
| 43 | + key: azure-api-key |
| 44 | + - name: ANTHROPIC_API_KEY |
| 45 | + valueFrom: |
| 46 | + secretKeyRef: |
| 47 | + name: holmes-secrets |
| 48 | + key: anthropic-api-key |
| 49 | + - name: AWS_ACCESS_KEY_ID |
| 50 | + valueFrom: |
| 51 | + secretKeyRef: |
| 52 | + name: holmes-secrets |
| 53 | + key: aws-access-key-id |
| 54 | + - name: AWS_SECRET_ACCESS_KEY |
| 55 | + valueFrom: |
| 56 | + secretKeyRef: |
| 57 | + name: holmes-secrets |
| 58 | + key: aws-secret-access-key |
| 59 | + - name: OPENAI_API_KEY |
| 60 | + valueFrom: |
| 61 | + secretKeyRef: |
| 62 | + name: holmes-secrets |
| 63 | + key: openai-api-key |
| 64 | + |
| 65 | +# Configure the model list using the environment variables |
| 66 | +modelList: |
| 67 | + # Standard OpenAI |
| 68 | + openai-4o: |
| 69 | + api_key: "{{ env.OPENAI_API_KEY }}" |
| 70 | + model: openai/gpt-4o |
| 71 | + temperature: 0 |
| 72 | + |
| 73 | + # Azure OpenAI Models |
| 74 | + azure-4o: |
| 75 | + api_key: "{{ env.AZURE_API_KEY }}" |
| 76 | + model: azure/gpt-4o |
| 77 | + api_base: https://your-resource.openai.azure.com/ |
| 78 | + api_version: "2025-01-01-preview" |
| 79 | + temperature: 0 |
| 80 | + |
| 81 | + azure-gpt-5: |
| 82 | + api_key: "{{ env.AZURE_API_KEY }}" |
| 83 | + model: azure/gpt-5-chat |
| 84 | + api_base: https://your-resource.openai.azure.com/ |
| 85 | + api_version: "2025-01-01-preview" |
| 86 | + temperature: 1 # only 1 is supported for gpt-5 models |
| 87 | + |
| 88 | + # Anthropic Models |
| 89 | + claude-sonnet-4: |
| 90 | + api_key: "{{ env.ANTHROPIC_API_KEY }}" |
| 91 | + model: claude-sonnet-4-20250514 |
| 92 | + temperature: 1 |
| 93 | + thinking: |
| 94 | + budget_tokens: 10000 |
| 95 | + type: enabled |
| 96 | + |
| 97 | + # AWS Bedrock |
| 98 | + bedrock-claude: |
| 99 | + aws_access_key_id: "{{ env.AWS_ACCESS_KEY_ID }}" |
| 100 | + aws_region_name: eu-south-2 |
| 101 | + aws_secret_access_key: "{{ env.AWS_SECRET_ACCESS_KEY }}" |
| 102 | + model: bedrock/eu.anthropic.claude-sonnet-4-20250514-v1:0 |
| 103 | + temperature: 1 |
| 104 | + thinking: |
| 105 | + budget_tokens: 10000 |
| 106 | + type: enabled |
| 107 | +``` |
| 108 | +
|
| 109 | +
|
| 110 | +## Model Parameters |
| 111 | +
|
| 112 | +Each model in `modelList` can accept any parameter supported by LiteLLM for that provider. The `model` parameter is required, while authentication requirements vary by provider. Any additional LiteLLM parameters will be passed directly through to the provider. |
| 113 | + |
| 114 | +### Required Parameter |
| 115 | +- `model`: Model identifier (provider-specific format) |
| 116 | + |
| 117 | +### Common Parameters |
| 118 | +- `api_key`: API key for authentication where required (can use `{{ env.VAR_NAME }}` syntax) |
| 119 | +- `temperature`: Creativity level (0-2, lower is more deterministic) |
| 120 | + |
| 121 | +### Additional Parameters |
| 122 | + |
| 123 | +You can pass any LiteLLM-supported parameter for your provider. Examples include: |
| 124 | + |
| 125 | +- **Azure**: `api_base`, `api_version`, `deployment_id` |
| 126 | +- **Anthropic**: `thinking` (with `budget_tokens` and `type`) |
| 127 | +- **AWS Bedrock**: `aws_access_key_id`, `aws_secret_access_key`, `aws_region_name`, `aws_session_token` |
| 128 | +- **Google Vertex**: `vertex_project`, `vertex_location` |
| 129 | + |
| 130 | +Refer to [LiteLLM documentation](https://docs.litellm.ai/docs/providers) for the complete list of parameters supported by each provider. |
| 131 | + |
| 132 | +## User Experience |
| 133 | + |
| 134 | +When multiple models are configured: |
| 135 | + |
| 136 | +1. Users see a **model selector dropdown** in the Robusta UI |
| 137 | +2. Each model appears with its configured name (e.g., "azure-4o", "claude-sonnet-4") |
| 138 | +3. Users can switch between models for different investigations |
| 139 | + |
| 140 | +## Best Practices |
| 141 | + |
| 142 | +1. **Use descriptive names**: Name models clearly (e.g., `fast-gpt4`, `accurate-claude`, `budget-mini`) |
| 143 | +2. **Secure API keys**: Always use Kubernetes secrets for API keys |
| 144 | + |
| 145 | +## Limitations |
| 146 | + |
| 147 | +- **UI Only**: Model selection currently only works in the Robusta UI |
| 148 | +- **No automatic failover**: If a selected model fails, users must manually switch |
| 149 | + |
| 150 | +## See Also |
| 151 | + |
| 152 | +- [UI Installation](../installation/ui-installation.md) |
| 153 | +- [Helm Configuration](../reference/helm-configuration.md) |
| 154 | +- Individual provider documentation for specific configuration details |
0 commit comments