musistudio/claude-code-router · error

Profile name is required.

Error message

Profile name is required.

What it means

Error "Profile name is required." thrown in musistudio/claude-code-router.

Source

Thrown at packages/core/src/profiles/launch-core.ts:26

export type ProfileLaunchPlan = {
  args: string[];
  command: string;
  env: Record<string, string>;
  profile: ProfileConfig;
  surface: ProfileOpenSurface;
};

export type ProfileLaunchSpawnCommand = {
  args: string[];
  command: string;
  windowsVerbatimArguments?: boolean;
};

export function findProfileForOpen(config: Pick<AppConfig, "profile">, profileRef: string): ProfileConfig {
  const needle = profileRef.trim();
  if (!needle) {
    throw new Error("Profile name is required.");
  }

  const profiles = config.profile.profiles.filter((profile) => profile.enabled);
  const exactId = profiles.find((profile) => profile.id === needle);
  if (exactId) {
    return exactId;
  }

  const normalizedNeedle = normalizeLookupValue(needle);
  const matches = profiles.filter((profile) =>
    normalizeLookupValue(profile.name) === normalizedNeedle ||
    normalizeLookupValue(profile.id) === normalizedNeedle ||
    sanitizePathSegment(profile.name) === normalizedNeedle ||
    sanitizePathSegment(profile.id) === normalizedNeedle
  );
  if (matches.length === 1) {
    return matches[0];
  }

View on GitHub (pinned to 99f24806c6)

When it happens

Trigger: Thrown at packages/core/src/profiles/launch-core.ts:26 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/f7e1b9ff6fdb8309. Report an issue: GitHub.