Repository navigation
fix: protect access to the AI SDK UI demo and limit resource use - #2181
Conversation
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
jbeckwith-oai
left a comment
There was a problem hiding this comment.
Approved at fb34d86. Reviewed all ten changed files, route/conversion code, provider session cleanup and stream adapters. Authentication gates provider work at the proxy and handlers, ownership remains enforced, synchronous quota reservations cover concurrent admission, and expiry cleanup waits for active reads/runs while retaining failed deletion slots. Tests cover access, quota, expiry and cleanup boundaries.
Coordinator and independent static review found no actionable issues; existing feedback checked. Hosted CI remains pending. No candidate code, tests, builds or CI reruns executed.
Summary
The AI SDK UI demo let any visitor create provider conversations and run models. The demo now requires
AI_SDK_UI_DEMO_ACCESS_TOKENbefore provider work. It also checks that each conversation belongs to the requesting browser. It rejects requests from other browser origins, including when the browser has cached the demo credentials.The demo limits conversation creation and model runs per process. It deletes expired provider conversations once their active work ends and retries failed deletions. Both chat views use the same limits and ownership checks. The README explains how to set the token and open the demo.
Please review the access checks and provider cleanup.
Test plan
Checks
.agents/skills/code-change-verification/scripts/run.sh.