Skip to main content

Configuration

QALITA Studio offers great flexibility in configuring AI providers and their parameters.

Configuration Architecture​

Studio's LLM configuration is managed through QALITA Platform's Settings > AI Configuration interface. Configurations are stored in the Platform database and linked to your organization (partner).

Configuration Model​

Each LLM configuration includes:

FieldDescription
nameDisplay name for the configuration
providerProvider type (openai, anthropic, ollama, etc.)
model_nameSpecific model to use
fallback_model_nameOptional model of the same endpoint, used automatically when model_name does not answer
api_keyAPI key for authentication. Write-only: responses carry has_api_key instead
endpoint_urlCustom endpoint URL (for Ollama, Azure, generic)
is_activeWhether this is the active configuration
configurationAdditional parameters (temperature, timeout, etc.)
is_default_providerRead-only: set by the Platform on the global configuration, owned by no team

The Platform also stores the result of the last availability check: health_status (ok, fallback, unavailable, or empty when not checked yet), health_error and health_checked_at. These fields are read-only. See Fallback model and availability monitoring.

Multiple Configurations​

You can create multiple LLM configurations for different use cases:

  • Development: Use Ollama for free local testing
  • Production: Use GPT-4o for high-quality responses
  • Cost-optimized: Use GPT-4o-mini for routine tasks

Available Providers​

1. Ollama (Local)​

The local provider uses Ollama to run open-source models locally.

Advantages:

  • ✅ Free and unlimited
  • ✅ Total privacy (local data)
  • ✅ No network dependency
  • ✅ Many models available

Platform Configuration:

FieldValue
ProviderOllama
Endpoint URLhttp://localhost:11434 (or your host)
Modelllama3.2, qwen2.5:7b, etc.
API KeyNot required

Recommended Models:

ModelSizeUsagePerformance
qwen2.5:7b7BGeneral, multilingual⭐⭐⭐⭐⭐
llama3.23BFast, lightweight⭐⭐⭐⭐
mistral:7b7BReasoning⭐⭐⭐⭐⭐
phi3:medium14BPrecise⭐⭐⭐⭐
deepseek-coder:6.7b6.7BSQL/Python code⭐⭐⭐⭐⭐

Installing a model:

# Download a model
ollama pull qwen2.5:7b

# List installed models
ollama list

# Test a model
ollama run qwen2.5:7b "Hello!"

Verification:

Test endpoint: http://127.0.0.1:11434/api/tags

Network Access

Ensure the Platform backend can reach the Ollama server. If Ollama runs on a different host, use its IP address or hostname.

The backend refuses endpoints on a loopback or private address unless they are allowed: an Ollama server on localhost, on the Docker network or in the cluster must be listed in QALITA_OUTBOUND_ALLOWED_HOSTS (for example localhost:11434 or ollama.ai.svc.cluster.local:11434), or be the LLM_ENDPOINT_URL of the env-default configuration. See Outbound requests.

2. OpenAI (ChatGPT)​

Access GPT-4, GPT-4o, and GPT-3.5 models.

Platform Configuration:

FieldValue
ProviderOpenAI
API Keysk-proj-...
Modelgpt-4o, gpt-4o-mini, gpt-3.5-turbo
Endpoint URLNot required (uses default)

Available Models:

ModelContextCostUsage
gpt-4o128K$$Best quality/price ratio
gpt-4o-mini128K$Fast and economical
gpt-3.5-turbo16K$Basic, fast

