decolua/9router · error
No active credentials for provider: ${provider}
Error message
No active credentials for provider: ${provider} What it means
getProviderCredentials found no usable accounts for the provider and excludeConnectionIds is empty, meaning not a single credential (API key/OAuth account) is configured or currently active for that provider. The handler returns 404 'No active credentials for provider: <provider>'.
Source
Thrown at src/sse/handlers/chat.js:240
// Try with available accounts (fallback on errors)
const excludeConnectionIds = new Set();
let lastError = null;
let lastStatus = null;
while (true) {
const credentials = await getProviderCredentials(provider, excludeConnectionIds, model);
// All accounts unavailable
if (!credentials || credentials.allRateLimited) {
if (credentials?.allRateLimited) {
const errorMsg = lastError || credentials.lastError || "Unavailable";
const status = lastStatus || Number(credentials.lastErrorCode) || HTTP_STATUS.SERVICE_UNAVAILABLE;
log.warn("CHAT", `[${provider}/${model}] ${errorMsg} (${credentials.retryAfterHuman})`);
return unavailableResponse(status, `[${provider}/${model}] ${errorMsg}`, credentials.retryAfter, credentials.retryAfterHuman);
}
if (excludeConnectionIds.size === 0) {
log.warn("AUTH", `No active credentials for provider: ${provider}`);
return errorResponse(HTTP_STATUS.NOT_FOUND, `No active credentials for provider: ${provider}`);
}
log.warn("CHAT", "No more accounts available", { provider });
return errorResponse(lastStatus || HTTP_STATUS.SERVICE_UNAVAILABLE, lastError || "All accounts unavailable");
}
// Account selection shown in the unified "▶" line (acc:...)
const refreshedCredentials = await checkAndRefreshToken(provider, credentials);
// Ensure real project ID is available for providers that need it (P0 fix: cold miss)
if ((provider === "antigravity" || provider === "gemini-cli") && !refreshedCredentials.projectId) {
const pid = await getProjectIdForConnection(credentials.connectionId, refreshedCredentials.accessToken, provider);
if (pid) {
refreshedCredentials.projectId = pid;
// Persist to DB in background so subsequent requests have it immediately
updateProviderCredentials(credentials.connectionId, { projectId: pid }).catch(() => { });
}
}View on GitHub (pinned to 90b52e06ff)
Solutions
- Open the 9Router dashboard → Credentials and add or reconnect an account for the named provider.
- Re-enable disabled accounts for that provider (they show as disconnected/inactive).
- If it's an OAuth provider, complete the OAuth login flow so a token is stored.
- Switch the model to a provider you actually have credentials for.
Example fix
// before
{ "model": "kiro/claude-sonnet-4" } // no kiro account linked
// after: link a kiro account in the dashboard first, or use
{ "model": "openai/gpt-4o" } // provider with an active key Defensive patterns
Strategy: fallback
Validate before calling
const creds = await fetch(`${base}/dashboard/api/credentials`).then(r => r.json());
if (!creds.some(c => c.provider === provider && c.active)) {
throw new Error(`No active credential for ${provider}; connect one in the dashboard first`);
} Type guard
null
Try / catch
const res = await fetch(url, opts);
if (res.status === 404 && (await res.text()).includes('No active credentials')) {
return useFallbackProvider(request); // e.g. switch model to a provider you have set up
} Prevention
- Add credentials for every provider your clients reference before rollout.
- Health-check dashboards/credentials as part of deployment.
- Re-auth OAuth accounts proactively when tokens near expiry.
- Keep combo fallbacks pointing at providers with configured accounts.
When it happens
Trigger: POST /v1/chat/completions with a model whose provider has zero credentials configured in the gateway, or whose accounts are all disabled/disconnected (e.g. OAuth session never linked).
Common situations: Fresh install where the provider was never connected in the dashboard; OAuth account logged out / token revoked and account disabled; credentials deleted during config cleanup; pointing the client at a provider name that exists in the registry but was never set up.
Related errors
- Zed credential is missing userId or accessToken
- IdP X.509 Certificate (samlCert) is missing or not configure
- All accounts unavailable
- Vertex partner models require a project_id. Add it in provid
- Vertex: failed to mint access token from Service Account JSO
AI-assisted analysis of decolua/9router@90b52e06ff (2026-08-30).
Data as JSON: /api/errors/89860c0cc0fc7085.
Report an issue: GitHub.