showcase/integrations/pydantic-ai/qa/auth.md
/demos/auth/api/health)OPENAI_API_KEY set/demos/authdata-testid="auth-banner", data-authenticated="true")<CopilotChat /> is mounted below the bannerauth-demo-error surface visible/info handshake succeeds)auth-demo-error surface appearsdata-authenticated="false")auth-demo-error surface appears with text
containing "401" and/or "Unauthorized"auth-demo-error surface clearsThe auth gate is framework-agnostic — createCopilotRuntimeHandler from
@copilotkit/runtime/v2 supports the onRequest hook regardless of the
underlying agent framework. The gate throws a 401 Response before the
request reaches the PydanticAI backend.
/info
fetch.ChatErrorBoundary).