crosscheck-mcp 0.2.23 → 0.2.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -550,7 +550,7 @@ function defaultTransient(kind) {
550
550
  var CREDIT_RE = /insufficient|no\s+credit|credits?|billing|quota|payment\s*required|exceeded your current quota|not\s+enough|fund|no active subscription|spend limit/i;
551
551
  function isCreditsFailure(status, bodyText) {
552
552
  if (status === 402) return true;
553
- if (status === 401 || status === 403 || status === 429 || status === 400) {
553
+ if (status === 401 || status === 403 || status === 400) {
554
554
  return CREDIT_RE.test(bodyText);
555
555
  }
556
556
  return false;
@@ -587,7 +587,7 @@ function httpFailureToProviderError(provider, status, bodyText, retryAfterS, mod
587
587
  if (status === 429) {
588
588
  return new ProviderError(
589
589
  "rate_limit",
590
- `${provider}: rate limited (HTTP 429). Detail: ${detail}`,
590
+ `${provider}: rate limited (HTTP 429) \u2014 retrying with backoff. Note that some providers word a rate limit as a balance problem; check your balance before topping up. Detail: ${detail}`,
591
591
  { status, ...retryAfterS !== void 0 ? { retryAfterS } : {} }
592
592
  );
593
593
  }
@@ -1355,10 +1355,20 @@ function fallbackModelsFor(env, provider) {
1355
1355
  if (pinned && pinned !== DEFAULT_MODELS[provider]) return [];
1356
1356
  return DEFAULT_FALLBACKS[provider] ?? [];
1357
1357
  }
1358
+ var DEFAULT_EXCLUDED_PROVIDERS = ["mistral", "groq"];
1359
+ function excludedProviders(env) {
1360
+ const parse = (v) => (v ?? "").split(",").map((x) => x.trim().toLowerCase()).filter((x) => x !== "");
1361
+ const excluded = new Set(
1362
+ parse(env["CROSSCHECK_EXCLUDE_PROVIDERS"]).length > 0 ? parse(env["CROSSCHECK_EXCLUDE_PROVIDERS"]) : DEFAULT_EXCLUDED_PROVIDERS
1363
+ );
1364
+ for (const name of parse(env["CROSSCHECK_ENABLE_PROVIDERS"])) excluded.delete(name);
1365
+ return excluded;
1366
+ }
1358
1367
  function buildProviders(opts) {
1359
1368
  const out = {};
1369
+ const excluded = excludedProviders(opts.env);
1360
1370
  const anthropicKey = opts.env["ANTHROPIC_API_KEY"];
1361
- if (anthropicKey) {
1371
+ if (anthropicKey && !excluded.has("anthropic")) {
1362
1372
  const model = opts.env["ANTHROPIC_MODEL"] ?? DEFAULT_MODELS.anthropic;
1363
1373
  out["anthropic"] = makeAnthropicProvider(model, anthropicKey, opts, fallbackModelsFor(opts.env, "anthropic"));
1364
1374
  }
@@ -1374,11 +1384,12 @@ function buildProviders(opts) {
1374
1384
  for (const s of openAiCompatSpec) {
1375
1385
  const apiKey = opts.env[s.keyEnv];
1376
1386
  if (!apiKey) continue;
1387
+ if (excluded.has(s.name)) continue;
1377
1388
  const model = opts.env[s.modelEnv] ?? s.defaultModel;
1378
1389
  out[s.name] = makeOpenAICompatibleProvider(s.name, model, apiKey, opts, fallbackModelsFor(opts.env, s.name));
1379
1390
  }
1380
1391
  const geminiKey = opts.env["GEMINI_API_KEY"];
1381
- if (geminiKey) {
1392
+ if (geminiKey && !excluded.has("gemini")) {
1382
1393
  const model = opts.env["GEMINI_MODEL"] ?? DEFAULT_MODELS.gemini;
1383
1394
  out["gemini"] = makeGeminiProvider(model, geminiKey, opts, fallbackModelsFor(opts.env, "gemini"));
1384
1395
  }
@@ -1444,7 +1455,7 @@ var import_zod = require("zod");
1444
1455
 
1445
1456
  // src/server-meta.ts
1446
1457
  var SERVER_NAME = "crosscheck-agent";
1447
- var SERVER_VERSION = true ? "0.2.23" : "0.0.0-dev";
1458
+ var SERVER_VERSION = true ? "0.2.24" : "0.0.0-dev";
1448
1459
 
1449
1460
  // src/tools/audit.ts
1450
1461
  var import_node_fs4 = require("fs");
@@ -11917,7 +11928,7 @@ var CHECK_INTERVAL_SECONDS = 3 * 24 * 60 * 60;
11917
11928
  var DEFAULT_PACKAGE = "crosscheck-cli";
11918
11929
  var FETCH_TIMEOUT_MS = 3e3;
11919
11930
  function engineVersion() {
11920
- return true ? "0.2.23" : "0.0.0-dev";
11931
+ return true ? "0.2.24" : "0.0.0-dev";
11921
11932
  }
11922
11933
  function defaultUpdateCachePath() {
11923
11934
  const base = process.env["CROSSCHECK_DATA_DIR"] || import_node_path12.default.join(import_node_os2.default.homedir() || import_node_os2.default.tmpdir(), ".crosscheck");