- before: https://github.com/CorrectRoadH/niceeval/tree/main/examples/zh/origin/ai-sdk-v7 — a regular AI SDK v7 chat app (HTTP server + React chat UI), before any eval integration.
- after: https://github.com/CorrectRoadH/niceeval/tree/main/examples/zh/tier1/ai-sdk-v7 — the same app after integrating NiceEval.
uiMessageStreamAgent — the official non-invasive adapter for the AI SDK UI Message Stream protocol (the standard SSE backend used by useChat). The adapter file only declares where the endpoint lives and how to pass model in the request body. Session replay, HITL approval (rewriting and resending needsApproval tool parts), and tool/message events built directly from protocol frames are all handled by the factory. The protocol frames do not include usage data, so this example does not assert usage. App-side src/backend/* files are byte-for-byte unchanged. Use tier2/ for OTel waterfalls and tier3/ for feature A/B.
All integration code changes (measured from both directories when generated):