Skip to main content

Setting up the Virtana AI Chatbot

Virtana AI adds a Copilot Chatbot to your infrastructure monitoring environment so you can work with alerts, documentation, and insights through a conversational interface. The Copilot connects to an external large language model (LLM) provider that powers its responses. Before you enable the Copilot, you configure one supported provider, add the connection details to your Global View deployment, and turn on the related feature flags.

When the Copilot is enabled, you can do the following:

  • Interact with product documentation. Ask questions in natural language and get contextual answers drawn from Virtana's documentation.

  • Query alert-related information. Retrieve active alerts, alert history, and alert configurations without writing a query.

  • Generate alert policies and insights. Create alert policies and surface actionable insights based on data from your environment.

Supported model providers

This section describes the large language model (LLM) providers that Virtana AI supports. You must configure exactly one provider before you enable the Copilot, because the provider supplies the model that powers the chatbot, alert generation, and insights features.

The following table describes the three supported providers and when to use each one:

Provider

When to use it

Default inference endpoint

OpenAI

Choose OpenAI to connect directly to the OpenAI API and its hosted models (for example, GPT-4o and GPT-5).

https://api.openai.com/v1

Gemini

Choose Gemini to connect to Google's Gemini models.

https://generativelanguage.googleapis.com/v1beta/openai/

LiteLLM

Choose LiteLLM when you want a single gateway in front of multiple model backends, or when you run self-hosted or custom model deployments. LiteLLM provides a unified API across those backends.

Virtana-internal proxy URL. Set VIRTANA_AI_INFERENCE_ENDPOINT explicitly instead.

Note

When you set VIRTANA_AI_MODEL_PROVIDER to LITELLM, always set VIRTANA_AI_INFERENCE_ENDPOINT to your own proxy URL. The built-in default for LITELLM points to a Virtana-internal proxy that customer deployments can't reach, and Copilot fails to answer any question until you override it.

LiteLLM model configuration

This section applies only if you select LiteLLM as your provider. In your LiteLLM instance, you create one model for each Virtana AI function and give each model the exact name shown in the following table. All of the model names are required because each name maps to a specific function, and Virtana AI calls them by name.

VIRTANA_MDL_MINI_DEFAULT_CONFIG: 'gpt-4o-mini'
VIRTANA_MDL_MINI_CHATOPENAI: 'gpt-4o'
VIRTANA_MDL_MINI_ROUTEOPENAI: 'gpt-4o-mini'
VIRTANA_MDL_MINI_SWAGGER_ANALYSIS: 'gpt-4o-mini'
VIRTANA_MDL_REASON_INSIGHT_SVC: 'gpt-4o'
VIRTANA_MDL_MINI_GV_ALERT: 'gpt-4o-mini'
VIRTANA_MDL_MINI_GV_ALERT_TOOL_SELECTOR: 'gpt-4o-mini'
VIRTANA_MDL_REASON_GV_ALERT_RESPONSE_GENERATOR: 'gpt-4o'
VIRTANA_MDL_MINI_CHART_GENERATOR: 'gpt-4o-mini'
VIRTANA_MDL_REASON_METRICS: 'gpt-4o'
VIRTANA_MDL_MINI_METRICS_STATEMENT: 'gpt-4o-mini'
VIRTANA_MDL_REASON_TROUBLESHOOTING: 'gpt-4.1'
VIRTANA_MDL_NANO_IDENTIFIER: 'gpt-4.1-nano'
VIRTANA_MDL_MINI_GENERAL: 'gpt-4o-mini'
VIRTANA_MDL_REASON: 'gpt-5'
VIRTANA_MDL_REASONING_MINI: 'gpt-5-mini'

The following table lists the required model name, the model it maps to, and the Virtana AI function it serves:

Model name

Mapped model

Virtana AI function

VIRTANA_MDL_MINI_DEFAULT_CONFIG

gpt-4o-mini

Provides the default configuration for lightweight tasks.

VIRTANA_MDL_MINI_CHATOPENAI

gpt-4o

Powers the primary chatbot conversations.

VIRTANA_MDL_MINI_ROUTEOPENAI

gpt-4o-mini

Routes each user query to the correct handler.

VIRTANA_MDL_MINI_SWAGGER_ANALYSIS

gpt-4o-mini

Analyzes API specifications in Swagger or OpenAPI format.

VIRTANA_MDL_REASON_INSIGHT_SVC

gpt-4o

Generates detailed insights from monitoring data.

VIRTANA_MDL_MINI_GV_ALERT

gpt-4o-mini

Handles Global View alert queries.

VIRTANA_MDL_MINI_GV_ALERT_TOOL_SELECTOR

gpt-4o-mini

Selects the correct tool for an alert-related task.

