Two model requests can finish in a different order from which they started. If an older response arrives last and your application follows "last arrival wins," stale output can replace the user's newer intent.
Give every interaction a monotonically increasing generation_id. Store the active generation for the session or view when each request starts.
Our product VectorNode (https://www.vectronode.com) can provide multi-model API connectivity before this guard. Disclosure: VectorNode is our product, and this link is included only to show the integration context.
At commit time, compare the response generation_id with active_generation_id. A match may update the current state. A mismatch should be marked stale and kept away from the visible answer, tool execution, and active conversation history. Retain only the diagnostic metadata allowed by your data policy.
Cancellation remains useful for saving work and improving UX, but the commit-time comparison protects state when cancellation arrives too late.
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)