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.
@@ -1242,8 +1242,21 @@ function isCreditsFailure(status, bodyText) {
1242
1242
  }
1243
1243
  return false;
1244
1244
  }
1245
- function httpFailureToProviderError(provider, status, bodyText, retryAfterS) {
1245
+ 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;
1246
+ function isModelAccessFailure(status, bodyText) {
1247
+ if (status < 400 || status >= 500) return false;
1248
+ return MODEL_ACCESS_RE.test(bodyText);
1249
+ }
1250
+ function httpFailureToProviderError(provider, status, bodyText, retryAfterS, model) {
1246
1251
  const detail = bodyText.slice(0, 512);
1252
+ if (isModelAccessFailure(status, bodyText)) {
1253
+ const modelRef = model ? `"${model}"` : "the configured model";
1254
+ return new ProviderError(
1255
+ "client",
1256
+ `${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}`,
1257
+ { status }
1258
+ );
1259
+ }
1247
1260
  if (isCreditsFailure(status, bodyText)) {
1248
1261
  return new ProviderError(
1249
1262
  "auth",
@@ -1581,7 +1594,7 @@ async function sendAnthropic(args) {
1581
1594
  return { text, attempts: 1, usage: applyPricing(usage, args.pricing) };
1582
1595
  }
1583
1596
  const bodyText = await respLike.text().catch(() => "");
1584
- throw httpFailureToProviderError("anthropic", status, bodyText, parseRetryAfter(respLike));
1597
+ throw httpFailureToProviderError("anthropic", status, bodyText, parseRetryAfter(respLike), args.model);
1585
1598
  };
1586
1599
  await acquireRateLimit("anthropic", args.signal ? { signal: args.signal } : void 0);
1587
1600
  return sendWithRetry(attemptOnce, resolveRetryConfig(), args.signal);
@@ -1760,7 +1773,7 @@ async function sendGemini(args) {
1760
1773
  return { text, attempts: 1, usage: applyPricing2(usage, args.pricing) };
1761
1774
  }
1762
1775
  const bodyText = await respLike.text().catch(() => "");
1763
- throw httpFailureToProviderError("gemini", status, bodyText, parseRetryAfter(respLike));
1776
+ throw httpFailureToProviderError("gemini", status, bodyText, parseRetryAfter(respLike), args.model);
1764
1777
  };
1765
1778
  await acquireRateLimit("gemini", args.signal ? { signal: args.signal } : void 0);
1766
1779
  return sendWithRetry(attemptOnce, resolveRetryConfig(), args.signal);
@@ -1934,7 +1947,7 @@ async function sendOpenAICompatible(args) {
1934
1947
  return { text, attempts: 1, usage: applyPricing3(usage, args.pricing) };
1935
1948
  }
1936
1949
  const bodyText = await respLike.text().catch(() => "");
1937
- throw httpFailureToProviderError(args.provider, status, bodyText, parseRetryAfter(respLike));
1950
+ throw httpFailureToProviderError(args.provider, status, bodyText, parseRetryAfter(respLike), args.model);
1938
1951
  };
1939
1952
  await acquireRateLimit(args.provider, args.signal ? { signal: args.signal } : void 0);
1940
1953
  return sendWithRetry(attemptOnce, resolveRetryConfig(), args.signal);
@@ -1943,7 +1956,10 @@ async function sendOpenAICompatible(args) {
1943
1956
  // src/providers/registry.ts
1944
1957
  var DEFAULT_MODELS = {
1945
1958
  anthropic: "claude-opus-5",
1946
- openai: "gpt-5.5",
1959
+ // gpt-5.5 is not enabled on every OpenAI account/project (some are still
1960
+ // capped at gpt-5) — gpt-5 is the safer, more broadly available default
1961
+ // until a user/org explicitly opts into 5.5 via `crosscheck models set`.
1962
+ openai: "gpt-5",
1947
1963
  xai: "grok-4-latest",
1948
1964
  mistral: "mistral-large-latest",
1949
1965
  groq: "llama-3.3-70b-versatile",
@@ -2192,7 +2208,7 @@ import { z } from "zod";
2192
2208
  // src/server-meta.ts
2193
2209
  init_esm_shims();
2194
2210
  var SERVER_NAME = "crosscheck-agent";
2195
- var SERVER_VERSION = true ? "0.2.13" : "0.0.0-dev";
2211
+ var SERVER_VERSION = true ? "0.2.14" : "0.0.0-dev";
2196
2212
 
2197
2213
  // src/tools/audit.ts
2198
2214
  init_esm_shims();
@@ -12503,7 +12519,7 @@ var CHECK_INTERVAL_SECONDS = 3 * 24 * 60 * 60;
12503
12519
  var DEFAULT_PACKAGE = "crosscheck-cli";
12504
12520
  var FETCH_TIMEOUT_MS = 3e3;
12505
12521
  function engineVersion() {
12506
- return true ? "0.2.13" : "0.0.0-dev";
12522
+ return true ? "0.2.14" : "0.0.0-dev";
12507
12523
  }
12508
12524
  function defaultUpdateCachePath() {
12509
12525
  const base = process.env["CROSSCHECK_DATA_DIR"] || path10.join(os.homedir() || os.tmpdir(), ".crosscheck");