This commit is contained in:
@@ -655,6 +655,24 @@
|
||||
- If behavior in the browser does not match the latest backend/frontend code, the first assumption should be stale frontend assets until proven otherwise
|
||||
|
||||
## Recent Change Log
|
||||
- Date: `2026-03-17`
|
||||
- What changed:
|
||||
- Added a dedicated single-candidate Gemini recovery path that no longer asks for JSON and instead parses a tiny plain-text key/value response.
|
||||
- Kept multi-candidate Gemini Vision on compact JSON, but changed sequential recovery to use the shorter plain-text format automatically through the existing `Recommend(..., []SearchResult{item})` path.
|
||||
- Added unit coverage for the single-candidate plain-text parser.
|
||||
- Why it changed:
|
||||
- The user-provided log `ai-media-hub-2026-03-17T08-20-31-074Z.log` showed even more severe truncation:
|
||||
- `"{\"recommendations\":[{\"index\":"`
|
||||
- `"{\"recommendations"`
|
||||
- `"{\"recommend"`
|
||||
- The same log showed `sequentialRetried: 0`, which means the old single-candidate recovery path was still too verbose and was not successfully rescuing failed batches.
|
||||
- How it was verified:
|
||||
- `pwsh -NoProfile -File scripts/selftest.ps1`
|
||||
- added Go tests for single-candidate Gemini plain-text parsing
|
||||
- What is still risky or incomplete:
|
||||
- If Gemini returns malformed plain text that omits the required `verdict:` line, even the single-candidate recovery path can still fail.
|
||||
- This improves recovery robustness, but total Gemini latency can still rise when many batch failures fall back to candidate-by-candidate evaluation.
|
||||
|
||||
- Date: `2026-03-17`
|
||||
- What changed:
|
||||
- Added adaptive Gemini Vision output-token sizing so smaller candidate batches, especially single-candidate sequential recovery calls, now request much shorter responses.
|
||||
|
||||
Reference in New Issue
Block a user