VIRTANA_MDL_REASON_GV_ALERT_RESPONSE_GENERATOR

gpt-4o

Generates detailed responses for alert queries.

VIRTANA_MDL_MINI_CHART_GENERATOR

gpt-4o-mini

Creates chart visualizations from data.

VIRTANA_MDL_REASON_METRICS

gpt-4o

Processes and reasons over metrics data.

VIRTANA_MDL_MINI_METRICS_STATEMENT

gpt-4o-mini

Generates natural-language summaries of metrics.

VIRTANA_MDL_REASON_TROUBLESHOOTING

gpt-4.1

Powers advanced troubleshooting workflows.

VIRTANA_MDL_NANO_IDENTIFIER

gpt-4.1-nano

Performs lightweight entity identification and classification.

VIRTANA_MDL_MINI_GENERAL

gpt-4o-mini

Handles general-purpose lightweight tasks.

VIRTANA_MDL_REASON

gpt-5

Serves as the primary reasoning model for complex analysis.

VIRTANA_MDL_REASONING_MINI

gpt-5-mini

Provides lightweight reasoning for simpler analytical tasks.

Note

The GPT models mapped in the table above are the officially tested and validated models for the Virtana AI chatbot, alert policy generation, and insights generation. If you map names to models other than those listed, Virtana AI might behave inconsistently or in ways that aren't supported.

After you create all of the models in LiteLLM, generate an API key that has access to every model name in the table above. You add this key to the Global View configuration.

Global View configuration

Virtana AI Copilot connects to a large language model (LLM) backend over an OpenAI-compatible API, and you can configure that connection in Global View with a small set of environment variables. You can connect directly to a public provider, or route every request through a LiteLLM proxy so that credentials, model routing, request logging, and certificate trust stay under your control. This section describes the supported providers, the three configuration patterns, and the rules that decide which model name Copilot sends.

Add the following block to global-view-values.yaml:

virtana-ai:
  enabled: true
  env:
    VIRTANA_AI_MODEL_PROVIDER: ""  

cp-configs:
  litellm:
    litellm_api_key: ""
    litellm_inference_endpoint: ""

The following table describes each parameter in the configuration block, including the value to enter and when the value is required:

Parameter

Description and value

virtana-ai.enabled

Turns the Virtana AI Copilot Chatbot feature on or off. Set this to true to enable the Copilot.

virtana-ai.env.VIRTANA_AI_MODEL_PROVIDER

Names the LLM provider that powers Virtana AI. Enter one of the supported values: OPENAI, GEMINI, or LITELLM. The value must match the provider you configured.

cp-configs.litellm.litellm_api_key

Authenticates Virtana AI with your provider. Enter the API key for your chosen provider. This key is required for all three providers (OpenAI, Gemini, and LiteLLM). For LiteLLM, use the key that has access to every model name in the LiteLLM model configuration.

cp-configs.litellm.litellm_inference_endpoint

Sets the inference endpoint URL that Virtana AI calls. Leave this blank for OpenAI and Gemini, because they use their default public endpoints. If you run a self-hosted LiteLLM instance, enter the full endpoint URL, for example, https://litellm.example.com.

Configuration variables

Copilot reads its connectivity settings from six environment variables. The three inference variables are required for every deployment; the three embedding variables are optional and inherit the inference values when you leave them unset.

The following table describes each variable:

Environment variable

Purpose

Default value

VIRTANA_AI_MODEL_PROVIDER

Selects the inference provider and the alias resolution behavior.

OPENAI

VIRTANA_AI_API_KEY

Authenticates inference requests. Must not be empty.

None. Legacy OPENAI_APIKEY and OPENAI_API_KEY are used as a fallback.

VIRTANA_AI_INFERENCE_ENDPOINT

Sets the OpenAI-compatible base URL for inference requests.

The default endpoint for the selected provider

VIRTANA_AI_EMBEDDING_PROVIDER

Selects the embedding provider, independently of the inference provider.

The value of VIRTANA_AI_MODEL_PROVIDER

VIRTANA_AI_EMBEDDING_API_KEY

Authenticates embedding requests.

The value of VIRTANA_AI_API_KEY

VIRTANA_AI_EMBEDDING_ENDPOINT

Sets the base URL for embedding requests.

The value of VIRTANA_AI_INFERENCE_ENDPOINT

Virtana recommends keeping embeddings on OpenAI regardless of which provider handles inference. The Copilot document search store is indexed with the OpenAI text-embedding-3-large model at 1024 dimensions, and any other embedding model produces vectors that the existing store can't match.

Warning

Changing VIRTANA_AI_EMBEDDING_PROVIDER or the embedding model on a system that already has an indexed document store makes document search return incorrect or empty results. You must re-index the document store with the new embedding model before Copilot answers documentation questions correctly again.

