INNER CODE UNIT · Python
_resolve_backend_init_config
TianGzlab/OmicsClaw · omicsclaw/surfaces/desktop/server.py:477
def _resolve_backend_init_config() -> dict[str, str]:
"""Resolve backend startup config from the documented env surface.
The local setup guide and `.env.example` use the `LLM_*` namespace.
Older desktop integrations may still populate `OMICSCLAW_*`, so we
support both and prefer the newer documented keys.
"""
return {
"provider": _read_first_config_value("LLM_PROVIDER", "OMICSCLAW_PROVIDER"),
"api_key": _read_first_config_value("LLM_API_KEY", "OMICSCLAW_API_KEY"),
"base_url": _read_first_config_value("LLM_BASE_URL", "OMICSCLAW_BASE_URL"),
"model": _read_first_config_value("OMICSCLAW_MODEL"),
"auth_mode": (_read_first_config_value("LLM_AUTH_MODE") or "api_key")
.strip()
.lower(),
"ccproxy_port": _read_first_config_value("CCPROXY_PORT") or "11435",
}