earendil-works/pi · error · Error
Invalid Radius OAuth config from ${gateway}
Error message
Invalid Radius OAuth config from ${gateway} What it means
Error "Invalid Radius OAuth config from ${gateway}" thrown in earendil-works/pi.
Source
Thrown at packages/ai/src/auth/oauth/radius.ts:63
expires_in: number;
interval?: number;
};
async function loadRadiusOAuthDiscovery(gateway: string, signal: AbortSignal): Promise<RadiusOAuthDiscovery> {
const response = await fetch(new URL("/v1/oauth", gateway), {
headers: { accept: "application/json" },
signal,
});
if (!response.ok) {
throw new Error(
`Could not load Radius OAuth config from ${gateway}: ${response.status} ${await response.text()}`,
);
}
const discovery = (await response.json()) as Partial<RadiusOAuthDiscovery>;
if (typeof discovery.authorizationEndpoint !== "string") {
throw new Error(`Invalid Radius OAuth config from ${gateway}`);
}
return { authorizationEndpoint: discovery.authorizationEndpoint };
}
class OAuthResponseError extends Error {
readonly status: number;
readonly oauthError?: string;
constructor(status: number, oauthError: string | undefined, description: string | undefined, message: string) {
const detail = oauthError
? description
? `${oauthError}: ${description}`
: oauthError
: description || String(status);
super(`${message}: ${detail}`);
this.status = status;
this.oauthError = oauthError;
}View on GitHub (pinned to 4af9d21d3b)
Solutions
- Inspect the gateway config payload; update parsing if the shape changed.
When it happens
Trigger: Thrown at packages/ai/src/auth/oauth/radius.ts:63 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of earendil-works/pi@4af9d21d3b (2026-08-24).
Data as JSON: /api/errors/1ba39274898be27e.
Report an issue: GitHub.