earendil-works/pi · error · ModelsError
auth
auth
Error message
Credential store read failed for ${providerId} What it means
Error "Credential store read failed for ${providerId}" thrown in earendil-works/pi.
Source
Thrown at packages/ai/src/models.ts:481
},
{ signal },
);
return post?.type === "oauth" ? post : undefined;
}
const apiKey = provider.auth.apiKey;
if (!apiKey) return undefined;
const credential = stored?.type === "api_key" ? stored : undefined;
const result = await apiKey.resolve({ ctx: this.authContext, credential, signal });
if (!result) return undefined;
return { type: "api_key", key: result.auth.apiKey, env: result.env };
}
private async readCredential(providerId: string, signal: AbortSignal): Promise<Credential | undefined> {
try {
return await this.credentials.read(providerId, { signal });
} catch (error) {
throw new ModelsError("auth", `Credential store read failed for ${providerId}`, { cause: error });
}
}
private async checkProviderAuth(
provider: Provider,
credential: Credential | undefined,
signal: AbortSignal,
): Promise<AuthCheck | undefined> {
if (credential?.type === "oauth") {
return provider.auth.oauth ? { source: "OAuth", type: "oauth" } : undefined;
}
const apiKey = provider.auth.apiKey;
if (!apiKey) return undefined;
if (apiKey.check) {
try {
return await apiKey.check({
ctx: this.authContext,
credential: credential?.type === "api_key" ? credential : undefined,View on GitHub (pinned to 4af9d21d3b)
Solutions
- Check the credential store backend and its permissions; retry the read.
When it happens
Trigger: Thrown at packages/ai/src/models.ts:481 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/6c44750c292dbd27.
Report an issue: GitHub.