JuliusBrussee/caveman · error

caveman agent: baseline model unavailable: ${provider}/${id}

Error message

caveman agent: baseline model unavailable: ${provider}/${id}

What it means

Error "caveman agent: baseline model unavailable: ${provider}/${id}" thrown in JuliusBrussee/caveman.

Source

Thrown at packages/agent/src/runtime.ts:3264

    const model = models.getModel(requested.slice(0, slash), requested.slice(slash + 1));
    if (!model) throw new Error(`caveman agent: unknown model ${JSON.stringify(requested)}`);
    return model;
  }

  const configured: Array<[string, string]> = [];
  if (process.env.ANTHROPIC_API_KEY) configured.push(["anthropic", "claude-haiku-4-5"]);
  if (process.env.OPENAI_API_KEY) configured.push(["openai", "gpt-5.4-mini"]);
  if (process.env.GEMINI_API_KEY || process.env.GOOGLE_API_KEY) configured.push(["google", "gemini-2.5-flash"]);
  if (configured.length !== 1) {
    throw new Error(
      configured.length === 0
        ? "caveman agent: no supported provider credential found"
        : "caveman agent: multiple provider credentials found; set CAVE_MODEL once",
    );
  }
  const [provider, id] = configured[0]!;
  const model = models.getModel(provider, id);
  if (!model) throw new Error(`caveman agent: baseline model unavailable: ${provider}/${id}`);
  return model;
}

function localProviderModel(rootDir: string): string | undefined {
  try {
    const parsed = JSON.parse(readFileSync(resolve(rootDir, ".caveman/provider.json"), "utf8")) as { model?: unknown };
    return typeof parsed.model === "string" ? parsed.model : undefined;
  } catch (error) {
    if ((error as NodeJS.ErrnoException).code === "ENOENT") return undefined;
    throw new Error("caveman agent: invalid .caveman/provider.json");
  }
}

/**
 * Point a model at the gateway when the gateway speaks its dialect.
 *
 * The three routes below are the only ones the Caveman gateway proxies. Every
 * other provider Pi can reach (xai, groq, bedrock, openrouter, …) keeps its own

View on GitHub (pinned to 27d5a3981a)

Solutions

  1. The baseline provider/model is unavailable; pick an available baseline model or restore credentials for it.

When it happens

Trigger: Thrown at packages/agent/src/runtime.ts:3264 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of JuliusBrussee/caveman@27d5a3981a (2026-08-15). Data as JSON: /api/errors/9453e0b0b20d0b61. Report an issue: GitHub.