LLM 호출 규격 전환: 고객사 사내 LLM(FabriX/Gauss) 헤더 지원 (LLM_PROVIDER=fabrix)
- settings: LLM_PROVIDER/LLM_CHAT_PATH/LLM_BODY_MODEL/LLM_JSON_MODE/LLM_MAX_TOKENS, FABRIX_* 3종, llm_enabled() - llm_client: headers()/body() 를 규격별로 구성. fabrix 는 x-openapi-token(Bearer)/x-generative-ai-client/ x-llm-model-id/x-generative-ai-user-email, body model 은 LLM_BODY_MODEL - summarize/ping: 접속 점검 명령 (--show 로 요청만 확인) - docs/llm-provider-plan.md: 계획·.env 값·오류별 조치. 기본값은 openai 라 기존 동작 불변 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
89deb108b0
commit
0f70c0d245
+3
-3
@@ -142,7 +142,7 @@ def ingest(payload: dict = Body(), background_tasks: BackgroundTasks = None) ->
|
||||
# SUMMARIZE_BACKEND=file 이면 키 없이 프롬프트만 큐에 쌓는다 (/summaries/jobs 로 확인).
|
||||
backend = settings.summarize_backend
|
||||
summarize = "disabled"
|
||||
if backend != "off" and (backend == "file" or (settings.llm_base_url and settings.llm_api_key)):
|
||||
if backend != "off" and (backend == "file" or settings.llm_enabled()):
|
||||
if status == "loaded" or pending:
|
||||
with _summarizing_lock:
|
||||
already = program in _summarizing
|
||||
@@ -328,7 +328,7 @@ def summaries_status() -> dict:
|
||||
running = sorted(_summarizing)
|
||||
return {
|
||||
"model": settings.llm_model,
|
||||
"llm_enabled": bool(settings.llm_base_url and settings.llm_api_key),
|
||||
"llm_enabled": settings.llm_enabled(),
|
||||
"running": running,
|
||||
"programs": per_program,
|
||||
"failures": failures,
|
||||
@@ -392,7 +392,7 @@ def _persist_env(key: str, value: str) -> None:
|
||||
def get_llm_settings() -> dict:
|
||||
return {
|
||||
"model": settings.llm_model,
|
||||
"enabled": bool(settings.llm_base_url and settings.llm_api_key),
|
||||
"enabled": settings.llm_enabled(),
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user