crosscheck-mcp 0.2.13 → 0.2.14

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.
@@ -462,8 +462,21 @@ function isCreditsFailure(status, bodyText) {
462
462
  }
463
463
  return false;
464
464
  }
465
- function httpFailureToProviderError(provider, status, bodyText, retryAfterS) {
465
+ var MODEL_ACCESS_RE = /model_not_found|does not have access to model|does not exist|model[\s_]not[\s_]found|invalid model|unknown model|unsupported model/i;
466
+ function isModelAccessFailure(status, bodyText) {
467
+ if (status < 400 || status >= 500) return false;
468
+ return MODEL_ACCESS_RE.test(bodyText);
469
+ }
470
+ function httpFailureToProviderError(provider, status, bodyText, retryAfterS, model) {
466
471
  const detail = bodyText.slice(0, 512);
472
+ if (isModelAccessFailure(status, bodyText)) {
473
+ const modelRef = model ? `"${model}"` : "the configured model";
474
+ return new ProviderError(
475
+ "client",
476
+ `${provider}: your account/project doesn't have access to ${modelRef} (HTTP ${status}). This is a model-access problem, not a key problem \u2014 your ${provider} API key is fine, ${modelRef} just isn't enabled for this account/project. Fix: run \`crosscheck models set ${provider} <a-model-you-have-access-to>\` (or set ${provider.toUpperCase()}_MODEL in your .env until that's available). Detail: ${detail}`,
477
+ { status }
478
+ );
479
+ }
467
480
  if (isCreditsFailure(status, bodyText)) {
468
481
  return new ProviderError(
469
482
  "auth",
@@ -792,7 +805,7 @@ async function sendAnthropic(args) {
792
805
  return { text, attempts: 1, usage: applyPricing(usage, args.pricing) };
793
806
  }
794
807
  const bodyText = await respLike.text().catch(() => "");
795
- throw httpFailureToProviderError("anthropic", status, bodyText, parseRetryAfter(respLike));
808
+ throw httpFailureToProviderError("anthropic", status, bodyText, parseRetryAfter(respLike), args.model);
796
809
  };
797
810
  await acquireRateLimit("anthropic", args.signal ? { signal: args.signal } : void 0);
798
811
  return sendWithRetry(attemptOnce, resolveRetryConfig(), args.signal);
@@ -970,7 +983,7 @@ async function sendGemini(args) {
970
983
  return { text, attempts: 1, usage: applyPricing2(usage, args.pricing) };
971
984
  }
972
985
  const bodyText = await respLike.text().catch(() => "");
973
- throw httpFailureToProviderError("gemini", status, bodyText, parseRetryAfter(respLike));
986
+ throw httpFailureToProviderError("gemini", status, bodyText, parseRetryAfter(respLike), args.model);
974
987
  };
975
988
  await acquireRateLimit("gemini", args.signal ? { signal: args.signal } : void 0);
976
989
  return sendWithRetry(attemptOnce, resolveRetryConfig(), args.signal);
@@ -1143,7 +1156,7 @@ async function sendOpenAICompatible(args) {
1143
1156
  return { text, attempts: 1, usage: applyPricing3(usage, args.pricing) };
1144
1157
  }
1145
1158
  const bodyText = await respLike.text().catch(() => "");
1146
- throw httpFailureToProviderError(args.provider, status, bodyText, parseRetryAfter(respLike));
1159
+ throw httpFailureToProviderError(args.provider, status, bodyText, parseRetryAfter(respLike), args.model);
1147
1160
  };
1148
1161
  await acquireRateLimit(args.provider, args.signal ? { signal: args.signal } : void 0);
1149
1162
  return sendWithRetry(attemptOnce, resolveRetryConfig(), args.signal);
@@ -1152,7 +1165,10 @@ async function sendOpenAICompatible(args) {
1152
1165
  // src/providers/registry.ts
1153
1166
  var DEFAULT_MODELS = {
1154
1167
  anthropic: "claude-opus-5",
1155
- openai: "gpt-5.5",
1168
+ // gpt-5.5 is not enabled on every OpenAI account/project (some are still
1169
+ // capped at gpt-5) — gpt-5 is the safer, more broadly available default
1170
+ // until a user/org explicitly opts into 5.5 via `crosscheck models set`.
1171
+ openai: "gpt-5",
1156
1172
  xai: "grok-4-latest",
1157
1173
  mistral: "mistral-large-latest",
1158
1174
  groq: "llama-3.3-70b-versatile",
@@ -1247,7 +1263,7 @@ import { z } from "zod";
1247
1263
 
1248
1264
  // src/server-meta.ts
1249
1265
  var SERVER_NAME = "crosscheck-agent";
1250
- var SERVER_VERSION = true ? "0.2.13" : "0.0.0-dev";
1266
+ var SERVER_VERSION = true ? "0.2.14" : "0.0.0-dev";
1251
1267
 
1252
1268
  // src/tools/audit.ts
1253
1269
  import { readdirSync, readFileSync as readFileSync3, statSync } from "fs";
@@ -11474,7 +11490,7 @@ var CHECK_INTERVAL_SECONDS = 3 * 24 * 60 * 60;
11474
11490
  var DEFAULT_PACKAGE = "crosscheck-cli";
11475
11491
  var FETCH_TIMEOUT_MS = 3e3;
11476
11492
  function engineVersion() {
11477
- return true ? "0.2.13" : "0.0.0-dev";
11493
+ return true ? "0.2.14" : "0.0.0-dev";
11478
11494
  }
11479
11495
  function defaultUpdateCachePath() {
11480
11496
  const base = process.env["CROSSCHECK_DATA_DIR"] || path9.join(os.homedir() || os.tmpdir(), ".crosscheck");