Coverage for src / lilbee / core / config / keys.py: 100%
5 statements
« prev ^ index » next coverage.py v7.13.4, created at 2026-06-28 01:01 +0000
« prev ^ index » next coverage.py v7.13.4, created at 2026-06-28 01:01 +0000
1"""Config-field key sets shared by the settings boundary and worker pool."""
3from __future__ import annotations
5# Keep in sync with ``providers.sdk_backend.API_KEY_FIELDS``.
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 "chat_model",
27 "embedding_model",
28 "vision_model",
29 "reranker_model",
30 }
31)
33# Subset of LOAD_AFFECTING_KEYS the worker can swap in place on the next call.
34PER_CALL_RELOADABLE_KEYS: frozenset[str] = frozenset({"chat_model", "vision_model"})
36# Writes here require reconstructing the services singleton.
37PROVIDER_SWITCHING_KEYS: frozenset[str] = frozenset({"llm_provider"})