Repository navigation
🐛 Fix: ExamForge Gemini→OpenAI→Claude 폴백 체인 안정화 - #25
Merged
Merged
Conversation
- CLAUDE_SONNET_API_KEY 우선 조회로 Claude 폴백 누락 방지 - gemini_flash 소진 기록 시 primary 건너뛰기 - OpenAI SDK max_retries=0으로 Claude 전환 지연 완화 - Anthropic RateLimitError를 공유 RateLimitError로 정규화 - 폴백 체인 회귀 테스트 2건 추가
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.
Summary
ExamForge 텍스트 생성 폴백 체인(Gemini → OpenAI → Claude Sonnet)이 실제 장애 상황에서 끊기거나 지연되던 문제를 수정했습니다.
폴백 키 해석
CLAUDE_SONNET_API_KEY우선, 없으면ANTHROPIC_API_KEY공유 (루트text_config.py와 동일 규칙)ANTHROPIC_API_KEY만 있어도 Claude 폴백이 빠지지 않도록 수정폴백 체인 동작
gemini_flash소진 기록이 있으면 primary를 건너뛰고 OpenAI→Claude부터 시도max_retries=0으로 수 초 대기 후 Claude 전환 지연 완화RateLimitError를 공유RateLimitError로 정규화해 체인 전파 일관화Test plan
pytest app/modules/ExamForge_V1/tests/test_failover_chain.py— 14 passedtest_skips_exhausted_gemini_primarytest_stage_factories_claude_from_sonnet_key_only