You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 6, 2026. It is now read-only.
Failed to parse payment requirements: Invalid payment required response
Root Cause
The 402 response from beta.aimo.network/api/v1/chat/completions includes the payment-required header with valid base64 content, but the response is missing Access-Control-Expose-Headers. Per the CORS spec, browsers only expose safelisted headers to JavaScript. Since payment-required is non-standard, response.headers.get("payment-required") returns null in the browser despite the header being present in the actual HTTP response.
This causes @x402/fetch to fail before it can sign and retry the request with a PAYMENT-SIGNATURE header.