[#24] Gemini prediction 400 응답 원인을 진단하고 수정한다#25
Merged
Conversation
There was a problem hiding this comment.
Code Review
이번 PR은 Gemini API 호출 실패 시 응답 본문을 포함하여 상세한 에러 메시지를 로깅하도록 개선하고, 워크플로우에 watcher_version 입력을 추가하여 수동 테스트 시 특정 버전을 지정할 수 있도록 지원합니다. 또한 Gemini API 요청 필드를 systemInstruction으로 수정하였습니다. 리뷰 피드백으로는 API 실패 응답 본문이 매우 클 경우 로그가 비대해지는 것을 방지하기 위해 에러 메시지의 길이를 일정 수준으로 제한(truncate)하는 안전장치를 추가할 것을 제안했습니다.
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.
🔗 연관된 이슈
🎯 의도
workflow_dispatch실행에서 Gemini prediction이400 Bad Request로 실패하는 문제를 진단하고 수정하기 위한 구성📝 작업 내용
📌 요약
generateContentrequest body 필드명 수정🔍 상세
src/ai/geminiPredictionClient.ts에서system_instruction을 공식 REST API 필드인systemInstruction으로 변경tests/ai/geminiPredictionClient.test.ts에systemInstructionpayload와 실패 response body 포함 여부 검증 추가.github/workflows/merge-risk-watch.yml에watcher_versioninput 추가watcher_version이 입력되면 해당 release tag를 우선 사용하고 비어 있으면 기존 workflow ref 기준 release tag 추론 유지docs/examples/consumer-merge-risk-watch.yml에서pull_requesttrigger 제거workflow_dispatch.inputs.watcher_version추가README.md에watcher_version입력과 schedule/manual run 기준 설명 반영📸 영상 / 이미지 (Optional)