Skip to content

OpenAI

Configure HolmesGPT to use OpenAI's GPT models.

Setup

Get a paid OpenAI API key.

Note

Requires a paid OpenAI API key, not a ChatGPT Plus subscription.

Configuration

Using Environment Variables:

export OPENAI_API_KEY="your-openai-api-key"
holmes ask "what pods are failing?"

Using Command Line Parameters:

You can also pass the API key directly as a command-line parameter:

holmes ask "what pods are failing?" --api-key="your-api-key"

Create a Kubernetes secret in the namespace Holmes runs in:

kubectl create secret generic holmes-openai \
  --from-literal=OPENAI_API_KEY="sk-..." \
  -n <namespace>

When using the standalone Holmes Helm Chart, update your values.yaml:

extraEnvVarsSecrets:
  - holmes-openai

additionalEnvVars:
  # Optional: Set default model (use modelList key name)
  - name: MODEL
    value: "gpt-4.1"  # This refers to the key name in modelList below

# Configure at least one model using modelList
modelList:
  gpt-4.1:
    api_key: "{{ env.OPENAI_API_KEY }}"
    model: openai/gpt-4.1
    temperature: 0

  gpt-5:
    api_key: "{{ env.OPENAI_API_KEY }}"
    model: openai/gpt-5
    temperature: 1
    reasoning_effort: medium

Apply the configuration:

helm upgrade holmes robusta/holmes -f values.yaml

Create a Kubernetes secret in the namespace Holmes runs in:

kubectl create secret generic holmes-openai \
  --from-literal=OPENAI_API_KEY="sk-..." \
  -n <namespace>

When using the Robusta Helm Chart (which includes HolmesGPT), update your generated_values.yaml:

holmes:
  extraEnvVarsSecrets:
    - holmes-openai

  additionalEnvVars:
    # Optional: Set default model (use modelList key name)
    - name: MODEL
      value: "gpt-4.1"  # This refers to the key name in modelList below

  # Configure at least one model using modelList
  modelList:
    gpt-4.1:
      api_key: "{{ env.OPENAI_API_KEY }}"
      model: openai/gpt-4.1
      temperature: 0

    gpt-5:
      api_key: "{{ env.OPENAI_API_KEY }}"
      model: openai/gpt-5
      temperature: 1
      reasoning_effort: medium

Apply the configuration:

helm upgrade robusta robusta/robusta -f generated_values.yaml --set clusterName=<YOUR_CLUSTER_NAME>

Available Models

Most OpenAI models are supported. For example:

# GPT-4.1 (default) - fast and decent responses
holmes ask "what pods are failing?"

# GPT-5 (more accurate but much slower)
holmes ask "what pods are failing?" --model="gpt-5"

Best Results

For more accurate results, consider using Anthropic's Claude models.

See benchmark results for a comparison.

GPT-5 Reasoning Effort

When using GPT-5 models, you can control the reasoning effort level. This allows you to balance between response quality and processing time/cost.

In Kubernetes, this reuses the holmes-openai secret created in the Configuration section above.

Using Environment Variables:

# Use minimal reasoning effort for faster responses
export REASONING_EFFORT="minimal"
holmes ask "what pods are failing?" --model="gpt-5"

# Use default reasoning effort
export REASONING_EFFORT="medium"
holmes ask "what pods are failing?" --model="gpt-5"

# Use high reasoning effort for complex investigations
export REASONING_EFFORT="high"
holmes ask "what pods are failing?" --model="gpt-5"

When using the standalone Holmes Helm Chart, update your values.yaml:

extraEnvVarsSecrets:
  - holmes-openai

modelList:
  gpt-5-minimal:
    api_key: "{{ env.OPENAI_API_KEY }}"
    model: openai/gpt-5
    temperature: 1
    reasoning_effort: minimal  # Fast responses

  gpt-5-medium:
    api_key: "{{ env.OPENAI_API_KEY }}"
    model: openai/gpt-5
    temperature: 1
    reasoning_effort: medium  # Balanced (default)

  gpt-5-high:
    api_key: "{{ env.OPENAI_API_KEY }}"
    model: openai/gpt-5
    temperature: 1
    reasoning_effort: high  # Complex investigations

additionalEnvVars:
  # Use the appropriate model based on your needs
  - name: MODEL
    value: "gpt-5-medium"

Apply the configuration:

helm upgrade holmes robusta/holmes -f values.yaml

When using the Robusta Helm Chart (which includes HolmesGPT), update your generated_values.yaml:

holmes:
  extraEnvVarsSecrets:
    - holmes-openai

  modelList:
    gpt-5-minimal:
      api_key: "{{ env.OPENAI_API_KEY }}"
      model: openai/gpt-5
      temperature: 1
      reasoning_effort: minimal  # Fast responses

    gpt-5-medium:
      api_key: "{{ env.OPENAI_API_KEY }}"
      model: openai/gpt-5
      temperature: 1
      reasoning_effort: medium  # Balanced (default)

    gpt-5-high:
      api_key: "{{ env.OPENAI_API_KEY }}"
      model: openai/gpt-5
      temperature: 1
      reasoning_effort: high  # Complex investigations

  additionalEnvVars:
    # Use the appropriate model based on your needs
    - name: MODEL
      value: "gpt-5-medium"

Apply the configuration:

helm upgrade robusta robusta/robusta -f generated_values.yaml --set clusterName=<YOUR_CLUSTER_NAME>

Available reasoning effort levels:

  • minimal - Fastest responses, suitable for simple queries
  • low - Balance between speed and quality
  • medium - Standard reasoning depth (default)
  • high - Deeper reasoning for complex problems

For more details on reasoning effort levels, refer to the OpenAI documentation.

Additional Resources

HolmesGPT uses the LiteLLM API to support OpenAI provider. Refer to LiteLLM OpenAI docs for more details.