Your main AI provider fails halfway through a streamed answer; the user already sees the first paragraph.
- ASilently continue from the backup provider so the answer finishes without interruption
- BKeep the partial text, mark it unfinished, offer a retry
- CDelete what was shown and display a generic error page asking the user to come back later
- DRetry the same provider in a tight loop until it answers again, however long that takes
Answer: B
Keep the partial text, mark it unfinished, offer a retry
Why
Falling back to another provider is safe only before the first token reaches the user; after that, a second model would continue a text it did not start, and the seam shows. Be honest about the break and let the user retry the whole answer.
More on Way of the Agent
- Course programThe first three modules are free: start in the browser or the app, no card needed.
- Library: guides, skills and promptsReady prompt templates, grouped into collections.
- AI ChroniclesSourced stories from the history of AI.
- ConceptsPlain-language explainers of agent engineering.
- Learn AI agentsApps and courses for learning AI agents, compared honestly.
Real situations from building agents - with the answer and why.
Solve a new one every day on the Path