Scenario 1: Connect directly to OpenAI or Gemini

Connect directly to a public provider when your Global View deployment can reach the provider's API, and you don't need centralized credential management or request logging. Copilot resolves its model aliases to that provider's model IDs and calls the provider's default endpoint, so you only set the provider and the key.

The following example configures a direct OpenAI connection:

export VIRTANA_AI_MODEL_PROVIDER="OPENAI"
export VIRTANA_AI_API_KEY="<openai_api_key>"

To use Gemini instead, set VIRTANA_AI_MODEL_PROVIDER to GEMINI and supply a Gemini API key.

Scenario 2: Route through LiteLLM with model aliases

Set VIRTANA_AI_MODEL_PROVIDER to LITELLM when you want your proxy configuration, rather than Copilot, to decide which upstream model serves each workload. Copilot sends its internal aliases as literal model names, so your proxy holds the complete alias-to-model mapping, and you can change any mapping without touching Global View. Virtana recommends this pattern for proxy deployments.

The following example configures Copilot to send aliases to a LiteLLM proxy while keeping embeddings on OpenAI:

export VIRTANA_AI_MODEL_PROVIDER="LITELLM"
export VIRTANA_AI_API_KEY="<litellm_proxy_key>"
export VIRTANA_AI_INFERENCE_ENDPOINT="http://<litellm_host>:4000/v1"

export VIRTANA_AI_EMBEDDING_PROVIDER="OPENAI"
export VIRTANA_AI_EMBEDDING_API_KEY="<openai_api_key>"
export VIRTANA_AI_EMBEDDING_ENDPOINT="https://api.openai.com/v1"

Your litellm_config.yaml file must define a model_name entry for every alias listed in model aliases and their resolved model IDs. A request for an alias that the proxy doesn't define returns a 4xx "model not found" error, and the Copilot feature that uses that alias stops working.

Scenario 3: Route through LiteLLM with provider model IDs

Set VIRTANA_AI_MODEL_PROVIDER to OPENAI or GEMINI and point VIRTANA_AI_INFERENCE_ENDPOINT at your LiteLLM proxy when the proxy already exposes standard provider model names. Copilot resolves each alias to a provider model ID before it sends the request, so the proxy sees names such as gpt-4o-mini rather than VIRTANA_MDL_MINI.

The following example sends OpenAI model IDs to a LiteLLM proxy:

export VIRTANA_AI_MODEL_PROVIDER="OPENAI"
export VIRTANA_AI_API_KEY="<litellm_proxy_key>"
export VIRTANA_AI_INFERENCE_ENDPOINT="http://<litellm_host>:4000/v1"

Set VIRTANA_AI_API_KEY to the LiteLLM proxy key in this pattern, not to your OpenAI or Gemini key. The proxy authenticates Copilot with its own key and uses the upstream provider key from its own configuration.

Note

VIRTANA_AI_MODEL_PROVIDER controls model name resolution only. It never overrides VIRTANA_AI_INFERENCE_ENDPOINT, so requests go to whichever endpoint you set, even when the provider value names a public provider.

Model aliases and their resolved model IDs

Copilot refers to models by alias throughout the application, and resolves each alias at runtime based on VIRTANA_AI_MODEL_PROVIDER. Aliases are grouped by workload: MINI aliases handle fast, low-cost tasks, REASON aliases handle analysis and generation, NANO aliases handle identifier extraction, and VIRTANA_MDL_EMBEDDING handles document indexing and search.

The following table lists every alias, the model each provider resolves it to, and the model_name value your LiteLLM proxy must expose when VIRTANA_AI_MODEL_PROVIDER is LITELLM:

Model alias

Resolved model for OPENAI

Resolved model for GEMINI

VIRTANA_MDL_MINI

gpt-4o-mini

gemini/gemini-2.5-flash

VIRTANA_MDL_NANO

gpt-4.1-nano

gemini/gemini-2.5-flash

VIRTANA_MDL_REASON

gpt-5

gemini/gemini-2.5-pro

VIRTANA_MDL_REASONING_MINI

gpt-5-mini

gemini/gemini-2.5-pro

VIRTANA_MDL_MINI_DEFAULT_CONFIG

gpt-4o-mini

gemini/gemini-2.5-flash

VIRTANA_MDL_MINI_CHATOPENAI

gpt-4o

gemini/gemini-2.5-pro

VIRTANA_MDL_MINI_ROUTEOPENAI

gpt-4o-mini

gemini/gemini-2.5-flash

VIRTANA_MDL_MINI_SWAGGER_ANALYSIS

gpt-4o-mini

gemini/gemini-2.5-flash

