crosscheck-mcp 0.2.19 → 0.2.21

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.
@@ -11,8 +11,8 @@ var pricing_default = {
11
11
  _meta: {
12
12
  currency: "USD",
13
13
  unit: "per_1k_tokens",
14
- updated_at: "2026-08-04",
15
- notes: "Prices reflect public list pricing per provider. cached_per_1k applies to prompt tokens served from prompt-cache (Anthropic) or input-cache (OpenAI) when supported. Update when providers change rates. Missing models fall back to cost=0 with estimated=true. 2026-06-07: removed decommissioned gemini-2.0-flash / gemini-2.0-flash-lite (Google returns 404) and replaced the low-tier lite model with gemini-2.5-flash-lite. 2026-06-08: bumped the default Anthropic model to claude-opus-4-8. Kept gemini-2.5-pro as the Gemini default (gemini-3.1-pro-preview measured ~2.2x the cost at $2/$12 per M \u2014 output-token dominated by ~1.5k thinking tokens \u2014 so not worth it for a 1-of-4 panel voice). 2026-06-09: corrected rates verified against live provider pricing pages \u2014 gemini-2.5-pro output $5->$10/M; gemini-2.5-flash $0.15/$0.60 -> $0.30/$2.50; gpt-5 $5/$15 -> $1.25/$10 (cached $0.125); grok-4-latest input $5->$3/M (legacy grok-4 tier). Anthropic opus/sonnet/haiku rates confirmed unchanged. Older/unused models (gpt-4o, o1, o3, grok-3) not all re-verified. 2026-07-02: added claude-fable-5 as the optional reasoning-upgrade model (used only for the lead reasoning seat when the operator bumps a heavy task). 2026-07-04: set claude-fable-5 to its real pay-as-you-go API price effective 2026-07-07 \u2014 $10/M input ($0.01/1k), $50/M output ($0.05/1k), cached at 10% of input ($0.001/1k). Dropped the estimated flag. Note: Fable 5 is cheaper than opus-4-8 on both input and output. 2026-07-09: Google retired gemini-2.5-pro AND gemini-3-pro-preview (both now 404 'no longer available'). Moved the Gemini default to gemini-3.1-pro-preview ($2/M in, $12/M out, cache $0.20/M \u2014 the newest working pro; note it's a preview and may need another bump) and added gemini-3.5-flash ($1.50/M in, $9/M out, cache $0.15/M \u2014 GA) to the low/cheap tier. Removed the dead gemini-2.5-pro rate. IMPORTANT: gemini-3.x are heavy thinking models \u2014 thoughtsTokenCount (billed as output) is now folded into completion_tokens in the adapter, so cost reflects reasoning tokens. 2026-07-13: bumped the default OpenAI model to gpt-5.5 ($5/M in, $30/M out, cached $0.50/M \u2014 verified live). Note gpt-5.5 is markedly pricier than gpt-5 ($1.25/$10): ~4x input, 3x output. Kept gpt-5 in the table for cost lookups on pinned installs. 2026-07-16: added gpt-5.6 at the Sol (flagship) tier \u2014 $5/M in, $30/M out, cached $0.50/M (cache-write $6.25/M not modeled). gpt-5.6 is the second premium voice for the max-reasoning co-reasoner (runs alongside claude-fable-5 when an OpenAI key is set). Terra/Luna tiers not added (unused). 2026-07-17: added Moonshot AI (Kimi) provider with kimi-k3, base URL https://api.moonshot.ai/v1. Confirmed real rates \u2014 $3.00/M input (cache miss, $0.003/1k), $15.00/M output ($0.015/1k), $0.30/M cache-hit input ($0.0003/1k); 1M-token context. Kimi K3 is reasoning-class (temperature must be 1; uses max_completion_tokens). 2026-07-24: added claude-opus-5 ($5/M in, $25/M out, cached $0.50/M -- 10% of input, matching this table's existing cache-discount ratio) and made it the default anthropic model (was claude-opus-4-8). Fable 5 remains the reasoning-upgrade/super-mode target, unchanged. 2026-08-04: added Alibaba Cloud Qwen provider (OpenAI-compatible, DashScope international endpoint https://dashscope-intl.aliyuncs.com/compatible-mode/v1) with default model qwen3.8-max -- confirmed business pricing $2.00/M input ($0.002/1k), $6.00/M output ($0.006/1k), cache estimated at 10% of input ($0.0002/1k, not independently confirmed). Also added qwen3.7-max as a fallback tier at $1.25/M in ($0.00125/1k) / $3.75/M out ($0.00375/1k). Note: the model string initially configured (qwen-v3.8 / qwen-v3.7) does not exist on DashScope and 404s -- live-probed the real key against qwen3.8-max, qwen3.7-max, qwen3-max, qwen-max, and qwen-plus, all of which work; corrected the default and pricing keys to qwen3.8-max/qwen3.7-max and fixed QWEN_MODEL in both .env files to match. Qwen's Max tier is a standard instruct model, not reasoning-class -- normal temperature/max_tokens handling."
14
+ updated_at: "2026-09-06",
15
+ notes: "Prices reflect public list pricing per provider. cached_per_1k applies to prompt tokens served from prompt-cache (Anthropic) or input-cache (OpenAI) when supported. Update when providers change rates. Missing models fall back to cost=0 with estimated=true. 2026-06-07: removed decommissioned gemini-2.0-flash / gemini-2.0-flash-lite (Google returns 404) and replaced the low-tier lite model with gemini-2.5-flash-lite. 2026-06-08: bumped the default Anthropic model to claude-opus-4-8. Kept gemini-2.5-pro as the Gemini default (gemini-3.1-pro-preview measured ~2.2x the cost at $2/$12 per M \u2014 output-token dominated by ~1.5k thinking tokens \u2014 so not worth it for a 1-of-4 panel voice). 2026-06-09: corrected rates verified against live provider pricing pages \u2014 gemini-2.5-pro output $5->$10/M; gemini-2.5-flash $0.15/$0.60 -> $0.30/$2.50; gpt-5 $5/$15 -> $1.25/$10 (cached $0.125); grok-4-latest input $5->$3/M (legacy grok-4 tier). Anthropic opus/sonnet/haiku rates confirmed unchanged. Older/unused models (gpt-4o, o1, o3, grok-3) not all re-verified. 2026-07-02: added claude-fable-5 as the optional reasoning-upgrade model (used only for the lead reasoning seat when the operator bumps a heavy task). 2026-07-04: set claude-fable-5 to its real pay-as-you-go API price effective 2026-07-07 \u2014 $10/M input ($0.01/1k), $50/M output ($0.05/1k), cached at 10% of input ($0.001/1k). Dropped the estimated flag. Note: Fable 5 is cheaper than opus-4-8 on both input and output. 2026-07-09: Google retired gemini-2.5-pro AND gemini-3-pro-preview (both now 404 'no longer available'). Moved the Gemini default to gemini-3.1-pro-preview ($2/M in, $12/M out, cache $0.20/M \u2014 the newest working pro; note it's a preview and may need another bump) and added gemini-3.5-flash ($1.50/M in, $9/M out, cache $0.15/M \u2014 GA) to the low/cheap tier. Removed the dead gemini-2.5-pro rate. IMPORTANT: gemini-3.x are heavy thinking models \u2014 thoughtsTokenCount (billed as output) is now folded into completion_tokens in the adapter, so cost reflects reasoning tokens. 2026-07-13: bumped the default OpenAI model to gpt-5.5 ($5/M in, $30/M out, cached $0.50/M \u2014 verified live). Note gpt-5.5 is markedly pricier than gpt-5 ($1.25/$10): ~4x input, 3x output. Kept gpt-5 in the table for cost lookups on pinned installs. 2026-07-16: added gpt-5.6 at the Sol (flagship) tier \u2014 $5/M in, $30/M out, cached $0.50/M (cache-write $6.25/M not modeled). gpt-5.6 is the second premium voice for the max-reasoning co-reasoner (runs alongside claude-fable-5 when an OpenAI key is set). Terra/Luna tiers not added (unused). 2026-07-17: added Moonshot AI (Kimi) provider with kimi-k3, base URL https://api.moonshot.ai/v1. Confirmed real rates \u2014 $3.00/M input (cache miss, $0.003/1k), $15.00/M output ($0.015/1k), $0.30/M cache-hit input ($0.0003/1k); 1M-token context. Kimi K3 is reasoning-class (temperature must be 1; uses max_completion_tokens). 2026-07-24: added claude-opus-5 ($5/M in, $25/M out, cached $0.50/M -- 10% of input, matching this table's existing cache-discount ratio) and made it the default anthropic model (was claude-opus-4-8). Fable 5 remains the reasoning-upgrade/super-mode target, unchanged. 2026-08-04: added Alibaba Cloud Qwen provider (OpenAI-compatible, DashScope international endpoint https://dashscope-intl.aliyuncs.com/compatible-mode/v1) with default model qwen3.8-max -- confirmed business pricing $2.00/M input ($0.002/1k), $6.00/M output ($0.006/1k), cache estimated at 10% of input ($0.0002/1k, not independently confirmed). Also added qwen3.7-max as a fallback tier at $1.25/M in ($0.00125/1k) / $3.75/M out ($0.00375/1k). Note: the model string initially configured (qwen-v3.8 / qwen-v3.7) does not exist on DashScope and 404s -- live-probed the real key against qwen3.8-max, qwen3.7-max, qwen3-max, qwen-max, and qwen-plus, all of which work; corrected the default and pricing keys to qwen3.8-max/qwen3.7-max and fixed QWEN_MODEL in both .env files to match. Qwen's Max tier is a standard instruct model, not reasoning-class -- normal temperature/max_tokens handling. 2026-09-06: added gpt-6-astra at published list rates ($10/$50 per Mtok, $1/Mtok cache read; the $12.50/Mtok cache-WRITE rate has no field in this schema and is not modelled). gemini-3.8-flash now carries Google's published paid-tier rates ($0.75/$3.75/$0.075 per Mtok). THESE DOUBLE ON 2027-01-01 ($1.50/$7.50/$0.15) and this schema has no effective-date support, so they must be updated by hand on that date or every Gemini cost will read half of actual. claude-fable-5-1 now carries published rates ($10/$50/$0.25 per Mtok). Note its cache-read rate is 4x cheaper than claude-fable-5's, so the two must not be assumed to track each other. No inferred rows remain. All three were previously absent, which silently recorded their cost as $0."
16
16
  },
17
17
  anthropic: {
18
18
  "claude-opus-4-5": {
@@ -64,6 +64,11 @@ var pricing_default = {
64
64
  prompt_per_1k: 8e-4,
65
65
  completion_per_1k: 4e-3,
66
66
  cached_per_1k: 8e-5
67
+ },
68
+ "claude-fable-5-1": {
69
+ prompt_per_1k: 0.01,
70
+ completion_per_1k: 0.05,
71
+ cached_per_1k: 25e-5
67
72
  }
68
73
  },
69
74
  openai: {
@@ -116,6 +121,11 @@ var pricing_default = {
116
121
  prompt_per_1k: 11e-4,
117
122
  completion_per_1k: 44e-4,
118
123
  cached_per_1k: 55e-5
124
+ },
125
+ "gpt-6-astra": {
126
+ prompt_per_1k: 0.01,
127
+ completion_per_1k: 0.05,
128
+ cached_per_1k: 1e-3
119
129
  }
120
130
  },
121
131
  xai: {
@@ -155,6 +165,11 @@ var pricing_default = {
155
165
  prompt_per_1k: 1e-4,
156
166
  completion_per_1k: 4e-4,
157
167
  cached_per_1k: 25e-6
168
+ },
169
+ "gemini-3.8-flash": {
170
+ prompt_per_1k: 75e-5,
171
+ completion_per_1k: 375e-5,
172
+ cached_per_1k: 75e-6
158
173
  }
159
174
  },
160
175
  mistral: {
@@ -390,7 +405,13 @@ var PROVIDER_CAPS = {
390
405
  family: "openai_chat",
391
406
  system_role: "inline",
392
407
  supports_temperature: "model",
393
- reasoning_prefixes: ["gpt-5", "o1", "o3", "o4"]
408
+ // gpt-6 added 2026-09-06: GPT-6 Astra rejects `max_tokens` outright
409
+ // ("Unsupported parameter ... use max_completion_tokens"), which is a 400,
410
+ // NOT a model-access failure — so the fallback chain correctly declines to
411
+ // fire and the provider silently drops out of the panel instead. Reasoning
412
+ // -class routing is what selects max_completion_tokens and omits
413
+ // temperature, so the prefix is the fix.
414
+ reasoning_prefixes: ["gpt-5", "gpt-6", "o1", "o3", "o4"]
394
415
  },
395
416
  xai: { family: "openai_chat", system_role: "inline", supports_temperature: true },
396
417
  mistral: { family: "openai_chat", system_role: "inline", supports_temperature: true },
@@ -445,12 +466,20 @@ var ProviderError = class extends Error {
445
466
  * actually fix. Distinct from `transient`: this is never worth
446
467
  * retrying the SAME model, but IS worth trying a different one. */
447
468
  modelAccessFailure;
469
+ /** True for "the key works, the account is out of credit / over a spend
470
+ * limit." Rides alongside kind "auth" rather than replacing it, because
471
+ * every retry and fallback decision downstream is already tuned to that
472
+ * kind — but the two are completely different things to a human, and
473
+ * reporting "API key rejected" for an unpaid invoice sends people to
474
+ * regenerate a key that was never the problem. */
475
+ billing;
448
476
  constructor(kind, message, opts) {
449
477
  super(message);
450
478
  this.kind = kind;
451
479
  this.status = opts?.status;
452
480
  this.transient = opts?.transient ?? defaultTransient(kind);
453
481
  this.modelAccessFailure = opts?.modelAccessFailure ?? false;
482
+ this.billing = opts?.billing ?? false;
454
483
  if (opts?.retryAfterS !== void 0) {
455
484
  this.retryAfterS = opts.retryAfterS;
456
485
  }
@@ -488,7 +517,7 @@ function httpFailureToProviderError(provider, status, bodyText, retryAfterS, mod
488
517
  return new ProviderError(
489
518
  "auth",
490
519
  `${provider}: out of credits or billing isn't set up (HTTP ${status}). Your API key is reaching ${provider}, but the account has no usable balance \u2014 add credits / enable billing in your ${provider} console, then retry. Detail: ${detail}`,
491
- { status }
520
+ { status, billing: true }
492
521
  );
493
522
  }
494
523
  if (status === 401 || status === 403) {
@@ -1330,7 +1359,7 @@ import { z } from "zod";
1330
1359
 
1331
1360
  // src/server-meta.ts
1332
1361
  var SERVER_NAME = "crosscheck-agent";
1333
- var SERVER_VERSION = true ? "0.2.19" : "0.0.0-dev";
1362
+ var SERVER_VERSION = true ? "0.2.21" : "0.0.0-dev";
1334
1363
 
1335
1364
  // src/tools/audit.ts
1336
1365
  import { readdirSync, readFileSync as readFileSync3, statSync } from "fs";
@@ -1836,7 +1865,9 @@ async function attachUsageBlock(result, answers, opts) {
1836
1865
  purpose: a.usage?.purpose ?? null,
1837
1866
  wall_ms: a.elapsed_ms ?? 0,
1838
1867
  cpu_ms: a.cpu_ms ?? 0,
1839
- cache_hit: Boolean(a.cache_hit)
1868
+ cache_hit: Boolean(a.cache_hit),
1869
+ ...a.error_kind ? { error_kind: a.error_kind } : {},
1870
+ ...a.error_billing ? { error_billing: true } : {}
1840
1871
  }))
1841
1872
  };
1842
1873
  result["timing"] = timing;
@@ -2137,11 +2168,13 @@ async function askOne(provider, messages, opts) {
2137
2168
  const cpuMs = Math.trunc((cpu.user + cpu.system) / 1e3);
2138
2169
  const kind = e instanceof ProviderError ? e.kind : "other";
2139
2170
  const msg = e instanceof Error ? e.message : String(e);
2171
+ const billing = e instanceof ProviderError && e.billing;
2140
2172
  return {
2141
2173
  provider: provider.name,
2142
2174
  model: provider.model,
2143
2175
  error: msg,
2144
2176
  error_kind: kind,
2177
+ ...billing ? { error_billing: true } : {},
2145
2178
  attempts: 0,
2146
2179
  usage: emptyUsage(provider.name, provider.model, opts.purpose),
2147
2180
  cache_hit: false,
@@ -11749,7 +11782,7 @@ var CHECK_INTERVAL_SECONDS = 3 * 24 * 60 * 60;
11749
11782
  var DEFAULT_PACKAGE = "crosscheck-cli";
11750
11783
  var FETCH_TIMEOUT_MS = 3e3;
11751
11784
  function engineVersion() {
11752
- return true ? "0.2.19" : "0.0.0-dev";
11785
+ return true ? "0.2.21" : "0.0.0-dev";
11753
11786
  }
11754
11787
  function defaultUpdateCachePath() {
11755
11788
  const base = process.env["CROSSCHECK_DATA_DIR"] || path9.join(os.homedir() || os.tmpdir(), ".crosscheck");