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.
@@ -44,8 +44,8 @@ var pricing_default = {
44
44
  _meta: {
45
45
  currency: "USD",
46
46
  unit: "per_1k_tokens",
47
- updated_at: "2026-08-04",
48
- 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."
47
+ updated_at: "2026-09-06",
48
+ 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."
49
49
  },
50
50
  anthropic: {
51
51
  "claude-opus-4-5": {
@@ -97,6 +97,11 @@ var pricing_default = {
97
97
  prompt_per_1k: 8e-4,
98
98
  completion_per_1k: 4e-3,
99
99
  cached_per_1k: 8e-5
100
+ },
101
+ "claude-fable-5-1": {
102
+ prompt_per_1k: 0.01,
103
+ completion_per_1k: 0.05,
104
+ cached_per_1k: 25e-5
100
105
  }
101
106
  },
102
107
  openai: {
@@ -149,6 +154,11 @@ var pricing_default = {
149
154
  prompt_per_1k: 11e-4,
150
155
  completion_per_1k: 44e-4,
151
156
  cached_per_1k: 55e-5
157
+ },
158
+ "gpt-6-astra": {
159
+ prompt_per_1k: 0.01,
160
+ completion_per_1k: 0.05,
161
+ cached_per_1k: 1e-3
152
162
  }
153
163
  },
154
164
  xai: {
@@ -188,6 +198,11 @@ var pricing_default = {
188
198
  prompt_per_1k: 1e-4,
189
199
  completion_per_1k: 4e-4,
190
200
  cached_per_1k: 25e-6
201
+ },
202
+ "gemini-3.8-flash": {
203
+ prompt_per_1k: 75e-5,
204
+ completion_per_1k: 375e-5,
205
+ cached_per_1k: 75e-6
191
206
  }
192
207
  },
193
208
  mistral: {
@@ -423,7 +438,13 @@ var PROVIDER_CAPS = {
423
438
  family: "openai_chat",
424
439
  system_role: "inline",
425
440
  supports_temperature: "model",
426
- reasoning_prefixes: ["gpt-5", "o1", "o3", "o4"]
441
+ // gpt-6 added 2026-09-06: GPT-6 Astra rejects `max_tokens` outright
442
+ // ("Unsupported parameter ... use max_completion_tokens"), which is a 400,
443
+ // NOT a model-access failure — so the fallback chain correctly declines to
444
+ // fire and the provider silently drops out of the panel instead. Reasoning
445
+ // -class routing is what selects max_completion_tokens and omits
446
+ // temperature, so the prefix is the fix.
447
+ reasoning_prefixes: ["gpt-5", "gpt-6", "o1", "o3", "o4"]
427
448
  },
428
449
  xai: { family: "openai_chat", system_role: "inline", supports_temperature: true },
429
450
  mistral: { family: "openai_chat", system_role: "inline", supports_temperature: true },
@@ -478,12 +499,20 @@ var ProviderError = class extends Error {
478
499
  * actually fix. Distinct from `transient`: this is never worth
479
500
  * retrying the SAME model, but IS worth trying a different one. */
480
501
  modelAccessFailure;
502
+ /** True for "the key works, the account is out of credit / over a spend
503
+ * limit." Rides alongside kind "auth" rather than replacing it, because
504
+ * every retry and fallback decision downstream is already tuned to that
505
+ * kind — but the two are completely different things to a human, and
506
+ * reporting "API key rejected" for an unpaid invoice sends people to
507
+ * regenerate a key that was never the problem. */
508
+ billing;
481
509
  constructor(kind, message, opts) {
482
510
  super(message);
483
511
  this.kind = kind;
484
512
  this.status = opts?.status;
485
513
  this.transient = opts?.transient ?? defaultTransient(kind);
486
514
  this.modelAccessFailure = opts?.modelAccessFailure ?? false;
515
+ this.billing = opts?.billing ?? false;
487
516
  if (opts?.retryAfterS !== void 0) {
488
517
  this.retryAfterS = opts.retryAfterS;
489
518
  }
@@ -521,7 +550,7 @@ function httpFailureToProviderError(provider, status, bodyText, retryAfterS, mod
521
550
  return new ProviderError(
522
551
  "auth",
523
552
  `${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}`,
524
- { status }
553
+ { status, billing: true }
525
554
  );
526
555
  }
527
556
  if (status === 401 || status === 403) {
@@ -1363,7 +1392,7 @@ var import_zod = require("zod");
1363
1392
 
1364
1393
  // src/server-meta.ts
1365
1394
  var SERVER_NAME = "crosscheck-agent";
1366
- var SERVER_VERSION = true ? "0.2.19" : "0.0.0-dev";
1395
+ var SERVER_VERSION = true ? "0.2.21" : "0.0.0-dev";
1367
1396
 
1368
1397
  // src/tools/audit.ts
1369
1398
  var import_node_fs4 = require("fs");
@@ -1869,7 +1898,9 @@ async function attachUsageBlock(result, answers, opts) {
1869
1898
  purpose: a.usage?.purpose ?? null,
1870
1899
  wall_ms: a.elapsed_ms ?? 0,
1871
1900
  cpu_ms: a.cpu_ms ?? 0,
1872
- cache_hit: Boolean(a.cache_hit)
1901
+ cache_hit: Boolean(a.cache_hit),
1902
+ ...a.error_kind ? { error_kind: a.error_kind } : {},
1903
+ ...a.error_billing ? { error_billing: true } : {}
1873
1904
  }))
1874
1905
  };
1875
1906
  result["timing"] = timing;
@@ -2170,11 +2201,13 @@ async function askOne(provider, messages, opts) {
2170
2201
  const cpuMs = Math.trunc((cpu.user + cpu.system) / 1e3);
2171
2202
  const kind = e instanceof ProviderError ? e.kind : "other";
2172
2203
  const msg = e instanceof Error ? e.message : String(e);
2204
+ const billing = e instanceof ProviderError && e.billing;
2173
2205
  return {
2174
2206
  provider: provider.name,
2175
2207
  model: provider.model,
2176
2208
  error: msg,
2177
2209
  error_kind: kind,
2210
+ ...billing ? { error_billing: true } : {},
2178
2211
  attempts: 0,
2179
2212
  usage: emptyUsage(provider.name, provider.model, opts.purpose),
2180
2213
  cache_hit: false,
@@ -11765,7 +11798,7 @@ var CHECK_INTERVAL_SECONDS = 3 * 24 * 60 * 60;
11765
11798
  var DEFAULT_PACKAGE = "crosscheck-cli";
11766
11799
  var FETCH_TIMEOUT_MS = 3e3;
11767
11800
  function engineVersion() {
11768
- return true ? "0.2.19" : "0.0.0-dev";
11801
+ return true ? "0.2.21" : "0.0.0-dev";
11769
11802
  }
11770
11803
  function defaultUpdateCachePath() {
11771
11804
  const base = process.env["CROSSCHECK_DATA_DIR"] || import_node_path12.default.join(import_node_os2.default.homedir() || import_node_os2.default.tmpdir(), ".crosscheck");