Skip to content
GitHubLog inStart free
cetra is not released yet. These docs describe the development version.

LLM connections

An LLM connection stores a provider and an API key, so evaluators can call a model on your behalf.

The form offers four choices over three provider APIs:

Provider Notes
OpenAI OpenAI’s API. The base URL is optional, under Advanced, for a proxy.
OpenAI-compatible Any server with an OpenAI-style chat API: Azure OpenAI, vLLM, Ollama, OpenRouter, LiteLLM. Enter its base URL.
Anthropic Messages API.
Gemini Google’s generateContent API.

Over the API, OpenAI and OpenAI-compatible are both "adapter": "openai"; a compatible server sets base_url.

Connections belong to the organization, so every project of the org can use them. Every member can see them, and org admins add, edit, delete and test them.

  1. Open the organization’s LLM connections page and select Add connection.
  2. Choose the provider, give the connection a name and paste the API key. For OpenAI-compatible, enter the server’s base URL.
  3. Optional: pick a default model (the field suggests common model ids for the provider) and open Advanced for the structured output mode, the limits and extra headers.
  4. Select Test connection to check the values before you save them. The test makes one small judge call with the default model and shows whether it worked and how long it took. Then save.

The same works over the API:

Terminal window
curl -X POST http://localhost:8080/api/v1/orgs/<ORG>/llm-connections \
-H "Authorization: Bearer <PAT>" \
-H "Content-Type: application/json" \
-d '{ "name": "openai", "adapter": "openai", "api_key": "<PROVIDER_API_KEY>", "default_model": "gpt-5-mini" }'

Two settings limit the load a connection puts on the provider, shared by every rule that uses it: the number of calls running at once (default 4) and the calls per minute (default 300).

A judge must answer in a fixed shape. The connection’s structured output mode says how to ask for it:

Mode What cetra does
native (default) Uses the provider’s JSON-schema response format.
tool Forces a tool or function call that carries the schema.
prompt Adds the schema to the prompt and parses the text.

If a provider rejects the mode, the judge fails with an error that names the setting to change. cetra does not switch modes by itself.

Test connection checks the values in the form, saved or not. A test of changed values does not touch the saved connection. When you test the saved values with the default model, the panel shows when, as “Tested 5m ago”, or “Last test failed 5m ago” when it did not work. Changing the provider, key, base URL, structured output mode or headers clears that line. Under Advanced, Test embeddings checks an embedding model for issue sources. Anthropic has no embeddings API.

The in-app assistant uses one of your organization’s connections. An org admin picks it in Organization settings → Assistant. Deleting that connection turns the assistant off. A connection marked failing still serves the assistant. See Assistant.

cetra encrypts the API key and any extra header values with the instance’s encryption key before it writes them to the database. The UI and the API never show them again: they show only the last 4 characters of the key and the header names. To replace a key, edit the connection and enter a new one. The key field shows its last 4 characters as a placeholder. If you change the provider or the base URL without entering a new key, cetra keeps the saved key: saving sends it to the new base URL from then on, and Test connection sends it there right away. cetra still refuses private addresses there unless security.allow_private_network_egress is on; see Private networks.

If you run cetra yourself, see Configuration for how to set and rotate the instance key.

cetra blocks outbound requests to private addresses (loopback, private ranges, link-local and similar), so a connection cannot reach services inside your network. To use a local model server such as Ollama or vLLM, an operator sets security.allow_private_network_egress to true in the server configuration. The UI cannot read that setting. The same setting covers webhook evaluators and other outbound calls.

If the provider answers with an authentication, billing, quota or not-found error, cetra marks the connection as failing and pauses every online rule that uses it. A successful test of the saved values with the default model, or a new key, resumes them.