Files
web-page-backend/tarot-lab
gahusb be9165efd2 fix(tarot-lab): max_tokens 1400→2800 + stop_reason 검사로 응답 truncation 처리
3-card spread 해석 응답이 1400 토큰 한계에서 잘려 JSON "Unterminated string" 파싱 실패가 reroll 2회 모두 발생하던 버그 수정.

- max_tokens 1400 → 2800 (saju-lab 2400 기준 + interactions 마진)
- stop_reason == "max_tokens" 검사 → 신규 TarotTruncated 예외로 truncation 명시화
- reroll feedback에 "각 카드 1~2문장으로 축약" 안내 추가 → 모델이 다음 응답 길이 조절
- truncation 시나리오 테스트 2개 추가 (1차 잘림→성공, 2회 모두 잘림→TarotError)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 22:55:28 +09:00
..