Getting an API key:

  1. Create an account on platform.openai.com
  2. Go to API Keys
  3. Create a new secret key
  4. Copy it (it won't be visible again)

Pricing: Check openai.com/pricing

3. Azure OpenAI​

Enterprise-grade OpenAI models on Azure infrastructure.

Platform Configuration:

FieldValue
ProviderAzure OpenAI
Endpoint URLhttps://your-resource.openai.azure.com/
API KeyYour Azure OpenAI API key
ModelYour deployed model name

Advantages:

  • Enterprise compliance and security
  • Regional data residency
  • SLA guarantees
  • Integration with Azure services

Getting started:

  1. Create an Azure OpenAI resource in Azure Portal
  2. Deploy a model (gpt-4o, gpt-4, etc.)
  3. Get the endpoint URL and API key from the resource

4. Mistral AI​

High-quality French models.

Platform Configuration:

FieldValue
ProviderMistral
API KeyFrom console.mistral.ai
Modelmistral-large-latest, mistral-small-latest

Available Models:

ModelContextPerformance
mistral-large-latest128KExcellent
mistral-small-latest32KGood
open-mistral-7b32KDecent

Getting an API key:

  1. Sign up on console.mistral.ai
  2. Create an API Key
  3. Top up your credits if necessary

Advantages:

  • Excellent for French language
  • Good context understanding
  • Competitive pricing

5. Claude (Anthropic)​

Claude 3 models for advanced reasoning.

Platform Configuration:

FieldValue
ProviderAnthropic
API Keysk-ant-... from console.anthropic.com
Modelclaude-3-5-sonnet-20241022, claude-3-opus-20240229

Available Models:

ModelContextCapabilities
claude-3-5-sonnet-20241022200KVersatile excellence
claude-3-opus-20240229200KComplex reasoning
claude-3-haiku-20240307200KFast and lightweight

Getting an API key:

  1. Create an account on console.anthropic.com
  2. Go to API Keys
  3. Generate a new key

Features:

  • Excellent for complex analysis
  • Very good in multiple languages
  • Context up to 200K tokens

6. Generic Provider (OpenAI-compatible) 🔧​

Connect to any OpenAI-compatible API endpoint (vLLM, LM Studio, etc.).

Platform Configuration:

FieldValue
ProviderGeneric
Endpoint URLYour server URL (e.g., http://localhost:8000/v1)
API KeyServer API key (if required)
ModelModel name as expected by the server

Use cases:

  • Self-hosted LLM servers (vLLM, text-generation-inference)
  • LM Studio local deployment
  • Custom fine-tuned models
  • Air-gapped environments
OpenAI-compatible endpoints

Use the Generic provider for any self-hosted or internal endpoint that speaks the OpenAI API. The OpenAI provider always calls api.openai.com and ignores the endpoint URL. With Generic, the configuration form lists every model the endpoint offers, so you can pick a main model and a fallback model from that list.

A self-hosted endpoint on a loopback or private address, such as http://localhost:8000/v1 or a cluster service, must be listed in QALITA_OUTBOUND_ALLOWED_HOSTS by an operator; otherwise the form and the Test button report "This endpoint is not allowed". See Outbound requests.

Configuration via Platform Interface​

Add a Configuration​

  1. Go to Settings in Platform
  2. Navigate to AI Configuration
  3. Click Add Configuration
  4. Fill in the required fields:
    • Name: Display name for this configuration
    • Provider: Select from dropdown
    • API Key: For cloud providers
    • Model: Exact model name
    • Endpoint URL: For Ollama, Azure, or Generic
  5. Click Test Connection to verify
  6. If ✅ success, click Save

Activate a Configuration​

  1. In AI Configuration list
  2. Click on the desired configuration
  3. Toggle Active to enable
  4. Only one configuration of your team can be active at a time

When no configuration is chosen (Studio default, source AI, agents without a configuration), your team's active configuration is used before any global configuration (owned by no team, such as env-default). Deactivate it to use the global configuration again. An agent or a Studio session that selects a configuration explicitly keeps using that one.

Edit or Delete​

  1. Click on a configuration to edit
  2. Use the Delete button to remove

Editing keeps the additional parameters stored in configuration (temperature, timeout, etc.).

Global configurations (owned by no team, such as env-default) are read-only in the interface and in the API: their card carries an Instance-wide label and only the Test button. They are managed through environment variables, see Configuration provisioned from environment variables.

Fallback model and availability monitoring​

A model can disappear from an endpoint without notice, for example when the team running a self-hosted endpoint withdraws or replaces it. The Platform detects this, keeps AI features working on a fallback model when one is set, and lets an administrator switch models from the interface without redeploying.

Fallback model​

Each configuration can name a Fallback model, picked in the configuration form from the models the endpoint offers. It uses the same provider, endpoint and API key as the main model.

When the main model fails (model not found, authentication refused, endpoint error or timeout), the request is retried on the fallback model. This applies to every AI feature: Studio, autonomous agents, Pack Studio and the AI suggestions on sources. While the last check reports the main model as down, the fallback model is tried first, so users do not wait for the main model to time out on every request.

Availability check​

The Platform backend checks every configuration in use every 5 minutes: the active configurations and those pinned by an active autonomous agent. Each check sends a one-word prompt to the main model, with the request timeout of the configuration (60 seconds by default). The main model counts as down only when it fails twice in a row, a few seconds apart, so a short outage or a model that is slow to load does not switch requests to the fallback model. The fallback model is then checked too. Set LLM_HEALTH_CHECK_INTERVAL_SECONDS to change the interval, or to 0 to turn the check off.

The Test button on a configuration runs the same check on demand and shows whether each model answers. It checks both models at the same time and limits each attempt to 30 seconds, so the result comes back in under 90 seconds even when the endpoint hangs. A model that needs more than 30 seconds to answer is therefore reported down by a Test; the next periodic check, with the configuration's request timeout, corrects the status. When an administrator runs a Test on a configuration of their team or on a global one (a configuration that belongs to no team, such as env-default), the result is stored as the configuration's status.

StatusMeaning
Available (ok)The main model answers
Fallback in use (fallback)The main model does not answer, the fallback model does
Unavailable (unavailable)Neither model answers
Not checkedNo check has run since the configuration was created or its model, endpoint or key changed

What users and administrators see​

  • Studio shows a banner above the conversation while the active model is in fallback or unavailable. The banner follows the stored status: Studio reads it again every 5 minutes and when its window regains focus.
  • Studio also replies "AI model unavailable" and says that an administrator can switch the model, instead of a raw error, when the model fails during a conversation, before the answer starts or after a tool call. An answer cut off while it streams keeps its partial text and shows no error. The banner and the administrator notifications report the outage once the availability check detects it.
  • Settings > AI shows on each configuration its status, the time of the last check and the last error. After a Test, it also says when the fallback model does not answer.
  • Administrators receive an in-app notification when a configuration becomes unavailable or falls back, and again when it recovers. A configuration of one team notifies that team's administrators; a global configuration notifies all administrators.

Switching the model​

  1. Go to Settings > AI (administrators only).
  2. Edit your team's configuration. With the Generic, OpenRouter and Ollama providers, the form warns when the model or the fallback model is not in the endpoint's model list.
  3. Pick another model, and optionally a fallback model, then save.

The change applies to the next AI request, without restarting or redeploying the Platform. Changing the model, the fallback model, the endpoint or the key resets the status to "Not checked"; click Test to check it right away.

env-default cannot be edited from Settings > AI. To move away from it, add a configuration for your team from the provider tiles, with the endpoint's API key, and make it active: it is used before env-default wherever no configuration is chosen. Agents and Studio sessions that select env-default explicitly keep using it until you select the new configuration. You can also change LLM_MODEL or LLM_FALLBACK_MODEL and restart the backend.

Configuration provisioned from environment variables​

When the backend is started with LLM_PROVIDER and the other LLM_* variables, it creates or updates a global configuration named env-default at each start.

  • env-default is managed only through these variables: it is read-only in Settings > AI, and the API refuses to modify or delete it (403).
  • It serves the teams that have no active configuration of their own. When no configuration is chosen (Studio default, source AI, agents without a configuration), a team's own active configuration is used first; an agent or a Studio session that selects env-default explicitly keeps using it.
  • A team cannot create a global configuration: is_default_provider is set by the Platform only, and ignored in API requests.
  • Values changed in Settings > AI with QALITA 3.2.0 are kept until their variable changes: at startup, each of the provider, endpoint, API key, model and fallback model is overwritten only when its environment variable has changed since the previous start. Set LLM_FALLBACK_MODEL to provision the fallback model.
  • The temperature, request timeout and retries always come from LLM_TEMPERATURE, LLM_TIMEOUT_SECONDS and LLM_MAX_RETRIES, and env-default is made active again at each start.
  • The configuration is found by its name: keep it named env-default. A renamed configuration is no longer updated, and the next start creates a new env-default.
  • If LLM_PROVIDER is empty, an env-default configuration without provider is deactivated, so Studio reports that no AI provider is configured.

Configuration via API​

LLM configurations are managed through the Platform's standard REST API.

Get Agent Capabilities​

GET /api/v1/studio/agent/capabilities

Returns the current agent status and active configuration:

{
"agent_available": true,
"llm_configured": true,
"active_config": {
"id": 1,
"name": "Production OpenAI",
"provider": "openai",
"model_name": "gpt-4o-mini",
"endpoint_url": null,
"fallback_model_name": "gpt-4.1-mini",
"health_status": "ok",
"health_checked_at": "2026-10-23T08:00:00+00:00"
}
}

health_status is null until the first check. Errors from the Studio chat endpoints carry error_code: "llm_unavailable" when the AI model did not answer. The error events of the streaming endpoint keep their error key.

Get Studio Status​

GET /api/v1/studio/status

Returns worker connectivity status:

{
"connected_workers": [1, 3],
"worker_count": 2
}

Backend Dependencies​

For the agent module to be available, install the required Python packages on the Platform backend:

pip install langchain langgraph langchain-openai langchain-anthropic langchain-ollama

These are optional dependencies. If not installed, the agent_available field will be false.

Advanced Configuration​

Custom Models (Ollama)​

You can create your own models with Ollama:

# Create a Modelfile
cat > Modelfile <<EOF
FROM qwen2.5:7b
SYSTEM "You are a data quality expert. Always answer professionally."
PARAMETER temperature 0.7
PARAMETER top_p 0.9
EOF

# Create the model
ollama create qalita-expert -f Modelfile

# Use in Platform configuration
# model: "qalita-expert"

Additional Configuration Parameters​

The configuration field in Platform supports extra parameters:

{
"temperature": 0.0,
"timeout_seconds": 60.0,
"max_retries": 2
}
ParameterTypeDefaultDescription
temperaturefloat0.0Creativity (0.0 = deterministic, 1.0 = creative)
timeout_secondsfloat60.0Request timeout
max_retriesint2Retry attempts on failure

Other keys are passed to the LangChain model, except those that would replace its HTTP client, proxy or transport (http_client, http_async_client, client_kwargs, openai_proxy, anthropic_proxy, proxy, transport…), those that would build another model class than the provider's (model_provider, configurable_fields, config_prefix) and, for the Anthropic and Mistral providers, its endpoint URL (base_url, anthropic_api_url, endpoint). A configuration with such a key is refused with "This AI configuration is not allowed".

Security​

API Key Protection​

  • API keys and MCP server header values are write-only, for every role, administrators included. Responses carry has_api_key instead of the key, and MCP header values come back as ********.
  • In Settings > AI Configuration, a key field left empty keeps the saved key, a typed key replaces it, and Remove the saved key clears it.
  • Over the REST API, a PUT without api_key, or with an empty or null value, keeps the stored key, and "clear_api_key": true removes it. Masked MCP header values sent back keep the stored values.
  • Request logs keep the names of query parameters, never their values.
  • Keys are stored in clear in the Platform database: protect database access and backups.
  • Rotate keys periodically.

Data Privacy​

Studio conversations may include:

  • Data samples from sources
  • Quality metrics and recommendations
  • Schema information

Ensure your LLM provider's data handling policies align with your organization's requirements. For maximum privacy, use Ollama with local models.

Troubleshooting​

"Agent module not available"​

Install the required dependencies on the Platform backend:

pip install langchain langgraph langchain-openai langchain-anthropic langchain-ollama

"No LLM configuration found"​

  1. Go to Settings > AI Configuration
  2. Create a new configuration
  3. Set it as Active

"Model not found in Ollama"​

# Check that the model is installed
ollama list

# Install it if necessary
ollama pull <model-name>

"AI model unavailable"​

The configured model did not answer: it may have been withdrawn or renamed on the endpoint, or the endpoint may be down.

  1. Open Settings > AI and read the status and last error of the configuration.
  2. Edit it: if the form says the model is not in the endpoint's model list, pick one from the list. env-default is read-only: add a configuration for your team instead, or change LLM_MODEL and restart the backend (see Switching the model).
  3. Set a Fallback model so that AI features keep working during the next outage.
  4. Click Test to confirm that the model answers.

Authentication error (401/403)​

  • Verify that your API key is valid
  • Test directly with the provider's API
  • Check that you have available credits

Connection timeout​

Check network connectivity from the Platform backend to the LLM provider:

# For Ollama
curl http://localhost:11434/api/tags

# For OpenAI
curl https://api.openai.com/v1/models \
-H "Authorization: Bearer YOUR_KEY"

"This endpoint is not allowed"​

The endpoint resolves to a loopback, private, link-local or other non-public address, which the backend does not call unless an operator allows it. This protects the Platform's internal services from URLs entered in the interface.

  • For a self-hosted endpoint (Ollama, vLLM, LM Studio, an internal gateway), add its host or host:port to QALITA_OUTBOUND_ALLOWED_HOSTS on the backend and restart it. See Outbound requests.
  • Link-local and cloud metadata addresses, the Kubernetes API and the Platform's own database and S3 endpoint cannot be allowed.
  • The backend log names the refused host and address.

Best Practices​

  1. Start with Local: Test with Ollama first before using paid APIs
  2. Adapted Models: Choose the model according to your use case
  3. Cost Monitoring: Use gpt-4o-mini for development and testing
  4. Security: Rotate API keys periodically
  5. Multiple Configs: Create configurations for different environments

Next Steps​