리팩토링: ExternalAiClientImpl 책임별 클라이언트 분리 - #18
Merged
Conversation
1개 클래스(293줄)에 GPT/YOLO/LAMA/S3 4개 외부 시스템이 섞여있던 구조를 시스템별 클라이언트로 분리하고, 기존 클래스는 thin composite로 슬림화. - GptVisionClient: GPT-4 Vision 분석/비교 + 응답 파싱 - YoloDetectionClient: 어지러운 영역 감지 - LamaInpaintClient: 인페인팅 + 전용 RestTemplate(multipart) - S3ImageStore: AI 파이프라인 전용 S3 헬퍼(다운로드/Base64/업로드) - ExternalAiClientImpl: 293줄 → 50줄 thin composite로 위임 도메인 인터페이스(ExternalAiClient)는 미변경 → 도메인 영향 없음. 부수 개선: - requestCompareAnalysis의 catch(Exception)이 OpenAI 429를 묵살하던 사일런트 버그 수정 → AI_RATE_LIMIT_EXCEEDED로 일관 처리 - 사용되지 않던 @value 필드 3개 제거(openai.api.url, openai.api.url.image, openai.api.key) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
1개 클래스(293줄)에 GPT/YOLO/LAMA/S3 4개 외부 시스템이 섞여있던 구조를 시스템별 클라이언트로 분리하고, 기존 클래스는 thin composite로 슬림화.
도메인 인터페이스(ExternalAiClient)는 미변경 → 도메인 영향 없음.
부수 개선: