Model credentials and routing ​
CodeLotse calls language models with keys that a tenant admin stores in the web interface: in setup step Language model access and later under Settings → Language model credentials. Each tier (fast, standard, strong, embeddings) is then routed to one key and one model under Model routing, for the organisation or per repository. The design is described in ADR-0010.
Adding a key ​
The form shows only the fields the chosen provider needs.
| Provider | Endpoint field | Stored value |
|---|---|---|
| OpenAI, Anthropic, Mistral | None. The official API endpoint is used. | No base URL |
| Azure OpenAI | Resource name, for example acme-openai, or the full https endpoint of the resource | https://<resource>.openai.azure.com (or the endpoint you entered) |
| Amazon Bedrock | Region from a list, EU regions first: eu-central-1, eu-west-1, eu-west-2, eu-west-3, eu-north-1, eu-south-1, eu-central-2, then common regions in the Americas and Asia Pacific | Region; use an Amazon Bedrock API key |
| OpenAI-compatible | Service from the list below, or Custom URL. Choosing a service fills in the base URL, which you can still edit. | Base URL |
Keys created before this form existed keep their base URL; the edit form shows it for OpenAI, Anthropic and Mistral keys that have one.
OpenAI-compatible services ​
| Service | Base URL | Hosting | Source |
|---|---|---|---|
| IONOS AI Model Hub | https://openai.inference.de-txl.ionos.com/v1 | EU (Germany) | IONOS docs |
| STACKIT AI Model Serving | https://api.openai-compat.model-serving.eu01.onstackit.cloud/v1 | EU (Germany) | STACKIT docs |
| Scaleway Generative APIs | https://api.scaleway.ai/v1 | EU (France) | Scaleway docs |
| OVHcloud AI Endpoints | https://oai.endpoints.kepler.ai.cloud.ovh.net/v1 | EU (France) | OVHcloud docs |
| OpenRouter | https://openrouter.ai/api/v1 | Hosted service | OpenRouter docs |
| Groq | https://api.groq.com/openai/v1 | Hosted service | Groq docs |
| Together AI | https://api.together.ai/v1 | Hosted service | Together docs |
| Google Gemini API | https://generativelanguage.googleapis.com/v1beta/openai | Hosted service | Gemini docs |
| Ollama | http://localhost:11434/v1 | Your own server | Ollama docs |
| vLLM | http://localhost:8000/v1 | Your own server | vLLM docs |
| LM Studio | http://localhost:1234/v1 | Your own server | LM Studio docs |
| LiteLLM Proxy | http://localhost:4000 | Your own server | LiteLLM docs |
localhost in the self-hosted presets is a placeholder: inside Docker Compose or Kubernetes it is the CodeLotse container itself, so replace it with a host name the API and worker can reach, for example http://ollama:11434/v1. The rules for http and private hosts are in air-gap.md; the enterprise edition accepts only public https endpoints.
Choosing a model ​
Every model field (the model for the connection test and the model of each tier) offers a list of the models available to the selected key. Pick one or type any other model ID; for Azure OpenAI, type the deployment name.
The list comes from GET /api/tenants/:tenantId/llm-credentials/:credentialId/models (tenant:manage), which asks the provider with the stored key:
| Provider | Listing |
|---|---|
| OpenAI, Mistral, OpenAI-compatible | GET <base URL>/models |
| Anthropic | GET https://api.anthropic.com/v1/models?limit=1000 |
| Amazon Bedrock | ListInferenceProfiles and ListFoundationModels (on-demand) in the key's region, with the Bedrock API key |
| Azure OpenAI | Not available with a resource key (deployments are listed only through Azure Resource Manager); suggestions are shown |
- The request uses the same endpoint guard as model calls: no redirects, and in the enterprise edition only public
httpsaddresses. It times out after 8 seconds and reads at most 2 MiB. - Only model IDs and display names are returned. Keys and provider responses are never logged or returned.
- A successful list is cached in Valkey for 10 minutes under
quavon:llm-models:<tenant>:<credential>. Editing or deleting the key clears it. - If the provider cannot list models or the request fails, the field shows a short list of suggested model IDs for the provider and says why. Suggestions are not checked against your account; use Test connection to verify a model.
Model routing ​
Under Model routing, choose a key and a model for the fast, standard and strong tiers; the embeddings tier is optional. A repository can override single tiers under its Policy tab. The embeddings tier is used to compare findings with earlier comments and by the hybrid mode of the code index, which embeds the indexed code with it; supported vector sizes are 384, 768, 1024, 1536 and 3072. Without an embeddings model the code index stays lexical. Budgets and downgrades are described in ADR-0010 and costs in analytics.md.
Reasoning effort ​
Each tier except embeddings has a Reasoning effort: provider default, none, minimal, low, medium, high, extra high or maximum. It sets how long a reasoning model thinks before it answers. More effort finds subtler problems but takes longer and costs more. CodeLotse passes the value to the provider through its reasoning option; models without reasoning ignore it, and a provider that rejects a value fails the call, which shows up as a failed review with the provider's error.
Model and cost of a review ​
The page of a review lists every model it called, with the tier, the number of calls, input and output tokens and the cost. While a review runs, the cost shows what was spent so far. The organisation overview shows the spend of the last 14 days and the five models with the highest spend in the last 30 days to administrators.