Coverage for src/lilbee/core/config/keys.py: 100%
4 statements
« prev ^ index » next coverage.py v7.15.2, created at 2026-11-06 08:17 +0000
« prev ^ index » next coverage.py v7.15.2, created at 2026-11-06 08:17 +0000
1"""Config-field key sets shared by the settings boundary and the engine."""
3from __future__ import annotations
5# API-key cfg field names: keep in sync with ``providers.sdk_backend.PROVIDER_KEYS``.
6PROVIDER_API_KEYS: frozenset[str] = frozenset(
7 {
8 "llm_api_key",
9 "openrouter_api_key",
10 "gemini_api_key",
11 "anthropic_api_key",
12 "openai_api_key",
13 "mistral_api_key",
14 "deepseek_api_key",
15 }
16)
18# Settings whose value is baked into a loaded model and only takes effect
19# after the worker reloads.
20LOAD_AFFECTING_KEYS: frozenset[str] = frozenset(
21 {
22 "num_ctx",
23 "num_ctx_max",
24 "chat_n_ctx_target",
25 "kv_cache_type",
26 # Baked into the llama-server argv (--n-gpu-layers, --cpu-moe, --n-cpu-moe,
27 # --flash-attn), so a change must re-plan the fleet.
28 "n_gpu_layers",
29 "cpu_moe",
30 "n_cpu_moe",
31 "flash_attention",
32 "chat_model",
33 "embedding_model",
34 "vision_model",
35 "reranker_model",
36 "reranker_type",
37 # The embed/rerank window and the chat floor are sized from the chunk budget.
38 "chunk_size",
39 }
40)
42# Writes here require reconstructing the services singleton.
43PROVIDER_SWITCHING_KEYS: frozenset[str] = frozenset({"llm_provider"})