VIRTANA_MDL_MINI_GENERAL

gpt-4o-mini

gemini/gemini-2.5-flash

VIRTANA_MDL_MINI_GV_ALERT

gpt-4o-mini

gemini/gemini-2.5-flash

VIRTANA_MDL_MINI_GV_ALERT_TOOL_SELECTOR

gpt-4o-mini

gemini/gemini-2.5-flash

VIRTANA_MDL_REASON_GV_ALERT_RESPONSE_GENERATOR

gpt-4o

gemini/gemini-2.5-pro

VIRTANA_MDL_MINI_CHART_GENERATOR

gpt-4o-mini

gemini/gemini-2.5-flash

VIRTANA_MDL_MINI_METRICS_STATEMENT

gpt-4o-mini

gemini/gemini-2.5-flash

VIRTANA_MDL_REASON_METRICS

gpt-4o

gemini/gemini-2.5-pro

VIRTANA_MDL_REASON_INSIGHT_SVC

gpt-4o

gemini/gemini-2.5-pro

VIRTANA_MDL_REASON_TROUBLESHOOTING

gpt-4.1

gemini/gemini-2.5-pro

VIRTANA_MDL_NANO_IDENTIFIER

gpt-4.1-nano

gemini/gemini-2.5-flash

VIRTANA_MDL_EMBEDDING

text-embedding-3-large

gemini/gemini-embedding-001

Note

The models in this table are the models Virtana tests and validates for Copilot chat, alert policy generation, and insight generation. Mapping an alias to any other model in your LiteLLM configuration can produce inconsistent or unsupported behavior.

Override the model for a specific workload

You can override Copilot's default model choices with environment variables, which is useful when you want one workload to use a stronger or cheaper model than the rest. Two levels of override are available, and the variables you set apply on top of whatever provider mapping is already in effect.

Choose the level that matches what you want to change:

  • Tier overrides, for broad changes. Set VIRTANA_AI_MODEL_REASONING, VIRTANA_AI_MODEL_REASONING_MINI, VIRTANA_AI_MODEL_NANO, or VIRTANA_AI_MODEL_EMBEDDING to change the model for a whole tier. Virtana recommends starting here.

  • Alias overrides for a single workload. Set an environment variable named after the alias itself, such as VIRTANA_MDL_REASON_TROUBLESHOOTING=gpt-4.1, to change one workload without affecting the rest of its tier.

Model parameters

Model parameters such as temperature and token limits live in the chatbot_modules/chatbot.conf file, organized into one section per workload. Each section names a model, either as a VIRTANA_MDL_* alias or as a concrete provider model ID, along with the parameters Copilot sends with each request to that model.

The following parameters are supported in a chatbot.conf section:

  • model, required for every LLM and embedding section

  • max_tokens, the response length limit

  • temperature, the sampling temperature

  • streaming, either True or False

  • reasoning_effort, used by reasoning models, with values low, medium, or high

  • verbose, used by some reasoning configurations

  • dimensions, used by embedding sections

Configuration precedence

Copilot resolves its configuration in two independent layers, and knowing which layer wins tells you where to make a change. Connectivity decides where requests go and which key authenticates them; configuration decides which model name and parameters each request carries.

The following rules describe which source takes precedence in each layer:

  • Endpoint and key. Explicit environment values always win. VIRTANA_AI_INFERENCE_ENDPOINT is used as the base URL whenever it's set, and the provider supplies a default only when it's empty.

  • Section content. Overrides in the MongoDB model_configuration collection replace whole sections from chatbot.conf. Replacement happens at section granularity, not key by key, so a key that the MongoDB section omits is not inherited from the file.

  • Tenant scope. Global overrides are stored under the tenant ID global, and a tenant-specific override replaces the global section of the same name.

  • Model name. A model value that is a VIRTANA_MDL_* alias is resolved through the provider mapping and any override variables you set. A model value that is already a concrete model ID, such as gpt-4o-mini, is sent unchanged.

  • Request parameters. The DEFAULT_CONFIG_FOR_CALL_TO_LLM section supplies base values, the workload section overrides those, and a runtime override from the calling code overrides both.

Enable GrowthBook feature flags

This section describes the feature flags that activate the Copilot and insights features for your end users. GrowthBook is the feature-flag service that controls which features appear in the product. After you deploy Global View with the configuration described in Global View configuration, set the two flags below in GrowthBook.

The following table lists each feature flag, the value to set, and the effect of that value:

Feature flag

Default value

Effect

vp_disable_copilot

false

Enables the Copilot Chatbot in the user interface. The flag controls the disable behavior, so a value of false turns the Copilot on.

ipm_virtana_ai_insights

true

Enables AI-powered insights generation in the IPM module.