Skip to content

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.

ProviderEndpoint fieldStored value
OpenAI, Anthropic, MistralNone. The official API endpoint is used.No base URL
Azure OpenAIResource name, for example acme-openai, or the full https endpoint of the resourcehttps://<resource>.openai.azure.com (or the endpoint you entered)
Amazon BedrockRegion 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 PacificRegion; use an Amazon Bedrock API key
OpenAI-compatibleService 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 &ZeroWidthSpace;

ServiceBase URLHostingSource
IONOS AI Model Hubhttps://openai.inference.de-txl.ionos.com/v1EU (Germany)IONOS docs
STACKIT AI Model Servinghttps://api.openai-compat.model-serving.eu01.onstackit.cloud/v1EU (Germany)STACKIT docs
Scaleway Generative APIshttps://api.scaleway.ai/v1EU (France)Scaleway docs
OVHcloud AI Endpointshttps://oai.endpoints.kepler.ai.cloud.ovh.net/v1EU (France)OVHcloud docs
OpenRouterhttps://openrouter.ai/api/v1Hosted serviceOpenRouter docs
Groqhttps://api.groq.com/openai/v1Hosted serviceGroq docs
Together AIhttps://api.together.ai/v1Hosted serviceTogether docs
Google Gemini APIhttps://generativelanguage.googleapis.com/v1beta/openaiHosted serviceGemini docs
Ollamahttp://localhost:11434/v1Your own serverOllama docs
vLLMhttp://localhost:8000/v1Your own servervLLM docs
LM Studiohttp://localhost:1234/v1Your own serverLM Studio docs
LiteLLM Proxyhttp://localhost:4000Your own serverLiteLLM 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 &ZeroWidthSpace;

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:

ProviderListing
OpenAI, Mistral, OpenAI-compatibleGET <base URL>/models
AnthropicGET https://api.anthropic.com/v1/models?limit=1000
Amazon BedrockListInferenceProfiles and ListFoundationModels (on-demand) in the key's region, with the Bedrock API key
Azure OpenAINot 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 https addresses. 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 &ZeroWidthSpace;

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 &ZeroWidthSpace;

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 &ZeroWidthSpace;

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.

The open core is released under the Apache License 2.0.