Skip to content

[#24] Gemini prediction 400 응답 원인을 진단하고 수정한다#25

Merged
opficdev merged 5 commits into
developfrom
fix/#24-gemini
Jun 22, 2026
Merged

[#24] Gemini prediction 400 응답 원인을 진단하고 수정한다#25
opficdev merged 5 commits into
developfrom
fix/#24-gemini

Conversation

@opficdev

Copy link
Copy Markdown
Owner

🔗 연관된 이슈

🎯 의도

  • 실제 consumer repository의 workflow_dispatch 실행에서 Gemini prediction이 400 Bad Request로 실패하는 문제를 진단하고 수정하기 위한 구성

📝 작업 내용

📌 요약

  • Gemini generateContent request body 필드명 수정
  • Gemini HTTP 실패 응답 원문 보존
  • 수동 테스트용 Watcher release version 입력 추가
  • consumer workflow 예시에서 PR trigger 제거
  • README의 테스트 실행 기준 정리

🔍 상세

  • src/ai/geminiPredictionClient.ts에서 system_instruction을 공식 REST API 필드인 systemInstruction으로 변경
  • Gemini HTTP 실패 시 status code만 남기지 않고 response body 원문을 error message에 포함하도록 변경
  • tests/ai/geminiPredictionClient.test.tssystemInstruction payload와 실패 response body 포함 여부 검증 추가
  • .github/workflows/merge-risk-watch.ymlwatcher_version input 추가
  • watcher_version이 입력되면 해당 release tag를 우선 사용하고 비어 있으면 기존 workflow ref 기준 release tag 추론 유지
  • docs/examples/consumer-merge-risk-watch.yml에서 pull_request trigger 제거
  • consumer 예시에 workflow_dispatch.inputs.watcher_version 추가
  • README.mdwatcher_version 입력과 schedule/manual run 기준 설명 반영

📸 영상 / 이미지 (Optional)

@opficdev opficdev self-assigned this Jun 22, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/ai/geminiPredictionClient.ts
@opficdev opficdev merged commit 70141ae into develop Jun 22, 2026
3 checks passed
@opficdev opficdev deleted the fix/#24-gemini branch June 22, 2026 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gemini prediction 400 응답 원인을 진단하고 수정한다

1 participant