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.
@@ -1282,7 +1282,7 @@ init_esm_shims();
1282
1282
  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;
1283
1283
  function isCreditsFailure(status, bodyText) {
1284
1284
  if (status === 402) return true;
1285
- if (status === 401 || status === 403 || status === 429 || status === 400) {
1285
+ if (status === 401 || status === 403 || status === 400) {
1286
1286
  return CREDIT_RE.test(bodyText);
1287
1287
  }
1288
1288
  return false;
@@ -1319,7 +1319,7 @@ function httpFailureToProviderError(provider, status, bodyText, retryAfterS, mod
1319
1319
  if (status === 429) {
1320
1320
  return new ProviderError(
1321
1321
  "rate_limit",
1322
- `${provider}: rate limited (HTTP 429). Detail: ${detail}`,
1322
+ `${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}`,
1323
1323
  { status, ...retryAfterS !== void 0 ? { retryAfterS } : {} }
1324
1324
  );
1325
1325
  }
@@ -2109,10 +2109,20 @@ function fallbackModelsFor(env, provider) {
2109
2109
  if (pinned && pinned !== DEFAULT_MODELS[provider]) return [];
2110
2110
  return DEFAULT_FALLBACKS[provider] ?? [];
2111
2111
  }
2112
+ var DEFAULT_EXCLUDED_PROVIDERS = ["mistral", "groq"];
2113
+ function excludedProviders(env) {
2114
+ const parse = (v) => (v ?? "").split(",").map((x) => x.trim().toLowerCase()).filter((x) => x !== "");
2115
+ const excluded = new Set(
2116
+ parse(env["CROSSCHECK_EXCLUDE_PROVIDERS"]).length > 0 ? parse(env["CROSSCHECK_EXCLUDE_PROVIDERS"]) : DEFAULT_EXCLUDED_PROVIDERS
2117
+ );
2118
+ for (const name of parse(env["CROSSCHECK_ENABLE_PROVIDERS"])) excluded.delete(name);
2119
+ return excluded;
2120
+ }
2112
2121
  function buildProviders(opts) {
2113
2122
  const out = {};
2123
+ const excluded = excludedProviders(opts.env);
2114
2124
  const anthropicKey = opts.env["ANTHROPIC_API_KEY"];
2115
- if (anthropicKey) {
2125
+ if (anthropicKey && !excluded.has("anthropic")) {
2116
2126
  const model = opts.env["ANTHROPIC_MODEL"] ?? DEFAULT_MODELS.anthropic;
2117
2127
  out["anthropic"] = makeAnthropicProvider(model, anthropicKey, opts, fallbackModelsFor(opts.env, "anthropic"));
2118
2128
  }
@@ -2128,11 +2138,12 @@ function buildProviders(opts) {
2128
2138
  for (const s of openAiCompatSpec) {
2129
2139
  const apiKey = opts.env[s.keyEnv];
2130
2140
  if (!apiKey) continue;
2141
+ if (excluded.has(s.name)) continue;
2131
2142
  const model = opts.env[s.modelEnv] ?? s.defaultModel;
2132
2143
  out[s.name] = makeOpenAICompatibleProvider(s.name, model, apiKey, opts, fallbackModelsFor(opts.env, s.name));
2133
2144
  }
2134
2145
  const geminiKey = opts.env["GEMINI_API_KEY"];
2135
- if (geminiKey) {
2146
+ if (geminiKey && !excluded.has("gemini")) {
2136
2147
  const model = opts.env["GEMINI_MODEL"] ?? DEFAULT_MODELS.gemini;
2137
2148
  out["gemini"] = makeGeminiProvider(model, geminiKey, opts, fallbackModelsFor(opts.env, "gemini"));
2138
2149
  }
@@ -2331,7 +2342,7 @@ import { z } from "zod";
2331
2342
  // src/server-meta.ts
2332
2343
  init_esm_shims();
2333
2344
  var SERVER_NAME = "crosscheck-agent";
2334
- var SERVER_VERSION = true ? "0.2.23" : "0.0.0-dev";
2345
+ var SERVER_VERSION = true ? "0.2.24" : "0.0.0-dev";
2335
2346
 
2336
2347
  // src/tools/audit.ts
2337
2348
  init_esm_shims();
@@ -12910,7 +12921,7 @@ var CHECK_INTERVAL_SECONDS = 3 * 24 * 60 * 60;
12910
12921
  var DEFAULT_PACKAGE = "crosscheck-cli";
12911
12922
  var FETCH_TIMEOUT_MS = 3e3;
12912
12923
  function engineVersion() {
12913
- return true ? "0.2.23" : "0.0.0-dev";
12924
+ return true ? "0.2.24" : "0.0.0-dev";
12914
12925
  }
12915
12926
  function defaultUpdateCachePath() {
12916
12927
  const base = process.env["CROSSCHECK_DATA_DIR"] || path10.join(os.homedir() || os.tmpdir(), ".crosscheck");