Fix video agent API citations and local container reloads - #20
Merged
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Agent runs could collect useful transcript and visual evidence, then lose their final answer because GLM omitted the application's inline citation syntax. Both normal and recovery finalization now return structured answer blocks with evidence IDs; application code renders markers and resolves them against persisted excerpts. The public response format is unchanged.
Recovery uses a forced structured tool call, short request-scoped evidence aliases, and a shorter answer prompt. It allows one schema/reference repair within the existing 20-second finalization phase and 60-second run deadline. Exhausted recovery preserves supported transcript findings and visual evidence while retaining the explicit PARTIAL_EVIDENCE warning. Structured logs identify validation failures separately from timeouts.
Local testing also reproduced container HTTPS failures after Wrangler hot reload on both 4.120.0 and 4.129.0. Development scripts now use a local-only entry point that recreates warm stateless processor containers on Worker reinitialization. Production keeps its existing entry point and lifecycle; dependency versions are unchanged. A code reload can interrupt an in-flight local provider read, which should be retried.
Validation:
Earlier local attempts exposed finalization timeouts; these are not a guarantee of timing under all provider/model conditions. The admin-denial live check was skipped because these tests used the local demo account. No production test or deployment was performed; the final production smoke test is planned after merge.
The five commits separate local networking, citation finalization, fallback quality, recovery compaction, and live-test/documentation changes. Transcript window grouping and the analyst architecture are unchanged.