musistudio/claude-code-router · error · Error
No CCR API key was found for profile "${profile.name || prof
Error message
No CCR API key was found for profile "${profile.name || profile.id}". Re-save the profile and try again. What it means
Error "No CCR API key was found for profile "${profile.name || profile.id}". Re-save the profile and try again." thrown in musistudio/claude-code-router.
Source
Thrown at packages/core/src/profiles/launch-service.ts:760
function profileGatewayEndpoint(config: AppConfig): string {
const host = probeGatewayHost(config.gateway.host);
return endpoint(host, config.gateway.port);
}
function probeGatewayHost(host: string): string {
if (!host || host === "0.0.0.0") {
return "127.0.0.1";
}
if (host === "::") {
return "::1";
}
return host;
}
function profileGatewayConfigFor(config: AppConfig, profile: ReturnType<typeof findProfileForOpen>): AppConfig {
const token = findProfileApiKey(config, profile);
if (!token) {
throw new Error(`No CCR API key was found for profile "${profile.name || profile.id}". Re-save the profile and try again.`);
}
return profileGatewayConfigWithToken(config, profile, token);
}
function profileGatewayConfigWithToken(config: AppConfig, profile: ReturnType<typeof findProfileForOpen>, token: string): AppConfig {
return {
...config,
APIKEY: token,
APIKEYS: [
{
createdAt: new Date().toISOString(),
id: profileApiKeyId(profile),
key: token,
name: `Profile: ${profile.name?.trim() || profile.id || profile.agent}`
}
]
};
}View on GitHub (pinned to 99f24806c6)
When it happens
Trigger: Thrown at packages/core/src/profiles/launch-service.ts:760 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of musistudio/claude-code-router@99f24806c6 (2026-08-27).
Data as JSON: /api/errors/d8c2c41da6128de5.
Report an issue: GitHub.