earendil-works/pi · error

Invalid Radius config from ${gateway}

Error message

Invalid Radius config from ${gateway}

What it means

Error "Invalid Radius config from ${gateway}" thrown in earendil-works/pi.

Source

Thrown at packages/ai/src/providers/radius-config.ts:94

	const trimmed = body.trim();
	return trimmed.length > 512 ? `${trimmed.slice(0, 512)}…` : trimmed;
}

export async function loadRadiusGatewayConfig(
	gateway: string,
	apiKey?: string,
	signal?: AbortSignal,
): Promise<RadiusGatewayConfig> {
	const headers: Record<string, string> = { accept: "application/json" };
	if (apiKey) headers.authorization = `Bearer ${apiKey}`;
	const response = await fetch(new URL("/v1/config", gateway), { headers, signal });
	if (!response.ok) {
		throw new Error(
			`Could not load Radius config from ${gateway}: ${response.status}: ${truncateHttpBody(await response.text())}`,
		);
	}
	const config = sanitizeRadiusGatewayConfig(await response.json());
	if (!config) throw new Error(`Invalid Radius config from ${gateway}`);
	return config;
}

View on GitHub (pinned to 4af9d21d3b)

Solutions

  1. Inspect the gateway config payload; update parsing if the shape changed.

When it happens

Trigger: Thrown at packages/ai/src/providers/radius-config.ts:94 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/674a610b9a4f825d. Report an issue: GitHub.