@blockrun/clawrouter 0.12.248 → 0.12.249

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.
package/dist/cli.js CHANGED
@@ -89548,7 +89548,15 @@ async function startProxy(options) {
89548
89548
  }
89549
89549
  if (full) {
89550
89550
  try {
89551
- const balanceInfo = await balanceMonitor.checkBalance();
89551
+ const balanceInfo = await Promise.race([
89552
+ balanceMonitor.checkBalance(),
89553
+ new Promise(
89554
+ (_, reject) => setTimeout(
89555
+ () => reject(new Error("balance check timed out")),
89556
+ BALANCE_CHECK_TIMEOUT_MS
89557
+ ).unref()
89558
+ )
89559
+ ]);
89552
89560
  response.balance = balanceInfo.balanceUSD;
89553
89561
  response.isLow = balanceInfo.isLow;
89554
89562
  response.isEmpty = balanceInfo.isEmpty;
package/dist/index.js CHANGED
@@ -89368,7 +89368,15 @@ async function startProxy(options) {
89368
89368
  }
89369
89369
  if (full) {
89370
89370
  try {
89371
- const balanceInfo = await balanceMonitor.checkBalance();
89371
+ const balanceInfo = await Promise.race([
89372
+ balanceMonitor.checkBalance(),
89373
+ new Promise(
89374
+ (_, reject) => setTimeout(
89375
+ () => reject(new Error("balance check timed out")),
89376
+ BALANCE_CHECK_TIMEOUT_MS
89377
+ ).unref()
89378
+ )
89379
+ ]);
89372
89380
  response.balance = balanceInfo.balanceUSD;
89373
89381
  response.isLow = balanceInfo.isLow;
89374
89382
  response.isEmpty = balanceInfo.isEmpty;
@@ -51,17 +51,17 @@ The returned URL is a publicly hosted image, ready to use in Telegram, Discord,
51
51
 
52
52
  ## Models & Pricing
53
53
 
54
- | Model ID | Shorthand | Price | Sizes | Provider |
55
- | ---------------------------- | ------------------ | ------------------- | ---------------------------------------------------------------------------------- | --------------------- |
56
- | `google/nano-banana` | `nano-banana` | $0.05/image | 1024×1024 | Google Gemini Flash |
57
- | `google/nano-banana-2` | `banana-2` | $0.09/image | 1024×1024 | Google Nano Banana 2 |
58
- | `google/nano-banana-pro` | `banana-pro` | $0.10–$0.15/image | 1024×1024, 2048×2048, 4096×4096 | Google Gemini Pro |
59
- | `openai/gpt-image-1` | `gpt-image` | $0.02–$0.04/image | 1024×1024, 1536×1024, 1024×1536 | OpenAI GPT Image 1 |
60
- | `openai/gpt-image-2` | `gpt-image-2` | $0.06–$0.12/image | 1024×1024, 1536×1024, 1024×1536 | OpenAI GPT Image 2 |
61
- | `bytedance/seedream-5-pro` | `seedream` | $0.045–$0.09/image | 1024×1024, 1280×720, 2048×1024, 2048×2048, 2304×1728, 1728×2304, 2848×1600, 1600×2848 | ByteDance Seedream 5 |
62
- | `xai/grok-imagine-image` | `grok-imagine` | $0.02/image | 1024×1024 | xAI Grok Imagine |
63
- | `xai/grok-imagine-image-pro` | `grok-imagine-pro` | $0.07/image | 1024×1024 | xAI Grok Imagine Pro |
64
- | `zai/cogview-4` | `cogview` | $0.015–$0.02/image | 512×512, 768×768, 1024×1024, 768×1344, 1344×768, 1440×1440 | Zhipu CogView-4 |
54
+ | Model ID | Shorthand | Price | Sizes | Provider |
55
+ | ---------------------------- | ------------------ | ------------------ | ------------------------------------------------------------------------------------- | -------------------- |
56
+ | `google/nano-banana` | `nano-banana` | $0.05/image | 1024×1024 | Google Gemini Flash |
57
+ | `google/nano-banana-2` | `banana-2` | $0.09/image | 1024×1024 | Google Nano Banana 2 |
58
+ | `google/nano-banana-pro` | `banana-pro` | $0.10–$0.15/image | 1024×1024, 2048×2048, 4096×4096 | Google Gemini Pro |
59
+ | `openai/gpt-image-1` | `gpt-image` | $0.02–$0.04/image | 1024×1024, 1536×1024, 1024×1536 | OpenAI GPT Image 1 |
60
+ | `openai/gpt-image-2` | `gpt-image-2` | $0.06–$0.12/image | 1024×1024, 1536×1024, 1024×1536 | OpenAI GPT Image 2 |
61
+ | `bytedance/seedream-5-pro` | `seedream` | $0.045–$0.09/image | 1024×1024, 1280×720, 2048×1024, 2048×2048, 2304×1728, 1728×2304, 2848×1600, 1600×2848 | ByteDance Seedream 5 |
62
+ | `xai/grok-imagine-image` | `grok-imagine` | $0.02/image | 1024×1024 | xAI Grok Imagine |
63
+ | `xai/grok-imagine-image-pro` | `grok-imagine-pro` | $0.07/image | 1024×1024 | xAI Grok Imagine Pro |
64
+ | `zai/cogview-4` | `cogview` | $0.015–$0.02/image | 512×512, 768×768, 1024×1024, 768×1344, 1344×768, 1440×1440 | Zhipu CogView-4 |
65
65
 
66
66
  Default model: `google/nano-banana`.
67
67
 
@@ -369,18 +369,18 @@ When using ClawRouter with OpenClaw, generate and edit images directly from any
369
369
 
370
370
  ### Model shorthands
371
371
 
372
- | Shorthand | Full ID |
373
- | ------------------------------------ | ---------------------------- |
374
- | `nano-banana`, `banana` | `google/nano-banana` |
375
- | `banana-2`, `nano-banana-2` | `google/nano-banana-2` |
376
- | `banana-pro`, `nano-banana-pro` | `google/nano-banana-pro` |
377
- | `gpt-image`, `gpt-image-1` | `openai/gpt-image-1` |
378
- | `gpt-image-2` | `openai/gpt-image-2` |
379
- | `seedream` | `bytedance/seedream-5-pro` |
380
- | `grok-imagine` | `xai/grok-imagine-image` |
381
- | `grok-imagine-pro` | `xai/grok-imagine-image-pro` |
382
- | `cogview` | `zai/cogview-4` |
383
- | `dall-e-3`, `dalle3`, `dalle` (legacy) | `openai/gpt-image-2` |
372
+ | Shorthand | Full ID |
373
+ | -------------------------------------- | ---------------------------- |
374
+ | `nano-banana`, `banana` | `google/nano-banana` |
375
+ | `banana-2`, `nano-banana-2` | `google/nano-banana-2` |
376
+ | `banana-pro`, `nano-banana-pro` | `google/nano-banana-pro` |
377
+ | `gpt-image`, `gpt-image-1` | `openai/gpt-image-1` |
378
+ | `gpt-image-2` | `openai/gpt-image-2` |
379
+ | `seedream` | `bytedance/seedream-5-pro` |
380
+ | `grok-imagine` | `xai/grok-imagine-image` |
381
+ | `grok-imagine-pro` | `xai/grok-imagine-image-pro` |
382
+ | `cogview` | `zai/cogview-4` |
383
+ | `dall-e-3`, `dalle3`, `dalle` (legacy) | `openai/gpt-image-2` |
384
384
 
385
385
  ---
386
386
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blockrun/clawrouter",
3
- "version": "0.12.248",
3
+ "version": "0.12.249",
4
4
  "description": "Smart LLM router — save 88% on inference costs. 71 models (5 free), one wallet, x402 micropayments.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -44,6 +44,7 @@
44
44
  "dev": "tsup --watch",
45
45
  "test": "vitest run",
46
46
  "test:watch": "vitest",
47
+ "test:integration": "vitest run --config vitest.integration.config.ts",
47
48
  "typecheck": "tsc --noEmit",
48
49
  "lint": "eslint src/",
49
50
  "format": "prettier --write .",
@@ -164,7 +164,7 @@ Realtime prices and historical OHLC across every asset class. The agent should c
164
164
 
165
165
  | Tool | Purpose | Price |
166
166
  | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------- |
167
- | `blockrun_image_generation` | 9 image models — GPT Image 1/2, Nano Banana / 2 / Pro, Seedream 5 Pro, Grok Imagine / Pro, CogView-4 | $0.015–$0.15 / image |
167
+ | `blockrun_image_generation` | 9 image models — GPT Image 1/2, Nano Banana / 2 / Pro, Seedream 5 Pro, Grok Imagine / Pro, CogView-4 | $0.015–$0.15 / image |
168
168
  | `blockrun_image_edit` | Edit / inpaint existing image (openai/gpt-image-1) | $0.02–$0.04 / image |
169
169
  | `blockrun_video_generation` | Grok Imagine + ByteDance Seedance (1.5-pro / 2.0-fast / 2.0) at 720p with synced audio (t2v default), 5–10s, + OpenAI Sora 2 via Azure (`azure/sora-2`, 4/8/12s, t2v + i2v, rejects human faces in reference images). Seedance is token-priced upstream (~20,256 tokens/sec at the 720p+audio default — 2× the prior 480p rate); `image_url` (image-to-video) costs the same as t2v since 2026-06-01. Seedance 2.0 variants accept optional `real_face_asset_id` (`ta_…`) for BytePlus RealFace character-consistency — mutually exclusive with `image_url`. | $0.05/s (Grok); $0.10/s (Sora 2); Seedance ~$0.46–$1.49 per 5s clip |
170
170