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:
| Field | Description |
|---|---|
name | Display name for the configuration |
provider | Provider type (openai, anthropic, ollama, etc.) |
model_name | Specific model to use |
fallback_model_name | Optional model of the same endpoint, used automatically when model_name does not answer |
api_key | API key for authentication. Write-only: responses carry has_api_key instead |
endpoint_url | Custom endpoint URL (for Ollama, Azure, generic) |
is_active | Whether this is the active configuration |
configuration | Additional parameters (temperature, timeout, etc.) |
is_default_provider | Read-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:
| Field | Value |
|---|---|
| Provider | Ollama |
| Endpoint URL | http://localhost:11434 (or your host) |
| Model | llama3.2, qwen2.5:7b, etc. |
| API Key | Not required |
Recommended Models:
| Model | Size | Usage | Performance |
|---|---|---|---|
qwen2.5:7b | 7B | General, multilingual | ⭐⭐⭐⭐⭐ |
llama3.2 | 3B | Fast, lightweight | ⭐⭐⭐⭐ |
mistral:7b | 7B | Reasoning | ⭐⭐⭐⭐⭐ |
phi3:medium | 14B | Precise | ⭐⭐⭐⭐ |
deepseek-coder:6.7b | 6.7B | SQL/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
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:
| Field | Value |
|---|---|
| Provider | OpenAI |
| API Key | sk-proj-... |
| Model | gpt-4o, gpt-4o-mini, gpt-3.5-turbo |
| Endpoint URL | Not required (uses default) |
Available Models:
| Model | Context | Cost | Usage |
|---|---|---|---|
gpt-4o | 128K | $$ | Best quality/price ratio |
gpt-4o-mini | 128K | $ | Fast and economical |
gpt-3.5-turbo | 16K | $ | Basic, fast |
Getting an API key:
- Create an account on platform.openai.com
- Go to API Keys
- Create a new secret key
- 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:
| Field | Value |
|---|---|
| Provider | Azure OpenAI |
| Endpoint URL | https://your-resource.openai.azure.com/ |
| API Key | Your Azure OpenAI API key |
| Model | Your deployed model name |
Advantages:
- Enterprise compliance and security
- Regional data residency
- SLA guarantees
- Integration with Azure services
Getting started:
- Create an Azure OpenAI resource in Azure Portal
- Deploy a model (gpt-4o, gpt-4, etc.)
- Get the endpoint URL and API key from the resource
4. Mistral AI
High-quality French models.
Platform Configuration:
| Field | Value |
|---|---|
| Provider | Mistral |
| API Key | From console.mistral.ai |
| Model | mistral-large-latest, mistral-small-latest |
Available Models:
| Model | Context | Performance |
|---|---|---|
mistral-large-latest | 128K | Excellent |
mistral-small-latest | 32K | Good |
open-mistral-7b | 32K | Decent |
Getting an API key:
- Sign up on console.mistral.ai
- Create an API Key
- 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:
| Field | Value |
|---|---|
| Provider | Anthropic |
| API Key | sk-ant-... from console.anthropic.com |
| Model | claude-3-5-sonnet-20241022, claude-3-opus-20240229 |
Available Models:
| Model | Context | Capabilities |
|---|---|---|
claude-3-5-sonnet-20241022 | 200K | Versatile excellence |
claude-3-opus-20240229 | 200K | Complex reasoning |
claude-3-haiku-20240307 | 200K | Fast and lightweight |
Getting an API key:
- Create an account on console.anthropic.com
- Go to API Keys
- 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:
| Field | Value |
|---|---|
| Provider | Generic |
| Endpoint URL | Your server URL (e.g., http://localhost:8000/v1) |
| API Key | Server API key (if required) |
| Model | Model 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
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
- Go to Settings in Platform
- Navigate to AI Configuration
- Click Add Configuration
- 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
- Click Test Connection to verify
- If ✅ success, click Save
Activate a Configuration
- In AI Configuration list
- Click on the desired configuration
- Toggle Active to enable
- 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
- Click on a configuration to edit
- 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.
| Status | Meaning |
|---|---|
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 checked | No 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
- Go to Settings > AI (administrators only).
- 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.
- 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-defaultis 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-defaultexplicitly keeps using it. - A team cannot create a global configuration:
is_default_provideris 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_MODELto provision the fallback model. - The temperature, request timeout and retries always come from
LLM_TEMPERATURE,LLM_TIMEOUT_SECONDSandLLM_MAX_RETRIES, andenv-defaultis 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 newenv-default. - If
LLM_PROVIDERis empty, anenv-defaultconfiguration 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
}
| Parameter | Type | Default | Description |
|---|---|---|---|
temperature | float | 0.0 | Creativity (0.0 = deterministic, 1.0 = creative) |
timeout_seconds | float | 60.0 | Request timeout |
max_retries | int | 2 | Retry 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_keyinstead 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
PUTwithoutapi_key, or with an empty ornullvalue, keeps the stored key, and"clear_api_key": trueremoves 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"
- Go to Settings > AI Configuration
- Create a new configuration
- 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.
- Open Settings > AI and read the status and last error of the configuration.
- Edit it: if the form says the model is not in the endpoint's model list, pick one from the list.
env-defaultis read-only: add a configuration for your team instead, or changeLLM_MODELand restart the backend (see Switching the model). - Set a Fallback model so that AI features keep working during the next outage.
- 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:porttoQALITA_OUTBOUND_ALLOWED_HOSTSon 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
- Start with Local: Test with Ollama first before using paid APIs
- Adapted Models: Choose the model according to your use case
- Cost Monitoring: Use
gpt-4o-minifor development and testing - Security: Rotate API keys periodically
- Multiple Configs: Create configurations for different environments
Next Steps
- 🚀 Features - Explore all Studio capabilities
- 💬 Conversation Management - Organize your conversations
- 🔧 Platform Integration - Deep dive into Platform integration