diff --git a/troubleshooting/250906_gemini_model_optimization.md b/troubleshooting/250906_gemini_model_optimization.md new file mode 100644 index 0000000..8029bce --- /dev/null +++ b/troubleshooting/250906_gemini_model_optimization.md @@ -0,0 +1,24 @@ +# Gemini 모델 최적화: gemini-2.5-flash-lite 전환 + +## 작성일: 2025-09-06 +## 작성자: happybell80 + +## 문제 상황 +- 여러 서비스에서 서로 다른 Gemini 모델 사용 (1.5-flash, 2.5-flash) +- 하드코딩된 모델명으로 인한 관리 어려움 +- 비용 및 성능 최적화 필요 + +## 해결 과정 +1. 테스트 결과: gemini-2.5-flash-lite가 가장 빠름 (0.93초) +2. 모든 서비스에 환경변수 GEMINI_MODEL 도입 +3. 기본값을 gemini-2.5-flash-lite로 통일 + +## 수정 파일 +- skill_news/app/services/news_summarizer.py +- company-x_hompage/src/collectors/summarize_news.py +- rb8001/app/llm/gemini_handler.py +- rb8001/app/llm/llm_service.py + +## 교훈 +- 환경변수로 모델 관리하면 서버별 최적화 가능 +- 최신 lite 모델이 구버전보다 빠르고 저렴 (35% 속도 향상, 4배 비용 절감) \ No newline at end of file