[#17] Gemini를 기본 AI provider로 연결한다#18
Merged
Merged
Conversation
There was a problem hiding this comment.
Code Review
이번 풀 요청은 기존 OpenAI 대신 Gemini API를 기본 AI 예측 프로바이더로 도입하기 위해 GeminiPredictionClient를 추가하고 관련 문서 및 테스트 코드를 작성한 변경사항을 담고 있습니다. 리뷰어 피드백에 따르면, Gemini v1beta API 명세에 맞게 generationConfig 구조와 systemInstruction 필드명을 수정해야 하며, 스키마 정의 시 타입명을 대문자(OBJECT, STRING 등)로 변경해야 API 호출 오류를 방지할 수 있습니다. 또한 존재하지 않는 gemini-3.5-flash 모델명을 실제 존재하는 모델명으로 변경하고, 이에 맞춰 테스트 코드의 검증 로직도 함께 수정할 것을 권장합니다.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
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.
🔗 연관된 이슈
🎯 의도
Gemini API를 Watcher의 기본 AI provider로 연결하기 위한 기반 구성
📝 작업 내용
📌 요약
GEMINI_API_KEY기반 secret 계약 반영🔍 상세
src/ai/geminiPredictionClient.ts에GeminiPredictionClient추가DEFAULT_GEMINI_PREDICTION_MODEL을gemini-3.5-flash로 구성GEMINI_API_KEY_ENV_NAME을 통해 Gemini API key environment variable 명시generateContentendpoint 호출 구성system_instruction,contents,generationConfig.responseFormat기반 JSON 응답 요청 구성candidates[].content.parts[].text를 JSON으로 parse하도록 구성createDefaultAiPredictionClient()를 통해 기본 AI provider가 Gemini임을 코드 레벨에서 표현src/index.ts에서 Gemini client, 기본 model, API key env 이름, default factory exporttests/ai/geminiPredictionClient.test.ts에 API key 누락, request payload, response parse, request 실패, 빈 응답, default factory 테스트 추가README.md에 Gemini API와GEMINI_API_KEYsecret 사용 기준 추가AGENTS.md에서 OpenAI 기본 전제를 Gemini 기준으로 정리✅ 검증
npm run buildnpm test📸 영상 / 이미지 (Optional)
없음