@blockrun/clawrouter 0.12.322 → 0.12.323
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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __blockrun_createRequire } from 'node:module'; const require = __blockrun_createRequire(import.meta.url);
|
|
3
3
|
var __create=Object.create;var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty;var __require=(x=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(x,{get:(a,b)=>(typeof require<"u"?require:a)[b]}):x)(function(x){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+x+'" is not supported')});var __esm=(fn,res,err)=>function(){if(err)throw err[0];try{return fn&&(res=(0,fn[__getOwnPropNames(fn)[0]])(fn=0)),res}catch(e7){throw err=[e7],e7}};var __commonJS=(cb,mod5)=>function(){try{return mod5||(0,cb[__getOwnPropNames(cb)[0]])((mod5={exports:{}}).exports,mod5),mod5.exports}catch(e7){throw mod5=0,e7}};var __export=(target,all4)=>{for(var name in all4)__defProp(target,name,{get:all4[name],enumerable:!0})},__copyProps=(to2,from28,except,desc)=>{if(from28&&typeof from28=="object"||typeof from28=="function")for(let key3 of __getOwnPropNames(from28))!__hasOwnProp.call(to2,key3)&&key3!==except&&__defProp(to2,key3,{get:()=>from28[key3],enumerable:!(desc=__getOwnPropDesc(from28,key3))||desc.enumerable});return to2};var __toESM=(mod5,isNodeMode,target)=>(target=mod5!=null?__create(__getProtoOf(mod5)):{},__copyProps(isNodeMode||!mod5||!mod5.__esModule?__defProp(target,"default",{value:mod5,enumerable:!0}):target,mod5)),__toCommonJS=mod5=>__copyProps(__defProp({},"__esModule",{value:!0}),mod5);var snapshot_v1_default,init_snapshot_v1=__esm({"node_modules/@blockrun/model-catalog/dist/snapshot.v1.json"(){snapshot_v1_default={catalog:{schema_version:1,catalog_version:"2026.11.12.2",observed_at:"2026-11-12T20:53:46.000Z",sources:{base:"https://blockrun.ai/api/v1/models?format=json",solana:"https://sol.blockrun.ai/api/v1/models?format=json"},models:[{id:"anthropic/claude-fable-5",name:"Claude Fable 5",provider:"anthropic",description:"Mythos-class tier above Opus, for the most demanding reasoning and long-horizon agentic work. 1M context, 128K output, always-on thinking",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:10,output:50,cache_read:1,cache_write:12.5},context_window:1e6,max_output:128e3},solana:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:10,output:50},context_window:1e6,max_output:128e3}}},{id:"anthropic/claude-fable-5.1",name:"Claude Fable 5.1",provider:"anthropic",description:"Anthropic's most capable model \u2014 successor to Fable 5 in the same tier at the same price, for the most demanding reasoning and long-horizon agentic work. 1M context, 128K output, always-on thinking",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:10,output:50,cache_read:.25,cache_write:12.5},context_window:1e6,max_output:128e3},solana:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:10,output:50},context_window:1e6,max_output:128e3}}},{id:"anthropic/claude-fable-5.2",name:"Claude Fable 5.2",provider:"anthropic",description:"Anthropic's most capable model \u2014 successor to Fable 5.1 at a lower price, for the most demanding reasoning and long-horizon agentic work. 1M context, 128K output, always-on thinking. Anthropic retains requests to this model for 30 days.",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:8,output:40,cache_read:.2,cache_write:10},context_window:1e6,max_output:128e3},solana:{listed:!1,categories:[],billing_mode:"unavailable",pricing:{}}}},{id:"anthropic/claude-haiku-4.5",name:"Claude Haiku 4.5",provider:"anthropic",description:"Fastest and most efficient Claude, near-frontier intelligence",lifecycle:"active",declared_capabilities:["chat","coding","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","vision"],billing_mode:"paid",pricing:{input:1,output:5,cache_read:.1,cache_write:1.25},context_window:2e5,max_output:64e3},solana:{listed:!0,categories:["chat","coding","vision"],billing_mode:"paid",pricing:{input:1,output:5},context_window:2e5,max_output:64e3}}},{id:"anthropic/claude-opus-4.5",name:"Claude Opus 4.5",provider:"anthropic",description:"Claude Opus 4.5 \u2014 enhanced reasoning and creativity",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:5,output:25,cache_read:.5,cache_write:6.25},context_window:2e5,max_output:64e3},solana:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:5,output:25},context_window:2e5,max_output:64e3}}},{id:"anthropic/claude-opus-4.7",name:"Claude Opus 4.7",provider:"anthropic",description:"Powerful Claude Opus for complex reasoning and agentic coding. 1M context, 128k output, adaptive thinking",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:5,output:25,cache_read:.5,cache_write:6.25},context_window:1e6,max_output:128e3},solana:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:5,output:25},context_window:1e6,max_output:128e3}}},{id:"anthropic/claude-opus-4.8",name:"Claude Opus 4.8",provider:"anthropic",description:"Most capable Claude 4-series Opus for complex reasoning and agentic coding. 1M context, 128k output, adaptive thinking",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:5,output:25,cache_read:.5,cache_write:6.25},context_window:1e6,max_output:128e3},solana:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:5,output:25},context_window:1e6,max_output:128e3}}},{id:"anthropic/claude-opus-5",name:"Claude Opus 5",provider:"anthropic",description:"Opus 5 \u2014 step-change over Opus 4.8 for deep reasoning and agentic coding at the same price. 1M context, 128k output, adaptive thinking",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:5,output:25,cache_read:.5,cache_write:6.25},context_window:1e6,max_output:128e3},solana:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:5,output:25},context_window:1e6,max_output:128e3}}},{id:"anthropic/claude-opus-5.5",name:"Claude Opus 5.5",provider:"anthropic",description:"Newest Opus \u2014 Opus-class deep reasoning and agentic coding at a lower price than Opus 5. 1M context, 128k output, always-on adaptive thinking, vision",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:4,output:20,cache_read:.2,cache_write:5},context_window:1e6,max_output:128e3},solana:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:4,output:20},context_window:1e6,max_output:128e3}}},{id:"anthropic/claude-sonnet-4.5",name:"Claude Sonnet 4.5",provider:"anthropic",description:"Sonnet 4.5 \u2014 strong coding and agentic performance, vision",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:3,output:15,cache_read:.3,cache_write:3.75},context_window:2e5,max_output:64e3},solana:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:3,output:15},context_window:2e5,max_output:64e3}}},{id:"anthropic/claude-sonnet-4.6",name:"Claude Sonnet 4.6",provider:"anthropic",description:"Sonnet 4.6 \u2014 a balance of intelligence, speed, and cost",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:3,output:15,cache_read:.3,cache_write:3.75},context_window:1e6,max_output:128e3},solana:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:3,output:15},context_window:1e6,max_output:128e3}}},{id:"anthropic/claude-sonnet-5",name:"Claude Sonnet 5",provider:"anthropic",description:"Sonnet 5 \u2014 near-Opus coding/agentic quality at Sonnet cost. 1M context, 128k output, adaptive thinking, vision",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:2,output:10,cache_read:.2,cache_write:2.5},context_window:1e6,max_output:128e3},solana:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:2,output:10},context_window:1e6,max_output:128e3}}},{id:"anthropic/claude-sonnet-5.5",name:"Claude Sonnet 5.5",provider:"anthropic",description:"Newest Sonnet \u2014 fast, capable everyday coding and agent work at Sonnet cost. 1M context, 128k output, adaptive thinking, vision",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:2,output:10,cache_read:.2,cache_write:2.5},context_window:1e6,max_output:128e3},solana:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:2,output:10},context_window:1e6,max_output:128e3}}},{id:"azure/sora-2",name:"Sora 2",provider:"azure",description:"OpenAI Sora 2 via Azure AI Foundry \u2014 text-to-video AND image-to-video at 720p with synchronized audio. 4s default; 4, 8, or 12s. Portrait or landscape. Image-to-video takes a non-human reference image (human faces are rejected upstream \u2014 use Seedance + RealFace for real people). $0.10/sec.",lifecycle:"deprecated",declared_capabilities:["video"],aliases:[],redirects:[],networks:{base:{listed:!1,categories:["video"],billing_mode:"per_second",pricing:{per_second:.105,per_call_surcharge:0,transaction_fee:.001,default_duration_seconds:4,max_duration_seconds:12}},solana:{listed:!1,categories:[],billing_mode:"unavailable",pricing:{}}}},{id:"bytedance/seed-audio-1.0",name:"Seed Audio 1.0",provider:"bytedance",description:"ByteDance's Seed Audio 1.0 \u2014 prompt-directed audio creation: describe the voice, emotion, and sound staging in natural language. Up to 120s output, mp3/wav. Billed by audio duration ($0.003/second, estimated from input length).",lifecycle:"active",declared_capabilities:["speech","tts"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["speech","tts"],billing_mode:"per_character",pricing:{per_1k_chars:.315,transaction_fee:.001,max_input_chars:3e3,max_output_seconds:120}},solana:{listed:!0,categories:["speech","tts"],billing_mode:"per_character",pricing:{per_1k_chars:.315,max_input_chars:3e3}}}},{id:"bytedance/seedance-1.5-pro",name:"Seedance 1.5 Pro",provider:"bytedance",description:"ByteDance Seedance 1.5 Pro \u2014 budget text/image-to-video at 720p with synced audio, 5s default. Does NOT support RealFace assets.",lifecycle:"active",declared_capabilities:["video"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["video"],billing_mode:"per_second",pricing:{per_second:.070783146,per_call_surcharge:0,transaction_fee:.001,default_duration_seconds:5,max_duration_seconds:12}},solana:{listed:!0,categories:["video"],billing_mode:"per_second",pricing:{per_second:.070783146,per_call_surcharge:0,default_duration_seconds:5,max_duration_seconds:12}}}},{id:"bytedance/seedance-2.0",name:"Seedance 2.0 Pro",provider:"bytedance",description:"ByteDance Seedance 2.0 Pro \u2014 premium quality text/image-to-video at 720p with synced audio, 5s default. Supports BytePlus RealFace assets \u2014 see /docs/video/real-person-ip for enrollment.",lifecycle:"active",declared_capabilities:["video"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["video"],billing_mode:"per_second",pricing:{per_second:.22709592675,per_call_surcharge:0,transaction_fee:.001,default_duration_seconds:5,max_duration_seconds:15}},solana:{listed:!0,categories:["video"],billing_mode:"per_second",pricing:{per_second:.22709592675,per_call_surcharge:0,default_duration_seconds:5,max_duration_seconds:15}}}},{id:"bytedance/seedance-2.0-fast",name:"Seedance 2.0 Fast",provider:"bytedance",description:"ByteDance Seedance 2.0 Fast \u2014 fast video at 720p with synced audio, 5s default. ~60-80s to generate. Supports BytePlus RealFace assets \u2014 see /docs/video/real-person-ip for enrollment.",lifecycle:"active",declared_capabilities:["video"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["video"],billing_mode:"per_second",pricing:{per_second:.165160674,per_call_surcharge:0,transaction_fee:.001,default_duration_seconds:5,max_duration_seconds:15}},solana:{listed:!0,categories:["video"],billing_mode:"per_second",pricing:{per_second:.165160674,per_call_surcharge:0,default_duration_seconds:5,max_duration_seconds:15}}}},{id:"bytedance/seedance-2.0-mini",name:"Seedance 2.0 Mini",provider:"bytedance",description:"ByteDance Seedance 2.0 Mini \u2014 720p video with synced audio at half the flagship rate, 5s default. 480p and 720p (no 1080p/4K). Supports BytePlus RealFace assets \u2014 see /docs/video/real-person-ip for enrollment.",lifecycle:"active",declared_capabilities:["video"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["video"],billing_mode:"per_second",pricing:{per_second:.07971075,per_call_surcharge:0,transaction_fee:.001,default_duration_seconds:5,max_duration_seconds:15}},solana:{listed:!0,categories:["video"],billing_mode:"per_second",pricing:{per_second:.07971075,per_call_surcharge:0,default_duration_seconds:5,max_duration_seconds:15}}}},{id:"bytedance/seedance-2.5",name:"Seedance 2.5",provider:"bytedance",description:"ByteDance Seedance 2.5 \u2014 Long-form video up to 30s at 720p, with first/last-frame control, up to 30 reference images, and reference video/audio clips up to 30s each (billed per reference second). For 1080p or 4K use Seedance 2.0 Pro.",lifecycle:"active",declared_capabilities:["video"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["video"],billing_mode:"per_second",pricing:{per_second:.31557485925,per_call_surcharge:0,transaction_fee:.001,default_duration_seconds:5,max_duration_seconds:30}},solana:{listed:!0,categories:["video"],billing_mode:"per_second",pricing:{per_second:.31557485925,per_call_surcharge:0,default_duration_seconds:5,max_duration_seconds:30}}}},{id:"bytedance/seedream-5-pro",name:"Seedream 5.0 Pro",provider:"bytedance",description:"ByteDance's Seedream 5.0 Pro \u2014 flagship image generation and editing, up to 4K-class resolution with reference-image support",lifecycle:"active",declared_capabilities:["image"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["image"],billing_mode:"per_image",pricing:{per_image:.04725,transaction_fee:.001}},solana:{listed:!0,categories:["image"],billing_mode:"per_image",pricing:{per_image:.04725}}}},{id:"cohere/north-mini-code",name:"Cohere North Mini Code (Free)",provider:"cohere",description:"Cohere's North Mini Code, free. Compact coding model, 256K context, sub-second responses.",lifecycle:"active",declared_capabilities:["chat","coding"],aliases:[],redirects:[],networks:{base:{listed:!1,categories:["chat","coding"],billing_mode:"free",pricing:{input:0,output:0},context_window:256e3,max_output:16384},solana:{listed:!0,categories:["chat","coding"],billing_mode:"free",pricing:{input:0,output:0},context_window:256e3,max_output:16384}}},{id:"deepseek/deepseek-chat",name:"DeepSeek Chat (V4.1 Flash)",provider:"deepseek",description:"Compatibility id for DeepSeek V4.1 Flash in non-thinking mode ($0.14 in / $0.28 out) \u2014 same model, price and routing as deepseek/deepseek-v4.1-flash. Production-grade reliability and 5MB request bodies.",lifecycle:"active",declared_capabilities:["chat","coding","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","vision"],billing_mode:"paid",pricing:{input:.14,output:.28,cache_read:.006},context_window:1048576,max_output:65536},solana:{listed:!0,categories:["chat","coding","vision"],billing_mode:"paid",pricing:{input:.14,output:.28,cache_read:.006,cache_read_schemes:["batch-settlement"]},context_window:1048576,max_output:65536}}},{id:"deepseek/deepseek-reasoner",name:"DeepSeek Reasoner (V4.1 Flash)",provider:"deepseek",description:"Compatibility id for DeepSeek V4.1 Flash in thinking mode for reasoning tasks ($0.14 in / $0.28 out). Same upstream as deepseek/deepseek-v4.1-flash but with thinking enabled by default.",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:.14,output:.28,cache_read:.006},context_window:1048576,max_output:65536},solana:{listed:!0,categories:["coding","reasoning","vision"],billing_mode:"paid",pricing:{input:.14,output:.28,cache_read:.006,cache_read_schemes:["batch-settlement"]},context_window:1048576,max_output:65536}}},{id:"deepseek/deepseek-v4-flash-vision-exp",name:"DeepSeek V4 Flash Vision",provider:"deepseek",description:"DeepSeek V4 Flash Vision \u2014 1M context with text and image input. Experimental multimodal tier of the V4 Flash family.",lifecycle:"active",declared_capabilities:["chat","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","reasoning","vision"],billing_mode:"paid",pricing:{input:.3,output:1.2,cache_read:.006},context_window:1048576,max_output:65536},solana:{listed:!0,categories:["chat","reasoning","vision"],billing_mode:"paid",pricing:{input:.3,output:1.2,cache_read:.006,cache_read_schemes:["batch-settlement"]},context_window:1048576,max_output:65536}}},{id:"deepseek/deepseek-v4-pro",name:"DeepSeek V4 Pro",provider:"deepseek",description:"DeepSeek V4 flagship \u2014 1.6T MoE / 49B active, 1M context. Strongest open-weight reasoner. Thinking mode default.",lifecycle:"active",declared_capabilities:["chat","coding","reasoning"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning"],billing_mode:"paid",pricing:{input:1.32,output:3.96,cache_read:.044},context_window:1048576,max_output:65536},solana:{listed:!0,categories:["chat","coding","reasoning"],billing_mode:"paid",pricing:{input:1.32,output:3.96,cache_read:.044,cache_read_schemes:["batch-settlement"]},context_window:1048576,max_output:65536}}},{id:"deepseek/deepseek-v4.1-flash",name:"DeepSeek V4.1 Flash",provider:"deepseek",description:"DeepSeek V4.1 Flash in non-thinking mode \u2014 1M context at $0.14 in / $0.28 out. Production-grade reliability and 5MB request bodies.",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:.14,output:.28,cache_read:.006},context_window:1048576,max_output:65536},solana:{listed:!0,categories:["chat","coding","vision"],billing_mode:"paid",pricing:{input:.14,output:.28,cache_read:.006,cache_read_schemes:["batch-settlement"]},context_window:1048576,max_output:65536}}},{id:"elevenlabs/flash-v2.5",name:"ElevenLabs Flash v2.5",provider:"elevenlabs",description:"Ultra-low-latency (~75ms) speech synthesis for real-time voice agents. 32 languages.",lifecycle:"active",declared_capabilities:["speech","tts"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["speech","tts"],billing_mode:"per_character",pricing:{per_1k_chars:.0525,transaction_fee:.001,max_input_chars:4e4}},solana:{listed:!0,categories:["speech","tts"],billing_mode:"per_character",pricing:{per_1k_chars:.0525,max_input_chars:4e4}}}},{id:"elevenlabs/multilingual-v2",name:"ElevenLabs Multilingual v2",provider:"elevenlabs",description:"Highest-consistency voice for long-form narration, audiobooks, and voiceover. 29 languages.",lifecycle:"active",declared_capabilities:["speech","tts"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["speech","tts"],billing_mode:"per_character",pricing:{per_1k_chars:.105,transaction_fee:.001,max_input_chars:1e4}},solana:{listed:!0,categories:["speech","tts"],billing_mode:"per_character",pricing:{per_1k_chars:.105,max_input_chars:1e4}}}},{id:"elevenlabs/sound-effects",name:"ElevenLabs Sound Effects",provider:"elevenlabs",description:"Generate cinematic sound effects and audio textures from a text prompt (up to 22s).",lifecycle:"active",declared_capabilities:["sound_effect"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["sound_effect"],billing_mode:"per_generation",pricing:{per_generation:.0525,transaction_fee:.001,max_duration_seconds:22}},solana:{listed:!0,categories:["sound_effect"],billing_mode:"per_generation",pricing:{per_generation:.0525,max_duration_seconds:22}}}},{id:"elevenlabs/turbo-v2.5",name:"ElevenLabs Turbo v2.5",provider:"elevenlabs",description:"Balanced quality and latency (~250ms) for interactive use cases. 32 languages.",lifecycle:"active",declared_capabilities:["speech","tts"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["speech","tts"],billing_mode:"per_character",pricing:{per_1k_chars:.0525,transaction_fee:.001,max_input_chars:4e4}},solana:{listed:!0,categories:["speech","tts"],billing_mode:"per_character",pricing:{per_1k_chars:.0525,max_input_chars:4e4}}}},{id:"elevenlabs/v3",name:"ElevenLabs v3",provider:"elevenlabs",description:"Maximum expressiveness and emotional range for creative applications. 70+ languages.",lifecycle:"active",declared_capabilities:["speech","tts"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["speech","tts"],billing_mode:"per_character",pricing:{per_1k_chars:.105,transaction_fee:.001,max_input_chars:5e3}},solana:{listed:!0,categories:["speech","tts"],billing_mode:"per_character",pricing:{per_1k_chars:.105,max_input_chars:5e3}}}},{id:"google/gemini-2.5-flash",name:"Gemini 2.5 Flash",provider:"google",description:"Fast and efficient Gemini model with vision support",lifecycle:"active",declared_capabilities:["chat","coding","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","vision"],billing_mode:"paid",pricing:{input:.3,output:2.5,cache_read:.03},context_window:1048576,max_output:65536},solana:{listed:!0,categories:["chat","coding","vision"],billing_mode:"paid",pricing:{input:.3,output:2.5},context_window:1048576,max_output:65536}}},{id:"google/gemini-2.5-flash-lite",name:"Gemini 2.5 Flash Lite",provider:"google",description:"Most economical Gemini model - ultra-fast and lightweight (requires new SDK)",lifecycle:"active",declared_capabilities:["chat","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat"],billing_mode:"paid",pricing:{input:.1,output:.4,cache_read:.01},context_window:1048576,max_output:65536},solana:{listed:!0,categories:["chat","vision"],billing_mode:"paid",pricing:{input:.1,output:.4},context_window:1048576,max_output:65536}}},{id:"google/gemini-2.5-pro",name:"Gemini 2.5 Pro",provider:"google",description:"Gemini 2.5 Pro \u2014 strong reasoning, coding, and mathematics",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:1.25,output:10,cache_read:.125,long_context:[{threshold:2e5,inclusive:!1,input:2.5,output:15,cache_read:.25}]},context_window:1048576,max_output:65536},solana:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:1.25,output:10,long_context:[{threshold:2e5,inclusive:!1,input:2.5,output:15}]},context_window:1048576,max_output:65536}}},{id:"google/gemini-3-flash-preview",name:"Gemini 3 Flash Preview",provider:"google",description:"Frontier-class performance with Pro-level intelligence at Flash speed and pricing. Includes thinking mode (requires new SDK)",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:.5,output:3},context_window:1048576,max_output:65536},solana:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:.5,output:3},context_window:1048576,max_output:65536}}},{id:"google/gemini-3.1-flash-lite",name:"Gemini 3.1 Flash Lite",provider:"google",description:"Ultra-fast and lightweight Gemini 3.1 model with thinking mode for high-throughput tasks",lifecycle:"active",declared_capabilities:["chat","reasoning"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","reasoning"],billing_mode:"paid",pricing:{input:.25,output:1.5,cache_read:.025},context_window:1048576,max_output:65536},solana:{listed:!0,categories:["chat","reasoning"],billing_mode:"paid",pricing:{input:.25,output:1.5},context_window:1048576,max_output:65536}}},{id:"google/gemini-3.1-pro",name:"Gemini 3.1 Pro",provider:"google",description:"Gemini 3.1 Pro with improved thinking, token efficiency, and agentic capabilities. Optimized for software engineering (requires new SDK)",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:2,output:12,cache_read:.2,long_context:[{threshold:2e5,inclusive:!1,input:4,output:18,cache_read:.4}]},context_window:1048576,max_output:65536},solana:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:2,output:12,long_context:[{threshold:2e5,inclusive:!1,input:4,output:18}]},context_window:1048576,max_output:65536}}},{id:"google/gemini-3.5-flash",name:"Gemini 3.5 Flash",provider:"google",description:"Gemini 3.5 Flash with built-in thinking mode \u2014 frontier-class quality at Flash speed",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:1.5,output:9,cache_read:.15},context_window:1048576,max_output:65536},solana:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:1.5,output:9},context_window:1048576,max_output:65536}}},{id:"google/gemini-3.5-flash-lite",name:"Gemini 3.5 Flash Lite",provider:"google",description:"Latest Flash Lite \u2014 ultra-fast, lightweight Gemini with thinking mode for high-throughput tasks",lifecycle:"active",declared_capabilities:["chat","reasoning"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","reasoning"],billing_mode:"paid",pricing:{input:.3,output:2.5,cache_read:.03},context_window:1048576,max_output:65536},solana:{listed:!0,categories:["chat","reasoning"],billing_mode:"paid",pricing:{input:.3,output:2.5},context_window:1048576,max_output:65536}}},{id:"google/gemini-3.6-flash",name:"Gemini 3.6 Flash",provider:"google",description:"Gemini 3.6 Flash with built-in thinking mode \u2014 frontier-class quality at Flash speed",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:.75,output:3.75,cache_read:.075},context_window:1048576,max_output:65536},solana:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:.75,output:3.75},context_window:1048576,max_output:65536}}},{id:"google/gemini-3.8-flash",name:"Gemini 3.8 Flash",provider:"google",description:"Newest-generation Flash with built-in thinking mode \u2014 frontier-class quality at Flash speed",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:.75,output:3.75,cache_read:.075},context_window:1048576,max_output:65536},solana:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:.75,output:3.75},context_window:1048576,max_output:65536}}},{id:"google/gemini-4-argon",name:"Gemini 4 Argon",provider:"google",description:"Google's efficient Gemini 4 model: Gemini 4 intelligence with faster responses and fewer tokens per turn than Carbon",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:2,output:10,cache_read:.1},context_window:1048576,max_output:65536},solana:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:2,output:10},context_window:1048576,max_output:65536}}},{id:"google/gemini-4-carbon",name:"Gemini 4 Carbon",provider:"google",description:"Google's most capable reasoning model, built for complex software engineering, deep math and science, and long autonomous agent work",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:2,output:10,cache_read:.1},context_window:1048576,max_output:65536},solana:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:2,output:10},context_window:1048576,max_output:65536}}},{id:"google/nano-banana",name:"Nano Banana",provider:"google",description:"Google's Gemini 2.5 Flash image generation - fast and efficient",lifecycle:"active",declared_capabilities:["image"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["image"],billing_mode:"per_image",pricing:{per_image:.0525,transaction_fee:.001}},solana:{listed:!0,categories:["image"],billing_mode:"per_image",pricing:{per_image:.0525}}}},{id:"google/nano-banana-2",name:"Nano Banana 2",provider:"google",description:"Google's Gemini 3.1 Flash image generation - pro-level quality at Flash speed",lifecycle:"active",declared_capabilities:["image"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["image"],billing_mode:"per_image",pricing:{per_image:.0945,transaction_fee:.001}},solana:{listed:!0,categories:["image"],billing_mode:"per_image",pricing:{per_image:.0945}}}},{id:"google/nano-banana-pro",name:"Nano Banana Pro",provider:"google",description:"Google's Gemini 3 Pro image generation - highest quality up to 4K",lifecycle:"active",declared_capabilities:["image"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["image"],billing_mode:"per_image",pricing:{per_image:.105,transaction_fee:.001}},solana:{listed:!0,categories:["image"],billing_mode:"per_image",pricing:{per_image:.105}}}},{id:"meta/muse-spark-1.3",name:"Muse Spark 1.3",provider:"meta",description:"Meta's Muse Spark 1.3, Meta's current general model. 1M context, image + text input, tool calling, always reasons (reasoning_effort minimal to max).",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!1,categories:[],billing_mode:"unavailable",pricing:{}},solana:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:1.25,output:4.25},context_window:1048576,max_output:131072}}},{id:"meta/muse-wonder-1.0",name:"Muse Wonder 1.0",provider:"meta",description:"Meta's Muse Wonder 1.0 (preview), Meta's frontier model for agents and coding. 1M context, image + text input, tool calling, always reasons (reasoning_effort minimal to max).",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!1,categories:[],billing_mode:"unavailable",pricing:{}},solana:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:4,output:20},context_window:1048576,max_output:131072}}},{id:"minimax/minimax-m2.7",name:"MiniMax M2.7",provider:"minimax",description:"MiniMax's M2.7 reasoning model with recursive self-improvement. Great value for complex tasks (~60 tps)",lifecycle:"active",declared_capabilities:["chat","coding","reasoning"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning"],billing_mode:"paid",pricing:{input:.3,output:1.2},context_window:204800,max_output:16384},solana:{listed:!0,categories:["chat","coding","reasoning"],billing_mode:"paid",pricing:{input:.3,output:1.2},context_window:204800,max_output:16384}}},{id:"minimax/minimax-m3",name:"MiniMax M3",provider:"minimax",description:"MiniMax's M3 flagship \u2014 1M context, strong reasoning + coding.",lifecycle:"active",declared_capabilities:["chat","coding","reasoning"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning"],billing_mode:"paid",pricing:{input:.3,output:1.2},context_window:1048576,max_output:65536},solana:{listed:!0,categories:["chat","coding","reasoning"],billing_mode:"paid",pricing:{input:.3,output:1.2},context_window:1048576,max_output:65536}}},{id:"minimax/music-2.5+",name:"MiniMax Music 2.5+",provider:"minimax",description:"MiniMax's flagship music generation model. Supports lyrics, instrumental, and style prompts. ~3 min output.",lifecycle:"active",declared_capabilities:["music"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["music"],billing_mode:"per_track",pricing:{per_track:.199,transaction_fee:.001}},solana:{listed:!0,categories:["music"],billing_mode:"per_track",pricing:{per_track:.2}}}},{id:"mistral/mistral-large-4",name:"Mistral Large 4",provider:"mistral",description:"Mistral's flagship \u2014 multimodal reasoning model for coding and agentic work. 512K context, image input.",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:1.36,output:4.18},context_window:524288,max_output:262144},solana:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:1.36,output:4.18},context_window:524288,max_output:262144}}},{id:"moonshot/kimi-k3",name:"Kimi K3",provider:"moonshot",description:"Moonshot's flagship \u2014 a 2.8-trillion-parameter open MoE with 1M context, image + text input, returning reasoning_content. Live-verified 2026-07-17 (chat, tools, vision).",lifecycle:"deprecated",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!1,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:3,output:15,cache_read:.3},context_window:1048576,max_output:65536},solana:{listed:!1,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:3,output:15},context_window:1048576,max_output:65536}}},{id:"moonshot/kimi-k3.1-pro",name:"Kimi K3.1 Pro",provider:"moonshot",description:"Moonshot's flagship \u2014 post-trained successor to Kimi K3 for long-horizon coding and agents. 1M context, image + text input, returns reasoning_content.",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:2,output:10,cache_read:.2},context_window:1048576,max_output:65536},solana:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:2,output:10},context_window:1048576,max_output:65536}}},{id:"nvidia/llama-3.2-11b-vision",name:"Llama 3.2 11B Vision (Free)",provider:"nvidia",description:"Meta's Llama 3.2 11B Vision hosted free by NVIDIA. Accepts images; 128K context.",lifecycle:"deprecated",declared_capabilities:["chat","vision"],aliases:[],redirects:[],networks:{base:{listed:!1,categories:["chat","vision"],billing_mode:"free",pricing:{input:0,output:0},context_window:128e3,max_output:16384},solana:{listed:!1,categories:["chat","vision"],billing_mode:"free",pricing:{input:0,output:0},context_window:128e3,max_output:16384}}},{id:"nvidia/minimax-m3.1-flash",name:"MiniMax M3.1 Flash (Free)",provider:"nvidia",description:"MiniMax's M3.1 Flash hosted free by NVIDIA. Reasons before it answers, calls tools, and takes a 1M context, usually in a few seconds.",lifecycle:"active",declared_capabilities:["chat","coding","reasoning"],aliases:[],redirects:[],networks:{base:{listed:!1,categories:["chat","coding","reasoning"],billing_mode:"free",pricing:{input:0,output:0},context_window:1048576,max_output:16384},solana:{listed:!0,categories:["chat","coding","reasoning"],billing_mode:"free",pricing:{input:0,output:0},context_window:1048576,max_output:16384}}},{id:"nvidia/muse-glimmer-30b",name:"Muse Glimmer 30B (Free)",provider:"nvidia",description:"Meta's Muse Glimmer 30B \u2014 Apache 2.0, 29.6B dense, hosted free by NVIDIA. Meta's open line after Llama.",lifecycle:"active",declared_capabilities:["chat","coding","reasoning"],aliases:[],redirects:[],networks:{base:{listed:!1,categories:["chat","coding","reasoning"],billing_mode:"free",pricing:{input:0,output:0},context_window:131072,max_output:16384},solana:{listed:!0,categories:["chat","coding","reasoning"],billing_mode:"free",pricing:{input:0,output:0},context_window:131072,max_output:16384}}},{id:"nvidia/nemotron-3-nano-omni-30b-a3b-reasoning",name:"Nemotron 3 Nano Omni (Free)",provider:"nvidia",description:"NVIDIA's multimodal reasoning Nemotron Nano Omni, free. 31B / 3.2B active MoE. Accepts text, images, video, audio. ChartQA 90.3, DocVQA 95.6, MMMU 70.8 \u2014 the only free model in our catalog that takes video and audio as well as images",lifecycle:"active",declared_capabilities:["chat","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!1,categories:["chat","reasoning","vision"],billing_mode:"free",pricing:{input:0,output:0},context_window:256e3,max_output:16384},solana:{listed:!0,categories:["chat","reasoning","vision"],billing_mode:"free",pricing:{input:0,output:0},context_window:256e3,max_output:16384}}},{id:"nvidia/nemotron-3-super-120b",name:"Nemotron 3.5 Super 120B (Free)",provider:"nvidia",description:"NVIDIA Nemotron 3.5 Super VL: MoE model (12B active params) with thinking mode. Reads images, fast and capable reasoning",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"free",pricing:{input:0,output:0},context_window:131072,max_output:16384},solana:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"free",pricing:{input:0,output:0},context_window:131072,max_output:16384}}},{id:"nvidia/nemotron-3-ultra-550b",name:"Nemotron 3 Ultra 550B (Free)",provider:"nvidia",description:"NVIDIA Nemotron 3 Ultra 550B-A55B, free. 550B total / 55B active MoE with a 1M-token context \u2014 the largest free model in the catalog.",lifecycle:"active",declared_capabilities:["chat","reasoning"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","reasoning"],billing_mode:"free",pricing:{input:0,output:0},context_window:1e6,max_output:16384},solana:{listed:!0,categories:["chat","reasoning"],billing_mode:"free",pricing:{input:0,output:0},context_window:1e6,max_output:16384}}},{id:"nvidia/nemotron-3.5-bolt",name:"Nemotron 3.5 Bolt (Free)",provider:"nvidia",description:"NVIDIA's small, fast Nemotron 3.5 hosted free by NVIDIA. Answers in about a second, reads images and calls tools; no thinking pass. 131K context",lifecycle:"active",declared_capabilities:["chat","coding","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","vision"],billing_mode:"free",pricing:{input:0,output:0},context_window:131072,max_output:16384},solana:{listed:!0,categories:["chat","coding","vision"],billing_mode:"free",pricing:{input:0,output:0},context_window:131072,max_output:16384}}},{id:"nvidia/nemotron-3.5-lightning",name:"Nemotron 3.5 Lightning (Free)",provider:"nvidia",description:"NVIDIA Nemotron 3.5 Lightning 30B-A3B, free. Thinking-mode reasoning with a 1M-token context.",lifecycle:"active",declared_capabilities:["chat","reasoning"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","reasoning"],billing_mode:"free",pricing:{input:0,output:0},context_window:1e6,max_output:16384},solana:{listed:!0,categories:["chat","reasoning"],billing_mode:"free",pricing:{input:0,output:0},context_window:1e6,max_output:16384}}},{id:"openai/chat-latest",name:"ChatGPT Instant (GPT-5.5)",provider:"openai",description:"ChatGPT's default model \u2014 the rolling `chat-latest` alias, currently GPT-5.5 Instant. Tuned for speed and concision, same price as GPT-5.5",lifecycle:"active",declared_capabilities:["chat","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","vision"],billing_mode:"paid",pricing:{input:5,output:30,cache_read:.5},context_window:128e3,max_output:128e3},solana:{listed:!0,categories:["chat","vision"],billing_mode:"paid",pricing:{input:5,output:30},context_window:128e3,max_output:128e3}}},{id:"openai/gpt-4.1",name:"GPT-4.1",provider:"openai",description:"Latest GPT-4 generation model",lifecycle:"active",declared_capabilities:["chat","coding","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","vision"],billing_mode:"paid",pricing:{input:2,output:8,cache_read:.5},context_window:128e3,max_output:32768},solana:{listed:!0,categories:["chat","coding","vision"],billing_mode:"paid",pricing:{input:2,output:8},context_window:128e3,max_output:32768}}},{id:"openai/gpt-4.1-mini",name:"GPT-4.1 Mini",provider:"openai",description:"Fast and affordable GPT-4.1 model",lifecycle:"active",declared_capabilities:["chat","coding","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding"],billing_mode:"paid",pricing:{input:.4,output:1.6,cache_read:.1},context_window:128e3,max_output:32768},solana:{listed:!0,categories:["chat","coding","vision"],billing_mode:"paid",pricing:{input:.4,output:1.6},context_window:128e3,max_output:32768}}},{id:"openai/gpt-4.1-nano",name:"GPT-4.1 Nano",provider:"openai",description:"Ultra-fast and cost-effective GPT-4.1",lifecycle:"deprecated",declared_capabilities:["chat","vision"],aliases:[],redirects:[],networks:{base:{listed:!1,categories:["chat"],billing_mode:"paid",pricing:{input:.1,output:.4,cache_read:.025},context_window:128e3,max_output:32768},solana:{listed:!1,categories:["chat","vision"],billing_mode:"paid",pricing:{input:.1,output:.4},context_window:128e3,max_output:32768}}},{id:"openai/gpt-4o",name:"GPT-4o",provider:"openai",description:"Multimodal model with vision and audio",lifecycle:"active",declared_capabilities:["chat","coding","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","vision"],billing_mode:"paid",pricing:{input:2.5,output:10,cache_read:1.25},context_window:128e3,max_output:16384},solana:{listed:!0,categories:["chat","coding","vision"],billing_mode:"paid",pricing:{input:2.5,output:10},context_window:128e3,max_output:16384}}},{id:"openai/gpt-4o-mini",name:"GPT-4o Mini",provider:"openai",description:"Fast and affordable GPT-4o model",lifecycle:"active",declared_capabilities:["chat","coding","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding"],billing_mode:"paid",pricing:{input:.15,output:.6,cache_read:.075},context_window:128e3,max_output:16384},solana:{listed:!0,categories:["chat","coding","vision"],billing_mode:"paid",pricing:{input:.15,output:.6},context_window:128e3,max_output:16384}}},{id:"openai/gpt-5-mini",name:"GPT-5 Mini",provider:"openai",description:"Cost-optimized reasoning and chat",lifecycle:"active",declared_capabilities:["chat","coding","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding"],billing_mode:"paid",pricing:{input:.25,output:2,cache_read:.025},context_window:2e5,max_output:128e3},solana:{listed:!0,categories:["chat","coding","vision"],billing_mode:"paid",pricing:{input:.25,output:2},context_window:2e5,max_output:128e3}}},{id:"openai/gpt-5.1",name:"GPT-5.1",provider:"openai",description:"Frontier model with 400K context and configurable reasoning effort",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:1.25,output:10,cache_read:.125},context_window:4e5,max_output:128e3},solana:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:1.25,output:10},context_window:4e5,max_output:128e3}}},{id:"openai/gpt-5.2",name:"GPT-5.2",provider:"openai",description:"Frontier model with 400K context and adaptive reasoning",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:1.75,output:14,cache_read:.175},context_window:4e5,max_output:128e3},solana:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:1.75,output:14},context_window:4e5,max_output:128e3}}},{id:"openai/gpt-5.2-pro",name:"GPT-5.2 Pro",provider:"openai",description:"Uses more compute for consistently better answers",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:21,output:168},context_window:4e5,max_output:128e3},solana:{listed:!0,categories:["coding","reasoning"],billing_mode:"paid",pricing:{input:21,output:168},context_window:4e5,max_output:128e3}}},{id:"openai/gpt-5.3-codex",name:"GPT-5.3 Codex",provider:"openai",description:"Industry-leading agentic coding model. 400K context, reasoning, tool use, and complex execution",lifecycle:"active",declared_capabilities:["chat","coding","reasoning"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning"],billing_mode:"paid",pricing:{input:1.75,output:14,cache_read:.175},context_window:4e5,max_output:128e3},solana:{listed:!0,categories:["chat","coding","reasoning"],billing_mode:"paid",pricing:{input:1.75,output:14},context_window:4e5,max_output:128e3}}},{id:"openai/gpt-5.4",name:"GPT-5.4",provider:"openai",description:"GPT-5.4 frontier model with 1M context, native computer use, and thinking mode",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:2.5,output:15,cache_read:.25,long_context:[{threshold:272e3,inclusive:!1,input:5,output:22.5,cache_read:.5}]},context_window:105e4,max_output:128e3},solana:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:2.5,output:15,long_context:[{threshold:272e3,inclusive:!1,input:5,output:22.5}]},context_window:105e4,max_output:128e3}}},{id:"openai/gpt-5.4-mini",name:"GPT-5.4 Mini",provider:"openai",description:"Strongest mini model for coding, computer use, and subagents with GPT-5.4 capabilities",lifecycle:"active",declared_capabilities:["chat","coding","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","vision"],billing_mode:"paid",pricing:{input:.75,output:4.5,cache_read:.075},context_window:4e5,max_output:128e3},solana:{listed:!0,categories:["chat","coding","vision"],billing_mode:"paid",pricing:{input:.75,output:4.5},context_window:4e5,max_output:128e3}}},{id:"openai/gpt-5.4-nano",name:"GPT-5.4 Nano",provider:"openai",description:"Fastest and most affordable GPT-5.4 model for high-throughput tasks",lifecycle:"active",declared_capabilities:["chat","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat"],billing_mode:"paid",pricing:{input:.2,output:1.25,cache_read:.02},context_window:105e4,max_output:128e3},solana:{listed:!0,categories:["chat","vision"],billing_mode:"paid",pricing:{input:.2,output:1.25},context_window:4e5,max_output:128e3}}},{id:"openai/gpt-5.4-pro",name:"GPT-5.4 Pro",provider:"openai",description:"Premium GPT-5.4 with maximum compute for the hardest problems",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:30,output:180,long_context:[{threshold:272e3,inclusive:!1,input:60,output:270}]},context_window:105e4,max_output:128e3},solana:{listed:!0,categories:["coding","reasoning"],billing_mode:"paid",pricing:{input:30,output:180,long_context:[{threshold:272e3,inclusive:!1,input:60,output:270}]},context_window:105e4,max_output:128e3}}},{id:"openai/gpt-5.5",name:"GPT-5.5",provider:"openai",description:"First fully retrained base since GPT-4.5. 1M context, 128K output, native agent + computer use",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:5,output:30,cache_read:.5,long_context:[{threshold:272e3,inclusive:!1,input:10,output:45,cache_read:1}]},context_window:105e4,max_output:128e3},solana:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:5,output:30,long_context:[{threshold:272e3,inclusive:!1,input:10,output:45}]},context_window:105e4,max_output:128e3}}},{id:"openai/gpt-5.5-pro",name:"GPT-5.5 Pro",provider:"openai",description:"Premium GPT-5.5 with maximum compute for the hardest problems",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:30,output:180,long_context:[{threshold:272e3,inclusive:!1,input:60,output:270}]},context_window:105e4,max_output:128e3},solana:{listed:!0,categories:["coding","reasoning"],billing_mode:"paid",pricing:{input:30,output:180,long_context:[{threshold:272e3,inclusive:!1,input:60,output:270}]},context_window:105e4,max_output:128e3}}},{id:"openai/gpt-5.6-luna",name:"GPT-5.6 Luna",provider:"openai",description:"Cost-efficient GPT-5.6 tier for high-volume, latency-sensitive chat and lightweight agentic workflows. 1M context",lifecycle:"active",declared_capabilities:["chat","coding","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","vision"],billing_mode:"paid",pricing:{input:.2,output:1.2,cache_read:.02,cache_write:.25,long_context:[{threshold:272e3,inclusive:!1,input:.4,output:1.8,cache_read:.04,cache_write:.5}]},context_window:105e4,max_output:128e3},solana:{listed:!0,categories:["chat","coding","vision"],billing_mode:"paid",pricing:{input:.2,output:1.2,long_context:[{threshold:272e3,inclusive:!1,input:.4,output:1.8}]},context_window:105e4,max_output:128e3}}},{id:"openai/gpt-5.6-luna-pro",name:"GPT-5.6 Luna Pro",provider:"openai",description:"GPT-5.6 Luna with pro reasoning mode \u2014 budget tier with deeper reasoning for high-volume workloads. 1M context",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:.2,output:1.2,cache_read:.02,cache_write:.25,long_context:[{threshold:272e3,inclusive:!1,input:.4,output:1.8,cache_read:.04,cache_write:.5}]},context_window:105e4,max_output:128e3},solana:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:.2,output:1.2,long_context:[{threshold:272e3,inclusive:!1,input:.4,output:1.8}]},context_window:105e4,max_output:128e3}}},{id:"openai/gpt-5.6-sol",name:"GPT-5.6 Sol",provider:"openai",description:"Top GPT-5.6 tier \u2014 deepest reasoning for complex coding, agentic workflows, and long-horizon problems. 1M context",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:4,output:20,cache_read:.4,cache_write:5,long_context:[{threshold:272e3,inclusive:!1,input:8,output:30,cache_read:.8,cache_write:10}]},context_window:105e4,max_output:128e3},solana:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:4,output:20,long_context:[{threshold:272e3,inclusive:!1,input:8,output:30}]},context_window:105e4,max_output:128e3}}},{id:"openai/gpt-5.6-sol-pro",name:"GPT-5.6 Sol Pro",provider:"openai",description:"Highest-capability GPT-5.6 \u2014 Sol with pro reasoning mode for the hardest problems and long-running agentic work. 1M context",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:4,output:20,cache_read:.4,cache_write:5,long_context:[{threshold:272e3,inclusive:!1,input:8,output:30,cache_read:.8,cache_write:10}]},context_window:105e4,max_output:128e3},solana:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:4,output:20,long_context:[{threshold:272e3,inclusive:!1,input:8,output:30}]},context_window:105e4,max_output:128e3}}},{id:"openai/gpt-5.6-terra",name:"GPT-5.6 Terra",provider:"openai",description:"Balanced GPT-5.6 tier \u2014 everyday coding, reasoning, and agentic tasks at half the flagship price. 1M context",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:2,output:12,cache_read:.2,cache_write:2.5,long_context:[{threshold:272e3,inclusive:!1,input:4,output:18,cache_read:.4,cache_write:5}]},context_window:105e4,max_output:128e3},solana:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:2,output:12,long_context:[{threshold:272e3,inclusive:!1,input:4,output:18}]},context_window:105e4,max_output:128e3}}},{id:"openai/gpt-5.6-terra-pro",name:"GPT-5.6 Terra Pro",provider:"openai",description:"GPT-5.6 Terra with pro reasoning mode \u2014 deeper responses on complex tasks at half the standard Terra rate. 1M context",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:2,output:12,cache_read:.2,cache_write:2.5,long_context:[{threshold:272e3,inclusive:!1,input:4,output:18,cache_read:.4,cache_write:5}]},context_window:105e4,max_output:128e3},solana:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:2,output:12,long_context:[{threshold:272e3,inclusive:!1,input:4,output:18}]},context_window:105e4,max_output:128e3}}},{id:"openai/gpt-6-astra",name:"GPT-6 Astra",provider:"openai",description:"OpenAI flagship \u2014 GPT-6 generation, tuned for long-horizon agentic work and computer use. 1M context",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:10,output:50,cache_read:1,cache_write:12.5,long_context:[{threshold:272e3,inclusive:!1,input:20,output:75,cache_read:2,cache_write:25}]},context_window:105e4,max_output:128e3},solana:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:10,output:50,long_context:[{threshold:272e3,inclusive:!1,input:20,output:75}]},context_window:105e4,max_output:128e3}}},{id:"openai/gpt-6-luna",name:"GPT-6 Luna",provider:"openai",description:"Fast, low-cost GPT-6 tier \u2014 high-volume chat, classification and lightweight agentic work. 1M context",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:.1,output:.5,cache_read:.01,cache_write:.125,long_context:[{threshold:272e3,inclusive:!1,input:.2,output:.75,cache_read:.02,cache_write:.25}]},context_window:105e4,max_output:128e3},solana:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:.1,output:.5,long_context:[{threshold:272e3,inclusive:!1,input:.2,output:.75}]},context_window:105e4,max_output:128e3}}},{id:"openai/gpt-6-luna-decisions",name:"GPT-6 Luna Decisions",provider:"openai",description:"Typed judgments over text or images: predicate (yes/no with a probability), choice (one of your values, with per-value probabilities) or score (an ordered rubric). OpenAI Decisions-compatible \u2014 POST /v1/decisions, not /v1/chat/completions. Billed on input tokens only, plus the transaction fee per call; with an API key from https://user.blockrun.ai, https://api.blockrun.ai/v1/decisions bills them from credit.",lifecycle:"active",declared_capabilities:["judgment"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["judgment"],billing_mode:"per_token",pricing:{input:.1,output:0,transaction_fee:.001,long_context:{threshold:272e3,input:.2}}},solana:{listed:!0,categories:["judgment"],billing_mode:"per_token",pricing:{input:.1,output:0,long_context_threshold:272e3,long_context_input:.2,per_call_fee_exact:.001,per_call_fee_batch:0,service_fee:0}}}},{id:"openai/gpt-6-sol",name:"GPT-6 Sol",provider:"openai",description:"Cost-efficient GPT-6 tier \u2014 complex coding and agentic workflows below the Astra flagship. 1M context",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:2,output:10,cache_read:.2,cache_write:2.5,long_context:[{threshold:272e3,inclusive:!1,input:4,output:15,cache_read:.4,cache_write:5}]},context_window:105e4,max_output:128e3},solana:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:2,output:10,long_context:[{threshold:272e3,inclusive:!1,input:4,output:15}]},context_window:105e4,max_output:128e3}}},{id:"openai/gpt-6.1-sol",name:"GPT-6.1 Sol",provider:"openai",description:"Refreshed GPT-6 Sol \u2014 complex coding and agentic workflows below the Astra flagship, April 2026 knowledge. 1M context",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:2,output:10,cache_read:.1,cache_write:2.5,long_context:[{threshold:272e3,inclusive:!1,input:4,output:15,cache_read:.2,cache_write:5}]},context_window:105e4,max_output:128e3},solana:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:2,output:10,long_context:[{threshold:272e3,inclusive:!1,input:4,output:15}]},context_window:105e4,max_output:128e3}}},{id:"openai/gpt-image-1",name:"GPT Image 1",provider:"openai",description:"Native image generation in GPT-4o",lifecycle:"active",declared_capabilities:["image"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["image"],billing_mode:"per_image",pricing:{per_image:.021,transaction_fee:.001}},solana:{listed:!0,categories:["image"],billing_mode:"per_image",pricing:{per_image:.021}}}},{id:"openai/gpt-image-2",name:"ChatGPT Images 2.0",provider:"openai",description:"OpenAI's GPT Image 2 \u2014 reasoning-driven image generation with multilingual text rendering, character consistency, and high-fidelity edits",lifecycle:"active",declared_capabilities:["image"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["image"],billing_mode:"per_image",pricing:{per_image:.063,transaction_fee:.001}},solana:{listed:!0,categories:["image"],billing_mode:"per_image",pricing:{per_image:.063}}}},{id:"openai/gpt-image-2.5-flare",name:"GPT Image 2.5 Flare",provider:"openai",description:"OpenAI GPT Image 2.5 fast model for high-quality everyday image generation",lifecycle:"active",declared_capabilities:["image"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["image"],billing_mode:"per_image",pricing:{per_image:.294,transaction_fee:.001}},solana:{listed:!0,categories:["image"],billing_mode:"per_image",pricing:{per_image:.294}}}},{id:"openai/gpt-image-2.5-sunburst",name:"GPT Image 2.5 Sunburst",provider:"openai",description:"OpenAI GPT Image 2.5 most capable model for image generation and high-precision editing",lifecycle:"active",declared_capabilities:["image"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["image"],billing_mode:"per_image",pricing:{per_image:.294,transaction_fee:.001}},solana:{listed:!0,categories:["image"],billing_mode:"per_image",pricing:{per_image:.294}}}},{id:"openai/o1",name:"o1",provider:"openai",description:"Advanced reasoning model for complex tasks",lifecycle:"active",declared_capabilities:["chat","coding","reasoning"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning"],billing_mode:"paid",pricing:{input:15,output:60,cache_read:7.5},context_window:2e5,max_output:1e5},solana:{listed:!0,categories:["coding","reasoning"],billing_mode:"paid",pricing:{input:15,output:60},context_window:2e5,max_output:1e5}}},{id:"openai/o3",name:"o3",provider:"openai",description:"o-series reasoning model with improved performance",lifecycle:"active",declared_capabilities:["chat","coding","reasoning"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning"],billing_mode:"paid",pricing:{input:2,output:8,cache_read:.5},context_window:2e5,max_output:1e5},solana:{listed:!0,categories:["coding","reasoning"],billing_mode:"paid",pricing:{input:2,output:8},context_window:2e5,max_output:1e5}}},{id:"openai/o3-mini",name:"o3-mini",provider:"openai",description:"Efficient reasoning model for STEM tasks",lifecycle:"active",declared_capabilities:["chat","coding","reasoning"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning"],billing_mode:"paid",pricing:{input:1.1,output:4.4,cache_read:.55},context_window:128e3,max_output:1e5},solana:{listed:!0,categories:["coding","reasoning"],billing_mode:"paid",pricing:{input:1.1,output:4.4},context_window:128e3,max_output:1e5}}},{id:"openai/o4-mini",name:"o4-mini",provider:"openai",description:"Efficient o4-generation reasoning model",lifecycle:"active",declared_capabilities:["coding","reasoning"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["coding","reasoning"],billing_mode:"paid",pricing:{input:1.1,output:4.4,cache_read:.275},context_window:128e3,max_output:1e5},solana:{listed:!0,categories:["coding","reasoning"],billing_mode:"paid",pricing:{input:1.1,output:4.4},context_window:128e3,max_output:1e5}}},{id:"poolside/laguna-s-2.1",name:"Laguna S 2.1",provider:"poolside",description:"Poolside's Laguna S 2.1 \u2014 118B open-weight coding model, 1M context, very cheap per token.",lifecycle:"active",declared_capabilities:["chat","coding"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding"],billing_mode:"paid",pricing:{input:.09,output:.18},context_window:1048576,max_output:131072},solana:{listed:!0,categories:["chat","coding"],billing_mode:"paid",pricing:{input:.09,output:.18},context_window:1048576,max_output:131072}}},{id:"poolside/laguna-xs-2.1",name:"Poolside Laguna XS 2.1 (Free)",provider:"nvidia",description:"Poolside Laguna XS 2.1 hosted free by NVIDIA. Fast compact coding model (~161 tok/s).",lifecycle:"active",declared_capabilities:["chat","coding"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding"],billing_mode:"free",pricing:{input:0,output:0},context_window:131072,max_output:16384},solana:{listed:!0,categories:["chat","coding"],billing_mode:"free",pricing:{input:0,output:0},context_window:131072,max_output:16384}}},{id:"qwen/qwen3.7-flash",name:"Qwen3.7 Flash",provider:"qwen",description:"Alibaba's fastest Qwen tier \u2014 1M context reasoning for high-volume, latency-sensitive workloads",lifecycle:"active",declared_capabilities:["chat","coding","reasoning"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning"],billing_mode:"paid",pricing:{input:.03,output:.13,long_context:[{threshold:32e3,inclusive:!0,input:.1,output:.4},{threshold:256e3,inclusive:!0,input:.2,output:.8}]},context_window:1e6,max_output:65536},solana:{listed:!0,categories:["chat","coding","reasoning"],billing_mode:"paid",pricing:{input:.03,output:.13},context_window:1e6,max_output:65536}}},{id:"qwen/qwen3.7-max",name:"Qwen3.7 Max",provider:"qwen",description:"Alibaba's Qwen3.7 Max tier. 1M context, strong reasoning, coding, and agentic tool use. Live-verified 2026-07-20.",lifecycle:"active",declared_capabilities:["chat","coding","reasoning"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning"],billing_mode:"paid",pricing:{input:1.475,output:4.425},context_window:1e6,max_output:65536},solana:{listed:!0,categories:["chat","coding","reasoning"],billing_mode:"paid",pricing:{input:1.475,output:4.425},context_window:1e6,max_output:65536}}},{id:"qwen/qwen3.7-plus",name:"Qwen3.7 Plus",provider:"qwen",description:"Alibaba's balanced Qwen tier \u2014 1M context with reasoning, coding, and agentic tool use at a fraction of the Max price",lifecycle:"active",declared_capabilities:["chat","coding","reasoning"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning"],billing_mode:"paid",pricing:{input:.32,output:1.28,long_context:[{threshold:256e3,inclusive:!0,input:.96,output:3.84}]},context_window:1e6,max_output:131072},solana:{listed:!0,categories:["chat","coding","reasoning"],billing_mode:"paid",pricing:{input:.32,output:1.28},context_window:1e6,max_output:131072}}},{id:"qwen/qwen3.8-flash",name:"Qwen3.8 Flash",provider:"qwen",description:"Alibaba's Qwen3.8 Flash \u2014 125B MoE with hybrid attention, 1M context, image input. Outperforms the Qwen3.7 Plus tier at a lower price.",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:.15,output:.47},context_window:1e6,max_output:131072},solana:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:.15,output:.47},context_window:1e6,max_output:131072}}},{id:"qwen/qwen3.8-max",name:"Qwen3.8 Max",provider:"qwen",description:"Alibaba's Qwen3.8 Max \u2014 current flagship of the Qwen line. 1M context, 131K output.",lifecycle:"active",declared_capabilities:["chat","coding","reasoning"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning"],billing_mode:"paid",pricing:{input:2,output:6},context_window:1e6,max_output:131072},solana:{listed:!0,categories:["chat","coding","reasoning"],billing_mode:"paid",pricing:{input:2,output:6},context_window:1e6,max_output:131072}}},{id:"reflection/beam-1.0-501b-a23b",name:"Beam 1.0",provider:"reflection",description:"Reflection's Beam 1.0 \u2014 open-weight 501B MoE (23B active) reasoning model for coding and long-horizon agents. 1M context, tool calling, reasoning_effort low-max.",lifecycle:"active",declared_capabilities:["chat","coding","reasoning"],aliases:[],redirects:[],networks:{base:{listed:!1,categories:[],billing_mode:"unavailable",pricing:{}},solana:{listed:!0,categories:["chat","coding","reasoning"],billing_mode:"paid",pricing:{input:.25,output:1},context_window:1048576,max_output:131072}}},{id:"tencent/hy4-preview",name:"Tencent Hy4 Preview",provider:"tencent",description:"Tencent's Hy4 \u2014 770B mixture-of-experts, Apache 2.0, 1M context. A large open flagship at a fraction of closed-model pricing.",lifecycle:"active",declared_capabilities:["chat","coding","reasoning"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning"],billing_mode:"paid",pricing:{input:.834,output:2.501},context_window:1048576,max_output:64e3},solana:{listed:!0,categories:["chat","coding","reasoning"],billing_mode:"paid",pricing:{input:.834,output:2.501},context_window:1048576,max_output:64e3}}},{id:"xai/grok-4.3",name:"Grok 4.3",provider:"xai",description:"xAI's Grok 4.3 reasoning model. 1M context, vision-capable, tuned for agentic workflows and instruction-following.",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:1.25,output:2.5,cache_read:.2,long_context:[{threshold:2e5,inclusive:!0,input:2.5,output:5,cache_read:.4}]},context_window:1e6,max_output:16384},solana:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:1.25,output:2.5,long_context:[{threshold:2e5,inclusive:!0,input:2.5,output:5}]},context_window:1e6,max_output:16384}}},{id:"xai/grok-4.5",name:"Grok 4.5",provider:"xai",description:"xAI's Grok 4.5 \u2014 500K context, vision-capable, chain-of-thought reasoning. Supports Live Search (+$0.30 per call)",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","search","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","search","vision"],billing_mode:"paid",pricing:{input:2,output:6,cache_read:.3,long_context:[{threshold:2e5,inclusive:!0,input:4,output:12,cache_read:.6}]},context_window:5e5,max_output:16384},solana:{listed:!0,categories:["chat","coding","reasoning","search","vision"],billing_mode:"paid",pricing:{input:2,output:6,long_context:[{threshold:2e5,inclusive:!0,input:4,output:12}]},context_window:5e5,max_output:16384}}},{id:"xai/grok-4.6",name:"Grok 4.6",provider:"xai",description:"xAI's Grok 4.6 \u2014 500K context, chain-of-thought reasoning with selectable effort. Supports Live Search (+$0.30 per call)",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","search","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","search","vision"],billing_mode:"paid",pricing:{input:2,output:6,cache_read:.5,long_context:[{threshold:2e5,inclusive:!0,input:4,output:12,cache_read:1}]},context_window:5e5,max_output:16384},solana:{listed:!0,categories:["chat","coding","reasoning","search","vision"],billing_mode:"paid",pricing:{input:2,output:6,long_context:[{threshold:2e5,inclusive:!0,input:4,output:12}]},context_window:5e5,max_output:16384}}},{id:"xai/grok-4.7",name:"Grok 4.7",provider:"xai",description:"xAI's flagship Grok 4.7 \u2014 500K context, vision, always-on reasoning with selectable effort (low to xhigh). Supports Live Search (+$0.30 per call)",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","search","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","search","vision"],billing_mode:"paid",pricing:{input:2,output:6,cache_read:.5,long_context:[{threshold:2e5,inclusive:!0,input:4,output:12,cache_read:1}]},context_window:5e5,max_output:16384},solana:{listed:!0,categories:["chat","coding","reasoning","search","vision"],billing_mode:"paid",pricing:{input:2,output:6,long_context:[{threshold:2e5,inclusive:!0,input:4,output:12}]},context_window:5e5,max_output:16384}}},{id:"xai/grok-build-0.1",name:"Grok Build 0.1",provider:"xai",description:"xAI's fast agentic coding model, trained for interactive software-engineering workflows. 256K context, text + image input.",lifecycle:"active",declared_capabilities:["chat","coding"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding"],billing_mode:"paid",pricing:{input:1,output:2,cache_read:.2,long_context:[{threshold:2e5,inclusive:!0,input:2,output:4,cache_read:.4}]},context_window:256e3,max_output:16384},solana:{listed:!0,categories:["chat","coding"],billing_mode:"paid",pricing:{input:1,output:2,long_context:[{threshold:2e5,inclusive:!0,input:2,output:4}]},context_window:256e3,max_output:16384}}},{id:"xai/grok-imagine-image",name:"Grok Imagine",provider:"xai",description:"xAI's Grok Imagine image generation. Fast, 300 RPM.",lifecycle:"active",declared_capabilities:["image"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["image"],billing_mode:"per_image",pricing:{per_image:.021,transaction_fee:.001}},solana:{listed:!0,categories:["image"],billing_mode:"per_image",pricing:{per_image:.021}}}},{id:"xai/grok-imagine-image-2.0",name:"Grok Imagine 2.0",provider:"xai",description:"xAI's Grok Imagine 2.0 image generation at low quality. Sits between Grok Imagine and Grok Imagine Pro on price.",lifecycle:"active",declared_capabilities:["image"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["image"],billing_mode:"per_image",pricing:{per_image:.042,transaction_fee:.001}},solana:{listed:!0,categories:["image"],billing_mode:"per_image",pricing:{per_image:.042}}}},{id:"xai/grok-imagine-image-pro",name:"Grok Imagine Pro",provider:"xai",description:"xAI's Grok Imagine 2.0 image generation at medium quality: finer detail than Grok Imagine 2.0. 30 RPM.",lifecycle:"active",declared_capabilities:["image"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["image"],billing_mode:"per_image",pricing:{per_image:.063,transaction_fee:.001}},solana:{listed:!0,categories:["image"],billing_mode:"per_image",pricing:{per_image:.063}}}},{id:"xai/grok-imagine-video",name:"Grok Imagine Video",provider:"xai",description:"xAI's Grok Imagine video generation. Text or image to video, configurable 1\u201315s clips. $0.05/sec at 480p (default), $0.07/sec at 720p \u2014 official per-second rates, plus $0.002 per input image and a flat $0.001 per generation.",lifecycle:"active",declared_capabilities:["video"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["video"],billing_mode:"per_second",pricing:{per_second:.05,per_call_surcharge:.001,per_input_image:.002,transaction_fee:.001,default_duration_seconds:8,max_duration_seconds:15}},solana:{listed:!0,categories:["video"],billing_mode:"per_second",pricing:{per_second:.05,per_call_surcharge:.001,per_input_image:.002,default_duration_seconds:8,max_duration_seconds:15}}}},{id:"xai/grok-imagine-video-1.5",name:"Grok Imagine Video 1.5",provider:"xai",description:"xAI's flagship Grok Imagine Video 1.5 \u2014 text or image to video with native synced audio, 1\u201315s clips. $0.08/sec at 480p (default), $0.14/sec at 720p, $0.25/sec at 1080p \u2014 official per-second rates, plus $0.01 per input image and a flat $0.001 per generation. First-and-last-frame at 480p and 720p.",lifecycle:"active",declared_capabilities:["video"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["video"],billing_mode:"per_second",pricing:{per_second:.08,per_call_surcharge:.001,per_input_image:.01,transaction_fee:.001,default_duration_seconds:8,max_duration_seconds:15}},solana:{listed:!0,categories:["video"],billing_mode:"per_second",pricing:{per_second:.08,per_call_surcharge:.001,per_input_image:.01,default_duration_seconds:8,max_duration_seconds:15}}}},{id:"xiaomi/mimo-v2.5",name:"MiMo V2.5",provider:"xiaomi",description:"Xiaomi's MiMo V2.5 \u2014 310B sparse MoE, natively multimodal, 1M context. Accepts text and images.",lifecycle:"active",declared_capabilities:["chat","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","reasoning","vision"],billing_mode:"paid",pricing:{input:.14,output:.28},context_window:1048576,max_output:131072},solana:{listed:!0,categories:["chat","reasoning","vision"],billing_mode:"paid",pricing:{input:.14,output:.28},context_window:1048576,max_output:131072}}},{id:"xiaomi/mimo-v2.5-pro",name:"Xiaomi MiMo-V2.5 Pro",provider:"xiaomi",description:"Xiaomi's MiMo-V2.5 Pro \u2014 1M context reasoning model, priced well below the frontier tier.",lifecycle:"active",declared_capabilities:["chat","reasoning"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","reasoning"],billing_mode:"paid",pricing:{input:.435,output:.87},context_window:1048576,max_output:131072},solana:{listed:!0,categories:["chat","reasoning"],billing_mode:"paid",pricing:{input:.435,output:.87},context_window:1048576,max_output:131072}}},{id:"zai/cogview-4",name:"CogView-4",provider:"zai",description:"Zhipu AI's CogView-4 image generation model \u2014 high quality, supports up to 1440x1440",lifecycle:"active",declared_capabilities:["image"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["image"],billing_mode:"per_image",pricing:{per_image:.01575,transaction_fee:.001}},solana:{listed:!0,categories:["image"],billing_mode:"per_image",pricing:{per_image:.01575}}}},{id:"zai/glm-5",name:"GLM-5",provider:"zai",description:"Z.AI's foundation model with 200K context. Strong reasoning and agentic capabilities",lifecycle:"active",declared_capabilities:["chat","coding","reasoning"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning"],billing_mode:"paid",pricing:{input:1,output:3.2,cache_read:.2},context_window:2e5,max_output:128e3},solana:{listed:!0,categories:["chat","coding","reasoning"],billing_mode:"paid",pricing:{input:1,output:3.2},context_window:2e5,max_output:128e3}}},{id:"zai/glm-5-turbo",name:"GLM-5 Turbo",provider:"zai",description:"Optimized GLM-5 variant with faster inference",lifecycle:"active",declared_capabilities:["chat","reasoning"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","reasoning"],billing_mode:"paid",pricing:{input:1.2,output:4},context_window:2e5,max_output:128e3},solana:{listed:!0,categories:["chat","reasoning"],billing_mode:"paid",pricing:{input:1.2,output:4},context_window:2e5,max_output:128e3}}},{id:"zai/glm-5.1",name:"GLM-5.1",provider:"zai",description:"Z.AI's GLM-5.1 \u2014 #1 open source on SWE-Bench Pro, 8-hour autonomous execution. 200K context",lifecycle:"active",declared_capabilities:["chat","coding","reasoning"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning"],billing_mode:"paid",pricing:{input:1.4,output:4.4,cache_read:.26},context_window:2e5,max_output:128e3},solana:{listed:!0,categories:["chat","coding","reasoning"],billing_mode:"paid",pricing:{input:1.4,output:4.4},context_window:2e5,max_output:128e3}}},{id:"zai/glm-5.2",name:"GLM-5.2",provider:"zai",description:"Z.AI GLM-5.2 \u2014 1M-token context, strong open-source long-horizon coding. Verified live on Z.AI.",lifecycle:"active",declared_capabilities:["chat","coding","reasoning"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning"],billing_mode:"paid",pricing:{input:1.4,output:4.4,cache_read:.26},context_window:1e6,max_output:131072},solana:{listed:!0,categories:["chat","coding","reasoning"],billing_mode:"paid",pricing:{input:1.4,output:4.4},context_window:1e6,max_output:131072}}},{id:"zai/glm-5.3",name:"GLM-5.3",provider:"zai",description:"Z.AI's flagship \u2014 1M-token context with always-on reasoning, strong at long-horizon coding. Verified live on Z.AI.",lifecycle:"active",declared_capabilities:["chat","coding","reasoning"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning"],billing_mode:"paid",pricing:{input:1.4,output:4.4,cache_read:.26},context_window:1e6,max_output:131072},solana:{listed:!0,categories:["chat","coding","reasoning"],billing_mode:"paid",pricing:{input:1.4,output:4.4},context_window:1e6,max_output:131072}}},{id:"zai/glm-5.3-flash",name:"GLM-5.3 Flash",provider:"zai",description:"Z.AI's first natively multimodal GLM-5 \u2014 320B/18B MoE with image input, 1M-token context, and always-on reasoning at value-tier pricing. Verified live on Z.AI.",lifecycle:"active",declared_capabilities:["chat","coding","reasoning","vision"],aliases:[],redirects:[],networks:{base:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:.15,output:.5,cache_read:.03},context_window:1e6,max_output:131072},solana:{listed:!0,categories:["chat","coding","reasoning","vision"],billing_mode:"paid",pricing:{input:.15,output:.5},context_window:1e6,max_output:131072}}}]},picker_policy:{schema_version:1,policy_version:"2026.11.12.2",catalog_version:"2026.11.12.2",default_network:"solana",compatibility_shortcuts:{"opus-4.6":"anthropic/claude-opus-4.6","haiku-4.5":"anthropic/claude-haiku-4.5-20251001","gpt-5.4-pro":"openai/gpt-5.4-pro","gpt-5.3":"openai/gpt-5.3","gpt-5.2-pro":"openai/gpt-5.2-pro",o3:"openai/o3",o4:"openai/o4-mini","o4-mini":"openai/o4-mini",o1:"openai/o1","grok-3":"xai/grok-3","grok-4":"xai/grok-4-0709","grok-fast":"xai/grok-4-1-fast-reasoning","grok-4.1":"xai/grok-4-1-fast-reasoning",r1:"deepseek/deepseek-reasoner","deepseek-v4":"deepseek/deepseek-v4.1-flash","deepseek-v4-flash":"deepseek/deepseek-v4.1-flash",dsv4:"deepseek/deepseek-v4.1-flash","deepseek-v3.2":"deepseek/deepseek-v4.1-flash","deepseek-v3":"deepseek/deepseek-v4.1-flash","k2.6":"moonshot/kimi-k2.6","kimi-k2.5":"moonshot/kimi-k2.6","k2.5":"moonshot/kimi-k2.6"},views:{default_chat:{description:"ClawRouter recommendations, filtered to live Solana chat; remaining active models are always discoverable.",virtual_entries:["blockrun/auto","blockrun/free"],model_ids:["anthropic/claude-fable-5","anthropic/claude-opus-5","anthropic/claude-opus-4.8","anthropic/claude-opus-4.7","anthropic/claude-sonnet-5","anthropic/claude-sonnet-4.6","anthropic/claude-haiku-4.5","openai/gpt-5.6-terra","openai/gpt-5.6-sol","openai/gpt-5.6-luna","openai/gpt-5.5","openai/gpt-5.4","openai/gpt-5.4-mini","openai/gpt-5.4-nano","openai/gpt-5.3-codex","google/gemini-3.1-pro","google/gemini-3.8-flash","google/gemini-3.6-flash","google/gemini-3.5-flash","google/gemini-3.5-flash-lite","google/gemini-3.1-flash-lite","google/gemini-3-flash-preview","xai/grok-4.5","xai/grok-4.3","xai/grok-build-0.1","zai/glm-5.3","zai/glm-5.3-flash","zai/glm-5.2","zai/glm-5.1","zai/glm-5-turbo","zai/glm-5","xiaomi/mimo-v2.5","xiaomi/mimo-v2.5-pro","minimax/minimax-m3","minimax/minimax-m2.7","moonshot/kimi-k3.1-pro","qwen/qwen3.7-max","qwen/qwen3.8-flash","deepseek/deepseek-v4-flash-vision-exp","deepseek/deepseek-v4-pro","deepseek/deepseek-v4.1-flash","nvidia/nemotron-3.5-lightning","poolside/laguna-xs-2.1","cohere/north-mini-code","nvidia/nemotron-3-nano-omni-30b-a3b-reasoning","nvidia/nemotron-3-ultra-550b","nvidia/nemotron-3-super-120b","nvidia/nemotron-3.5-bolt"],groups:[{id:"recommended",title:"Recommended",model_ids:["anthropic/claude-fable-5","anthropic/claude-opus-5","anthropic/claude-opus-4.8","anthropic/claude-opus-4.7","anthropic/claude-sonnet-5","anthropic/claude-sonnet-4.6","anthropic/claude-haiku-4.5","openai/gpt-5.6-terra","openai/gpt-5.6-sol","openai/gpt-5.6-luna","openai/gpt-5.5","openai/gpt-5.4","openai/gpt-5.4-mini","openai/gpt-5.4-nano","openai/gpt-5.3-codex","google/gemini-3.1-pro","google/gemini-3.8-flash","google/gemini-3.6-flash","google/gemini-3.5-flash","google/gemini-3.5-flash-lite","google/gemini-3.1-flash-lite","google/gemini-3-flash-preview","xai/grok-4.5","xai/grok-4.3","xai/grok-build-0.1","zai/glm-5.3","zai/glm-5.3-flash","zai/glm-5.2","zai/glm-5.1","zai/glm-5-turbo","zai/glm-5","xiaomi/mimo-v2.5","xiaomi/mimo-v2.5-pro","minimax/minimax-m3","minimax/minimax-m2.7","moonshot/kimi-k3.1-pro","qwen/qwen3.7-max","qwen/qwen3.8-flash","deepseek/deepseek-v4-flash-vision-exp","deepseek/deepseek-v4-pro","deepseek/deepseek-v4.1-flash"]},{id:"free",title:"Free (no USDC needed)",model_ids:["nvidia/nemotron-3.5-lightning","poolside/laguna-xs-2.1","cohere/north-mini-code","nvidia/nemotron-3-nano-omni-30b-a3b-reasoning","nvidia/nemotron-3-ultra-550b","nvidia/nemotron-3-super-120b","nvidia/nemotron-3.5-bolt"]}],shortcuts:{auto:"blockrun/auto",smart:"blockrun/auto",eco:"blockrun/auto",premium:"blockrun/auto",sonnet:"anthropic/claude-sonnet-5.5",claude:"anthropic/claude-sonnet-5.5","sonnet-4.6":"anthropic/claude-sonnet-4.6",opus:"anthropic/claude-opus-5.5","opus-4.8":"anthropic/claude-opus-4.8","opus-4.7":"anthropic/claude-opus-4.7",haiku:"anthropic/claude-haiku-4.5",gpt:"openai/gpt-6-astra",gpt5:"openai/gpt-5.6-terra","gpt-5":"openai/gpt-5.5","gpt-5.5":"openai/gpt-5.5","gpt-5.4":"openai/gpt-5.4","gpt-5.2":"openai/gpt-5.2","gpt-4.1":"openai/gpt-4.1",codex:"openai/gpt-5.3-codex",nano:"openai/gpt-5.4-nano",mini:"openai/gpt-4o-mini",gemini:"google/gemini-2.5-pro","gemini-2.5":"google/gemini-2.5-pro",flash:"google/gemini-2.5-flash","gemini-3":"google/gemini-3.1-pro","gemini-3.1":"google/gemini-3.1-pro",grok:"xai/grok-4.7","grok-4.3":"xai/grok-4.3","grok-build":"xai/grok-build-0.1",deepseek:"deepseek/deepseek-v4.1-flash","deepseek-v4-pro":"nvidia/nemotron-3.5-lightning","dsv4-pro":"deepseek/deepseek-v4-pro","v4-pro":"nvidia/nemotron-3.5-lightning",free:"blockrun/free",glm4:"nvidia/nemotron-3.5-lightning","deepseek-free":"nvidia/nemotron-3.5-lightning","qwen-coder":"nvidia/nemotron-3.5-lightning","qwen-think":"nvidia/nemotron-3.5-lightning",maverick:"nvidia/nemotron-3.5-lightning","gpt-oss":"nvidia/nemotron-3.5-lightning","gpt-oss-small":"nvidia/nemotron-3.5-lightning","mistral-small":"nvidia/nemotron-3.5-lightning",nemotron:"nvidia/nemotron-3.5-lightning",devstral:"nvidia/nemotron-3.5-lightning",minimax:"minimax/minimax-m3",m3:"minimax/minimax-m3","m2.7":"minimax/minimax-m2.7",glm:"zai/glm-5.3","glm-5":"zai/glm-5","glm-turbo":"zai/glm-5-turbo",glm5:"zai/glm-5.1",kimi:"moonshot/kimi-k3.1-pro","br-sonnet":"anthropic/claude-sonnet-4.6","sonnet-4":"anthropic/claude-sonnet-4.6","sonnet-4-6":"anthropic/claude-sonnet-4.6","sonnet-5":"anthropic/claude-sonnet-5","sonnet-5.0":"anthropic/claude-sonnet-5","sonnet-5-0":"anthropic/claude-sonnet-5","sonnet-4.5":"anthropic/claude-sonnet-4.5","sonnet-4-5":"anthropic/claude-sonnet-4.5","anthropic/claude-sonnet-4-5":"anthropic/claude-sonnet-4.5",fable:"anthropic/claude-fable-5","fable-5":"anthropic/claude-fable-5","fable-5.0":"anthropic/claude-fable-5","opus-5":"anthropic/claude-opus-5","opus-5.0":"anthropic/claude-opus-5","opus-5-0":"anthropic/claude-opus-5","opus-4":"anthropic/claude-opus-4.8","opus-4-8":"anthropic/claude-opus-4.8","opus-4-7":"anthropic/claude-opus-4.7","anthropic/sonnet":"anthropic/claude-sonnet-4.6","anthropic/fable":"anthropic/claude-fable-5","anthropic/claude-fable-5.0":"anthropic/claude-fable-5","anthropic/opus":"anthropic/claude-opus-5","anthropic/claude-opus-5.0":"anthropic/claude-opus-5","anthropic/claude-opus-5-0":"anthropic/claude-opus-5","anthropic/haiku":"anthropic/claude-haiku-4.5","anthropic/claude":"anthropic/claude-sonnet-4.6","anthropic/claude-sonnet-4":"anthropic/claude-sonnet-4.6","anthropic/claude-sonnet-4-6":"anthropic/claude-sonnet-4.6","anthropic/claude-opus-4":"anthropic/claude-opus-4.8","anthropic/claude-opus-4-8":"anthropic/claude-opus-4.8","anthropic/claude-opus-4-7":"anthropic/claude-opus-4.7","anthropic/claude-opus-4-5":"anthropic/claude-opus-4.5","anthropic/claude-haiku-4":"anthropic/claude-haiku-4.5","anthropic/claude-haiku-4-5":"anthropic/claude-haiku-4.5",gpt4:"openai/gpt-4o","gpt-5.6":"openai/gpt-5.6-terra","openai/gpt-5.6":"openai/gpt-5.6-terra","gpt-5.6-sol":"openai/gpt-5.6-sol","gpt-5.6-terra":"openai/gpt-5.6-terra","gpt-5.6-luna":"openai/gpt-5.6-luna","gpt-5.6-sol-pro":"openai/gpt-5.6-sol-pro","gpt-5.6-terra-pro":"openai/gpt-5.6-terra-pro","gpt-5.6-luna-pro":"openai/gpt-5.6-luna-pro","sol-pro":"openai/gpt-5.6-sol-pro","terra-pro":"openai/gpt-5.6-terra-pro","luna-pro":"openai/gpt-5.6-luna-pro","chat-latest":"openai/chat-latest",chatgpt:"openai/chat-latest","gpt-5.4-nano":"openai/gpt-5.4-nano","gpt-5-nano":"openai/gpt-5.4-nano","openai-codex/gpt-5.4-mini":"openai/gpt-5.4-mini","gpt-5.4-mini":"openai/gpt-5.4-mini","deepseek-chat":"deepseek/deepseek-chat","kimi-k3":"moonshot/kimi-k3.1-pro","qwen3.7-max":"qwen/qwen3.7-max","qwen3.8-flash":"qwen/qwen3.8-flash","qwen3-8-flash":"qwen/qwen3.8-flash","qwen-vision":"qwen/qwen3.8-flash","deepseek-vision":"deepseek/deepseek-v4-flash-vision-exp","v4-flash-vision":"deepseek/deepseek-v4-flash-vision-exp","mimo-vision":"xiaomi/mimo-v2.5","qwen-3.7-max":"qwen/qwen3.7-max","qwen3-7-max":"qwen/qwen3.7-max","qwen3.7-plus":"qwen/qwen3.7-plus","qwen-3.7-plus":"qwen/qwen3.7-plus","qwen3.7-flash":"qwen/qwen3.7-flash","qwen-3.7-flash":"qwen/qwen3.7-flash",mimo:"xiaomi/mimo-v2.5-pro","mimo-v2.5-pro":"xiaomi/mimo-v2.5-pro","mimo-v2.5":"xiaomi/mimo-v2.5",xiaomi:"xiaomi/mimo-v2.5-pro","google/gemini-3-pro-preview":"google/gemini-3.1-pro","gemini-3-pro-preview":"google/gemini-3.1-pro","gemini-pro":"google/gemini-3.1-pro","gemini-3-pro":"google/gemini-3.1-pro","gemini-3.1-pro":"google/gemini-3.1-pro","gemini-3.1-pro-preview":"google/gemini-3.1-pro","google/gemini-3.1-pro-preview":"google/gemini-3.1-pro","gemini-3.6-flash":"google/gemini-3.6-flash","gemini-3.6":"google/gemini-3.6-flash","gemini-3.5-flash":"google/gemini-3.5-flash","gemini-3.5-flash-lite":"google/gemini-3.5-flash-lite","gemini-3.1-flash-lite":"google/gemini-3.1-flash-lite","gemini-2.5-flash-lite":"google/gemini-2.5-flash-lite","grok-4.5":"xai/grok-4.5","grok-4-5":"xai/grok-4.5","grok-code":"xai/grok-build-0.1","grok-code-fast-1":"deepseek/deepseek-chat","xai/grok-code-fast-1":"deepseek/deepseek-chat",nvidia:"nvidia/nemotron-3.5-lightning","nvidia/deepseek-v3.2":"nvidia/nemotron-3.5-lightning","free/deepseek-v3.2":"nvidia/nemotron-3.5-lightning","nvidia/deepseek-v4-pro":"nvidia/nemotron-3.5-lightning","free/deepseek-v4-pro":"nvidia/nemotron-3.5-lightning","nvidia/nemotron-3-nano-omni-30b-a3b-reasoning":"nvidia/nemotron-3-nano-omni-30b-a3b-reasoning","nvidia/nemotron-ultra-253b":"nvidia/nemotron-3.5-lightning","nvidia/devstral-2-123b":"nvidia/nemotron-3.5-lightning","free/nemotron-ultra-253b":"nvidia/nemotron-3.5-lightning","free/devstral-2-123b":"nvidia/nemotron-3.5-lightning","mistral-free":"nvidia/nemotron-3.5-lightning","glm-free":"nvidia/nemotron-3.5-lightning","llama-free":"nvidia/nemotron-3-nano-omni-30b-a3b-reasoning","qwen-coder-free":"nvidia/nemotron-3.5-lightning","qwen-thinking":"nvidia/nemotron-3.5-lightning","coder-free":"cohere/north-mini-code","nemotron-nano-9b":"nvidia/nemotron-3-nano-omni-30b-a3b-reasoning","nemotron-nano":"nvidia/nemotron-3-nano-omni-30b-a3b-reasoning","nemotron-nano-vl":"nvidia/nemotron-3-nano-omni-30b-a3b-reasoning","nano-vl":"nvidia/nemotron-3-nano-omni-30b-a3b-reasoning","nemotron-omni":"nvidia/nemotron-3-nano-omni-30b-a3b-reasoning","nano-omni":"nvidia/nemotron-3-nano-omni-30b-a3b-reasoning","vision-free":"nvidia/nemotron-3-nano-omni-30b-a3b-reasoning","nemotron-ultra":"nvidia/nemotron-3.5-lightning","nemotron-253b":"nvidia/nemotron-3.5-lightning","nemotron-super":"nvidia/nemotron-3.5-lightning","nemotron-49b":"nvidia/nemotron-3.5-lightning","nemotron-120b":"nvidia/nemotron-3.5-lightning","devstral-2":"nvidia/nemotron-3.5-lightning","nvidia/nemotron-3.5-lightning":"nvidia/nemotron-3.5-lightning","nvidia/nemotron-3-nano-30b":"nvidia/nemotron-3-nano-omni-30b-a3b-reasoning","nvidia/nemotron-3-ultra-550b":"nvidia/nemotron-3-ultra-550b","nvidia/llama-3.2-11b-vision":"nvidia/nemotron-3-nano-omni-30b-a3b-reasoning","cohere/north-mini-code":"cohere/north-mini-code","poolside/laguna-xs-2.1":"poolside/laguna-xs-2.1",lightning:"nvidia/nemotron-3.5-lightning","nemotron-lightning":"nvidia/nemotron-3.5-lightning","nemotron-3.5-lightning":"nvidia/nemotron-3.5-lightning","nano-30b":"nvidia/nemotron-3-nano-omni-30b-a3b-reasoning","nemotron-nano-30b":"nvidia/nemotron-3-nano-omni-30b-a3b-reasoning","ultra-550b":"nvidia/nemotron-3-ultra-550b","nemotron-ultra-550b":"nvidia/nemotron-3-ultra-550b","llama-vision":"nvidia/nemotron-3-nano-omni-30b-a3b-reasoning","llama-3.2-vision":"nvidia/nemotron-3-nano-omni-30b-a3b-reasoning","north-mini":"cohere/north-mini-code","north-mini-code":"cohere/north-mini-code",laguna:"poolside/laguna-xs-2.1","laguna-xs":"poolside/laguna-xs-2.1","minimax-m3":"minimax/minimax-m3","minimax-m2.7":"minimax/minimax-m2.7","glm-5.3":"zai/glm-5.3","glm-5-3":"zai/glm-5.3","glm-5.3-flash":"zai/glm-5.3-flash","glm-5-3-flash":"zai/glm-5.3-flash","glm-flash":"zai/glm-5.3-flash","glm-5.2":"zai/glm-5.2","glm-5.1":"zai/glm-5.1","glm-5-turbo":"zai/glm-5-turbo","gpt-fast":"openai/gpt-6-luna","gpt-balanced":"openai/gpt-6-sol",qwen:"qwen/qwen3.8-max","free-code":"cohere/north-mini-code","free-fast":"nvidia/nemotron-3.5-lightning","free-vision":"nvidia/nemotron-3-nano-omni-30b-a3b-reasoning","claude-sonnet-4.5":"anthropic/claude-sonnet-4.5","gpt-5-mini":"openai/gpt-5-mini","gemini-2.5-pro":"google/gemini-2.5-pro","claude-haiku-4.5":"anthropic/claude-haiku-4.5","gpt-4.1-mini":"openai/gpt-4.1-mini","claude-sonnet-5.5":"anthropic/claude-sonnet-5.5","claude-sonnet-5":"anthropic/claude-sonnet-5","claude-opus-4.8":"anthropic/claude-opus-4.8","gpt-4o":"openai/gpt-4o","grok-4.7":"xai/grok-4.7","laguna-xs-2.1":"poolside/laguna-xs-2.1","nemotron-3-nano-omni-30b-a3b-reasoning":"nvidia/nemotron-3-nano-omni-30b-a3b-reasoning","gpt-6-sol":"openai/gpt-6-sol","laguna-s-2.1":"poolside/laguna-s-2.1","grok-build-0.1":"xai/grok-build-0.1","claude-opus-4.5":"anthropic/claude-opus-4.5","qwen3.8-max":"qwen/qwen3.8-max","deepseek-v4-flash-vision-exp":"deepseek/deepseek-v4-flash-vision-exp","claude-opus-5":"anthropic/claude-opus-5","gemini-2.5-flash":"google/gemini-2.5-flash","muse-glimmer-30b":"nvidia/muse-glimmer-30b","gpt-6-luna":"openai/gpt-6-luna","grok-4.6":"xai/grok-4.6","claude-sonnet-4.6":"anthropic/claude-sonnet-4.6","llama-3.2-11b-vision":"nvidia/nemotron-3-nano-omni-30b-a3b-reasoning","hy4-preview":"tencent/hy4-preview","gpt-4o-mini":"openai/gpt-4o-mini","claude-opus-4.7":"anthropic/claude-opus-4.7","claude-opus-5.5":"anthropic/claude-opus-5.5","gemini-3.8-flash":"google/gemini-3.8-flash","gemini-4-argon":"google/gemini-4-argon","nemotron-3-ultra-550b":"nvidia/nemotron-3-ultra-550b","gpt-5.1":"openai/gpt-5.1","claude-fable-5":"anthropic/claude-fable-5","gemini-3-flash-preview":"google/gemini-3-flash-preview","claude-fable-5.1":"anthropic/claude-fable-5.1","gpt-6-astra":"openai/gpt-6-astra","gpt-4.1-nano":"openai/gpt-5.4-nano","gpt-5.3-codex":"openai/gpt-5.3-codex","gpt-6.1-sol":"openai/gpt-6.1-sol","mistral-large-4":"mistral/mistral-large-4","deepseek-v4.1-flash":"deepseek/deepseek-v4.1-flash","gemini-4-carbon":"google/gemini-4-carbon","kimi-k3.1-pro":"moonshot/kimi-k3.1-pro","kimi-k3.1":"moonshot/kimi-k3.1-pro","nemotron-3.5-bolt":"nvidia/nemotron-3.5-bolt","nemotron-bolt":"nvidia/nemotron-3.5-bolt","nemotron-3-super":"nvidia/nemotron-3-super-120b","minimax-m3.1-flash":"nvidia/minimax-m3.1-flash"}}}},router_policy:{schema_version:1,policy_version:"2026.11.12.2",catalog_version:"2026.11.12.2",default_network:"solana",status:"draft",description:"Prototype model-specific policy for Router Core. Do not consume in production until benchmark review is complete.",candidate_sets:{simple:["qwen/qwen3.7-flash","google/gemini-3.5-flash-lite","minimax/minimax-m3","cohere/north-mini-code"],medium:["openai/gpt-5.6-luna","google/gemini-3.6-flash","moonshot/kimi-k3.1-pro","qwen/qwen3.8-flash"],complex:["openai/gpt-5.6-terra","openai/gpt-5.6-sol","anthropic/claude-sonnet-5","anthropic/claude-opus-5"],reasoning:["xai/grok-4.5","deepseek/deepseek-v4-pro","google/gemini-3.1-pro","openai/gpt-5.6-sol"],agentic:["openai/gpt-5.6-terra","anthropic/claude-sonnet-5","xai/grok-4.5","moonshot/kimi-k3.1-pro"]},free_candidate_sets:{coding:["cohere/north-mini-code","poolside/laguna-xs-2.1","nvidia/nemotron-3.5-lightning"],general:["nvidia/nemotron-3.5-lightning","nvidia/nemotron-3-ultra-550b"],vision:["nvidia/nemotron-3-nano-omni-30b-a3b-reasoning"]},classifier_model:"nvidia/nemotron-3.5-lightning"}}}});function isReleaseDate(value){if(typeof value!="string"||!/^\d{4}-\d{2}-\d{2}$/.test(value))return!1;let date5=new Date(`${value}T00:00:00Z`);return Number.isFinite(date5.getTime())&&date5.toISOString().slice(0,10)===value}var init_ordering=__esm({"node_modules/@blockrun/model-catalog/runtime/ordering.js"(){"use strict"}});import{createHash}from"crypto";import{readFile}from"fs/promises";function validateAll(catalog,pickerPolicy,routerPolicy){let errors=[],record2=value=>value!==null&&typeof value=="object"&&!Array.isArray(value),strings=value=>Array.isArray(value)&&value.every(item=>typeof item=="string");if(!record2(pickerPolicy?.views)||!record2(pickerPolicy.views.default_chat))return["picker policy views.default_chat must be an object"];for(let[name,view]of Object.entries(pickerPolicy.views)){if(!record2(view)){errors.push(`picker view ${name} must be an object`);continue}for(let field of["model_ids","virtual_entries"])strings(view[field])||errors.push(`picker view ${name}.${field} must be an array of strings`);if((!record2(view.shortcuts)||!Object.values(view.shortcuts).every(target=>typeof target=="string"))&&errors.push(`picker view ${name}.shortcuts must map names to strings`),!Array.isArray(view.groups))errors.push(`picker view ${name}.groups must be an array`);else for(let group of view.groups)(!record2(group)||typeof group.id!="string"||typeof group.title!="string"||!strings(group.model_ids))&&errors.push(`picker view ${name} has a malformed group`)}if(errors.length)return errors;catalog.schema_version!==1&&errors.push("catalog.schema_version must be 1"),/^\d{4}\.\d{2}\.\d{2}\.[1-9]\d*$/.test(catalog.catalog_version??"")||errors.push("catalog.catalog_version must use YYYY.MM.DD.N"),Number.isNaN(Date.parse(catalog.observed_at))&&errors.push("catalog.observed_at must be an ISO date-time"),(!Array.isArray(catalog.models)||catalog.models.length===0)&&errors.push("catalog.models must be non-empty");let ids=new Set,aliases=new Set;for(let[index2,model]of(catalog.models??[]).entries()){let at=`catalog.models[${index2}]`;(typeof model.id!="string"||!/^[a-zA-Z0-9][a-zA-Z0-9._+/-]*$/.test(model.id))&&errors.push(`${at}.id must be a public model identifier`),ids.has(model.id)&&errors.push(`duplicate model id: ${model.id}`),ids.add(model.id),(typeof model.name!="string"||model.name.length===0)&&errors.push(`${at}.name must be non-empty`),model.release_date!==void 0&&!isReleaseDate(model.release_date)&&errors.push(`${at}.release_date must be a valid YYYY-MM-DD date`),["active","preview","deprecated","sunset"].includes(model.lifecycle)||errors.push(`${at}.lifecycle is invalid`),Array.isArray(model.declared_capabilities)||errors.push(`${at}.declared_capabilities must be an array`);for(let network of["base","solana"]){let entry=model.networks?.[network];if(!entry){errors.push(`${at}.networks.${network} is required`);continue}Array.isArray(entry.categories)||errors.push(`${at}.networks.${network}.categories must be an array`),(typeof entry.billing_mode!="string"||entry.billing_mode.length===0)&&errors.push(`${at}.networks.${network}.billing_mode is required`),(typeof entry.pricing!="object"||entry.pricing===null||Array.isArray(entry.pricing))&&errors.push(`${at}.networks.${network}.pricing must be an object`)}for(let alias of model.aliases??[])aliases.has(alias)&&errors.push(`duplicate alias: ${alias}`),ids.has(alias)&&errors.push(`alias collides with model id: ${alias}`),aliases.add(alias)}for(let model of catalog.models??[])for(let target of model.redirects??[])ids.has(target)||errors.push(`${model.id} redirects to missing model ${target}`),target===model.id&&errors.push(`${model.id} redirects to itself`);let byId=new Map((catalog.models??[]).map(model=>[model.id,model])),virtualEntries=new Set;for(let view of Object.values(pickerPolicy.views??{}))for(let id2 of view.virtual_entries??[])virtualEntries.add(id2);let isSolanaChat=id2=>{let network=byId.get(id2)?.networks?.solana;return!!(network?.listed&&network.categories.includes("chat"))};pickerPolicy.default_network!=="solana"&&errors.push("picker policy default_network must be solana");for(let[name,view]of Object.entries(pickerPolicy.views??{})){let seen=new Set;for(let id2 of view.model_ids??[])ids.has(id2)||errors.push(`picker view ${name} references missing model ${id2}`),seen.has(id2)&&errors.push(`picker view ${name} repeats ${id2}`),seen.add(id2),ids.has(id2)&&!isSolanaChat(id2)&&errors.push(`picker view ${name} references model unavailable for Solana chat: ${id2}`);let grouped=new Set;for(let group of view.groups??[])for(let id2 of group.model_ids??[])seen.has(id2)||errors.push(`picker group ${group.id} references model outside view ${name}: ${id2}`),grouped.has(id2)&&errors.push(`picker view ${name} groups repeat ${id2}`),grouped.add(id2);if((view.groups??[]).length>0)for(let id2 of seen)grouped.has(id2)||errors.push(`picker view ${name} does not group ${id2}`);for(let[shortcut,target]of Object.entries(view.shortcuts??{}))!isSolanaChat(target)&&!virtualEntries.has(target)&&errors.push(`picker shortcut ${shortcut} has invalid target ${target}`)}routerPolicy.default_network!=="solana"&&errors.push("router policy default_network must be solana");for(let[name,candidates]of Object.entries(routerPolicy.candidate_sets??{})){let seen=new Set;for(let id2 of candidates)ids.has(id2)||errors.push(`router candidate set ${name} references missing model ${id2}`),seen.has(id2)&&errors.push(`router candidate set ${name} repeats ${id2}`),ids.has(id2)&&!isSolanaChat(id2)&&errors.push(`router candidate set ${name} references model unavailable for Solana chat: ${id2}`),seen.add(id2)}for(let[name,candidates]of Object.entries(routerPolicy.free_candidate_sets??{})){let seen=new Set;for(let id2 of candidates){let model=byId.get(id2);model||errors.push(`free router candidate set ${name} references missing model ${id2}`),seen.has(id2)&&errors.push(`free router candidate set ${name} repeats ${id2}`),model&&!isSolanaChat(id2)&&errors.push(`free router candidate set ${name} references model unavailable for Solana chat: ${id2}`),model?.networks?.solana?.billing_mode!=="free"&&errors.push(`free router candidate set ${name} references paid model ${id2}`),seen.add(id2)}}isSolanaChat(routerPolicy.classifier_model)||errors.push(`router classifier_model is unavailable for Solana chat: ${routerPolicy.classifier_model}`);for(let[name,policy]of[["picker",pickerPolicy],["router",routerPolicy]])policy.schema_version!==1&&errors.push(`${name} policy schema_version must be 1`),policy.catalog_version!==catalog.catalog_version&&errors.push(`${name} policy catalog_version must match catalog`);return errors}var init_lib=__esm({"node_modules/@blockrun/model-catalog/scripts/lib.mjs"(){"use strict";init_ordering()}});function validateModels(rows){if(!Array.isArray(rows)||!rows.length)throw new Error("Empty or malformed model catalog");let ids=new Set;for(let row of rows){if(!row||typeof row.id!="string"||!/^[a-zA-Z0-9][a-zA-Z0-9._+/-]*$/.test(row.id)||ids.has(row.id))throw new Error("Invalid or duplicate model ID");if(ids.add(row.id),typeof row.name!="string"||!row.name||!Array.isArray(row.categories)||!row.categories.every(x=>typeof x=="string"))throw new Error(`Invalid metadata: ${row.id}`);if(!row.pricing||typeof row.pricing!="object"||Array.isArray(row.pricing)||typeof row.billing_mode!="string")throw new Error(`Invalid pricing: ${row.id}`);if(row.billing_mode==="paid"&&(!isNumber(row.pricing.input)||!isNumber(row.pricing.output)))throw new Error(`Invalid token price: ${row.id}`);if(row.billing_mode==="flat"&&!isNumber(row.pricing.flat))throw new Error(`Invalid flat price: ${row.id}`);if(row.billing_mode==="free"&&((row.pricing.input??0)!==0||(row.pricing.output??0)!==0))throw new Error(`Nonzero free price: ${row.id}`);for(let key3 of["context_window","max_output"])if(row[key3]!==void 0&&(!Number.isInteger(row[key3])||row[key3]<=0))throw new Error(`Invalid ${key3}: ${row.id}`);if(row.release_date!==void 0&&!isReleaseDate(row.release_date))throw new Error(`Invalid release_date: ${row.id}`)}return rows}function validateSnapshot(value){if(!value?.catalog||!value.picker_policy||!value.router_policy)throw new Error("Incomplete catalog snapshot");let errors=validateAll(value.catalog,value.picker_policy,value.router_policy);if(errors.length)throw new Error(errors.join("; "));return value}function snapshotModels(snapshot2,network){return validateModels(snapshot2.catalog.models.filter(m=>["active","preview"].includes(m.lifecycle)&&m.networks[network]?.listed).map(m=>({id:m.id,name:m.name,owned_by:m.provider,description:m.description,...m.release_date!==void 0?{release_date:m.release_date}:{},...m.networks[network]})))}function projectCatalog(models,policy){let chat=models.filter(m=>m.categories.includes("chat")&&m.available!==!1),byId=new Map(chat.map(m=>[m.id,m])),view=policy.views.default_chat,used=new Set,groups=(view.groups??[]).map(group=>({id:group.id,title:group.title,models:group.model_ids.filter(id2=>byId.has(id2)&&!used.has(id2)&&used.add(id2)).map(id2=>byId.get(id2))})).filter(group=>group.models.length),remaining=chat.filter(m=>!used.has(m.id)),free=remaining.filter(m=>m.billing_mode==="free"),paid=remaining.filter(m=>m.billing_mode!=="free");if(free.length){let group=groups.find(g=>g.id==="free");group?group.models.push(...free):groups.push({id:"free",title:"Free (no USDC needed)",models:free})}paid.length&&groups.push({id:"other",title:"All other available models",models:paid});let virtual=new Set(view.virtual_entries),shortcuts=Object.fromEntries(Object.entries(view.shortcuts).filter(([,target])=>byId.has(target)||virtual.has(target)));for(let model of chat)shortcuts[model.id]=model.id;let pricing=Object.fromEntries(models.flatMap(m=>m.available===!1?[]:m.billing_mode==="free"?[[m.id,{input:0,output:0}]]:m.billing_mode==="paid"?[[m.id,{input:m.pricing.input,output:m.pricing.output}]]:m.billing_mode==="flat"?[[m.id,{input:0,output:0,perCall:m.pricing.flat}]]:[]));return{groups,shortcuts,pricing,virtualEntries:[...virtual]}}function createCatalogClient(options={}){let network=options.network??"solana";if(!(network in gateways))throw new Error(`Unknown catalog network: ${network}`);let snapshot2=validateSnapshot(options.snapshot??snapshot_v1_default),models=snapshotModels(snapshot2,network),source="bundled",lastError,expiresAt=0,inflight,etag,now2=options.now??Date.now,fetcher=options.fetch??globalThis.fetch,listeners=new Set,current=()=>({network,version:snapshot2.catalog.catalog_version,models,source,lastError,...projectCatalog(models,snapshot2.picker_policy)});async function json2(url3,headers={}){let response=await fetcher(url3,{headers:{Accept:"application/json",...headers},signal:AbortSignal.timeout(options.timeoutMs??4e3)});if(response.status===304)return{unchanged:!0};if(!response.ok)throw new Error(`Catalog HTTP ${response.status}`);return{body:await response.json(),etag:response.headers.get("etag")}}return{current,subscribe(listener){return listeners.add(listener),()=>listeners.delete(listener)},refresh({force=!1}={}){return inflight||(!force&&now2()<expiresAt?Promise.resolve(current()):(inflight=(async()=>{try{let[policy,gateway]=await Promise.allSettled([options.catalogUrl?json2(options.catalogUrl,etag?{"If-None-Match":etag}:{}).then(result=>result.unchanged?{snapshot:snapshot2,etag}:{snapshot:validateSnapshot(result.body),etag:result.etag}):Promise.resolve({snapshot:snapshot2,etag}),json2(options.gatewayUrl??gateways[network])]);if(gateway.status==="rejected")throw gateway.reason;if(gateway.value.unchanged)throw new Error("Unexpected gateway 304");let candidateSnapshot=policy.status==="fulfilled"?policy.value.snapshot:snapshot2,releaseDates=new Map(candidateSnapshot.catalog.models.map(m=>[m.id,m.release_date])),nextModels=validateModels(gateway.value.body?.data).filter(m=>m.available!==!1).map(m=>{let releaseDate=m.release_date??releaseDates.get(m.id);return releaseDate===void 0?m:{...m,release_date:releaseDate}});if(!nextModels.length)throw new Error("No available models");if(projectCatalog(nextModels,policy.status==="fulfilled"?policy.value.snapshot.picker_policy:snapshot2.picker_policy),models=nextModels,source="live",policy.status==="fulfilled")snapshot2=policy.value.snapshot,etag=policy.value.etag,lastError=void 0,expiresAt=now2()+(options.ttlMs??3e5);else{let reason=policy.reason;lastError=`Catalog policy: ${reason instanceof Error?reason.message:String(reason)}`,expiresAt=now2()+Math.min(options.ttlMs??3e5,15e3)}}catch(error62){lastError=error62 instanceof Error?error62.message:String(error62),expiresAt=now2()+Math.min(options.ttlMs??3e5,15e3)}let value=current();for(let listener of listeners)listener(value);return value})().finally(()=>{inflight=void 0}),inflight))}}}var gateways,isNumber,init_runtime=__esm({"node_modules/@blockrun/model-catalog/runtime/index.js"(){"use strict";init_snapshot_v1();init_lib();init_ordering();init_ordering();gateways={solana:"https://sol.blockrun.ai/api/v1/models?format=json",base:"https://blockrun.ai/api/v1/models?format=json"},isNumber=value=>typeof value=="number"&&Number.isFinite(value)&&value>=0}});import{open}from"fs/promises";import{openSync,readSync,closeSync,fstatSync}from"fs";async function readTextFile(filePath){let fh=await open(filePath,"r");try{let size4=(await fh.stat()).size,buf=Buffer.alloc(size4),offset=0;for(;offset<size4;){let{bytesRead}=await fh.read(buf,offset,size4-offset,offset);if(bytesRead===0)break;offset+=bytesRead}return buf.subarray(0,offset).toString("utf-8")}finally{await fh.close()}}function readTextFileSync(filePath){let fd=openSync(filePath,"r");try{let size4=fstatSync(fd).size,buf=Buffer.alloc(size4),offset=0;for(;offset<size4;){let bytesRead=readSync(fd,buf,offset,size4-offset,offset);if(bytesRead===0)break;offset+=bytesRead}return buf.subarray(0,offset).toString("utf-8")}finally{closeSync(fd)}}var init_fs_read=__esm({"src/fs-read.ts"(){"use strict"}});import{writeFile,mkdir,rm}from"fs/promises";import{join}from"path";import{homedir}from"os";function isValidApiKey(value){return typeof value!="string"?!1:/^brk_[A-Za-z0-9_-]{8,}$/.test(value.trim())}function maskApiKey(key3){let trimmed=key3.trim();return trimmed.length<=18?`${trimmed.slice(0,8)}\u2026`:`${trimmed.slice(0,14)}\u2026${trimmed.slice(-4)}`}async function readOptional(path8){try{return(await readTextFile(path8)).trim()||void 0}catch(error62){if(error62.code==="ENOENT")return;throw new Error(`Cannot read BlockRun API key file ${path8}; refusing to fall back to another account or wallet.`,{cause:error62})}}async function resolveApiKey(){let envKey=process.env.BLOCKRUN_API_KEY?.trim();if(envKey){if(isValidApiKey(envKey))return{key:envKey,source:"env"};throw new Error(`BLOCKRUN_API_KEY is malformed (expected brk_\u2026). Mint one at ${PORTAL_KEYS_URL}, or unset it to pay from the wallet. Refusing to fall back silently.`)}for(let[path8,source]of[[CORE_API_KEY_FILE,"core"],[API_KEY_FILE,"saved"]]){let stored=await readOptional(path8);if(stored!==void 0){if(isValidApiKey(stored))return{key:stored,source};throw new Error(`${path8} does not contain a BlockRun key (expected brk_\u2026). Run "clawrouter login" with a valid key, or "clawrouter logout" to return to wallet billing. Refusing to fall back silently: the next source could bill a different account or spend from a wallet.`)}}}async function saveApiKey(key3){let trimmed=key3.trim();if(!isValidApiKey(trimmed))throw new Error(`Not a BlockRun API key: expected it to start with "brk_". Mint one at ${PORTAL_KEYS_URL}`);return await mkdir(join(homedir(),".blockrun"),{recursive:!0}),await writeFile(CORE_API_KEY_FILE,trimmed+`
|
|
4
|
-
`,{mode:384}),CORE_API_KEY_FILE}async function clearApiKey(){let removed=[];for(let path8 of[CORE_API_KEY_FILE,API_KEY_FILE])await readOptional(path8)!==void 0&&(await rm(path8,{force:!0}),removed.push(path8));return{removed,envStillSet:!!process.env.BLOCKRUN_API_KEY?.trim()}}async function fetchCreditBalance(apiKey,timeoutMs=5e3){try{let controller=new AbortController,timer2=setTimeout(()=>controller.abort(),timeoutMs),res=await fetch(`${BLOCKRUN_API_KEY_API}/v1/credits`,{headers:{authorization:`Bearer ${apiKey}`},signal:controller.signal});if(clearTimeout(timer2),!res.ok)return;let b=await res.json(),num2=v=>typeof v=="number"?v:null;return{accountId:typeof b.account_id=="string"?b.account_id:void 0,billingMode:typeof b.billing_mode=="string"?b.billing_mode:void 0,currency:typeof b.currency=="string"?b.currency:"USD",grantedUsd:num2(b.granted_usd),spentUsd:num2(b.spent_usd),remainingUsd:num2(b.remaining_usd),blocked:b.blocked===!0,blockedReason:typeof b.blocked_reason=="string"?b.blocked_reason:void 0}}catch{return}}function formatCreditBalance(b){let money=v=>v===null?void 0:`$${v.toFixed(v<.01&&v>0?6:2)}`,remaining=money(b.remainingUsd),spent=money(b.spentUsd);if(remaining)return`${remaining} remaining${spent?` (spent ${spent})`:""}`;let mode2=b.billingMode==="ungated"?"no prepaid limit":b.billingMode??"unknown";return`${spent?`spent ${spent}`:"unknown"} \u2014 ${mode2}`}async function fetchUsagePage(apiKey,opts={}){let params=new URLSearchParams;opts.from&¶ms.set("from",opts.from),opts.to&¶ms.set("to",opts.to),opts.limit&¶ms.set("limit",String(opts.limit)),opts.cursor&¶ms.set("cursor",opts.cursor);let query=params.toString();try{let res=await fetch(`${BLOCKRUN_API_KEY_API}/v1/usage${query?`?${query}`:""}`,{headers:{authorization:`Bearer ${apiKey}`},signal:AbortSignal.timeout(3e4)});if(!res.ok)return;let body=await res.json();return{rows:(body.data??[]).map(r2=>({requestId:String(r2.request_id??""),timestamp:String(r2.timestamp??""),endpoint:String(r2.endpoint??""),model:typeof r2.model=="string"?r2.model:null,kind:String(r2.kind??""),inputTokens:typeof r2.input_tokens=="number"?r2.input_tokens:0,outputTokens:typeof r2.output_tokens=="number"?r2.output_tokens:0,costUsd:typeof r2.cost_usd=="number"?r2.cost_usd:null,costState:String(r2.cost_state??""),status:typeof r2.status=="number"?r2.status:0})),nextCursor:body.next_cursor??null,unavailableDays:body.unavailable_days??[]}}catch{return}}function normalizeApiKeyBase(raw){let base4=raw.replace(/\/+$/,"").replace(/\/v1$/,""),url3=new URL(base4);if(url3.username||url3.password||url3.search||url3.hash||url3.protocol!=="https:"&&!(url3.protocol==="http:"&&["localhost","127.0.0.1","[::1]"].includes(url3.hostname)))throw new Error("BlockRun account API URL requires HTTPS (except localhost) and no credentials, query or fragment.");return base4}function createApiKeyFetch(apiKey,baseFetch=fetch,apiBase=BLOCKRUN_API_KEY_API){let base4=new URL(normalizeApiKeyBase(apiBase));return async(input2,init2)=>{let request2=input2 instanceof Request?input2:void 0,url3=new URL(request2?.url??String(input2),`${base4}/`);if(url3.origin!==base4.origin||url3.username||url3.password)throw new Error("Refusing to forward a BlockRun account key to another origin.");base4.pathname==="/"&&url3.pathname.startsWith("/api/v1/")&&(url3.pathname=url3.pathname.slice(4));let headers=new Headers(init2?.headers??request2?.headers);for(let name of[...headers.keys()])(/payment/i.test(name)||name.toLowerCase()==="x-api-key")&&headers.delete(name);headers.set("authorization",`Bearer ${apiKey}`);let response=await baseFetch(request2?new Request(url3,request2):url3.href,{...init2,headers,redirect:"error"});return response.ok?response:explainApiKeyFailure(response)}}async function pollApiKeyJob(response,payFetch,apiBase,signal,intervalMs=2e3){if(response.status!==202)return response;let initial=await response.clone().json();if(!initial.poll_url)throw new Error("Async account response missing poll_url");let pollUrl=new URL(initial.poll_url,`${normalizeApiKeyBase(apiBase)}/`).href,abort=AbortSignal.any([signal,AbortSignal.timeout(15*6e4)]);for(;!abort.aborted;){let polled=await payFetch(pollUrl,{signal:abort});if([502,503,504,522,524].includes(polled.status))await polled.body?.cancel();else{if(!polled.ok)return polled;let data=await polled.clone().json();if(data.status==="completed"||data.status==="failed")return polled;await polled.body?.cancel()}await new Promise(resolve4=>setTimeout(resolve4,intervalMs))}throw new Error("Async account job did not complete before the client aborted or timed out.")}async function explainApiKeyFailure(response){let hint=HINTS[response.status];if(!hint||!(response.headers.get("content-type")??"").includes("json"))return response;let parsed;try{parsed=await response.clone().json()}catch{return response}if(!parsed?.error||typeof parsed.error.message!="string"||response.status===404&&!/unsupported endpoint/i.test(parsed.error.message))return response;parsed.error.message=`${parsed.error.message} ${hint}`;let headers=new Headers(response.headers);return headers.delete("content-length"),new Response(JSON.stringify(parsed),{status:response.status,statusText:response.statusText,headers})}var API_KEY_FILE,CORE_API_KEY_FILE,PORTAL_URL,PORTAL_KEYS_URL,PORTAL_CREDITS_URL,BLOCKRUN_API_KEY_API,HINTS,init_api_key=__esm({"src/api-key.ts"(){"use strict";init_fs_read();API_KEY_FILE=join(homedir(),".openclaw","blockrun","api-key"),CORE_API_KEY_FILE=join(homedir(),".blockrun",".api-key"),PORTAL_URL="https://user.blockrun.ai",PORTAL_KEYS_URL=`${PORTAL_URL}/dashboard/keys`,PORTAL_CREDITS_URL=`${PORTAL_URL}/dashboard/credits`,BLOCKRUN_API_KEY_API=process.env.BLOCKRUN_API_BASE_URL?.replace(/\/+$/,"").replace(/\/v1$/,"")||"https://api.blockrun.ai";HINTS={401:`Check BLOCKRUN_API_KEY, or mint a new key at ${PORTAL_KEYS_URL}.`,402:`Top up your BlockRun credit at ${PORTAL_CREDITS_URL}.`,404:'api.blockrun.ai does not serve this endpoint. Chat, Anthropic-shaped messages, images, speech, video and the partner APIs (Exa, prediction markets, phone lookup) all work on an API key. The wallet-only exceptions are the routes that bind a lease or a position to a payer address \u2014 buying/renewing/releasing phone numbers, and Polymarket trading \u2014 which need a wallet to own the thing being bought. For those, unset BLOCKRUN_API_KEY and run "clawrouter logout".'}}});var top_models_default,init_top_models=__esm({"src/top-models.json"(){top_models_default=["auto","premium","eco","free","anthropic/claude-fable-5.1","anthropic/claude-fable-5","anthropic/claude-opus-5.5","anthropic/claude-opus-5","anthropic/claude-opus-4.8","anthropic/claude-opus-4.7","anthropic/claude-sonnet-5.5","anthropic/claude-sonnet-5","anthropic/claude-sonnet-4.6","anthropic/claude-haiku-4.5","openai/gpt-6-astra","openai/gpt-6-sol","openai/gpt-6.1-sol","openai/gpt-6-luna","openai/gpt-5.6-terra","openai/gpt-5.6-sol","openai/gpt-5.6-luna","openai/gpt-5.6-terra-pro","openai/gpt-5.6-sol-pro","openai/gpt-5.6-luna-pro","openai/gpt-5.5","openai/gpt-5.5-pro","openai/gpt-5.4-pro","openai/gpt-5.4","openai/gpt-5.4-mini","openai/gpt-5.4-nano","openai/gpt-5.1","openai/gpt-5.3-codex","google/gemini-4-argon","google/gemini-3.1-pro","google/gemini-3.8-flash","google/gemini-3.6-flash","google/gemini-3.5-flash-lite","google/gemini-3.1-flash-lite","google/gemini-3-flash-preview","xai/grok-4.7","xai/grok-4.6","xai/grok-4.5","xai/grok-4.3","xai/grok-build-0.1","zai/glm-5.3","zai/glm-5.3-flash","zai/glm-5.2","zai/glm-5.1","zai/glm-5-turbo","zai/glm-5","xiaomi/mimo-v2.5","xiaomi/mimo-v2.5-pro","tencent/hy4-preview","mistral/mistral-large-4","poolside/laguna-s-2.1","minimax/minimax-m3","minimax/minimax-m2.7","moonshot/kimi-k3.1-pro","qwen/qwen3.7-max","qwen/qwen3.8-max","qwen/qwen3.8-flash","deepseek/deepseek-v4-flash-vision-exp","deepseek/deepseek-v4-pro","deepseek/deepseek-v4.1-flash","deepseek/deepseek-chat","deepseek/deepseek-reasoner","free/nemotron-3.5-lightning","free/laguna-xs-2.1","free/nemotron-3-nano-omni-30b-a3b-reasoning","free/nemotron-3-ultra-550b","free/nemotron-3.5-bolt","free/nemotron-3-super-120b","free/muse-glimmer-30b"]}});function loadTopModels(){let parsed=top_models_default;if(!Array.isArray(parsed)||parsed.some(value=>typeof value!="string"||!value.trim()))throw new Error("top-models.json must be a JSON array of non-empty strings");return[...parsed]}var TOP_MODELS,init_top_models2=__esm({"src/top-models.ts"(){"use strict";init_top_models();TOP_MODELS=Object.freeze(loadTopModels())}});function resolveModelAlias(model){let normalized=model.trim().toLowerCase(),resolved=MODEL_ALIASES[normalized];if(resolved)return resolved;if(normalized.startsWith("blockrun/")){let withoutPrefix=normalized.slice(9),resolvedWithoutPrefix=MODEL_ALIASES[withoutPrefix];return resolvedWithoutPrefix||withoutPrefix}if(normalized.startsWith("openai/")){let withoutPrefix=normalized.slice(7),resolvedWithoutPrefix=MODEL_ALIASES[withoutPrefix];if(resolvedWithoutPrefix)return resolvedWithoutPrefix;if(BLOCKRUN_MODELS.some(m=>m.id===withoutPrefix))return withoutPrefix}if(normalized.startsWith("openai-codex/")){let withoutPrefix=normalized.slice(13),resolvedWithoutPrefix=MODEL_ALIASES[withoutPrefix];if(resolvedWithoutPrefix)return resolvedWithoutPrefix;if(BLOCKRUN_MODELS.some(m=>m.id===withoutPrefix))return withoutPrefix}return model}function getActivePromoPrice(model,now2=new Date){if(model.flatPrice!==void 0)return model.flatPrice;if(!model.promo)return;let start=new Date(model.promo.startDate),end=new Date(model.promo.endDate);if(now2>=start&&now2<end)return model.promo.flatPrice}function toOpenClawModel(m){return{id:m.id,name:m.name,api:"openai-completions",reasoning:m.reasoning??!1,input:m.vision?["text","image"]:["text"],cost:{input:m.inputPrice,output:m.outputPrice,cacheRead:0,cacheWrite:0},contextWindow:m.contextWindow,maxTokens:m.maxOutput}}function buildProviderModels(baseUrl){return{baseUrl:`${baseUrl}/v1`,api:"openai-completions",models:VISIBLE_OPENCLAW_MODELS}}function isAgenticModel(modelId){return BLOCKRUN_MODELS.find(m=>m.id===modelId||m.id===modelId.replace("blockrun/",""))?.agentic??!1}function getAgenticModels(){return BLOCKRUN_MODELS.filter(m=>m.agentic).map(m=>m.id)}function getModelContextWindow(modelId){let normalized=modelId.replace("blockrun/","");return BLOCKRUN_MODELS.find(m=>m.id===normalized)?.contextWindow}function isReasoningModel(modelId){let normalized=modelId.replace("blockrun/","");return BLOCKRUN_MODELS.find(m=>m.id===normalized)?.reasoning??!1}var MODEL_ALIASES,BLOCKRUN_MODELS,ALIAS_MODELS,OPENCLAW_MODELS,OPENCLAW_MODEL_BY_ID,VISIBLE_OPENCLAW_MODELS,init_models=__esm({"src/models.ts"(){"use strict";init_top_models2();MODEL_ALIASES={claude:"anthropic/claude-sonnet-4.6","br-sonnet":"anthropic/claude-sonnet-4.6",sonnet:"anthropic/claude-sonnet-4.6","sonnet-4":"anthropic/claude-sonnet-4.6","sonnet-4.6":"anthropic/claude-sonnet-4.6","sonnet-4-6":"anthropic/claude-sonnet-4.6","sonnet-5":"anthropic/claude-sonnet-5","sonnet-5.0":"anthropic/claude-sonnet-5","sonnet-5-0":"anthropic/claude-sonnet-5","sonnet-5.5":"anthropic/claude-sonnet-5.5","sonnet-5-5":"anthropic/claude-sonnet-5.5","anthropic/claude-sonnet-5-5":"anthropic/claude-sonnet-5.5","sonnet-4.5":"anthropic/claude-sonnet-4.5","sonnet-4-5":"anthropic/claude-sonnet-4.5","anthropic/claude-sonnet-4-5":"anthropic/claude-sonnet-4.5",fable:"anthropic/claude-fable-5","fable-5":"anthropic/claude-fable-5","fable-5.0":"anthropic/claude-fable-5","fable-5.1":"anthropic/claude-fable-5.1","fable-5-1":"anthropic/claude-fable-5.1","fable-5.2":"anthropic/claude-fable-5.2","fable-5-2":"anthropic/claude-fable-5.2","anthropic/claude-fable-5-1":"anthropic/claude-fable-5.1",opus:"anthropic/claude-opus-5","opus-5":"anthropic/claude-opus-5","opus-5.0":"anthropic/claude-opus-5","opus-5-0":"anthropic/claude-opus-5","opus-5.5":"anthropic/claude-opus-5.5","opus-5-5":"anthropic/claude-opus-5.5","anthropic/claude-opus-5-5":"anthropic/claude-opus-5.5","opus-4":"anthropic/claude-opus-4.8","opus-4.8":"anthropic/claude-opus-4.8","opus-4-8":"anthropic/claude-opus-4.8","opus-4.7":"anthropic/claude-opus-4.7","opus-4-7":"anthropic/claude-opus-4.7","opus-4.6":"anthropic/claude-opus-4.6","opus-4-6":"anthropic/claude-opus-4.6",haiku:"anthropic/claude-haiku-4.5","anthropic/sonnet":"anthropic/claude-sonnet-4.6","anthropic/fable":"anthropic/claude-fable-5","anthropic/claude-fable-5.0":"anthropic/claude-fable-5","anthropic/opus":"anthropic/claude-opus-5","anthropic/claude-opus-5.0":"anthropic/claude-opus-5","anthropic/claude-opus-5-0":"anthropic/claude-opus-5","anthropic/haiku":"anthropic/claude-haiku-4.5","anthropic/claude":"anthropic/claude-sonnet-4.6","anthropic/claude-sonnet-4":"anthropic/claude-sonnet-4.6","anthropic/claude-sonnet-4-6":"anthropic/claude-sonnet-4.6","anthropic/claude-opus-4":"anthropic/claude-opus-4.8","anthropic/claude-opus-4-8":"anthropic/claude-opus-4.8","anthropic/claude-opus-4-7":"anthropic/claude-opus-4.7","anthropic/claude-opus-4-6":"anthropic/claude-opus-4.6","anthropic/claude-opus-4-5":"anthropic/claude-opus-4.5","anthropic/claude-haiku-4":"anthropic/claude-haiku-4.5","anthropic/claude-haiku-4-5":"anthropic/claude-haiku-4.5",gpt:"openai/gpt-4o",gpt4:"openai/gpt-4o",gpt5:"openai/gpt-5.6-terra","gpt-5.6":"openai/gpt-5.6-terra","openai/gpt-5.6":"openai/gpt-5.6-terra","gpt-5.6-sol":"openai/gpt-5.6-sol","gpt-5.6-terra":"openai/gpt-5.6-terra","gpt-5.6-luna":"openai/gpt-5.6-luna","gpt-5.6-sol-pro":"openai/gpt-5.6-sol-pro","gpt-5.6-terra-pro":"openai/gpt-5.6-terra-pro","gpt-5.6-luna-pro":"openai/gpt-5.6-luna-pro","sol-pro":"openai/gpt-5.6-sol-pro","terra-pro":"openai/gpt-5.6-terra-pro","luna-pro":"openai/gpt-5.6-luna-pro","gpt-6-astra":"openai/gpt-6-astra","gpt-6-sol":"openai/gpt-6-sol","gpt-6-luna":"openai/gpt-6-luna","gpt-6.1-sol":"openai/gpt-6.1-sol","gpt-6-1-sol":"openai/gpt-6.1-sol","gpt-5.5":"openai/gpt-5.5","gpt-5.5-pro":"openai/gpt-5.5-pro","chat-latest":"openai/chat-latest",chatgpt:"openai/chat-latest","gpt-5.4":"openai/gpt-5.4","gpt-5.1":"openai/gpt-5.1","gpt-5.4-pro":"openai/gpt-5.4-pro","gpt-5.4-nano":"openai/gpt-5.4-nano",nano:"openai/gpt-5.4-nano","gpt-5-nano":"openai/gpt-5.4-nano",codex:"openai/gpt-5.3-codex",mini:"openai/gpt-4o-mini",o1:"openai/gpt-5.4-mini","openai/o1-mini":"openai/gpt-5.4-mini","o1-mini":"openai/gpt-5.4-mini",o3:"openai/o3","openai-codex/gpt-5.4-mini":"openai/gpt-5.4-mini","gpt-5.4-mini":"openai/gpt-5.4-mini",deepseek:"deepseek/deepseek-v4.1-flash","deepseek-chat":"deepseek/deepseek-chat",reasoner:"deepseek/deepseek-reasoner","deepseek-v4.1-flash":"deepseek/deepseek-v4.1-flash","deepseek-v4-1-flash":"deepseek/deepseek-v4.1-flash","v4.1-flash":"deepseek/deepseek-v4.1-flash",kimi:"moonshot/kimi-k2.7",moonshot:"moonshot/kimi-k2.7","kimi-k3":"moonshot/kimi-k3","kimi-k3.1":"moonshot/kimi-k3.1-pro","kimi-k3.1-pro":"moonshot/kimi-k3.1-pro","kimi-k2":"moonshot/kimi-k2.7","kimi-k2.7":"moonshot/kimi-k2.7","kimi-k2.6":"moonshot/kimi-k2.6","kimi-k2.5":"moonshot/kimi-k2.5","nvidia/kimi-k2.5":"moonshot/kimi-k2.5","qwen3.7-max":"qwen/qwen3.7-max","qwen3.8-max":"qwen/qwen3.8-max","qwen-3.8-max":"qwen/qwen3.8-max","qwen3-8-max":"qwen/qwen3.8-max","qwen3.8-flash":"qwen/qwen3.8-flash","qwen3-8-flash":"qwen/qwen3.8-flash","qwen-vision":"qwen/qwen3.8-flash","deepseek-vision":"deepseek/deepseek-v4-flash-vision-exp","v4-flash-vision":"deepseek/deepseek-v4-flash-vision-exp","mimo-vision":"xiaomi/mimo-v2.5","qwen-3.7-max":"qwen/qwen3.7-max","qwen3-7-max":"qwen/qwen3.7-max","qwen3.7-plus":"qwen/qwen3.7-plus","qwen-3.7-plus":"qwen/qwen3.7-plus","qwen3.7-flash":"qwen/qwen3.7-flash","qwen-3.7-flash":"qwen/qwen3.7-flash",hy3:"tencent/hy3",tencent:"tencent/hy3",hunyuan:"tencent/hy3",hy4:"tencent/hy4-preview","hy4-preview":"tencent/hy4-preview",mimo:"xiaomi/mimo-v2.5-pro","mimo-v2.5-pro":"xiaomi/mimo-v2.5-pro","mimo-v2.5":"xiaomi/mimo-v2.5",xiaomi:"xiaomi/mimo-v2.5-pro","google/gemini-3-pro-preview":"google/gemini-3.1-pro","gemini-3-pro-preview":"google/gemini-3.1-pro","gemini-pro":"google/gemini-3.1-pro","gemini-3-pro":"google/gemini-3.1-pro","gemini-3.1-pro":"google/gemini-3.1-pro",gemini:"google/gemini-2.5-pro",flash:"google/gemini-2.5-flash","gemini-3.1-pro-preview":"google/gemini-3.1-pro","google/gemini-3.1-pro-preview":"google/gemini-3.1-pro","gemini-3.6-flash":"google/gemini-3.6-flash","gemini-3.6":"google/gemini-3.6-flash","gemini-3.5-flash":"google/gemini-3.6-flash","gemini-3.5-flash-lite":"google/gemini-3.5-flash-lite","gemini-3.1-flash-lite":"google/gemini-3.1-flash-lite","gemini-2.5-flash-lite":"google/gemini-2.5-flash-lite",grok:"xai/grok-4.5","grok-4.5":"xai/grok-4.5","grok-4-5":"xai/grok-4.5","grok-4.7":"xai/grok-4.7","grok-4-7":"xai/grok-4.7","grok-4.6":"xai/grok-4.6","grok-4-6":"xai/grok-4.6","grok-4.3":"xai/grok-4.3","grok-fast":"xai/grok-4-1-fast-reasoning","grok-build":"xai/grok-build-0.1","grok-code":"xai/grok-build-0.1","grok-code-fast-1":"deepseek/deepseek-chat","xai/grok-code-fast-1":"deepseek/deepseek-chat","xai/grok-3-fast":"xai/grok-4-1-fast-reasoning",nvidia:"free/nemotron-3.5-lightning","gpt-120b":"free/gpt-oss-120b","gpt-20b":"free/gpt-oss-20b","nvidia/gpt-oss-120b":"free/gpt-oss-120b","nvidia/gpt-oss-20b":"free/gpt-oss-20b","nvidia/deepseek-v3.2":"free/nemotron-3.5-lightning","free/deepseek-v3.2":"free/nemotron-3.5-lightning","nvidia/deepseek-v4-pro":"free/nemotron-3.5-lightning","free/deepseek-v4-pro":"free/nemotron-3.5-lightning","nvidia/deepseek-v4-flash":"free/nemotron-3.5-lightning","nvidia/nemotron-3-nano-omni-30b-a3b-reasoning":"free/nemotron-3-nano-omni-30b-a3b-reasoning","nvidia/qwen3-coder-480b":"free/qwen3-coder-480b","qwen/qwen3-coder-480b-a35b-instruct":"free/qwen3-coder-480b","nvidia/glm-4.7":"free/glm-4.7","nvidia/llama-4-maverick":"free/llama-4-maverick","nvidia/qwen3-next-80b-a3b-thinking":"free/qwen3-next-80b-a3b-instruct","nvidia/qwen3-next-80b-a3b-instruct":"free/qwen3-next-80b-a3b-instruct","nvidia/seed-oss-36b":"free/seed-oss-36b","nvidia/mistral-nemotron":"free/mistral-nemotron","nvidia/step-3.7-flash":"free/step-3.7-flash","nvidia/nemotron-nano-9b-v2":"free/nemotron-nano-9b-v2","nvidia/nemotron-nano-12b-v2-vl":"free/nemotron-nano-12b-v2-vl","nvidia/nemotron-ultra-253b":"free/nemotron-3.5-lightning","nvidia/mistral-large-3-675b":"free/mistral-large-3-675b","nvidia/qwen3.5-122b-a10b":"free/qwen3.5-122b-a10b","nvidia/devstral-2-123b":"free/nemotron-3.5-lightning","free/nemotron-ultra-253b":"free/nemotron-3.5-lightning","free/devstral-2-123b":"free/nemotron-3.5-lightning","mistral-large":"free/mistral-large-3-675b","mistral-large-3-675b":"free/mistral-large-3-675b","qwen3.5-122b":"free/qwen3.5-122b-a10b","mistral-large-4":"mistral/mistral-large-4","qwen3-122b":"free/qwen3.5-122b-a10b","deepseek-free":"free/nemotron-3.5-lightning","deepseek-v4-pro":"free/nemotron-3.5-lightning","deepseek-v4-flash":"free/nemotron-3.5-lightning","v4-pro":"free/nemotron-3.5-lightning","v4-flash":"free/nemotron-3.5-lightning","mistral-free":"free/nemotron-3.5-lightning","glm-free":"free/nemotron-3.5-lightning","llama-free":"free/muse-glimmer-30b","qwen-coder":"free/nemotron-3.5-lightning","qwen-coder-free":"free/nemotron-3.5-lightning","qwen-thinking":"free/nemotron-3.5-lightning","qwen3-next":"free/qwen3-next-80b-a3b-instruct","qwen3-next-80b":"free/qwen3-next-80b-a3b-instruct","mistral-small":"free/nemotron-3.5-lightning","seed-oss":"free/seed-oss-36b","seed-oss-36b":"free/seed-oss-36b","coder-free":"free/laguna-xs-2.1","mistral-nemotron":"free/mistral-nemotron","step-flash":"free/step-3.7-flash","step-3.7-flash":"free/step-3.7-flash","nemotron-nano-9b":"free/nemotron-3-nano-omni-30b-a3b-reasoning","nemotron-nano":"free/nemotron-3-nano-omni-30b-a3b-reasoning","nemotron-nano-vl":"free/nemotron-3-nano-omni-30b-a3b-reasoning","nano-vl":"free/nemotron-3-nano-omni-30b-a3b-reasoning","nemotron-omni":"free/nemotron-3-nano-omni-30b-a3b-reasoning","nano-omni":"free/nemotron-3-nano-omni-30b-a3b-reasoning","vision-free":"free/nemotron-3.5-bolt",nemotron:"free/nemotron-3.5-lightning","nemotron-ultra":"free/nemotron-3.5-lightning","nemotron-253b":"free/nemotron-3.5-lightning","nemotron-super":"free/nemotron-3-super-120b","nemotron-49b":"free/nemotron-3.5-lightning","nemotron-120b":"free/nemotron-3.5-lightning",devstral:"free/nemotron-3.5-lightning","devstral-2":"free/nemotron-3.5-lightning",maverick:"free/llama-4-maverick","nvidia/nemotron-3.5-lightning":"free/nemotron-3.5-lightning","nvidia/nemotron-3-nano-30b":"free/nemotron-3-nano-omni-30b-a3b-reasoning","nvidia/nemotron-3-ultra-550b":"free/nemotron-3-ultra-550b","nvidia/minimax-m3.1-flash":"free/minimax-m3.1-flash","nvidia/llama-3.2-11b-vision":"free/llama-3.2-11b-vision","cohere/north-mini-code":"free/north-mini-code","poolside/laguna-xs-2.1":"free/laguna-xs-2.1",lightning:"free/nemotron-3.5-lightning","nemotron-lightning":"free/nemotron-3.5-lightning","nemotron-3.5-lightning":"free/nemotron-3.5-lightning","nano-30b":"free/nemotron-3-nano-omni-30b-a3b-reasoning","nemotron-nano-30b":"free/nemotron-3-nano-omni-30b-a3b-reasoning","ultra-550b":"free/nemotron-3-ultra-550b","nemotron-ultra-550b":"free/nemotron-3-ultra-550b","minimax-m3.1-flash":"free/minimax-m3.1-flash","llama-vision":"free/llama-3.2-11b-vision","llama-3.2-vision":"free/llama-3.2-11b-vision","north-mini":"free/laguna-xs-2.1","north-mini-code":"free/laguna-xs-2.1",laguna:"free/laguna-xs-2.1","laguna-xs":"free/laguna-xs-2.1","laguna-s":"poolside/laguna-s-2.1","laguna-s-2.1":"poolside/laguna-s-2.1","nvidia/muse-glimmer-30b":"free/muse-glimmer-30b","nvidia/nemotron-3.5-bolt":"free/nemotron-3.5-bolt","nemotron-3.5-bolt":"free/nemotron-3.5-bolt",bolt:"free/nemotron-3.5-bolt","nvidia/nemotron-3-super-120b":"free/nemotron-3-super-120b","nemotron-3-super-120b":"free/nemotron-3-super-120b","super-120b":"free/nemotron-3-super-120b",muse:"free/muse-glimmer-30b","muse-glimmer":"free/muse-glimmer-30b","muse-glimmer-30b":"free/muse-glimmer-30b",free:"free/nemotron-3.5-lightning",minimax:"minimax/minimax-m3","minimax-m3":"minimax/minimax-m3","minimax-m2.7":"minimax/minimax-m2.7","minimax-m2.5":"minimax/minimax-m2.5",glm:"zai/glm-5.3","glm-5.3":"zai/glm-5.3","glm-5-3":"zai/glm-5.3","glm-5.3-flash":"zai/glm-5.3-flash","glm-5-3-flash":"zai/glm-5.3-flash","glm-flash":"zai/glm-5.3-flash","glm-5.2":"zai/glm-5.2","glm-5":"zai/glm-5","glm-5.1":"zai/glm-5.1","glm-5-turbo":"zai/glm-5-turbo","auto-router":"auto",router:"auto",dalle:"openai/gpt-image-2","dall-e":"openai/gpt-image-2","gpt-image":"openai/gpt-image-1","gpt-image-2":"openai/gpt-image-2","nano-banana":"google/nano-banana",banana:"google/nano-banana","banana-pro":"google/nano-banana-pro","nano-banana-pro":"google/nano-banana-pro","nano-banana-2":"google/nano-banana-2","banana-2":"google/nano-banana-2",seedream:"bytedance/seedream-5-pro","grok-imagine":"xai/grok-imagine-image","grok-imagine-pro":"xai/grok-imagine-image-pro",cogview:"zai/cogview-4","grok-video":"xai/grok-imagine-video","grok-video-1.5":"xai/grok-imagine-video-1.5","grok-video-1-5":"xai/grok-imagine-video-1.5",seedance:"bytedance/seedance-1.5-pro","seedance-1.5":"bytedance/seedance-1.5-pro","seedance-2-fast":"bytedance/seedance-2.0-fast","seedance-2":"bytedance/seedance-2.0","seedance-2.5":"bytedance/seedance-2.5","seedance-2-5":"bytedance/seedance-2.5","seedance-2-mini":"bytedance/seedance-2.0-mini","seedance-2.0-mini":"bytedance/seedance-2.0-mini","seedance-mini":"bytedance/seedance-2.0-mini"};BLOCKRUN_MODELS=[{id:"auto",name:"Auto (Smart Router - Balanced)",inputPrice:0,outputPrice:0,contextWindow:105e4,maxOutput:128e3},{id:"free",name:"Free \u2192 Nemotron 3.5 Lightning",inputPrice:0,outputPrice:0,contextWindow:1e6,maxOutput:16384,reasoning:!0},{id:"eco",name:"Eco (Smart Router - Cost Optimized)",inputPrice:0,outputPrice:0,contextWindow:105e4,maxOutput:128e3},{id:"premium",name:"Premium (Smart Router - Best Quality)",inputPrice:0,outputPrice:0,contextWindow:2e6,maxOutput:2e5},{id:"openai/gpt-5.2",name:"GPT-5.2",version:"5.2",inputPrice:1.75,outputPrice:14,contextWindow:4e5,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"openai/gpt-5-mini",name:"GPT-5 Mini",version:"5.0",inputPrice:.25,outputPrice:2,contextWindow:2e5,maxOutput:128e3,toolCalling:!0},{id:"openai/gpt-5-nano",name:"GPT-5 Nano",version:"5.0",inputPrice:.05,outputPrice:.4,contextWindow:128e3,maxOutput:128e3,toolCalling:!0,deprecated:!0,fallbackModel:"openai/gpt-5.4-nano"},{id:"openai/gpt-5.2-pro",name:"GPT-5.2 Pro",version:"5.2",inputPrice:21,outputPrice:168,contextWindow:4e5,maxOutput:128e3,reasoning:!0,vision:!0,toolCalling:!0},{id:"openai/gpt-6-astra",name:"GPT-6 Astra",version:"6",inputPrice:10,outputPrice:50,contextWindow:105e4,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"openai/gpt-6-sol",name:"GPT-6 Sol",version:"6",inputPrice:2,outputPrice:10,contextWindow:105e4,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"openai/gpt-6.1-sol",name:"GPT-6.1 Sol",version:"6.1",inputPrice:2,outputPrice:10,contextWindow:105e4,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"openai/gpt-6-luna",name:"GPT-6 Luna",version:"6",inputPrice:.1,outputPrice:.5,contextWindow:105e4,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"openai/gpt-5.6-sol",name:"GPT-5.6 Sol",version:"5.6",inputPrice:4,outputPrice:20,contextWindow:105e4,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"openai/gpt-5.6-terra",name:"GPT-5.6 Terra",version:"5.6",inputPrice:2,outputPrice:12,contextWindow:105e4,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"openai/gpt-5.6-luna",name:"GPT-5.6 Luna",version:"5.6",inputPrice:.2,outputPrice:1.2,contextWindow:105e4,maxOutput:128e3,vision:!0,agentic:!0,toolCalling:!0},{id:"openai/gpt-5.6-sol-pro",name:"GPT-5.6 Sol Pro",version:"5.6",inputPrice:4,outputPrice:20,contextWindow:105e4,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"openai/gpt-5.6-terra-pro",name:"GPT-5.6 Terra Pro",version:"5.6",inputPrice:2,outputPrice:12,contextWindow:105e4,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"openai/gpt-5.6-luna-pro",name:"GPT-5.6 Luna Pro",version:"5.6",inputPrice:.2,outputPrice:1.2,contextWindow:105e4,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"openai/gpt-5.5",name:"GPT-5.5",version:"5.5",inputPrice:5,outputPrice:30,contextWindow:105e4,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"openai/gpt-5.5-pro",name:"GPT-5.5 Pro",version:"5.5",inputPrice:30,outputPrice:180,contextWindow:105e4,maxOutput:128e3,reasoning:!0,vision:!0,toolCalling:!0},{id:"openai/chat-latest",name:"ChatGPT Instant (GPT-5.5)",version:"5.5",inputPrice:5,outputPrice:30,contextWindow:128e3,maxOutput:128e3,vision:!0,toolCalling:!0},{id:"openai/gpt-5.4",name:"GPT-5.4",version:"5.4",inputPrice:2.5,outputPrice:15,contextWindow:105e4,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"openai/gpt-5.4-mini",name:"GPT-5.4 Mini",version:"5.4",inputPrice:.75,outputPrice:4.5,contextWindow:4e5,maxOutput:128e3,vision:!0,agentic:!0,toolCalling:!0},{id:"openai/gpt-5.4-pro",name:"GPT-5.4 Pro",version:"5.4",inputPrice:30,outputPrice:180,contextWindow:105e4,maxOutput:128e3,reasoning:!0,vision:!0,toolCalling:!0},{id:"openai/gpt-5.4-nano",name:"GPT-5.4 Nano",version:"5.4",inputPrice:.2,outputPrice:1.25,contextWindow:105e4,maxOutput:128e3,toolCalling:!0},{id:"openai/gpt-5.1",name:"GPT-5.1",version:"5.1",inputPrice:1.25,outputPrice:10,contextWindow:4e5,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"openai/gpt-5.3",name:"GPT-5.3",version:"5.3",inputPrice:1.75,outputPrice:14,contextWindow:128e3,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0,deprecated:!0,fallbackModel:"openai/gpt-5.2"},{id:"openai/gpt-5.3-codex",name:"GPT-5.3 Codex",version:"5.3",inputPrice:1.75,outputPrice:14,contextWindow:4e5,maxOutput:128e3,agentic:!0,toolCalling:!0},{id:"openai/gpt-4.1",name:"GPT-4.1",version:"4.1",inputPrice:2,outputPrice:8,contextWindow:128e3,maxOutput:32768,vision:!0,toolCalling:!0},{id:"openai/gpt-4.1-mini",name:"GPT-4.1 Mini",version:"4.1",inputPrice:.4,outputPrice:1.6,contextWindow:128e3,maxOutput:32768,toolCalling:!0},{id:"openai/gpt-4.1-nano",name:"GPT-4.1 Nano",version:"4.1",inputPrice:.1,outputPrice:.4,contextWindow:128e3,maxOutput:32768,toolCalling:!0},{id:"openai/gpt-4o",name:"GPT-4o",version:"4o",inputPrice:2.5,outputPrice:10,contextWindow:128e3,maxOutput:16384,vision:!0,agentic:!0,toolCalling:!0},{id:"openai/gpt-4o-mini",name:"GPT-4o Mini",version:"4o-mini",inputPrice:.15,outputPrice:.6,contextWindow:128e3,maxOutput:16384,toolCalling:!0},{id:"openai/o1",name:"o1",version:"1",inputPrice:15,outputPrice:60,contextWindow:2e5,maxOutput:1e5,reasoning:!0,toolCalling:!0,deprecated:!0,fallbackModel:"openai/gpt-5.4-mini"},{id:"openai/o1-mini",name:"o1-mini",version:"1-mini",inputPrice:1.1,outputPrice:4.4,contextWindow:128e3,maxOutput:65536,reasoning:!0,toolCalling:!0,deprecated:!0,fallbackModel:"openai/gpt-5.4-mini"},{id:"openai/o3",name:"o3",version:"3",inputPrice:2,outputPrice:8,contextWindow:2e5,maxOutput:1e5,reasoning:!0,toolCalling:!0},{id:"openai/o3-mini",name:"o3-mini",version:"3-mini",inputPrice:1.1,outputPrice:4.4,contextWindow:128e3,maxOutput:1e5,reasoning:!0,toolCalling:!0,deprecated:!0,fallbackModel:"openai/gpt-5.4-mini"},{id:"openai/o4-mini",name:"o4-mini",version:"4-mini",inputPrice:1.1,outputPrice:4.4,contextWindow:128e3,maxOutput:1e5,reasoning:!0,toolCalling:!0,deprecated:!0,fallbackModel:"openai/gpt-5.4-mini"},{id:"anthropic/claude-haiku-4.5",name:"Claude Haiku 4.5",version:"4.5",inputPrice:1,outputPrice:5,contextWindow:2e5,maxOutput:64e3,vision:!0,agentic:!0,toolCalling:!0},{id:"anthropic/claude-sonnet-4.5",name:"Claude Sonnet 4.5",version:"4.5",inputPrice:3,outputPrice:15,contextWindow:2e5,maxOutput:64e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"anthropic/claude-sonnet-4.6",name:"Claude Sonnet 4.6",version:"4.6",inputPrice:3,outputPrice:15,contextWindow:1e6,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"anthropic/claude-sonnet-5",name:"Claude Sonnet 5",version:"5",inputPrice:2,outputPrice:10,contextWindow:1e6,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"anthropic/claude-opus-4.5",name:"Claude Opus 4.5",version:"4.5",inputPrice:5,outputPrice:25,contextWindow:2e5,maxOutput:64e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"anthropic/claude-opus-4.6",name:"Claude Opus 4.6",version:"4.6",inputPrice:5,outputPrice:25,contextWindow:1e6,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"anthropic/claude-fable-5",name:"Claude Fable 5",version:"5",inputPrice:10,outputPrice:50,contextWindow:1e6,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"anthropic/claude-opus-4.7",name:"Claude Opus 4.7",version:"4.7",inputPrice:5,outputPrice:25,contextWindow:1e6,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"anthropic/claude-opus-4.8",name:"Claude Opus 4.8",version:"4.8",inputPrice:5,outputPrice:25,contextWindow:1e6,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"anthropic/claude-opus-5",name:"Claude Opus 5",version:"5",inputPrice:5,outputPrice:25,contextWindow:1e6,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"anthropic/claude-fable-5.1",name:"Claude Fable 5.1",version:"5.1",inputPrice:10,outputPrice:50,contextWindow:1e6,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"anthropic/claude-fable-5.2",name:"Claude Fable 5.2",version:"5.2",inputPrice:8,outputPrice:40,contextWindow:1e6,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"anthropic/claude-opus-5.5",name:"Claude Opus 5.5",version:"5.5",inputPrice:4,outputPrice:20,contextWindow:1e6,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"anthropic/claude-sonnet-5.5",name:"Claude Sonnet 5.5",version:"5.5",inputPrice:2,outputPrice:10,contextWindow:1e6,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"google/gemini-3.1-pro",name:"Gemini 3.1 Pro",version:"3.1",inputPrice:2,outputPrice:12,contextWindow:1048576,maxOutput:65536,reasoning:!0,vision:!0,toolCalling:!0},{id:"google/gemini-3-pro-preview",name:"Gemini 3 Pro Preview",version:"3.0",inputPrice:2,outputPrice:12,contextWindow:1048576,maxOutput:65536,reasoning:!0,vision:!0,toolCalling:!0},{id:"google/gemini-4-argon",name:"Gemini 4 Argon",version:"4",inputPrice:2,outputPrice:10,contextWindow:1048576,maxOutput:65536,reasoning:!0,vision:!0,toolCalling:!0},{id:"google/gemini-4-carbon",name:"Gemini 4 Carbon",version:"4",inputPrice:2,outputPrice:10,contextWindow:1048576,maxOutput:65536,reasoning:!0,vision:!0,toolCalling:!0},{id:"google/gemini-3.8-flash",name:"Gemini 3.8 Flash",version:"3.8",inputPrice:.75,outputPrice:3.75,contextWindow:1048576,maxOutput:65536,reasoning:!0,vision:!0,toolCalling:!0},{id:"google/gemini-3.6-flash",name:"Gemini 3.6 Flash",version:"3.6",inputPrice:.75,outputPrice:3.75,contextWindow:1048576,maxOutput:65536,reasoning:!0,vision:!0,toolCalling:!0},{id:"google/gemini-3.5-flash",name:"Gemini 3.5 Flash",version:"3.5",inputPrice:1.5,outputPrice:9,contextWindow:1048576,maxOutput:65536,reasoning:!0,vision:!0,toolCalling:!0,deprecated:!0,fallbackModel:"google/gemini-3.6-flash"},{id:"google/gemini-3.5-flash-lite",name:"Gemini 3.5 Flash Lite",version:"3.5",inputPrice:.3,outputPrice:2.5,contextWindow:1048576,maxOutput:65536,reasoning:!0,toolCalling:!0},{id:"google/gemini-3-flash-preview",name:"Gemini 3 Flash Preview",version:"3.0",inputPrice:.5,outputPrice:3,contextWindow:1048576,maxOutput:65536,reasoning:!0,vision:!0},{id:"google/gemini-2.5-pro",name:"Gemini 2.5 Pro",version:"2.5",inputPrice:1.25,outputPrice:10,contextWindow:1048576,maxOutput:65536,reasoning:!0,vision:!0,toolCalling:!0},{id:"google/gemini-2.5-flash",name:"Gemini 2.5 Flash",version:"2.5",inputPrice:.3,outputPrice:2.5,contextWindow:1048576,maxOutput:65536,vision:!0,toolCalling:!0},{id:"google/gemini-2.5-flash-lite",name:"Gemini 2.5 Flash Lite",version:"2.5",inputPrice:.1,outputPrice:.4,contextWindow:1048576,maxOutput:65536,vision:!0,toolCalling:!0},{id:"google/gemini-3.1-flash-lite",name:"Gemini 3.1 Flash Lite",version:"3.1",inputPrice:.25,outputPrice:1.5,contextWindow:1048576,maxOutput:65536,toolCalling:!0},{id:"deepseek/deepseek-chat",name:"DeepSeek Chat (V4.1 Flash)",version:"4.1-flash",inputPrice:.14,outputPrice:.28,contextWindow:1048576,maxOutput:65536,toolCalling:!0},{id:"deepseek/deepseek-reasoner",name:"DeepSeek Reasoner (V4.1 Flash)",version:"4.1-flash",inputPrice:.14,outputPrice:.28,contextWindow:1048576,maxOutput:65536,reasoning:!0,toolCalling:!0},{id:"deepseek/deepseek-v4.1-flash",name:"DeepSeek V4.1 Flash",version:"4.1-flash",inputPrice:.14,outputPrice:.28,contextWindow:1048576,maxOutput:65536,toolCalling:!0},{id:"deepseek/deepseek-v4-pro",name:"DeepSeek V4 Pro",version:"4-pro",inputPrice:1.32,outputPrice:3.96,contextWindow:1048576,maxOutput:65536,reasoning:!0,agentic:!0,toolCalling:!0},{id:"moonshot/kimi-k3.1-pro",name:"Kimi K3.1 Pro",version:"k3.1-pro",inputPrice:2,outputPrice:10,contextWindow:1048576,maxOutput:65536,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"moonshot/kimi-k3",name:"Kimi K3",version:"k3",inputPrice:3,outputPrice:15,contextWindow:1048576,maxOutput:65536,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"moonshot/kimi-k2.7",name:"Kimi K2.7",version:"k2.7",inputPrice:.95,outputPrice:4,contextWindow:262144,maxOutput:65536,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"qwen/qwen3.7-max",name:"Qwen3.7 Max",version:"3.7-max",inputPrice:1.475,outputPrice:4.425,contextWindow:1e6,maxOutput:65536,reasoning:!0,agentic:!0,toolCalling:!0},{id:"qwen/qwen3.7-plus",name:"Qwen3.7 Plus",version:"3.7-plus",inputPrice:.32,outputPrice:1.28,contextWindow:1e6,maxOutput:131072,reasoning:!0,agentic:!0,toolCalling:!0},{id:"qwen/qwen3.7-flash",name:"Qwen3.7 Flash",version:"3.7-flash",inputPrice:.03,outputPrice:.13,contextWindow:1e6,maxOutput:65536,reasoning:!0,toolCalling:!0},{id:"moonshot/kimi-k2.6",name:"Kimi K2.6",version:"k2.6",inputPrice:.95,outputPrice:4,contextWindow:262144,maxOutput:65536,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"moonshot/kimi-k2.5",name:"Kimi K2.5",version:"k2.5",inputPrice:.6,outputPrice:3,contextWindow:262144,maxOutput:65536,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"nvidia/kimi-k2.5",name:"Kimi K2.5 (NVIDIA, retired)",version:"k2.5",inputPrice:.6,outputPrice:3,contextWindow:262144,maxOutput:16384,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0,deprecated:!0,fallbackModel:"moonshot/kimi-k2.5"},{id:"xai/grok-3",name:"Grok 3",version:"3",inputPrice:3,outputPrice:15,contextWindow:131072,maxOutput:16384,reasoning:!0,toolCalling:!0,deprecated:!0,fallbackModel:"xai/grok-4-1-fast-non-reasoning"},{id:"xai/grok-3-mini",name:"Grok 3 Mini",version:"3-mini",inputPrice:.3,outputPrice:.5,contextWindow:131072,maxOutput:16384,toolCalling:!0,deprecated:!0,fallbackModel:"xai/grok-4-1-fast-non-reasoning"},{id:"xai/grok-4-fast-reasoning",name:"Grok 4 Fast Reasoning",version:"4",inputPrice:.2,outputPrice:.5,contextWindow:2e6,maxOutput:16384,reasoning:!0,toolCalling:!0,deprecated:!0,fallbackModel:"xai/grok-4-1-fast-reasoning"},{id:"xai/grok-4-fast-non-reasoning",name:"Grok 4 Fast",version:"4",inputPrice:.2,outputPrice:.5,contextWindow:2e6,maxOutput:16384,toolCalling:!0,deprecated:!0,fallbackModel:"xai/grok-4-1-fast-non-reasoning"},{id:"xai/grok-4-1-fast-reasoning",name:"Grok 4.1 Fast Reasoning",version:"4.1",inputPrice:.2,outputPrice:.5,contextWindow:2e6,maxOutput:16384,reasoning:!0,toolCalling:!0},{id:"xai/grok-4-1-fast-non-reasoning",name:"Grok 4.1 Fast",version:"4.1",inputPrice:.2,outputPrice:.5,contextWindow:2e6,maxOutput:16384,toolCalling:!0},{id:"xai/grok-4-0709",name:"Grok 4 (0709)",version:"4-0709",inputPrice:3,outputPrice:15,contextWindow:256e3,maxOutput:16384,reasoning:!0,toolCalling:!0},{id:"xai/grok-2-vision",name:"Grok 2 Vision",version:"2",inputPrice:2,outputPrice:10,contextWindow:32768,maxOutput:16384,vision:!0,toolCalling:!0,deprecated:!0,fallbackModel:"xai/grok-4.3"},{id:"xai/grok-4.20-reasoning",name:"Grok 4.20 Reasoning",version:"4.20",inputPrice:2,outputPrice:6,contextWindow:2e6,maxOutput:16384,reasoning:!0,toolCalling:!0},{id:"xai/grok-4.20-non-reasoning",name:"Grok 4.20",version:"4.20",inputPrice:2,outputPrice:6,contextWindow:2e6,maxOutput:16384,toolCalling:!0},{id:"xai/grok-4.20-multi-agent",name:"Grok 4.20 Multi-Agent",version:"4.20",inputPrice:2,outputPrice:6,contextWindow:2e6,maxOutput:16384,reasoning:!0,toolCalling:!0},{id:"xai/grok-4.5",name:"Grok 4.5",version:"4.5",inputPrice:2,outputPrice:6,contextWindow:5e5,maxOutput:16384,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"xai/grok-4.7",name:"Grok 4.7",version:"4.7",inputPrice:2,outputPrice:6,contextWindow:5e5,maxOutput:16384,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"xai/grok-4.6",name:"Grok 4.6",version:"4.6",inputPrice:2,outputPrice:6,contextWindow:5e5,maxOutput:16384,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"xai/grok-4.3",name:"Grok 4.3",version:"4.3",inputPrice:1.25,outputPrice:2.5,contextWindow:1e6,maxOutput:16384,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"xai/grok-build-0.1",name:"Grok Build 0.1",version:"0.1",inputPrice:1,outputPrice:2,contextWindow:256e3,maxOutput:16384,agentic:!0,toolCalling:!0},{id:"tencent/hy3",name:"Tencent Hy3",version:"hy3",inputPrice:.132,outputPrice:.528,contextWindow:262144,maxOutput:128e3,reasoning:!0,toolCalling:!0,deprecated:!0,fallbackModel:"qwen/qwen3.7-flash"},{id:"xiaomi/mimo-v2.5-pro",name:"Xiaomi MiMo-V2.5 Pro",version:"v2.5-pro",inputPrice:.435,outputPrice:.87,contextWindow:1048576,maxOutput:131072,reasoning:!0,toolCalling:!0},{id:"minimax/minimax-m3",name:"MiniMax M3",version:"m3",inputPrice:.3,outputPrice:1.2,contextWindow:1048576,maxOutput:65536,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"minimax/minimax-m2.7",name:"MiniMax M2.7",version:"m2.7",inputPrice:.3,outputPrice:1.2,contextWindow:204800,maxOutput:16384,reasoning:!0,agentic:!0,toolCalling:!0},{id:"minimax/minimax-m2.5",name:"MiniMax M2.5",version:"m2.5",inputPrice:.3,outputPrice:1.2,contextWindow:204800,maxOutput:16384,reasoning:!0,agentic:!0,toolCalling:!0,deprecated:!0,fallbackModel:"minimax/minimax-m2.7"},{id:"free/gpt-oss-120b",name:"[Free] GPT-OSS 120B",version:"120b",inputPrice:0,outputPrice:0,contextWindow:128e3,maxOutput:16384},{id:"free/gpt-oss-20b",name:"[Free] GPT-OSS 20B",version:"20b",inputPrice:0,outputPrice:0,contextWindow:128e3,maxOutput:16384},{id:"free/deepseek-v4-flash",name:"[Free] DeepSeek V4 Flash",version:"v4-flash",inputPrice:0,outputPrice:0,contextWindow:1e6,maxOutput:16384,reasoning:!0},{id:"free/qwen3-coder-480b",name:"[Free] Qwen3 Coder 480B",version:"480b",inputPrice:0,outputPrice:0,contextWindow:131072,maxOutput:16384},{id:"free/glm-4.7",name:"[Free] GLM-4.7",version:"4.7",inputPrice:0,outputPrice:0,contextWindow:131072,maxOutput:16384,reasoning:!0},{id:"free/llama-4-maverick",name:"[Free] Llama 4 Maverick",version:"4-maverick",inputPrice:0,outputPrice:0,contextWindow:131072,maxOutput:16384,reasoning:!0},{id:"free/nemotron-3-nano-omni-30b-a3b-reasoning",name:"[Free] Nemotron 3 Nano Omni",version:"30b-a3b-omni-reasoning",inputPrice:0,outputPrice:0,contextWindow:256e3,maxOutput:16384,reasoning:!0},{id:"free/mistral-large-3-675b",name:"[Free] Mistral Large 3 675B",version:"3-675b",inputPrice:0,outputPrice:0,contextWindow:131072,maxOutput:16384,reasoning:!0},{id:"free/qwen3.5-122b-a10b",name:"[Free] Qwen3.5 122B",version:"3.5-122b",inputPrice:0,outputPrice:0,contextWindow:131072,maxOutput:16384,reasoning:!0},{id:"free/qwen3-next-80b-a3b-instruct",name:"[Free] Qwen3-Next 80B Instruct",version:"next-80b-a3b",inputPrice:0,outputPrice:0,contextWindow:262144,maxOutput:16384,reasoning:!0},{id:"free/seed-oss-36b",name:"[Free] Seed-OSS 36B",version:"oss-36b",inputPrice:0,outputPrice:0,contextWindow:131072,maxOutput:16384},{id:"free/mistral-nemotron",name:"[Free] Mistral Nemotron",version:"nemotron",inputPrice:0,outputPrice:0,contextWindow:131072,maxOutput:16384},{id:"free/step-3.7-flash",name:"[Free] StepFun Step 3.7 Flash",version:"3.7-flash",inputPrice:0,outputPrice:0,contextWindow:131072,maxOutput:16384,reasoning:!0},{id:"free/nemotron-nano-9b-v2",name:"[Free] Nemotron Nano 9B v2",version:"nano-9b-v2",inputPrice:0,outputPrice:0,contextWindow:131072,maxOutput:16384,reasoning:!0},{id:"free/nemotron-nano-12b-v2-vl",name:"[Free] Nemotron Nano 12B v2 VL",version:"nano-12b-v2-vl",inputPrice:0,outputPrice:0,contextWindow:131072,maxOutput:16384,reasoning:!0},{id:"free/nemotron-3.5-lightning",name:"[Free] Nemotron 3.5 Lightning",version:"3.5-lightning",inputPrice:0,outputPrice:0,contextWindow:1e6,maxOutput:16384,reasoning:!0},{id:"free/nemotron-3-nano-30b",name:"[Free] Nemotron 3 Nano 30B",version:"3-nano-30b",inputPrice:0,outputPrice:0,contextWindow:131072,maxOutput:16384,reasoning:!0},{id:"free/nemotron-3-ultra-550b",name:"[Free] Nemotron 3 Ultra 550B",version:"3-ultra-550b",inputPrice:0,outputPrice:0,contextWindow:1e6,maxOutput:16384,reasoning:!0},{id:"free/minimax-m3.1-flash",name:"[Free] MiniMax M3.1 Flash",version:"m3.1-flash",inputPrice:0,outputPrice:0,contextWindow:1048576,maxOutput:16384,reasoning:!0,toolCalling:!0},{id:"free/llama-3.2-11b-vision",name:"[Free] Llama 3.2 11B Vision",version:"3.2-11b-vision",inputPrice:0,outputPrice:0,contextWindow:128e3,maxOutput:16384},{id:"free/north-mini-code",name:"[Free] Cohere North Mini Code",version:"north-mini-code",inputPrice:0,outputPrice:0,contextWindow:256e3,maxOutput:16384,reasoning:!0,deprecated:!0,fallbackModel:"free/laguna-xs-2.1"},{id:"free/laguna-xs-2.1",name:"[Free] Poolside Laguna XS 2.1",version:"xs-2.1",inputPrice:0,outputPrice:0,contextWindow:131072,maxOutput:16384},{id:"free/muse-glimmer-30b",name:"[Free] Muse Glimmer 30B",version:"30b",inputPrice:0,outputPrice:0,contextWindow:131072,maxOutput:16384,reasoning:!0},{id:"free/nemotron-3.5-bolt",name:"[Free] Nemotron 3.5 Bolt",version:"3.5-bolt",inputPrice:0,outputPrice:0,contextWindow:131072,maxOutput:16384,vision:!0},{id:"free/nemotron-3-super-120b",name:"[Free] Nemotron 3 Super 120B",version:"3-super-120b",inputPrice:0,outputPrice:0,contextWindow:131072,maxOutput:16384,reasoning:!0},{id:"qwen/qwen3.8-flash",name:"Qwen3.8 Flash",version:"3.8-flash",inputPrice:.15,outputPrice:.47,contextWindow:1e6,maxOutput:131072,reasoning:!0,vision:!0,toolCalling:!0},{id:"deepseek/deepseek-v4-flash-vision-exp",name:"DeepSeek V4 Flash Vision",version:"v4-flash-vision-exp",inputPrice:.3,outputPrice:1.2,contextWindow:1048576,maxOutput:65536,reasoning:!0,vision:!0,toolCalling:!0},{id:"xiaomi/mimo-v2.5",name:"Xiaomi MiMo V2.5",version:"2.5",inputPrice:.14,outputPrice:.28,contextWindow:1048576,maxOutput:131072,reasoning:!0,vision:!0,toolCalling:!0},{id:"qwen/qwen3.8-max",name:"Qwen3.8 Max",version:"3.8-max",inputPrice:2,outputPrice:6,contextWindow:1e6,maxOutput:131072,reasoning:!0},{id:"tencent/hy4-preview",name:"Tencent Hy4 Preview",version:"hy4-preview",inputPrice:.834,outputPrice:2.501,contextWindow:1048576,maxOutput:64e3,reasoning:!0},{id:"mistral/mistral-large-4",name:"Mistral Large 4",version:"large-4",inputPrice:1.36,outputPrice:4.18,contextWindow:524288,maxOutput:262144,reasoning:!0,vision:!0,toolCalling:!0},{id:"poolside/laguna-s-2.1",name:"Poolside Laguna S 2.1",version:"s-2.1",inputPrice:.09,outputPrice:.18,contextWindow:1048576,maxOutput:131072},{id:"zai/glm-5.3",name:"GLM-5.3",version:"5.3",inputPrice:1.4,outputPrice:4.4,contextWindow:1e6,maxOutput:131072,reasoning:!0,toolCalling:!0},{id:"zai/glm-5.3-flash",name:"GLM-5.3 Flash",version:"5.3-flash",inputPrice:.15,outputPrice:.5,contextWindow:1e6,maxOutput:131072,reasoning:!0,vision:!0,toolCalling:!0},{id:"zai/glm-5.2",name:"GLM-5.2",version:"5.2",inputPrice:1.4,outputPrice:4.4,contextWindow:1e6,maxOutput:131072,reasoning:!0,toolCalling:!0},{id:"zai/glm-5.1",name:"GLM-5.1",version:"5.1",inputPrice:1.4,outputPrice:4.4,contextWindow:2e5,maxOutput:128e3,reasoning:!0,toolCalling:!0,promo:{flatPrice:.001,startDate:"2026-04-01",endDate:"2026-06-05"}},{id:"zai/glm-5",name:"GLM-5",version:"5",inputPrice:1,outputPrice:3.2,contextWindow:2e5,maxOutput:128e3,reasoning:!0,toolCalling:!0},{id:"zai/glm-5-turbo",name:"GLM-5 Turbo",version:"5-turbo",inputPrice:1.2,outputPrice:4,contextWindow:2e5,maxOutput:128e3,reasoning:!0,toolCalling:!0}];ALIAS_MODELS=Object.entries(MODEL_ALIASES).filter(([alias])=>!alias.includes("/")).map(([alias,targetId])=>{let target=BLOCKRUN_MODELS.find(m=>m.id===targetId);return target?toOpenClawModel({...target,id:alias,name:`${alias} \u2192 ${target.name}`}):null}).filter(m=>m!==null),OPENCLAW_MODELS=[...BLOCKRUN_MODELS.filter(m=>!(m.id in MODEL_ALIASES)).map(toOpenClawModel),...ALIAS_MODELS],OPENCLAW_MODEL_BY_ID=new Map(OPENCLAW_MODELS.map(m=>[m.id,m])),VISIBLE_OPENCLAW_MODELS=TOP_MODELS.flatMap(id2=>{let model=OPENCLAW_MODEL_BY_ID.get(id2);return model?[model]:[]})}});function validPercent(value){return typeof value=="number"&&Number.isFinite(value)&&value>=0?value:void 0}function platformFeePercentOf(row){if(row.billing_mode!=="paid")return 0;let pricing=row.pricing&&typeof row.pricing=="object"?row.pricing:void 0;return validPercent(pricing?.platform_fee_percent)??validPercent(row.platform_fee_percent)??0}function withPlatformFee(tokenCostUsd,platformFeePercent){let percent=validPercent(platformFeePercent)??0;return tokenCostUsd*(1+percent/100)}var init_platform_fee=__esm({"src/platform-fee.ts"(){"use strict"}});function fallbackCatalog(){return{models:BLOCKRUN_MODELS,openclaw:OPENCLAW_MODELS,visible:VISIBLE_OPENCLAW_MODELS,freeIds:new Set(BLOCKRUN_MODELS.filter(m=>m.id.startsWith("free/")).map(m=>m.id))}}function upstreamId(id2){return id2==="free/north-mini-code"?"cohere/north-mini-code":id2==="free/laguna-xs-2.1"?"poolside/laguna-xs-2.1":id2.startsWith("free/")?`nvidia/${id2.slice(5)}`:id2}function projectClawCatalog(state){let models=BLOCKRUN_MODELS.map(m=>({...m})),byUpstream=new Map(models.map(m=>[upstreamId(m.id),m])),additions=new Set,freeIds=new Set(fallbackCatalog().freeIds);for(let row of state.models){if(!row.id.includes("/")||row.id.startsWith("blockrun/")||!row.categories.includes("chat")||row.available===!1||!["paid","free","flat"].includes(row.billing_mode))continue;let old=byUpstream.get(row.id);if(old?.id.startsWith("free/")&&row.billing_mode!=="free")throw new Error("Gateway changed billing of a pinned free model");if(!old&&Object.hasOwn(MODEL_ALIASES,row.id))continue;let model=old??{id:row.id,name:row.name,inputPrice:0,outputPrice:0,contextWindow:row.context_window??32768,maxOutput:row.max_output??4096,toolCalling:!1,agentic:!1,reasoning:row.categories.includes("reasoning"),vision:row.categories.includes("vision")};if(row.billing_mode==="flat"&&(typeof row.pricing.flat!="number"||!Number.isFinite(row.pricing.flat)||row.pricing.flat<0))throw new Error("Invalid flat model price");model.name=row.name,model.inputPrice=row.billing_mode==="paid"?row.pricing.input:0,model.outputPrice=row.billing_mode==="paid"?row.pricing.output:0,delete model.promo,delete model.flatPrice,delete model.platformFeePercent,row.billing_mode==="flat"&&(model.flatPrice=row.pricing.flat);let feePercent=platformFeePercentOf(row);feePercent>0&&(model.platformFeePercent=feePercent),row.context_window&&(model.contextWindow=row.context_window),row.max_output&&(model.maxOutput=row.max_output),old||(models.push(model),additions.add(model.id))}let byId=new Map(models.map(m=>[m.id,m])),openclaw=models.filter(m=>!Object.hasOwn(MODEL_ALIASES,m.id)).map(toOpenClawModel);for(let[alias,target]of Object.entries(MODEL_ALIASES)){let model=byId.get(target);!alias.includes("/")&&model&&openclaw.push(toOpenClawModel({...model,id:alias,name:`${alias} \u2192 ${model.name}`}))}let definitions=new Map(openclaw.map(m=>[m.id,m])),visibleIds=new Set(VISIBLE_OPENCLAW_MODELS.map(m=>m.id));for(let group of state.groups)for(let row of group.models)additions.has(row.id)&&visibleIds.add(row.id);let visible=[...visibleIds].flatMap(id2=>definitions.has(id2)?[definitions.get(id2)]:[]);return{models,openclaw,visible,freeIds}}function createClawCatalog(options){let gatewayUrl=`${options.apiBase.replace(/\/$/,"")}/v1/models?format=json`,fetcher=options.fetch??globalThis.fetch,gatewayFetch=options.apiKey?createApiKeyFetch(options.apiKey,fetcher,options.apiBase):fetcher,client=createCatalogClient({network:options.network,gatewayUrl,catalogUrl:options.catalogUrl??process.env.BLOCKRUN_MODEL_CATALOG_URL,timeoutMs:options.timeoutMs??4e3,ttlMs:options.ttlMs??24e4,fetch:(url3,init2)=>String(url3)===gatewayUrl?gatewayFetch(url3,{...init2,redirect:"error"}):fetcher(url3,{...init2,redirect:"error"})}),view=fallbackCatalog(),inflight,lastReported,report=message=>{message!==lastReported&&(lastReported=message,console.warn(`[ClawRouter] Model catalog refresh failed, keeping the last good view: ${message}`))};return{current:()=>view,refresh(){return inflight||(inflight=(async()=>{try{let state=await client.refresh();if(state.lastError&&report(state.lastError),state.source==="live"){let next=projectClawCatalog(state);fingerprint(next)!==fingerprint(view)&&(view=next),state.lastError||(lastReported=void 0)}}catch(err){report(err instanceof Error?err.message:String(err))}return view})().finally(()=>{inflight=void 0}),inflight)}}}function fingerprint(view){return JSON.stringify([view.models.map(m=>[m.id,m.inputPrice,m.outputPrice,m.flatPrice??null,m.platformFeePercent??0,m.contextWindow,m.maxOutput]),view.visible.map(m=>m.id),[...view.freeIds].sort()])}var init_model_catalog=__esm({"src/model-catalog.ts"(){"use strict";init_runtime();init_api_key();init_models();init_platform_fee()}});var version,init_version=__esm({"node_modules/abitype/dist/esm/version.js"(){"use strict";version="1.2.3"}});var BaseError,init_errors=__esm({"node_modules/abitype/dist/esm/errors.js"(){"use strict";init_version();BaseError=class _BaseError extends Error{constructor(shortMessage,args={}){let details=args.cause instanceof _BaseError?args.cause.details:args.cause?.message?args.cause.message:args.details,docsPath9=args.cause instanceof _BaseError&&args.cause.docsPath||args.docsPath,message=[shortMessage||"An error occurred.","",...args.metaMessages?[...args.metaMessages,""]:[],...docsPath9?[`Docs: https://abitype.dev${docsPath9}`]:[],...details?[`Details: ${details}`]:[],`Version: abitype@${version}`].join(`
|
|
4
|
+
`,{mode:384}),CORE_API_KEY_FILE}async function clearApiKey(){let removed=[];for(let path8 of[CORE_API_KEY_FILE,API_KEY_FILE])await readOptional(path8)!==void 0&&(await rm(path8,{force:!0}),removed.push(path8));return{removed,envStillSet:!!process.env.BLOCKRUN_API_KEY?.trim()}}async function fetchCreditBalance(apiKey,timeoutMs=5e3){try{let controller=new AbortController,timer2=setTimeout(()=>controller.abort(),timeoutMs),res=await fetch(`${BLOCKRUN_API_KEY_API}/v1/credits`,{headers:{authorization:`Bearer ${apiKey}`},signal:controller.signal});if(clearTimeout(timer2),!res.ok)return;let b=await res.json(),num2=v=>typeof v=="number"?v:null;return{accountId:typeof b.account_id=="string"?b.account_id:void 0,billingMode:typeof b.billing_mode=="string"?b.billing_mode:void 0,currency:typeof b.currency=="string"?b.currency:"USD",grantedUsd:num2(b.granted_usd),spentUsd:num2(b.spent_usd),remainingUsd:num2(b.remaining_usd),blocked:b.blocked===!0,blockedReason:typeof b.blocked_reason=="string"?b.blocked_reason:void 0}}catch{return}}function formatCreditBalance(b){let money=v=>v===null?void 0:`$${v.toFixed(v<.01&&v>0?6:2)}`,remaining=money(b.remainingUsd),spent=money(b.spentUsd);if(remaining)return`${remaining} remaining${spent?` (spent ${spent})`:""}`;let mode2=b.billingMode==="ungated"?"no prepaid limit":b.billingMode??"unknown";return`${spent?`spent ${spent}`:"unknown"} \u2014 ${mode2}`}async function fetchUsagePage(apiKey,opts={}){let params=new URLSearchParams;opts.from&¶ms.set("from",opts.from),opts.to&¶ms.set("to",opts.to),opts.limit&¶ms.set("limit",String(opts.limit)),opts.cursor&¶ms.set("cursor",opts.cursor);let query=params.toString();try{let res=await fetch(`${BLOCKRUN_API_KEY_API}/v1/usage${query?`?${query}`:""}`,{headers:{authorization:`Bearer ${apiKey}`},signal:AbortSignal.timeout(3e4)});if(!res.ok)return;let body=await res.json();return{rows:(body.data??[]).map(r2=>({requestId:String(r2.request_id??""),timestamp:String(r2.timestamp??""),endpoint:String(r2.endpoint??""),model:typeof r2.model=="string"?r2.model:null,kind:String(r2.kind??""),inputTokens:typeof r2.input_tokens=="number"?r2.input_tokens:0,outputTokens:typeof r2.output_tokens=="number"?r2.output_tokens:0,costUsd:typeof r2.cost_usd=="number"?r2.cost_usd:null,costState:String(r2.cost_state??""),status:typeof r2.status=="number"?r2.status:0})),nextCursor:body.next_cursor??null,unavailableDays:body.unavailable_days??[]}}catch{return}}function normalizeApiKeyBase(raw){let base4=raw.replace(/\/+$/,"").replace(/\/v1$/,""),url3=new URL(base4);if(url3.username||url3.password||url3.search||url3.hash||url3.protocol!=="https:"&&!(url3.protocol==="http:"&&["localhost","127.0.0.1","[::1]"].includes(url3.hostname)))throw new Error("BlockRun account API URL requires HTTPS (except localhost) and no credentials, query or fragment.");return base4}function createApiKeyFetch(apiKey,baseFetch=fetch,apiBase=BLOCKRUN_API_KEY_API){let base4=new URL(normalizeApiKeyBase(apiBase));return async(input2,init2)=>{let request2=input2 instanceof Request?input2:void 0,url3=new URL(request2?.url??String(input2),`${base4}/`);if(url3.origin!==base4.origin||url3.username||url3.password)throw new Error("Refusing to forward a BlockRun account key to another origin.");base4.pathname==="/"&&url3.pathname.startsWith("/api/v1/")&&(url3.pathname=url3.pathname.slice(4));let headers=new Headers(init2?.headers??request2?.headers);for(let name of[...headers.keys()])(/payment/i.test(name)||name.toLowerCase()==="x-api-key")&&headers.delete(name);headers.set("authorization",`Bearer ${apiKey}`);let response=await baseFetch(request2?new Request(url3,request2):url3.href,{...init2,headers,redirect:"error"});return response.ok?response:explainApiKeyFailure(response)}}async function pollApiKeyJob(response,payFetch,apiBase,signal,intervalMs=2e3){if(response.status!==202)return response;let initial=await response.clone().json();if(!initial.poll_url)throw new Error("Async account response missing poll_url");let pollUrl=new URL(initial.poll_url,`${normalizeApiKeyBase(apiBase)}/`).href,abort=AbortSignal.any([signal,AbortSignal.timeout(15*6e4)]);for(;!abort.aborted;){let polled=await payFetch(pollUrl,{signal:abort});if([502,503,504,522,524].includes(polled.status))await polled.body?.cancel();else{if(!polled.ok)return polled;let data=await polled.clone().json();if(data.status==="completed"||data.status==="failed")return polled;await polled.body?.cancel()}await new Promise(resolve4=>setTimeout(resolve4,intervalMs))}throw new Error("Async account job did not complete before the client aborted or timed out.")}async function explainApiKeyFailure(response){let hint=HINTS[response.status];if(!hint||!(response.headers.get("content-type")??"").includes("json"))return response;let parsed;try{parsed=await response.clone().json()}catch{return response}if(!parsed?.error||typeof parsed.error.message!="string"||response.status===404&&!/unsupported endpoint/i.test(parsed.error.message))return response;parsed.error.message=`${parsed.error.message} ${hint}`;let headers=new Headers(response.headers);return headers.delete("content-length"),new Response(JSON.stringify(parsed),{status:response.status,statusText:response.statusText,headers})}var API_KEY_FILE,CORE_API_KEY_FILE,PORTAL_URL,PORTAL_KEYS_URL,PORTAL_CREDITS_URL,BLOCKRUN_API_KEY_API,HINTS,init_api_key=__esm({"src/api-key.ts"(){"use strict";init_fs_read();API_KEY_FILE=join(homedir(),".openclaw","blockrun","api-key"),CORE_API_KEY_FILE=join(homedir(),".blockrun",".api-key"),PORTAL_URL="https://user.blockrun.ai",PORTAL_KEYS_URL=`${PORTAL_URL}/dashboard/keys`,PORTAL_CREDITS_URL=`${PORTAL_URL}/dashboard/credits`,BLOCKRUN_API_KEY_API=process.env.BLOCKRUN_API_BASE_URL?.replace(/\/+$/,"").replace(/\/v1$/,"")||"https://api.blockrun.ai";HINTS={401:`Check BLOCKRUN_API_KEY, or mint a new key at ${PORTAL_KEYS_URL}.`,402:`Top up your BlockRun credit at ${PORTAL_CREDITS_URL}.`,404:'api.blockrun.ai does not serve this endpoint. Chat, Anthropic-shaped messages, images, speech, video and the partner APIs (Exa, prediction markets, phone lookup) all work on an API key. The wallet-only exceptions are the routes that bind a lease or a position to a payer address \u2014 buying/renewing/releasing phone numbers, and Polymarket trading \u2014 which need a wallet to own the thing being bought. For those, unset BLOCKRUN_API_KEY and run "clawrouter logout".'}}});var top_models_default,init_top_models=__esm({"src/top-models.json"(){top_models_default=["auto","premium","eco","free","anthropic/claude-fable-5.1","anthropic/claude-fable-5","anthropic/claude-opus-5.5","anthropic/claude-opus-5","anthropic/claude-opus-4.8","anthropic/claude-opus-4.7","anthropic/claude-sonnet-5.5","anthropic/claude-sonnet-5","anthropic/claude-sonnet-4.6","anthropic/claude-haiku-4.5","openai/gpt-6-astra","openai/gpt-6-sol","openai/gpt-6.1-sol","openai/gpt-6-luna","openai/gpt-5.6-terra","openai/gpt-5.6-sol","openai/gpt-5.6-luna","openai/gpt-5.6-terra-pro","openai/gpt-5.6-sol-pro","openai/gpt-5.6-luna-pro","openai/gpt-5.5","openai/gpt-5.5-pro","openai/gpt-5.4-pro","openai/gpt-5.4","openai/gpt-5.4-mini","openai/gpt-5.4-nano","openai/gpt-5.1","openai/gpt-5.3-codex","google/gemini-4-argon","google/gemini-3.1-pro","google/gemini-3.8-flash","google/gemini-3.6-flash","google/gemini-3.5-flash-lite","google/gemini-3.1-flash-lite","google/gemini-3-flash-preview","xai/grok-4.7","xai/grok-4.6","xai/grok-4.5","xai/grok-4.3","xai/grok-build-0.1","zai/glm-5.3","zai/glm-5.3-flash","zai/glm-5.2","zai/glm-5.1","zai/glm-5-turbo","zai/glm-5","xiaomi/mimo-v2.5","xiaomi/mimo-v2.5-pro","tencent/hy4-preview","mistral/mistral-large-4","poolside/laguna-s-2.1","minimax/minimax-m3","minimax/minimax-m2.7","moonshot/kimi-k3.1-pro","qwen/qwen3.7-max","qwen/qwen3.8-max","qwen/qwen3.8-flash","deepseek/deepseek-v4-flash-vision-exp","deepseek/deepseek-v4-pro","deepseek/deepseek-v4.1-flash","deepseek/deepseek-chat","deepseek/deepseek-reasoner","free/nemotron-3.5-lightning","free/laguna-xs-2.1","free/nemotron-3-nano-omni-30b-a3b-reasoning","free/nemotron-3-ultra-550b","free/nemotron-3.5-bolt","free/nemotron-3-super-120b","free/muse-glimmer-30b"]}});function loadTopModels(){let parsed=top_models_default;if(!Array.isArray(parsed)||parsed.some(value=>typeof value!="string"||!value.trim()))throw new Error("top-models.json must be a JSON array of non-empty strings");return[...parsed]}var TOP_MODELS,init_top_models2=__esm({"src/top-models.ts"(){"use strict";init_top_models();TOP_MODELS=Object.freeze(loadTopModels())}});function resolveModelAlias(model){let normalized=model.trim().toLowerCase(),resolved=MODEL_ALIASES[normalized];if(resolved)return resolved;if(normalized.startsWith("blockrun/")){let withoutPrefix=normalized.slice(9),resolvedWithoutPrefix=MODEL_ALIASES[withoutPrefix];return resolvedWithoutPrefix||withoutPrefix}if(normalized.startsWith("openai/")){let withoutPrefix=normalized.slice(7),resolvedWithoutPrefix=MODEL_ALIASES[withoutPrefix];if(resolvedWithoutPrefix)return resolvedWithoutPrefix;if(BLOCKRUN_MODELS.some(m=>m.id===withoutPrefix))return withoutPrefix}if(normalized.startsWith("openai-codex/")){let withoutPrefix=normalized.slice(13),resolvedWithoutPrefix=MODEL_ALIASES[withoutPrefix];if(resolvedWithoutPrefix)return resolvedWithoutPrefix;if(BLOCKRUN_MODELS.some(m=>m.id===withoutPrefix))return withoutPrefix}return model}function getActivePromoPrice(model,now2=new Date){if(model.flatPrice!==void 0)return model.flatPrice;if(!model.promo)return;let start=new Date(model.promo.startDate),end=new Date(model.promo.endDate);if(now2>=start&&now2<end)return model.promo.flatPrice}function toOpenClawModel(m){return{id:m.id,name:m.name,api:"openai-completions",reasoning:m.reasoning??!1,input:m.vision?["text","image"]:["text"],cost:{input:m.inputPrice,output:m.outputPrice,cacheRead:0,cacheWrite:0},contextWindow:m.contextWindow,maxTokens:m.maxOutput}}function buildProviderModels(baseUrl){return{baseUrl:`${baseUrl}/v1`,api:"openai-completions",models:VISIBLE_OPENCLAW_MODELS}}function isAgenticModel(modelId){return BLOCKRUN_MODELS.find(m=>m.id===modelId||m.id===modelId.replace("blockrun/",""))?.agentic??!1}function getAgenticModels(){return BLOCKRUN_MODELS.filter(m=>m.agentic).map(m=>m.id)}function getModelContextWindow(modelId){let normalized=modelId.replace("blockrun/","");return BLOCKRUN_MODELS.find(m=>m.id===normalized)?.contextWindow}function isReasoningModel(modelId){let normalized=modelId.replace("blockrun/","");return BLOCKRUN_MODELS.find(m=>m.id===normalized)?.reasoning??!1}var MODEL_ALIASES,BLOCKRUN_MODELS,ALIAS_MODELS,OPENCLAW_MODELS,OPENCLAW_MODEL_BY_ID,VISIBLE_OPENCLAW_MODELS,init_models=__esm({"src/models.ts"(){"use strict";init_top_models2();MODEL_ALIASES={claude:"anthropic/claude-sonnet-4.6","br-sonnet":"anthropic/claude-sonnet-4.6",sonnet:"anthropic/claude-sonnet-4.6","sonnet-4":"anthropic/claude-sonnet-4.6","sonnet-4.6":"anthropic/claude-sonnet-4.6","sonnet-4-6":"anthropic/claude-sonnet-4.6","sonnet-5":"anthropic/claude-sonnet-5","sonnet-5.0":"anthropic/claude-sonnet-5","sonnet-5-0":"anthropic/claude-sonnet-5","sonnet-5.5":"anthropic/claude-sonnet-5.5","sonnet-5-5":"anthropic/claude-sonnet-5.5","anthropic/claude-sonnet-5-5":"anthropic/claude-sonnet-5.5","sonnet-4.5":"anthropic/claude-sonnet-4.5","sonnet-4-5":"anthropic/claude-sonnet-4.5","anthropic/claude-sonnet-4-5":"anthropic/claude-sonnet-4.5",fable:"anthropic/claude-fable-5","fable-5":"anthropic/claude-fable-5","fable-5.0":"anthropic/claude-fable-5","fable-5.1":"anthropic/claude-fable-5.1","fable-5-1":"anthropic/claude-fable-5.1","fable-5.2":"anthropic/claude-fable-5.2","fable-5-2":"anthropic/claude-fable-5.2","anthropic/claude-fable-5-1":"anthropic/claude-fable-5.1",opus:"anthropic/claude-opus-5","opus-5":"anthropic/claude-opus-5","opus-5.0":"anthropic/claude-opus-5","opus-5-0":"anthropic/claude-opus-5","opus-5.5":"anthropic/claude-opus-5.5","opus-5-5":"anthropic/claude-opus-5.5","anthropic/claude-opus-5-5":"anthropic/claude-opus-5.5","opus-4":"anthropic/claude-opus-4.8","opus-4.8":"anthropic/claude-opus-4.8","opus-4-8":"anthropic/claude-opus-4.8","opus-4.7":"anthropic/claude-opus-4.7","opus-4-7":"anthropic/claude-opus-4.7","opus-4.6":"anthropic/claude-opus-4.6","opus-4-6":"anthropic/claude-opus-4.6",haiku:"anthropic/claude-haiku-4.5","anthropic/sonnet":"anthropic/claude-sonnet-4.6","anthropic/fable":"anthropic/claude-fable-5","anthropic/claude-fable-5.0":"anthropic/claude-fable-5","anthropic/opus":"anthropic/claude-opus-5","anthropic/claude-opus-5.0":"anthropic/claude-opus-5","anthropic/claude-opus-5-0":"anthropic/claude-opus-5","anthropic/haiku":"anthropic/claude-haiku-4.5","anthropic/claude":"anthropic/claude-sonnet-4.6","anthropic/claude-sonnet-4":"anthropic/claude-sonnet-4.6","anthropic/claude-sonnet-4-6":"anthropic/claude-sonnet-4.6","anthropic/claude-opus-4":"anthropic/claude-opus-4.8","anthropic/claude-opus-4-8":"anthropic/claude-opus-4.8","anthropic/claude-opus-4-7":"anthropic/claude-opus-4.7","anthropic/claude-opus-4-6":"anthropic/claude-opus-4.6","anthropic/claude-opus-4-5":"anthropic/claude-opus-4.5","anthropic/claude-haiku-4":"anthropic/claude-haiku-4.5","anthropic/claude-haiku-4-5":"anthropic/claude-haiku-4.5",gpt:"openai/gpt-4o",gpt4:"openai/gpt-4o",gpt5:"openai/gpt-5.6-terra","gpt-5.6":"openai/gpt-5.6-terra","openai/gpt-5.6":"openai/gpt-5.6-terra","gpt-5.6-sol":"openai/gpt-5.6-sol","gpt-5.6-terra":"openai/gpt-5.6-terra","gpt-5.6-luna":"openai/gpt-5.6-luna","gpt-5.6-sol-pro":"openai/gpt-5.6-sol-pro","gpt-5.6-terra-pro":"openai/gpt-5.6-terra-pro","gpt-5.6-luna-pro":"openai/gpt-5.6-luna-pro","sol-pro":"openai/gpt-5.6-sol-pro","terra-pro":"openai/gpt-5.6-terra-pro","luna-pro":"openai/gpt-5.6-luna-pro","gpt-6-astra":"openai/gpt-6-astra","gpt-6-sol":"openai/gpt-6-sol","gpt-6-luna":"openai/gpt-6-luna","gpt-6.1-sol":"openai/gpt-6.1-sol","gpt-6-1-sol":"openai/gpt-6.1-sol","gpt-5.5":"openai/gpt-5.5","gpt-5.5-pro":"openai/gpt-5.5-pro","chat-latest":"openai/chat-latest",chatgpt:"openai/chat-latest","gpt-5.4":"openai/gpt-5.4","gpt-5.1":"openai/gpt-5.1","gpt-5.4-pro":"openai/gpt-5.4-pro","gpt-5.4-nano":"openai/gpt-5.4-nano",nano:"openai/gpt-5.4-nano","gpt-5-nano":"openai/gpt-5-nano",codex:"openai/gpt-5.3-codex",mini:"openai/gpt-4o-mini",o1:"openai/gpt-5.4-mini","openai/o1-mini":"openai/gpt-5.4-mini","o1-mini":"openai/gpt-5.4-mini",o3:"openai/gpt-5.4-mini","openai-codex/gpt-5.4-mini":"openai/gpt-5.4-mini","gpt-5.4-mini":"openai/gpt-5.4-mini",deepseek:"deepseek/deepseek-v4.1-flash","deepseek-chat":"deepseek/deepseek-chat",reasoner:"deepseek/deepseek-reasoner","deepseek-v4.1-flash":"deepseek/deepseek-v4.1-flash","deepseek-v4-1-flash":"deepseek/deepseek-v4.1-flash","v4.1-flash":"deepseek/deepseek-v4.1-flash",kimi:"moonshot/kimi-k2.7",moonshot:"moonshot/kimi-k2.7","kimi-k3":"moonshot/kimi-k3","kimi-k3.1":"moonshot/kimi-k3.1-pro","kimi-k3.1-pro":"moonshot/kimi-k3.1-pro","kimi-k2":"moonshot/kimi-k2.7","kimi-k2.7":"moonshot/kimi-k2.7","kimi-k2.6":"moonshot/kimi-k2.6","kimi-k2.5":"moonshot/kimi-k2.5","nvidia/kimi-k2.5":"moonshot/kimi-k2.5","qwen3.7-max":"qwen/qwen3.7-max","qwen3.8-max":"qwen/qwen3.8-max","qwen-3.8-max":"qwen/qwen3.8-max","qwen3-8-max":"qwen/qwen3.8-max","qwen3.8-flash":"qwen/qwen3.8-flash","qwen3-8-flash":"qwen/qwen3.8-flash","qwen-vision":"qwen/qwen3.8-flash","deepseek-vision":"deepseek/deepseek-v4-flash-vision-exp","v4-flash-vision":"deepseek/deepseek-v4-flash-vision-exp","mimo-vision":"xiaomi/mimo-v2.5","qwen-3.7-max":"qwen/qwen3.7-max","qwen3-7-max":"qwen/qwen3.7-max","qwen3.7-plus":"qwen/qwen3.7-plus","qwen-3.7-plus":"qwen/qwen3.7-plus","qwen3.7-flash":"qwen/qwen3.7-flash","qwen-3.7-flash":"qwen/qwen3.7-flash",hy3:"tencent/hy3",tencent:"tencent/hy3",hunyuan:"tencent/hy3",hy4:"tencent/hy4-preview","hy4-preview":"tencent/hy4-preview",mimo:"xiaomi/mimo-v2.5-pro","mimo-v2.5-pro":"xiaomi/mimo-v2.5-pro","mimo-v2.5":"xiaomi/mimo-v2.5",xiaomi:"xiaomi/mimo-v2.5-pro","google/gemini-3-pro-preview":"google/gemini-3.1-pro","gemini-3-pro-preview":"google/gemini-3.1-pro","gemini-pro":"google/gemini-3.1-pro","gemini-3-pro":"google/gemini-3.1-pro","gemini-3.1-pro":"google/gemini-3.1-pro",gemini:"google/gemini-3.8-flash",flash:"google/gemini-3.5-flash-lite","gemini-3.1-pro-preview":"google/gemini-3.1-pro","google/gemini-3.1-pro-preview":"google/gemini-3.1-pro","gemini-3.6-flash":"google/gemini-3.6-flash","gemini-3.6":"google/gemini-3.6-flash","gemini-3.5-flash":"google/gemini-3.6-flash","gemini-3.5-flash-lite":"google/gemini-3.5-flash-lite","gemini-3.1-flash-lite":"google/gemini-3.1-flash-lite","gemini-2.5-flash-lite":"google/gemini-2.5-flash-lite",grok:"xai/grok-4.5","grok-4.5":"xai/grok-4.5","grok-4-5":"xai/grok-4.5","grok-4.7":"xai/grok-4.7","grok-4-7":"xai/grok-4.7","grok-4.6":"xai/grok-4.6","grok-4-6":"xai/grok-4.6","grok-4.3":"xai/grok-4.3","grok-fast":"xai/grok-4-1-fast-reasoning","grok-build":"xai/grok-build-0.1","grok-code":"xai/grok-build-0.1","grok-code-fast-1":"deepseek/deepseek-chat","xai/grok-code-fast-1":"deepseek/deepseek-chat","xai/grok-3-fast":"xai/grok-4-1-fast-reasoning",nvidia:"free/nemotron-3.5-lightning","gpt-120b":"free/gpt-oss-120b","gpt-20b":"free/gpt-oss-20b","nvidia/gpt-oss-120b":"free/gpt-oss-120b","nvidia/gpt-oss-20b":"free/gpt-oss-20b","nvidia/deepseek-v3.2":"free/nemotron-3.5-lightning","free/deepseek-v3.2":"free/nemotron-3.5-lightning","nvidia/deepseek-v4-pro":"free/nemotron-3.5-lightning","free/deepseek-v4-pro":"free/nemotron-3.5-lightning","nvidia/deepseek-v4-flash":"free/nemotron-3.5-lightning","nvidia/nemotron-3-nano-omni-30b-a3b-reasoning":"free/nemotron-3-nano-omni-30b-a3b-reasoning","nvidia/qwen3-coder-480b":"free/qwen3-coder-480b","qwen/qwen3-coder-480b-a35b-instruct":"free/qwen3-coder-480b","nvidia/glm-4.7":"free/glm-4.7","nvidia/llama-4-maverick":"free/llama-4-maverick","nvidia/qwen3-next-80b-a3b-thinking":"free/qwen3-next-80b-a3b-instruct","nvidia/qwen3-next-80b-a3b-instruct":"free/qwen3-next-80b-a3b-instruct","nvidia/seed-oss-36b":"free/seed-oss-36b","nvidia/mistral-nemotron":"free/mistral-nemotron","nvidia/step-3.7-flash":"free/step-3.7-flash","nvidia/nemotron-nano-9b-v2":"free/nemotron-nano-9b-v2","nvidia/nemotron-nano-12b-v2-vl":"free/nemotron-nano-12b-v2-vl","nvidia/nemotron-ultra-253b":"free/nemotron-3.5-lightning","nvidia/mistral-large-3-675b":"free/mistral-large-3-675b","nvidia/qwen3.5-122b-a10b":"free/qwen3.5-122b-a10b","nvidia/devstral-2-123b":"free/nemotron-3.5-lightning","free/nemotron-ultra-253b":"free/nemotron-3.5-lightning","free/devstral-2-123b":"free/nemotron-3.5-lightning","mistral-large":"free/mistral-large-3-675b","mistral-large-3-675b":"free/mistral-large-3-675b","qwen3.5-122b":"free/qwen3.5-122b-a10b","mistral-large-4":"mistral/mistral-large-4","qwen3-122b":"free/qwen3.5-122b-a10b","deepseek-free":"free/nemotron-3.5-lightning","deepseek-v4-pro":"free/nemotron-3.5-lightning","deepseek-v4-flash":"free/nemotron-3.5-lightning","v4-pro":"free/nemotron-3.5-lightning","v4-flash":"free/nemotron-3.5-lightning","mistral-free":"free/nemotron-3.5-lightning","glm-free":"free/nemotron-3.5-lightning","llama-free":"free/muse-glimmer-30b","qwen-coder":"free/nemotron-3.5-lightning","qwen-coder-free":"free/nemotron-3.5-lightning","qwen-thinking":"free/nemotron-3.5-lightning","qwen3-next":"free/qwen3-next-80b-a3b-instruct","qwen3-next-80b":"free/qwen3-next-80b-a3b-instruct","mistral-small":"free/nemotron-3.5-lightning","seed-oss":"free/seed-oss-36b","seed-oss-36b":"free/seed-oss-36b","coder-free":"free/laguna-xs-2.1","mistral-nemotron":"free/mistral-nemotron","step-flash":"free/step-3.7-flash","step-3.7-flash":"free/step-3.7-flash","nemotron-nano-9b":"free/nemotron-3-nano-omni-30b-a3b-reasoning","nemotron-nano":"free/nemotron-3-nano-omni-30b-a3b-reasoning","nemotron-nano-vl":"free/nemotron-3-nano-omni-30b-a3b-reasoning","nano-vl":"free/nemotron-3-nano-omni-30b-a3b-reasoning","nemotron-omni":"free/nemotron-3-nano-omni-30b-a3b-reasoning","nano-omni":"free/nemotron-3-nano-omni-30b-a3b-reasoning","vision-free":"free/nemotron-3.5-bolt",nemotron:"free/nemotron-3.5-lightning","nemotron-ultra":"free/nemotron-3.5-lightning","nemotron-253b":"free/nemotron-3.5-lightning","nemotron-super":"free/nemotron-3-super-120b","nemotron-49b":"free/nemotron-3.5-lightning","nemotron-120b":"free/nemotron-3.5-lightning",devstral:"free/nemotron-3.5-lightning","devstral-2":"free/nemotron-3.5-lightning",maverick:"free/llama-4-maverick","nvidia/nemotron-3.5-lightning":"free/nemotron-3.5-lightning","nvidia/nemotron-3-nano-30b":"free/nemotron-3-nano-omni-30b-a3b-reasoning","nvidia/nemotron-3-ultra-550b":"free/nemotron-3-ultra-550b","nvidia/minimax-m3.1-flash":"free/minimax-m3.1-flash","nvidia/llama-3.2-11b-vision":"free/llama-3.2-11b-vision","cohere/north-mini-code":"free/north-mini-code","poolside/laguna-xs-2.1":"free/laguna-xs-2.1",lightning:"free/nemotron-3.5-lightning","nemotron-lightning":"free/nemotron-3.5-lightning","nemotron-3.5-lightning":"free/nemotron-3.5-lightning","nano-30b":"free/nemotron-3-nano-omni-30b-a3b-reasoning","nemotron-nano-30b":"free/nemotron-3-nano-omni-30b-a3b-reasoning","ultra-550b":"free/nemotron-3-ultra-550b","nemotron-ultra-550b":"free/nemotron-3-ultra-550b","minimax-m3.1-flash":"free/minimax-m3.1-flash","llama-vision":"free/llama-3.2-11b-vision","llama-3.2-vision":"free/llama-3.2-11b-vision","north-mini":"free/laguna-xs-2.1","north-mini-code":"free/laguna-xs-2.1",laguna:"free/laguna-xs-2.1","laguna-xs":"free/laguna-xs-2.1","laguna-s":"poolside/laguna-s-2.1","laguna-s-2.1":"poolside/laguna-s-2.1","nvidia/muse-glimmer-30b":"free/muse-glimmer-30b","nvidia/nemotron-3.5-bolt":"free/nemotron-3.5-bolt","nemotron-3.5-bolt":"free/nemotron-3.5-bolt",bolt:"free/nemotron-3.5-bolt","nvidia/nemotron-3-super-120b":"free/nemotron-3-super-120b","nemotron-3-super-120b":"free/nemotron-3-super-120b","super-120b":"free/nemotron-3-super-120b",muse:"free/muse-glimmer-30b","muse-glimmer":"free/muse-glimmer-30b","muse-glimmer-30b":"free/muse-glimmer-30b",free:"free/nemotron-3.5-lightning",minimax:"minimax/minimax-m3","minimax-m3":"minimax/minimax-m3","minimax-m2.7":"minimax/minimax-m2.7","minimax-m2.5":"minimax/minimax-m2.5",glm:"zai/glm-5.3","glm-5.3":"zai/glm-5.3","glm-5-3":"zai/glm-5.3","glm-5.3-flash":"zai/glm-5.3-flash","glm-5-3-flash":"zai/glm-5.3-flash","glm-flash":"zai/glm-5.3-flash","glm-5.2":"zai/glm-5.2","glm-5":"zai/glm-5","glm-5.1":"zai/glm-5.1","glm-5-turbo":"zai/glm-5-turbo","auto-router":"auto",router:"auto",dalle:"openai/gpt-image-2","dall-e":"openai/gpt-image-2","gpt-image":"openai/gpt-image-1","gpt-image-2":"openai/gpt-image-2","nano-banana":"google/nano-banana",banana:"google/nano-banana","banana-pro":"google/nano-banana-pro","nano-banana-pro":"google/nano-banana-pro","nano-banana-2":"google/nano-banana-2","banana-2":"google/nano-banana-2",seedream:"bytedance/seedream-5-pro","grok-imagine":"xai/grok-imagine-image","grok-imagine-pro":"xai/grok-imagine-image-pro",cogview:"zai/cogview-4","grok-video":"xai/grok-imagine-video","grok-video-1.5":"xai/grok-imagine-video-1.5","grok-video-1-5":"xai/grok-imagine-video-1.5",seedance:"bytedance/seedance-1.5-pro","seedance-1.5":"bytedance/seedance-1.5-pro","seedance-2-fast":"bytedance/seedance-2.0-fast","seedance-2":"bytedance/seedance-2.0","seedance-2.5":"bytedance/seedance-2.5","seedance-2-5":"bytedance/seedance-2.5","seedance-2-mini":"bytedance/seedance-2.0-mini","seedance-2.0-mini":"bytedance/seedance-2.0-mini","seedance-mini":"bytedance/seedance-2.0-mini"};BLOCKRUN_MODELS=[{id:"auto",name:"Auto (Smart Router - Balanced)",inputPrice:0,outputPrice:0,contextWindow:105e4,maxOutput:128e3},{id:"free",name:"Free \u2192 Nemotron 3.5 Lightning",inputPrice:0,outputPrice:0,contextWindow:1e6,maxOutput:16384,reasoning:!0},{id:"eco",name:"Eco (Smart Router - Cost Optimized)",inputPrice:0,outputPrice:0,contextWindow:105e4,maxOutput:128e3},{id:"premium",name:"Premium (Smart Router - Best Quality)",inputPrice:0,outputPrice:0,contextWindow:2e6,maxOutput:2e5},{id:"openai/gpt-5.2",name:"GPT-5.2",version:"5.2",inputPrice:1.75,outputPrice:14,contextWindow:4e5,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"openai/gpt-5-mini",name:"GPT-5 Mini",version:"5.0",inputPrice:.25,outputPrice:2,contextWindow:2e5,maxOutput:128e3,toolCalling:!0,deprecated:!0,fallbackModel:"openai/gpt-5.6-luna"},{id:"openai/gpt-5-nano",name:"GPT-5 Nano",version:"5.0",inputPrice:.05,outputPrice:.4,contextWindow:128e3,maxOutput:128e3,toolCalling:!0,deprecated:!0,fallbackModel:"openai/gpt-5.4-nano"},{id:"openai/gpt-5.2-pro",name:"GPT-5.2 Pro",version:"5.2",inputPrice:21,outputPrice:168,contextWindow:4e5,maxOutput:128e3,reasoning:!0,vision:!0,toolCalling:!0},{id:"openai/gpt-6-astra",name:"GPT-6 Astra",version:"6",inputPrice:10,outputPrice:50,contextWindow:105e4,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"openai/gpt-6-sol",name:"GPT-6 Sol",version:"6",inputPrice:2,outputPrice:10,contextWindow:105e4,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"openai/gpt-6.1-sol",name:"GPT-6.1 Sol",version:"6.1",inputPrice:2,outputPrice:10,contextWindow:105e4,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"openai/gpt-6-luna",name:"GPT-6 Luna",version:"6",inputPrice:.1,outputPrice:.5,contextWindow:105e4,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"openai/gpt-5.6-sol",name:"GPT-5.6 Sol",version:"5.6",inputPrice:4,outputPrice:20,contextWindow:105e4,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"openai/gpt-5.6-terra",name:"GPT-5.6 Terra",version:"5.6",inputPrice:2,outputPrice:12,contextWindow:105e4,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"openai/gpt-5.6-luna",name:"GPT-5.6 Luna",version:"5.6",inputPrice:.2,outputPrice:1.2,contextWindow:105e4,maxOutput:128e3,vision:!0,agentic:!0,toolCalling:!0},{id:"openai/gpt-5.6-sol-pro",name:"GPT-5.6 Sol Pro",version:"5.6",inputPrice:4,outputPrice:20,contextWindow:105e4,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"openai/gpt-5.6-terra-pro",name:"GPT-5.6 Terra Pro",version:"5.6",inputPrice:2,outputPrice:12,contextWindow:105e4,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"openai/gpt-5.6-luna-pro",name:"GPT-5.6 Luna Pro",version:"5.6",inputPrice:.2,outputPrice:1.2,contextWindow:105e4,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"openai/gpt-5.5",name:"GPT-5.5",version:"5.5",inputPrice:5,outputPrice:30,contextWindow:105e4,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"openai/gpt-5.5-pro",name:"GPT-5.5 Pro",version:"5.5",inputPrice:30,outputPrice:180,contextWindow:105e4,maxOutput:128e3,reasoning:!0,vision:!0,toolCalling:!0},{id:"openai/chat-latest",name:"ChatGPT Instant (GPT-5.5)",version:"5.5",inputPrice:5,outputPrice:30,contextWindow:128e3,maxOutput:128e3,vision:!0,toolCalling:!0},{id:"openai/gpt-5.4",name:"GPT-5.4",version:"5.4",inputPrice:2.5,outputPrice:15,contextWindow:105e4,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"openai/gpt-5.4-mini",name:"GPT-5.4 Mini",version:"5.4",inputPrice:.75,outputPrice:4.5,contextWindow:4e5,maxOutput:128e3,vision:!0,agentic:!0,toolCalling:!0},{id:"openai/gpt-5.4-pro",name:"GPT-5.4 Pro",version:"5.4",inputPrice:30,outputPrice:180,contextWindow:105e4,maxOutput:128e3,reasoning:!0,vision:!0,toolCalling:!0},{id:"openai/gpt-5.4-nano",name:"GPT-5.4 Nano",version:"5.4",inputPrice:.2,outputPrice:1.25,contextWindow:105e4,maxOutput:128e3,toolCalling:!0},{id:"openai/gpt-5.1",name:"GPT-5.1",version:"5.1",inputPrice:1.25,outputPrice:10,contextWindow:4e5,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"openai/gpt-5.3",name:"GPT-5.3",version:"5.3",inputPrice:1.75,outputPrice:14,contextWindow:128e3,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0,deprecated:!0,fallbackModel:"openai/gpt-5.2"},{id:"openai/gpt-5.3-codex",name:"GPT-5.3 Codex",version:"5.3",inputPrice:1.75,outputPrice:14,contextWindow:4e5,maxOutput:128e3,agentic:!0,toolCalling:!0},{id:"openai/gpt-4.1",name:"GPT-4.1",version:"4.1",inputPrice:2,outputPrice:8,contextWindow:128e3,maxOutput:32768,vision:!0,toolCalling:!0},{id:"openai/gpt-4.1-mini",name:"GPT-4.1 Mini",version:"4.1",inputPrice:.4,outputPrice:1.6,contextWindow:128e3,maxOutput:32768,toolCalling:!0},{id:"openai/gpt-4.1-nano",name:"GPT-4.1 Nano",version:"4.1",inputPrice:.1,outputPrice:.4,contextWindow:128e3,maxOutput:32768,toolCalling:!0},{id:"openai/gpt-4o",name:"GPT-4o",version:"4o",inputPrice:2.5,outputPrice:10,contextWindow:128e3,maxOutput:16384,vision:!0,agentic:!0,toolCalling:!0},{id:"openai/gpt-4o-mini",name:"GPT-4o Mini",version:"4o-mini",inputPrice:.15,outputPrice:.6,contextWindow:128e3,maxOutput:16384,toolCalling:!0},{id:"openai/o1",name:"o1",version:"1",inputPrice:15,outputPrice:60,contextWindow:2e5,maxOutput:1e5,reasoning:!0,toolCalling:!0,deprecated:!0,fallbackModel:"openai/gpt-5.4-mini"},{id:"openai/o1-mini",name:"o1-mini",version:"1-mini",inputPrice:1.1,outputPrice:4.4,contextWindow:128e3,maxOutput:65536,reasoning:!0,toolCalling:!0,deprecated:!0,fallbackModel:"openai/gpt-5.4-mini"},{id:"openai/o3",name:"o3",version:"3",inputPrice:2,outputPrice:8,contextWindow:2e5,maxOutput:1e5,reasoning:!0,toolCalling:!0,deprecated:!0,fallbackModel:"openai/gpt-5.4-mini"},{id:"openai/o3-mini",name:"o3-mini",version:"3-mini",inputPrice:1.1,outputPrice:4.4,contextWindow:128e3,maxOutput:1e5,reasoning:!0,toolCalling:!0,deprecated:!0,fallbackModel:"openai/gpt-5.4-mini"},{id:"openai/o4-mini",name:"o4-mini",version:"4-mini",inputPrice:1.1,outputPrice:4.4,contextWindow:128e3,maxOutput:1e5,reasoning:!0,toolCalling:!0,deprecated:!0,fallbackModel:"openai/gpt-5.4-mini"},{id:"anthropic/claude-haiku-4.5",name:"Claude Haiku 4.5",version:"4.5",inputPrice:1,outputPrice:5,contextWindow:2e5,maxOutput:64e3,vision:!0,agentic:!0,toolCalling:!0},{id:"anthropic/claude-sonnet-4.5",name:"Claude Sonnet 4.5",version:"4.5",inputPrice:3,outputPrice:15,contextWindow:2e5,maxOutput:64e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"anthropic/claude-sonnet-4.6",name:"Claude Sonnet 4.6",version:"4.6",inputPrice:3,outputPrice:15,contextWindow:1e6,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"anthropic/claude-sonnet-5",name:"Claude Sonnet 5",version:"5",inputPrice:2,outputPrice:10,contextWindow:1e6,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"anthropic/claude-opus-4.5",name:"Claude Opus 4.5",version:"4.5",inputPrice:5,outputPrice:25,contextWindow:2e5,maxOutput:64e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"anthropic/claude-opus-4.6",name:"Claude Opus 4.6",version:"4.6",inputPrice:5,outputPrice:25,contextWindow:1e6,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"anthropic/claude-fable-5",name:"Claude Fable 5",version:"5",inputPrice:10,outputPrice:50,contextWindow:1e6,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"anthropic/claude-opus-4.7",name:"Claude Opus 4.7",version:"4.7",inputPrice:5,outputPrice:25,contextWindow:1e6,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"anthropic/claude-opus-4.8",name:"Claude Opus 4.8",version:"4.8",inputPrice:5,outputPrice:25,contextWindow:1e6,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"anthropic/claude-opus-5",name:"Claude Opus 5",version:"5",inputPrice:5,outputPrice:25,contextWindow:1e6,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"anthropic/claude-fable-5.1",name:"Claude Fable 5.1",version:"5.1",inputPrice:10,outputPrice:50,contextWindow:1e6,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"anthropic/claude-fable-5.2",name:"Claude Fable 5.2",version:"5.2",inputPrice:8,outputPrice:40,contextWindow:1e6,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"anthropic/claude-opus-5.5",name:"Claude Opus 5.5",version:"5.5",inputPrice:4,outputPrice:20,contextWindow:1e6,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"anthropic/claude-sonnet-5.5",name:"Claude Sonnet 5.5",version:"5.5",inputPrice:2,outputPrice:10,contextWindow:1e6,maxOutput:128e3,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"google/gemini-3.1-pro",name:"Gemini 3.1 Pro",version:"3.1",inputPrice:2,outputPrice:12,contextWindow:1048576,maxOutput:65536,reasoning:!0,vision:!0,toolCalling:!0},{id:"google/gemini-3-pro-preview",name:"Gemini 3 Pro Preview",version:"3.0",inputPrice:2,outputPrice:12,contextWindow:1048576,maxOutput:65536,reasoning:!0,vision:!0,toolCalling:!0},{id:"google/gemini-4-argon",name:"Gemini 4 Argon",version:"4",inputPrice:2,outputPrice:10,contextWindow:1048576,maxOutput:65536,reasoning:!0,vision:!0,toolCalling:!0},{id:"google/gemini-4-carbon",name:"Gemini 4 Carbon",version:"4",inputPrice:2,outputPrice:10,contextWindow:1048576,maxOutput:65536,reasoning:!0,vision:!0,toolCalling:!0},{id:"google/gemini-3.8-flash",name:"Gemini 3.8 Flash",version:"3.8",inputPrice:.75,outputPrice:3.75,contextWindow:1048576,maxOutput:65536,reasoning:!0,vision:!0,toolCalling:!0},{id:"google/gemini-3.6-flash",name:"Gemini 3.6 Flash",version:"3.6",inputPrice:.75,outputPrice:3.75,contextWindow:1048576,maxOutput:65536,reasoning:!0,vision:!0,toolCalling:!0},{id:"google/gemini-3.5-flash",name:"Gemini 3.5 Flash",version:"3.5",inputPrice:1.5,outputPrice:9,contextWindow:1048576,maxOutput:65536,reasoning:!0,vision:!0,toolCalling:!0,deprecated:!0,fallbackModel:"google/gemini-3.6-flash"},{id:"google/gemini-3.5-flash-lite",name:"Gemini 3.5 Flash Lite",version:"3.5",inputPrice:.3,outputPrice:2.5,contextWindow:1048576,maxOutput:65536,reasoning:!0,toolCalling:!0},{id:"google/gemini-3-flash-preview",name:"Gemini 3 Flash Preview",version:"3.0",inputPrice:.5,outputPrice:3,contextWindow:1048576,maxOutput:65536,reasoning:!0,vision:!0},{id:"google/gemini-2.5-pro",name:"Gemini 2.5 Pro",version:"2.5",inputPrice:1.25,outputPrice:10,contextWindow:1048576,maxOutput:65536,reasoning:!0,vision:!0,toolCalling:!0,deprecated:!0,fallbackModel:"google/gemini-3.8-flash"},{id:"google/gemini-2.5-flash",name:"Gemini 2.5 Flash",version:"2.5",inputPrice:.3,outputPrice:2.5,contextWindow:1048576,maxOutput:65536,vision:!0,toolCalling:!0,deprecated:!0,fallbackModel:"google/gemini-3.5-flash-lite"},{id:"google/gemini-2.5-flash-lite",name:"Gemini 2.5 Flash Lite",version:"2.5",inputPrice:.1,outputPrice:.4,contextWindow:1048576,maxOutput:65536,vision:!0,toolCalling:!0},{id:"google/gemini-3.1-flash-lite",name:"Gemini 3.1 Flash Lite",version:"3.1",inputPrice:.25,outputPrice:1.5,contextWindow:1048576,maxOutput:65536,toolCalling:!0},{id:"deepseek/deepseek-chat",name:"DeepSeek Chat (V4.1 Flash)",version:"4.1-flash",inputPrice:.14,outputPrice:.28,contextWindow:1048576,maxOutput:65536,toolCalling:!0},{id:"deepseek/deepseek-reasoner",name:"DeepSeek Reasoner (V4.1 Flash)",version:"4.1-flash",inputPrice:.14,outputPrice:.28,contextWindow:1048576,maxOutput:65536,reasoning:!0,toolCalling:!0},{id:"deepseek/deepseek-v4.1-flash",name:"DeepSeek V4.1 Flash",version:"4.1-flash",inputPrice:.14,outputPrice:.28,contextWindow:1048576,maxOutput:65536,toolCalling:!0},{id:"deepseek/deepseek-v4-pro",name:"DeepSeek V4 Pro",version:"4-pro",inputPrice:1.32,outputPrice:3.96,contextWindow:1048576,maxOutput:65536,reasoning:!0,agentic:!0,toolCalling:!0},{id:"moonshot/kimi-k3.1-pro",name:"Kimi K3.1 Pro",version:"k3.1-pro",inputPrice:2,outputPrice:10,contextWindow:1048576,maxOutput:65536,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"moonshot/kimi-k3",name:"Kimi K3",version:"k3",inputPrice:3,outputPrice:15,contextWindow:1048576,maxOutput:65536,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"moonshot/kimi-k2.7",name:"Kimi K2.7",version:"k2.7",inputPrice:.95,outputPrice:4,contextWindow:262144,maxOutput:65536,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"qwen/qwen3.7-max",name:"Qwen3.7 Max",version:"3.7-max",inputPrice:1.475,outputPrice:4.425,contextWindow:1e6,maxOutput:65536,reasoning:!0,agentic:!0,toolCalling:!0},{id:"qwen/qwen3.7-plus",name:"Qwen3.7 Plus",version:"3.7-plus",inputPrice:.32,outputPrice:1.28,contextWindow:1e6,maxOutput:131072,reasoning:!0,agentic:!0,toolCalling:!0},{id:"qwen/qwen3.7-flash",name:"Qwen3.7 Flash",version:"3.7-flash",inputPrice:.03,outputPrice:.13,contextWindow:1e6,maxOutput:65536,reasoning:!0,toolCalling:!0},{id:"moonshot/kimi-k2.6",name:"Kimi K2.6",version:"k2.6",inputPrice:.95,outputPrice:4,contextWindow:262144,maxOutput:65536,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"moonshot/kimi-k2.5",name:"Kimi K2.5",version:"k2.5",inputPrice:.6,outputPrice:3,contextWindow:262144,maxOutput:65536,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"nvidia/kimi-k2.5",name:"Kimi K2.5 (NVIDIA, retired)",version:"k2.5",inputPrice:.6,outputPrice:3,contextWindow:262144,maxOutput:16384,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0,deprecated:!0,fallbackModel:"moonshot/kimi-k2.5"},{id:"xai/grok-3",name:"Grok 3",version:"3",inputPrice:3,outputPrice:15,contextWindow:131072,maxOutput:16384,reasoning:!0,toolCalling:!0,deprecated:!0,fallbackModel:"xai/grok-4-1-fast-non-reasoning"},{id:"xai/grok-3-mini",name:"Grok 3 Mini",version:"3-mini",inputPrice:.3,outputPrice:.5,contextWindow:131072,maxOutput:16384,toolCalling:!0,deprecated:!0,fallbackModel:"xai/grok-4-1-fast-non-reasoning"},{id:"xai/grok-4-fast-reasoning",name:"Grok 4 Fast Reasoning",version:"4",inputPrice:.2,outputPrice:.5,contextWindow:2e6,maxOutput:16384,reasoning:!0,toolCalling:!0,deprecated:!0,fallbackModel:"xai/grok-4-1-fast-reasoning"},{id:"xai/grok-4-fast-non-reasoning",name:"Grok 4 Fast",version:"4",inputPrice:.2,outputPrice:.5,contextWindow:2e6,maxOutput:16384,toolCalling:!0,deprecated:!0,fallbackModel:"xai/grok-4-1-fast-non-reasoning"},{id:"xai/grok-4-1-fast-reasoning",name:"Grok 4.1 Fast Reasoning",version:"4.1",inputPrice:.2,outputPrice:.5,contextWindow:2e6,maxOutput:16384,reasoning:!0,toolCalling:!0},{id:"xai/grok-4-1-fast-non-reasoning",name:"Grok 4.1 Fast",version:"4.1",inputPrice:.2,outputPrice:.5,contextWindow:2e6,maxOutput:16384,toolCalling:!0},{id:"xai/grok-4-0709",name:"Grok 4 (0709)",version:"4-0709",inputPrice:3,outputPrice:15,contextWindow:256e3,maxOutput:16384,reasoning:!0,toolCalling:!0},{id:"xai/grok-2-vision",name:"Grok 2 Vision",version:"2",inputPrice:2,outputPrice:10,contextWindow:32768,maxOutput:16384,vision:!0,toolCalling:!0,deprecated:!0,fallbackModel:"xai/grok-4.3"},{id:"xai/grok-4.20-reasoning",name:"Grok 4.20 Reasoning",version:"4.20",inputPrice:2,outputPrice:6,contextWindow:2e6,maxOutput:16384,reasoning:!0,toolCalling:!0},{id:"xai/grok-4.20-non-reasoning",name:"Grok 4.20",version:"4.20",inputPrice:2,outputPrice:6,contextWindow:2e6,maxOutput:16384,toolCalling:!0},{id:"xai/grok-4.20-multi-agent",name:"Grok 4.20 Multi-Agent",version:"4.20",inputPrice:2,outputPrice:6,contextWindow:2e6,maxOutput:16384,reasoning:!0,toolCalling:!0},{id:"xai/grok-4.5",name:"Grok 4.5",version:"4.5",inputPrice:2,outputPrice:6,contextWindow:5e5,maxOutput:16384,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"xai/grok-4.7",name:"Grok 4.7",version:"4.7",inputPrice:2,outputPrice:6,contextWindow:5e5,maxOutput:16384,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"xai/grok-4.6",name:"Grok 4.6",version:"4.6",inputPrice:2,outputPrice:6,contextWindow:5e5,maxOutput:16384,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"xai/grok-4.3",name:"Grok 4.3",version:"4.3",inputPrice:1.25,outputPrice:2.5,contextWindow:1e6,maxOutput:16384,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"xai/grok-build-0.1",name:"Grok Build 0.1",version:"0.1",inputPrice:1,outputPrice:2,contextWindow:256e3,maxOutput:16384,agentic:!0,toolCalling:!0},{id:"tencent/hy3",name:"Tencent Hy3",version:"hy3",inputPrice:.132,outputPrice:.528,contextWindow:262144,maxOutput:128e3,reasoning:!0,toolCalling:!0,deprecated:!0,fallbackModel:"qwen/qwen3.7-flash"},{id:"xiaomi/mimo-v2.5-pro",name:"Xiaomi MiMo-V2.5 Pro",version:"v2.5-pro",inputPrice:.435,outputPrice:.87,contextWindow:1048576,maxOutput:131072,reasoning:!0,toolCalling:!0},{id:"minimax/minimax-m3",name:"MiniMax M3",version:"m3",inputPrice:.3,outputPrice:1.2,contextWindow:1048576,maxOutput:65536,reasoning:!0,vision:!0,agentic:!0,toolCalling:!0},{id:"minimax/minimax-m2.7",name:"MiniMax M2.7",version:"m2.7",inputPrice:.3,outputPrice:1.2,contextWindow:204800,maxOutput:16384,reasoning:!0,agentic:!0,toolCalling:!0},{id:"minimax/minimax-m2.5",name:"MiniMax M2.5",version:"m2.5",inputPrice:.3,outputPrice:1.2,contextWindow:204800,maxOutput:16384,reasoning:!0,agentic:!0,toolCalling:!0,deprecated:!0,fallbackModel:"minimax/minimax-m2.7"},{id:"free/gpt-oss-120b",name:"[Free] GPT-OSS 120B",version:"120b",inputPrice:0,outputPrice:0,contextWindow:128e3,maxOutput:16384},{id:"free/gpt-oss-20b",name:"[Free] GPT-OSS 20B",version:"20b",inputPrice:0,outputPrice:0,contextWindow:128e3,maxOutput:16384},{id:"free/deepseek-v4-flash",name:"[Free] DeepSeek V4 Flash",version:"v4-flash",inputPrice:0,outputPrice:0,contextWindow:1e6,maxOutput:16384,reasoning:!0},{id:"free/qwen3-coder-480b",name:"[Free] Qwen3 Coder 480B",version:"480b",inputPrice:0,outputPrice:0,contextWindow:131072,maxOutput:16384},{id:"free/glm-4.7",name:"[Free] GLM-4.7",version:"4.7",inputPrice:0,outputPrice:0,contextWindow:131072,maxOutput:16384,reasoning:!0},{id:"free/llama-4-maverick",name:"[Free] Llama 4 Maverick",version:"4-maverick",inputPrice:0,outputPrice:0,contextWindow:131072,maxOutput:16384,reasoning:!0},{id:"free/nemotron-3-nano-omni-30b-a3b-reasoning",name:"[Free] Nemotron 3 Nano Omni",version:"30b-a3b-omni-reasoning",inputPrice:0,outputPrice:0,contextWindow:256e3,maxOutput:16384,reasoning:!0},{id:"free/mistral-large-3-675b",name:"[Free] Mistral Large 3 675B",version:"3-675b",inputPrice:0,outputPrice:0,contextWindow:131072,maxOutput:16384,reasoning:!0},{id:"free/qwen3.5-122b-a10b",name:"[Free] Qwen3.5 122B",version:"3.5-122b",inputPrice:0,outputPrice:0,contextWindow:131072,maxOutput:16384,reasoning:!0},{id:"free/qwen3-next-80b-a3b-instruct",name:"[Free] Qwen3-Next 80B Instruct",version:"next-80b-a3b",inputPrice:0,outputPrice:0,contextWindow:262144,maxOutput:16384,reasoning:!0},{id:"free/seed-oss-36b",name:"[Free] Seed-OSS 36B",version:"oss-36b",inputPrice:0,outputPrice:0,contextWindow:131072,maxOutput:16384},{id:"free/mistral-nemotron",name:"[Free] Mistral Nemotron",version:"nemotron",inputPrice:0,outputPrice:0,contextWindow:131072,maxOutput:16384},{id:"free/step-3.7-flash",name:"[Free] StepFun Step 3.7 Flash",version:"3.7-flash",inputPrice:0,outputPrice:0,contextWindow:131072,maxOutput:16384,reasoning:!0},{id:"free/nemotron-nano-9b-v2",name:"[Free] Nemotron Nano 9B v2",version:"nano-9b-v2",inputPrice:0,outputPrice:0,contextWindow:131072,maxOutput:16384,reasoning:!0},{id:"free/nemotron-nano-12b-v2-vl",name:"[Free] Nemotron Nano 12B v2 VL",version:"nano-12b-v2-vl",inputPrice:0,outputPrice:0,contextWindow:131072,maxOutput:16384,reasoning:!0},{id:"free/nemotron-3.5-lightning",name:"[Free] Nemotron 3.5 Lightning",version:"3.5-lightning",inputPrice:0,outputPrice:0,contextWindow:1e6,maxOutput:16384,reasoning:!0},{id:"free/nemotron-3-nano-30b",name:"[Free] Nemotron 3 Nano 30B",version:"3-nano-30b",inputPrice:0,outputPrice:0,contextWindow:131072,maxOutput:16384,reasoning:!0},{id:"free/nemotron-3-ultra-550b",name:"[Free] Nemotron 3 Ultra 550B",version:"3-ultra-550b",inputPrice:0,outputPrice:0,contextWindow:1e6,maxOutput:16384,reasoning:!0},{id:"free/minimax-m3.1-flash",name:"[Free] MiniMax M3.1 Flash",version:"m3.1-flash",inputPrice:0,outputPrice:0,contextWindow:1048576,maxOutput:16384,reasoning:!0,toolCalling:!0},{id:"free/llama-3.2-11b-vision",name:"[Free] Llama 3.2 11B Vision",version:"3.2-11b-vision",inputPrice:0,outputPrice:0,contextWindow:128e3,maxOutput:16384},{id:"free/north-mini-code",name:"[Free] Cohere North Mini Code",version:"north-mini-code",inputPrice:0,outputPrice:0,contextWindow:256e3,maxOutput:16384,reasoning:!0,deprecated:!0,fallbackModel:"free/laguna-xs-2.1"},{id:"free/laguna-xs-2.1",name:"[Free] Poolside Laguna XS 2.1",version:"xs-2.1",inputPrice:0,outputPrice:0,contextWindow:131072,maxOutput:16384},{id:"free/muse-glimmer-30b",name:"[Free] Muse Glimmer 30B",version:"30b",inputPrice:0,outputPrice:0,contextWindow:131072,maxOutput:16384,reasoning:!0},{id:"free/nemotron-3.5-bolt",name:"[Free] Nemotron 3.5 Bolt",version:"3.5-bolt",inputPrice:0,outputPrice:0,contextWindow:131072,maxOutput:16384,vision:!0},{id:"free/nemotron-3-super-120b",name:"[Free] Nemotron 3 Super 120B",version:"3-super-120b",inputPrice:0,outputPrice:0,contextWindow:131072,maxOutput:16384,reasoning:!0},{id:"qwen/qwen3.8-flash",name:"Qwen3.8 Flash",version:"3.8-flash",inputPrice:.15,outputPrice:.47,contextWindow:1e6,maxOutput:131072,reasoning:!0,vision:!0,toolCalling:!0},{id:"deepseek/deepseek-v4-flash-vision-exp",name:"DeepSeek V4 Flash Vision",version:"v4-flash-vision-exp",inputPrice:.3,outputPrice:1.2,contextWindow:1048576,maxOutput:65536,reasoning:!0,vision:!0,toolCalling:!0},{id:"xiaomi/mimo-v2.5",name:"Xiaomi MiMo V2.5",version:"2.5",inputPrice:.14,outputPrice:.28,contextWindow:1048576,maxOutput:131072,reasoning:!0,vision:!0,toolCalling:!0},{id:"qwen/qwen3.8-max",name:"Qwen3.8 Max",version:"3.8-max",inputPrice:2,outputPrice:6,contextWindow:1e6,maxOutput:131072,reasoning:!0},{id:"tencent/hy4-preview",name:"Tencent Hy4 Preview",version:"hy4-preview",inputPrice:.834,outputPrice:2.501,contextWindow:1048576,maxOutput:64e3,reasoning:!0},{id:"mistral/mistral-large-4",name:"Mistral Large 4",version:"large-4",inputPrice:1.36,outputPrice:4.18,contextWindow:524288,maxOutput:262144,reasoning:!0,vision:!0,toolCalling:!0},{id:"poolside/laguna-s-2.1",name:"Poolside Laguna S 2.1",version:"s-2.1",inputPrice:.09,outputPrice:.18,contextWindow:1048576,maxOutput:131072},{id:"zai/glm-5.3",name:"GLM-5.3",version:"5.3",inputPrice:1.4,outputPrice:4.4,contextWindow:1e6,maxOutput:131072,reasoning:!0,toolCalling:!0},{id:"zai/glm-5.3-flash",name:"GLM-5.3 Flash",version:"5.3-flash",inputPrice:.15,outputPrice:.5,contextWindow:1e6,maxOutput:131072,reasoning:!0,vision:!0,toolCalling:!0},{id:"zai/glm-5.2",name:"GLM-5.2",version:"5.2",inputPrice:1.4,outputPrice:4.4,contextWindow:1e6,maxOutput:131072,reasoning:!0,toolCalling:!0},{id:"zai/glm-5.1",name:"GLM-5.1",version:"5.1",inputPrice:1.4,outputPrice:4.4,contextWindow:2e5,maxOutput:128e3,reasoning:!0,toolCalling:!0,promo:{flatPrice:.001,startDate:"2026-04-01",endDate:"2026-06-05"}},{id:"zai/glm-5",name:"GLM-5",version:"5",inputPrice:1,outputPrice:3.2,contextWindow:2e5,maxOutput:128e3,reasoning:!0,toolCalling:!0},{id:"zai/glm-5-turbo",name:"GLM-5 Turbo",version:"5-turbo",inputPrice:1.2,outputPrice:4,contextWindow:2e5,maxOutput:128e3,reasoning:!0,toolCalling:!0}];ALIAS_MODELS=Object.entries(MODEL_ALIASES).filter(([alias])=>!alias.includes("/")).map(([alias,targetId])=>{let target=BLOCKRUN_MODELS.find(m=>m.id===targetId);return target?toOpenClawModel({...target,id:alias,name:`${alias} \u2192 ${target.name}`}):null}).filter(m=>m!==null),OPENCLAW_MODELS=[...BLOCKRUN_MODELS.filter(m=>!(m.id in MODEL_ALIASES)).map(toOpenClawModel),...ALIAS_MODELS],OPENCLAW_MODEL_BY_ID=new Map(OPENCLAW_MODELS.map(m=>[m.id,m])),VISIBLE_OPENCLAW_MODELS=TOP_MODELS.flatMap(id2=>{let model=OPENCLAW_MODEL_BY_ID.get(id2);return model?[model]:[]})}});function validPercent(value){return typeof value=="number"&&Number.isFinite(value)&&value>=0?value:void 0}function platformFeePercentOf(row){if(row.billing_mode!=="paid")return 0;let pricing=row.pricing&&typeof row.pricing=="object"?row.pricing:void 0;return validPercent(pricing?.platform_fee_percent)??validPercent(row.platform_fee_percent)??0}function withPlatformFee(tokenCostUsd,platformFeePercent){let percent=validPercent(platformFeePercent)??0;return tokenCostUsd*(1+percent/100)}var init_platform_fee=__esm({"src/platform-fee.ts"(){"use strict"}});function fallbackCatalog(){return{models:BLOCKRUN_MODELS,openclaw:OPENCLAW_MODELS,visible:VISIBLE_OPENCLAW_MODELS,freeIds:new Set(BLOCKRUN_MODELS.filter(m=>m.id.startsWith("free/")).map(m=>m.id))}}function upstreamId(id2){return id2==="free/north-mini-code"?"cohere/north-mini-code":id2==="free/laguna-xs-2.1"?"poolside/laguna-xs-2.1":id2.startsWith("free/")?`nvidia/${id2.slice(5)}`:id2}function projectClawCatalog(state){let models=BLOCKRUN_MODELS.map(m=>({...m})),byUpstream=new Map(models.map(m=>[upstreamId(m.id),m])),additions=new Set,freeIds=new Set(fallbackCatalog().freeIds);for(let row of state.models){if(!row.id.includes("/")||row.id.startsWith("blockrun/")||!row.categories.includes("chat")||row.available===!1||!["paid","free","flat"].includes(row.billing_mode))continue;let old=byUpstream.get(row.id);if(old?.id.startsWith("free/")&&row.billing_mode!=="free")throw new Error("Gateway changed billing of a pinned free model");if(!old&&Object.hasOwn(MODEL_ALIASES,row.id))continue;let model=old??{id:row.id,name:row.name,inputPrice:0,outputPrice:0,contextWindow:row.context_window??32768,maxOutput:row.max_output??4096,toolCalling:!1,agentic:!1,reasoning:row.categories.includes("reasoning"),vision:row.categories.includes("vision")};if(row.billing_mode==="flat"&&(typeof row.pricing.flat!="number"||!Number.isFinite(row.pricing.flat)||row.pricing.flat<0))throw new Error("Invalid flat model price");model.name=row.name,model.inputPrice=row.billing_mode==="paid"?row.pricing.input:0,model.outputPrice=row.billing_mode==="paid"?row.pricing.output:0,delete model.promo,delete model.flatPrice,delete model.platformFeePercent,row.billing_mode==="flat"&&(model.flatPrice=row.pricing.flat);let feePercent=platformFeePercentOf(row);feePercent>0&&(model.platformFeePercent=feePercent),row.context_window&&(model.contextWindow=row.context_window),row.max_output&&(model.maxOutput=row.max_output),old||(models.push(model),additions.add(model.id))}let byId=new Map(models.map(m=>[m.id,m])),openclaw=models.filter(m=>!Object.hasOwn(MODEL_ALIASES,m.id)).map(toOpenClawModel);for(let[alias,target]of Object.entries(MODEL_ALIASES)){let model=byId.get(target);!alias.includes("/")&&model&&openclaw.push(toOpenClawModel({...model,id:alias,name:`${alias} \u2192 ${model.name}`}))}let definitions=new Map(openclaw.map(m=>[m.id,m])),visibleIds=new Set(VISIBLE_OPENCLAW_MODELS.map(m=>m.id));for(let group of state.groups)for(let row of group.models)additions.has(row.id)&&visibleIds.add(row.id);let visible=[...visibleIds].flatMap(id2=>definitions.has(id2)?[definitions.get(id2)]:[]);return{models,openclaw,visible,freeIds}}function createClawCatalog(options){let gatewayUrl=`${options.apiBase.replace(/\/$/,"")}/v1/models?format=json`,fetcher=options.fetch??globalThis.fetch,gatewayFetch=options.apiKey?createApiKeyFetch(options.apiKey,fetcher,options.apiBase):fetcher,client=createCatalogClient({network:options.network,gatewayUrl,catalogUrl:options.catalogUrl??process.env.BLOCKRUN_MODEL_CATALOG_URL,timeoutMs:options.timeoutMs??4e3,ttlMs:options.ttlMs??24e4,fetch:(url3,init2)=>String(url3)===gatewayUrl?gatewayFetch(url3,{...init2,redirect:"error"}):fetcher(url3,{...init2,redirect:"error"})}),view=fallbackCatalog(),inflight,lastReported,report=message=>{message!==lastReported&&(lastReported=message,console.warn(`[ClawRouter] Model catalog refresh failed, keeping the last good view: ${message}`))};return{current:()=>view,refresh(){return inflight||(inflight=(async()=>{try{let state=await client.refresh();if(state.lastError&&report(state.lastError),state.source==="live"){let next=projectClawCatalog(state);fingerprint(next)!==fingerprint(view)&&(view=next),state.lastError||(lastReported=void 0)}}catch(err){report(err instanceof Error?err.message:String(err))}return view})().finally(()=>{inflight=void 0}),inflight)}}}function fingerprint(view){return JSON.stringify([view.models.map(m=>[m.id,m.inputPrice,m.outputPrice,m.flatPrice??null,m.platformFeePercent??0,m.contextWindow,m.maxOutput]),view.visible.map(m=>m.id),[...view.freeIds].sort()])}var init_model_catalog=__esm({"src/model-catalog.ts"(){"use strict";init_runtime();init_api_key();init_models();init_platform_fee()}});var version,init_version=__esm({"node_modules/abitype/dist/esm/version.js"(){"use strict";version="1.2.3"}});var BaseError,init_errors=__esm({"node_modules/abitype/dist/esm/errors.js"(){"use strict";init_version();BaseError=class _BaseError extends Error{constructor(shortMessage,args={}){let details=args.cause instanceof _BaseError?args.cause.details:args.cause?.message?args.cause.message:args.details,docsPath9=args.cause instanceof _BaseError&&args.cause.docsPath||args.docsPath,message=[shortMessage||"An error occurred.","",...args.metaMessages?[...args.metaMessages,""]:[],...docsPath9?[`Docs: https://abitype.dev${docsPath9}`]:[],...details?[`Details: ${details}`]:[],`Version: abitype@${version}`].join(`
|
|
5
5
|
`);super(message),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),args.cause&&(this.cause=args.cause),this.details=details,this.docsPath=docsPath9,this.metaMessages=args.metaMessages,this.shortMessage=shortMessage}}}});function execTyped(regex,string4){return regex.exec(string4)?.groups}var bytesRegex,integerRegex,isTupleRegex,init_regex=__esm({"node_modules/abitype/dist/esm/regex.js"(){"use strict";bytesRegex=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,integerRegex=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,isTupleRegex=/^\(.+?\).*?$/}});function formatAbiParameter(abiParameter){let type2=abiParameter.type;if(tupleRegex.test(abiParameter.type)&&"components"in abiParameter){type2="(";let length=abiParameter.components.length;for(let i=0;i<length;i++){let component=abiParameter.components[i];type2+=formatAbiParameter(component),i<length-1&&(type2+=", ")}let result=execTyped(tupleRegex,abiParameter.type);return type2+=`)${result?.array||""}`,formatAbiParameter({...abiParameter,type:type2})}return"indexed"in abiParameter&&abiParameter.indexed&&(type2=`${type2} indexed`),abiParameter.name?`${type2} ${abiParameter.name}`:type2}var tupleRegex,init_formatAbiParameter=__esm({"node_modules/abitype/dist/esm/human-readable/formatAbiParameter.js"(){"use strict";init_regex();tupleRegex=/^tuple(?<array>(\[(\d*)\])*)$/}});function formatAbiParameters(abiParameters){let params="",length=abiParameters.length;for(let i=0;i<length;i++){let abiParameter=abiParameters[i];params+=formatAbiParameter(abiParameter),i!==length-1&&(params+=", ")}return params}var init_formatAbiParameters=__esm({"node_modules/abitype/dist/esm/human-readable/formatAbiParameters.js"(){"use strict";init_formatAbiParameter()}});function formatAbiItem(abiItem){return abiItem.type==="function"?`function ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})${abiItem.stateMutability&&abiItem.stateMutability!=="nonpayable"?` ${abiItem.stateMutability}`:""}${abiItem.outputs?.length?` returns (${formatAbiParameters(abiItem.outputs)})`:""}`:abiItem.type==="event"?`event ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})`:abiItem.type==="error"?`error ${abiItem.name}(${formatAbiParameters(abiItem.inputs)})`:abiItem.type==="constructor"?`constructor(${formatAbiParameters(abiItem.inputs)})${abiItem.stateMutability==="payable"?" payable":""}`:abiItem.type==="fallback"?`fallback() external${abiItem.stateMutability==="payable"?" payable":""}`:"receive() external payable"}var init_formatAbiItem=__esm({"node_modules/abitype/dist/esm/human-readable/formatAbiItem.js"(){"use strict";init_formatAbiParameters()}});function isErrorSignature(signature3){return errorSignatureRegex.test(signature3)}function execErrorSignature(signature3){return execTyped(errorSignatureRegex,signature3)}function isEventSignature(signature3){return eventSignatureRegex.test(signature3)}function execEventSignature(signature3){return execTyped(eventSignatureRegex,signature3)}function isFunctionSignature(signature3){return functionSignatureRegex.test(signature3)}function execFunctionSignature(signature3){return execTyped(functionSignatureRegex,signature3)}function isStructSignature(signature3){return structSignatureRegex.test(signature3)}function execStructSignature(signature3){return execTyped(structSignatureRegex,signature3)}function isConstructorSignature(signature3){return constructorSignatureRegex.test(signature3)}function execConstructorSignature(signature3){return execTyped(constructorSignatureRegex,signature3)}function isFallbackSignature(signature3){return fallbackSignatureRegex.test(signature3)}function execFallbackSignature(signature3){return execTyped(fallbackSignatureRegex,signature3)}function isReceiveSignature(signature3){return receiveSignatureRegex.test(signature3)}var errorSignatureRegex,eventSignatureRegex,functionSignatureRegex,structSignatureRegex,constructorSignatureRegex,fallbackSignatureRegex,receiveSignatureRegex,modifiers,eventModifiers,functionModifiers,init_signatures=__esm({"node_modules/abitype/dist/esm/human-readable/runtime/signatures.js"(){"use strict";init_regex();errorSignatureRegex=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;eventSignatureRegex=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;functionSignatureRegex=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;structSignatureRegex=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;constructorSignatureRegex=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;fallbackSignatureRegex=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;receiveSignatureRegex=/^receive\(\) external payable$/;modifiers=new Set(["memory","indexed","storage","calldata"]),eventModifiers=new Set(["indexed"]),functionModifiers=new Set(["calldata","memory","storage"])}});var InvalidAbiItemError,UnknownTypeError,UnknownSolidityTypeError,init_abiItem=__esm({"node_modules/abitype/dist/esm/human-readable/errors/abiItem.js"(){"use strict";init_errors();InvalidAbiItemError=class extends BaseError{constructor({signature:signature3}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(signature3,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}},UnknownTypeError=class extends BaseError{constructor({type:type2}){super("Unknown type.",{metaMessages:[`Type "${type2}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}},UnknownSolidityTypeError=class extends BaseError{constructor({type:type2}){super("Unknown type.",{metaMessages:[`Type "${type2}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}}});var InvalidAbiParameterError,InvalidAbiParametersError,InvalidParameterError,SolidityProtectedKeywordError,InvalidModifierError,InvalidFunctionModifierError,InvalidAbiTypeParameterError,init_abiParameter=__esm({"node_modules/abitype/dist/esm/human-readable/errors/abiParameter.js"(){"use strict";init_errors();InvalidAbiParameterError=class extends BaseError{constructor({param}){super("Failed to parse ABI parameter.",{details:`parseAbiParameter(${JSON.stringify(param,null,2)})`,docsPath:"/api/human#parseabiparameter-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParameterError"})}},InvalidAbiParametersError=class extends BaseError{constructor({params}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(params,null,2)})`,docsPath:"/api/human#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}},InvalidParameterError=class extends BaseError{constructor({param}){super("Invalid ABI parameter.",{details:param}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}},SolidityProtectedKeywordError=class extends BaseError{constructor({param,name}){super("Invalid ABI parameter.",{details:param,metaMessages:[`"${name}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}},InvalidModifierError=class extends BaseError{constructor({param,type:type2,modifier}){super("Invalid ABI parameter.",{details:param,metaMessages:[`Modifier "${modifier}" not allowed${type2?` in "${type2}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}},InvalidFunctionModifierError=class extends BaseError{constructor({param,type:type2,modifier}){super("Invalid ABI parameter.",{details:param,metaMessages:[`Modifier "${modifier}" not allowed${type2?` in "${type2}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${modifier}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}},InvalidAbiTypeParameterError=class extends BaseError{constructor({abiParameter}){super("Invalid ABI parameter.",{details:JSON.stringify(abiParameter,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}}});var InvalidSignatureError,UnknownSignatureError,InvalidStructSignatureError,init_signature=__esm({"node_modules/abitype/dist/esm/human-readable/errors/signature.js"(){"use strict";init_errors();InvalidSignatureError=class extends BaseError{constructor({signature:signature3,type:type2}){super(`Invalid ${type2} signature.`,{details:signature3}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}},UnknownSignatureError=class extends BaseError{constructor({signature:signature3}){super("Unknown signature.",{details:signature3}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}},InvalidStructSignatureError=class extends BaseError{constructor({signature:signature3}){super("Invalid struct signature.",{details:signature3,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}}});var CircularReferenceError,init_struct=__esm({"node_modules/abitype/dist/esm/human-readable/errors/struct.js"(){"use strict";init_errors();CircularReferenceError=class extends BaseError{constructor({type:type2}){super("Circular reference detected.",{metaMessages:[`Struct "${type2}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}}});var InvalidParenthesisError,init_splitParameters=__esm({"node_modules/abitype/dist/esm/human-readable/errors/splitParameters.js"(){"use strict";init_errors();InvalidParenthesisError=class extends BaseError{constructor({current,depth}){super("Unbalanced parentheses.",{metaMessages:[`"${current.trim()}" has too many ${depth>0?"opening":"closing"} parentheses.`],details:`Depth "${depth}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}}});function getParameterCacheKey(param,type2,structs){let structKey="";if(structs)for(let struct of Object.entries(structs)){if(!struct)continue;let propertyKey="";for(let property of struct[1])propertyKey+=`[${property.type}${property.name?`:${property.name}`:""}]`;structKey+=`(${struct[0]}{${propertyKey}})`}return type2?`${type2}:${param}${structKey}`:`${param}${structKey}`}var parameterCache,init_cache=__esm({"node_modules/abitype/dist/esm/human-readable/runtime/cache.js"(){"use strict";parameterCache=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]])}});function parseSignature(signature3,structs={}){if(isFunctionSignature(signature3))return parseFunctionSignature(signature3,structs);if(isEventSignature(signature3))return parseEventSignature(signature3,structs);if(isErrorSignature(signature3))return parseErrorSignature(signature3,structs);if(isConstructorSignature(signature3))return parseConstructorSignature(signature3,structs);if(isFallbackSignature(signature3))return parseFallbackSignature(signature3);if(isReceiveSignature(signature3))return{type:"receive",stateMutability:"payable"};throw new UnknownSignatureError({signature:signature3})}function parseFunctionSignature(signature3,structs={}){let match=execFunctionSignature(signature3);if(!match)throw new InvalidSignatureError({signature:signature3,type:"function"});let inputParams=splitParameters(match.parameters),inputs=[],inputLength=inputParams.length;for(let i=0;i<inputLength;i++)inputs.push(parseAbiParameter(inputParams[i],{modifiers:functionModifiers,structs,type:"function"}));let outputs=[];if(match.returns){let outputParams=splitParameters(match.returns),outputLength=outputParams.length;for(let i=0;i<outputLength;i++)outputs.push(parseAbiParameter(outputParams[i],{modifiers:functionModifiers,structs,type:"function"}))}return{name:match.name,type:"function",stateMutability:match.stateMutability??"nonpayable",inputs,outputs}}function parseEventSignature(signature3,structs={}){let match=execEventSignature(signature3);if(!match)throw new InvalidSignatureError({signature:signature3,type:"event"});let params=splitParameters(match.parameters),abiParameters=[],length=params.length;for(let i=0;i<length;i++)abiParameters.push(parseAbiParameter(params[i],{modifiers:eventModifiers,structs,type:"event"}));return{name:match.name,type:"event",inputs:abiParameters}}function parseErrorSignature(signature3,structs={}){let match=execErrorSignature(signature3);if(!match)throw new InvalidSignatureError({signature:signature3,type:"error"});let params=splitParameters(match.parameters),abiParameters=[],length=params.length;for(let i=0;i<length;i++)abiParameters.push(parseAbiParameter(params[i],{structs,type:"error"}));return{name:match.name,type:"error",inputs:abiParameters}}function parseConstructorSignature(signature3,structs={}){let match=execConstructorSignature(signature3);if(!match)throw new InvalidSignatureError({signature:signature3,type:"constructor"});let params=splitParameters(match.parameters),abiParameters=[],length=params.length;for(let i=0;i<length;i++)abiParameters.push(parseAbiParameter(params[i],{structs,type:"constructor"}));return{type:"constructor",stateMutability:match.stateMutability??"nonpayable",inputs:abiParameters}}function parseFallbackSignature(signature3){let match=execFallbackSignature(signature3);if(!match)throw new InvalidSignatureError({signature:signature3,type:"fallback"});return{type:"fallback",stateMutability:match.stateMutability??"nonpayable"}}function parseAbiParameter(param,options){let parameterCacheKey=getParameterCacheKey(param,options?.type,options?.structs);if(parameterCache.has(parameterCacheKey))return parameterCache.get(parameterCacheKey);let isTuple=isTupleRegex.test(param),match=execTyped(isTuple?abiParameterWithTupleRegex:abiParameterWithoutTupleRegex,param);if(!match)throw new InvalidParameterError({param});if(match.name&&isSolidityKeyword(match.name))throw new SolidityProtectedKeywordError({param,name:match.name});let name=match.name?{name:match.name}:{},indexed=match.modifier==="indexed"?{indexed:!0}:{},structs=options?.structs??{},type2,components={};if(isTuple){type2="tuple";let params=splitParameters(match.type),components_=[],length=params.length;for(let i=0;i<length;i++)components_.push(parseAbiParameter(params[i],{structs}));components={components:components_}}else if(match.type in structs)type2="tuple",components={components:structs[match.type]};else if(dynamicIntegerRegex.test(match.type))type2=`${match.type}256`;else if(match.type==="address payable")type2="address";else if(type2=match.type,options?.type!=="struct"&&!isSolidityType(type2))throw new UnknownSolidityTypeError({type:type2});if(match.modifier){if(!options?.modifiers?.has?.(match.modifier))throw new InvalidModifierError({param,type:options?.type,modifier:match.modifier});if(functionModifiers.has(match.modifier)&&!isValidDataLocation(type2,!!match.array))throw new InvalidFunctionModifierError({param,type:options?.type,modifier:match.modifier})}let abiParameter={type:`${type2}${match.array??""}`,...name,...indexed,...components};return parameterCache.set(parameterCacheKey,abiParameter),abiParameter}function splitParameters(params,result=[],current="",depth=0){let length=params.trim().length;for(let i=0;i<length;i++){let char=params[i],tail=params.slice(i+1);switch(char){case",":return depth===0?splitParameters(tail,[...result,current.trim()]):splitParameters(tail,result,`${current}${char}`,depth);case"(":return splitParameters(tail,result,`${current}${char}`,depth+1);case")":return splitParameters(tail,result,`${current}${char}`,depth-1);default:return splitParameters(tail,result,`${current}${char}`,depth)}}if(current==="")return result;if(depth!==0)throw new InvalidParenthesisError({current,depth});return result.push(current.trim()),result}function isSolidityType(type2){return type2==="address"||type2==="bool"||type2==="function"||type2==="string"||bytesRegex.test(type2)||integerRegex.test(type2)}function isSolidityKeyword(name){return name==="address"||name==="bool"||name==="function"||name==="string"||name==="tuple"||bytesRegex.test(name)||integerRegex.test(name)||protectedKeywordsRegex.test(name)}function isValidDataLocation(type2,isArray2){return isArray2||type2==="bytes"||type2==="string"||type2==="tuple"}var abiParameterWithoutTupleRegex,abiParameterWithTupleRegex,dynamicIntegerRegex,protectedKeywordsRegex,init_utils=__esm({"node_modules/abitype/dist/esm/human-readable/runtime/utils.js"(){"use strict";init_regex();init_abiItem();init_abiParameter();init_signature();init_splitParameters();init_cache();init_signatures();abiParameterWithoutTupleRegex=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,abiParameterWithTupleRegex=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,dynamicIntegerRegex=/^u?int$/;protectedKeywordsRegex=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/}});function parseStructs(signatures){let shallowStructs={},signaturesLength=signatures.length;for(let i=0;i<signaturesLength;i++){let signature3=signatures[i];if(!isStructSignature(signature3))continue;let match=execStructSignature(signature3);if(!match)throw new InvalidSignatureError({signature:signature3,type:"struct"});let properties=match.properties.split(";"),components=[],propertiesLength=properties.length;for(let k=0;k<propertiesLength;k++){let trimmed=properties[k].trim();if(!trimmed)continue;let abiParameter=parseAbiParameter(trimmed,{type:"struct"});components.push(abiParameter)}if(!components.length)throw new InvalidStructSignatureError({signature:signature3});shallowStructs[match.name]=components}let resolvedStructs={},entries=Object.entries(shallowStructs),entriesLength=entries.length;for(let i=0;i<entriesLength;i++){let[name,parameters]=entries[i];resolvedStructs[name]=resolveStructs(parameters,shallowStructs)}return resolvedStructs}function resolveStructs(abiParameters=[],structs={},ancestors=new Set){let components=[],length=abiParameters.length;for(let i=0;i<length;i++){let abiParameter=abiParameters[i];if(isTupleRegex.test(abiParameter.type))components.push(abiParameter);else{let match=execTyped(typeWithoutTupleRegex,abiParameter.type);if(!match?.type)throw new InvalidAbiTypeParameterError({abiParameter});let{array:array2,type:type2}=match;if(type2 in structs){if(ancestors.has(type2))throw new CircularReferenceError({type:type2});components.push({...abiParameter,type:`tuple${array2??""}`,components:resolveStructs(structs[type2],structs,new Set([...ancestors,type2]))})}else if(isSolidityType(type2))components.push(abiParameter);else throw new UnknownTypeError({type:type2})}}return components}var typeWithoutTupleRegex,init_structs=__esm({"node_modules/abitype/dist/esm/human-readable/runtime/structs.js"(){"use strict";init_regex();init_abiItem();init_abiParameter();init_signature();init_struct();init_signatures();init_utils();typeWithoutTupleRegex=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/}});function parseAbi(signatures){let structs=parseStructs(signatures),abi2=[],length=signatures.length;for(let i=0;i<length;i++){let signature3=signatures[i];isStructSignature(signature3)||abi2.push(parseSignature(signature3,structs))}return abi2}var init_parseAbi=__esm({"node_modules/abitype/dist/esm/human-readable/parseAbi.js"(){"use strict";init_signatures();init_structs();init_utils()}});function parseAbiItem(signature3){let abiItem;if(typeof signature3=="string")abiItem=parseSignature(signature3);else{let structs=parseStructs(signature3),length=signature3.length;for(let i=0;i<length;i++){let signature_=signature3[i];if(!isStructSignature(signature_)){abiItem=parseSignature(signature_,structs);break}}}if(!abiItem)throw new InvalidAbiItemError({signature:signature3});return abiItem}var init_parseAbiItem=__esm({"node_modules/abitype/dist/esm/human-readable/parseAbiItem.js"(){"use strict";init_abiItem();init_signatures();init_structs();init_utils()}});function parseAbiParameter2(param){let abiParameter;if(typeof param=="string")abiParameter=parseAbiParameter(param,{modifiers});else{let structs=parseStructs(param),length=param.length;for(let i=0;i<length;i++){let signature3=param[i];if(!isStructSignature(signature3)){abiParameter=parseAbiParameter(signature3,{modifiers,structs});break}}}if(!abiParameter)throw new InvalidAbiParameterError({param});return abiParameter}var init_parseAbiParameter=__esm({"node_modules/abitype/dist/esm/human-readable/parseAbiParameter.js"(){"use strict";init_abiParameter();init_signatures();init_structs();init_utils()}});function parseAbiParameters(params){let abiParameters=[];if(typeof params=="string"){let parameters=splitParameters(params),length=parameters.length;for(let i=0;i<length;i++)abiParameters.push(parseAbiParameter(parameters[i],{modifiers}))}else{let structs=parseStructs(params),length=params.length;for(let i=0;i<length;i++){let signature3=params[i];if(isStructSignature(signature3))continue;let parameters=splitParameters(signature3),length2=parameters.length;for(let k=0;k<length2;k++)abiParameters.push(parseAbiParameter(parameters[k],{modifiers,structs}))}}if(abiParameters.length===0)throw new InvalidAbiParametersError({params});return abiParameters}var init_parseAbiParameters=__esm({"node_modules/abitype/dist/esm/human-readable/parseAbiParameters.js"(){"use strict";init_abiParameter();init_signatures();init_structs();init_utils();init_utils()}});var init_exports=__esm({"node_modules/abitype/dist/esm/exports/index.js"(){"use strict";init_formatAbiItem();init_formatAbiParameters();init_parseAbi();init_parseAbiItem();init_parseAbiParameter();init_parseAbiParameters();init_abiItem();init_abiParameter();init_signature();init_splitParameters();init_struct()}});function getAction(client,actionFn,name){let action_implicit=client[actionFn.name];if(typeof action_implicit=="function")return action_implicit;let action_explicit=client[name];return typeof action_explicit=="function"?action_explicit:params=>actionFn(client,params)}var init_getAction=__esm({"node_modules/viem/_esm/utils/getAction.js"(){"use strict"}});function formatAbiItem2(abiItem,{includeName=!1}={}){if(abiItem.type!=="function"&&abiItem.type!=="event"&&abiItem.type!=="error")throw new InvalidDefinitionTypeError(abiItem.type);return`${abiItem.name}(${formatAbiParams(abiItem.inputs,{includeName})})`}function formatAbiParams(params,{includeName=!1}={}){return params?params.map(param=>formatAbiParam(param,{includeName})).join(includeName?", ":","):""}function formatAbiParam(param,{includeName}){return param.type.startsWith("tuple")?`(${formatAbiParams(param.components,{includeName})})${param.type.slice(5)}`:param.type+(includeName&¶m.name?` ${param.name}`:"")}var init_formatAbiItem2=__esm({"node_modules/viem/_esm/utils/abi/formatAbiItem.js"(){"use strict";init_abi()}});function isHex(value,{even=!1,strict=!0}={}){return!value||typeof value!="string"||even&&value.length%2!==0?!1:strict?/^0x[0-9a-fA-F]*$/.test(value):value.startsWith("0x")}var init_isHex=__esm({"node_modules/viem/_esm/utils/data/isHex.js"(){"use strict"}});function size(value){return isHex(value,{strict:!1})?Math.ceil((value.length-2)/2):value.length}var init_size=__esm({"node_modules/viem/_esm/utils/data/size.js"(){"use strict";init_isHex()}});var version2,init_version2=__esm({"node_modules/viem/_esm/errors/version.js"(){"use strict";version2="2.57.16"}});function setErrorConfig(config2){errorConfig=config2}function walk(err,fn){return fn?.(err)?err:err&&typeof err=="object"&&"cause"in err&&err.cause!==void 0?walk(err.cause,fn):fn?null:err}var errorConfig,BaseError2,init_base=__esm({"node_modules/viem/_esm/errors/base.js"(){"use strict";init_version2();errorConfig={getDocsUrl:({docsBaseUrl,docsPath:docsPath9="",docsSlug})=>docsPath9?`${docsBaseUrl??"https://viem.sh"}${docsPath9}${docsSlug?`#${docsSlug}`:""}`:void 0,version:`viem@${version2}`};BaseError2=class _BaseError extends Error{constructor(shortMessage,args={}){let details=args.cause instanceof _BaseError?args.cause.details:args.cause?.message?args.cause.message:args.details,docsPath9=args.cause instanceof _BaseError&&args.cause.docsPath||args.docsPath,docsUrl=errorConfig.getDocsUrl?.({...args,docsPath:docsPath9}),message=[shortMessage||"An error occurred.","",...args.metaMessages?[...args.metaMessages,""]:[],...docsUrl?[`Docs: ${docsUrl}`]:[],...details?[`Details: ${details}`]:[],...errorConfig.version?[`Version: ${errorConfig.version}`]:[]].join(`
|
|
6
6
|
`);super(message,args.cause?{cause:args.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=details,this.docsPath=docsPath9,this.metaMessages=args.metaMessages,this.name=args.name??this.name,this.shortMessage=shortMessage,this.version=version2}walk(fn){return walk(this,fn)}}}});var AbiConstructorNotFoundError,AbiConstructorParamsNotFoundError,AbiDecodingDataSizeInvalidError,AbiDecodingDataSizeTooSmallError,AbiDecodingZeroDataError,AbiEncodingArrayLengthMismatchError,AbiEncodingBytesSizeMismatchError,AbiEncodingLengthMismatchError,AbiErrorInputsNotFoundError,AbiErrorNotFoundError,AbiErrorSignatureNotFoundError,AbiEventSignatureEmptyTopicsError,AbiEventSignatureNotFoundError,AbiEventNotFoundError,AbiFunctionNotFoundError,AbiFunctionOutputsNotFoundError,AbiFunctionSignatureNotFoundError,AbiItemAmbiguityError,BytesSizeMismatchError,DecodeLogDataMismatch,DecodeLogTopicsMismatch,InvalidAbiEncodingTypeError,InvalidAbiDecodingTypeError,InvalidArrayError,InvalidDefinitionTypeError,UnsupportedPackedAbiType,init_abi=__esm({"node_modules/viem/_esm/errors/abi.js"(){"use strict";init_formatAbiItem2();init_size();init_base();AbiConstructorNotFoundError=class extends BaseError2{constructor({docsPath:docsPath9}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(`
|
|
7
7
|
`),{docsPath:docsPath9,name:"AbiConstructorNotFoundError"})}},AbiConstructorParamsNotFoundError=class extends BaseError2{constructor({docsPath:docsPath9}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(`
|