This commit is contained in:
@@ -255,6 +255,16 @@
|
||||
- backend debug broadcasts
|
||||
|
||||
## Recent Change Log
|
||||
- Date: `2026-03-16`
|
||||
- What changed:
|
||||
- If Gemini evaluation times out before producing any usable reviewed items, the API now returns a capped ranked fallback set instead of an empty result list.
|
||||
- Why it changed:
|
||||
- Users were seeing timeout warnings with no usable results even though ranked candidates already existed.
|
||||
- How it was verified:
|
||||
- code-path inspection of timeout fallback branch in `/api/search`
|
||||
- What is still risky or incomplete:
|
||||
- Timeout fallback items are still keyword-ranked rather than Gemini-reviewed, so relevance can be lower than a successful full Vision pass.
|
||||
|
||||
- Date: `2026-03-16`
|
||||
- What changed:
|
||||
- Added a search-time budget for Gemini evaluation so the API can return partial reviewed results before reverse-proxy timeout instead of surfacing `504 Gateway Time-out`.
|
||||
|
||||
@@ -344,6 +344,12 @@ func (a *App) searchMedia(c *gin.Context) {
|
||||
c.JSON(http.StatusOK, gin.H{"results": fallback, "warning": warning, "queries": queryVariants})
|
||||
return
|
||||
}
|
||||
if strings.Contains(warning, "timed out before any usable results were returned") {
|
||||
fallback := services.BuildFallbackRecommendations(scored, 12, "Gemini Vision 시간 제한으로 상위 랭킹 결과를 우선 반환했습니다.")
|
||||
a.debug("search fallback summary", summarizeRecommendationResults(fallback, time.Since(started), warning))
|
||||
c.JSON(http.StatusOK, gin.H{"results": fallback, "warning": warning, "queries": queryVariants})
|
||||
return
|
||||
}
|
||||
a.debug("search fallback summary", summarizeRecommendationResults([]services.AIRecommendation{}, time.Since(started), warning))
|
||||
a.Hub.Broadcast("progress", gin.H{"type": "search", "status": "Gemini Vision returned no usable results", "progress": 90, "message": warning})
|
||||
c.JSON(http.StatusOK, gin.H{"results": []services.AIRecommendation{}, "warning": warning, "queries": queryVariants})
|
||||
|
||||
Reference in New Issue
Block a user