From ec676720ff0254a7788ad763e456a4bfc2212cf5 Mon Sep 17 00:00:00 2001 From: happybell80 Date: Mon, 16 Mar 2026 09:50:24 +0900 Subject: [PATCH] Document LLM SSOT implementation progress --- journey/README.md | 2 + ...260316_llm_model_ssot_transition_계획.md | 6 ++- ..._model_ssot_1차구현_및_로컬검증.md | 53 +++++++++++++++++++ 3 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 journey/worklog/260316_llm_model_ssot_1차구현_및_로컬검증.md diff --git a/journey/README.md b/journey/README.md index 945e93e..dbea0a3 100644 --- a/journey/README.md +++ b/journey/README.md @@ -11,6 +11,7 @@ - troubleshooting: `troubleshooting/260316_workspace_config_루트기준_SSOT와_하드코딩_분산_문제오픈.md` - research: `research/260315_모델SSOT_하드코딩_분산과_workspace_config_로컬이식_통합리서치.md` - plans: `plans/260316_llm_model_ssot_transition_계획.md` + - worklog: `worklog/260316_llm_model_ssot_1차구현_및_로컬검증.md` ### 닫힌 문제 @@ -99,6 +100,7 @@ - Calendar Skill 자동휴일감지 행동제어 구현 및 검증 – `worklog/260310_calendar_skill_자동휴일감지_행동제어_구현및검증.md` - 브리핑 조회 윈도우 직전 영업일 기준 확장 – `worklog/260310_briefing_window_직전영업일기준_확장.md` - Company X 내부문서 RAG 근거응답 구현 및 시나리오 검증 – `worklog/260312_companyx_내부문서_rag_근거응답_구현및시나리오검증.md` +- LLM 모델 SSOT 1차구현 및 로컬검증 – `worklog/260316_llm_model_ssot_1차구현_및_로컬검증.md` ## Scenarios diff --git a/journey/plans/260316_llm_model_ssot_transition_계획.md b/journey/plans/260316_llm_model_ssot_transition_계획.md index b1e8533..599d4a7 100644 --- a/journey/plans/260316_llm_model_ssot_transition_계획.md +++ b/journey/plans/260316_llm_model_ssot_transition_계획.md @@ -9,7 +9,7 @@ ## 상태 -- planned +- in_progress ## 목표 @@ -186,6 +186,10 @@ - 문서 변경은 `DOCS` 레포 안에서만 롤백 판단합니다. - 과도기에는 `workspace-config/runtime.env`와 `rb8001/.env`를 이전 값으로 되돌리는 것이 가장 작은 운영 롤백 단위입니다. +## 진행 기록 + +- 로컬 1차 구현 및 검증: [260316 LLM 모델 SSOT 1차구현 및 로컬검증](../worklog/260316_llm_model_ssot_1차구현_및_로컬검증.md) + ## 닫힘 조건 1. 사용자가 "주 모델을 `--`로 바꾸자"라고 했을 때 기본 수정 지점이 `workspace-config/runtime.env`로 답됩니다. diff --git a/journey/worklog/260316_llm_model_ssot_1차구현_및_로컬검증.md b/journey/worklog/260316_llm_model_ssot_1차구현_및_로컬검증.md new file mode 100644 index 0000000..1f9258b --- /dev/null +++ b/journey/worklog/260316_llm_model_ssot_1차구현_및_로컬검증.md @@ -0,0 +1,53 @@ +tags: [worklog, llm, ssot, workspace-config, skill-news, skill-slack, rb8001] + +# 260316 LLM 모델 SSOT 1차구현 및 로컬검증 + +## 상위 원칙 + +- [LLM 모델 SSOT 전환 계획](../plans/260316_llm_model_ssot_transition_계획.md) +- [모델 SSOT 하드코딩 분산과 workspace-config 로컬이식 통합 리서치](../research/260315_모델SSOT_하드코딩_분산과_workspace_config_로컬이식_통합리서치.md) +- [workspace-config 루트기준 SSOT와 하드코딩 분산 문제 오픈](../troubleshooting/260316_workspace_config_루트기준_SSOT와_하드코딩_분산_문제오픈.md) + +## 상태 + +- local-implemented +- server-runtime-unverified + +## 이번 작업에서 구현한 것 + +- `rb8001` + - `LLMRequest.model`을 자유 문자열로 열어 새 모델명 변경 시 코드 수정이 필요 없게 맞췄습니다. + - `internal_llm_service -> LLMRequest` 경로에 `model` 전달을 실제로 연결했습니다. + - `/api/llm/*`, `/complete` 엔드포인트가 요청 모델값을 실제 내부 호출로 전달하게 맞췄습니다. + - `GeminiHandler`의 `GEMINI_MODEL` 재조회와 `ir_analyzer.py`의 모델 fallback 체인을 제거했습니다. + - `coldmail_llm_classifier.py`, `diary/generator.py`, `headlines_workflow.py`를 공용 LLM 경로 중심으로 정리했습니다. +- `skill-slack` + - `digest.py`, `action_extractor.py`, `summarizer.py`의 모델 하드코딩을 제거하고 `DEFAULT_LLM_MODEL` 단일 설정을 따르게 맞췄습니다. +- `skill-news` + - 서비스 코드가 `GEMINI_MODEL` 대신 `DEFAULT_LLM_MODEL`만 읽도록 바꿨습니다. + - `docker-compose.yml`, `.env.example`, `README.md`를 같은 계약으로 맞췄습니다. + - `app/core/config.py`를 추가해 서비스 내부 모델 설정 진입점을 한 곳으로 모았습니다. + +## 로컬 검증 + +- `python3 -m compileall` + - `rb8001` 변경 파일과 `skill-slack`, `skill-news` 앱 전체 기준으로 문법 검증 통과 +- `pytest -q skill-news/tests/test_sea_news_filter.py skill-news/tests/test_sea_news_endpoint.py` + - `5 passed` + - `1 failed` + - 실패 이유: 현재 로컬 테스트 환경에 `pytest-asyncio` 플러그인이 없어 async 테스트 1건이 실행되지 못함 +- `pytest -q rb8001/tests/test_gemini_streaming.py rb8001/tests/test_headlines_workflow.py` + - 실행 환경 의존성 부족으로 수집 단계에서 중단 + - 확인된 누락: `pydantic_settings`, `slack_sdk` + +## 의미 + +- 이제 기본 목표였던 "모델 이걸로 바꾸자" 요청에 대해, 코드상 주요 기준은 `DEFAULT_LLM_MODEL`로 수렴했습니다. +- 특히 `skill-slack`과 `skill-news`가 서비스별 독자 모델 키를 따르지 않고 같은 키 이름을 쓰게 된 점이 1차 구현의 핵심입니다. +- 다만 `workspace-config/runtime.env`가 실제 컨테이너 런타임에서 서비스별 `.env`보다 어떤 우선순위로 적용되는지는 서버/실행 환경 확인이 아직 남아 있습니다. + +## 남은 확인 + +- 서버 런타임에서 `DEFAULT_LLM_MODEL`이 실제로 `workspace-config/runtime.env` 1곳 수정으로 바뀌는지 확인 +- `skill-news/docker-compose.yml`의 `env_file` 추가가 운영 배포 환경과 충돌하지 않는지 확인 +- `rb8001` 테스트 환경 의존성(`pydantic_settings`, `slack_sdk`) 정리 후 관련 테스트 재실행