@juspay/neurolink 12.32.3 → 12.33.0
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/CHANGELOG.md +3 -3
- package/dist/browser/neurolink.min.js +4 -4
- package/dist/providers/catalog/api-route.json +2 -2
- package/dist/providers/catalog/loader.js +5 -0
- package/dist/providers/catalog/mistral.json +2 -2
- package/dist/providers/configuredOpenAICompat.d.ts +20 -2
- package/dist/providers/configuredOpenAICompat.js +22 -2
- package/dist/types/providerCatalog.d.ts +10 -0
- package/dist/types/providers.d.ts +20 -0
- package/docs-site/static/search-index.json +6 -6
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Hlr=Object.create,Vx=Object.defineProperty,Vlr=Object.getOwnPropertyDescriptor,j$=Object.getOwnPropertyNames,Wlr=Object.getPrototypeOf,Klr=Object.prototype.hasOwnProperty,Hle=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),S=(e,t,r)=>function(){try{return e&&(t=(0,e[j$(e)[0]])(e=0)),t}catch(o){return console.warn("[NeuroLink:browser] module init skipped:",String(o)),e=0,t}},Ur=(e,t)=>function(){try{return t||(0,e[j$(e)[0]])((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},se=(e,t)=>{for(var r in t)Vx(e,r,{get:t[r],enumerable:!0})},Vle=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of j$(t))!Klr.call(e,o)&&o!==r&&Vx(e,o,{get:()=>t[o],enumerable:!(n=Vlr(t,o))||n.enumerable});return e},sl=(e,t,r)=>(r=e!=null?Hlr(Wlr(e)):{},Vle(t||!e||!e.__esModule?Vx(r,"default",{value:e,enumerable:!0}):r,e)),Br=e=>Vle(Vx({},"__esModule",{value:!0}),e),H$={};se(H$,{ATTR_SERVICE_NAME:()=>Sue,ATTR_SERVICE_VERSION:()=>_ue,AsyncLocalStorageContextManager:()=>Eue,BasicTracerProvider:()=>oue,BatchLogRecordProcessor:()=>yue,BatchSpanProcessor:()=>aue,DiagConsoleLogger:()=>Yle,DiagLogLevel:()=>Xle,ExportResultCode:()=>Wle,INVALID_SPAN_CONTEXT:()=>tue,JsonLogsSerializer:()=>uue,LangfuseSpanProcessor:()=>fue,LoggerProvider:()=>gue,MeterProvider:()=>vue,NodeSDK:()=>nue,NodeTracerProvider:()=>sue,OTLPLogExporter:()=>lue,OTLPMetricExporter:()=>due,OTLPTraceExporter:()=>cue,PeriodicExportingMetricReader:()=>Tue,ROOT_CONTEXT:()=>W$,SEMRESATTRS_SERVICE_NAME:()=>Cue,SEMRESATTRS_SERVICE_VERSION:()=>kue,SeverityNumber:()=>wue,SimpleSpanProcessor:()=>iue,SpanKind:()=>zr,SpanStatusCode:()=>Ue,TraceFlags:()=>Jle,ValueType:()=>Zle,W3CTraceContextPropagator:()=>bue,baggageEntryMetadataFromString:()=>rue,context:()=>fr,default:()=>Aue,diag:()=>Jx,getNodeAutoInstrumentations:()=>mue,isSpanContextValid:()=>V$,isValidSpanId:()=>eue,isValidTraceId:()=>Qle,metrics:()=>ih,parseKeyPairsIntoRecord:()=>Kle,propagation:()=>Ty,registerInstrumentations:()=>pue,resourceFromAttributes:()=>hue,trace:()=>lt});var Wx,eE,Kx,vy,lt,fr,Ty,ih,Jx,Wle,Kle,Ue,zr,Jle,Yle,Xle,Zle,V$,W$,Qle,eue,tue,rue,nue,oue,sue,iue,aue,cue,lue,uue,due,mue,pue,hue,fue,gue,yue,vue,Tue,wue,Eue,bue,Sue,_ue,Cue,kue,Aue,Xt=S({"otel-stub:@opentelemetry/api"(){Wx={setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){},isRecording(){return!1},recordException(){},spanContext(){return{traceId:"0",spanId:"0",traceFlags:0}}},eE={startSpan(){return Wx},startActiveSpan(e,t,r){return(typeof t=="function"?t:r)(Wx)}},Kx={createCounter(){return{add(){}}},createHistogram(){return{record(){}}},createUpDownCounter(){return{add(){}}},createObservableGauge(){return{addCallback(){}}}},vy={getValue(){},setValue(){return vy},deleteValue(){return vy}},lt={getTracer(){return eE},getTracerProvider(){return{getTracer(){return eE}}},setGlobalTracerProvider(){},getSpan(){return Wx},getActiveSpan(){},setSpan(e){return e},deleteSpan(e){return e},setSpanContext(e){return e},getSpanContext(){}},fr={active(){return vy},with(e,t){return t()},bind(e,t){return t},setValue(){return vy},getValue(){}},Ty={inject(){},extract(e){return e},setGlobalPropagator(){},getBaggage(){},setBaggage(e){return e},createBaggage(){return{getAllEntries(){return[]},getEntry(){},setEntry(){return this},removeEntry(){return this}}}},ih={getMeter(){return Kx},getMeterProvider(){return{getMeter(){return Kx}}},setGlobalMeterProvider(){}},Jx={setLogger(){},verbose(){},debug(){},info(){},warn(){},error(){},createComponentLogger(){return Jx}},Wle={SUCCESS:0,FAILED:1},Kle=()=>({}),Ue={UNSET:0,OK:1,ERROR:2},zr={INTERNAL:0,SERVER:1,CLIENT:2,PRODUCER:3,CONSUMER:4},Jle={NONE:0,SAMPLED:1},Yle=class{},Xle={NONE:0,ERROR:30,WARN:50,INFO:60,DEBUG:70,VERBOSE:80,ALL:9999},Zle={INT:0,DOUBLE:1},V$=()=>!1,W$=vy,Qle=()=>!1,eue=()=>!1,tue={traceId:"0",spanId:"0",traceFlags:0},rue=()=>({}),nue=class{start(){}shutdown(){return Promise.resolve()}},oue=class{constructor(){}register(){}addSpanProcessor(){}getTracer(){return eE}shutdown(){return Promise.resolve()}},sue=class{register(){}addSpanProcessor(){}getTracer(){return eE}shutdown(){return Promise.resolve()}},iue=class{onStart(){}onEnd(){}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}},aue=class{onStart(){}onEnd(){}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}},cue=class{export(){}shutdown(){return Promise.resolve()}},lue=class{export(){}shutdown(){return Promise.resolve()}},uue={serializeRequest(){throw new Error("[NeuroLink:browser] proxy OTLP log transport requires a server runtime")}},due=class{constructor(){}export(){}shutdown(){return Promise.resolve()}},mue=()=>[],pue=()=>{},hue=e=>({attributes:e||{},merge(){return this}}),fue=class{onStart(){}onEnd(){}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}},gue=class{constructor(){}getLogger(){return{emit(){}}}forceFlush(){return Promise.resolve()}shutdown(){return Promise.resolve()}},yue=class{onStart(){}onEnd(){}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}},vue=class{constructor(){}getMeter(){return Kx}addMetricReader(){}forceFlush(){return Promise.resolve()}shutdown(){return Promise.resolve()}},Tue=class{constructor(){}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}},wue={UNSPECIFIED:0,TRACE:1,TRACE2:2,TRACE3:3,TRACE4:4,DEBUG:5,DEBUG2:6,DEBUG3:7,DEBUG4:8,INFO:9,INFO2:10,INFO3:11,INFO4:12,WARN:13,WARN2:14,WARN3:15,WARN4:16,ERROR:17,ERROR2:18,ERROR3:19,ERROR4:20,FATAL:21,FATAL2:22,FATAL3:23,FATAL4:24},Eue=class{enable(){return this}disable(){return this}},bue=class{inject(){}extract(e){return e}fields(){return[]}},Sue="service.name",_ue="service.version",Cue="service.name",kue="service.version",Aue={trace:lt,context:fr,propagation:Ty,metrics:ih,diag:Jx,SpanStatusCode:Ue,SpanKind:zr}}}),Be,pr=S({"src/lib/telemetry/tracers.ts"(){"use strict";Xt(),Be={sdk:lt.getTracer("neurolink"),provider:lt.getTracer("neurolink.provider"),generation:lt.getTracer("neurolink.generation"),decision:lt.getTracer("neurolink.decision"),stream:lt.getTracer("neurolink.stream"),http:lt.getTracer("neurolink.http"),mcp:lt.getTracer("neurolink.mcp"),memory:lt.getTracer("neurolink.memory"),redis:lt.getTracer("neurolink.redis"),factory:lt.getTracer("neurolink.factory"),rag:lt.getTracer("neurolink.rag"),context:lt.getTracer("neurolink.context"),middleware:lt.getTracer("neurolink.middleware"),processor:lt.getTracer("neurolink.processor"),file:lt.getTracer("neurolink.file"),autoresearch:lt.getTracer("neurolink.autoresearch"),auth:lt.getTracer("neurolink.auth"),workflow:lt.getTracer("neurolink.workflow")}}}),Jlr,Yx,Ylr,Xlr,Zlr,Xx,xue,K$,Qlr,eur,tur,rur,J$=S({"node-stub:node:async_hooks"(){Jlr=globalThis.crypto,Yx=class{getStore(){}run(e,t,...r){return t(...r)}enterWith(){}disable(){}},Ylr=globalThis.ReadableStream||class{},Xlr=globalThis.URL,Zlr=globalThis.URLSearchParams,Xx=e=>{try{return JSON.stringify(e,null,2)}catch{return String(e)}},Xx.custom=Symbol.for("nodejs.util.inspect.custom"),Xx.colors={},Xx.styles={},xue=globalThis.TextDecoder,K$=globalThis.TextEncoder,Qlr=globalThis.performance||{now:()=>Date.now()},eur=globalThis.Buffer||class extends Uint8Array{static from(t,r){if(typeof t=="string"){const n=(r||"utf8").toLowerCase();if(n==="base64"){const o=atob(t),s=new Uint8Array(o.length);for(let i=0;i<o.length;i++)s[i]=o.charCodeAt(i);return s}if(n==="hex"){const o=new Uint8Array(t.length/2);for(let s=0;s<t.length;s+=2)o[s/2]=parseInt(t.substr(s,2),16);return o}return new K$().encode(t)}return new Uint8Array(t)}static alloc(t){return new Uint8Array(t)}static isBuffer(t){return t instanceof Uint8Array}static concat(t){const r=t.reduce((s,i)=>s+i.length,0),n=new Uint8Array(r);let o=0;for(const s of t)n.set(s,o),o+=s.length;return n}static byteLength(t,r){return r==="base64"?Math.ceil(t.length*3/4):new K$().encode(t).length}toString(t){const r=(t||"utf8").toLowerCase();if(r==="hex")return Array.from(new Uint8Array(this.buffer,this.byteOffset,this.byteLength)).map(n=>n.toString(16).padStart(2,"0")).join("");if(r==="base64"){let n="";for(let o=0;o<this.length;o++)n+=String.fromCharCode(this[o]);return btoa(n)}return new xue().decode(this)}},tur=globalThis.clearTimeout,rur=globalThis.clearInterval}});async function nur(){return eI||(eI=Promise.resolve().then(()=>(Xt(),H$)).then(e=>(tE=e,e)).catch(()=>null)),eI}function our(){const e=process.argv;return e.some((t,r)=>Y$.includes(t)&&e[r+1]==="json"||Y$.some(n=>t===`${n}=json`))}function Iue(e){if(e===null||typeof e!="object")return e;try{return structuredClone(e)}catch{return e}}function Zx(e,t){if(e.length===0)return;const r=(()=>{try{return typeof e[0]=="string"?e[0]:JSON.stringify(e[0])}catch{return"[Unserializable Object]"}})(),n=e.length===2?e[1]:e.length>2?e.slice(1):void 0;t(r,n)}var Qx,tE,eI,Rue,Y$,Mue,In,p,re,ir,z=S({"src/lib/utils/logger.ts"(){"use strict";J$(),Qx=new Yx,tE=null,eI=null,nur(),Rue={debug:"DEBUG",info:"INFO",warn:"WARN",error:"ERROR"},Y$=["--format","-f","--output-format"],Mue=class{logLevel="info";logs=[];maxLogs=1e3;isDebugMode;diagnosticsToStderr=!1;eventEmitter;scopedEmitters=new Map;constructor(){this.isDebugMode=process.argv.includes("--debug")||process.env.NEUROLINK_DEBUG==="true";const e=process.env.NEUROLINK_LOG_LEVEL?.toLowerCase();e&&["debug","info","warn","error"].includes(e)&&(this.logLevel=e)}setEventEmitter(e){this.eventEmitter=e}clearEventEmitter(e){e!==void 0&&this.eventEmitter!==e||(this.eventEmitter=void 0)}runInInstanceScope(e,t){return Qx.run(e,t)}getInstanceScope(){return Qx.getStore()}addScopedEventEmitter(e,t){const r=this.scopedEmitters.get(e);if(r){r.add(t);return}this.scopedEmitters.set(e,new Set([t]))}removeScopedEventEmitter(e,t){const r=this.scopedEmitters.get(e);r&&(r.delete(t),r.size===0&&this.scopedEmitters.delete(e))}clearScopedEventEmitters(e){this.scopedEmitters.delete(e)}setLogLevel(e){this.logLevel=e}setDiagnosticsToStderr(e){this.diagnosticsToStderr=e}shouldLog(e){if(!(process.argv.includes("--debug")||process.env.NEUROLINK_DEBUG==="true")&&e!=="error")return!1;const r=["debug","info","warn","error"];return r.indexOf(e)>=r.indexOf(this.logLevel)}getLogPrefix(e,t){return`[${e}] [NEUROLINK:${Rue[t]}]`}getTraceContext(){if(!tE)return{};try{const e=tE.trace.getSpan(tE.context.active());if(!e)return{};const t=e.spanContext();return!t||t.traceId==="00000000000000000000000000000000"?{}:{trace_id:t.traceId,span_id:t.spanId,trace_flags:String(t.traceFlags)}}catch{return{}}}serializeData(e){if(e==null||typeof e!="object")return String(e);try{return JSON.stringify(e,(t,r)=>r instanceof Error?{name:r.name,message:r.message,stack:r.stack}:r)}catch{const t=[];try{return JSON.stringify(e,function(r,n){if(n instanceof Error)return{name:n.name,message:n.message,stack:n.stack};if(typeof n=="object"&&n!==null){if(t.includes(n))return"[Circular]";t.push(n)}return n})}catch{return"[Unserializable Object]"}}}outputToConsole(e,t,r,n){const o=this.diagnosticsToStderr||our(),s={debug:o?console.error:console.debug,info:o?console.error:console.info,warn:console.warn,error:console.error}[e],i=this.getTraceContext(),a=i.trace_id?` [trace_id=${i.trace_id} span_id=${i.span_id}]`:"";n!=null?s(t+a,r,this.serializeData(n)):s(t+a,r)}log(e,t,r){if(!this.shouldLog(e))return;const n={level:e,message:t,timestamp:new Date,data:r},o=Qx.getStore(),s=o===void 0?void 0:this.scopedEmitters.get(o);if(s||this.eventEmitter){const c=n.timestamp.getTime();if(s)for(const l of s)try{l.emit("log-event",{level:e,message:t,timestamp:c,data:Iue(r)})}catch{}if(this.eventEmitter)try{this.eventEmitter.emit("log-event",{level:e,message:t,timestamp:c,data:Iue(r)})}catch{}}this.logs.push(n),this.logs.length>this.maxLogs&&(this.logs=this.logs.slice(-this.maxLogs));const i=n.timestamp.toISOString(),a=this.getLogPrefix(i,e);this.outputToConsole(e,a,t,r)}debug(e,t){this.log("debug",e,t)}info(e,t){this.log("info",e,t)}warn(e,t){this.log("warn",e,t)}error(e,t){this.log("error",e,t)}getLogs(e){return e?this.logs.filter(t=>t.level===e):[...this.logs]}clearLogs(){this.logs=[]}always(...e){console.log(...e)}alwaysStderr(...e){console.error(...e)}table(e){console.table(e)}},In=new Mue,p={debug:(...e)=>{In.shouldLog("debug")&&Zx(e,(t,r)=>In.debug(t,r))},info:(...e)=>{In.shouldLog("info")&&Zx(e,(t,r)=>In.info(t,r))},warn:(...e)=>{In.shouldLog("warn")&&Zx(e,(t,r)=>In.warn(t,r))},error:(...e)=>{In.shouldLog("error")&&Zx(e,(t,r)=>In.error(t,r))},always:(...e)=>{In.always(...e)},alwaysStderr:(...e)=>{In.alwaysStderr(...e)},table:e=>{In.table(e)},shouldLog:e=>In.shouldLog(e),setLogLevel:e=>In.setLogLevel(e),setDiagnosticsToStderr:e=>In.setDiagnosticsToStderr(e),getLogs:e=>In.getLogs(e),clearLogs:()=>In.clearLogs(),setEventEmitter:e=>In.setEventEmitter(e),clearEventEmitter:e=>In.clearEventEmitter(e),runInInstanceScope:(e,t)=>In.runInInstanceScope(e,t),getInstanceScope:()=>In.getInstanceScope(),addScopedEventEmitter:(e,t)=>In.addScopedEventEmitter(e,t),removeScopedEventEmitter:(e,t)=>In.removeScopedEventEmitter(e,t),clearScopedEventEmitters:e=>In.clearScopedEventEmitters(e)},re=In,ir=In}});function tI(e,t){if(typeof e!="string")throw new TypeError("levenshtein: operands must be strings");if(typeof t!="string")throw new TypeError("levenshtein: operands must be strings");if(e.length>gc)throw new RangeError(X$);if(t.length>gc)throw new RangeError(X$);if(e===t)return 0;if(e.length===0)return t.length;if(t.length===0)return e.length;e.length>t.length&&([e,t]=[t,e]);const r=e.length,n=t.length;let o=new Array(r+1),s=new Array(r+1);for(let i=0;i<=r;i++)o[i]=i;for(let i=1;i<=n;i++){s[0]=i;for(let a=1;a<=r;a++){const c=e[a-1]===t[i-1]?0:1;s[a]=Math.min(o[a]+1,s[a-1]+1,o[a-1]+c)}[o,s]=[s,o]}return o[r]}function sur(e,t,r){const n=r?.maxDistance??3,o=r?.limit??3,s=e.toLowerCase();if(s.length>gc)return[];const i=[];return t.forEach((a,c)=>{const l=a.toLowerCase();if(Math.abs(l.length-s.length)>n||l.length>gc)return;const u=tI(s,l);u<=n&&i.push({candidate:a,order:c,distance:u})}),i.sort((a,c)=>a.distance-c.distance||a.order-c.order).slice(0,o).map(a=>a.candidate)}var gc,X$,Pue=S({"src/lib/utils/stringDistance.ts"(){"use strict";gc=128,X$=`levenshtein: input exceeds MAX_COMPARABLE_LENGTH (${gc}); callers must skip over-limit operands rather than truncate them`}}),rI,Z$,Q$,e3,Due,t3=S({"src/lib/constants/enums.ts"(){"use strict";rI=(e=>(e.BEDROCK="bedrock",e.OPENAI="openai",e.OPENAI_COMPATIBLE="openai-compatible",e.OPENROUTER="openrouter",e.VERTEX="vertex",e.ANTHROPIC="anthropic",e.AZURE="azure",e.GOOGLE_AI="google-ai",e.OLLAMA="ollama",e.LITELLM="litellm",e.SAGEMAKER="sagemaker",e.NVIDIA_NIM="nvidia-nim",e.LM_STUDIO="lm-studio",e.LLAMACPP="llamacpp",e.API_ROUTE="api-route",e.BASETEN="baseten",e.CEREBRAS="cerebras",e.CLOUDFLARE="cloudflare",e.DEEPSEEK="deepseek",e.FIREWORKS="fireworks",e.FRIENDLI="friendli",e.GMICLOUD="gmicloud",e.GROQ="groq",e.HUGGINGFACE="huggingface",e.INCEPTION_LABS="inception-labs",e.IO_INTELLIGENCE="io-intelligence",e.MANCER="mancer",e.MISTRAL="mistral",e.MORPH="morph",e.NOVITA="novita",e.PERPLEXITY="perplexity",e.SAMBANOVA="sambanova",e.TOGETHER_AI="together-ai",e.UPSTAGE="upstage",e.XAI="xai",e.COHERE="cohere",e.REPLICATE="replicate",e.VOYAGE="voyage",e.JINA="jina",e.STABILITY="stability",e.IDEOGRAM="ideogram",e.RECRAFT="recraft",e.TYPESAFE="typesafe",e.LAYA="laya",e.AUTO="auto",e))(rI||{}),Z$=(e=>(e.CLAUDE_4_6_OPUS="anthropic.claude-opus-4-6-v1",e.CLAUDE_4_6_SONNET="anthropic.claude-sonnet-4-6",e.CLAUDE_4_5_OPUS="anthropic.claude-opus-4-5-20251101-v1:0",e.CLAUDE_4_5_SONNET="anthropic.claude-sonnet-4-5-20250929-v1:0",e.CLAUDE_4_5_HAIKU="anthropic.claude-haiku-4-5-20251001-v1:0",e.CLAUDE_4_1_OPUS="anthropic.claude-opus-4-1-20250805-v1:0",e.CLAUDE_4_SONNET="anthropic.claude-sonnet-4-20250514-v1:0",e.CLAUDE_3_7_SONNET="anthropic.claude-3-7-sonnet-20250219-v1:0",e.CLAUDE_3_5_SONNET="anthropic.claude-3-5-sonnet-20241022-v1:0",e.CLAUDE_3_5_HAIKU="anthropic.claude-3-5-haiku-20241022-v1:0",e.CLAUDE_3_SONNET="anthropic.claude-3-sonnet-20240229-v1:0",e.CLAUDE_3_HAIKU="anthropic.claude-3-haiku-20240307-v1:0",e.NOVA_PREMIER="amazon.nova-premier-v1:0",e.NOVA_PRO="amazon.nova-pro-v1:0",e.NOVA_LITE="amazon.nova-lite-v1:0",e.NOVA_MICRO="amazon.nova-micro-v1:0",e.NOVA_2_LITE="amazon.nova-2-lite-v1:0",e.NOVA_2_SONIC="amazon.nova-2-sonic-v1:0",e.NOVA_SONIC="amazon.nova-sonic-v1:0",e.NOVA_CANVAS="amazon.nova-canvas-v1:0",e.NOVA_REEL="amazon.nova-reel-v1:0",e.NOVA_REEL_V1_1="amazon.nova-reel-v1:1",e.NOVA_MULTIMODAL_EMBEDDINGS="amazon.nova-2-multimodal-embeddings-v1:0",e.TITAN_TEXT_LARGE="amazon.titan-tg1-large",e.TITAN_EMBED_TEXT_V2="amazon.titan-embed-text-v2:0",e.TITAN_EMBED_TEXT_V1="amazon.titan-embed-text-v1",e.TITAN_EMBED_G1_TEXT_02="amazon.titan-embed-g1-text-02",e.TITAN_EMBED_IMAGE_V1="amazon.titan-embed-image-v1",e.TITAN_IMAGE_GENERATOR_V2="amazon.titan-image-generator-v2:0",e.LLAMA_4_MAVERICK_17B="meta.llama4-maverick-17b-instruct-v1:0",e.LLAMA_4_SCOUT_17B="meta.llama4-scout-17b-instruct-v1:0",e.LLAMA_3_3_70B="meta.llama3-3-70b-instruct-v1:0",e.LLAMA_3_2_90B="meta.llama3-2-90b-instruct-v1:0",e.LLAMA_3_2_11B="meta.llama3-2-11b-instruct-v1:0",e.LLAMA_3_2_3B="meta.llama3-2-3b-instruct-v1:0",e.LLAMA_3_2_1B="meta.llama3-2-1b-instruct-v1:0",e.LLAMA_3_1_405B="meta.llama3-1-405b-instruct-v1:0",e.LLAMA_3_1_70B="meta.llama3-1-70b-instruct-v1:0",e.LLAMA_3_1_8B="meta.llama3-1-8b-instruct-v1:0",e.LLAMA_3_70B="meta.llama3-70b-instruct-v1:0",e.LLAMA_3_8B="meta.llama3-8b-instruct-v1:0",e.MISTRAL_LARGE_3="mistral.mistral-large-3-675b-instruct",e.MISTRAL_LARGE_2407="mistral.mistral-large-2407-v1:0",e.MISTRAL_LARGE_2402="mistral.mistral-large-2402-v1:0",e.MAGISTRAL_SMALL_2509="mistral.magistral-small-2509",e.MINISTRAL_3_14B="mistral.ministral-3-14b-instruct",e.MINISTRAL_3_8B="mistral.ministral-3-8b-instruct",e.MINISTRAL_3_3B="mistral.ministral-3-3b-instruct",e.MISTRAL_7B="mistral.mistral-7b-instruct-v0:2",e.MIXTRAL_8x7B="mistral.mixtral-8x7b-instruct-v0:1",e.PIXTRAL_LARGE_2502="mistral.pixtral-large-2502-v1:0",e.VOXTRAL_SMALL_24B="mistral.voxtral-small-24b-2507",e.VOXTRAL_MINI_3B="mistral.voxtral-mini-3b-2507",e.COHERE_COMMAND_R_PLUS="cohere.command-r-plus-v1:0",e.COHERE_COMMAND_R="cohere.command-r-v1:0",e.DEEPSEEK_R1="deepseek.r1-v1:0",e.DEEPSEEK_V3="deepseek.v3-v1:0",e.QWEN_3_235B_A22B="qwen.qwen3-235b-a22b-2507-v1:0",e.QWEN_3_CODER_480B_A35B="qwen.qwen3-coder-480b-a35b-v1:0",e.QWEN_3_CODER_30B_A3B="qwen.qwen3-coder-30b-a3b-v1:0",e.QWEN_3_32B="qwen.qwen3-32b-v1:0",e.QWEN_3_NEXT_80B_A3B="qwen.qwen3-next-80b-a3b",e.QWEN_3_VL_235B_A22B="qwen.qwen3-vl-235b-a22b",e.GEMMA_3_27B_IT="google.gemma-3-27b-it",e.GEMMA_3_12B_IT="google.gemma-3-12b-it",e.GEMMA_3_4B_IT="google.gemma-3-4b-it",e.JAMBA_1_5_LARGE="ai21.jamba-1-5-large-v1:0",e.JAMBA_1_5_MINI="ai21.jamba-1-5-mini-v1:0",e.WRITER_PALMYRA_X5="writer.palmyra-x5-v1:0",e.WRITER_PALMYRA_X4="writer.palmyra-x4-v1:0",e.MINIMAX_M2_1="minimax.minimax-m2.1",e.MINIMAX_M2="minimax.minimax-m2",e.KIMI_K2_THINKING="moonshot.kimi-k2-thinking",e.KIMI_K2_5="moonshotai.kimi-k2.5",e.NVIDIA_NEMOTRON_NANO_3_30B="nvidia.nemotron-nano-3-30b",e.NVIDIA_NEMOTRON_NANO_12B_V2="nvidia.nemotron-nano-12b-v2",e.NVIDIA_NEMOTRON_NANO_9B_V2="nvidia.nemotron-nano-9b-v2",e.OPENAI_GPT_OSS_120B="openai.gpt-oss-120b-1:0",e.OPENAI_GPT_OSS_20B="openai.gpt-oss-20b-1:0",e.GLM_4_7="zai.glm-4.7",e.GLM_4_7_FLASH="zai.glm-4.7-flash",e.COHERE_EMBED_ENGLISH_V3="cohere.embed-english-v3",e.COHERE_EMBED_MULTILINGUAL_V3="cohere.embed-multilingual-v3",e.COHERE_EMBED_V4="cohere.embed-v4:0",e.COHERE_RERANK_V3_5="cohere.rerank-v3-5:0",e.AMAZON_RERANK_V1="amazon.rerank-v1:0",e.DEVSTRAL_2_123B="mistral.devstral-2-123b",e))(Z$||{}),Q$=(e=>(e.GPT_5_3_CODEX="gpt-5.3-codex",e.GPT_5_4="gpt-5.4",e.GPT_5_4_MINI="gpt-5.4-mini",e.GPT_5_4_NANO="gpt-5.4-nano",e.GPT_5_4_PRO="gpt-5.4-pro",e.GPT_5_2="gpt-5.2",e.GPT_5_2_CHAT_LATEST="gpt-5.2-chat-latest",e.GPT_5_2_PRO="gpt-5.2-pro",e.GPT_5_2_CODEX="gpt-5.2-codex",e.GPT_5_1="gpt-5.1",e.GPT_5_1_CHAT_LATEST="gpt-5.1-chat-latest",e.GPT_5_1_CODEX="gpt-5.1-codex",e.GPT_5_1_CODEX_MAX="gpt-5.1-codex-max",e.GPT_5_1_CODEX_MINI="gpt-5.1-codex-mini",e.GPT_5="gpt-5",e.GPT_5_MINI="gpt-5-mini",e.GPT_5_NANO="gpt-5-nano",e.GPT_5_PRO="gpt-5-pro",e.GPT_5_CHAT_LATEST="gpt-5-chat-latest",e.GPT_5_CODEX="gpt-5-codex",e.GPT_OSS_120B="gpt-oss-120b",e.GPT_OSS_20B="gpt-oss-20b",e.GPT_4_1="gpt-4.1",e.GPT_4_1_MINI="gpt-4.1-mini",e.GPT_4_1_NANO="gpt-4.1-nano",e.GPT_4O="gpt-4o",e.GPT_4O_MINI="gpt-4o-mini",e.O3="o3",e.O3_MINI="o3-mini",e.O3_PRO="o3-pro",e.O4_MINI="o4-mini",e.O1="o1",e.O1_PREVIEW="o1-preview",e.O1_MINI="o1-mini",e.GPT_4="gpt-4",e.GPT_4_TURBO="gpt-4-turbo",e.GPT_3_5_TURBO="gpt-3.5-turbo",e.GPT_IMAGE_1="gpt-image-1",e.DALL_E_3="dall-e-3",e.DALL_E_2="dall-e-2",e))(Q$||{}),e3=(e=>(e.CLAUDE_4_6_OPUS="claude-opus-4-6",e.CLAUDE_4_6_SONNET="claude-sonnet-4-6",e.CLAUDE_4_5_OPUS="claude-opus-4-5@20251101",e.CLAUDE_4_5_SONNET="claude-sonnet-4-5@20250929",e.CLAUDE_4_5_HAIKU="claude-haiku-4-5@20251001",e.CLAUDE_4_0_SONNET="claude-sonnet-4@20250514",e.CLAUDE_4_0_OPUS="claude-opus-4@20250514",e.CLAUDE_3_7_SONNET="claude-3-7-sonnet@20250219",e.CLAUDE_3_5_SONNET="claude-3-5-sonnet-20241022",e.CLAUDE_3_5_HAIKU="claude-3-5-haiku-20241022",e.CLAUDE_3_SONNET="claude-3-sonnet-20240229",e.CLAUDE_3_OPUS="claude-3-opus-20240229",e.CLAUDE_3_HAIKU="claude-3-haiku-20240307",e.GEMINI_3_1_PRO_PREVIEW="gemini-3.1-pro-preview",e.GEMINI_3_1_FLASH_LITE_PREVIEW="gemini-3.1-flash-lite-preview",e.GEMINI_3_1_FLASH_IMAGE_PREVIEW="gemini-3.1-flash-image-preview",e.GEMINI_3_1_PRO_PREVIEW_CUSTOMTOOLS="gemini-3.1-pro-preview-customtools",e.GEMINI_3_FLASH_PREVIEW="gemini-3-flash-preview",e.GEMINI_3_PRO_IMAGE_PREVIEW="gemini-3-pro-image-preview",e.GEMINI_3_PRO_PREVIEW="gemini-3-pro-preview",e.GEMINI_2_5_PRO="gemini-2.5-pro",e.GEMINI_2_5_FLASH="gemini-2.5-flash",e.GEMINI_2_5_FLASH_LITE="gemini-2.5-flash-lite",e.GEMINI_2_5_FLASH_IMAGE="gemini-2.5-flash-image",e.GEMINI_2_0_FLASH="gemini-2.0-flash",e.GEMINI_2_0_FLASH_001="gemini-2.0-flash-001",e.GEMINI_2_0_FLASH_LITE="gemini-2.0-flash-lite",e.GEMINI_1_5_PRO="gemini-1.5-pro-002",e.GEMINI_1_5_FLASH="gemini-1.5-flash-002",e))(e3||{}),Due=300*1e3}}),Oue,iur=S({"src/lib/providers/catalog/api-route.json"(){Oue={$schema:"./provider-catalog.schema.json",id:"api-route",displayName:"API Route",aliases:["apiroute"],tier:2,wire:{baseURL:"https://global.api-route.com/v1"},models:{default:"claude-sonnet-4-6",fallbacks:["claude-haiku-4-5","deepseek-v4-flash","gemini-3.8-flash"],defaultContextWindow:1e6,defaultMaxOutputTokens:64e3,catalog:{"claude-sonnet-4-6":{contextWindow:1e6,maxOutputTokens:64e3,vision:!0,status:"production",description:"Claude Sonnet 4.6 \u2014 flagship model with 1M context, tool calling, and multimodal vision"},"claude-haiku-4-5":{contextWindow:2e5,maxOutputTokens:32768,vision:!0,status:"production",description:"Claude Haiku 4.5 \u2014 fast, high-efficiency model with 200K context, tool calling, and vision"},"deepseek-v4-flash":{contextWindow:1e6,maxOutputTokens:64e3,vision:!1,status:"production",description:"DeepSeek V4 Flash \u2014 fast, cost-effective reasoning model with 1M context"},"deepseek-v4-pro":{contextWindow:1e6,maxOutputTokens:64e3,vision:!1,status:"production",description:"DeepSeek V4 Pro \u2014 powerful reasoning model with 1M context"},"gemini-3.8-flash":{contextWindow:1e6,maxOutputTokens:64e3,vision:!0,status:"production",description:"Gemini 3.8 Flash \u2014 high-speed multimodal model supporting image input and streaming"},"qwen3.8-flash":{contextWindow:128e3,maxOutputTokens:16384,vision:!1,status:"production",description:"Qwen 3.8 Flash \u2014 versatile, fast model for general instruction and coding tasks"},"kimi-k2.7-code":{contextWindow:256e3,maxOutputTokens:32768,vision:!1,status:"production",description:"Kimi K2.7 Code \u2014 specialized for coding and multi-step reasoning"},"glm-5.3-flash":{contextWindow:128e3,maxOutputTokens:16384,vision:!1,status:"production",description:"GLM 5.3 Flash \u2014 lightweight, fast conversational and instruction-following model"}},visionModel:"claude-sonnet-4-6",topModels:["claude-sonnet-4-6","claude-haiku-4-5","deepseek-v4-flash","gemini-3.8-flash","qwen3.8-flash"]},capabilities:{text:!0,streaming:!0,tools:!0,toolsWithStreaming:!0,structuredOutput:!0,structuredOutputWithTools:!0,embeddings:!1,thinking:!1},errorRules:[{pattern:"\u8BE5\u5206\u7EC4\u4E0B\u6A21\u578B\u65E0\u53EF\u7528\u6E20\u9053|model_not_found",class:"invalid-model",message:"Model '{model}' not found or has no available channels on API Route."},{pattern:"\u65E0\u6548\u7684\u4EE4\u724C",class:"authentication",message:"Invalid API Route API key. Check {apiKeyEnvVar}."}],setup:{url:"https://api-route.com",apiKeyFormat:null,billingPolicy:"free-tier",instructions:["1. Visit: https://api-route.com and create an account","2. Generate an API key in your console / dashboard","3. Set {apiKeyEnvVar} in your .env file"]},evidence:{rosterVerified:{date:"2026-09-17",method:"authenticated GET /v1/models",status:200},authProbe:{date:"2026-09-17",status:401},liveMatrix:{date:"2026-09-17",result:"Verified live against https://global.api-route.com/v1: GET /v1/models returned 70 models. Chat completions, streaming, function calling, streamed function calling, and structured JSON output (json_object and json_schema) verified. Multimodal vision verified on claude-sonnet-4-6, claude-haiku-4-5, and gemini-3.8-flash. Invalid API key returns 401 (\u65E0\u6548\u7684\u4EE4\u724C) and invalid model returns 503 (model_not_found)."},addedInPR:"pending"}}}}),Nue,aur=S({"src/lib/providers/catalog/baseten.json"(){Nue={$schema:"./provider-catalog.schema.json",id:"baseten",displayName:"Baseten",aliases:[],tier:2,wire:{baseURL:"https://inference.baseten.co/v1"},models:{default:"zai-org/GLM-5.3-Flash",fallbacks:["zai-org/GLM-5.3-Flash","zai-org/GLM-5.3","zai-org/GLM-5.2"],defaultContextWindow:1048576,defaultMaxOutputTokens:131072,catalog:{"openai/gpt-oss-120b":{contextWindow:128072,maxOutputTokens:128072,pricingPerMTok:{input:.1,output:.5,cachedInput:.1},vision:!1,status:"production",description:"OpenAI GPT-OSS 120B; general-purpose model with controllable reasoning"},"zai-org/GLM-4.7":{contextWindow:2e5,maxOutputTokens:2e5,pricingPerMTok:{input:.6,output:2.2,cachedInput:.12},vision:!1,status:"production",description:"GLM 4.7; fast general-purpose model with 200K context and enhanced tool use"},"moonshotai/Kimi-K2.6":{contextWindow:262e3,maxOutputTokens:262e3,pricingPerMTok:{input:.95,output:4,cachedInput:.16},vision:!1,status:"production",description:"Kimi K2.6; agentic and coding model for multi-step reasoning and tool use"},"deepseek-ai/DeepSeek-V4-Pro":{contextWindow:1048576,maxOutputTokens:262144,pricingPerMTok:{input:1.74,output:3.48,cachedInput:.145},vision:!1,status:"production",description:"DeepSeek V4 Pro; 1M-context mixture-of-experts model for agentic workflows and coding"},"nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B":{contextWindow:202800,maxOutputTokens:202800,pricingPerMTok:{input:.6,output:2.4,cachedInput:.12},vision:!1,status:"production",description:"NVIDIA Nemotron 3 Ultra; flagship reasoning and non-reasoning model for code and agentic execution"},"zai-org/GLM-5.2":{contextWindow:1048576,maxOutputTokens:262144,pricingPerMTok:{input:1.4,output:4.4,cachedInput:.14},vision:!1,status:"production",description:"GLM 5.2; 1M-context reasoning model"},"moonshotai/Kimi-K2.7-Code":{contextWindow:262e3,maxOutputTokens:262e3,pricingPerMTok:{input:.95,output:4,cachedInput:.16},vision:!1,status:"production",description:"Kimi K2.7 Code; model for complex coding, code reasoning and long-horizon development"},"deepseek-ai/DeepSeek-V4-Flash-0731":{contextWindow:1048576,maxOutputTokens:384e3,pricingPerMTok:{input:.13,output:.26,cachedInput:.028},vision:!1,status:"production",description:"DeepSeek V4 Flash 0731; fast, low-cost 1M-context mixture-of-experts model"},"thinkingmachines/inkling":{contextWindow:1048576,maxOutputTokens:32768,pricingPerMTok:{input:1,output:4.05,cachedInput:.17},vision:!1,status:"production",description:"Thinking Machines Inkling; 1M-context reasoning model"},"zai-org/GLM-5.2-Fast":{contextWindow:1048576,maxOutputTokens:262144,pricingPerMTok:{input:2.1,output:6.6,cachedInput:.21},vision:!1,status:"production",description:"GLM 5.2 Fast; 1M-context model"},"moonshotai/Kimi-K3":{contextWindow:1048576,maxOutputTokens:262144,pricingPerMTok:{input:3,output:15,cachedInput:.3},vision:!1,status:"production",description:"Kimi K3; 1M-context model"},"thinkingmachines/inkling-small":{contextWindow:1048576,maxOutputTokens:32768,pricingPerMTok:{input:.5,output:1.2,cachedInput:.1},vision:!1,status:"production",description:"Thinking Machines Inkling Small; 1M-context reasoning model"},"deepseek-ai/DeepSeek-V4-Pro-0813":{contextWindow:1048576,maxOutputTokens:262144,pricingPerMTok:{input:1.32,output:3.96,cachedInput:.132},vision:!1,status:"production",description:"DeepSeek V4 Pro 0813; dated 1M-context mixture-of-experts model for agentic workflows and coding"},"zai-org/GLM-5.3-Flash":{contextWindow:1048576,maxOutputTokens:131072,pricingPerMTok:{input:.15,output:.5,cachedInput:.03},vision:!0,status:"production",description:"Recommended - GLM 5.3 Flash; 1M-context reasoning model with live-verified image input"},"zai-org/GLM-5.3":{contextWindow:1048576,maxOutputTokens:262144,pricingPerMTok:{input:1.4,output:4.4,cachedInput:.14},vision:!1,status:"production",description:"GLM 5.3; 1M-context reasoning model"},"zai-org/GLM-5.3-Fast":{contextWindow:1048576,maxOutputTokens:262144,pricingPerMTok:{input:2.1,output:6.6,cachedInput:.21},vision:!0,status:"production",description:"GLM 5.3 Fast; 1M-context reasoning model with image input"}},visionModel:"zai-org/GLM-5.3-Flash",topModels:["zai-org/GLM-5.3-Flash","zai-org/GLM-5.3","zai-org/GLM-5.2","openai/gpt-oss-120b","deepseek-ai/DeepSeek-V4-Flash-0731"]},capabilities:{text:!0,streaming:!0,tools:!0,toolsWithStreaming:!0,structuredOutput:!0,structuredOutputWithTools:!0,embeddings:!1,thinking:!1},errorRules:[{pattern:"please check the api-key you provided",class:"authentication",message:"Invalid Baseten API key. Check {apiKeyEnvVar}. Get one at https://app.baseten.co/"}],setup:{url:"https://app.baseten.co/",apiKeyFormat:null,billingPolicy:"free-tier",instructions:["1. Visit: https://app.baseten.co/ and sign in or create a workspace","2. Review the current Baseten billing and credit terms in the console before making requests","3. Create a personal API key in the Baseten console","4. Set {apiKeyEnvVar} in your .env file"]},evidence:{rosterVerified:{date:"2026-09-03",method:"authenticated GET /v1/models",status:200},authProbe:{date:"2026-09-03",status:403},liveMatrix:null,addedInPR:"pending"}}}}),Lue,cur=S({"src/lib/providers/catalog/cerebras.json"(){Lue={$schema:"./provider-catalog.schema.json",id:"cerebras",displayName:"Cerebras",aliases:[],tier:2,wire:{baseURL:"https://api.cerebras.ai/v1"},models:{default:"gpt-oss-120b",fallbacks:["gpt-oss-120b","gemma-4-31b"],defaultContextWindow:65536,defaultMaxOutputTokens:8192,catalog:{"gpt-oss-120b":{contextWindow:65536,pricingPerMTok:{input:.35,output:.75},vision:!1,status:"production",description:"Recommended - OpenAI GPT-OSS 120B (open-weight); wafer-scale speed"},"gemma-4-31b":{contextWindow:65536,pricingPerMTok:{input:.99,output:1.49},vision:!0,status:"production",description:"Google Gemma 4 31B \u2014 vision-capable"}},visionModel:"gemma-4-31b",topModels:["gpt-oss-120b","gemma-4-31b"]},capabilities:{text:!0,streaming:!0,tools:!0,toolsWithStreaming:!0,structuredOutput:!0,structuredOutputWithTools:!1,embeddings:!1,thinking:!1},errorRules:[{status:401,pattern:"wrong_api_key|Wrong API Key|invalid_api_key",class:"authentication",message:"Invalid Cerebras API key. Check {apiKeyEnvVar}. Get one at https://cloud.cerebras.ai"}],setup:{url:"https://cloud.cerebras.ai",apiKeyFormat:null,billingPolicy:"free-with-card",instructions:["1. Visit: https://cloud.cerebras.ai","2. Sign in or create a free Cerebras account","3. Create an API key under API Keys","4. Set {apiKeyEnvVar} in your .env file"]},evidence:{rosterVerified:{date:"2026-08-27",method:"authenticated GET /v1/models"},authProbe:{date:"2026-08-26",status:401,code:"wrong_api_key"},liveMatrix:{date:"2026-08-30",result:`Both ids answer. Vision re-tested with a valid 64x64 PNG: gemma-4-31b describes it correctly, so its vision flag is now true (it was false); gpt-oss-120b answers "Content type 'image_url' is not supported by selected model".`},addedInPR:"https://github.com/juspay/neurolink/pull/1561"}}}}),Fue,lur=S({"src/lib/providers/catalog/cloudflare.json"(){Fue={$schema:"./provider-catalog.schema.json",id:"cloudflare",displayName:"Cloudflare Workers AI",aliases:["workers-ai","cf-ai"],tier:2,wire:{baseURLTemplate:"https://api.cloudflare.com/client/v4/accounts/{accountId}/ai/v1",extraCredentials:["accountId"],missingCredentialMessage:"CLOUDFLARE_ACCOUNT_ID is required (or pass credentials.cloudflare.accountId). Get the account id from https://dash.cloudflare.com/"},models:{default:"@cf/meta/llama-3.3-70b-instruct-fp8-fast",fallbackModelName:"@cf/meta/llama-3.1-8b-instruct-fast",fallbacks:["@cf/meta/llama-3.3-70b-instruct-fp8-fast","@cf/meta/llama-3.1-70b-instruct","@cf/meta/llama-3.1-8b-instruct-fast","@cf/google/gemma-2b-it-lora"],defaultContextWindow:8192,defaultMaxOutputTokens:4096,catalog:{"@cf/meta/llama-3.3-70b-instruct-fp8-fast":{enumMember:"LLAMA_3_3_70B_FAST",contextWindow:24e3,vision:!1,status:"production",description:"Recommended - Llama 3.3 70B Instruct (FP8 fast)"},"@cf/meta/llama-3.1-70b-instruct":{enumMember:"LLAMA_3_1_70B_INSTRUCT",contextWindow:24e3,vision:!1,status:"production",description:"Llama 3.1 70B Instruct"},"@cf/meta/llama-3.1-8b-instruct-fast":{enumMember:"LLAMA_3_1_8B_FAST",contextWindow:24e3,vision:!1,status:"production",description:"Llama 3.1 8B Instruct (fast)"},"@cf/meta/llama-3.2-11b-vision-instruct":{enumMember:"LLAMA_3_2_11B_VISION",contextWindow:24e3,vision:!1,status:"production",description:"Llama 3.2 11B Vision Instruct \u2014 Meta Community License accepted on the account 2026-09-02, but Cloudflare's OpenAI-compatible endpoint accepts no image input for it: an image content part is rejected (400) and a top-level image is ignored ('There is no image'). The model reads images only through the native /ai/run prompt+image shape, which this OpenAI-compatible provider does not speak, so vision stays false here"},"@cf/mistral/mistral-7b-instruct-v0.2":{enumMember:"MISTRAL_7B_INSTRUCT_V0_2",contextWindow:32768,vision:!1,status:"retired",description:"Retired 2026-08 \u2014 Cloudflare answers 'No such model'"},"@cf/qwen/qwen1.5-14b-chat-awq":{enumMember:"QWEN_1P5_14B_CHAT_AWQ",contextWindow:7500,vision:!1,status:"retired",description:"Retired 2026-08 \u2014 Cloudflare reports it was deprecated on 2025-10-01"},"@cf/google/gemma-2b-it-lora":{enumMember:"GEMMA_2B_IT_LORA",contextWindow:4096,vision:!1,status:"production",description:"Gemma 2B IT (LoRA)"}},topModels:["@cf/meta/llama-3.3-70b-instruct-fp8-fast","@cf/meta/llama-3.1-70b-instruct","@cf/meta/llama-3.1-8b-instruct-fast","@cf/google/gemma-2b-it-lora"]},capabilities:{text:!0,streaming:!0,tools:!0,toolsWithStreaming:!0,structuredOutput:!1,structuredOutputWithTools:!1,embeddings:!1,thinking:!1},errorRules:[{status:401,pattern:"Invalid API key|Authentication",class:"authentication",message:"Invalid Cloudflare API key. Use a token with Workers AI Read+Write scope. Get one at https://dash.cloudflare.com/profile/api-tokens"}],setup:{url:"https://dash.cloudflare.com/profile/api-tokens",apiKeyFormat:null,billingPolicy:"free-tier",description:"API token (Workers AI Read+Write scope)",instructions:["1. Visit: https://dash.cloudflare.com/profile/api-tokens","2. Create a token with 'Workers AI: Read + Write' scope","3. Set {apiKeyEnvVar} in your .env file","4. Also set CLOUDFLARE_ACCOUNT_ID (find it in the dashboard URL or under 'Account ID')"]},evidence:{rosterVerified:{date:"2026-08-30",method:"real chat call per id against the live account"},liveMatrix:{date:"2026-09-02",result:"Live tool round-trip verified on @cf/meta/llama-3.1-8b-instruct-fast, both non-streaming and streaming, once messageContentFormat normalization was applied; before it the follow-up turn was rejected with HTTP 400 (content sent as array/null). Of the three ids that failed, only two are actually gone: mistral-7b-instruct-v0.2 ('No such model') and qwen1.5-14b-chat-awq ('deprecated on 2025-10-01'). llama-3.2-11b-vision-instruct is alive but gated behind a one-time Community License acceptance on the account, so it answers 403 and is left production with vision false rather than retired. Update 2026-09-02: the Community License was accepted on the account; plain chat on llama-3.2-11b-vision-instruct now returns 200 on both endpoints, and the native /ai/run prompt+image call describes a 64x64 test image correctly. The OpenAI-compatible endpoint still cannot carry an image (content-part array \u2192 400, top-level image ignored), so the vision flag remains false for this provider."},addedInPR:"https://github.com/juspay/neurolink/pull/1587"},quirks:{messageContentFormat:"string"}}}}),$ue,uur=S({"src/lib/providers/catalog/deepseek.json"(){$ue={$schema:"./provider-catalog.schema.json",id:"deepseek",displayName:"DeepSeek",enumTypeName:"DeepSeekModels",aliases:["ds"],tier:2,wire:{baseURL:"https://api.deepseek.com"},models:{default:"deepseek-chat",fallbacks:["deepseek-chat","deepseek-reasoner","deepseek-v4-pro"],defaultContextWindow:1048576,defaultMaxOutputTokens:393216,catalog:{"deepseek-chat":{contextWindow:1048576,maxOutputTokens:393216,vision:!0,status:"production",description:"Alias of deepseek-flash with thinking off (DeepSeek-V4.1-Flash)"},"deepseek-reasoner":{contextWindow:1048576,maxOutputTokens:393216,vision:!0,status:"production",description:"Alias of deepseek-flash with thinking on (DeepSeek-V4.1-Flash)"},"deepseek-flash":{contextWindow:1048576,maxOutputTokens:393216,vision:!0,status:"production",description:"DeepSeek-V4.1-Flash \u2014 thinking on by default, image input"},"deepseek-v4-pro":{contextWindow:1048576,maxOutputTokens:393216,vision:!1,status:"production",description:"DeepSeek-V4-Pro-0813 \u2014 thinking on by default, text only"}}},capabilities:{text:!0,streaming:!0,tools:!0,toolsWithStreaming:!0,structuredOutput:!0,structuredOutputWithTools:!0,embeddings:!1,thinking:!0},errorRules:[{status:401,pattern:"Invalid API key|Authentication",class:"authentication",message:"Invalid DeepSeek API key. Please check your {apiKeyEnvVar} environment variable."},{status:402,pattern:"Insufficient Balance|insufficient_balance",class:"provider",message:"DeepSeek account has insufficient balance. Top up at https://platform.deepseek.com/usage"},{pattern:"supported API model names|model_not_found",class:"invalid-model",message:"DeepSeek model '{model}' not found. Use 'deepseek-flash' or 'deepseek-v4-pro'."}],quirks:{responseFormatDowngrade:"json-schema-to-json-object",replayReasoningContent:!0},setup:{url:"https://platform.deepseek.com/api_keys",apiKeyFormat:null,billingPolicy:"no-free-tier",instructions:["1. Visit: https://platform.deepseek.com/api_keys","2. Create or sign in to your DeepSeek account","3. Generate a new API key","4. Set {apiKeyEnvVar} in your .env file"]},evidence:{rosterVerified:{date:"2026-09-24",method:"Live against api.deepseek.com on 2026-09-24. GET /models lists only deepseek-flash and deepseek-v4-pro, with context_window 1048576 and max_output_tokens 393216 (the pricing page's 1M / 384K). deepseek-chat and deepseek-reasoner still answer 200 but report model deepseek-flash \u2014 deepseek-chat without reasoning_content, deepseek-reasoner with it \u2014 so both stay production as aliases rather than being marked retired. Vision was probed with a solid-blue PNG: deepseek-flash, deepseek-chat and deepseek-reasoner all named the colour; deepseek-v4-pro answered 200 but described a scene that was not in the image, so it keeps vision false, matching the pricing page. An unknown model id returns 400 'The supported API model names are \u2026' with code invalid_request_error \u2014 never 'model_not_found' \u2014 so the invalid-model rule now matches that text. tools plus response_format json_object in one request returned 200 with tool_calls, confirming structuredOutputWithTools. billingPolicy is not re-verified."},liveMatrix:null,addedInPR:"TBD \u2014 integration-tested in a worktree before a PR was opened"}}}}),Uue,dur=S({"src/lib/providers/catalog/fireworks.json"(){Uue={$schema:"./provider-catalog.schema.json",id:"fireworks",displayName:"Fireworks AI",aliases:[],tier:2,wire:{baseURL:"https://api.fireworks.ai/inference/v1"},models:{default:"accounts/fireworks/models/kimi-k2p6",fallbackModelName:"accounts/fireworks/models/gpt-oss-120b",fallbacks:["accounts/fireworks/models/kimi-k2p6","accounts/fireworks/models/gpt-oss-120b","accounts/fireworks/models/kimi-k3","accounts/fireworks/models/qwen3p8-max","accounts/fireworks/models/glm-5p3"],defaultContextWindow:128e3,defaultMaxOutputTokens:4096,catalog:{"accounts/fireworks/models/kimi-k2p6":{enumMember:"KIMI_K2P6",vision:!0,status:"production",description:"Recommended - Kimi K2.6, Moonshot flagship; vision-capable"},"accounts/fireworks/models/gpt-oss-120b":{enumMember:"GPT_OSS_120B",vision:!1,status:"production",description:"GPT-OSS 120B \u2014 Apache-2.0 OpenAI weights"},"accounts/fireworks/models/kimi-k3":{enumMember:"KIMI_K3",vision:!0,status:"production",description:"Kimi K3 \u2014 newest Moonshot generation; vision-capable"},"accounts/fireworks/models/qwen3p8-max":{enumMember:"QWEN3P8_MAX",vision:!0,status:"production",description:"Qwen 3.8 Max \u2014 vision-capable"},"accounts/fireworks/models/glm-5p3":{enumMember:"GLM_5P3",vision:!1,status:"production",description:"GLM 5.3 \u2014 Zhipu flagship"},"accounts/fireworks/models/minimax-m3":{enumMember:"MINIMAX_M3",vision:!1,status:"production",description:"MiniMax M3"},"accounts/fireworks/models/deepseek-v4-flash-0731":{enumMember:"DEEPSEEK_V4_FLASH_0731",vision:!1,status:"production",description:"DeepSeek V4 Flash \u2014 low-latency DeepSeek"},"accounts/fireworks/models/deepseek-v4-pro":{enumMember:"DEEPSEEK_V4_PRO",vision:!1,status:"retired",description:"Retired 2026-08 as a usable id \u2014 still on the Fireworks roster but never answers: a real chat call hangs past 120s on this account"},"accounts/fireworks/models/glm-5p1":{enumMember:"GLM_5P1",vision:!1,status:"retired",description:"Retired 2026-08 \u2014 Fireworks returns 404 'not deployed'"},"accounts/fireworks/models/glm-5":{enumMember:"GLM_5",vision:!1,status:"retired",description:"Retired 2026-08 \u2014 Fireworks returns 404 'not deployed'"},"accounts/fireworks/models/kimi-k2p5":{enumMember:"KIMI_K2P5",vision:!1,status:"retired",description:"Retired 2026-08 \u2014 Fireworks returns 404 'not deployed'"},"accounts/fireworks/models/llama-v3p2-90b-vision-instruct":{enumMember:"LLAMA_V3P2_90B_VISION_INSTRUCT",vision:!1,status:"retired",description:"Retired 2026-08 \u2014 Fireworks returns 404 'not deployed'"},"accounts/fireworks/models/llama-v3p2-11b-vision-instruct":{enumMember:"LLAMA_V3P2_11B_VISION_INSTRUCT",vision:!1,status:"retired",description:"Retired 2026-08 \u2014 Fireworks returns 404 'not deployed'"},"accounts/fireworks/models/phi-3-vision-128k-instruct":{enumMember:"PHI_3_VISION_128K_INSTRUCT",vision:!1,status:"retired",description:"Retired 2026-08 \u2014 Fireworks returns 404 'not deployed'"}},topModels:["accounts/fireworks/models/kimi-k2p6","accounts/fireworks/models/gpt-oss-120b","accounts/fireworks/models/kimi-k3","accounts/fireworks/models/qwen3p8-max"]},capabilities:{text:!0,streaming:!0,tools:!0,toolsWithStreaming:!0,structuredOutput:!0,structuredOutputWithTools:!0,embeddings:!1,thinking:!1},errorRules:[{status:401,pattern:"Invalid API key|Authentication",class:"authentication",message:"Invalid Fireworks API key. Get one at https://fireworks.ai/account/api-keys"}],setup:{url:"https://fireworks.ai/account/api-keys",apiKeyFormat:null,billingPolicy:"free-with-card",instructions:["1. Visit: https://fireworks.ai/account/api-keys","2. Sign in to your Fireworks AI account","3. Create a new API key","4. Set {apiKeyEnvVar} in your .env file"]},evidence:{rosterVerified:{date:"2026-08-30",method:"GET /models against the live account, cross-checked with a real chat call per id"},liveMatrix:{date:"2026-08-30",result:"The previous default, deepseek-v4-pro, is the reason a roster listing is never sufficient evidence here: it is still listed but a real chat call hangs past 120s, so the default moved to kimi-k2p6 (200 OK). Six ids return 404 'not deployed', including all three old vision models. Vision did not disappear with them: re-tested with a valid 64x64 PNG, kimi-k2p6, kimi-k3 and qwen3p8-max all describe the image correctly, while glm-5p3 answers 'does not support image inputs'. gpt-oss-20b is listed but 404s and was therefore not added."},addedInPR:"https://github.com/juspay/neurolink/pull/1587"}}}}),Bue,mur=S({"src/lib/providers/catalog/friendli.json"(){Bue={$schema:"./provider-catalog.schema.json",id:"friendli",displayName:"FriendliAI",aliases:[],tier:2,wire:{baseURL:"https://api.friendli.ai/serverless/v1"},models:{default:"zai-org/GLM-5.3",fallbacks:["zai-org/GLM-5.3","zai-org/GLM-5.3-Flash","zai-org/GLM-5.2","zai-org/GLM-5.1","google/gemma-4-31B-it","deepseek-ai/DeepSeek-V3.2","MiniMaxAI/MiniMax-M2.5"],defaultContextWindow:1048576,defaultMaxOutputTokens:131072,catalog:{"zai-org/GLM-5.3":{contextWindow:1048576,maxOutputTokens:131072,pricingPerMTok:{input:1.4,output:4.4,cachedInput:.26},vision:!1,status:"production",description:"Recommended - Zhipu's flagship GLM-5.3, the only model in this roster that was live capability-probed end to end: a real structured tool call (finish_reason=tool_calls, 9 tool_calls deltas under streaming), SSE streaming (62 events, terminal [DONE]), and json_object structured output. A heavy internal reasoner exposed via reasoning/reasoning_content \u2014 at a small max_tokens budget the whole completion is spent on unfinished reasoning before any visible content, so give it a generous max_tokens. Rejects image/video input and rejects tools+response_format together, both HTTP 422 (see capabilities.structuredOutputWithTools). maxOutputTokens is the documented per-request output ceiling from https://friendli.ai/docs/examples/models/zai-glm-5-3/overview.md (retrieved 2026-09-09) \u2014 131,072 tokens, distinct from the 1,048,576-token context window; the authenticated roster's max_completion_tokens field reports 1048576 (equal to context) but that is not treated as the output cap. Pricing per the same page: $1.40 / $4.40 per MTok input/output, $0.26 per MTok cached input."},"zai-org/GLM-5.3-Flash":{vision:!1,status:"production",description:"Zhipu GLM-5.3 Flash \u2014 lighter/faster sibling of the default; present on the live roster (GET /serverless/v1/models, 200) but not itself capability-probed under the tight rate limit; fallback."},"zai-org/GLM-5.2":{vision:!1,status:"production",description:"Zhipu GLM-5.2 \u2014 prior GLM generation; roster-listed only, not capability-probed; fallback."},"zai-org/GLM-5.1":{vision:!1,status:"production",description:"Zhipu GLM-5.1 \u2014 prior GLM generation; roster-listed only, not capability-probed; fallback."},"google/gemma-4-31B-it":{vision:!1,status:"production",description:"Google Gemma 4 31B instruct-tuned; roster-listed only, not capability-probed; fallback."},"deepseek-ai/DeepSeek-V3.2":{vision:!1,status:"production",description:"DeepSeek V3.2; roster-listed only, not capability-probed; fallback."},"MiniMaxAI/MiniMax-M2.5":{vision:!1,status:"production",description:"MiniMax M2.5; roster-listed only, not capability-probed; fallback."}},topModels:["zai-org/GLM-5.3","zai-org/GLM-5.3-Flash","zai-org/GLM-5.2","zai-org/GLM-5.1","google/gemma-4-31B-it","deepseek-ai/DeepSeek-V3.2","MiniMaxAI/MiniMax-M2.5"]},capabilities:{text:!0,streaming:!0,tools:!0,toolsWithStreaming:!0,structuredOutput:!0,structuredOutputWithTools:!1,embeddings:!1,thinking:!1},errorRules:[{status:401,pattern:"Unauthorized|valid credential",class:"authentication",message:"Invalid Friendli API key. Check {apiKeyEnvVar}. Get one at {setupUrl}"},{status:404,pattern:`\\bModel\\s+['"][^'"\\r\\n]+['"]\\s+not\\s+found\\b`,class:"invalid-model",message:"Friendli model '{model}' not found. Pick a current model from the authenticated /serverless/v1/models roster or {setupUrl}"}],setup:{url:"https://suite.friendli.ai/",apiKeyFormat:null,billingPolicy:"free-tier",instructions:["1. Visit: https://suite.friendli.ai/ and sign in","2. Create a Personal Access Token for the serverless endpoints","3. New accounts start with trial credit; confirm current billing terms in the console before heavy use","4. Set {apiKeyEnvVar} in your .env file"],description:"OpenAI-compatible endpoint at https://api.friendli.ai/serverless/v1, serving a small zai-org GLM-family roster plus a few third-party models. Rate limits are tight \u2014 pace requests at least 20 seconds apart."},evidence:{rosterVerified:{date:"2026-09-06",method:"authenticated GET /serverless/v1/models",status:200},authProbe:{date:"2026-09-06",method:"POST /chat/completions with an invalid API key",status:401},liveMatrix:{date:"2026-09-06",result:`Probed against the default model, zai-org/GLM-5.3, via https://api.friendli.ai/serverless/v1. The first probe run used a 2s cadence, tripped Friendli's rate limit (12/16 cases 429) and is discarded entirely; this result is from a slower-paced re-run plus targeted single-call re-probes, each still hitting 429 occasionally even at ~25s spacing \u2014 Friendli's rate limits are tight, so any future live check needs generous pacing (20s+) and retry. Roster: GET /serverless/v1/models returns 200 with exactly 7 ids, all zai-org GLM family plus google/gemma-4-31B-it, deepseek-ai/DeepSeek-V3.2 and MiniMaxAI/MiniMax-M2.5 \u2014 models.fallbacks lists all 7. Wire mechanics on GLM-5.3: chat, system role, array content parts (message content IS accepted as a parts array, so no messageContentFormat quirk is declared), sampling params and max_completion_tokens all 200. Streaming: SSE, 200, 62 events, terminal [DONE] present \u2014 contentDeltas were 0 only because GLM-5.3 is a heavy reasoner that spent the small test budget entirely on reasoning/reasoning_content fields, not because streaming is broken. Tool calling: a real structured tool_call (get_time, tz argument parsed, finish_reason=tool_calls) on the first turn, a null-content assistant tool_calls turn accepted on replay, and 9 tool_calls deltas surfacing mid-SSE-stream \u2014 tools and toolsWithStreaming true; tool_choice is tolerated even with no tools declared. response_format json_object returns 200 cleanly \u2014 structuredOutput true. response_format json_schema also returns 200, but at the tested token budget the content is unfinished reasoning text rather than schema-conformant JSON \u2014 same reasoning-budget effect as above; NeuroLink's coerceJsonToSchema repair layer is the intended safety net. Sending tools and a JSON schema together in the same request is a genuine, hard rejection: HTTP 422 'The 'response_format' field cannot be set when tools are specified' \u2014 the same class of vendor exclusivity NeuroLink already handles generically for Groq via isToolsSchemaConflictError (pattern-matches the response_format+tool wording in the thrown error and retries the call without response_format), so no provider-specific quirk was added \u2014 structuredOutputWithTools is declared false. Vision: a real image part returns HTTP 422 'This model does not support image/video inputs.' \u2014 genuinely unsupported, not a rate limit; no model in this roster is marked vision:true and models.visionModel is left unset. Error shapes: bad key -> 401 {"detail":"Unauthorized. Please provide a valid credential."}; bad model -> 404 {"detail":"Model '<id>' not found."}. Only zai-org/GLM-5.3 (the declared default) was capability-probed end to end under the account's tight rate limit; the other 6 roster ids are roster-verified by id only, matching the account's usable request budget for this pass.`},addedInPR:"https://github.com/juspay/neurolink/pull/1657"}}}}),zue,pur=S({"src/lib/providers/catalog/gmicloud.json"(){zue={$schema:"./provider-catalog.schema.json",id:"gmicloud",displayName:"GMI Cloud",aliases:["gmi-cloud"],tier:2,wire:{baseURL:"https://api.gmi-serving.com/v1"},models:{default:"MiniMaxAI/MiniMax-M3",fallbacks:["MiniMaxAI/MiniMax-M3"],defaultContextWindow:1048576,defaultMaxOutputTokens:524288,catalog:{"MiniMaxAI/MiniMax-M3":{contextWindow:1048576,maxOutputTokens:524288,vision:!1,status:"production",description:"MiniMaxAI/MiniMax-M3 \u2014 live GMI Cloud-probed model"}},topModels:["MiniMaxAI/MiniMax-M3"]},capabilities:{text:!0,streaming:!0,tools:!0,toolsWithStreaming:!0,structuredOutput:!0,structuredOutputWithTools:!0,embeddings:!1,thinking:!1},errorRules:[],setup:{url:"https://console.gmicloud.ai",apiKeyFormat:"^eyJ[A-Za-z0-9_-]+\\.[A-Za-z0-9_-]+\\.[A-Za-z0-9_-]+$",billingPolicy:"free-tier",instructions:["1. Visit: https://console.gmicloud.ai","2. Sign in and select the Inference service","3. Create an API key; check Console \u2192 Inference \u2192 Model Hub for current model pricing","4. Set {apiKeyEnvVar} in your .env file"]},evidence:{rosterVerified:{date:"2026-09-03",method:"authenticated GET /v1/models",status:200},authProbe:{date:"2026-09-03",status:401},liveMatrix:{date:"2026-09-03",result:"MiniMax-M3 accepted max_completion_tokens=524288 and rejected 1048576 with an explicit 524288 limit. Structured output: the endpoint ignores response_format (json_schema and json_object both return prose with no prompt hint; raw fetch, 2026-09-03), so the SDK's structured-output fallback re-asks with the schema spelled out in the system prompt and coerces the reply \u2014 generate({ schema }) returned a schema-valid structuredData 3/3 in the prompt-fallback experiment and again in the final live proof through dist/index.js. structuredOutput and structuredOutputWithTools are declared true on that basis."},addedInPR:"pending"}}}}),que,hur=S({"src/lib/providers/catalog/groq.json"(){que={$schema:"./provider-catalog.schema.json",id:"groq",displayName:"Groq",aliases:[],tier:2,wire:{baseURL:"https://api.groq.com/openai/v1"},models:{default:"openai/gpt-oss-120b",fallbacks:["openai/gpt-oss-120b","openai/gpt-oss-20b","qwen/qwen3.8-27b","groq/compound"],defaultContextWindow:128e3,defaultMaxOutputTokens:4096,catalog:{"openai/gpt-oss-120b":{enumMember:"GPT_OSS_120B",contextWindow:131072,vision:!1,status:"production",description:"Recommended - GPT-OSS 120B, Groq's flagship open model"},"openai/gpt-oss-20b":{enumMember:"GPT_OSS_20B",contextWindow:131072,vision:!1,status:"production",description:"GPT-OSS 20B \u2014 lower latency, smaller model"},"qwen/qwen3.8-27b":{enumMember:"QWEN_3_8_27B",contextWindow:131072,vision:!0,status:"production",description:"Qwen 3.8 27B \u2014 Groq's only vision-capable model"},"qwen/qwen3.6-27b":{enumMember:"QWEN_3_6_27B",contextWindow:131072,vision:!1,status:"production",description:"Qwen 3.6 27B"},"groq/compound":{enumMember:"COMPOUND",contextWindow:131072,vision:!1,status:"production",description:"Groq Compound \u2014 agentic system with built-in tool use"},"groq/compound-mini":{enumMember:"COMPOUND_MINI",contextWindow:131072,vision:!1,status:"production",description:"Groq Compound Mini \u2014 lighter agentic system"},"allam-2-7b":{enumMember:"ALLAM_2_7B",contextWindow:4096,vision:!1,status:"production",description:"ALLaM 2 7B \u2014 Arabic-focused model"},"llama-3.3-70b-versatile":{contextWindow:131072,pricingPerMTok:{input:.59,output:.79},vision:!1,status:"retired",description:"Retired 2026-08 \u2014 Groq returns 404 'does not exist'"},"llama-3.1-8b-instant":{contextWindow:128e3,pricingPerMTok:{input:.05,output:.08},vision:!1,status:"retired",description:"Retired 2026-08 \u2014 Groq returns 404 'does not exist'"},"gemma2-9b-it":{enumMember:"GEMMA_2_9B_IT",contextWindow:8192,pricingPerMTok:{input:.2,output:.2},vision:!1,status:"retired",description:"Retired 2026-08 \u2014 Groq reports 'decommissioned'"},"mixtral-8x7b-32768":{contextWindow:32768,pricingPerMTok:{input:.24,output:.24},vision:!1,status:"retired",description:"Retired 2026-08 \u2014 Groq reports 'decommissioned'"},"llama-guard-3-8b":{contextWindow:8192,vision:!1,status:"retired",description:"Retired 2026-08 \u2014 Groq reports 'decommissioned'"},"llama-3.2-90b-vision-preview":{contextWindow:128e3,pricingPerMTok:{input:.9,output:.9},vision:!1,status:"retired",description:"Retired 2026-08 \u2014 Groq reports 'decommissioned'"},"llama-3.2-11b-vision-preview":{contextWindow:128e3,pricingPerMTok:{input:.18,output:.18},vision:!1,status:"retired",description:"Retired 2026-08 \u2014 Groq reports 'decommissioned'"}},visionModel:"qwen/qwen3.8-27b",topModels:["openai/gpt-oss-120b","openai/gpt-oss-20b","qwen/qwen3.8-27b","groq/compound"]},capabilities:{text:!0,streaming:!0,tools:!0,toolsWithStreaming:!0,structuredOutput:!0,structuredOutputWithTools:!1,embeddings:!1,thinking:!1},errorRules:[{status:401,pattern:"Invalid API key|Authentication|invalid_api_key",class:"authentication",message:"Invalid Groq API key. Check {apiKeyEnvVar}. Get one at https://console.groq.com/keys"},{pattern:"model_decommissioned",class:"invalid-model",message:"Groq model '{model}' was decommissioned. Pick a current model from https://console.groq.com/docs/models."}],quirks:{timeoutErrorClass:"provider"},setup:{url:"https://console.groq.com/keys",apiKeyFormat:null,billingPolicy:"free-tier",instructions:["1. Visit: https://console.groq.com/keys","2. Sign in to your Groq account","3. Create a new API key","4. Set {apiKeyEnvVar} in your .env file"]},evidence:{rosterVerified:{date:"2026-08-30",method:"GET /models against the live account, cross-checked with a real chat call per id"},liveMatrix:{date:"2026-08-30",result:"All 7 previously-catalogued ids are gone: Groq answers 404 'does not exist' for the llama ids and 'has been decommissioned' for gemma2/mixtral/llama-guard/llama-3.2-vision. The 7 replacements listed here each returned 200 to a real chat call. Vision was re-tested with a valid 64x64 PNG: qwen/qwen3.8-27b describes the image correctly and is the only vision-capable id; gpt-oss-120b and groq/compound reject an image part with 'messages[0].content must be a string'."},addedInPR:"https://github.com/juspay/neurolink/pull/1587"}}}}),Gue,fur=S({"src/lib/providers/catalog/huggingface.json"(){Gue={$schema:"./provider-catalog.schema.json",id:"huggingface",displayName:"HuggingFace",enumTypeName:"HuggingFaceModels",aliases:["hf"],credentialsKey:"huggingFace",tier:2,wire:{baseURL:"https://router.huggingface.co/v1",apiKeyFallbackEnvVars:["HF_TOKEN"]},models:{default:"Qwen/Qwen2.5-72B-Instruct",fallbackModelName:"meta-llama/Llama-3.1-8B-Instruct",fallbacks:["meta-llama/Llama-3.1-8B-Instruct"],testModel:"meta-llama/Llama-3.1-8B-Instruct",topModels:["meta-llama/Llama-3.3-70B-Instruct","zai-org/GLM-5","deepseek-ai/DeepSeek-R1","Qwen/Qwen2.5-72B-Instruct","microsoft/phi-4","google/gemma-3-27b-it"],defaultContextWindow:32e3,defaultMaxOutputTokens:32e3,catalog:{"meta-llama/Llama-3.3-70B-Instruct":{vision:!1,status:"production",description:"Recommended - Latest Llama",enumMember:"LLAMA_3_3_70B_INSTRUCT"},"meta-llama/Llama-3.2-1B":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"LLAMA_3_2_1B"},"meta-llama/Llama-3.2-3B-Instruct":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"LLAMA_3_2_3B_INSTRUCT"},"meta-llama/Llama-3.1-8B":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"LLAMA_3_1_8B"},"meta-llama/Llama-3.1-8B-Instruct":{vision:!1,status:"production",description:"Llama 3.1 8B, tool-calling capable",enumMember:"LLAMA_3_1_8B_INSTRUCT"},"meta-llama/Llama-3.1-70B-Instruct":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"LLAMA_3_1_70B_INSTRUCT"},"meta-llama/Llama-3.1-405B-Instruct":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"LLAMA_3_1_405B_INSTRUCT"},"meta-llama/Meta-Llama-3-8B-Instruct":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"LLAMA_3_8B_INSTRUCT"},"meta-llama/Meta-Llama-3-70B-Instruct":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"LLAMA_3_70B_INSTRUCT"},"mistralai/Mistral-Large-3-675B-Instruct-2512":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"MISTRAL_LARGE_3_675B"},"mistralai/Mistral-Small-3.1-24B-Instruct-2503":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"MISTRAL_SMALL_3_1_24B"},"mistralai/Mistral-Small-24B-Instruct-2501":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"MISTRAL_SMALL_24B"},"mistralai/Mistral-7B-Instruct-v0.2":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"MISTRAL_7B_INSTRUCT"},"mistralai/Mixtral-8x7B-Instruct-v0.1":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"MIXTRAL_8X7B_INSTRUCT"},"mistralai/Devstral-2":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"DEVSTRAL_2"},"Qwen/Qwen2.5-7B":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"QWEN_2_5_7B"},"Qwen/Qwen2.5-32B":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"QWEN_2_5_32B"},"Qwen/Qwen2.5-72B-Instruct":{vision:!1,status:"production",description:"Qwen flagship",enumMember:"QWEN_2_5_72B_INSTRUCT"},"Qwen/Qwen2.5-Coder-7B":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"QWEN_2_5_CODER_7B"},"Qwen/Qwen2.5-Coder-32B-Instruct":{vision:!1,status:"production",description:"Qwen 2.5 Coder \u2014 Qwen2.5-Coder-32B-Instruct",enumMember:"QWEN_2_5_CODER_32B_INSTRUCT"},"Qwen/QwQ-32B":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"QWQ_32B"},"Qwen/Qwen2.5-VL-32B-Instruct":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"QWEN_2_5_VL_32B"},"deepseek-ai/DeepSeek-R1":{vision:!1,status:"production",description:"Advanced reasoning",enumMember:"DEEPSEEK_R1"},"deepseek-ai/DeepSeek-V3":{vision:!1,status:"production",description:"DeepSeek \u2014 DeepSeek-V3",enumMember:"DEEPSEEK_V3"},"deepseek-ai/DeepSeek-V3.1":{vision:!1,status:"production",description:"DeepSeek \u2014 DeepSeek-V3.1",enumMember:"DEEPSEEK_V3_1"},"deepseek-ai/DeepSeek-V3.2-Exp":{vision:!1,status:"production",description:"DeepSeek \u2014 DeepSeek-V3.2-Exp",enumMember:"DEEPSEEK_V3_2_EXP"},"microsoft/phi-4":{vision:!1,status:"production",description:"Microsoft Phi-4",enumMember:"PHI_4"},"microsoft/Phi-4-reasoning":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"PHI_4_REASONING"},"microsoft/Phi-4-mini-instruct":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"PHI_4_MINI_INSTRUCT"},"microsoft/Phi-4-mini-reasoning":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"PHI_4_MINI_REASONING"},"microsoft/Phi-3-mini-128k-instruct":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"PHI_3_MINI_128K_INSTRUCT"},"microsoft/Phi-3-vision-128k-instruct":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"PHI_3_VISION_128K_INSTRUCT"},"google/gemma-3-270m":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"GEMMA_3_270M"},"google/gemma-3-1b-it":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"GEMMA_3_1B_IT"},"google/gemma-3-4b-it":{vision:!1,status:"production",description:"Google Gemma 3 \u2014 gemma-3-4b-it",enumMember:"GEMMA_3_4B_IT"},"google/gemma-3-12b-it":{vision:!1,status:"production",description:"Google Gemma 3 \u2014 gemma-3-12b-it",enumMember:"GEMMA_3_12B_IT"},"google/gemma-3-27b-it":{vision:!1,status:"production",description:"Google Gemma 3",enumMember:"GEMMA_3_27B_IT"},"google/gemma-2-9b":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"GEMMA_2_9B"},"google/gemma-2-27b":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"GEMMA_2_27B"},"google/gemma-2b":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"GEMMA_2B"},"google/gemma-7b":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"GEMMA_7B"},"tiiuae/falcon-40b-instruct":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"FALCON_40B_INSTRUCT"},"tiiuae/falcon-180B-chat":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"FALCON_180B_CHAT"},"bigcode/starcoder2-15b":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"STARCODER2_15B"},"codellama/CodeLlama-34b-Instruct-hf":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"CODELLAMA_34B_INSTRUCT"},"bigscience/bloom-7b1":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"BLOOM_7B1"},"bigscience/bloom-1b3":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"BLOOM_1B3"},"zai-org/GLM-5":{vision:!1,status:"production",description:"Z.AI GLM-5 (February 2026) \u2014 GLM-5",enumMember:"GLM_5"},"Qwen/Qwen3.5-397B-A17B":{vision:!1,status:"production",description:"Qwen 3.5 Multimodal (February 2026) \u2014 Qwen3.5-397B-A17B",enumMember:"QWEN_3_5_397B_A17B"},"nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-BF16":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"NEMOTRON_3_NANO_30B"},"HuggingFaceTB/SmolLM3-3B":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"SMOLLM3_3B"},"tiiuae/Falcon3-7B-Instruct":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"FALCON_3_7B_INSTRUCT"},"tiiuae/Falcon3-10B-Instruct":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"FALCON_3_10B_INSTRUCT"}}},capabilities:{text:!0,streaming:!0,tools:"model-dependent",toolsWithStreaming:!1,structuredOutput:!1,structuredOutputWithTools:!1,embeddings:!1,thinking:!1},errorRules:[{pattern:"API_TOKEN_INVALID|Invalid token",class:"authentication",message:"Invalid HuggingFace API token. Please check your {apiKeyEnvVar} environment variable."},{pattern:"rate limit",class:"rate-limit",message:"HuggingFace rate limit exceeded. Consider using a paid plan or try again later."},{pattern:"model.*not found|not found.*model",class:"invalid-model",message:`HuggingFace model '{model}' not found.
|
|
1
|
+
var Hlr=Object.create,Vx=Object.defineProperty,Vlr=Object.getOwnPropertyDescriptor,j$=Object.getOwnPropertyNames,Wlr=Object.getPrototypeOf,Klr=Object.prototype.hasOwnProperty,Hle=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),S=(e,t,r)=>function(){try{return e&&(t=(0,e[j$(e)[0]])(e=0)),t}catch(o){return console.warn("[NeuroLink:browser] module init skipped:",String(o)),e=0,t}},Ur=(e,t)=>function(){try{return t||(0,e[j$(e)[0]])((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},se=(e,t)=>{for(var r in t)Vx(e,r,{get:t[r],enumerable:!0})},Vle=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of j$(t))!Klr.call(e,o)&&o!==r&&Vx(e,o,{get:()=>t[o],enumerable:!(n=Vlr(t,o))||n.enumerable});return e},sl=(e,t,r)=>(r=e!=null?Hlr(Wlr(e)):{},Vle(t||!e||!e.__esModule?Vx(r,"default",{value:e,enumerable:!0}):r,e)),Br=e=>Vle(Vx({},"__esModule",{value:!0}),e),H$={};se(H$,{ATTR_SERVICE_NAME:()=>Sue,ATTR_SERVICE_VERSION:()=>_ue,AsyncLocalStorageContextManager:()=>Eue,BasicTracerProvider:()=>oue,BatchLogRecordProcessor:()=>yue,BatchSpanProcessor:()=>aue,DiagConsoleLogger:()=>Yle,DiagLogLevel:()=>Xle,ExportResultCode:()=>Wle,INVALID_SPAN_CONTEXT:()=>tue,JsonLogsSerializer:()=>uue,LangfuseSpanProcessor:()=>fue,LoggerProvider:()=>gue,MeterProvider:()=>vue,NodeSDK:()=>nue,NodeTracerProvider:()=>sue,OTLPLogExporter:()=>lue,OTLPMetricExporter:()=>due,OTLPTraceExporter:()=>cue,PeriodicExportingMetricReader:()=>Tue,ROOT_CONTEXT:()=>W$,SEMRESATTRS_SERVICE_NAME:()=>Cue,SEMRESATTRS_SERVICE_VERSION:()=>kue,SeverityNumber:()=>wue,SimpleSpanProcessor:()=>iue,SpanKind:()=>zr,SpanStatusCode:()=>Ue,TraceFlags:()=>Jle,ValueType:()=>Zle,W3CTraceContextPropagator:()=>bue,baggageEntryMetadataFromString:()=>rue,context:()=>fr,default:()=>Aue,diag:()=>Jx,getNodeAutoInstrumentations:()=>mue,isSpanContextValid:()=>V$,isValidSpanId:()=>eue,isValidTraceId:()=>Qle,metrics:()=>ih,parseKeyPairsIntoRecord:()=>Kle,propagation:()=>Ty,registerInstrumentations:()=>pue,resourceFromAttributes:()=>hue,trace:()=>lt});var Wx,eE,Kx,vy,lt,fr,Ty,ih,Jx,Wle,Kle,Ue,zr,Jle,Yle,Xle,Zle,V$,W$,Qle,eue,tue,rue,nue,oue,sue,iue,aue,cue,lue,uue,due,mue,pue,hue,fue,gue,yue,vue,Tue,wue,Eue,bue,Sue,_ue,Cue,kue,Aue,Xt=S({"otel-stub:@opentelemetry/api"(){Wx={setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){},isRecording(){return!1},recordException(){},spanContext(){return{traceId:"0",spanId:"0",traceFlags:0}}},eE={startSpan(){return Wx},startActiveSpan(e,t,r){return(typeof t=="function"?t:r)(Wx)}},Kx={createCounter(){return{add(){}}},createHistogram(){return{record(){}}},createUpDownCounter(){return{add(){}}},createObservableGauge(){return{addCallback(){}}}},vy={getValue(){},setValue(){return vy},deleteValue(){return vy}},lt={getTracer(){return eE},getTracerProvider(){return{getTracer(){return eE}}},setGlobalTracerProvider(){},getSpan(){return Wx},getActiveSpan(){},setSpan(e){return e},deleteSpan(e){return e},setSpanContext(e){return e},getSpanContext(){}},fr={active(){return vy},with(e,t){return t()},bind(e,t){return t},setValue(){return vy},getValue(){}},Ty={inject(){},extract(e){return e},setGlobalPropagator(){},getBaggage(){},setBaggage(e){return e},createBaggage(){return{getAllEntries(){return[]},getEntry(){},setEntry(){return this},removeEntry(){return this}}}},ih={getMeter(){return Kx},getMeterProvider(){return{getMeter(){return Kx}}},setGlobalMeterProvider(){}},Jx={setLogger(){},verbose(){},debug(){},info(){},warn(){},error(){},createComponentLogger(){return Jx}},Wle={SUCCESS:0,FAILED:1},Kle=()=>({}),Ue={UNSET:0,OK:1,ERROR:2},zr={INTERNAL:0,SERVER:1,CLIENT:2,PRODUCER:3,CONSUMER:4},Jle={NONE:0,SAMPLED:1},Yle=class{},Xle={NONE:0,ERROR:30,WARN:50,INFO:60,DEBUG:70,VERBOSE:80,ALL:9999},Zle={INT:0,DOUBLE:1},V$=()=>!1,W$=vy,Qle=()=>!1,eue=()=>!1,tue={traceId:"0",spanId:"0",traceFlags:0},rue=()=>({}),nue=class{start(){}shutdown(){return Promise.resolve()}},oue=class{constructor(){}register(){}addSpanProcessor(){}getTracer(){return eE}shutdown(){return Promise.resolve()}},sue=class{register(){}addSpanProcessor(){}getTracer(){return eE}shutdown(){return Promise.resolve()}},iue=class{onStart(){}onEnd(){}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}},aue=class{onStart(){}onEnd(){}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}},cue=class{export(){}shutdown(){return Promise.resolve()}},lue=class{export(){}shutdown(){return Promise.resolve()}},uue={serializeRequest(){throw new Error("[NeuroLink:browser] proxy OTLP log transport requires a server runtime")}},due=class{constructor(){}export(){}shutdown(){return Promise.resolve()}},mue=()=>[],pue=()=>{},hue=e=>({attributes:e||{},merge(){return this}}),fue=class{onStart(){}onEnd(){}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}},gue=class{constructor(){}getLogger(){return{emit(){}}}forceFlush(){return Promise.resolve()}shutdown(){return Promise.resolve()}},yue=class{onStart(){}onEnd(){}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}},vue=class{constructor(){}getMeter(){return Kx}addMetricReader(){}forceFlush(){return Promise.resolve()}shutdown(){return Promise.resolve()}},Tue=class{constructor(){}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}},wue={UNSPECIFIED:0,TRACE:1,TRACE2:2,TRACE3:3,TRACE4:4,DEBUG:5,DEBUG2:6,DEBUG3:7,DEBUG4:8,INFO:9,INFO2:10,INFO3:11,INFO4:12,WARN:13,WARN2:14,WARN3:15,WARN4:16,ERROR:17,ERROR2:18,ERROR3:19,ERROR4:20,FATAL:21,FATAL2:22,FATAL3:23,FATAL4:24},Eue=class{enable(){return this}disable(){return this}},bue=class{inject(){}extract(e){return e}fields(){return[]}},Sue="service.name",_ue="service.version",Cue="service.name",kue="service.version",Aue={trace:lt,context:fr,propagation:Ty,metrics:ih,diag:Jx,SpanStatusCode:Ue,SpanKind:zr}}}),Be,pr=S({"src/lib/telemetry/tracers.ts"(){"use strict";Xt(),Be={sdk:lt.getTracer("neurolink"),provider:lt.getTracer("neurolink.provider"),generation:lt.getTracer("neurolink.generation"),decision:lt.getTracer("neurolink.decision"),stream:lt.getTracer("neurolink.stream"),http:lt.getTracer("neurolink.http"),mcp:lt.getTracer("neurolink.mcp"),memory:lt.getTracer("neurolink.memory"),redis:lt.getTracer("neurolink.redis"),factory:lt.getTracer("neurolink.factory"),rag:lt.getTracer("neurolink.rag"),context:lt.getTracer("neurolink.context"),middleware:lt.getTracer("neurolink.middleware"),processor:lt.getTracer("neurolink.processor"),file:lt.getTracer("neurolink.file"),autoresearch:lt.getTracer("neurolink.autoresearch"),auth:lt.getTracer("neurolink.auth"),workflow:lt.getTracer("neurolink.workflow")}}}),Jlr,Yx,Ylr,Xlr,Zlr,Xx,xue,K$,Qlr,eur,tur,rur,J$=S({"node-stub:node:async_hooks"(){Jlr=globalThis.crypto,Yx=class{getStore(){}run(e,t,...r){return t(...r)}enterWith(){}disable(){}},Ylr=globalThis.ReadableStream||class{},Xlr=globalThis.URL,Zlr=globalThis.URLSearchParams,Xx=e=>{try{return JSON.stringify(e,null,2)}catch{return String(e)}},Xx.custom=Symbol.for("nodejs.util.inspect.custom"),Xx.colors={},Xx.styles={},xue=globalThis.TextDecoder,K$=globalThis.TextEncoder,Qlr=globalThis.performance||{now:()=>Date.now()},eur=globalThis.Buffer||class extends Uint8Array{static from(t,r){if(typeof t=="string"){const n=(r||"utf8").toLowerCase();if(n==="base64"){const o=atob(t),s=new Uint8Array(o.length);for(let i=0;i<o.length;i++)s[i]=o.charCodeAt(i);return s}if(n==="hex"){const o=new Uint8Array(t.length/2);for(let s=0;s<t.length;s+=2)o[s/2]=parseInt(t.substr(s,2),16);return o}return new K$().encode(t)}return new Uint8Array(t)}static alloc(t){return new Uint8Array(t)}static isBuffer(t){return t instanceof Uint8Array}static concat(t){const r=t.reduce((s,i)=>s+i.length,0),n=new Uint8Array(r);let o=0;for(const s of t)n.set(s,o),o+=s.length;return n}static byteLength(t,r){return r==="base64"?Math.ceil(t.length*3/4):new K$().encode(t).length}toString(t){const r=(t||"utf8").toLowerCase();if(r==="hex")return Array.from(new Uint8Array(this.buffer,this.byteOffset,this.byteLength)).map(n=>n.toString(16).padStart(2,"0")).join("");if(r==="base64"){let n="";for(let o=0;o<this.length;o++)n+=String.fromCharCode(this[o]);return btoa(n)}return new xue().decode(this)}},tur=globalThis.clearTimeout,rur=globalThis.clearInterval}});async function nur(){return eI||(eI=Promise.resolve().then(()=>(Xt(),H$)).then(e=>(tE=e,e)).catch(()=>null)),eI}function our(){const e=process.argv;return e.some((t,r)=>Y$.includes(t)&&e[r+1]==="json"||Y$.some(n=>t===`${n}=json`))}function Iue(e){if(e===null||typeof e!="object")return e;try{return structuredClone(e)}catch{return e}}function Zx(e,t){if(e.length===0)return;const r=(()=>{try{return typeof e[0]=="string"?e[0]:JSON.stringify(e[0])}catch{return"[Unserializable Object]"}})(),n=e.length===2?e[1]:e.length>2?e.slice(1):void 0;t(r,n)}var Qx,tE,eI,Rue,Y$,Mue,In,p,re,ir,z=S({"src/lib/utils/logger.ts"(){"use strict";J$(),Qx=new Yx,tE=null,eI=null,nur(),Rue={debug:"DEBUG",info:"INFO",warn:"WARN",error:"ERROR"},Y$=["--format","-f","--output-format"],Mue=class{logLevel="info";logs=[];maxLogs=1e3;isDebugMode;diagnosticsToStderr=!1;eventEmitter;scopedEmitters=new Map;constructor(){this.isDebugMode=process.argv.includes("--debug")||process.env.NEUROLINK_DEBUG==="true";const e=process.env.NEUROLINK_LOG_LEVEL?.toLowerCase();e&&["debug","info","warn","error"].includes(e)&&(this.logLevel=e)}setEventEmitter(e){this.eventEmitter=e}clearEventEmitter(e){e!==void 0&&this.eventEmitter!==e||(this.eventEmitter=void 0)}runInInstanceScope(e,t){return Qx.run(e,t)}getInstanceScope(){return Qx.getStore()}addScopedEventEmitter(e,t){const r=this.scopedEmitters.get(e);if(r){r.add(t);return}this.scopedEmitters.set(e,new Set([t]))}removeScopedEventEmitter(e,t){const r=this.scopedEmitters.get(e);r&&(r.delete(t),r.size===0&&this.scopedEmitters.delete(e))}clearScopedEventEmitters(e){this.scopedEmitters.delete(e)}setLogLevel(e){this.logLevel=e}setDiagnosticsToStderr(e){this.diagnosticsToStderr=e}shouldLog(e){if(!(process.argv.includes("--debug")||process.env.NEUROLINK_DEBUG==="true")&&e!=="error")return!1;const r=["debug","info","warn","error"];return r.indexOf(e)>=r.indexOf(this.logLevel)}getLogPrefix(e,t){return`[${e}] [NEUROLINK:${Rue[t]}]`}getTraceContext(){if(!tE)return{};try{const e=tE.trace.getSpan(tE.context.active());if(!e)return{};const t=e.spanContext();return!t||t.traceId==="00000000000000000000000000000000"?{}:{trace_id:t.traceId,span_id:t.spanId,trace_flags:String(t.traceFlags)}}catch{return{}}}serializeData(e){if(e==null||typeof e!="object")return String(e);try{return JSON.stringify(e,(t,r)=>r instanceof Error?{name:r.name,message:r.message,stack:r.stack}:r)}catch{const t=[];try{return JSON.stringify(e,function(r,n){if(n instanceof Error)return{name:n.name,message:n.message,stack:n.stack};if(typeof n=="object"&&n!==null){if(t.includes(n))return"[Circular]";t.push(n)}return n})}catch{return"[Unserializable Object]"}}}outputToConsole(e,t,r,n){const o=this.diagnosticsToStderr||our(),s={debug:o?console.error:console.debug,info:o?console.error:console.info,warn:console.warn,error:console.error}[e],i=this.getTraceContext(),a=i.trace_id?` [trace_id=${i.trace_id} span_id=${i.span_id}]`:"";n!=null?s(t+a,r,this.serializeData(n)):s(t+a,r)}log(e,t,r){if(!this.shouldLog(e))return;const n={level:e,message:t,timestamp:new Date,data:r},o=Qx.getStore(),s=o===void 0?void 0:this.scopedEmitters.get(o);if(s||this.eventEmitter){const c=n.timestamp.getTime();if(s)for(const l of s)try{l.emit("log-event",{level:e,message:t,timestamp:c,data:Iue(r)})}catch{}if(this.eventEmitter)try{this.eventEmitter.emit("log-event",{level:e,message:t,timestamp:c,data:Iue(r)})}catch{}}this.logs.push(n),this.logs.length>this.maxLogs&&(this.logs=this.logs.slice(-this.maxLogs));const i=n.timestamp.toISOString(),a=this.getLogPrefix(i,e);this.outputToConsole(e,a,t,r)}debug(e,t){this.log("debug",e,t)}info(e,t){this.log("info",e,t)}warn(e,t){this.log("warn",e,t)}error(e,t){this.log("error",e,t)}getLogs(e){return e?this.logs.filter(t=>t.level===e):[...this.logs]}clearLogs(){this.logs=[]}always(...e){console.log(...e)}alwaysStderr(...e){console.error(...e)}table(e){console.table(e)}},In=new Mue,p={debug:(...e)=>{In.shouldLog("debug")&&Zx(e,(t,r)=>In.debug(t,r))},info:(...e)=>{In.shouldLog("info")&&Zx(e,(t,r)=>In.info(t,r))},warn:(...e)=>{In.shouldLog("warn")&&Zx(e,(t,r)=>In.warn(t,r))},error:(...e)=>{In.shouldLog("error")&&Zx(e,(t,r)=>In.error(t,r))},always:(...e)=>{In.always(...e)},alwaysStderr:(...e)=>{In.alwaysStderr(...e)},table:e=>{In.table(e)},shouldLog:e=>In.shouldLog(e),setLogLevel:e=>In.setLogLevel(e),setDiagnosticsToStderr:e=>In.setDiagnosticsToStderr(e),getLogs:e=>In.getLogs(e),clearLogs:()=>In.clearLogs(),setEventEmitter:e=>In.setEventEmitter(e),clearEventEmitter:e=>In.clearEventEmitter(e),runInInstanceScope:(e,t)=>In.runInInstanceScope(e,t),getInstanceScope:()=>In.getInstanceScope(),addScopedEventEmitter:(e,t)=>In.addScopedEventEmitter(e,t),removeScopedEventEmitter:(e,t)=>In.removeScopedEventEmitter(e,t),clearScopedEventEmitters:e=>In.clearScopedEventEmitters(e)},re=In,ir=In}});function tI(e,t){if(typeof e!="string")throw new TypeError("levenshtein: operands must be strings");if(typeof t!="string")throw new TypeError("levenshtein: operands must be strings");if(e.length>gc)throw new RangeError(X$);if(t.length>gc)throw new RangeError(X$);if(e===t)return 0;if(e.length===0)return t.length;if(t.length===0)return e.length;e.length>t.length&&([e,t]=[t,e]);const r=e.length,n=t.length;let o=new Array(r+1),s=new Array(r+1);for(let i=0;i<=r;i++)o[i]=i;for(let i=1;i<=n;i++){s[0]=i;for(let a=1;a<=r;a++){const c=e[a-1]===t[i-1]?0:1;s[a]=Math.min(o[a]+1,s[a-1]+1,o[a-1]+c)}[o,s]=[s,o]}return o[r]}function sur(e,t,r){const n=r?.maxDistance??3,o=r?.limit??3,s=e.toLowerCase();if(s.length>gc)return[];const i=[];return t.forEach((a,c)=>{const l=a.toLowerCase();if(Math.abs(l.length-s.length)>n||l.length>gc)return;const u=tI(s,l);u<=n&&i.push({candidate:a,order:c,distance:u})}),i.sort((a,c)=>a.distance-c.distance||a.order-c.order).slice(0,o).map(a=>a.candidate)}var gc,X$,Pue=S({"src/lib/utils/stringDistance.ts"(){"use strict";gc=128,X$=`levenshtein: input exceeds MAX_COMPARABLE_LENGTH (${gc}); callers must skip over-limit operands rather than truncate them`}}),rI,Z$,Q$,e3,Due,t3=S({"src/lib/constants/enums.ts"(){"use strict";rI=(e=>(e.BEDROCK="bedrock",e.OPENAI="openai",e.OPENAI_COMPATIBLE="openai-compatible",e.OPENROUTER="openrouter",e.VERTEX="vertex",e.ANTHROPIC="anthropic",e.AZURE="azure",e.GOOGLE_AI="google-ai",e.OLLAMA="ollama",e.LITELLM="litellm",e.SAGEMAKER="sagemaker",e.NVIDIA_NIM="nvidia-nim",e.LM_STUDIO="lm-studio",e.LLAMACPP="llamacpp",e.API_ROUTE="api-route",e.BASETEN="baseten",e.CEREBRAS="cerebras",e.CLOUDFLARE="cloudflare",e.DEEPSEEK="deepseek",e.FIREWORKS="fireworks",e.FRIENDLI="friendli",e.GMICLOUD="gmicloud",e.GROQ="groq",e.HUGGINGFACE="huggingface",e.INCEPTION_LABS="inception-labs",e.IO_INTELLIGENCE="io-intelligence",e.MANCER="mancer",e.MISTRAL="mistral",e.MORPH="morph",e.NOVITA="novita",e.PERPLEXITY="perplexity",e.SAMBANOVA="sambanova",e.TOGETHER_AI="together-ai",e.UPSTAGE="upstage",e.XAI="xai",e.COHERE="cohere",e.REPLICATE="replicate",e.VOYAGE="voyage",e.JINA="jina",e.STABILITY="stability",e.IDEOGRAM="ideogram",e.RECRAFT="recraft",e.TYPESAFE="typesafe",e.LAYA="laya",e.AUTO="auto",e))(rI||{}),Z$=(e=>(e.CLAUDE_4_6_OPUS="anthropic.claude-opus-4-6-v1",e.CLAUDE_4_6_SONNET="anthropic.claude-sonnet-4-6",e.CLAUDE_4_5_OPUS="anthropic.claude-opus-4-5-20251101-v1:0",e.CLAUDE_4_5_SONNET="anthropic.claude-sonnet-4-5-20250929-v1:0",e.CLAUDE_4_5_HAIKU="anthropic.claude-haiku-4-5-20251001-v1:0",e.CLAUDE_4_1_OPUS="anthropic.claude-opus-4-1-20250805-v1:0",e.CLAUDE_4_SONNET="anthropic.claude-sonnet-4-20250514-v1:0",e.CLAUDE_3_7_SONNET="anthropic.claude-3-7-sonnet-20250219-v1:0",e.CLAUDE_3_5_SONNET="anthropic.claude-3-5-sonnet-20241022-v1:0",e.CLAUDE_3_5_HAIKU="anthropic.claude-3-5-haiku-20241022-v1:0",e.CLAUDE_3_SONNET="anthropic.claude-3-sonnet-20240229-v1:0",e.CLAUDE_3_HAIKU="anthropic.claude-3-haiku-20240307-v1:0",e.NOVA_PREMIER="amazon.nova-premier-v1:0",e.NOVA_PRO="amazon.nova-pro-v1:0",e.NOVA_LITE="amazon.nova-lite-v1:0",e.NOVA_MICRO="amazon.nova-micro-v1:0",e.NOVA_2_LITE="amazon.nova-2-lite-v1:0",e.NOVA_2_SONIC="amazon.nova-2-sonic-v1:0",e.NOVA_SONIC="amazon.nova-sonic-v1:0",e.NOVA_CANVAS="amazon.nova-canvas-v1:0",e.NOVA_REEL="amazon.nova-reel-v1:0",e.NOVA_REEL_V1_1="amazon.nova-reel-v1:1",e.NOVA_MULTIMODAL_EMBEDDINGS="amazon.nova-2-multimodal-embeddings-v1:0",e.TITAN_TEXT_LARGE="amazon.titan-tg1-large",e.TITAN_EMBED_TEXT_V2="amazon.titan-embed-text-v2:0",e.TITAN_EMBED_TEXT_V1="amazon.titan-embed-text-v1",e.TITAN_EMBED_G1_TEXT_02="amazon.titan-embed-g1-text-02",e.TITAN_EMBED_IMAGE_V1="amazon.titan-embed-image-v1",e.TITAN_IMAGE_GENERATOR_V2="amazon.titan-image-generator-v2:0",e.LLAMA_4_MAVERICK_17B="meta.llama4-maverick-17b-instruct-v1:0",e.LLAMA_4_SCOUT_17B="meta.llama4-scout-17b-instruct-v1:0",e.LLAMA_3_3_70B="meta.llama3-3-70b-instruct-v1:0",e.LLAMA_3_2_90B="meta.llama3-2-90b-instruct-v1:0",e.LLAMA_3_2_11B="meta.llama3-2-11b-instruct-v1:0",e.LLAMA_3_2_3B="meta.llama3-2-3b-instruct-v1:0",e.LLAMA_3_2_1B="meta.llama3-2-1b-instruct-v1:0",e.LLAMA_3_1_405B="meta.llama3-1-405b-instruct-v1:0",e.LLAMA_3_1_70B="meta.llama3-1-70b-instruct-v1:0",e.LLAMA_3_1_8B="meta.llama3-1-8b-instruct-v1:0",e.LLAMA_3_70B="meta.llama3-70b-instruct-v1:0",e.LLAMA_3_8B="meta.llama3-8b-instruct-v1:0",e.MISTRAL_LARGE_3="mistral.mistral-large-3-675b-instruct",e.MISTRAL_LARGE_2407="mistral.mistral-large-2407-v1:0",e.MISTRAL_LARGE_2402="mistral.mistral-large-2402-v1:0",e.MAGISTRAL_SMALL_2509="mistral.magistral-small-2509",e.MINISTRAL_3_14B="mistral.ministral-3-14b-instruct",e.MINISTRAL_3_8B="mistral.ministral-3-8b-instruct",e.MINISTRAL_3_3B="mistral.ministral-3-3b-instruct",e.MISTRAL_7B="mistral.mistral-7b-instruct-v0:2",e.MIXTRAL_8x7B="mistral.mixtral-8x7b-instruct-v0:1",e.PIXTRAL_LARGE_2502="mistral.pixtral-large-2502-v1:0",e.VOXTRAL_SMALL_24B="mistral.voxtral-small-24b-2507",e.VOXTRAL_MINI_3B="mistral.voxtral-mini-3b-2507",e.COHERE_COMMAND_R_PLUS="cohere.command-r-plus-v1:0",e.COHERE_COMMAND_R="cohere.command-r-v1:0",e.DEEPSEEK_R1="deepseek.r1-v1:0",e.DEEPSEEK_V3="deepseek.v3-v1:0",e.QWEN_3_235B_A22B="qwen.qwen3-235b-a22b-2507-v1:0",e.QWEN_3_CODER_480B_A35B="qwen.qwen3-coder-480b-a35b-v1:0",e.QWEN_3_CODER_30B_A3B="qwen.qwen3-coder-30b-a3b-v1:0",e.QWEN_3_32B="qwen.qwen3-32b-v1:0",e.QWEN_3_NEXT_80B_A3B="qwen.qwen3-next-80b-a3b",e.QWEN_3_VL_235B_A22B="qwen.qwen3-vl-235b-a22b",e.GEMMA_3_27B_IT="google.gemma-3-27b-it",e.GEMMA_3_12B_IT="google.gemma-3-12b-it",e.GEMMA_3_4B_IT="google.gemma-3-4b-it",e.JAMBA_1_5_LARGE="ai21.jamba-1-5-large-v1:0",e.JAMBA_1_5_MINI="ai21.jamba-1-5-mini-v1:0",e.WRITER_PALMYRA_X5="writer.palmyra-x5-v1:0",e.WRITER_PALMYRA_X4="writer.palmyra-x4-v1:0",e.MINIMAX_M2_1="minimax.minimax-m2.1",e.MINIMAX_M2="minimax.minimax-m2",e.KIMI_K2_THINKING="moonshot.kimi-k2-thinking",e.KIMI_K2_5="moonshotai.kimi-k2.5",e.NVIDIA_NEMOTRON_NANO_3_30B="nvidia.nemotron-nano-3-30b",e.NVIDIA_NEMOTRON_NANO_12B_V2="nvidia.nemotron-nano-12b-v2",e.NVIDIA_NEMOTRON_NANO_9B_V2="nvidia.nemotron-nano-9b-v2",e.OPENAI_GPT_OSS_120B="openai.gpt-oss-120b-1:0",e.OPENAI_GPT_OSS_20B="openai.gpt-oss-20b-1:0",e.GLM_4_7="zai.glm-4.7",e.GLM_4_7_FLASH="zai.glm-4.7-flash",e.COHERE_EMBED_ENGLISH_V3="cohere.embed-english-v3",e.COHERE_EMBED_MULTILINGUAL_V3="cohere.embed-multilingual-v3",e.COHERE_EMBED_V4="cohere.embed-v4:0",e.COHERE_RERANK_V3_5="cohere.rerank-v3-5:0",e.AMAZON_RERANK_V1="amazon.rerank-v1:0",e.DEVSTRAL_2_123B="mistral.devstral-2-123b",e))(Z$||{}),Q$=(e=>(e.GPT_5_3_CODEX="gpt-5.3-codex",e.GPT_5_4="gpt-5.4",e.GPT_5_4_MINI="gpt-5.4-mini",e.GPT_5_4_NANO="gpt-5.4-nano",e.GPT_5_4_PRO="gpt-5.4-pro",e.GPT_5_2="gpt-5.2",e.GPT_5_2_CHAT_LATEST="gpt-5.2-chat-latest",e.GPT_5_2_PRO="gpt-5.2-pro",e.GPT_5_2_CODEX="gpt-5.2-codex",e.GPT_5_1="gpt-5.1",e.GPT_5_1_CHAT_LATEST="gpt-5.1-chat-latest",e.GPT_5_1_CODEX="gpt-5.1-codex",e.GPT_5_1_CODEX_MAX="gpt-5.1-codex-max",e.GPT_5_1_CODEX_MINI="gpt-5.1-codex-mini",e.GPT_5="gpt-5",e.GPT_5_MINI="gpt-5-mini",e.GPT_5_NANO="gpt-5-nano",e.GPT_5_PRO="gpt-5-pro",e.GPT_5_CHAT_LATEST="gpt-5-chat-latest",e.GPT_5_CODEX="gpt-5-codex",e.GPT_OSS_120B="gpt-oss-120b",e.GPT_OSS_20B="gpt-oss-20b",e.GPT_4_1="gpt-4.1",e.GPT_4_1_MINI="gpt-4.1-mini",e.GPT_4_1_NANO="gpt-4.1-nano",e.GPT_4O="gpt-4o",e.GPT_4O_MINI="gpt-4o-mini",e.O3="o3",e.O3_MINI="o3-mini",e.O3_PRO="o3-pro",e.O4_MINI="o4-mini",e.O1="o1",e.O1_PREVIEW="o1-preview",e.O1_MINI="o1-mini",e.GPT_4="gpt-4",e.GPT_4_TURBO="gpt-4-turbo",e.GPT_3_5_TURBO="gpt-3.5-turbo",e.GPT_IMAGE_1="gpt-image-1",e.DALL_E_3="dall-e-3",e.DALL_E_2="dall-e-2",e))(Q$||{}),e3=(e=>(e.CLAUDE_4_6_OPUS="claude-opus-4-6",e.CLAUDE_4_6_SONNET="claude-sonnet-4-6",e.CLAUDE_4_5_OPUS="claude-opus-4-5@20251101",e.CLAUDE_4_5_SONNET="claude-sonnet-4-5@20250929",e.CLAUDE_4_5_HAIKU="claude-haiku-4-5@20251001",e.CLAUDE_4_0_SONNET="claude-sonnet-4@20250514",e.CLAUDE_4_0_OPUS="claude-opus-4@20250514",e.CLAUDE_3_7_SONNET="claude-3-7-sonnet@20250219",e.CLAUDE_3_5_SONNET="claude-3-5-sonnet-20241022",e.CLAUDE_3_5_HAIKU="claude-3-5-haiku-20241022",e.CLAUDE_3_SONNET="claude-3-sonnet-20240229",e.CLAUDE_3_OPUS="claude-3-opus-20240229",e.CLAUDE_3_HAIKU="claude-3-haiku-20240307",e.GEMINI_3_1_PRO_PREVIEW="gemini-3.1-pro-preview",e.GEMINI_3_1_FLASH_LITE_PREVIEW="gemini-3.1-flash-lite-preview",e.GEMINI_3_1_FLASH_IMAGE_PREVIEW="gemini-3.1-flash-image-preview",e.GEMINI_3_1_PRO_PREVIEW_CUSTOMTOOLS="gemini-3.1-pro-preview-customtools",e.GEMINI_3_FLASH_PREVIEW="gemini-3-flash-preview",e.GEMINI_3_PRO_IMAGE_PREVIEW="gemini-3-pro-image-preview",e.GEMINI_3_PRO_PREVIEW="gemini-3-pro-preview",e.GEMINI_2_5_PRO="gemini-2.5-pro",e.GEMINI_2_5_FLASH="gemini-2.5-flash",e.GEMINI_2_5_FLASH_LITE="gemini-2.5-flash-lite",e.GEMINI_2_5_FLASH_IMAGE="gemini-2.5-flash-image",e.GEMINI_2_0_FLASH="gemini-2.0-flash",e.GEMINI_2_0_FLASH_001="gemini-2.0-flash-001",e.GEMINI_2_0_FLASH_LITE="gemini-2.0-flash-lite",e.GEMINI_1_5_PRO="gemini-1.5-pro-002",e.GEMINI_1_5_FLASH="gemini-1.5-flash-002",e))(e3||{}),Due=300*1e3}}),Oue,iur=S({"src/lib/providers/catalog/api-route.json"(){Oue={$schema:"./provider-catalog.schema.json",id:"api-route",displayName:"API Route",aliases:["apiroute"],tier:2,wire:{baseURL:"https://global.api-route.com/v1"},models:{default:"claude-sonnet-4-6",fallbacks:["claude-haiku-4-5","deepseek-v4-flash","gemini-3.8-flash"],defaultContextWindow:1e6,defaultMaxOutputTokens:64e3,catalog:{"claude-sonnet-4-6":{contextWindow:1e6,maxOutputTokens:64e3,vision:!0,status:"production",description:"Claude Sonnet 4.6 \u2014 flagship model with 1M context, tool calling, and multimodal vision"},"claude-haiku-4-5":{contextWindow:2e5,maxOutputTokens:32768,vision:!0,status:"production",description:"Claude Haiku 4.5 \u2014 fast, high-efficiency model with 200K context, tool calling, and vision"},"deepseek-v4-flash":{contextWindow:1e6,maxOutputTokens:64e3,vision:!1,status:"production",description:"DeepSeek V4 Flash \u2014 fast, cost-effective reasoning model with 1M context"},"deepseek-v4-pro":{contextWindow:1e6,maxOutputTokens:64e3,vision:!1,status:"production",description:"DeepSeek V4 Pro \u2014 powerful reasoning model with 1M context"},"gemini-3.8-flash":{contextWindow:1e6,maxOutputTokens:64e3,vision:!0,status:"production",description:"Gemini 3.8 Flash \u2014 high-speed multimodal model supporting image input and streaming"},"qwen3.8-flash":{contextWindow:128e3,maxOutputTokens:16384,vision:!1,status:"production",description:"Qwen 3.8 Flash \u2014 versatile, fast model for general instruction and coding tasks"},"kimi-k2.7-code":{contextWindow:256e3,maxOutputTokens:32768,vision:!1,status:"production",description:"Kimi K2.7 Code \u2014 specialized for coding and multi-step reasoning"},"glm-5.3-flash":{contextWindow:128e3,maxOutputTokens:16384,vision:!1,status:"production",description:"GLM 5.3 Flash \u2014 lightweight, fast conversational and instruction-following model"}},visionModel:"claude-sonnet-4-6",topModels:["claude-sonnet-4-6","claude-haiku-4-5","deepseek-v4-flash","gemini-3.8-flash","qwen3.8-flash"]},capabilities:{text:!0,streaming:!0,tools:!0,toolsWithStreaming:!0,structuredOutput:!0,structuredOutputWithTools:!1,embeddings:!1,thinking:!1},errorRules:[{pattern:"\u8BE5\u5206\u7EC4\u4E0B\u6A21\u578B\u65E0\u53EF\u7528\u6E20\u9053|model_not_found",class:"invalid-model",message:"Model '{model}' not found or has no available channels on API Route."},{pattern:"\u65E0\u6548\u7684\u4EE4\u724C",class:"authentication",message:"Invalid API Route API key. Check {apiKeyEnvVar}."}],setup:{url:"https://api-route.com",apiKeyFormat:null,billingPolicy:"free-tier",instructions:["1. Visit: https://api-route.com and create an account","2. Generate an API key in your console / dashboard","3. Set {apiKeyEnvVar} in your .env file"]},evidence:{rosterVerified:{date:"2026-09-17",method:"authenticated GET /v1/models",status:200},authProbe:{date:"2026-09-17",status:401},liveMatrix:{date:"2026-09-17",result:"Verified live against https://global.api-route.com/v1: GET /v1/models returned 70 models. Chat completions, streaming, function calling, streamed function calling, and structured JSON output (json_object and json_schema) verified. Multimodal vision verified on claude-sonnet-4-6, claude-haiku-4-5, and gemini-3.8-flash. Invalid API key returns 401 (\u65E0\u6548\u7684\u4EE4\u724C) and invalid model returns 503 (model_not_found). Tools and response_format were only probed SEPARATELY, never together in one request, so structuredOutputWithTools is corrected to false here pending a dedicated tools_plus_schema probe \u2014 the individual passes do not demonstrate the combined capability."},addedInPR:"pending"}}}}),Nue,aur=S({"src/lib/providers/catalog/baseten.json"(){Nue={$schema:"./provider-catalog.schema.json",id:"baseten",displayName:"Baseten",aliases:[],tier:2,wire:{baseURL:"https://inference.baseten.co/v1"},models:{default:"zai-org/GLM-5.3-Flash",fallbacks:["zai-org/GLM-5.3-Flash","zai-org/GLM-5.3","zai-org/GLM-5.2"],defaultContextWindow:1048576,defaultMaxOutputTokens:131072,catalog:{"openai/gpt-oss-120b":{contextWindow:128072,maxOutputTokens:128072,pricingPerMTok:{input:.1,output:.5,cachedInput:.1},vision:!1,status:"production",description:"OpenAI GPT-OSS 120B; general-purpose model with controllable reasoning"},"zai-org/GLM-4.7":{contextWindow:2e5,maxOutputTokens:2e5,pricingPerMTok:{input:.6,output:2.2,cachedInput:.12},vision:!1,status:"production",description:"GLM 4.7; fast general-purpose model with 200K context and enhanced tool use"},"moonshotai/Kimi-K2.6":{contextWindow:262e3,maxOutputTokens:262e3,pricingPerMTok:{input:.95,output:4,cachedInput:.16},vision:!1,status:"production",description:"Kimi K2.6; agentic and coding model for multi-step reasoning and tool use"},"deepseek-ai/DeepSeek-V4-Pro":{contextWindow:1048576,maxOutputTokens:262144,pricingPerMTok:{input:1.74,output:3.48,cachedInput:.145},vision:!1,status:"production",description:"DeepSeek V4 Pro; 1M-context mixture-of-experts model for agentic workflows and coding"},"nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B":{contextWindow:202800,maxOutputTokens:202800,pricingPerMTok:{input:.6,output:2.4,cachedInput:.12},vision:!1,status:"production",description:"NVIDIA Nemotron 3 Ultra; flagship reasoning and non-reasoning model for code and agentic execution"},"zai-org/GLM-5.2":{contextWindow:1048576,maxOutputTokens:262144,pricingPerMTok:{input:1.4,output:4.4,cachedInput:.14},vision:!1,status:"production",description:"GLM 5.2; 1M-context reasoning model"},"moonshotai/Kimi-K2.7-Code":{contextWindow:262e3,maxOutputTokens:262e3,pricingPerMTok:{input:.95,output:4,cachedInput:.16},vision:!1,status:"production",description:"Kimi K2.7 Code; model for complex coding, code reasoning and long-horizon development"},"deepseek-ai/DeepSeek-V4-Flash-0731":{contextWindow:1048576,maxOutputTokens:384e3,pricingPerMTok:{input:.13,output:.26,cachedInput:.028},vision:!1,status:"production",description:"DeepSeek V4 Flash 0731; fast, low-cost 1M-context mixture-of-experts model"},"thinkingmachines/inkling":{contextWindow:1048576,maxOutputTokens:32768,pricingPerMTok:{input:1,output:4.05,cachedInput:.17},vision:!1,status:"production",description:"Thinking Machines Inkling; 1M-context reasoning model"},"zai-org/GLM-5.2-Fast":{contextWindow:1048576,maxOutputTokens:262144,pricingPerMTok:{input:2.1,output:6.6,cachedInput:.21},vision:!1,status:"production",description:"GLM 5.2 Fast; 1M-context model"},"moonshotai/Kimi-K3":{contextWindow:1048576,maxOutputTokens:262144,pricingPerMTok:{input:3,output:15,cachedInput:.3},vision:!1,status:"production",description:"Kimi K3; 1M-context model"},"thinkingmachines/inkling-small":{contextWindow:1048576,maxOutputTokens:32768,pricingPerMTok:{input:.5,output:1.2,cachedInput:.1},vision:!1,status:"production",description:"Thinking Machines Inkling Small; 1M-context reasoning model"},"deepseek-ai/DeepSeek-V4-Pro-0813":{contextWindow:1048576,maxOutputTokens:262144,pricingPerMTok:{input:1.32,output:3.96,cachedInput:.132},vision:!1,status:"production",description:"DeepSeek V4 Pro 0813; dated 1M-context mixture-of-experts model for agentic workflows and coding"},"zai-org/GLM-5.3-Flash":{contextWindow:1048576,maxOutputTokens:131072,pricingPerMTok:{input:.15,output:.5,cachedInput:.03},vision:!0,status:"production",description:"Recommended - GLM 5.3 Flash; 1M-context reasoning model with live-verified image input"},"zai-org/GLM-5.3":{contextWindow:1048576,maxOutputTokens:262144,pricingPerMTok:{input:1.4,output:4.4,cachedInput:.14},vision:!1,status:"production",description:"GLM 5.3; 1M-context reasoning model"},"zai-org/GLM-5.3-Fast":{contextWindow:1048576,maxOutputTokens:262144,pricingPerMTok:{input:2.1,output:6.6,cachedInput:.21},vision:!0,status:"production",description:"GLM 5.3 Fast; 1M-context reasoning model with image input"}},visionModel:"zai-org/GLM-5.3-Flash",topModels:["zai-org/GLM-5.3-Flash","zai-org/GLM-5.3","zai-org/GLM-5.2","openai/gpt-oss-120b","deepseek-ai/DeepSeek-V4-Flash-0731"]},capabilities:{text:!0,streaming:!0,tools:!0,toolsWithStreaming:!0,structuredOutput:!0,structuredOutputWithTools:!0,embeddings:!1,thinking:!1},errorRules:[{pattern:"please check the api-key you provided",class:"authentication",message:"Invalid Baseten API key. Check {apiKeyEnvVar}. Get one at https://app.baseten.co/"}],setup:{url:"https://app.baseten.co/",apiKeyFormat:null,billingPolicy:"free-tier",instructions:["1. Visit: https://app.baseten.co/ and sign in or create a workspace","2. Review the current Baseten billing and credit terms in the console before making requests","3. Create a personal API key in the Baseten console","4. Set {apiKeyEnvVar} in your .env file"]},evidence:{rosterVerified:{date:"2026-09-03",method:"authenticated GET /v1/models",status:200},authProbe:{date:"2026-09-03",status:403},liveMatrix:null,addedInPR:"pending"}}}}),Lue,cur=S({"src/lib/providers/catalog/cerebras.json"(){Lue={$schema:"./provider-catalog.schema.json",id:"cerebras",displayName:"Cerebras",aliases:[],tier:2,wire:{baseURL:"https://api.cerebras.ai/v1"},models:{default:"gpt-oss-120b",fallbacks:["gpt-oss-120b","gemma-4-31b"],defaultContextWindow:65536,defaultMaxOutputTokens:8192,catalog:{"gpt-oss-120b":{contextWindow:65536,pricingPerMTok:{input:.35,output:.75},vision:!1,status:"production",description:"Recommended - OpenAI GPT-OSS 120B (open-weight); wafer-scale speed"},"gemma-4-31b":{contextWindow:65536,pricingPerMTok:{input:.99,output:1.49},vision:!0,status:"production",description:"Google Gemma 4 31B \u2014 vision-capable"}},visionModel:"gemma-4-31b",topModels:["gpt-oss-120b","gemma-4-31b"]},capabilities:{text:!0,streaming:!0,tools:!0,toolsWithStreaming:!0,structuredOutput:!0,structuredOutputWithTools:!1,embeddings:!1,thinking:!1},errorRules:[{status:401,pattern:"wrong_api_key|Wrong API Key|invalid_api_key",class:"authentication",message:"Invalid Cerebras API key. Check {apiKeyEnvVar}. Get one at https://cloud.cerebras.ai"}],setup:{url:"https://cloud.cerebras.ai",apiKeyFormat:null,billingPolicy:"free-with-card",instructions:["1. Visit: https://cloud.cerebras.ai","2. Sign in or create a free Cerebras account","3. Create an API key under API Keys","4. Set {apiKeyEnvVar} in your .env file"]},evidence:{rosterVerified:{date:"2026-08-27",method:"authenticated GET /v1/models"},authProbe:{date:"2026-08-26",status:401,code:"wrong_api_key"},liveMatrix:{date:"2026-08-30",result:`Both ids answer. Vision re-tested with a valid 64x64 PNG: gemma-4-31b describes it correctly, so its vision flag is now true (it was false); gpt-oss-120b answers "Content type 'image_url' is not supported by selected model".`},addedInPR:"https://github.com/juspay/neurolink/pull/1561"}}}}),Fue,lur=S({"src/lib/providers/catalog/cloudflare.json"(){Fue={$schema:"./provider-catalog.schema.json",id:"cloudflare",displayName:"Cloudflare Workers AI",aliases:["workers-ai","cf-ai"],tier:2,wire:{baseURLTemplate:"https://api.cloudflare.com/client/v4/accounts/{accountId}/ai/v1",extraCredentials:["accountId"],missingCredentialMessage:"CLOUDFLARE_ACCOUNT_ID is required (or pass credentials.cloudflare.accountId). Get the account id from https://dash.cloudflare.com/"},models:{default:"@cf/meta/llama-3.3-70b-instruct-fp8-fast",fallbackModelName:"@cf/meta/llama-3.1-8b-instruct-fast",fallbacks:["@cf/meta/llama-3.3-70b-instruct-fp8-fast","@cf/meta/llama-3.1-70b-instruct","@cf/meta/llama-3.1-8b-instruct-fast","@cf/google/gemma-2b-it-lora"],defaultContextWindow:8192,defaultMaxOutputTokens:4096,catalog:{"@cf/meta/llama-3.3-70b-instruct-fp8-fast":{enumMember:"LLAMA_3_3_70B_FAST",contextWindow:24e3,vision:!1,status:"production",description:"Recommended - Llama 3.3 70B Instruct (FP8 fast)"},"@cf/meta/llama-3.1-70b-instruct":{enumMember:"LLAMA_3_1_70B_INSTRUCT",contextWindow:24e3,vision:!1,status:"production",description:"Llama 3.1 70B Instruct"},"@cf/meta/llama-3.1-8b-instruct-fast":{enumMember:"LLAMA_3_1_8B_FAST",contextWindow:24e3,vision:!1,status:"production",description:"Llama 3.1 8B Instruct (fast)"},"@cf/meta/llama-3.2-11b-vision-instruct":{enumMember:"LLAMA_3_2_11B_VISION",contextWindow:24e3,vision:!1,status:"production",description:"Llama 3.2 11B Vision Instruct \u2014 Meta Community License accepted on the account 2026-09-02, but Cloudflare's OpenAI-compatible endpoint accepts no image input for it: an image content part is rejected (400) and a top-level image is ignored ('There is no image'). The model reads images only through the native /ai/run prompt+image shape, which this OpenAI-compatible provider does not speak, so vision stays false here"},"@cf/mistral/mistral-7b-instruct-v0.2":{enumMember:"MISTRAL_7B_INSTRUCT_V0_2",contextWindow:32768,vision:!1,status:"retired",description:"Retired 2026-08 \u2014 Cloudflare answers 'No such model'"},"@cf/qwen/qwen1.5-14b-chat-awq":{enumMember:"QWEN_1P5_14B_CHAT_AWQ",contextWindow:7500,vision:!1,status:"retired",description:"Retired 2026-08 \u2014 Cloudflare reports it was deprecated on 2025-10-01"},"@cf/google/gemma-2b-it-lora":{enumMember:"GEMMA_2B_IT_LORA",contextWindow:4096,vision:!1,status:"production",description:"Gemma 2B IT (LoRA)"}},topModels:["@cf/meta/llama-3.3-70b-instruct-fp8-fast","@cf/meta/llama-3.1-70b-instruct","@cf/meta/llama-3.1-8b-instruct-fast","@cf/google/gemma-2b-it-lora"]},capabilities:{text:!0,streaming:!0,tools:!0,toolsWithStreaming:!0,structuredOutput:!1,structuredOutputWithTools:!1,embeddings:!1,thinking:!1},errorRules:[{status:401,pattern:"Invalid API key|Authentication",class:"authentication",message:"Invalid Cloudflare API key. Use a token with Workers AI Read+Write scope. Get one at https://dash.cloudflare.com/profile/api-tokens"}],setup:{url:"https://dash.cloudflare.com/profile/api-tokens",apiKeyFormat:null,billingPolicy:"free-tier",description:"API token (Workers AI Read+Write scope)",instructions:["1. Visit: https://dash.cloudflare.com/profile/api-tokens","2. Create a token with 'Workers AI: Read + Write' scope","3. Set {apiKeyEnvVar} in your .env file","4. Also set CLOUDFLARE_ACCOUNT_ID (find it in the dashboard URL or under 'Account ID')"]},evidence:{rosterVerified:{date:"2026-08-30",method:"real chat call per id against the live account"},liveMatrix:{date:"2026-09-02",result:"Live tool round-trip verified on @cf/meta/llama-3.1-8b-instruct-fast, both non-streaming and streaming, once messageContentFormat normalization was applied; before it the follow-up turn was rejected with HTTP 400 (content sent as array/null). Of the three ids that failed, only two are actually gone: mistral-7b-instruct-v0.2 ('No such model') and qwen1.5-14b-chat-awq ('deprecated on 2025-10-01'). llama-3.2-11b-vision-instruct is alive but gated behind a one-time Community License acceptance on the account, so it answers 403 and is left production with vision false rather than retired. Update 2026-09-02: the Community License was accepted on the account; plain chat on llama-3.2-11b-vision-instruct now returns 200 on both endpoints, and the native /ai/run prompt+image call describes a 64x64 test image correctly. The OpenAI-compatible endpoint still cannot carry an image (content-part array \u2192 400, top-level image ignored), so the vision flag remains false for this provider."},addedInPR:"https://github.com/juspay/neurolink/pull/1587"},quirks:{messageContentFormat:"string"}}}}),$ue,uur=S({"src/lib/providers/catalog/deepseek.json"(){$ue={$schema:"./provider-catalog.schema.json",id:"deepseek",displayName:"DeepSeek",enumTypeName:"DeepSeekModels",aliases:["ds"],tier:2,wire:{baseURL:"https://api.deepseek.com"},models:{default:"deepseek-chat",fallbacks:["deepseek-chat","deepseek-reasoner","deepseek-v4-pro"],defaultContextWindow:1048576,defaultMaxOutputTokens:393216,catalog:{"deepseek-chat":{contextWindow:1048576,maxOutputTokens:393216,vision:!0,status:"production",description:"Alias of deepseek-flash with thinking off (DeepSeek-V4.1-Flash)"},"deepseek-reasoner":{contextWindow:1048576,maxOutputTokens:393216,vision:!0,status:"production",description:"Alias of deepseek-flash with thinking on (DeepSeek-V4.1-Flash)"},"deepseek-flash":{contextWindow:1048576,maxOutputTokens:393216,vision:!0,status:"production",description:"DeepSeek-V4.1-Flash \u2014 thinking on by default, image input"},"deepseek-v4-pro":{contextWindow:1048576,maxOutputTokens:393216,vision:!1,status:"production",description:"DeepSeek-V4-Pro-0813 \u2014 thinking on by default, text only"}}},capabilities:{text:!0,streaming:!0,tools:!0,toolsWithStreaming:!0,structuredOutput:!0,structuredOutputWithTools:!0,embeddings:!1,thinking:!0},errorRules:[{status:401,pattern:"Invalid API key|Authentication",class:"authentication",message:"Invalid DeepSeek API key. Please check your {apiKeyEnvVar} environment variable."},{status:402,pattern:"Insufficient Balance|insufficient_balance",class:"provider",message:"DeepSeek account has insufficient balance. Top up at https://platform.deepseek.com/usage"},{pattern:"supported API model names|model_not_found",class:"invalid-model",message:"DeepSeek model '{model}' not found. Use 'deepseek-flash' or 'deepseek-v4-pro'."}],quirks:{responseFormatDowngrade:"json-schema-to-json-object",replayReasoningContent:!0},setup:{url:"https://platform.deepseek.com/api_keys",apiKeyFormat:null,billingPolicy:"no-free-tier",instructions:["1. Visit: https://platform.deepseek.com/api_keys","2. Create or sign in to your DeepSeek account","3. Generate a new API key","4. Set {apiKeyEnvVar} in your .env file"]},evidence:{rosterVerified:{date:"2026-09-24",method:"Live against api.deepseek.com on 2026-09-24. GET /models lists only deepseek-flash and deepseek-v4-pro, with context_window 1048576 and max_output_tokens 393216 (the pricing page's 1M / 384K). deepseek-chat and deepseek-reasoner still answer 200 but report model deepseek-flash \u2014 deepseek-chat without reasoning_content, deepseek-reasoner with it \u2014 so both stay production as aliases rather than being marked retired. Vision was probed with a solid-blue PNG: deepseek-flash, deepseek-chat and deepseek-reasoner all named the colour; deepseek-v4-pro answered 200 but described a scene that was not in the image, so it keeps vision false, matching the pricing page. An unknown model id returns 400 'The supported API model names are \u2026' with code invalid_request_error \u2014 never 'model_not_found' \u2014 so the invalid-model rule now matches that text. tools plus response_format json_object in one request returned 200 with tool_calls, confirming structuredOutputWithTools. billingPolicy is not re-verified."},liveMatrix:null,addedInPR:"TBD \u2014 integration-tested in a worktree before a PR was opened"}}}}),Uue,dur=S({"src/lib/providers/catalog/fireworks.json"(){Uue={$schema:"./provider-catalog.schema.json",id:"fireworks",displayName:"Fireworks AI",aliases:[],tier:2,wire:{baseURL:"https://api.fireworks.ai/inference/v1"},models:{default:"accounts/fireworks/models/kimi-k2p6",fallbackModelName:"accounts/fireworks/models/gpt-oss-120b",fallbacks:["accounts/fireworks/models/kimi-k2p6","accounts/fireworks/models/gpt-oss-120b","accounts/fireworks/models/kimi-k3","accounts/fireworks/models/qwen3p8-max","accounts/fireworks/models/glm-5p3"],defaultContextWindow:128e3,defaultMaxOutputTokens:4096,catalog:{"accounts/fireworks/models/kimi-k2p6":{enumMember:"KIMI_K2P6",vision:!0,status:"production",description:"Recommended - Kimi K2.6, Moonshot flagship; vision-capable"},"accounts/fireworks/models/gpt-oss-120b":{enumMember:"GPT_OSS_120B",vision:!1,status:"production",description:"GPT-OSS 120B \u2014 Apache-2.0 OpenAI weights"},"accounts/fireworks/models/kimi-k3":{enumMember:"KIMI_K3",vision:!0,status:"production",description:"Kimi K3 \u2014 newest Moonshot generation; vision-capable"},"accounts/fireworks/models/qwen3p8-max":{enumMember:"QWEN3P8_MAX",vision:!0,status:"production",description:"Qwen 3.8 Max \u2014 vision-capable"},"accounts/fireworks/models/glm-5p3":{enumMember:"GLM_5P3",vision:!1,status:"production",description:"GLM 5.3 \u2014 Zhipu flagship"},"accounts/fireworks/models/minimax-m3":{enumMember:"MINIMAX_M3",vision:!1,status:"production",description:"MiniMax M3"},"accounts/fireworks/models/deepseek-v4-flash-0731":{enumMember:"DEEPSEEK_V4_FLASH_0731",vision:!1,status:"production",description:"DeepSeek V4 Flash \u2014 low-latency DeepSeek"},"accounts/fireworks/models/deepseek-v4-pro":{enumMember:"DEEPSEEK_V4_PRO",vision:!1,status:"retired",description:"Retired 2026-08 as a usable id \u2014 still on the Fireworks roster but never answers: a real chat call hangs past 120s on this account"},"accounts/fireworks/models/glm-5p1":{enumMember:"GLM_5P1",vision:!1,status:"retired",description:"Retired 2026-08 \u2014 Fireworks returns 404 'not deployed'"},"accounts/fireworks/models/glm-5":{enumMember:"GLM_5",vision:!1,status:"retired",description:"Retired 2026-08 \u2014 Fireworks returns 404 'not deployed'"},"accounts/fireworks/models/kimi-k2p5":{enumMember:"KIMI_K2P5",vision:!1,status:"retired",description:"Retired 2026-08 \u2014 Fireworks returns 404 'not deployed'"},"accounts/fireworks/models/llama-v3p2-90b-vision-instruct":{enumMember:"LLAMA_V3P2_90B_VISION_INSTRUCT",vision:!1,status:"retired",description:"Retired 2026-08 \u2014 Fireworks returns 404 'not deployed'"},"accounts/fireworks/models/llama-v3p2-11b-vision-instruct":{enumMember:"LLAMA_V3P2_11B_VISION_INSTRUCT",vision:!1,status:"retired",description:"Retired 2026-08 \u2014 Fireworks returns 404 'not deployed'"},"accounts/fireworks/models/phi-3-vision-128k-instruct":{enumMember:"PHI_3_VISION_128K_INSTRUCT",vision:!1,status:"retired",description:"Retired 2026-08 \u2014 Fireworks returns 404 'not deployed'"}},topModels:["accounts/fireworks/models/kimi-k2p6","accounts/fireworks/models/gpt-oss-120b","accounts/fireworks/models/kimi-k3","accounts/fireworks/models/qwen3p8-max"]},capabilities:{text:!0,streaming:!0,tools:!0,toolsWithStreaming:!0,structuredOutput:!0,structuredOutputWithTools:!0,embeddings:!1,thinking:!1},errorRules:[{status:401,pattern:"Invalid API key|Authentication",class:"authentication",message:"Invalid Fireworks API key. Get one at https://fireworks.ai/account/api-keys"}],setup:{url:"https://fireworks.ai/account/api-keys",apiKeyFormat:null,billingPolicy:"free-with-card",instructions:["1. Visit: https://fireworks.ai/account/api-keys","2. Sign in to your Fireworks AI account","3. Create a new API key","4. Set {apiKeyEnvVar} in your .env file"]},evidence:{rosterVerified:{date:"2026-08-30",method:"GET /models against the live account, cross-checked with a real chat call per id"},liveMatrix:{date:"2026-08-30",result:"The previous default, deepseek-v4-pro, is the reason a roster listing is never sufficient evidence here: it is still listed but a real chat call hangs past 120s, so the default moved to kimi-k2p6 (200 OK). Six ids return 404 'not deployed', including all three old vision models. Vision did not disappear with them: re-tested with a valid 64x64 PNG, kimi-k2p6, kimi-k3 and qwen3p8-max all describe the image correctly, while glm-5p3 answers 'does not support image inputs'. gpt-oss-20b is listed but 404s and was therefore not added."},addedInPR:"https://github.com/juspay/neurolink/pull/1587"}}}}),Bue,mur=S({"src/lib/providers/catalog/friendli.json"(){Bue={$schema:"./provider-catalog.schema.json",id:"friendli",displayName:"FriendliAI",aliases:[],tier:2,wire:{baseURL:"https://api.friendli.ai/serverless/v1"},models:{default:"zai-org/GLM-5.3",fallbacks:["zai-org/GLM-5.3","zai-org/GLM-5.3-Flash","zai-org/GLM-5.2","zai-org/GLM-5.1","google/gemma-4-31B-it","deepseek-ai/DeepSeek-V3.2","MiniMaxAI/MiniMax-M2.5"],defaultContextWindow:1048576,defaultMaxOutputTokens:131072,catalog:{"zai-org/GLM-5.3":{contextWindow:1048576,maxOutputTokens:131072,pricingPerMTok:{input:1.4,output:4.4,cachedInput:.26},vision:!1,status:"production",description:"Recommended - Zhipu's flagship GLM-5.3, the only model in this roster that was live capability-probed end to end: a real structured tool call (finish_reason=tool_calls, 9 tool_calls deltas under streaming), SSE streaming (62 events, terminal [DONE]), and json_object structured output. A heavy internal reasoner exposed via reasoning/reasoning_content \u2014 at a small max_tokens budget the whole completion is spent on unfinished reasoning before any visible content, so give it a generous max_tokens. Rejects image/video input and rejects tools+response_format together, both HTTP 422 (see capabilities.structuredOutputWithTools). maxOutputTokens is the documented per-request output ceiling from https://friendli.ai/docs/examples/models/zai-glm-5-3/overview.md (retrieved 2026-09-09) \u2014 131,072 tokens, distinct from the 1,048,576-token context window; the authenticated roster's max_completion_tokens field reports 1048576 (equal to context) but that is not treated as the output cap. Pricing per the same page: $1.40 / $4.40 per MTok input/output, $0.26 per MTok cached input."},"zai-org/GLM-5.3-Flash":{vision:!1,status:"production",description:"Zhipu GLM-5.3 Flash \u2014 lighter/faster sibling of the default; present on the live roster (GET /serverless/v1/models, 200) but not itself capability-probed under the tight rate limit; fallback."},"zai-org/GLM-5.2":{vision:!1,status:"production",description:"Zhipu GLM-5.2 \u2014 prior GLM generation; roster-listed only, not capability-probed; fallback."},"zai-org/GLM-5.1":{vision:!1,status:"production",description:"Zhipu GLM-5.1 \u2014 prior GLM generation; roster-listed only, not capability-probed; fallback."},"google/gemma-4-31B-it":{vision:!1,status:"production",description:"Google Gemma 4 31B instruct-tuned; roster-listed only, not capability-probed; fallback."},"deepseek-ai/DeepSeek-V3.2":{vision:!1,status:"production",description:"DeepSeek V3.2; roster-listed only, not capability-probed; fallback."},"MiniMaxAI/MiniMax-M2.5":{vision:!1,status:"production",description:"MiniMax M2.5; roster-listed only, not capability-probed; fallback."}},topModels:["zai-org/GLM-5.3","zai-org/GLM-5.3-Flash","zai-org/GLM-5.2","zai-org/GLM-5.1","google/gemma-4-31B-it","deepseek-ai/DeepSeek-V3.2","MiniMaxAI/MiniMax-M2.5"]},capabilities:{text:!0,streaming:!0,tools:!0,toolsWithStreaming:!0,structuredOutput:!0,structuredOutputWithTools:!1,embeddings:!1,thinking:!1},errorRules:[{status:401,pattern:"Unauthorized|valid credential",class:"authentication",message:"Invalid Friendli API key. Check {apiKeyEnvVar}. Get one at {setupUrl}"},{status:404,pattern:`\\bModel\\s+['"][^'"\\r\\n]+['"]\\s+not\\s+found\\b`,class:"invalid-model",message:"Friendli model '{model}' not found. Pick a current model from the authenticated /serverless/v1/models roster or {setupUrl}"}],setup:{url:"https://suite.friendli.ai/",apiKeyFormat:null,billingPolicy:"free-tier",instructions:["1. Visit: https://suite.friendli.ai/ and sign in","2. Create a Personal Access Token for the serverless endpoints","3. New accounts start with trial credit; confirm current billing terms in the console before heavy use","4. Set {apiKeyEnvVar} in your .env file"],description:"OpenAI-compatible endpoint at https://api.friendli.ai/serverless/v1, serving a small zai-org GLM-family roster plus a few third-party models. Rate limits are tight \u2014 pace requests at least 20 seconds apart."},evidence:{rosterVerified:{date:"2026-09-06",method:"authenticated GET /serverless/v1/models",status:200},authProbe:{date:"2026-09-06",method:"POST /chat/completions with an invalid API key",status:401},liveMatrix:{date:"2026-09-06",result:`Probed against the default model, zai-org/GLM-5.3, via https://api.friendli.ai/serverless/v1. The first probe run used a 2s cadence, tripped Friendli's rate limit (12/16 cases 429) and is discarded entirely; this result is from a slower-paced re-run plus targeted single-call re-probes, each still hitting 429 occasionally even at ~25s spacing \u2014 Friendli's rate limits are tight, so any future live check needs generous pacing (20s+) and retry. Roster: GET /serverless/v1/models returns 200 with exactly 7 ids, all zai-org GLM family plus google/gemma-4-31B-it, deepseek-ai/DeepSeek-V3.2 and MiniMaxAI/MiniMax-M2.5 \u2014 models.fallbacks lists all 7. Wire mechanics on GLM-5.3: chat, system role, array content parts (message content IS accepted as a parts array, so no messageContentFormat quirk is declared), sampling params and max_completion_tokens all 200. Streaming: SSE, 200, 62 events, terminal [DONE] present \u2014 contentDeltas were 0 only because GLM-5.3 is a heavy reasoner that spent the small test budget entirely on reasoning/reasoning_content fields, not because streaming is broken. Tool calling: a real structured tool_call (get_time, tz argument parsed, finish_reason=tool_calls) on the first turn, a null-content assistant tool_calls turn accepted on replay, and 9 tool_calls deltas surfacing mid-SSE-stream \u2014 tools and toolsWithStreaming true; tool_choice is tolerated even with no tools declared. response_format json_object returns 200 cleanly \u2014 structuredOutput true. response_format json_schema also returns 200, but at the tested token budget the content is unfinished reasoning text rather than schema-conformant JSON \u2014 same reasoning-budget effect as above; NeuroLink's coerceJsonToSchema repair layer is the intended safety net. Sending tools and a JSON schema together in the same request is a genuine, hard rejection: HTTP 422 'The 'response_format' field cannot be set when tools are specified' \u2014 the same class of vendor exclusivity NeuroLink already handles generically for Groq via isToolsSchemaConflictError (pattern-matches the response_format+tool wording in the thrown error and retries the call without response_format), so no provider-specific quirk was added \u2014 structuredOutputWithTools is declared false. Vision: a real image part returns HTTP 422 'This model does not support image/video inputs.' \u2014 genuinely unsupported, not a rate limit; no model in this roster is marked vision:true and models.visionModel is left unset. Error shapes: bad key -> 401 {"detail":"Unauthorized. Please provide a valid credential."}; bad model -> 404 {"detail":"Model '<id>' not found."}. Only zai-org/GLM-5.3 (the declared default) was capability-probed end to end under the account's tight rate limit; the other 6 roster ids are roster-verified by id only, matching the account's usable request budget for this pass.`},addedInPR:"https://github.com/juspay/neurolink/pull/1657"}}}}),zue,pur=S({"src/lib/providers/catalog/gmicloud.json"(){zue={$schema:"./provider-catalog.schema.json",id:"gmicloud",displayName:"GMI Cloud",aliases:["gmi-cloud"],tier:2,wire:{baseURL:"https://api.gmi-serving.com/v1"},models:{default:"MiniMaxAI/MiniMax-M3",fallbacks:["MiniMaxAI/MiniMax-M3"],defaultContextWindow:1048576,defaultMaxOutputTokens:524288,catalog:{"MiniMaxAI/MiniMax-M3":{contextWindow:1048576,maxOutputTokens:524288,vision:!1,status:"production",description:"MiniMaxAI/MiniMax-M3 \u2014 live GMI Cloud-probed model"}},topModels:["MiniMaxAI/MiniMax-M3"]},capabilities:{text:!0,streaming:!0,tools:!0,toolsWithStreaming:!0,structuredOutput:!0,structuredOutputWithTools:!0,embeddings:!1,thinking:!1},errorRules:[],setup:{url:"https://console.gmicloud.ai",apiKeyFormat:"^eyJ[A-Za-z0-9_-]+\\.[A-Za-z0-9_-]+\\.[A-Za-z0-9_-]+$",billingPolicy:"free-tier",instructions:["1. Visit: https://console.gmicloud.ai","2. Sign in and select the Inference service","3. Create an API key; check Console \u2192 Inference \u2192 Model Hub for current model pricing","4. Set {apiKeyEnvVar} in your .env file"]},evidence:{rosterVerified:{date:"2026-09-03",method:"authenticated GET /v1/models",status:200},authProbe:{date:"2026-09-03",status:401},liveMatrix:{date:"2026-09-03",result:"MiniMax-M3 accepted max_completion_tokens=524288 and rejected 1048576 with an explicit 524288 limit. Structured output: the endpoint ignores response_format (json_schema and json_object both return prose with no prompt hint; raw fetch, 2026-09-03), so the SDK's structured-output fallback re-asks with the schema spelled out in the system prompt and coerces the reply \u2014 generate({ schema }) returned a schema-valid structuredData 3/3 in the prompt-fallback experiment and again in the final live proof through dist/index.js. structuredOutput and structuredOutputWithTools are declared true on that basis."},addedInPR:"pending"}}}}),que,hur=S({"src/lib/providers/catalog/groq.json"(){que={$schema:"./provider-catalog.schema.json",id:"groq",displayName:"Groq",aliases:[],tier:2,wire:{baseURL:"https://api.groq.com/openai/v1"},models:{default:"openai/gpt-oss-120b",fallbacks:["openai/gpt-oss-120b","openai/gpt-oss-20b","qwen/qwen3.8-27b","groq/compound"],defaultContextWindow:128e3,defaultMaxOutputTokens:4096,catalog:{"openai/gpt-oss-120b":{enumMember:"GPT_OSS_120B",contextWindow:131072,vision:!1,status:"production",description:"Recommended - GPT-OSS 120B, Groq's flagship open model"},"openai/gpt-oss-20b":{enumMember:"GPT_OSS_20B",contextWindow:131072,vision:!1,status:"production",description:"GPT-OSS 20B \u2014 lower latency, smaller model"},"qwen/qwen3.8-27b":{enumMember:"QWEN_3_8_27B",contextWindow:131072,vision:!0,status:"production",description:"Qwen 3.8 27B \u2014 Groq's only vision-capable model"},"qwen/qwen3.6-27b":{enumMember:"QWEN_3_6_27B",contextWindow:131072,vision:!1,status:"production",description:"Qwen 3.6 27B"},"groq/compound":{enumMember:"COMPOUND",contextWindow:131072,vision:!1,status:"production",description:"Groq Compound \u2014 agentic system with built-in tool use"},"groq/compound-mini":{enumMember:"COMPOUND_MINI",contextWindow:131072,vision:!1,status:"production",description:"Groq Compound Mini \u2014 lighter agentic system"},"allam-2-7b":{enumMember:"ALLAM_2_7B",contextWindow:4096,vision:!1,status:"production",description:"ALLaM 2 7B \u2014 Arabic-focused model"},"llama-3.3-70b-versatile":{contextWindow:131072,pricingPerMTok:{input:.59,output:.79},vision:!1,status:"retired",description:"Retired 2026-08 \u2014 Groq returns 404 'does not exist'"},"llama-3.1-8b-instant":{contextWindow:128e3,pricingPerMTok:{input:.05,output:.08},vision:!1,status:"retired",description:"Retired 2026-08 \u2014 Groq returns 404 'does not exist'"},"gemma2-9b-it":{enumMember:"GEMMA_2_9B_IT",contextWindow:8192,pricingPerMTok:{input:.2,output:.2},vision:!1,status:"retired",description:"Retired 2026-08 \u2014 Groq reports 'decommissioned'"},"mixtral-8x7b-32768":{contextWindow:32768,pricingPerMTok:{input:.24,output:.24},vision:!1,status:"retired",description:"Retired 2026-08 \u2014 Groq reports 'decommissioned'"},"llama-guard-3-8b":{contextWindow:8192,vision:!1,status:"retired",description:"Retired 2026-08 \u2014 Groq reports 'decommissioned'"},"llama-3.2-90b-vision-preview":{contextWindow:128e3,pricingPerMTok:{input:.9,output:.9},vision:!1,status:"retired",description:"Retired 2026-08 \u2014 Groq reports 'decommissioned'"},"llama-3.2-11b-vision-preview":{contextWindow:128e3,pricingPerMTok:{input:.18,output:.18},vision:!1,status:"retired",description:"Retired 2026-08 \u2014 Groq reports 'decommissioned'"}},visionModel:"qwen/qwen3.8-27b",topModels:["openai/gpt-oss-120b","openai/gpt-oss-20b","qwen/qwen3.8-27b","groq/compound"]},capabilities:{text:!0,streaming:!0,tools:!0,toolsWithStreaming:!0,structuredOutput:!0,structuredOutputWithTools:!1,embeddings:!1,thinking:!1},errorRules:[{status:401,pattern:"Invalid API key|Authentication|invalid_api_key",class:"authentication",message:"Invalid Groq API key. Check {apiKeyEnvVar}. Get one at https://console.groq.com/keys"},{pattern:"model_decommissioned",class:"invalid-model",message:"Groq model '{model}' was decommissioned. Pick a current model from https://console.groq.com/docs/models."}],quirks:{timeoutErrorClass:"provider"},setup:{url:"https://console.groq.com/keys",apiKeyFormat:null,billingPolicy:"free-tier",instructions:["1. Visit: https://console.groq.com/keys","2. Sign in to your Groq account","3. Create a new API key","4. Set {apiKeyEnvVar} in your .env file"]},evidence:{rosterVerified:{date:"2026-08-30",method:"GET /models against the live account, cross-checked with a real chat call per id"},liveMatrix:{date:"2026-08-30",result:"All 7 previously-catalogued ids are gone: Groq answers 404 'does not exist' for the llama ids and 'has been decommissioned' for gemma2/mixtral/llama-guard/llama-3.2-vision. The 7 replacements listed here each returned 200 to a real chat call. Vision was re-tested with a valid 64x64 PNG: qwen/qwen3.8-27b describes the image correctly and is the only vision-capable id; gpt-oss-120b and groq/compound reject an image part with 'messages[0].content must be a string'."},addedInPR:"https://github.com/juspay/neurolink/pull/1587"}}}}),Gue,fur=S({"src/lib/providers/catalog/huggingface.json"(){Gue={$schema:"./provider-catalog.schema.json",id:"huggingface",displayName:"HuggingFace",enumTypeName:"HuggingFaceModels",aliases:["hf"],credentialsKey:"huggingFace",tier:2,wire:{baseURL:"https://router.huggingface.co/v1",apiKeyFallbackEnvVars:["HF_TOKEN"]},models:{default:"Qwen/Qwen2.5-72B-Instruct",fallbackModelName:"meta-llama/Llama-3.1-8B-Instruct",fallbacks:["meta-llama/Llama-3.1-8B-Instruct"],testModel:"meta-llama/Llama-3.1-8B-Instruct",topModels:["meta-llama/Llama-3.3-70B-Instruct","zai-org/GLM-5","deepseek-ai/DeepSeek-R1","Qwen/Qwen2.5-72B-Instruct","microsoft/phi-4","google/gemma-3-27b-it"],defaultContextWindow:32e3,defaultMaxOutputTokens:32e3,catalog:{"meta-llama/Llama-3.3-70B-Instruct":{vision:!1,status:"production",description:"Recommended - Latest Llama",enumMember:"LLAMA_3_3_70B_INSTRUCT"},"meta-llama/Llama-3.2-1B":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"LLAMA_3_2_1B"},"meta-llama/Llama-3.2-3B-Instruct":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"LLAMA_3_2_3B_INSTRUCT"},"meta-llama/Llama-3.1-8B":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"LLAMA_3_1_8B"},"meta-llama/Llama-3.1-8B-Instruct":{vision:!1,status:"production",description:"Llama 3.1 8B, tool-calling capable",enumMember:"LLAMA_3_1_8B_INSTRUCT"},"meta-llama/Llama-3.1-70B-Instruct":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"LLAMA_3_1_70B_INSTRUCT"},"meta-llama/Llama-3.1-405B-Instruct":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"LLAMA_3_1_405B_INSTRUCT"},"meta-llama/Meta-Llama-3-8B-Instruct":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"LLAMA_3_8B_INSTRUCT"},"meta-llama/Meta-Llama-3-70B-Instruct":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"LLAMA_3_70B_INSTRUCT"},"mistralai/Mistral-Large-3-675B-Instruct-2512":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"MISTRAL_LARGE_3_675B"},"mistralai/Mistral-Small-3.1-24B-Instruct-2503":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"MISTRAL_SMALL_3_1_24B"},"mistralai/Mistral-Small-24B-Instruct-2501":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"MISTRAL_SMALL_24B"},"mistralai/Mistral-7B-Instruct-v0.2":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"MISTRAL_7B_INSTRUCT"},"mistralai/Mixtral-8x7B-Instruct-v0.1":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"MIXTRAL_8X7B_INSTRUCT"},"mistralai/Devstral-2":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"DEVSTRAL_2"},"Qwen/Qwen2.5-7B":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"QWEN_2_5_7B"},"Qwen/Qwen2.5-32B":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"QWEN_2_5_32B"},"Qwen/Qwen2.5-72B-Instruct":{vision:!1,status:"production",description:"Qwen flagship",enumMember:"QWEN_2_5_72B_INSTRUCT"},"Qwen/Qwen2.5-Coder-7B":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"QWEN_2_5_CODER_7B"},"Qwen/Qwen2.5-Coder-32B-Instruct":{vision:!1,status:"production",description:"Qwen 2.5 Coder \u2014 Qwen2.5-Coder-32B-Instruct",enumMember:"QWEN_2_5_CODER_32B_INSTRUCT"},"Qwen/QwQ-32B":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"QWQ_32B"},"Qwen/Qwen2.5-VL-32B-Instruct":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"QWEN_2_5_VL_32B"},"deepseek-ai/DeepSeek-R1":{vision:!1,status:"production",description:"Advanced reasoning",enumMember:"DEEPSEEK_R1"},"deepseek-ai/DeepSeek-V3":{vision:!1,status:"production",description:"DeepSeek \u2014 DeepSeek-V3",enumMember:"DEEPSEEK_V3"},"deepseek-ai/DeepSeek-V3.1":{vision:!1,status:"production",description:"DeepSeek \u2014 DeepSeek-V3.1",enumMember:"DEEPSEEK_V3_1"},"deepseek-ai/DeepSeek-V3.2-Exp":{vision:!1,status:"production",description:"DeepSeek \u2014 DeepSeek-V3.2-Exp",enumMember:"DEEPSEEK_V3_2_EXP"},"microsoft/phi-4":{vision:!1,status:"production",description:"Microsoft Phi-4",enumMember:"PHI_4"},"microsoft/Phi-4-reasoning":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"PHI_4_REASONING"},"microsoft/Phi-4-mini-instruct":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"PHI_4_MINI_INSTRUCT"},"microsoft/Phi-4-mini-reasoning":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"PHI_4_MINI_REASONING"},"microsoft/Phi-3-mini-128k-instruct":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"PHI_3_MINI_128K_INSTRUCT"},"microsoft/Phi-3-vision-128k-instruct":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"PHI_3_VISION_128K_INSTRUCT"},"google/gemma-3-270m":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"GEMMA_3_270M"},"google/gemma-3-1b-it":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"GEMMA_3_1B_IT"},"google/gemma-3-4b-it":{vision:!1,status:"production",description:"Google Gemma 3 \u2014 gemma-3-4b-it",enumMember:"GEMMA_3_4B_IT"},"google/gemma-3-12b-it":{vision:!1,status:"production",description:"Google Gemma 3 \u2014 gemma-3-12b-it",enumMember:"GEMMA_3_12B_IT"},"google/gemma-3-27b-it":{vision:!1,status:"production",description:"Google Gemma 3",enumMember:"GEMMA_3_27B_IT"},"google/gemma-2-9b":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"GEMMA_2_9B"},"google/gemma-2-27b":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"GEMMA_2_27B"},"google/gemma-2b":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"GEMMA_2B"},"google/gemma-7b":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"GEMMA_7B"},"tiiuae/falcon-40b-instruct":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"FALCON_40B_INSTRUCT"},"tiiuae/falcon-180B-chat":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"FALCON_180B_CHAT"},"bigcode/starcoder2-15b":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"STARCODER2_15B"},"codellama/CodeLlama-34b-Instruct-hf":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"CODELLAMA_34B_INSTRUCT"},"bigscience/bloom-7b1":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"BLOOM_7B1"},"bigscience/bloom-1b3":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"BLOOM_1B3"},"zai-org/GLM-5":{vision:!1,status:"production",description:"Z.AI GLM-5 (February 2026) \u2014 GLM-5",enumMember:"GLM_5"},"Qwen/Qwen3.5-397B-A17B":{vision:!1,status:"production",description:"Qwen 3.5 Multimodal (February 2026) \u2014 Qwen3.5-397B-A17B",enumMember:"QWEN_3_5_397B_A17B"},"nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-BF16":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"NEMOTRON_3_NANO_30B"},"HuggingFaceTB/SmolLM3-3B":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"SMOLLM3_3B"},"tiiuae/Falcon3-7B-Instruct":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"FALCON_3_7B_INSTRUCT"},"tiiuae/Falcon3-10B-Instruct":{vision:!1,status:"retired",description:"Retired 2026-09 \u2014 absent from the router's roster and rejected by a live call",enumMember:"FALCON_3_10B_INSTRUCT"}}},capabilities:{text:!0,streaming:!0,tools:"model-dependent",toolsWithStreaming:!1,structuredOutput:!1,structuredOutputWithTools:!1,embeddings:!1,thinking:!1},errorRules:[{pattern:"API_TOKEN_INVALID|Invalid token",class:"authentication",message:"Invalid HuggingFace API token. Please check your {apiKeyEnvVar} environment variable."},{pattern:"rate limit",class:"rate-limit",message:"HuggingFace rate limit exceeded. Consider using a paid plan or try again later."},{pattern:"model.*not found|not found.*model",class:"invalid-model",message:`HuggingFace model '{model}' not found.
|
|
2
2
|
|
|
3
3
|
Suggestions:
|
|
4
4
|
1. Check model name spelling
|
|
@@ -8,7 +8,7 @@ Suggestions:
|
|
|
8
8
|
Notes:
|
|
9
9
|
1. Ensure you're using a tool-capable model, e.g. meta-llama/Llama-3.3-70B-Instruct, zai-org/GLM-5 or Qwen/Qwen3.5-397B-A17B
|
|
10
10
|
2. Check that your model supports function calling
|
|
11
|
-
3. Verify tool schema format is correct`}],timeouts:{generateMs:12e4,streamMs:12e4},autoSelectPriority:10,setup:{url:"https://huggingface.co/settings/tokens",apiKeyFormat:"^hf_[A-Za-z0-9]{34,}$",billingPolicy:"free-tier",instructions:["1. Visit: https://huggingface.co/settings/tokens","2. Create or sign in to your HuggingFace account","3. Generate a new access token","4. Set {apiKeyEnvVar} in your .env file (HF_TOKEN also accepted)"]},evidence:{rosterVerified:{date:"2026-09-24",method:"Live against router.huggingface.co on 2026-09-24. GET /v1/models returned 138 models; each of the 53 catalog ids was also sent a real chat call. 39 ids are absent from the roster AND rejected with 400 ('does not exist' / 'not supported by any provider'), so they are marked retired and keep their enumMember; the other 14 are on the roster and answered 402 (the test account's monthly credits are spent), which is a billing block, not a rejection, so they stay production. No id had the two signals disagree. topModels swaps the retired Mistral-Large-3 for zai-org/GLM-5, which is on the roster. billingPolicy is free-tier per https://huggingface.co/docs/inference-providers/pricing (free users get monthly credits, no card). apiKeyFormat accepts the hf_ + 34 characters a real token has; the previous hf_ + 37 pattern rejected it. structuredOutput, toolsWithStreaming and per-model vision are left unchanged: /v1/models reports them per serving provider, and the 402 prevented a live round trip that would prove them."},liveMatrix:null,addedInPR:"TBD \u2014 integration-tested in a worktree before a PR was opened"}}}}),jue,gur=S({"src/lib/providers/catalog/inception-labs.json"(){jue={$schema:"./provider-catalog.schema.json",id:"inception-labs",displayName:"Inception Labs",aliases:["inception","mercury"],tier:2,wire:{baseURL:"https://api.inceptionlabs.ai/v1"},models:{default:"mercury-2",fallbacks:["mercury-2"],defaultContextWindow:128e3,defaultMaxOutputTokens:5e4,catalog:{"mercury-2":{contextWindow:128e3,maxOutputTokens:5e4,pricingPerMTok:{input:.25,output:.75,cachedInput:.025},vision:!1,status:"production",description:"Recommended - Mercury 2, Inception's enterprise diffusion LLM (dLLM); reasoning, tool use, structured output; 128K context, 1000+ tok/s"}}},capabilities:{text:!0,streaming:!0,tools:!0,toolsWithStreaming:!0,structuredOutput:!0,structuredOutputWithTools:!0,embeddings:!1,thinking:!1},errorRules:[{pattern:"Model must be one of the following",class:"invalid-model",message:"Inception Labs model '{model}' is not valid. Pick a current model \u2014 see https://docs.inceptionlabs.ai/get-started/models."}],setup:{url:"https://platform.inceptionlabs.ai/dashboard/api-keys",apiKeyFormat:"^sk_[A-Za-z0-9_-]+$",billingPolicy:"free-tier",instructions:["1. Visit: https://platform.inceptionlabs.ai and sign in (Google OAuth works)","2. New accounts get 100M free tokens with no card required","3. Create an API key under Dashboard -> API Keys","4. Set {apiKeyEnvVar} in your .env file"]},evidence:{rosterVerified:{date:"2026-09-03",method:"authenticated GET /v1/models",status:200},authProbe:{date:"2026-09-03",status:401,code:"invalid_api_key"},liveMatrix:{date:"2026-09-03",result:`Full capability sweep on mercury-2: chat, stream, system_role, content_text_parts, sampling_params, tools, tools_stream, tools_roundtrip_null, tool_choice_without_tools, json_object, json_schema and tools_plus_schema all 200. The smoke-test json_schema probe (max_tokens:60) came back truncated (finish_reason=length, null content) because this diffusion model spends part of the budget on reasoning tokens before content; re-probed live with max_tokens:300 and got a clean schema-conformant reply ({"name":"Lila Whitaker","age":34}, finish_reason=stop), confirming structuredOutput:true is correct. vision is 400 (text-only; rejects image_url on mercury-2, matching the vendor docs' 'Supported Formats: Text'). bad_key is 401 'Incorrect API key provided'. bad_model is 400 with an array-shaped pydantic error.message; the shared OpenAI-compat wire-error builder coerces a non-string Error message via toString, so that array becomes the literal string "[object Object]" and no regex pattern can match the real text \u2014 errorRules is intentionally left empty rather than shipping a rule that can never fire (see notes).`},addedInPR:"pending"}}}}),Hue,yur=S({"src/lib/providers/catalog/io-intelligence.json"(){Hue={$schema:"./provider-catalog.schema.json",id:"io-intelligence",displayName:"io.net Intelligence",aliases:["io-net"],tier:2,wire:{baseURL:"https://api.intelligence.io.solutions/api/v1"},models:{default:"meta-llama/Llama-3.3-70B-Instruct",fallbacks:["meta-llama/Llama-3.3-70B-Instruct","openai/gpt-oss-20b","zai-org/GLM-4.5-Air"],defaultContextWindow:128e3,defaultMaxOutputTokens:8192,catalog:{"zai-org/GLM-5.3-Flash":{contextWindow:262144,maxOutputTokens:131072,pricingPerMTok:{input:.147997,output:.49399,cachedInput:.073999},vision:!0,status:"production",description:"Z.ai: GLM 5.3 Flash"},"zai-org/GLM-5.3":{contextWindow:262144,maxOutputTokens:131072,pricingPerMTok:{input:1.39,output:4.4,cachedInput:.695},vision:!1,status:"production",description:"Z.ai: GLM 5.3"},"Qwen/Qwen3.8-27B":{contextWindow:65536,maxOutputTokens:65536,pricingPerMTok:{input:.39,output:2.99,cachedInput:.195},vision:!0,status:"production",description:"Qwen: Qwen3.8 27B"},"deepseek-ai/DeepSeek-V4-Flash-0731":{contextWindow:262100,maxOutputTokens:65536,pricingPerMTok:{input:.196,output:.534,cachedInput:.098},vision:!1,status:"production",description:"DeepSeek: DeepSeek V4 Flash 0731"},"moonshotai/Kimi-K3":{contextWindow:1048576,pricingPerMTok:{input:3.18,output:15.9,cachedInput:1.59},vision:!0,status:"production",description:"MoonshotAI: Kimi K3"},"XiaomiMiMo/MiMo-V2.5":{contextWindow:1048576,pricingPerMTok:{input:.1934,output:.6268,cachedInput:.0967},vision:!1,status:"production",description:"Xiaomi: MiMo-V2.5"},"zai-org/GLM-5.2":{contextWindow:262144,maxOutputTokens:131072,pricingPerMTok:{input:1.552,output:4.884,cachedInput:.776},vision:!1,status:"production",description:"Z.ai: GLM 5.2"},"moonshotai/Kimi-K2.7-Code":{contextWindow:262144,pricingPerMTok:{input:1.026,output:4.53,cachedInput:.513},vision:!0,status:"production",description:"MoonshotAI: Kimi K2.7 Code"},"Qwen/Qwen3.6-35B-A3B":{contextWindow:262144,pricingPerMTok:{input:.1872,output:1.24675,cachedInput:.0936},vision:!0,status:"production",description:"Qwen: Qwen3.6 35B A3B"},"Qwen/Qwen3.6-27B":{contextWindow:32768,pricingPerMTok:{input:.399,output:3.19,cachedInput:.1995},vision:!0,status:"production",description:"Qwen: Qwen3.6 27B"},"MiniMaxAI/MiniMax-M2.7":{contextWindow:262100,maxOutputTokens:65536,pricingPerMTok:{input:.426,output:1.62,cachedInput:.213},vision:!1,status:"production",description:"MiniMaxAI: MiniMax M2.7"},"deepseek-ai/DeepSeek-V4-Flash":{contextWindow:32768,maxOutputTokens:32768,pricingPerMTok:{input:.199,output:.512,cachedInput:.0995},vision:!1,status:"production",description:"DeepSeek: DeepSeek V4 Flash"},"deepseek-ai/DeepSeek-V4-Pro":{contextWindow:1048576,maxOutputTokens:6e5,pricingPerMTok:{input:1.618,output:3.288,cachedInput:.809},vision:!1,status:"production",description:"DeepSeek: DeepSeek V4 Pro"},"moonshotai/Kimi-K2.6":{contextWindow:262142,pricingPerMTok:{input:.76744,output:3.43436,cachedInput:.38372},vision:!0,status:"production",description:"MoonshotAI: Kimi K2.6"},"zai-org/GLM-5.1":{contextWindow:202750,maxOutputTokens:32768,pricingPerMTok:{input:1.29,output:4.22,cachedInput:.645},vision:!1,status:"production",description:"Z.ai: GLM 5.1"},"MiniMaxAI/MiniMax-M2.5":{contextWindow:196600,pricingPerMTok:{input:.294,output:1.176,cachedInput:.147},vision:!1,status:"production",description:"MiniMaxAI/MiniMax-M2.5"},"moonshotai/Kimi-K2.5":{contextWindow:262144,pricingPerMTok:{input:.5284,output:2.785,cachedInput:.2642},vision:!0,status:"production",description:"MoonshotAI: Kimi K2.5"},"zai-org/GLM-5":{contextWindow:202752,pricingPerMTok:{input:.85,output:2.774,cachedInput:.425},vision:!1,status:"production",description:"Z.ai: GLM 5"},"deepseek-ai/DeepSeek-V3.2":{contextWindow:163840,pricingPerMTok:{input:1.4301,output:2.4063,cachedInput:.71505},vision:!1,status:"production",description:"DeepSeek: DeepSeek V3.2"},"moonshotai/Kimi-K2-Thinking":{contextWindow:262144,pricingPerMTok:{input:.6,output:2.5,cachedInput:.3},vision:!1,status:"production",description:"MoonshotAI: Kimi K2 Thinking"},"zai-org/GLM-4.5-Air":{contextWindow:131070,pricingPerMTok:{input:.165,output:.975,cachedInput:.0825},vision:!1,status:"production",description:"Z.ai: GLM-4.5-Air"},"google/gemma-4-26b-a4b-it":{contextWindow:262142,pricingPerMTok:{input:.116,output:.38,cachedInput:.058},vision:!1,status:"production",description:"Google: Gemma 4 26B A4B"},"zai-org/GLM-4.7-Flash":{contextWindow:2e5,pricingPerMTok:{input:.062625,output:.4,cachedInput:.031313},vision:!1,status:"production",description:"Z.ai: GLM 4.7 Flash"},"zai-org/GLM-4.7":{contextWindow:202752,pricingPerMTok:{input:.88,output:2.37,cachedInput:.44},vision:!1,status:"production",description:"Z.ai: GLM 4.7"},"moonshotai/Kimi-K2-Instruct-0905":{contextWindow:262144,pricingPerMTok:{input:.57,output:2.3,cachedInput:.285},vision:!1,status:"production",description:"MoonshotAI: Kimi K2 Instruct 0905"},"openai/gpt-oss-120b":{contextWindow:131072,pricingPerMTok:{input:.188,output:.7,cachedInput:.094},vision:!1,status:"production",description:"OpenAI: gpt-oss-120b"},"deepseek-ai/DeepSeek-R1-0528":{contextWindow:128e3,pricingPerMTok:{input:.56775,output:2.279,cachedInput:.283875},vision:!1,status:"production",description:"DeepSeek: R1 0528"},"zai-org/GLM-4.6":{contextWindow:131072,pricingPerMTok:{input:.536,output:2.07,cachedInput:.268},vision:!1,status:"production",description:"Z.ai: GLM 4.6"},"Qwen/Qwen3-Next-80B-A3B-Instruct":{contextWindow:262144,pricingPerMTok:{input:.1175,output:1.136,cachedInput:.05875},vision:!1,status:"production",description:"Qwen: Qwen3 Next 80B A3B Instruct"},"Intel/Qwen3-Coder-480B-A35B-Instruct-int4-mixed-ar":{contextWindow:106e3,pricingPerMTok:{input:.445,output:2.145,cachedInput:.2225},vision:!1,status:"production",description:"Intel: Qwen3 Coder 480B A35B Instruct INT4 Mixed AR"},"meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8":{contextWindow:43e4,pricingPerMTok:{input:.274,output:.8992,cachedInput:.137},vision:!0,status:"production",description:"Meta-Llama: Llama 4 Maverick 17B 128E Instruct FP8"},"mistralai/Mistral-Nemo-Instruct-2407":{contextWindow:128e3,pricingPerMTok:{input:.0635,output:.09875,cachedInput:.03175},vision:!1,status:"production",description:"Mistral: Mistral Nemo Instruct 2407"},"openai/gpt-oss-20b":{contextWindow:64e3,pricingPerMTok:{input:.067,output:.24,cachedInput:.0335},vision:!1,status:"production",description:"OpenAI: gpt-oss-20b"},"meta-llama/Llama-3.3-70B-Instruct":{contextWindow:128e3,pricingPerMTok:{input:.6066,output:1.0386,cachedInput:.3033},vision:!1,status:"production",description:"Recommended - Meta: Llama 3.3 70B Instruct"}},topModels:["meta-llama/Llama-3.3-70B-Instruct","openai/gpt-oss-20b","zai-org/GLM-4.5-Air","google/gemma-4-26b-a4b-it","zai-org/GLM-5.3-Flash","Qwen/Qwen3.8-27B","deepseek-ai/DeepSeek-V4-Pro"]},capabilities:{text:!0,streaming:!0,tools:!0,toolsWithStreaming:!0,structuredOutput:!0,structuredOutputWithTools:!0,embeddings:!1,thinking:!1},errorRules:[{pattern:"requested model is not available for Chat Completions API",class:"invalid-model",message:"io.net Intelligence model '{model}' is not available for the Chat Completions API. Choose a current model from https://ai.io.net/."}],setup:{url:"https://ai.io.net/",apiKeyFormat:null,billingPolicy:"free-tier",instructions:["1. Visit: https://ai.io.net/","2. Sign in or create an io.net account","3. Create an API key for your project in the console","4. Set {apiKeyEnvVar} in your .env file"]},evidence:{rosterVerified:{date:"2026-09-03",method:"authenticated GET /v1/models",status:200},authProbe:{date:"2026-09-03",status:401},liveMatrix:{date:"2026-09-03",result:"SDK end-to-end via dist: generate, stream, tool call (nonce round-trip) and json_schema structured output all pass. Tools + schema: after a tool result the vendor answers finish_reason=tool_calls with no tool_calls and null content when JSON is requested (4/4 raw replays); the SDK now re-asks that step once with tool_choice none and recovers the JSON \u2014 passed 1/1 in the final live proof through dist/index.js, tool nonce present in structuredData. structuredOutputWithTools is declared true on that basis."},addedInPR:"pending",billingProbe:{date:"2026-09-03",status:200,method:"official io.net Intelligence web app plan configuration: Standard default with daily_limit fallback of 2; Professional and Developer are paid upgrade plans"}}}}}),Vue,vur=S({"src/lib/providers/catalog/mancer.json"(){Vue={$schema:"./provider-catalog.schema.json",id:"mancer",displayName:"Mancer",aliases:["mancer-tech"],tier:2,wire:{baseURL:"https://neuro.mancer.tech/oai/v1"},models:{default:"deepseek-v4-flash",fallbacks:["deepseek-v4-flash","gpt-oss-120b"],defaultContextWindow:1048576,defaultMaxOutputTokens:1048576,catalog:{mythomax:{contextWindow:8192,maxOutputTokens:8192,pricingPerMTok:{input:.14,output:.24},vision:!1,status:"production",description:"MythoMax (LLaMA 2, Simplified Alpaca format) \u2014 pricing and limits from the authenticated /oai/v1/models roster, 2026-09-03"},"deepseek-v4-flash":{contextWindow:1048576,maxOutputTokens:1048576,pricingPerMTok:{input:.07,output:.2},vision:!1,status:"production",description:"DeepSeek V4 Flash \u2014 Mancer's flagship general model; paid credits required \u2014 pricing and limits from the authenticated /oai/v1/models roster, 2026-09-03"},"deepseek-v4-flash-0731":{contextWindow:1048576,maxOutputTokens:1048576,pricingPerMTok:{input:.07,output:.2},vision:!1,status:"production",description:"DeepSeek V4 Flash, 2026-07-31 snapshot; paid credits required \u2014 pricing and limits from the authenticated /oai/v1/models roster, 2026-09-03"},mytholite:{contextWindow:2560,maxOutputTokens:150,pricingPerMTok:{input:0,output:0},vision:!1,status:"production",description:"MythoLite \u2014 Mancer's free demo model (2,560-token context, 150-token completions, Simplified Alpaca format); the only model usable with a zero balance \u2014 pricing and limits from the authenticated /oai/v1/models roster, 2026-09-03"},"remm-slerp":{contextWindow:6144,maxOutputTokens:6144,pricingPerMTok:{input:.14,output:.26},vision:!1,status:"production",description:"ReMM-SLERP (Simplified Alpaca format) \u2014 pricing and limits from the authenticated /oai/v1/models roster, 2026-09-03"},"magnum-72b-v4":{contextWindow:32768,maxOutputTokens:4096,pricingPerMTok:{input:1,output:2},vision:!1,status:"production",description:"Magnum 72B v4 (ChatML format) \u2014 pricing and limits from the authenticated /oai/v1/models roster, 2026-09-03"},"glm-4.7":{contextWindow:131072,maxOutputTokens:131072,pricingPerMTok:{input:.28,output:1},vision:!1,status:"production",description:"GLM-4.7 \u2014 pricing and limits from the authenticated /oai/v1/models roster, 2026-09-03"},"gpt-oss-120b":{contextWindow:131072,maxOutputTokens:131072,pricingPerMTok:{input:.022,output:.2},vision:!1,status:"production",description:"GPT-OSS 120B \u2014 pricing and limits from the authenticated /oai/v1/models roster, 2026-09-03"},"weaver-alpha":{contextWindow:8e3,maxOutputTokens:6e3,pricingPerMTok:{input:.16,output:.3},vision:!1,status:"production",description:"Weaver Alpha (Simplified Alpaca format) \u2014 pricing and limits from the authenticated /oai/v1/models roster, 2026-09-03"},"dans-pe-1.3-24b":{contextWindow:32768,maxOutputTokens:8192,pricingPerMTok:{input:.2,output:.8},vision:!1,status:"production",description:"Dan's PersonalityEngine 1.3 24B \u2014 pricing and limits from the authenticated /oai/v1/models roster, 2026-09-03"}},topModels:["deepseek-v4-flash","gpt-oss-120b","glm-4.7","mytholite"],testModel:"mytholite"},capabilities:{text:!0,streaming:!0,tools:!1,toolsWithStreaming:!1,structuredOutput:!0,structuredOutputWithTools:!1,embeddings:!1,thinking:!1},errorRules:[{status:401,pattern:"Bad API key",class:"authentication",message:"Invalid Mancer API key. Check {apiKeyEnvVar}. Get one at https://mancer.tech/dashboard"},{pattern:"Unknown Model",class:"invalid-model",message:"Mancer model '{model}' is unknown. Pick a current model from the /oai/v1/models roster or https://mancer.tech/pricing."},{status:402,pattern:"requires paid credits",class:"provider",message:"Mancer model '{model}' requires paid credits; with a zero balance only the free model 'mytholite' works. Add credits at https://mancer.tech/dashboard or see https://mancer.tech/pricing."}],setup:{url:"https://mancer.tech/dashboard",apiKeyFormat:"^mcr_[A-Za-z0-9]+$",billingPolicy:"free-tier",instructions:["1. Visit: https://mancer.tech/dashboard and sign in","2. Create an API key (prefix mcr_)","3. Without credits only the free model 'mytholite' answers; every other model returns 402 until you add credits at https://mancer.tech/pricing","4. Set {apiKeyEnvVar} in your .env file"],description:"OpenAI-compatible endpoint at https://neuro.mancer.tech/oai/v1. One free demo model; paid credits unlock the rest of the roster."},evidence:{rosterVerified:{date:"2026-09-03",method:"authenticated GET /oai/v1/models; full response retained as evidence/mancer-roster-authenticated.json in the campaign scratchpad and every catalog price/limit machine-checked against it (Mancer re-prices \u2014 gpt-oss-120b input moved 0.024 \u2192 0.022 within the day)",status:200},authProbe:{date:"2026-09-03",status:401},billingProbe:{date:"2026-09-03",status:402,method:'POST /oai/v1/chat/completions on deepseek-v4-flash with a zero balance: {"error":{"type":"CANT_AFFORD","message":"This model requires paid credits to use!"}}'},liveMatrix:{date:"2026-09-03",result:`18-probe harness on the free model mytholite: roster, chat, max_completion_tokens, system role, content parts, sampling params, SSE stream (usage chunk + [DONE]), json_schema (valid JSON matching schema) and json_object all 200; tools and tools+schema 400 BAD_PARAMETERS ('"auto" tool choice requires --enable-auto-tool-choice and --tool-call-parser') so tools are declared false; vision 200 but text-only (image ignored); bad key 401 'Bad API key'; unknown model 400 'Unknown Model'. Paid models could not be capability-probed without credits \u2014 tools may work there and can be re-declared once probed. Nightly matrix pins testModel mytholite.`},addedInPR:"pending"}}}}),Wue,Tur=S({"src/lib/providers/catalog/mistral.json"(){Wue={$schema:"./provider-catalog.schema.json",id:"mistral",displayName:"Mistral",aliases:[],tier:2,wire:{baseURL:"https://api.mistral.ai/v1"},models:{default:"mistral-small-2506",registryDefaultModel:"mistral-large-latest",fallbacks:["mistral-small-2506","mistral-medium-latest"],defaultContextWindow:128e3,defaultMaxOutputTokens:4096,catalog:{"mistral-large-latest":{contextWindow:256e3,vision:!0,status:"production",description:"Mistral Large (Latest)"},"mistral-large-2512":{contextWindow:256e3,vision:!0,status:"production",description:"Mistral Large 2512"},"mistral-medium-latest":{contextWindow:128e3,vision:!0,status:"production",description:"Mistral Medium (Latest)"},"mistral-medium-2508":{vision:!0,status:"production",description:"Mistral Medium 2508"},"mistral-small-latest":{contextWindow:128e3,vision:!0,status:"production",description:"Mistral Small (Latest)"},"mistral-small-2506":{vision:!0,status:"production",description:"Recommended - Mistral Small 2506"},"magistral-medium-latest":{contextWindow:128e3,vision:!0,status:"production",description:"Magistral Medium (Reasoning)"},"magistral-small-latest":{vision:!0,status:"production",description:"Magistral Small (Reasoning)"},"ministral-14b-2512":{enumMember:"MINISTRAL_14B_2512",vision:!1,status:"production",description:"Ministral 14B (Edge)"},"ministral-8b-2512":{enumMember:"MINISTRAL_8B_2512",vision:!1,status:"production",description:"Ministral 8B (Edge)"},"ministral-3b-2512":{enumMember:"MINISTRAL_3B_2512",vision:!1,status:"production",description:"Ministral 3B (Edge)"},"codestral-latest":{contextWindow:256e3,vision:!1,status:"production",description:"Codestral (Code Generation)"},"codestral-2508":{contextWindow:256e3,vision:!1,status:"production",description:"Codestral 2508 (Code Generation)"},"codestral-embed":{vision:!1,status:"production",description:"Codestral Embed"},"devstral-medium-latest":{vision:!1,status:"production",description:"Devstral Medium (Software Development)"},"devstral-small-latest":{vision:!1,status:"production",description:"Devstral Small (Software Development)"},"pixtral-large":{vision:!1,status:"retired",description:"Retired 2026-08 \u2014 absent from Mistral's roster and rejected as an invalid model"},"pixtral-12b":{vision:!0,status:"production",description:"Pixtral 12B \u2014 vision-capable; re-verified live 2026-08-30"},"voxtral-small-latest":{vision:!1,status:"production",description:"Voxtral Small (Audio)"},"voxtral-mini-latest":{vision:!1,status:"production",description:"Voxtral Mini (Audio)"},"devstral-2512":{enumMember:"DEVSTRAL_2",contextWindow:256e3,vision:!1,status:"production",description:"Devstral 2 (December 2025)"},"devstral-small-2512":{enumMember:"DEVSTRAL_SMALL_2",contextWindow:256e3,vision:!1,status:"retired",description:"Retired 2026-08 \u2014 absent from Mistral's roster and rejected as an invalid model"},"magistral-medium-2509":{vision:!1,status:"retired",description:"Retired 2026-08 \u2014 absent from Mistral's roster and rejected as an invalid model"},"magistral-small-2509":{vision:!1,status:"retired",description:"Retired 2026-08 \u2014 absent from Mistral's roster and rejected as an invalid model"},"voxtral-mini-2602":{enumMember:"VOXTRAL_MINI_TRANSCRIBE_2",vision:!1,status:"production",description:"Voxtral Mini Transcribe 2 (February 2026)"},"mistral-ocr-2512":{enumMember:"MISTRAL_OCR_3",vision:!1,status:"production",description:"Mistral OCR 3 (December 2025)"},"mistral-ocr-latest":{vision:!1,status:"production",description:"Mistral OCR (Latest)"},"mistral-nemo":{vision:!1,status:"retired",description:"Retired 2026-08 \u2014 absent from Mistral's roster and rejected as an invalid model"},"mistral-embed":{vision:!1,status:"production",description:"Mistral Embed"},"mistral-moderation-latest":{vision:!1,status:"retired",description:"Retired 2026-08 \u2014 absent from Mistral's roster and rejected as an invalid model"},"mistral-small-2603":{enumMember:"MISTRAL_SMALL_4",contextWindow:256e3,vision:!0,status:"production",description:"Mistral Small 4 (June 2026)"},"mistral-small-creative":{vision:!1,status:"retired",description:"Retired 2026-08 \u2014 absent from Mistral's roster and rejected as an invalid model"}},visionModel:"mistral-medium-latest",topModels:["mistral-large-latest","mistral-small-latest","codestral-latest","magistral-medium-latest","pixtral-12b"]},capabilities:{text:!0,streaming:!0,tools:!0,toolsWithStreaming:!0,structuredOutput:!0,structuredOutputWithTools:!0,embeddings:!1,thinking:!1},errorRules:[{status:401,pattern:"API_KEY_INVALID|Invalid API key|Unauthorized",class:"authentication",message:"Invalid Mistral API key. Please check your {apiKeyEnvVar} environment variable."}],quirks:{registryDefaultIgnoresModelEnvVar:!0},timeouts:{generateMs:45e3,streamMs:12e4},autoSelectPriority:9,setup:{url:"https://console.mistral.ai/api-keys",apiKeyFormat:"^[A-Za-z0-9]{32}$",billingPolicy:"free-with-card",instructions:["1. Visit: https://console.mistral.ai/api-keys","2. Create or sign in to your account","3. Generate a new API key"]},evidence:{rosterVerified:{date:"2026-08-30",method:"GET /models against the live account, cross-checked with a real chat call per id"},liveMatrix:{date:"2026-08-30",result:"17 ids answer normally. A chat probe alone was not enough to judge the rest, because Mistral rejects every non-chat model with the same generic 'Invalid model' text: cross-referencing the roster shows mistral-embed, codestral-embed, mistral-ocr-latest, mistral-ocr-2512, voxtral-mini-latest and voxtral-mini-2602 are all still listed and alive \u2014 they are embedding, OCR and audio models that a chat endpoint is right to refuse \u2014 so they keep production status. An id is marked retired only when BOTH signals agree: absent from the roster AND rejected by a live chat call. pixtral-12b is the one id where they disagree \u2014 the roster omits it but a real call returns 200, so it was moved back to production, on the rule that a live 200 outranks a roster omission. mistral-large-latest and mistral-large-2512 answer 403 'not available in your subscription tier': a plan limit on this account, not a retirement, so they stay production. visionModel is pinned to mistral-medium-latest because the otherwise-first vision id, mistral-large-latest, is behind that plan gate."},addedInPR:"https://github.com/juspay/neurolink/pull/1587"}}}}),Kue,wur=S({"src/lib/providers/catalog/morph.json"(){Kue={$schema:"./provider-catalog.schema.json",id:"morph",displayName:"Morph",aliases:["morphllm"],tier:2,wire:{baseURL:"https://api.morphllm.com/v1"},models:{default:"morph-v3-large",fallbacks:["morph-v3-large","morph-v3-fast"],defaultContextWindow:262144,defaultMaxOutputTokens:131072,catalog:{"morph-v3-large":{contextWindow:262144,maxOutputTokens:131072,pricingPerMTok:{input:.9,output:1.9},vision:!1,status:"production",description:"Recommended - Morph's high-accuracy Fast Apply model for complex code edits (2500+ tok/sec, 98% accuracy); the general-purpose choice of Morph's two chat-usable models. Does not honour the OpenAI tool-calling contract: with tools attached it emits the call as literal <tool_call> text in message.content instead of a tool_calls array"},"morph-v3-fast":{contextWindow:262144,maxOutputTokens:131072,pricingPerMTok:{input:.8,output:1.2},vision:!1,status:"production",description:"Morph's fastest Fast Apply model, purpose-built for applying code edits (10,500+ tok/sec, 96% accuracy) rather than general chat. Ignores the tools parameter outright and returns unrelated generated text instead of a tool call"}},topModels:["morph-v3-large","morph-v3-fast"]},capabilities:{text:!0,streaming:!0,tools:!1,toolsWithStreaming:!1,structuredOutput:!0,structuredOutputWithTools:!1,embeddings:!1,thinking:!1},errorRules:[{status:401,pattern:"API key required",class:"authentication",message:"Invalid or missing Morph API key. Check {apiKeyEnvVar}. Get one at https://morphllm.com/dashboard"},{status:400,pattern:"is not served by this endpoint",class:"invalid-model",message:"Morph model '{model}' is not served by this endpoint. Pick a current model from the authenticated GET /v1/models roster or https://morphllm.com/dashboard."}],setup:{url:"https://morphllm.com/dashboard",apiKeyFormat:null,billingPolicy:"free-with-card",description:"API key",instructions:["1. Visit: https://morphllm.com/dashboard and sign in","2. A card on file is required; the account is rate-limited (5 req/min) until one is added","3. Create an API key on the dashboard","4. Set {apiKeyEnvVar} in your .env file"]},quirks:{messageContentFormat:"string"},evidence:{rosterVerified:{date:"2026-09-05",method:"authenticated GET /v1/models",status:200},authProbe:{date:"2026-09-05",status:401,code:"invalid_api_key"},liveMatrix:{date:"2026-09-05",result:"Full wire probe on morph-v3-fast plus a focused tool-calling re-probe on both chat models. Non-tool basics all 200: chat, max_completion_tokens, system role, sampling params, SSE streaming (content deltas, usage chunk, [DONE]), json_schema (valid JSON matching schema) and json_object. Array-shaped message content is REJECTED with HTTP 500 'Request processing failed: text.charCodeAt is not a function' \u2014 same class of quirk as Cloudflare (PR #1587); messageContentFormat is set to 'string' and vision is false because the vision probe sends array parts and hits the identical 500. Tool calling does NOT work despite HTTP 200: morph-v3-large echoes the call as literal '<tool_call>{...}</tool_call>' text in message.content, and morph-v3-fast ignores the tools parameter and returns unrelated generated text (Python source) with finish_reason=length. tools and toolsWithStreaming are declared false on that basis; tools_plus_schema returning 200 is not evidence of structuredOutputWithTools since tools do not actually work. structuredOutput is true and strong (schema-conformant JSON, json_object accepted). The GET /v1/models roster lists 22 ids (morph-v3-fast, morph-v3-large, auto, morph-compactor, morph-warp-grep-v2.1, and passthrough ids for GLM/DeepSeek/Kimi/Qwen/MiniMax/Gemma/computer-use), but a deliberately invalid model name on /chat/completions came back 'is not served by this endpoint; accepted models: morph-v0, morph-v2, morph-v3-fast, morph-v3-large' \u2014 none of those other 18 roster ids were live-verified against chat/completions, so only the two confirmed working chat models are catalogued; context window (262144) and max output tokens (131072) for both come from Morph's public model metadata (https://www.morphllm.com/api/models/json), which also supplied pricing. Morph is a code-application (Fast Apply) specialist, not a general chat vendor: morph-v3-large is catalogued as the default because it is the general-purpose one of the pair, while morph-v3-fast is purpose-built for edit application rather than open-ended conversation."},addedInPR:"pending"}}}}),Jue,Eur=S({"src/lib/providers/catalog/novita.json"(){Jue={$schema:"./provider-catalog.schema.json",id:"novita",displayName:"Novita AI",aliases:[],tier:2,wire:{baseURL:"https://api.novita.ai/openai/v1"},models:{default:"zai-org/glm-5.3-flash",testModel:"zai-org/glm-5.3-flash",fallbacks:["meta-llama/llama-3.3-70b-instruct","deepseek/deepseek-v3-0324","qwen/qwen-2.5-72b-instruct","google/gemma-3-27b-it"],defaultContextWindow:128e3,defaultMaxOutputTokens:4096,catalog:{"meta-llama/llama-3.3-70b-instruct":{vision:!1,status:"production",description:"Meta Llama 3.3 70B Instruct; a plain non-reasoning chat model. Kept as a fallback for plain chat because it does not support structured output; the runtime/default model is zai-org/glm-5.3-flash (see evidence.liveMatrix)"},"zai-org/glm-5.3-flash":{pricingPerMTok:{input:.075,output:.25,cachedInput:.015},vision:!1,status:"production",description:"Zhipu GLM-5.3 Flash \u2014 Novita's own served default and the model exercised end-to-end by NeuroLink's live capability probe (chat, streaming, tool calling, tools+streaming, tools+schema together). Reasons internally via `reasoning_content` before answering, so it needs a generous max_tokens budget or replies get cut mid-thought \u2014 pin `testModel` here for the capability matrix. Pricing from the authenticated roster, 2026-09-05"},"deepseek/deepseek-v3-0324":{vision:!1,status:"production",description:"DeepSeek V3 (0324 snapshot) \u2014 the non-reasoning DeepSeek chat line (the reasoning variant is deepseek/deepseek-r1); fallback"},"qwen/qwen-2.5-72b-instruct":{vision:!1,status:"production",description:"Qwen 2.5 72B Instruct \u2014 plain (non-thinking) Alibaba Qwen chat model; fallback"},"google/gemma-3-27b-it":{vision:!1,status:"production",description:"Google Gemma 3 27B IT \u2014 non-reasoning instruct chat model; fallback"}},topModels:["meta-llama/llama-3.3-70b-instruct","zai-org/glm-5.3-flash","deepseek/deepseek-v3-0324","qwen/qwen-2.5-72b-instruct","google/gemma-3-27b-it"]},capabilities:{text:!0,streaming:!0,tools:!0,toolsWithStreaming:!0,structuredOutput:!0,structuredOutputWithTools:!0,embeddings:!1,thinking:!1},errorRules:[{status:401,pattern:"failed to authenticate API key|FAILED_TO_AUTH",class:"authentication",message:"Invalid Novita API key. Check {apiKeyEnvVar}. Get one at https://novita.ai/settings/key-management"},{status:404,pattern:"model not found|MODEL_NOT_FOUND",class:"invalid-model",message:"Novita model '{model}' not found. Pick a current model from the authenticated /openai/v1/models roster or https://novita.ai/models"}],setup:{url:"https://novita.ai/settings/key-management",apiKeyFormat:"^sk_[A-Za-z0-9_-]+$",billingPolicy:"free-tier",instructions:["1. Visit: https://novita.ai/settings/key-management and sign in (Google, GitHub, Hugging Face, or email)","2. Choose Create API Key, name it, and copy it immediately \u2014 it is shown in full only once and starts with sk_","3. New accounts start on a small trial voucher (a few dollars of Model API credit); manual top-ups go through Stripe with a $10 minimum, so keep early test calls small","4. Set {apiKeyEnvVar} in your .env file"],description:"OpenAI-compatible endpoint at https://api.novita.ai/openai/v1. New accounts start on a small trial voucher; the roster spans 150+ open-weight chat, reasoning and vision-named models."},evidence:{rosterVerified:{date:"2026-09-05",method:"authenticated GET /openai/v1/models \u2014 156 ids, e.g. zai-org/glm-5.3-flash, zai-org/glm-5.3, deepseek/deepseek-v4-pro-0813, moonshotai/kimi-k3",status:200},authProbe:{date:"2026-09-05",status:401,code:"FAILED_TO_AUTH"},liveMatrix:{date:"2026-09-05",result:`18-probe harness against zai-org/glm-5.3-flash (Novita's own served default) via https://api.novita.ai/openai/v1. Wire mechanics: chat, system role, array content parts, sampling params and max_completion_tokens all 200; SSE streaming 200 with a usage chunk and a terminal [DONE]. Reasoning is genuinely heavy on this model \u2014 several 200 responses show finish_reason=length with only 8 completion tokens, entirely spent on an unfinished reasoning_content and an empty visible content \u2014 but \`default\` and \`testModel\` are both pinned to the probed model itself (zai-org/glm-5.3-flash, Novita's own served default), which is exactly what the capability matrix below exercises \u2014 see the structured-output findings further down for why the reasoning-heavy default is still the right choice over the plain meta-llama/llama-3.3-70b-instruct fallback. Tool calling: a real tool_call (get_time, parsed tz argument) on the first turn, a null-content assistant tool_calls turn accepted on replay, and a tool_call surfacing mid-SSE-stream \u2014 tools and toolsWithStreaming true; tool_choice is tolerated even with no tools declared. response_format json_object returns 200 cleanly \u2014 structuredOutput true. response_format json_schema also returns 200, but at this token budget the content is unfinished reasoning text rather than schema-conformant JSON, same reasoning-budget effect as above \u2014 NeuroLink's coerceJsonToSchema repair layer is the safety net here, as for other reasoning-heavy vendors. Sending tools and a JSON schema together in one request succeeds (200, real tool_call returned) at the wire level. That single-shot result alone does not demonstrate the combined capability \u2014 the follow-up turn where the model must answer the original JSON-schema question from a tool result was untested at raw-probe time. It was proved separately through the SDK's public surface: \`generate({ provider: 'novita', schema, ...})\` with a registered getTime tool called end-to-end via dist/index.js \u2014 the model invoked getTime(tz='Asia/Tokyo') (toolsUsed=['getTime'], stepsUsed=2), then answered \`{"city":"Tokyo","time":"09:00"}\`, which parsed against the request schema with no repair needed (jsonRepaired/jsonTruncated both unset) \u2014 passed 1/1 in the final live proof. structuredOutputWithTools is declared true on that basis. Vision: a 64x64 PNG sent to glm-5.3-flash (not a vision-tagged model; Novita has no live-verified vision model) returns 200 with reasoning_content correctly describing 'a solid blue rectangle' but an EMPTY final content \u2014 not a working, schema-usable vision reply, so no catalog entry is marked vision:true and models.visionModel is left unset. bad key -> 401 {"code":401,"reason":"FAILED_TO_AUTH","message":"failed to authenticate API key"}; bad model -> 404 {"code":404,"reason":"MODEL_NOT_FOUND","message":"model not found"}. Novita funds this account with a $1 Model API voucher, so only this one model was live-probed end-to-end; the other four catalog entries are roster-verified by id only, not capability-probed. Structured output on Novita is per-model, and the catalog schema can only express it per provider. Verified 2026-09-05 at the wire: meta-llama/llama-3.3-70b-instruct returns HTTP 400 for response_format json_schema ("does not support 'json_schema' response format. Supported formats: json_object") and also 400 for json_object, while zai-org/glm-5.3-flash returns 200 for json_object, json_schema and tools+json_schema together. The default is therefore zai-org/glm-5.3-flash, which is also Novita's own served default, so the provider-level structuredOutput and structuredOutputWithTools flags are true for the model a default-configuration caller actually gets. meta-llama/llama-3.3-70b-instruct remains a fallback for plain chat. Tool calling was verified separately on both models (finish_reason=tool_calls with a structured call). Note that glm-5.3-flash is a reasoning model: at very small max_tokens (observed at 40) the budget is consumed by reasoning and content comes back empty; the entry's defaultMaxOutputTokens of 4096 is well clear of that.`},addedInPR:"pending"}}}}),Yue,bur=S({"src/lib/providers/catalog/perplexity.json"(){Yue={$schema:"./provider-catalog.schema.json",id:"perplexity",displayName:"Perplexity",aliases:["pplx"],tier:2,wire:{baseURL:"https://api.perplexity.ai"},models:{default:"sonar",fallbacks:["sonar","sonar-pro","sonar-reasoning","sonar-reasoning-pro","sonar-deep-research"],defaultContextWindow:127e3,defaultMaxOutputTokens:4096,catalog:{sonar:{contextWindow:127e3,pricingPerMTok:{input:1,output:1},vision:!1,status:"production",description:"Recommended - Sonar with web grounding"},"sonar-pro":{contextWindow:2e5,pricingPerMTok:{input:3,output:15},vision:!1,status:"production",description:"Better reasoning"},"sonar-reasoning":{contextWindow:127e3,pricingPerMTok:{input:1,output:5},vision:!1,status:"production",description:"Explicit reasoning traces"},"sonar-reasoning-pro":{contextWindow:127e3,pricingPerMTok:{input:2,output:8},vision:!1,status:"production",description:"Flagship reasoning + web"},"sonar-deep-research":{contextWindow:2e5,pricingPerMTok:{input:2,output:8},vision:!1,status:"production",description:"Long-form research with citations"}},topModels:["sonar","sonar-pro","sonar-reasoning","sonar-reasoning-pro","sonar-deep-research"]},capabilities:{text:!0,streaming:!0,tools:!0,toolsWithStreaming:!0,structuredOutput:!1,structuredOutputWithTools:!1,embeddings:!1,thinking:!1},errorRules:[{status:401,pattern:"Invalid API key|Authentication",class:"authentication",message:"Invalid Perplexity API key. Get one at https://www.perplexity.ai/settings/api"}],setup:{url:"https://www.perplexity.ai/settings/api",apiKeyFormat:null,billingPolicy:"no-free-tier",instructions:["1. Visit: https://www.perplexity.ai/settings/api","2. Sign in to your Perplexity account","3. Create a new API key (Sonar tier)","4. Set {apiKeyEnvVar} in your .env file"]},evidence:{rosterVerified:{date:"2026-08-28",method:"transcribed from pre-migration TS catalog"},liveMatrix:null,addedInPR:"https://github.com/juspay/neurolink/pull/1587"}}}}),Xue,Sur=S({"src/lib/providers/catalog/sambanova.json"(){Xue={$schema:"./provider-catalog.schema.json",id:"sambanova",displayName:"SambaNova",aliases:[],tier:2,wire:{baseURL:"https://api.sambanova.ai/v1"},models:{default:"Meta-Llama-3.3-70B-Instruct",visionModel:"Meta-Llama-3.3-70B-Instruct",fallbacks:["Meta-Llama-3.3-70B-Instruct","gpt-oss-120b"],defaultContextWindow:131072,defaultMaxOutputTokens:8192,catalog:{"Meta-Llama-3.3-70B-Instruct":{contextWindow:131072,pricingPerMTok:{input:.6,output:1.2},vision:!0,status:"production",description:"Recommended - Meta Llama 3.3 70B; production, 128K context; vision-capable"},"gpt-oss-120b":{contextWindow:131072,pricingPerMTok:{input:.22,output:.59},vision:!1,status:"production",description:"OpenAI GPT-OSS 120B (open-weight)"},"DeepSeek-V3.1":{contextWindow:131072,pricingPerMTok:{input:3,output:4.5},vision:!1,status:"production",description:"DeepSeek V3.1 (reasoning)"},"DeepSeek-V3.2":{contextWindow:32768,pricingPerMTok:{input:3,output:4.5},vision:!1,status:"preview",description:"DeepSeek V3.2 (reasoning; vendor preview, 32K context)"},"MiniMax-M2.7":{contextWindow:196608,pricingPerMTok:{input:.6,output:2.4,cachedInput:.06},vision:!1,status:"production",description:"MiniMax M2.7, 192K context"},"MiniMax-M3":{pricingPerMTok:{input:.6,output:2.4},vision:!0,status:"production",description:"MiniMax M3 (vision)"},"gemma-4-31B-it":{contextWindow:131072,pricingPerMTok:{input:.38,output:1.15},vision:!0,status:"preview",description:"Google Gemma 4 31B IT (vision; vendor preview)"}},topModels:["Meta-Llama-3.3-70B-Instruct","gpt-oss-120b","DeepSeek-V3.1","DeepSeek-V3.2","MiniMax-M2.7","MiniMax-M3","gemma-4-31B-it"]},capabilities:{text:!0,streaming:!0,tools:!0,toolsWithStreaming:!0,structuredOutput:!0,structuredOutputWithTools:!1,embeddings:!1,thinking:!1},errorRules:[{status:401,pattern:"invalid_api_key|Incorrect API key|authentication_error",class:"authentication",message:"Invalid SambaNova API key. Check {apiKeyEnvVar}. Get one at https://cloud.sambanova.ai/apis"},{status:402,pattern:"PAYMENT_METHOD_REQUIRED|balance_units",class:"provider",message:"SambaNova account has no credits (new accounts have no free allowance). Add a payment method and purchase credits at https://cloud.sambanova.ai/plans/billing"}],setup:{url:"https://cloud.sambanova.ai/apis",apiKeyFormat:null,billingPolicy:"no-free-tier",instructions:["1. Visit: https://cloud.sambanova.ai (Google/Microsoft OAuth works)","2. Complete the profile step; note new accounts have NO free allowance \u2014 a payment method and purchased credits are required before calls succeed","3. Create an API key under API Keys","4. Set {apiKeyEnvVar} in your .env file"]},evidence:{rosterVerified:{date:"2026-08-27",method:"authenticated GET /v1/models"},authProbe:{date:"2026-08-27",status:401,code:"invalid_api_key"},billingProbe:{date:"2026-08-27",status:402,code:"PAYMENT_METHOD_REQUIRED"},liveMatrix:{date:"2026-08-30",result:"Six of seven ids answer. Vision re-tested with a valid 64x64 PNG: gemma-4-31B-it and Meta-Llama-3.3-70B-Instruct both describe it correctly, so Meta-Llama's vision flag is now true. MiniMax-M3 returned 429 'currently experiencing high demand' \u2014 the model is served and simply busy, so it stays production rather than being retired; its declared vision support is therefore still unverified."},addedInPR:"https://github.com/juspay/neurolink/pull/1586"}}}}),Zue,_ur=S({"src/lib/providers/catalog/together-ai.json"(){Zue={$schema:"./provider-catalog.schema.json",id:"together-ai",displayName:"Together AI",enumTypeName:"TogetherAIModels",credentialsKey:"together",aliases:["together"],tier:2,wire:{baseURL:"https://api.together.xyz/v1",envOverrides:{apiKey:"TOGETHER_API_KEY",baseURL:"TOGETHER_BASE_URL",model:"TOGETHER_MODEL"}},models:{default:"meta-llama/Llama-3.3-70B-Instruct-Turbo",fallbackModelName:"meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo",fallbacks:["meta-llama/Llama-3.3-70B-Instruct-Turbo","meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo","meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo","meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo","mistralai/Mixtral-8x22B-Instruct-v0.1","Qwen/Qwen2.5-72B-Instruct-Turbo","deepseek-ai/DeepSeek-R1","deepseek-ai/DeepSeek-V3"],defaultContextWindow:128e3,defaultMaxOutputTokens:4096,catalog:{"meta-llama/Llama-3.3-70B-Instruct-Turbo":{enumMember:"LLAMA_3_3_70B_INSTRUCT_TURBO",contextWindow:128e3,pricingPerMTok:{input:.88,output:.88},vision:!1,status:"production",description:"Recommended - Llama 3.3 70B Turbo"},"meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo":{enumMember:"LLAMA_3_1_405B_INSTRUCT_TURBO",contextWindow:128e3,pricingPerMTok:{input:3.5,output:3.5},vision:!1,status:"production",description:"Flagship 405B"},"meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo":{enumMember:"LLAMA_3_1_70B_INSTRUCT_TURBO",contextWindow:128e3,pricingPerMTok:{input:.88,output:.88},vision:!1,status:"production",description:"Llama 3.1 70B Instruct Turbo"},"meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo":{enumMember:"LLAMA_3_1_8B_INSTRUCT_TURBO",contextWindow:128e3,pricingPerMTok:{input:.18,output:.18},vision:!1,status:"production",description:"Llama 3.1 8B Instruct Turbo \u2014 fastest"},"mistralai/Mixtral-8x22B-Instruct-v0.1":{enumMember:"MIXTRAL_8X22B_INSTRUCT",contextWindow:65536,pricingPerMTok:{input:1.2,output:1.2},vision:!1,status:"production",description:"Mistral 8x22B MoE"},"mistralai/Mixtral-8x7B-Instruct-v0.1":{enumMember:"MIXTRAL_8X7B_INSTRUCT",contextWindow:32768,pricingPerMTok:{input:.6,output:.6},vision:!1,status:"production",description:"Mixtral 8x7B Instruct"},"Qwen/Qwen2.5-72B-Instruct-Turbo":{enumMember:"QWEN_2_5_72B_INSTRUCT_TURBO",contextWindow:32768,pricingPerMTok:{input:1.2,output:1.2},vision:!1,status:"production",description:"Qwen 2.5 72B Turbo"},"Qwen/Qwen2.5-Coder-32B-Instruct":{enumMember:"QWEN_2_5_CODER_32B",contextWindow:32768,vision:!1,status:"production",description:"Qwen 2.5 Coder 32B Instruct"},"deepseek-ai/DeepSeek-R1":{enumMember:"DEEPSEEK_R1",contextWindow:64e3,pricingPerMTok:{input:7,output:7},vision:!1,status:"production",description:"DeepSeek R1 reasoning"},"deepseek-ai/DeepSeek-V3":{enumMember:"DEEPSEEK_V3",contextWindow:64e3,pricingPerMTok:{input:1.25,output:1.25},vision:!1,status:"production",description:"DeepSeek V3"},"google/gemma-2-27b-it":{enumMember:"GEMMA_2_27B_IT",contextWindow:8192,vision:!1,status:"production",description:"Google Gemma 2 27B IT"},"microsoft/WizardLM-2-8x22B":{enumMember:"WIZARDLM_2_8X22B",contextWindow:65536,vision:!1,status:"production",description:"WizardLM 2 8x22B"}},topModels:["meta-llama/Llama-3.3-70B-Instruct-Turbo","meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo","Qwen/Qwen2.5-72B-Instruct-Turbo","deepseek-ai/DeepSeek-R1","mistralai/Mixtral-8x22B-Instruct-v0.1"]},capabilities:{text:!0,streaming:!0,tools:!0,toolsWithStreaming:!0,structuredOutput:!0,structuredOutputWithTools:!0,embeddings:!1,thinking:!1},errorRules:[{status:401,pattern:"Invalid API key|Authentication",class:"authentication",message:"Invalid Together AI API key. Get one at https://api.together.xyz/settings/api-keys"}],setup:{url:"https://api.together.xyz/settings/api-keys",apiKeyFormat:null,billingPolicy:"free-with-card",instructions:["1. Visit: https://api.together.xyz/settings/api-keys","2. Sign in to your Together AI account","3. Create a new API key","4. Set {apiKeyEnvVar} in your .env file"]},evidence:{rosterVerified:{date:"2026-08-28",method:"transcribed from pre-migration TS catalog"},liveMatrix:null,addedInPR:"https://github.com/juspay/neurolink/pull/1587"}}}}),Que,Cur=S({"src/lib/providers/catalog/upstage.json"(){Que={$schema:"./provider-catalog.schema.json",id:"upstage",displayName:"Upstage",aliases:["solar"],tier:2,wire:{baseURL:"https://api.upstage.ai/v1"},models:{default:"solar-pro4",fallbacks:["solar-pro3","solar-mini"],defaultContextWindow:524288,defaultMaxOutputTokens:131072,catalog:{"solar-pro4":{contextWindow:524288,maxOutputTokens:131072,pricingPerMTok:{input:.3,output:1.2,cachedInput:.06},vision:!1,status:"production",description:"Recommended - Solar Pro 4; 512K context, up to 128K output tokens; agentic flagship for tool calling, terminal tasks and long-document reasoning"},"solar-pro4-260806":{contextWindow:524288,maxOutputTokens:131072,pricingPerMTok:{input:.3,output:1.2,cachedInput:.06},vision:!1,status:"production",description:"Pinned dated snapshot of Solar Pro 4 (2026-08-06 build) \u2014 the id the solar-pro4 alias currently resolves to"},"solar-pro3":{pricingPerMTok:{input:.15,output:.6,cachedInput:.015},vision:!1,status:"production",description:"Solar Pro 3; drop-in replacement for Solar Pro 2 with the same API interface, throughput and latency"},"solar-pro3-260323":{pricingPerMTok:{input:.15,output:.6,cachedInput:.015},vision:!1,status:"production",description:"Pinned dated snapshot of Solar Pro 3 (2026-03-23 build)"},"solar-pro2":{pricingPerMTok:{input:.15,output:.6,cachedInput:.015},vision:!1,status:"production",description:"Solar Pro 2; 31B-parameter model with an optional Reasoning Mode"},"solar-pro2-251215":{pricingPerMTok:{input:.15,output:.6,cachedInput:.015},vision:!1,status:"production",description:"Pinned dated snapshot of Solar Pro 2 (2025-12-15 build)"},"solar-mini":{pricingPerMTok:{input:.15,output:.15},vision:!1,status:"production",description:"Solar Mini; small, fast model for lightweight reasoning and cost-efficient tasks"},"solar-mini-250422":{pricingPerMTok:{input:.15,output:.15},vision:!1,status:"production",description:"Pinned dated snapshot of Solar Mini (2025-04-22 build)"},"syn-pro":{vision:!1,status:"production",description:"Syn Pro; Upstage's Japan-focused LLM"},"syn-pro-251021":{vision:!1,status:"production",description:"Pinned dated snapshot of Syn Pro (2025-10-21 build)"}},topModels:["solar-pro4","solar-pro3","solar-pro2","solar-mini","syn-pro"]},capabilities:{text:!0,streaming:!0,tools:!0,toolsWithStreaming:!0,structuredOutput:!0,structuredOutputWithTools:!0,embeddings:!1,thinking:!1},errorRules:[{status:401,pattern:"invalid_api_key|API key is invalid",class:"authentication",message:"Invalid Upstage API key. Check {apiKeyEnvVar}. Get one at https://console.upstage.ai/api-keys"},{pattern:"requested model is invalid or no longer supported",class:"invalid-model",message:"Upstage model '{model}' is invalid or no longer supported. Pick a current model from https://console.upstage.ai/docs/models."}],setup:{url:"https://console.upstage.ai/api-keys",apiKeyFormat:"^up_[A-Za-z0-9]+$",billingPolicy:"free-tier",instructions:["1. Visit: https://console.upstage.ai (Google OAuth works)","2. New accounts get a $10 sign-up credit \u2014 no payment method required","3. Create an API key under API Keys","4. Set {apiKeyEnvVar} in your .env file"]},evidence:{rosterVerified:{date:"2026-09-03",method:"authenticated GET /v1/models",status:200},authProbe:{date:"2026-09-03",status:401,code:"invalid_api_key"},liveMatrix:null,addedInPR:"pending"}}}}),ede,kur=S({"src/lib/providers/catalog/xai.json"(){ede={$schema:"./provider-catalog.schema.json",id:"xai",displayName:"xAI",aliases:["grok"],tier:2,wire:{baseURL:"https://api.x.ai/v1"},models:{default:"grok-4.6",fallbacks:["grok-4.6","grok-4.5","grok-4.3","grok-3","grok-3-mini"],defaultContextWindow:131072,defaultMaxOutputTokens:4096,catalog:{"grok-4.6":{enumMember:"GROK_4_6",contextWindow:131072,vision:!0,status:"production",description:"Recommended - Grok 4.6, current flagship; vision-capable"},"grok-4.5":{enumMember:"GROK_4_5",contextWindow:131072,vision:!0,status:"production",description:"Grok 4.5 \u2014 vision-capable"},"grok-4.3":{enumMember:"GROK_4_3",contextWindow:131072,vision:!0,status:"production",description:"Grok 4.3 \u2014 vision-capable"},"grok-3":{contextWindow:131072,pricingPerMTok:{input:3,output:15},vision:!1,status:"production",description:"Grok 3 \u2014 still served, though absent from the /models roster"},"grok-3-mini":{contextWindow:131072,pricingPerMTok:{input:.3,output:.5},vision:!1,status:"production",description:"Faster + cheaper Grok 3"},"grok-2-latest":{contextWindow:131072,pricingPerMTok:{input:2,output:10},vision:!1,status:"retired",description:"Retired 2026-08 \u2014 xAI rejects it as an invalid model"},"grok-2-vision-latest":{contextWindow:32768,pricingPerMTok:{input:2,output:10},vision:!1,status:"retired",description:"Retired 2026-08 \u2014 xAI rejects it as an invalid model; vision moved to the grok-4.x line"},"grok-beta":{contextWindow:131072,pricingPerMTok:{input:5,output:15},vision:!1,status:"retired",description:"Retired 2026-08 \u2014 xAI rejects it as an invalid model"}},visionModel:"grok-4.6",topModels:["grok-4.6","grok-4.5","grok-4.3","grok-3"]},capabilities:{text:!0,streaming:!0,tools:!0,toolsWithStreaming:!0,structuredOutput:!0,structuredOutputWithTools:!0,embeddings:!1,thinking:!1},errorRules:[{status:401,pattern:"Invalid API key|Authentication|invalid_api_key",class:"authentication",message:"Invalid xAI API key. Please check your {apiKeyEnvVar} environment variable. Get one at https://console.x.ai/"},{pattern:"insufficient_quota|quota exceeded",class:"provider",message:"xAI account has insufficient quota. Top up at https://console.x.ai/"}],setup:{url:"https://console.x.ai/",apiKeyFormat:null,billingPolicy:"no-free-tier",instructions:["1. Visit: https://console.x.ai/","2. Sign in with your xAI account","3. Create an API key","4. Set {apiKeyEnvVar} in your .env file"]},evidence:{rosterVerified:{date:"2026-08-30",method:"GET /models against the live account, cross-checked with a real chat call per id"},liveMatrix:{date:"2026-08-30",result:"grok-2-latest, grok-2-vision-latest and grok-beta are rejected as invalid models. The grok-4.x line replaces them: 4.3/4.5/4.6 all answer, and all three read a 64x64 PNG correctly, so vision moved there from the retired grok-2-vision-latest. An earlier probe with an 8x8 PNG reported no vision \u2014 that was xAI answering 'Invalid PNG image', a complaint about the file rather than the capability. grok-3 and grok-3-mini are kept because they still serve, even though xAI's /models roster omits them: roster absence is not evidence of death here."},addedInPR:"https://github.com/juspay/neurolink/pull/1587"}}}}),r3,Aur=S({"src/lib/providers/catalog/index.generated.ts"(){"use strict";iur(),aur(),cur(),lur(),uur(),dur(),mur(),pur(),hur(),fur(),gur(),yur(),vur(),Tur(),wur(),Eur(),bur(),Sur(),_ur(),Cur(),kur(),r3=[Oue,Nue,Lue,Fue,$ue,Uue,Bue,zue,que,Gue,jue,Hue,Vue,Wue,Kue,Jue,Yue,Xue,Zue,Que,ede]}}),xur=S({"src/lib/types/enums.ts"(){"use strict"}}),Iur=S({"src/lib/types/action.ts"(){"use strict"}}),Rur=S({"src/lib/types/agentMode.ts"(){"use strict"}}),tde,n3,rde,o3=S({"node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/Options.js"(){tde=Symbol("Let zodToJsonSchema decide on which parser to use"),n3={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"},rde=e=>typeof e=="string"?{...n3,name:e}:{...n3,...e}}}),nde,ode=S({"node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/Refs.js"(){o3(),nde=e=>{const t=rde(e),r=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,flags:{hasReferencedOpenAiAnyType:!1},currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([n,o])=>[o._def,{def:o._def,path:[...t.basePath,t.definitionPath,n],jsonSchema:void 0}]))}}}});function sde(e,t,r,n){n?.errorMessages&&r&&(e.errorMessage={...e.errorMessage,[t]:r})}function Nr(e,t,r,n,o){e[t]=r,sde(e,t,n,o)}var ah=S({"node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/errorMessages.js"(){}}),s3,i3=S({"node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js"(){s3=(e,t)=>{let r=0;for(;r<e.length&&r<t.length&&e[r]===t[r];r++);return[(e.length-r).toString(),...t.slice(r)].join("/")}}}),wr,ide,ct,Xu,nI=S({"node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/helpers/util.js"(){(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function r(o){throw new Error}e.assertNever=r,e.arrayToEnum=o=>{const s={};for(const i of o)s[i]=i;return s},e.getValidEnumValues=o=>{const s=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),i={};for(const a of s)i[a]=o[a];return e.objectValues(i)},e.objectValues=o=>e.objectKeys(o).map(function(s){return o[s]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const s=[];for(const i in o)Object.prototype.hasOwnProperty.call(o,i)&&s.push(i);return s},e.find=(o,s)=>{for(const i of o)if(s(i))return i},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function n(o,s=" | "){return o.map(i=>typeof i=="string"?`'${i}'`:i).join(s)}e.joinValues=n,e.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(wr||(wr={})),(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(ide||(ide={})),ct=wr.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Xu=e=>{switch(typeof e){case"undefined":return ct.undefined;case"string":return ct.string;case"number":return Number.isNaN(e)?ct.nan:ct.number;case"boolean":return ct.boolean;case"function":return ct.function;case"bigint":return ct.bigint;case"symbol":return ct.symbol;case"object":return Array.isArray(e)?ct.array:e===null?ct.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ct.promise:typeof Map<"u"&&e instanceof Map?ct.map:typeof Set<"u"&&e instanceof Set?ct.set:typeof Date<"u"&&e instanceof Date?ct.date:ct.object;default:return ct.unknown}}}}),qe,il,a3=S({"node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/ZodError.js"(){nI(),qe=wr.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),il=class alr extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){const r=t||function(s){return s.message},n={_errors:[]},o=s=>{for(const i of s.issues)if(i.code==="invalid_union")i.unionErrors.map(o);else if(i.code==="invalid_return_type")o(i.returnTypeError);else if(i.code==="invalid_arguments")o(i.argumentsError);else if(i.path.length===0)n._errors.push(r(i));else{let a=n,c=0;for(;c<i.path.length;){const l=i.path[c];c===i.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(r(i))):a[l]=a[l]||{_errors:[]},a=a[l],c++}}};return o(this),n}static assert(t){if(!(t instanceof alr))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,wr.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){const r=Object.create(null),n=[];for(const o of this.issues)if(o.path.length>0){const s=o.path[0];r[s]=r[s]||[],r[s].push(t(o))}else n.push(t(o));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}},il.create=e=>new il(e)}}),ade,wy,cde=S({"node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/locales/en.js"(){a3(),nI(),ade=(e,t)=>{let r;switch(e.code){case qe.invalid_type:e.received===ct.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case qe.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,wr.jsonStringifyReplacer)}`;break;case qe.unrecognized_keys:r=`Unrecognized key(s) in object: ${wr.joinValues(e.keys,", ")}`;break;case qe.invalid_union:r="Invalid input";break;case qe.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${wr.joinValues(e.options)}`;break;case qe.invalid_enum_value:r=`Invalid enum value. Expected ${wr.joinValues(e.options)}, received '${e.received}'`;break;case qe.invalid_arguments:r="Invalid function arguments";break;case qe.invalid_return_type:r="Invalid function return type";break;case qe.invalid_date:r="Invalid date";break;case qe.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:wr.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case qe.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case qe.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case qe.custom:r="Invalid input";break;case qe.invalid_intersection_types:r="Intersection results could not be merged";break;case qe.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case qe.not_finite:r="Number must be finite";break;default:r=t.defaultError,wr.assertNever(e)}return{message:r}},wy=ade}});function c3(){return lde}var lde,l3=S({"node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/errors.js"(){cde(),lde=wy}});function nt(e,t){const r=c3(),n=oI({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===wy?void 0:wy].filter(o=>!!o)});e.common.issues.push(n)}var oI,aa,Rt,Ey,$i,u3,d3,ch,rE,ude=S({"node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/helpers/parseUtil.js"(){l3(),cde(),oI=e=>{const{data:t,path:r,errorMaps:n,issueData:o}=e,s=[...r,...o.path||[]],i={...o,path:s};if(o.message!==void 0)return{...o,path:s,message:o.message};let a="";const c=n.filter(l=>!!l).slice().reverse();for(const l of c)a=l(i,{data:t,defaultError:a}).message;return{...o,path:s,message:a}},aa=class clr{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){const n=[];for(const o of r){if(o.status==="aborted")return Rt;o.status==="dirty"&&t.dirty(),n.push(o.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){const n=[];for(const o of r){const s=await o.key,i=await o.value;n.push({key:s,value:i})}return clr.mergeObjectSync(t,n)}static mergeObjectSync(t,r){const n={};for(const o of r){const{key:s,value:i}=o;if(s.status==="aborted"||i.status==="aborted")return Rt;s.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof i.value<"u"||o.alwaysSet)&&(n[s.value]=i.value)}return{status:t.value,value:n}}},Rt=Object.freeze({status:"aborted"}),Ey=e=>({status:"dirty",value:e}),$i=e=>({status:"valid",value:e}),u3=e=>e.status==="aborted",d3=e=>e.status==="dirty",ch=e=>e.status==="valid",rE=e=>typeof Promise<"u"&&e instanceof Promise}}),Mur=S({"node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/helpers/typeAliases.js"(){}}),ht,Pur=S({"node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/helpers/errorUtil.js"(){(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(ht||(ht={}))}});function Kt(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:o}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(i,a)=>{const{message:c}=e;return i.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??n??a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:c??r??a.defaultError}},description:o}}function dde(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function Dur(e){return new RegExp(`^${dde(e)}$`)}function Our(e){let t=`${f3}T${dde(e)}`;const r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function Nur(e,t){return!!((t==="v4"||!t)&&bde.test(e)||(t==="v6"||!t)&&_de.test(e))}function Lur(e,t){if(!vde.test(e))return!1;try{const[r]=e.split(".");if(!r)return!1;const n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),o=JSON.parse(atob(n));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function Fur(e,t){return!!((t==="v4"||!t)&&Sde.test(e)||(t==="v6"||!t)&&Cde.test(e))}function $ur(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,o=r>n?r:n,s=Number.parseInt(e.toFixed(o).replace(".","")),i=Number.parseInt(t.toFixed(o).replace(".",""));return s%i/10**o}function by(e){if(e instanceof yc){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=su.create(by(n))}return new yc({...e._def,shape:()=>t})}else return e instanceof uh?new uh({...e._def,type:by(e.element)}):e instanceof su?su.create(by(e.unwrap())):e instanceof Cm?Cm.create(by(e.unwrap())):e instanceof _m?_m.create(e.items.map(t=>by(t))):e}function m3(e,t){const r=Xu(e),n=Xu(t);if(e===t)return{valid:!0,data:e};if(r===ct.object&&n===ct.object){const o=wr.objectKeys(t),s=wr.objectKeys(e).filter(a=>o.indexOf(a)!==-1),i={...e,...t};for(const a of s){const c=m3(e[a],t[a]);if(!c.valid)return{valid:!1};i[a]=c.data}return{valid:!0,data:i}}else if(r===ct.array&&n===ct.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let s=0;s<e.length;s++){const i=e[s],a=t[s],c=m3(i,a);if(!c.valid)return{valid:!1};o.push(c.data)}return{valid:!0,data:o}}else return r===ct.date&&n===ct.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}function mde(e,t){return new uE({values:e,typeName:He.ZodEnum,...Kt(t)})}var al,p3,ar,pde,hde,fde,gde,yde,vde,Tde,wde,Ede,h3,bde,Sde,_de,Cde,kde,Ade,f3,xde,nE,sI,iI,aI,cI,lI,oE,sE,uI,lh,Zu,dI,uh,yc,iE,nu,Ide,aE,_m,Rde,mI,pI,Mde,cE,lE,uE,dE,Sy,ou,su,Cm,mE,pE,hI,g3,y3,hE,Uur,He,Bur,zur,qur,Gur,jur,Hur,Vur,Wur,Kur,Jur,Yur,Xur,Zur,Qur,edr,tdr,rdr,ndr,odr,sdr,idr,adr,cdr,ldr,udr,ddr,mdr,pdr,hdr,fdr,gdr,ydr,vdr,Tdr,wdr=S({"node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/types.js"(){a3(),l3(),Pur(),ude(),nI(),al=class{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},p3=(e,t)=>{if(ch(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new il(e.common.issues);return this._error=r,this._error}}},ar=class{get description(){return this._def.description}_getType(e){return Xu(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Xu(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new aa,ctx:{common:e.parent.common,data:e.data,parsedType:Xu(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(rE(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){const r={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Xu(e)},n=this._parseSync({data:e,path:r.path,parent:r});return p3(r,n)}"~validate"(e){const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Xu(e)};if(!this["~standard"].async)try{const r=this._parseSync({data:e,path:[],parent:t});return ch(r)?{value:r.value}:{issues:t.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(r=>ch(r)?{value:r.value}:{issues:t.common.issues})}async parseAsync(e,t){const r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){const r={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Xu(e)},n=this._parse({data:e,path:r.path,parent:r}),o=await(rE(n)?n:Promise.resolve(n));return p3(r,o)}refine(e,t){const r=n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,o)=>{const s=e(n),i=()=>o.addIssue({code:qe.custom,...r(n)});return typeof Promise<"u"&&s instanceof Promise?s.then(a=>a?!0:(i(),!1)):s?!0:(i(),!1)})}refinement(e,t){return this._refinement((r,n)=>e(r)?!0:(n.addIssue(typeof t=="function"?t(r,n):t),!1))}_refinement(e){return new ou({schema:this,typeName:He.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return su.create(this,this._def)}nullable(){return Cm.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return uh.create(this)}promise(){return Sy.create(this,this._def)}or(e){return iE.create([this,e],this._def)}and(e){return aE.create(this,e,this._def)}transform(e){return new ou({...Kt(this._def),schema:this,typeName:He.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new mE({...Kt(this._def),innerType:this,defaultValue:t,typeName:He.ZodDefault})}brand(){return new g3({typeName:He.ZodBranded,type:this,...Kt(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new pE({...Kt(this._def),innerType:this,catchValue:t,typeName:He.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return y3.create(this,e)}readonly(){return hE.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},pde=/^c[^\s-]{8,}$/i,hde=/^[0-9a-z]+$/,fde=/^[0-9A-HJKMNP-TV-Z]{26}$/i,gde=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,yde=/^[a-z0-9_-]{21}$/i,vde=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Tde=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,wde=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ede="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",bde=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Sde=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,_de=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Cde=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,kde=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ade=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,f3="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",xde=new RegExp(`^${f3}$`),nE=class Ux extends ar{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ct.string){const s=this._getOrReturnCtx(t);return nt(s,{code:qe.invalid_type,expected:ct.string,received:s.parsedType}),Rt}const n=new aa;let o;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(o=this._getOrReturnCtx(t,o),nt(o,{code:qe.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")t.data.length>s.value&&(o=this._getOrReturnCtx(t,o),nt(o,{code:qe.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){const i=t.data.length>s.value,a=t.data.length<s.value;(i||a)&&(o=this._getOrReturnCtx(t,o),i?nt(o,{code:qe.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&nt(o,{code:qe.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")wde.test(t.data)||(o=this._getOrReturnCtx(t,o),nt(o,{validation:"email",code:qe.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")h3||(h3=new RegExp(Ede,"u")),h3.test(t.data)||(o=this._getOrReturnCtx(t,o),nt(o,{validation:"emoji",code:qe.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")gde.test(t.data)||(o=this._getOrReturnCtx(t,o),nt(o,{validation:"uuid",code:qe.invalid_string,message:s.message}),n.dirty());else if(s.kind==="nanoid")yde.test(t.data)||(o=this._getOrReturnCtx(t,o),nt(o,{validation:"nanoid",code:qe.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")pde.test(t.data)||(o=this._getOrReturnCtx(t,o),nt(o,{validation:"cuid",code:qe.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")hde.test(t.data)||(o=this._getOrReturnCtx(t,o),nt(o,{validation:"cuid2",code:qe.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")fde.test(t.data)||(o=this._getOrReturnCtx(t,o),nt(o,{validation:"ulid",code:qe.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),nt(o,{validation:"url",code:qe.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),nt(o,{validation:"regex",code:qe.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(t,o),nt(o,{code:qe.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(o=this._getOrReturnCtx(t,o),nt(o,{code:qe.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(o=this._getOrReturnCtx(t,o),nt(o,{code:qe.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?Our(s).test(t.data)||(o=this._getOrReturnCtx(t,o),nt(o,{code:qe.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="date"?xde.test(t.data)||(o=this._getOrReturnCtx(t,o),nt(o,{code:qe.invalid_string,validation:"date",message:s.message}),n.dirty()):s.kind==="time"?Dur(s).test(t.data)||(o=this._getOrReturnCtx(t,o),nt(o,{code:qe.invalid_string,validation:"time",message:s.message}),n.dirty()):s.kind==="duration"?Tde.test(t.data)||(o=this._getOrReturnCtx(t,o),nt(o,{validation:"duration",code:qe.invalid_string,message:s.message}),n.dirty()):s.kind==="ip"?Nur(t.data,s.version)||(o=this._getOrReturnCtx(t,o),nt(o,{validation:"ip",code:qe.invalid_string,message:s.message}),n.dirty()):s.kind==="jwt"?Lur(t.data,s.alg)||(o=this._getOrReturnCtx(t,o),nt(o,{validation:"jwt",code:qe.invalid_string,message:s.message}),n.dirty()):s.kind==="cidr"?Fur(t.data,s.version)||(o=this._getOrReturnCtx(t,o),nt(o,{validation:"cidr",code:qe.invalid_string,message:s.message}),n.dirty()):s.kind==="base64"?kde.test(t.data)||(o=this._getOrReturnCtx(t,o),nt(o,{validation:"base64",code:qe.invalid_string,message:s.message}),n.dirty()):s.kind==="base64url"?Ade.test(t.data)||(o=this._getOrReturnCtx(t,o),nt(o,{validation:"base64url",code:qe.invalid_string,message:s.message}),n.dirty()):wr.assertNever(s);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(o=>t.test(o),{validation:r,code:qe.invalid_string,...ht.errToObj(n)})}_addCheck(t){return new Ux({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ht.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ht.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ht.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ht.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ht.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ht.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ht.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ht.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ht.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ht.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ht.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ht.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ht.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...ht.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...ht.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...ht.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...ht.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...ht.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...ht.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...ht.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...ht.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...ht.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...ht.errToObj(r)})}nonempty(t){return this.min(1,ht.errToObj(t))}trim(){return new Ux({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ux({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ux({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}},nE.create=e=>new nE({checks:[],typeName:He.ZodString,coerce:e?.coerce??!1,...Kt(e)}),sI=class Ile extends ar{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ct.number){const s=this._getOrReturnCtx(t);return nt(s,{code:qe.invalid_type,expected:ct.number,received:s.parsedType}),Rt}let n;const o=new aa;for(const s of this._def.checks)s.kind==="int"?wr.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),nt(n,{code:qe.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(n=this._getOrReturnCtx(t,n),nt(n,{code:qe.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(n=this._getOrReturnCtx(t,n),nt(n,{code:qe.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?$ur(t.data,s.value)!==0&&(n=this._getOrReturnCtx(t,n),nt(n,{code:qe.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),nt(n,{code:qe.not_finite,message:s.message}),o.dirty()):wr.assertNever(s);return{status:o.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,ht.toString(r))}gt(t,r){return this.setLimit("min",t,!1,ht.toString(r))}lte(t,r){return this.setLimit("max",t,!0,ht.toString(r))}lt(t,r){return this.setLimit("max",t,!1,ht.toString(r))}setLimit(t,r,n,o){return new Ile({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:ht.toString(o)}]})}_addCheck(t){return new Ile({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ht.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ht.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ht.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ht.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ht.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:ht.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:ht.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ht.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ht.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&wr.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}},sI.create=e=>new sI({checks:[],typeName:He.ZodNumber,coerce:e?.coerce||!1,...Kt(e)}),iI=class Rle extends ar{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==ct.bigint)return this._getInvalidInput(t);let n;const o=new aa;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(n=this._getOrReturnCtx(t,n),nt(n,{code:qe.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(n=this._getOrReturnCtx(t,n),nt(n,{code:qe.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),nt(n,{code:qe.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):wr.assertNever(s);return{status:o.value,value:t.data}}_getInvalidInput(t){const r=this._getOrReturnCtx(t);return nt(r,{code:qe.invalid_type,expected:ct.bigint,received:r.parsedType}),Rt}gte(t,r){return this.setLimit("min",t,!0,ht.toString(r))}gt(t,r){return this.setLimit("min",t,!1,ht.toString(r))}lte(t,r){return this.setLimit("max",t,!0,ht.toString(r))}lt(t,r){return this.setLimit("max",t,!1,ht.toString(r))}setLimit(t,r,n,o){return new Rle({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:ht.toString(o)}]})}_addCheck(t){return new Rle({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ht.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ht.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ht.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ht.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:ht.toString(r)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}},iI.create=e=>new iI({checks:[],typeName:He.ZodBigInt,coerce:e?.coerce??!1,...Kt(e)}),aI=class extends ar{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==ct.boolean){const r=this._getOrReturnCtx(e);return nt(r,{code:qe.invalid_type,expected:ct.boolean,received:r.parsedType}),Rt}return $i(e.data)}},aI.create=e=>new aI({typeName:He.ZodBoolean,coerce:e?.coerce||!1,...Kt(e)}),cI=class llr extends ar{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ct.date){const s=this._getOrReturnCtx(t);return nt(s,{code:qe.invalid_type,expected:ct.date,received:s.parsedType}),Rt}if(Number.isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return nt(s,{code:qe.invalid_date}),Rt}const n=new aa;let o;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(o=this._getOrReturnCtx(t,o),nt(o,{code:qe.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(o=this._getOrReturnCtx(t,o),nt(o,{code:qe.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):wr.assertNever(s);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new llr({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:ht.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:ht.toString(r)})}get minDate(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}},cI.create=e=>new cI({checks:[],coerce:e?.coerce||!1,typeName:He.ZodDate,...Kt(e)}),lI=class extends ar{_parse(e){if(this._getType(e)!==ct.symbol){const r=this._getOrReturnCtx(e);return nt(r,{code:qe.invalid_type,expected:ct.symbol,received:r.parsedType}),Rt}return $i(e.data)}},lI.create=e=>new lI({typeName:He.ZodSymbol,...Kt(e)}),oE=class extends ar{_parse(e){if(this._getType(e)!==ct.undefined){const r=this._getOrReturnCtx(e);return nt(r,{code:qe.invalid_type,expected:ct.undefined,received:r.parsedType}),Rt}return $i(e.data)}},oE.create=e=>new oE({typeName:He.ZodUndefined,...Kt(e)}),sE=class extends ar{_parse(e){if(this._getType(e)!==ct.null){const r=this._getOrReturnCtx(e);return nt(r,{code:qe.invalid_type,expected:ct.null,received:r.parsedType}),Rt}return $i(e.data)}},sE.create=e=>new sE({typeName:He.ZodNull,...Kt(e)}),uI=class extends ar{constructor(){super(...arguments),this._any=!0}_parse(e){return $i(e.data)}},uI.create=e=>new uI({typeName:He.ZodAny,...Kt(e)}),lh=class extends ar{constructor(){super(...arguments),this._unknown=!0}_parse(e){return $i(e.data)}},lh.create=e=>new lh({typeName:He.ZodUnknown,...Kt(e)}),Zu=class extends ar{_parse(e){const t=this._getOrReturnCtx(e);return nt(t,{code:qe.invalid_type,expected:ct.never,received:t.parsedType}),Rt}},Zu.create=e=>new Zu({typeName:He.ZodNever,...Kt(e)}),dI=class extends ar{_parse(e){if(this._getType(e)!==ct.undefined){const r=this._getOrReturnCtx(e);return nt(r,{code:qe.invalid_type,expected:ct.void,received:r.parsedType}),Rt}return $i(e.data)}},dI.create=e=>new dI({typeName:He.ZodVoid,...Kt(e)}),uh=class z$ extends ar{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),o=this._def;if(r.parsedType!==ct.array)return nt(r,{code:qe.invalid_type,expected:ct.array,received:r.parsedType}),Rt;if(o.exactLength!==null){const i=r.data.length>o.exactLength.value,a=r.data.length<o.exactLength.value;(i||a)&&(nt(r,{code:i?qe.too_big:qe.too_small,minimum:a?o.exactLength.value:void 0,maximum:i?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),n.dirty())}if(o.minLength!==null&&r.data.length<o.minLength.value&&(nt(r,{code:qe.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),n.dirty()),o.maxLength!==null&&r.data.length>o.maxLength.value&&(nt(r,{code:qe.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((i,a)=>o.type._parseAsync(new al(r,i,r.path,a)))).then(i=>aa.mergeArray(n,i));const s=[...r.data].map((i,a)=>o.type._parseSync(new al(r,i,r.path,a)));return aa.mergeArray(n,s)}get element(){return this._def.type}min(t,r){return new z$({...this._def,minLength:{value:t,message:ht.toString(r)}})}max(t,r){return new z$({...this._def,maxLength:{value:t,message:ht.toString(r)}})}length(t,r){return new z$({...this._def,exactLength:{value:t,message:ht.toString(r)}})}nonempty(t){return this.min(1,t)}},uh.create=(e,t)=>new uh({type:e,minLength:null,maxLength:null,exactLength:null,typeName:He.ZodArray,...Kt(t)}),yc=class eu extends ar{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),r=wr.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==ct.object){const l=this._getOrReturnCtx(t);return nt(l,{code:qe.invalid_type,expected:ct.object,received:l.parsedType}),Rt}const{status:n,ctx:o}=this._processInputParams(t),{shape:s,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof Zu&&this._def.unknownKeys==="strip"))for(const l in o.data)i.includes(l)||a.push(l);const c=[];for(const l of i){const u=s[l],d=o.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new al(o,d,o.path,l)),alwaysSet:l in o.data})}if(this._def.catchall instanceof Zu){const l=this._def.unknownKeys;if(l==="passthrough")for(const u of a)c.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(l==="strict")a.length>0&&(nt(o,{code:qe.unrecognized_keys,keys:a}),n.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const u of a){const d=o.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new al(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const l=[];for(const u of c){const d=await u.key,m=await u.value;l.push({key:d,value:m,alwaysSet:u.alwaysSet})}return l}).then(l=>aa.mergeObjectSync(n,l)):aa.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return ht.errToObj,new eu({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{const o=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:ht.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new eu({...this._def,unknownKeys:"strip"})}passthrough(){return new eu({...this._def,unknownKeys:"passthrough"})}extend(t){return new eu({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new eu({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:He.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new eu({...this._def,catchall:t})}pick(t){const r={};for(const n of wr.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new eu({...this._def,shape:()=>r})}omit(t){const r={};for(const n of wr.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new eu({...this._def,shape:()=>r})}deepPartial(){return by(this)}partial(t){const r={};for(const n of wr.objectKeys(this.shape)){const o=this.shape[n];t&&!t[n]?r[n]=o:r[n]=o.optional()}return new eu({...this._def,shape:()=>r})}required(t){const r={};for(const n of wr.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof su;)s=s._def.innerType;r[n]=s}return new eu({...this._def,shape:()=>r})}keyof(){return mde(wr.objectKeys(this.shape))}},yc.create=(e,t)=>new yc({shape:()=>e,unknownKeys:"strip",catchall:Zu.create(),typeName:He.ZodObject,...Kt(t)}),yc.strictCreate=(e,t)=>new yc({shape:()=>e,unknownKeys:"strict",catchall:Zu.create(),typeName:He.ZodObject,...Kt(t)}),yc.lazycreate=(e,t)=>new yc({shape:e,unknownKeys:"strip",catchall:Zu.create(),typeName:He.ZodObject,...Kt(t)}),iE=class extends ar{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.options;function n(o){for(const i of o)if(i.result.status==="valid")return i.result;for(const i of o)if(i.result.status==="dirty")return t.common.issues.push(...i.ctx.common.issues),i.result;const s=o.map(i=>new il(i.ctx.common.issues));return nt(t,{code:qe.invalid_union,unionErrors:s}),Rt}if(t.common.async)return Promise.all(r.map(async o=>{const s={...t,common:{...t.common,issues:[]},parent:null};return{result:await o._parseAsync({data:t.data,path:t.path,parent:s}),ctx:s}})).then(n);{let o;const s=[];for(const a of r){const c={...t,common:{...t.common,issues:[]},parent:null},l=a._parseSync({data:t.data,path:t.path,parent:c});if(l.status==="valid")return l;l.status==="dirty"&&!o&&(o={result:l,ctx:c}),c.common.issues.length&&s.push(c.common.issues)}if(o)return t.common.issues.push(...o.ctx.common.issues),o.result;const i=s.map(a=>new il(a));return nt(t,{code:qe.invalid_union,unionErrors:i}),Rt}}get options(){return this._def.options}},iE.create=(e,t)=>new iE({options:e,typeName:He.ZodUnion,...Kt(t)}),nu=e=>e instanceof cE?nu(e.schema):e instanceof ou?nu(e.innerType()):e instanceof lE?[e.value]:e instanceof uE?e.options:e instanceof dE?wr.objectValues(e.enum):e instanceof mE?nu(e._def.innerType):e instanceof oE?[void 0]:e instanceof sE?[null]:e instanceof su?[void 0,...nu(e.unwrap())]:e instanceof Cm?[null,...nu(e.unwrap())]:e instanceof g3||e instanceof hE?nu(e.unwrap()):e instanceof pE?nu(e._def.innerType):[],Ide=class ulr extends ar{_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==ct.object)return nt(r,{code:qe.invalid_type,expected:ct.object,received:r.parsedType}),Rt;const n=this.discriminator,o=r.data[n],s=this.optionsMap.get(o);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(nt(r,{code:qe.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Rt)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){const o=new Map;for(const s of r){const i=nu(s.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of i){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,s)}}return new ulr({typeName:He.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:o,...Kt(n)})}},aE=class extends ar{_parse(e){const{status:t,ctx:r}=this._processInputParams(e),n=(o,s)=>{if(u3(o)||u3(s))return Rt;const i=m3(o.value,s.value);return i.valid?((d3(o)||d3(s))&&t.dirty(),{status:t.value,value:i.data}):(nt(r,{code:qe.invalid_intersection_types}),Rt)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,s])=>n(o,s)):n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}},aE.create=(e,t,r)=>new aE({left:e,right:t,typeName:He.ZodIntersection,...Kt(r)}),_m=class dlr extends ar{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ct.array)return nt(n,{code:qe.invalid_type,expected:ct.array,received:n.parsedType}),Rt;if(n.data.length<this._def.items.length)return nt(n,{code:qe.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Rt;!this._def.rest&&n.data.length>this._def.items.length&&(nt(n,{code:qe.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const s=[...n.data].map((i,a)=>{const c=this._def.items[a]||this._def.rest;return c?c._parse(new al(n,i,n.path,a)):null}).filter(i=>!!i);return n.common.async?Promise.all(s).then(i=>aa.mergeArray(r,i)):aa.mergeArray(r,s)}get items(){return this._def.items}rest(t){return new dlr({...this._def,rest:t})}},_m.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new _m({items:e,typeName:He.ZodTuple,rest:null,...Kt(t)})},Rde=class Mle extends ar{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ct.object)return nt(n,{code:qe.invalid_type,expected:ct.object,received:n.parsedType}),Rt;const o=[],s=this._def.keyType,i=this._def.valueType;for(const a in n.data)o.push({key:s._parse(new al(n,a,n.path,a)),value:i._parse(new al(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?aa.mergeObjectAsync(r,o):aa.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof ar?new Mle({keyType:t,valueType:r,typeName:He.ZodRecord,...Kt(n)}):new Mle({keyType:nE.create(),valueType:t,typeName:He.ZodRecord,...Kt(r)})}},mI=class extends ar{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==ct.map)return nt(r,{code:qe.invalid_type,expected:ct.map,received:r.parsedType}),Rt;const n=this._def.keyType,o=this._def.valueType,s=[...r.data.entries()].map(([i,a],c)=>({key:n._parse(new al(r,i,r.path,[c,"key"])),value:o._parse(new al(r,a,r.path,[c,"value"]))}));if(r.common.async){const i=new Map;return Promise.resolve().then(async()=>{for(const a of s){const c=await a.key,l=await a.value;if(c.status==="aborted"||l.status==="aborted")return Rt;(c.status==="dirty"||l.status==="dirty")&&t.dirty(),i.set(c.value,l.value)}return{status:t.value,value:i}})}else{const i=new Map;for(const a of s){const c=a.key,l=a.value;if(c.status==="aborted"||l.status==="aborted")return Rt;(c.status==="dirty"||l.status==="dirty")&&t.dirty(),i.set(c.value,l.value)}return{status:t.value,value:i}}}},mI.create=(e,t,r)=>new mI({valueType:t,keyType:e,typeName:He.ZodMap,...Kt(r)}),pI=class Ple extends ar{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ct.set)return nt(n,{code:qe.invalid_type,expected:ct.set,received:n.parsedType}),Rt;const o=this._def;o.minSize!==null&&n.data.size<o.minSize.value&&(nt(n,{code:qe.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),r.dirty()),o.maxSize!==null&&n.data.size>o.maxSize.value&&(nt(n,{code:qe.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),r.dirty());const s=this._def.valueType;function i(c){const l=new Set;for(const u of c){if(u.status==="aborted")return Rt;u.status==="dirty"&&r.dirty(),l.add(u.value)}return{status:r.value,value:l}}const a=[...n.data.values()].map((c,l)=>s._parse(new al(n,c,n.path,l)));return n.common.async?Promise.all(a).then(c=>i(c)):i(a)}min(t,r){return new Ple({...this._def,minSize:{value:t,message:ht.toString(r)}})}max(t,r){return new Ple({...this._def,maxSize:{value:t,message:ht.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}},pI.create=(e,t)=>new pI({valueType:e,minSize:null,maxSize:null,typeName:He.ZodSet,...Kt(t)}),Mde=class q$ extends ar{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==ct.function)return nt(r,{code:qe.invalid_type,expected:ct.function,received:r.parsedType}),Rt;function n(a,c){return oI({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,c3(),wy].filter(l=>!!l),issueData:{code:qe.invalid_arguments,argumentsError:c}})}function o(a,c){return oI({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,c3(),wy].filter(l=>!!l),issueData:{code:qe.invalid_return_type,returnTypeError:c}})}const s={errorMap:r.common.contextualErrorMap},i=r.data;if(this._def.returns instanceof Sy){const a=this;return $i(async function(...c){const l=new il([]),u=await a._def.args.parseAsync(c,s).catch(h=>{throw l.addIssue(n(c,h)),l}),d=await Reflect.apply(i,this,u);return await a._def.returns._def.type.parseAsync(d,s).catch(h=>{throw l.addIssue(o(d,h)),l})})}else{const a=this;return $i(function(...c){const l=a._def.args.safeParse(c,s);if(!l.success)throw new il([n(c,l.error)]);const u=Reflect.apply(i,this,l.data),d=a._def.returns.safeParse(u,s);if(!d.success)throw new il([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new q$({...this._def,args:_m.create(t).rest(lh.create())})}returns(t){return new q$({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new q$({args:t||_m.create([]).rest(lh.create()),returns:r||lh.create(),typeName:He.ZodFunction,...Kt(n)})}},cE=class extends ar{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}},cE.create=(e,t)=>new cE({getter:e,typeName:He.ZodLazy,...Kt(t)}),lE=class extends ar{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return nt(t,{received:t.data,code:qe.invalid_literal,expected:this._def.value}),Rt}return{status:"valid",value:e.data}}get value(){return this._def.value}},lE.create=(e,t)=>new lE({value:e,typeName:He.ZodLiteral,...Kt(t)}),uE=class Dle extends ar{_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return nt(r,{expected:wr.joinValues(n),received:r.parsedType,code:qe.invalid_type}),Rt}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const r=this._getOrReturnCtx(t),n=this._def.values;return nt(r,{received:r.data,code:qe.invalid_enum_value,options:n}),Rt}return $i(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return Dle.create(t,{...this._def,...r})}exclude(t,r=this._def){return Dle.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}},uE.create=mde,dE=class extends ar{_parse(e){const t=wr.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==ct.string&&r.parsedType!==ct.number){const n=wr.objectValues(t);return nt(r,{expected:wr.joinValues(n),received:r.parsedType,code:qe.invalid_type}),Rt}if(this._cache||(this._cache=new Set(wr.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const n=wr.objectValues(t);return nt(r,{received:r.data,code:qe.invalid_enum_value,options:n}),Rt}return $i(e.data)}get enum(){return this._def.values}},dE.create=(e,t)=>new dE({values:e,typeName:He.ZodNativeEnum,...Kt(t)}),Sy=class extends ar{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==ct.promise&&t.common.async===!1)return nt(t,{code:qe.invalid_type,expected:ct.promise,received:t.parsedType}),Rt;const r=t.parsedType===ct.promise?t.data:Promise.resolve(t.data);return $i(r.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}},Sy.create=(e,t)=>new Sy({type:e,typeName:He.ZodPromise,...Kt(t)}),ou=class extends ar{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===He.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null,o={addIssue:s=>{nt(r,s),s.fatal?t.abort():t.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),n.type==="preprocess"){const s=n.transform(r.data,o);if(r.common.async)return Promise.resolve(s).then(async i=>{if(t.value==="aborted")return Rt;const a=await this._def.schema._parseAsync({data:i,path:r.path,parent:r});return a.status==="aborted"?Rt:a.status==="dirty"||t.value==="dirty"?Ey(a.value):a});{if(t.value==="aborted")return Rt;const i=this._def.schema._parseSync({data:s,path:r.path,parent:r});return i.status==="aborted"?Rt:i.status==="dirty"||t.value==="dirty"?Ey(i.value):i}}if(n.type==="refinement"){const s=i=>{const a=n.refinement(i,o);if(r.common.async)return Promise.resolve(a);if(a instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return i};if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Rt:(i.status==="dirty"&&t.dirty(),s(i.value),{status:t.value,value:i.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>i.status==="aborted"?Rt:(i.status==="dirty"&&t.dirty(),s(i.value).then(()=>({status:t.value,value:i.value}))))}if(n.type==="transform")if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!ch(s))return Rt;const i=n.transform(s.value,o);if(i instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:i}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>ch(s)?Promise.resolve(n.transform(s.value,o)).then(i=>({status:t.value,value:i})):Rt);wr.assertNever(n)}},ou.create=(e,t,r)=>new ou({schema:e,typeName:He.ZodEffects,effect:t,...Kt(r)}),ou.createWithPreprocess=(e,t,r)=>new ou({schema:t,effect:{type:"preprocess",transform:e},typeName:He.ZodEffects,...Kt(r)}),su=class extends ar{_parse(e){return this._getType(e)===ct.undefined?$i(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}},su.create=(e,t)=>new su({innerType:e,typeName:He.ZodOptional,...Kt(t)}),Cm=class extends ar{_parse(e){return this._getType(e)===ct.null?$i(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}},Cm.create=(e,t)=>new Cm({innerType:e,typeName:He.ZodNullable,...Kt(t)}),mE=class extends ar{_parse(e){const{ctx:t}=this._processInputParams(e);let r=t.data;return t.parsedType===ct.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}},mE.create=(e,t)=>new mE({innerType:e,typeName:He.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Kt(t)}),pE=class extends ar{_parse(e){const{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return rE(n)?n.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new il(r.common.issues)},input:r.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new il(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}},pE.create=(e,t)=>new pE({innerType:e,typeName:He.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Kt(t)}),hI=class extends ar{_parse(e){if(this._getType(e)!==ct.nan){const r=this._getOrReturnCtx(e);return nt(r,{code:qe.invalid_type,expected:ct.nan,received:r.parsedType}),Rt}return{status:"valid",value:e.data}}},hI.create=e=>new hI({typeName:He.ZodNaN,...Kt(e)}),g3=class extends ar{_parse(e){const{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}},y3=class mlr extends ar{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?Rt:s.status==="dirty"?(r.dirty(),Ey(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})})();{const o=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?Rt:o.status==="dirty"?(r.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:n.path,parent:n})}}static create(t,r){return new mlr({in:t,out:r,typeName:He.ZodPipeline})}},hE=class extends ar{_parse(e){const t=this._def.innerType._parse(e),r=n=>(ch(n)&&(n.value=Object.freeze(n.value)),n);return rE(t)?t.then(n=>r(n)):r(t)}unwrap(){return this._def.innerType}},hE.create=(e,t)=>new hE({innerType:e,typeName:He.ZodReadonly,...Kt(t)}),Uur={object:yc.lazycreate},(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(He||(He={})),Bur=nE.create,zur=sI.create,qur=hI.create,Gur=iI.create,jur=aI.create,Hur=cI.create,Vur=lI.create,Wur=oE.create,Kur=sE.create,Jur=uI.create,Yur=lh.create,Xur=Zu.create,Zur=dI.create,Qur=uh.create,edr=yc.create,tdr=yc.strictCreate,rdr=iE.create,ndr=Ide.create,odr=aE.create,sdr=_m.create,idr=Rde.create,adr=mI.create,cdr=pI.create,ldr=Mde.create,udr=cE.create,ddr=lE.create,mdr=uE.create,pdr=dE.create,hdr=Sy.create,fdr=ou.create,gdr=su.create,ydr=Cm.create,vdr=ou.createWithPreprocess,Tdr=y3.create}}),Pde=S({"node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/external.js"(){l3(),ude(),Mur(),nI(),wdr(),a3()}}),fI=S({"node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/index.js"(){Pde(),Pde()}});function ca(e){if(e.target!=="openAi")return{};const t=[...e.basePath,e.definitionPath,e.openAiAnyTypeName];return e.flags.hasReferencedOpenAiAnyType=!0,{$ref:e.$refStrategy==="relative"?s3(t,e.currentPath):t.join("/")}}var cl=S({"node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/any.js"(){i3()}});function Edr(e,t){const r={type:"array"};return e.type?._def&&e.type?._def?.typeName!==He.ZodAny&&(r.items=Ir(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&Nr(r,"minItems",e.minLength.value,e.minLength.message,t),e.maxLength&&Nr(r,"maxItems",e.maxLength.value,e.maxLength.message,t),e.exactLength&&(Nr(r,"minItems",e.exactLength.value,e.exactLength.message,t),Nr(r,"maxItems",e.exactLength.value,e.exactLength.message,t)),r}var Dde=S({"node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/array.js"(){fI(),ah(),vs()}});function bdr(e,t){const r={type:"integer",format:"int64"};if(!e.checks)return r;for(const n of e.checks)switch(n.kind){case"min":t.target==="jsonSchema7"?n.inclusive?Nr(r,"minimum",n.value,n.message,t):Nr(r,"exclusiveMinimum",n.value,n.message,t):(n.inclusive||(r.exclusiveMinimum=!0),Nr(r,"minimum",n.value,n.message,t));break;case"max":t.target==="jsonSchema7"?n.inclusive?Nr(r,"maximum",n.value,n.message,t):Nr(r,"exclusiveMaximum",n.value,n.message,t):(n.inclusive||(r.exclusiveMaximum=!0),Nr(r,"maximum",n.value,n.message,t));break;case"multipleOf":Nr(r,"multipleOf",n.value,n.message,t);break}return r}var Ode=S({"node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js"(){ah()}});function Sdr(){return{type:"boolean"}}var Nde=S({"node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js"(){}});function Lde(e,t){return Ir(e.type._def,t)}var v3=S({"node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js"(){vs()}}),Fde,$de=S({"node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js"(){vs(),Fde=(e,t)=>Ir(e.innerType._def,t)}});function Ude(e,t,r){const n=r??t.dateStrategy;if(Array.isArray(n))return{anyOf:n.map((o,s)=>Ude(e,t,o))};switch(n){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return Bde(e,t)}}var Bde,zde=S({"node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/date.js"(){ah(),Bde=(e,t)=>{const r={type:"integer",format:"unix-time"};if(t.target==="openApi3")return r;for(const n of e.checks)switch(n.kind){case"min":Nr(r,"minimum",n.value,n.message,t);break;case"max":Nr(r,"maximum",n.value,n.message,t);break}return r}}});function _dr(e,t){return{...Ir(e.innerType._def,t),default:e.defaultValue()}}var qde=S({"node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/default.js"(){vs()}});function Cdr(e,t){return t.effectStrategy==="input"?Ir(e.schema._def,t):ca(t)}var Gde=S({"node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js"(){vs(),cl()}});function kdr(e){return{type:"string",enum:Array.from(e.values)}}var jde=S({"node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js"(){}});function Adr(e,t){const r=[Ir(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),Ir(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(s=>!!s);let n=t.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0;const o=[];return r.forEach(s=>{if(Hde(s))o.push(...s.allOf),s.unevaluatedProperties===void 0&&(n=void 0);else{let i=s;if("additionalProperties"in s&&s.additionalProperties===!1){const{additionalProperties:a,...c}=s;i=c}else n=void 0;o.push(i)}}),o.length?{allOf:o,...n}:void 0}var Hde,Vde=S({"node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js"(){vs(),Hde=e=>"type"in e&&e.type==="string"?!1:"allOf"in e}});function xdr(e,t){const r=typeof e.value;return r!=="bigint"&&r!=="number"&&r!=="boolean"&&r!=="string"?{type:Array.isArray(e.value)?"array":"object"}:t.target==="openApi3"?{type:r==="bigint"?"integer":r,enum:[e.value]}:{type:r==="bigint"?"integer":r,const:e.value}}var Wde=S({"node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js"(){}});function Kde(e,t){const r={type:"string"};if(e.checks)for(const n of e.checks)switch(n.kind){case"min":Nr(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,n.value):n.value,n.message,t);break;case"max":Nr(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,n.value):n.value,n.message,t);break;case"email":switch(t.emailStrategy){case"format:email":ll(r,"email",n.message,t);break;case"format:idn-email":ll(r,"idn-email",n.message,t);break;case"pattern:zod":Ui(r,vc.email,n.message,t);break}break;case"url":ll(r,"uri",n.message,t);break;case"uuid":ll(r,"uuid",n.message,t);break;case"regex":Ui(r,n.regex,n.message,t);break;case"cuid":Ui(r,vc.cuid,n.message,t);break;case"cuid2":Ui(r,vc.cuid2,n.message,t);break;case"startsWith":Ui(r,RegExp(`^${T3(n.value,t)}`),n.message,t);break;case"endsWith":Ui(r,RegExp(`${T3(n.value,t)}$`),n.message,t);break;case"datetime":ll(r,"date-time",n.message,t);break;case"date":ll(r,"date",n.message,t);break;case"time":ll(r,"time",n.message,t);break;case"duration":ll(r,"duration",n.message,t);break;case"length":Nr(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,n.value):n.value,n.message,t),Nr(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,n.value):n.value,n.message,t);break;case"includes":{Ui(r,RegExp(T3(n.value,t)),n.message,t);break}case"ip":{n.version!=="v6"&&ll(r,"ipv4",n.message,t),n.version!=="v4"&&ll(r,"ipv6",n.message,t);break}case"base64url":Ui(r,vc.base64url,n.message,t);break;case"jwt":Ui(r,vc.jwt,n.message,t);break;case"cidr":{n.version!=="v6"&&Ui(r,vc.ipv4Cidr,n.message,t),n.version!=="v4"&&Ui(r,vc.ipv6Cidr,n.message,t);break}case"emoji":Ui(r,vc.emoji(),n.message,t);break;case"ulid":{Ui(r,vc.ulid,n.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{ll(r,"binary",n.message,t);break}case"contentEncoding:base64":{Nr(r,"contentEncoding","base64",n.message,t);break}case"pattern:zod":{Ui(r,vc.base64,n.message,t);break}}break}case"nanoid":Ui(r,vc.nanoid,n.message,t);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return r}function T3(e,t){return t.patternStrategy==="escape"?Idr(e):e}function Idr(e){let t="";for(let r=0;r<e.length;r++)Yde.has(e[r])||(t+="\\"),t+=e[r];return t}function ll(e,t,r,n){e.format||e.anyOf?.some(o=>o.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format,...e.errorMessage&&n.errorMessages&&{errorMessage:{format:e.errorMessage.format}}}),delete e.format,e.errorMessage&&(delete e.errorMessage.format,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.anyOf.push({format:t,...r&&n.errorMessages&&{errorMessage:{format:r}}})):Nr(e,"format",t,r,n)}function Ui(e,t,r,n){e.pattern||e.allOf?.some(o=>o.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern,...e.errorMessage&&n.errorMessages&&{errorMessage:{pattern:e.errorMessage.pattern}}}),delete e.pattern,e.errorMessage&&(delete e.errorMessage.pattern,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.allOf.push({pattern:Jde(t,n),...r&&n.errorMessages&&{errorMessage:{pattern:r}}})):Nr(e,"pattern",Jde(t,n),r,n)}function Jde(e,t){if(!t.applyRegexFlags||!e.flags)return e.source;const r={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},n=r.i?e.source.toLowerCase():e.source;let o="",s=!1,i=!1,a=!1;for(let c=0;c<n.length;c++){if(s){o+=n[c],s=!1;continue}if(r.i){if(i){if(n[c].match(/[a-z]/)){a?(o+=n[c],o+=`${n[c-2]}-${n[c]}`.toUpperCase(),a=!1):n[c+1]==="-"&&n[c+2]?.match(/[a-z]/)?(o+=n[c],a=!0):o+=`${n[c]}${n[c].toUpperCase()}`;continue}}else if(n[c].match(/[a-z]/)){o+=`[${n[c]}${n[c].toUpperCase()}]`;continue}}if(r.m){if(n[c]==="^"){o+=`(^|(?<=[\r
|
|
11
|
+
3. Verify tool schema format is correct`}],timeouts:{generateMs:12e4,streamMs:12e4},autoSelectPriority:10,setup:{url:"https://huggingface.co/settings/tokens",apiKeyFormat:"^hf_[A-Za-z0-9]{34,}$",billingPolicy:"free-tier",instructions:["1. Visit: https://huggingface.co/settings/tokens","2. Create or sign in to your HuggingFace account","3. Generate a new access token","4. Set {apiKeyEnvVar} in your .env file (HF_TOKEN also accepted)"]},evidence:{rosterVerified:{date:"2026-09-24",method:"Live against router.huggingface.co on 2026-09-24. GET /v1/models returned 138 models; each of the 53 catalog ids was also sent a real chat call. 39 ids are absent from the roster AND rejected with 400 ('does not exist' / 'not supported by any provider'), so they are marked retired and keep their enumMember; the other 14 are on the roster and answered 402 (the test account's monthly credits are spent), which is a billing block, not a rejection, so they stay production. No id had the two signals disagree. topModels swaps the retired Mistral-Large-3 for zai-org/GLM-5, which is on the roster. billingPolicy is free-tier per https://huggingface.co/docs/inference-providers/pricing (free users get monthly credits, no card). apiKeyFormat accepts the hf_ + 34 characters a real token has; the previous hf_ + 37 pattern rejected it. structuredOutput, toolsWithStreaming and per-model vision are left unchanged: /v1/models reports them per serving provider, and the 402 prevented a live round trip that would prove them."},liveMatrix:null,addedInPR:"TBD \u2014 integration-tested in a worktree before a PR was opened"}}}}),jue,gur=S({"src/lib/providers/catalog/inception-labs.json"(){jue={$schema:"./provider-catalog.schema.json",id:"inception-labs",displayName:"Inception Labs",aliases:["inception","mercury"],tier:2,wire:{baseURL:"https://api.inceptionlabs.ai/v1"},models:{default:"mercury-2",fallbacks:["mercury-2"],defaultContextWindow:128e3,defaultMaxOutputTokens:5e4,catalog:{"mercury-2":{contextWindow:128e3,maxOutputTokens:5e4,pricingPerMTok:{input:.25,output:.75,cachedInput:.025},vision:!1,status:"production",description:"Recommended - Mercury 2, Inception's enterprise diffusion LLM (dLLM); reasoning, tool use, structured output; 128K context, 1000+ tok/s"}}},capabilities:{text:!0,streaming:!0,tools:!0,toolsWithStreaming:!0,structuredOutput:!0,structuredOutputWithTools:!0,embeddings:!1,thinking:!1},errorRules:[{pattern:"Model must be one of the following",class:"invalid-model",message:"Inception Labs model '{model}' is not valid. Pick a current model \u2014 see https://docs.inceptionlabs.ai/get-started/models."}],setup:{url:"https://platform.inceptionlabs.ai/dashboard/api-keys",apiKeyFormat:"^sk_[A-Za-z0-9_-]+$",billingPolicy:"free-tier",instructions:["1. Visit: https://platform.inceptionlabs.ai and sign in (Google OAuth works)","2. New accounts get 100M free tokens with no card required","3. Create an API key under Dashboard -> API Keys","4. Set {apiKeyEnvVar} in your .env file"]},evidence:{rosterVerified:{date:"2026-09-03",method:"authenticated GET /v1/models",status:200},authProbe:{date:"2026-09-03",status:401,code:"invalid_api_key"},liveMatrix:{date:"2026-09-03",result:`Full capability sweep on mercury-2: chat, stream, system_role, content_text_parts, sampling_params, tools, tools_stream, tools_roundtrip_null, tool_choice_without_tools, json_object, json_schema and tools_plus_schema all 200. The smoke-test json_schema probe (max_tokens:60) came back truncated (finish_reason=length, null content) because this diffusion model spends part of the budget on reasoning tokens before content; re-probed live with max_tokens:300 and got a clean schema-conformant reply ({"name":"Lila Whitaker","age":34}, finish_reason=stop), confirming structuredOutput:true is correct. vision is 400 (text-only; rejects image_url on mercury-2, matching the vendor docs' 'Supported Formats: Text'). bad_key is 401 'Incorrect API key provided'. bad_model is 400 with an array-shaped pydantic error.message; the shared OpenAI-compat wire-error builder coerces a non-string Error message via toString, so that array becomes the literal string "[object Object]" and no regex pattern can match the real text \u2014 errorRules is intentionally left empty rather than shipping a rule that can never fire (see notes).`},addedInPR:"pending"}}}}),Hue,yur=S({"src/lib/providers/catalog/io-intelligence.json"(){Hue={$schema:"./provider-catalog.schema.json",id:"io-intelligence",displayName:"io.net Intelligence",aliases:["io-net"],tier:2,wire:{baseURL:"https://api.intelligence.io.solutions/api/v1"},models:{default:"meta-llama/Llama-3.3-70B-Instruct",fallbacks:["meta-llama/Llama-3.3-70B-Instruct","openai/gpt-oss-20b","zai-org/GLM-4.5-Air"],defaultContextWindow:128e3,defaultMaxOutputTokens:8192,catalog:{"zai-org/GLM-5.3-Flash":{contextWindow:262144,maxOutputTokens:131072,pricingPerMTok:{input:.147997,output:.49399,cachedInput:.073999},vision:!0,status:"production",description:"Z.ai: GLM 5.3 Flash"},"zai-org/GLM-5.3":{contextWindow:262144,maxOutputTokens:131072,pricingPerMTok:{input:1.39,output:4.4,cachedInput:.695},vision:!1,status:"production",description:"Z.ai: GLM 5.3"},"Qwen/Qwen3.8-27B":{contextWindow:65536,maxOutputTokens:65536,pricingPerMTok:{input:.39,output:2.99,cachedInput:.195},vision:!0,status:"production",description:"Qwen: Qwen3.8 27B"},"deepseek-ai/DeepSeek-V4-Flash-0731":{contextWindow:262100,maxOutputTokens:65536,pricingPerMTok:{input:.196,output:.534,cachedInput:.098},vision:!1,status:"production",description:"DeepSeek: DeepSeek V4 Flash 0731"},"moonshotai/Kimi-K3":{contextWindow:1048576,pricingPerMTok:{input:3.18,output:15.9,cachedInput:1.59},vision:!0,status:"production",description:"MoonshotAI: Kimi K3"},"XiaomiMiMo/MiMo-V2.5":{contextWindow:1048576,pricingPerMTok:{input:.1934,output:.6268,cachedInput:.0967},vision:!1,status:"production",description:"Xiaomi: MiMo-V2.5"},"zai-org/GLM-5.2":{contextWindow:262144,maxOutputTokens:131072,pricingPerMTok:{input:1.552,output:4.884,cachedInput:.776},vision:!1,status:"production",description:"Z.ai: GLM 5.2"},"moonshotai/Kimi-K2.7-Code":{contextWindow:262144,pricingPerMTok:{input:1.026,output:4.53,cachedInput:.513},vision:!0,status:"production",description:"MoonshotAI: Kimi K2.7 Code"},"Qwen/Qwen3.6-35B-A3B":{contextWindow:262144,pricingPerMTok:{input:.1872,output:1.24675,cachedInput:.0936},vision:!0,status:"production",description:"Qwen: Qwen3.6 35B A3B"},"Qwen/Qwen3.6-27B":{contextWindow:32768,pricingPerMTok:{input:.399,output:3.19,cachedInput:.1995},vision:!0,status:"production",description:"Qwen: Qwen3.6 27B"},"MiniMaxAI/MiniMax-M2.7":{contextWindow:262100,maxOutputTokens:65536,pricingPerMTok:{input:.426,output:1.62,cachedInput:.213},vision:!1,status:"production",description:"MiniMaxAI: MiniMax M2.7"},"deepseek-ai/DeepSeek-V4-Flash":{contextWindow:32768,maxOutputTokens:32768,pricingPerMTok:{input:.199,output:.512,cachedInput:.0995},vision:!1,status:"production",description:"DeepSeek: DeepSeek V4 Flash"},"deepseek-ai/DeepSeek-V4-Pro":{contextWindow:1048576,maxOutputTokens:6e5,pricingPerMTok:{input:1.618,output:3.288,cachedInput:.809},vision:!1,status:"production",description:"DeepSeek: DeepSeek V4 Pro"},"moonshotai/Kimi-K2.6":{contextWindow:262142,pricingPerMTok:{input:.76744,output:3.43436,cachedInput:.38372},vision:!0,status:"production",description:"MoonshotAI: Kimi K2.6"},"zai-org/GLM-5.1":{contextWindow:202750,maxOutputTokens:32768,pricingPerMTok:{input:1.29,output:4.22,cachedInput:.645},vision:!1,status:"production",description:"Z.ai: GLM 5.1"},"MiniMaxAI/MiniMax-M2.5":{contextWindow:196600,pricingPerMTok:{input:.294,output:1.176,cachedInput:.147},vision:!1,status:"production",description:"MiniMaxAI/MiniMax-M2.5"},"moonshotai/Kimi-K2.5":{contextWindow:262144,pricingPerMTok:{input:.5284,output:2.785,cachedInput:.2642},vision:!0,status:"production",description:"MoonshotAI: Kimi K2.5"},"zai-org/GLM-5":{contextWindow:202752,pricingPerMTok:{input:.85,output:2.774,cachedInput:.425},vision:!1,status:"production",description:"Z.ai: GLM 5"},"deepseek-ai/DeepSeek-V3.2":{contextWindow:163840,pricingPerMTok:{input:1.4301,output:2.4063,cachedInput:.71505},vision:!1,status:"production",description:"DeepSeek: DeepSeek V3.2"},"moonshotai/Kimi-K2-Thinking":{contextWindow:262144,pricingPerMTok:{input:.6,output:2.5,cachedInput:.3},vision:!1,status:"production",description:"MoonshotAI: Kimi K2 Thinking"},"zai-org/GLM-4.5-Air":{contextWindow:131070,pricingPerMTok:{input:.165,output:.975,cachedInput:.0825},vision:!1,status:"production",description:"Z.ai: GLM-4.5-Air"},"google/gemma-4-26b-a4b-it":{contextWindow:262142,pricingPerMTok:{input:.116,output:.38,cachedInput:.058},vision:!1,status:"production",description:"Google: Gemma 4 26B A4B"},"zai-org/GLM-4.7-Flash":{contextWindow:2e5,pricingPerMTok:{input:.062625,output:.4,cachedInput:.031313},vision:!1,status:"production",description:"Z.ai: GLM 4.7 Flash"},"zai-org/GLM-4.7":{contextWindow:202752,pricingPerMTok:{input:.88,output:2.37,cachedInput:.44},vision:!1,status:"production",description:"Z.ai: GLM 4.7"},"moonshotai/Kimi-K2-Instruct-0905":{contextWindow:262144,pricingPerMTok:{input:.57,output:2.3,cachedInput:.285},vision:!1,status:"production",description:"MoonshotAI: Kimi K2 Instruct 0905"},"openai/gpt-oss-120b":{contextWindow:131072,pricingPerMTok:{input:.188,output:.7,cachedInput:.094},vision:!1,status:"production",description:"OpenAI: gpt-oss-120b"},"deepseek-ai/DeepSeek-R1-0528":{contextWindow:128e3,pricingPerMTok:{input:.56775,output:2.279,cachedInput:.283875},vision:!1,status:"production",description:"DeepSeek: R1 0528"},"zai-org/GLM-4.6":{contextWindow:131072,pricingPerMTok:{input:.536,output:2.07,cachedInput:.268},vision:!1,status:"production",description:"Z.ai: GLM 4.6"},"Qwen/Qwen3-Next-80B-A3B-Instruct":{contextWindow:262144,pricingPerMTok:{input:.1175,output:1.136,cachedInput:.05875},vision:!1,status:"production",description:"Qwen: Qwen3 Next 80B A3B Instruct"},"Intel/Qwen3-Coder-480B-A35B-Instruct-int4-mixed-ar":{contextWindow:106e3,pricingPerMTok:{input:.445,output:2.145,cachedInput:.2225},vision:!1,status:"production",description:"Intel: Qwen3 Coder 480B A35B Instruct INT4 Mixed AR"},"meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8":{contextWindow:43e4,pricingPerMTok:{input:.274,output:.8992,cachedInput:.137},vision:!0,status:"production",description:"Meta-Llama: Llama 4 Maverick 17B 128E Instruct FP8"},"mistralai/Mistral-Nemo-Instruct-2407":{contextWindow:128e3,pricingPerMTok:{input:.0635,output:.09875,cachedInput:.03175},vision:!1,status:"production",description:"Mistral: Mistral Nemo Instruct 2407"},"openai/gpt-oss-20b":{contextWindow:64e3,pricingPerMTok:{input:.067,output:.24,cachedInput:.0335},vision:!1,status:"production",description:"OpenAI: gpt-oss-20b"},"meta-llama/Llama-3.3-70B-Instruct":{contextWindow:128e3,pricingPerMTok:{input:.6066,output:1.0386,cachedInput:.3033},vision:!1,status:"production",description:"Recommended - Meta: Llama 3.3 70B Instruct"}},topModels:["meta-llama/Llama-3.3-70B-Instruct","openai/gpt-oss-20b","zai-org/GLM-4.5-Air","google/gemma-4-26b-a4b-it","zai-org/GLM-5.3-Flash","Qwen/Qwen3.8-27B","deepseek-ai/DeepSeek-V4-Pro"]},capabilities:{text:!0,streaming:!0,tools:!0,toolsWithStreaming:!0,structuredOutput:!0,structuredOutputWithTools:!0,embeddings:!1,thinking:!1},errorRules:[{pattern:"requested model is not available for Chat Completions API",class:"invalid-model",message:"io.net Intelligence model '{model}' is not available for the Chat Completions API. Choose a current model from https://ai.io.net/."}],setup:{url:"https://ai.io.net/",apiKeyFormat:null,billingPolicy:"free-tier",instructions:["1. Visit: https://ai.io.net/","2. Sign in or create an io.net account","3. Create an API key for your project in the console","4. Set {apiKeyEnvVar} in your .env file"]},evidence:{rosterVerified:{date:"2026-09-03",method:"authenticated GET /v1/models",status:200},authProbe:{date:"2026-09-03",status:401},liveMatrix:{date:"2026-09-03",result:"SDK end-to-end via dist: generate, stream, tool call (nonce round-trip) and json_schema structured output all pass. Tools + schema: after a tool result the vendor answers finish_reason=tool_calls with no tool_calls and null content when JSON is requested (4/4 raw replays); the SDK now re-asks that step once with tool_choice none and recovers the JSON \u2014 passed 1/1 in the final live proof through dist/index.js, tool nonce present in structuredData. structuredOutputWithTools is declared true on that basis."},addedInPR:"pending",billingProbe:{date:"2026-09-03",status:200,method:"official io.net Intelligence web app plan configuration: Standard default with daily_limit fallback of 2; Professional and Developer are paid upgrade plans"}}}}}),Vue,vur=S({"src/lib/providers/catalog/mancer.json"(){Vue={$schema:"./provider-catalog.schema.json",id:"mancer",displayName:"Mancer",aliases:["mancer-tech"],tier:2,wire:{baseURL:"https://neuro.mancer.tech/oai/v1"},models:{default:"deepseek-v4-flash",fallbacks:["deepseek-v4-flash","gpt-oss-120b"],defaultContextWindow:1048576,defaultMaxOutputTokens:1048576,catalog:{mythomax:{contextWindow:8192,maxOutputTokens:8192,pricingPerMTok:{input:.14,output:.24},vision:!1,status:"production",description:"MythoMax (LLaMA 2, Simplified Alpaca format) \u2014 pricing and limits from the authenticated /oai/v1/models roster, 2026-09-03"},"deepseek-v4-flash":{contextWindow:1048576,maxOutputTokens:1048576,pricingPerMTok:{input:.07,output:.2},vision:!1,status:"production",description:"DeepSeek V4 Flash \u2014 Mancer's flagship general model; paid credits required \u2014 pricing and limits from the authenticated /oai/v1/models roster, 2026-09-03"},"deepseek-v4-flash-0731":{contextWindow:1048576,maxOutputTokens:1048576,pricingPerMTok:{input:.07,output:.2},vision:!1,status:"production",description:"DeepSeek V4 Flash, 2026-07-31 snapshot; paid credits required \u2014 pricing and limits from the authenticated /oai/v1/models roster, 2026-09-03"},mytholite:{contextWindow:2560,maxOutputTokens:150,pricingPerMTok:{input:0,output:0},vision:!1,status:"production",description:"MythoLite \u2014 Mancer's free demo model (2,560-token context, 150-token completions, Simplified Alpaca format); the only model usable with a zero balance \u2014 pricing and limits from the authenticated /oai/v1/models roster, 2026-09-03"},"remm-slerp":{contextWindow:6144,maxOutputTokens:6144,pricingPerMTok:{input:.14,output:.26},vision:!1,status:"production",description:"ReMM-SLERP (Simplified Alpaca format) \u2014 pricing and limits from the authenticated /oai/v1/models roster, 2026-09-03"},"magnum-72b-v4":{contextWindow:32768,maxOutputTokens:4096,pricingPerMTok:{input:1,output:2},vision:!1,status:"production",description:"Magnum 72B v4 (ChatML format) \u2014 pricing and limits from the authenticated /oai/v1/models roster, 2026-09-03"},"glm-4.7":{contextWindow:131072,maxOutputTokens:131072,pricingPerMTok:{input:.28,output:1},vision:!1,status:"production",description:"GLM-4.7 \u2014 pricing and limits from the authenticated /oai/v1/models roster, 2026-09-03"},"gpt-oss-120b":{contextWindow:131072,maxOutputTokens:131072,pricingPerMTok:{input:.022,output:.2},vision:!1,status:"production",description:"GPT-OSS 120B \u2014 pricing and limits from the authenticated /oai/v1/models roster, 2026-09-03"},"weaver-alpha":{contextWindow:8e3,maxOutputTokens:6e3,pricingPerMTok:{input:.16,output:.3},vision:!1,status:"production",description:"Weaver Alpha (Simplified Alpaca format) \u2014 pricing and limits from the authenticated /oai/v1/models roster, 2026-09-03"},"dans-pe-1.3-24b":{contextWindow:32768,maxOutputTokens:8192,pricingPerMTok:{input:.2,output:.8},vision:!1,status:"production",description:"Dan's PersonalityEngine 1.3 24B \u2014 pricing and limits from the authenticated /oai/v1/models roster, 2026-09-03"}},topModels:["deepseek-v4-flash","gpt-oss-120b","glm-4.7","mytholite"],testModel:"mytholite"},capabilities:{text:!0,streaming:!0,tools:!1,toolsWithStreaming:!1,structuredOutput:!0,structuredOutputWithTools:!1,embeddings:!1,thinking:!1},errorRules:[{status:401,pattern:"Bad API key",class:"authentication",message:"Invalid Mancer API key. Check {apiKeyEnvVar}. Get one at https://mancer.tech/dashboard"},{pattern:"Unknown Model",class:"invalid-model",message:"Mancer model '{model}' is unknown. Pick a current model from the /oai/v1/models roster or https://mancer.tech/pricing."},{status:402,pattern:"requires paid credits",class:"provider",message:"Mancer model '{model}' requires paid credits; with a zero balance only the free model 'mytholite' works. Add credits at https://mancer.tech/dashboard or see https://mancer.tech/pricing."}],setup:{url:"https://mancer.tech/dashboard",apiKeyFormat:"^mcr_[A-Za-z0-9]+$",billingPolicy:"free-tier",instructions:["1. Visit: https://mancer.tech/dashboard and sign in","2. Create an API key (prefix mcr_)","3. Without credits only the free model 'mytholite' answers; every other model returns 402 until you add credits at https://mancer.tech/pricing","4. Set {apiKeyEnvVar} in your .env file"],description:"OpenAI-compatible endpoint at https://neuro.mancer.tech/oai/v1. One free demo model; paid credits unlock the rest of the roster."},evidence:{rosterVerified:{date:"2026-09-03",method:"authenticated GET /oai/v1/models; full response retained as evidence/mancer-roster-authenticated.json in the campaign scratchpad and every catalog price/limit machine-checked against it (Mancer re-prices \u2014 gpt-oss-120b input moved 0.024 \u2192 0.022 within the day)",status:200},authProbe:{date:"2026-09-03",status:401},billingProbe:{date:"2026-09-03",status:402,method:'POST /oai/v1/chat/completions on deepseek-v4-flash with a zero balance: {"error":{"type":"CANT_AFFORD","message":"This model requires paid credits to use!"}}'},liveMatrix:{date:"2026-09-03",result:`18-probe harness on the free model mytholite: roster, chat, max_completion_tokens, system role, content parts, sampling params, SSE stream (usage chunk + [DONE]), json_schema (valid JSON matching schema) and json_object all 200; tools and tools+schema 400 BAD_PARAMETERS ('"auto" tool choice requires --enable-auto-tool-choice and --tool-call-parser') so tools are declared false; vision 200 but text-only (image ignored); bad key 401 'Bad API key'; unknown model 400 'Unknown Model'. Paid models could not be capability-probed without credits \u2014 tools may work there and can be re-declared once probed. Nightly matrix pins testModel mytholite.`},addedInPR:"pending"}}}}),Wue,Tur=S({"src/lib/providers/catalog/mistral.json"(){Wue={$schema:"./provider-catalog.schema.json",id:"mistral",displayName:"Mistral",aliases:[],tier:2,wire:{baseURL:"https://api.mistral.ai/v1"},models:{default:"mistral-small-2506",registryDefaultModel:"mistral-large-latest",fallbacks:["mistral-small-2506","mistral-medium-latest"],defaultContextWindow:128e3,defaultMaxOutputTokens:4096,catalog:{"mistral-large-latest":{contextWindow:256e3,vision:!0,status:"production",description:"Mistral Large (Latest)"},"mistral-large-2512":{contextWindow:256e3,vision:!0,status:"production",description:"Mistral Large 2512"},"mistral-medium-latest":{contextWindow:128e3,vision:!0,status:"production",description:"Mistral Medium (Latest)"},"mistral-medium-2508":{vision:!0,status:"production",description:"Mistral Medium 2508"},"mistral-small-latest":{contextWindow:128e3,vision:!0,status:"production",description:"Mistral Small (Latest)"},"mistral-small-2506":{vision:!0,status:"production",description:"Recommended - Mistral Small 2506"},"magistral-medium-latest":{contextWindow:128e3,vision:!0,status:"production",description:"Magistral Medium (Reasoning)"},"magistral-small-latest":{vision:!0,status:"production",description:"Magistral Small (Reasoning)"},"ministral-14b-2512":{enumMember:"MINISTRAL_14B_2512",vision:!1,status:"production",description:"Ministral 14B (Edge)"},"ministral-8b-2512":{enumMember:"MINISTRAL_8B_2512",vision:!1,status:"production",description:"Ministral 8B (Edge)"},"ministral-3b-2512":{enumMember:"MINISTRAL_3B_2512",vision:!1,status:"production",description:"Ministral 3B (Edge)"},"codestral-latest":{contextWindow:256e3,vision:!1,status:"production",description:"Codestral (Code Generation)"},"codestral-2508":{contextWindow:256e3,vision:!1,status:"production",description:"Codestral 2508 (Code Generation)"},"codestral-embed":{vision:!1,status:"production",description:"Codestral Embed"},"devstral-medium-latest":{vision:!1,status:"production",description:"Devstral Medium (Software Development)"},"devstral-small-latest":{vision:!1,status:"production",description:"Devstral Small (Software Development)"},"pixtral-large":{vision:!1,status:"retired",description:"Retired 2026-08 \u2014 absent from Mistral's roster and rejected as an invalid model"},"pixtral-12b":{vision:!0,status:"production",description:"Pixtral 12B \u2014 vision-capable; re-verified live 2026-08-30"},"voxtral-small-latest":{vision:!1,status:"production",description:"Voxtral Small (Audio)"},"voxtral-mini-latest":{vision:!1,status:"production",description:"Voxtral Mini (Audio)"},"devstral-2512":{enumMember:"DEVSTRAL_2",contextWindow:256e3,vision:!1,status:"production",description:"Devstral 2 (December 2025)"},"devstral-small-2512":{enumMember:"DEVSTRAL_SMALL_2",contextWindow:256e3,vision:!1,status:"retired",description:"Retired 2026-08 \u2014 absent from Mistral's roster and rejected as an invalid model"},"magistral-medium-2509":{vision:!1,status:"retired",description:"Retired 2026-08 \u2014 absent from Mistral's roster and rejected as an invalid model"},"magistral-small-2509":{vision:!1,status:"retired",description:"Retired 2026-08 \u2014 absent from Mistral's roster and rejected as an invalid model"},"voxtral-mini-2602":{enumMember:"VOXTRAL_MINI_TRANSCRIBE_2",vision:!1,status:"production",description:"Voxtral Mini Transcribe 2 (February 2026)"},"mistral-ocr-2512":{enumMember:"MISTRAL_OCR_3",vision:!1,status:"production",description:"Mistral OCR 3 (December 2025)"},"mistral-ocr-latest":{vision:!1,status:"production",description:"Mistral OCR (Latest)"},"mistral-nemo":{vision:!1,status:"retired",description:"Retired 2026-08 \u2014 absent from Mistral's roster and rejected as an invalid model"},"mistral-embed":{vision:!1,status:"production",description:"Mistral Embed"},"mistral-moderation-latest":{vision:!1,status:"retired",description:"Retired 2026-08 \u2014 absent from Mistral's roster and rejected as an invalid model"},"mistral-small-2603":{enumMember:"MISTRAL_SMALL_4",contextWindow:256e3,vision:!0,status:"production",description:"Mistral Small 4 (June 2026)"},"mistral-small-creative":{vision:!1,status:"retired",description:"Retired 2026-08 \u2014 absent from Mistral's roster and rejected as an invalid model"}},visionModel:"mistral-medium-latest",topModels:["mistral-large-latest","mistral-small-latest","codestral-latest","magistral-medium-latest","pixtral-12b"]},capabilities:{text:!0,streaming:!0,tools:!0,toolsWithStreaming:!0,structuredOutput:!0,structuredOutputWithTools:!1,embeddings:!1,thinking:!1},errorRules:[{status:401,pattern:"API_KEY_INVALID|Invalid API key|Unauthorized",class:"authentication",message:"Invalid Mistral API key. Please check your {apiKeyEnvVar} environment variable."}],quirks:{registryDefaultIgnoresModelEnvVar:!0},timeouts:{generateMs:45e3,streamMs:12e4},autoSelectPriority:9,setup:{url:"https://console.mistral.ai/api-keys",apiKeyFormat:"^[A-Za-z0-9]{32}$",billingPolicy:"free-with-card",instructions:["1. Visit: https://console.mistral.ai/api-keys","2. Create or sign in to your account","3. Generate a new API key"]},evidence:{rosterVerified:{date:"2026-08-30",method:"GET /models against the live account, cross-checked with a real chat call per id"},liveMatrix:{date:"2026-08-30",result:"17 ids answer normally. A chat probe alone was not enough to judge the rest, because Mistral rejects every non-chat model with the same generic 'Invalid model' text: cross-referencing the roster shows mistral-embed, codestral-embed, mistral-ocr-latest, mistral-ocr-2512, voxtral-mini-latest and voxtral-mini-2602 are all still listed and alive \u2014 they are embedding, OCR and audio models that a chat endpoint is right to refuse \u2014 so they keep production status. An id is marked retired only when BOTH signals agree: absent from the roster AND rejected by a live chat call. pixtral-12b is the one id where they disagree \u2014 the roster omits it but a real call returns 200, so it was moved back to production, on the rule that a live 200 outranks a roster omission. mistral-large-latest and mistral-large-2512 answer 403 'not available in your subscription tier': a plan limit on this account, not a retirement, so they stay production. visionModel is pinned to mistral-medium-latest because the otherwise-first vision id, mistral-large-latest, is behind that plan gate. Combined tools plus response_format probes returned 429 twice, which is not successful capability evidence, so structuredOutputWithTools remains false pending a successful combined-request probe."},addedInPR:"https://github.com/juspay/neurolink/pull/1587"}}}}),Kue,wur=S({"src/lib/providers/catalog/morph.json"(){Kue={$schema:"./provider-catalog.schema.json",id:"morph",displayName:"Morph",aliases:["morphllm"],tier:2,wire:{baseURL:"https://api.morphllm.com/v1"},models:{default:"morph-v3-large",fallbacks:["morph-v3-large","morph-v3-fast"],defaultContextWindow:262144,defaultMaxOutputTokens:131072,catalog:{"morph-v3-large":{contextWindow:262144,maxOutputTokens:131072,pricingPerMTok:{input:.9,output:1.9},vision:!1,status:"production",description:"Recommended - Morph's high-accuracy Fast Apply model for complex code edits (2500+ tok/sec, 98% accuracy); the general-purpose choice of Morph's two chat-usable models. Does not honour the OpenAI tool-calling contract: with tools attached it emits the call as literal <tool_call> text in message.content instead of a tool_calls array"},"morph-v3-fast":{contextWindow:262144,maxOutputTokens:131072,pricingPerMTok:{input:.8,output:1.2},vision:!1,status:"production",description:"Morph's fastest Fast Apply model, purpose-built for applying code edits (10,500+ tok/sec, 96% accuracy) rather than general chat. Ignores the tools parameter outright and returns unrelated generated text instead of a tool call"}},topModels:["morph-v3-large","morph-v3-fast"]},capabilities:{text:!0,streaming:!0,tools:!1,toolsWithStreaming:!1,structuredOutput:!0,structuredOutputWithTools:!1,embeddings:!1,thinking:!1},errorRules:[{status:401,pattern:"API key required",class:"authentication",message:"Invalid or missing Morph API key. Check {apiKeyEnvVar}. Get one at https://morphllm.com/dashboard"},{status:400,pattern:"is not served by this endpoint",class:"invalid-model",message:"Morph model '{model}' is not served by this endpoint. Pick a current model from the authenticated GET /v1/models roster or https://morphllm.com/dashboard."}],setup:{url:"https://morphllm.com/dashboard",apiKeyFormat:null,billingPolicy:"free-with-card",description:"API key",instructions:["1. Visit: https://morphllm.com/dashboard and sign in","2. A card on file is required; the account is rate-limited (5 req/min) until one is added","3. Create an API key on the dashboard","4. Set {apiKeyEnvVar} in your .env file"]},quirks:{messageContentFormat:"string"},evidence:{rosterVerified:{date:"2026-09-05",method:"authenticated GET /v1/models",status:200},authProbe:{date:"2026-09-05",status:401,code:"invalid_api_key"},liveMatrix:{date:"2026-09-05",result:"Full wire probe on morph-v3-fast plus a focused tool-calling re-probe on both chat models. Non-tool basics all 200: chat, max_completion_tokens, system role, sampling params, SSE streaming (content deltas, usage chunk, [DONE]), json_schema (valid JSON matching schema) and json_object. Array-shaped message content is REJECTED with HTTP 500 'Request processing failed: text.charCodeAt is not a function' \u2014 same class of quirk as Cloudflare (PR #1587); messageContentFormat is set to 'string' and vision is false because the vision probe sends array parts and hits the identical 500. Tool calling does NOT work despite HTTP 200: morph-v3-large echoes the call as literal '<tool_call>{...}</tool_call>' text in message.content, and morph-v3-fast ignores the tools parameter and returns unrelated generated text (Python source) with finish_reason=length. tools and toolsWithStreaming are declared false on that basis; tools_plus_schema returning 200 is not evidence of structuredOutputWithTools since tools do not actually work. structuredOutput is true and strong (schema-conformant JSON, json_object accepted). The GET /v1/models roster lists 22 ids (morph-v3-fast, morph-v3-large, auto, morph-compactor, morph-warp-grep-v2.1, and passthrough ids for GLM/DeepSeek/Kimi/Qwen/MiniMax/Gemma/computer-use), but a deliberately invalid model name on /chat/completions came back 'is not served by this endpoint; accepted models: morph-v0, morph-v2, morph-v3-fast, morph-v3-large' \u2014 none of those other 18 roster ids were live-verified against chat/completions, so only the two confirmed working chat models are catalogued; context window (262144) and max output tokens (131072) for both come from Morph's public model metadata (https://www.morphllm.com/api/models/json), which also supplied pricing. Morph is a code-application (Fast Apply) specialist, not a general chat vendor: morph-v3-large is catalogued as the default because it is the general-purpose one of the pair, while morph-v3-fast is purpose-built for edit application rather than open-ended conversation."},addedInPR:"pending"}}}}),Jue,Eur=S({"src/lib/providers/catalog/novita.json"(){Jue={$schema:"./provider-catalog.schema.json",id:"novita",displayName:"Novita AI",aliases:[],tier:2,wire:{baseURL:"https://api.novita.ai/openai/v1"},models:{default:"zai-org/glm-5.3-flash",testModel:"zai-org/glm-5.3-flash",fallbacks:["meta-llama/llama-3.3-70b-instruct","deepseek/deepseek-v3-0324","qwen/qwen-2.5-72b-instruct","google/gemma-3-27b-it"],defaultContextWindow:128e3,defaultMaxOutputTokens:4096,catalog:{"meta-llama/llama-3.3-70b-instruct":{vision:!1,status:"production",description:"Meta Llama 3.3 70B Instruct; a plain non-reasoning chat model. Kept as a fallback for plain chat because it does not support structured output; the runtime/default model is zai-org/glm-5.3-flash (see evidence.liveMatrix)"},"zai-org/glm-5.3-flash":{pricingPerMTok:{input:.075,output:.25,cachedInput:.015},vision:!1,status:"production",description:"Zhipu GLM-5.3 Flash \u2014 Novita's own served default and the model exercised end-to-end by NeuroLink's live capability probe (chat, streaming, tool calling, tools+streaming, tools+schema together). Reasons internally via `reasoning_content` before answering, so it needs a generous max_tokens budget or replies get cut mid-thought \u2014 pin `testModel` here for the capability matrix. Pricing from the authenticated roster, 2026-09-05"},"deepseek/deepseek-v3-0324":{vision:!1,status:"production",description:"DeepSeek V3 (0324 snapshot) \u2014 the non-reasoning DeepSeek chat line (the reasoning variant is deepseek/deepseek-r1); fallback"},"qwen/qwen-2.5-72b-instruct":{vision:!1,status:"production",description:"Qwen 2.5 72B Instruct \u2014 plain (non-thinking) Alibaba Qwen chat model; fallback"},"google/gemma-3-27b-it":{vision:!1,status:"production",description:"Google Gemma 3 27B IT \u2014 non-reasoning instruct chat model; fallback"}},topModels:["meta-llama/llama-3.3-70b-instruct","zai-org/glm-5.3-flash","deepseek/deepseek-v3-0324","qwen/qwen-2.5-72b-instruct","google/gemma-3-27b-it"]},capabilities:{text:!0,streaming:!0,tools:!0,toolsWithStreaming:!0,structuredOutput:!0,structuredOutputWithTools:!0,embeddings:!1,thinking:!1},errorRules:[{status:401,pattern:"failed to authenticate API key|FAILED_TO_AUTH",class:"authentication",message:"Invalid Novita API key. Check {apiKeyEnvVar}. Get one at https://novita.ai/settings/key-management"},{status:404,pattern:"model not found|MODEL_NOT_FOUND",class:"invalid-model",message:"Novita model '{model}' not found. Pick a current model from the authenticated /openai/v1/models roster or https://novita.ai/models"}],setup:{url:"https://novita.ai/settings/key-management",apiKeyFormat:"^sk_[A-Za-z0-9_-]+$",billingPolicy:"free-tier",instructions:["1. Visit: https://novita.ai/settings/key-management and sign in (Google, GitHub, Hugging Face, or email)","2. Choose Create API Key, name it, and copy it immediately \u2014 it is shown in full only once and starts with sk_","3. New accounts start on a small trial voucher (a few dollars of Model API credit); manual top-ups go through Stripe with a $10 minimum, so keep early test calls small","4. Set {apiKeyEnvVar} in your .env file"],description:"OpenAI-compatible endpoint at https://api.novita.ai/openai/v1. New accounts start on a small trial voucher; the roster spans 150+ open-weight chat, reasoning and vision-named models."},evidence:{rosterVerified:{date:"2026-09-05",method:"authenticated GET /openai/v1/models \u2014 156 ids, e.g. zai-org/glm-5.3-flash, zai-org/glm-5.3, deepseek/deepseek-v4-pro-0813, moonshotai/kimi-k3",status:200},authProbe:{date:"2026-09-05",status:401,code:"FAILED_TO_AUTH"},liveMatrix:{date:"2026-09-05",result:`18-probe harness against zai-org/glm-5.3-flash (Novita's own served default) via https://api.novita.ai/openai/v1. Wire mechanics: chat, system role, array content parts, sampling params and max_completion_tokens all 200; SSE streaming 200 with a usage chunk and a terminal [DONE]. Reasoning is genuinely heavy on this model \u2014 several 200 responses show finish_reason=length with only 8 completion tokens, entirely spent on an unfinished reasoning_content and an empty visible content \u2014 but \`default\` and \`testModel\` are both pinned to the probed model itself (zai-org/glm-5.3-flash, Novita's own served default), which is exactly what the capability matrix below exercises \u2014 see the structured-output findings further down for why the reasoning-heavy default is still the right choice over the plain meta-llama/llama-3.3-70b-instruct fallback. Tool calling: a real tool_call (get_time, parsed tz argument) on the first turn, a null-content assistant tool_calls turn accepted on replay, and a tool_call surfacing mid-SSE-stream \u2014 tools and toolsWithStreaming true; tool_choice is tolerated even with no tools declared. response_format json_object returns 200 cleanly \u2014 structuredOutput true. response_format json_schema also returns 200, but at this token budget the content is unfinished reasoning text rather than schema-conformant JSON, same reasoning-budget effect as above \u2014 NeuroLink's coerceJsonToSchema repair layer is the safety net here, as for other reasoning-heavy vendors. Sending tools and a JSON schema together in one request succeeds (200, real tool_call returned) at the wire level. That single-shot result alone does not demonstrate the combined capability \u2014 the follow-up turn where the model must answer the original JSON-schema question from a tool result was untested at raw-probe time. It was proved separately through the SDK's public surface: \`generate({ provider: 'novita', schema, ...})\` with a registered getTime tool called end-to-end via dist/index.js \u2014 the model invoked getTime(tz='Asia/Tokyo') (toolsUsed=['getTime'], stepsUsed=2), then answered \`{"city":"Tokyo","time":"09:00"}\`, which parsed against the request schema with no repair needed (jsonRepaired/jsonTruncated both unset) \u2014 passed 1/1 in the final live proof. structuredOutputWithTools is declared true on that basis. Vision: a 64x64 PNG sent to glm-5.3-flash (not a vision-tagged model; Novita has no live-verified vision model) returns 200 with reasoning_content correctly describing 'a solid blue rectangle' but an EMPTY final content \u2014 not a working, schema-usable vision reply, so no catalog entry is marked vision:true and models.visionModel is left unset. bad key -> 401 {"code":401,"reason":"FAILED_TO_AUTH","message":"failed to authenticate API key"}; bad model -> 404 {"code":404,"reason":"MODEL_NOT_FOUND","message":"model not found"}. Novita funds this account with a $1 Model API voucher, so only this one model was live-probed end-to-end; the other four catalog entries are roster-verified by id only, not capability-probed. Structured output on Novita is per-model, and the catalog schema can only express it per provider. Verified 2026-09-05 at the wire: meta-llama/llama-3.3-70b-instruct returns HTTP 400 for response_format json_schema ("does not support 'json_schema' response format. Supported formats: json_object") and also 400 for json_object, while zai-org/glm-5.3-flash returns 200 for json_object, json_schema and tools+json_schema together. The default is therefore zai-org/glm-5.3-flash, which is also Novita's own served default, so the provider-level structuredOutput and structuredOutputWithTools flags are true for the model a default-configuration caller actually gets. meta-llama/llama-3.3-70b-instruct remains a fallback for plain chat. Tool calling was verified separately on both models (finish_reason=tool_calls with a structured call). Note that glm-5.3-flash is a reasoning model: at very small max_tokens (observed at 40) the budget is consumed by reasoning and content comes back empty; the entry's defaultMaxOutputTokens of 4096 is well clear of that.`},addedInPR:"pending"}}}}),Yue,bur=S({"src/lib/providers/catalog/perplexity.json"(){Yue={$schema:"./provider-catalog.schema.json",id:"perplexity",displayName:"Perplexity",aliases:["pplx"],tier:2,wire:{baseURL:"https://api.perplexity.ai"},models:{default:"sonar",fallbacks:["sonar","sonar-pro","sonar-reasoning","sonar-reasoning-pro","sonar-deep-research"],defaultContextWindow:127e3,defaultMaxOutputTokens:4096,catalog:{sonar:{contextWindow:127e3,pricingPerMTok:{input:1,output:1},vision:!1,status:"production",description:"Recommended - Sonar with web grounding"},"sonar-pro":{contextWindow:2e5,pricingPerMTok:{input:3,output:15},vision:!1,status:"production",description:"Better reasoning"},"sonar-reasoning":{contextWindow:127e3,pricingPerMTok:{input:1,output:5},vision:!1,status:"production",description:"Explicit reasoning traces"},"sonar-reasoning-pro":{contextWindow:127e3,pricingPerMTok:{input:2,output:8},vision:!1,status:"production",description:"Flagship reasoning + web"},"sonar-deep-research":{contextWindow:2e5,pricingPerMTok:{input:2,output:8},vision:!1,status:"production",description:"Long-form research with citations"}},topModels:["sonar","sonar-pro","sonar-reasoning","sonar-reasoning-pro","sonar-deep-research"]},capabilities:{text:!0,streaming:!0,tools:!0,toolsWithStreaming:!0,structuredOutput:!1,structuredOutputWithTools:!1,embeddings:!1,thinking:!1},errorRules:[{status:401,pattern:"Invalid API key|Authentication",class:"authentication",message:"Invalid Perplexity API key. Get one at https://www.perplexity.ai/settings/api"}],setup:{url:"https://www.perplexity.ai/settings/api",apiKeyFormat:null,billingPolicy:"no-free-tier",instructions:["1. Visit: https://www.perplexity.ai/settings/api","2. Sign in to your Perplexity account","3. Create a new API key (Sonar tier)","4. Set {apiKeyEnvVar} in your .env file"]},evidence:{rosterVerified:{date:"2026-08-28",method:"transcribed from pre-migration TS catalog"},liveMatrix:null,addedInPR:"https://github.com/juspay/neurolink/pull/1587"}}}}),Xue,Sur=S({"src/lib/providers/catalog/sambanova.json"(){Xue={$schema:"./provider-catalog.schema.json",id:"sambanova",displayName:"SambaNova",aliases:[],tier:2,wire:{baseURL:"https://api.sambanova.ai/v1"},models:{default:"Meta-Llama-3.3-70B-Instruct",visionModel:"Meta-Llama-3.3-70B-Instruct",fallbacks:["Meta-Llama-3.3-70B-Instruct","gpt-oss-120b"],defaultContextWindow:131072,defaultMaxOutputTokens:8192,catalog:{"Meta-Llama-3.3-70B-Instruct":{contextWindow:131072,pricingPerMTok:{input:.6,output:1.2},vision:!0,status:"production",description:"Recommended - Meta Llama 3.3 70B; production, 128K context; vision-capable"},"gpt-oss-120b":{contextWindow:131072,pricingPerMTok:{input:.22,output:.59},vision:!1,status:"production",description:"OpenAI GPT-OSS 120B (open-weight)"},"DeepSeek-V3.1":{contextWindow:131072,pricingPerMTok:{input:3,output:4.5},vision:!1,status:"production",description:"DeepSeek V3.1 (reasoning)"},"DeepSeek-V3.2":{contextWindow:32768,pricingPerMTok:{input:3,output:4.5},vision:!1,status:"preview",description:"DeepSeek V3.2 (reasoning; vendor preview, 32K context)"},"MiniMax-M2.7":{contextWindow:196608,pricingPerMTok:{input:.6,output:2.4,cachedInput:.06},vision:!1,status:"production",description:"MiniMax M2.7, 192K context"},"MiniMax-M3":{pricingPerMTok:{input:.6,output:2.4},vision:!0,status:"production",description:"MiniMax M3 (vision)"},"gemma-4-31B-it":{contextWindow:131072,pricingPerMTok:{input:.38,output:1.15},vision:!0,status:"preview",description:"Google Gemma 4 31B IT (vision; vendor preview)"}},topModels:["Meta-Llama-3.3-70B-Instruct","gpt-oss-120b","DeepSeek-V3.1","DeepSeek-V3.2","MiniMax-M2.7","MiniMax-M3","gemma-4-31B-it"]},capabilities:{text:!0,streaming:!0,tools:!0,toolsWithStreaming:!0,structuredOutput:!0,structuredOutputWithTools:!1,embeddings:!1,thinking:!1},errorRules:[{status:401,pattern:"invalid_api_key|Incorrect API key|authentication_error",class:"authentication",message:"Invalid SambaNova API key. Check {apiKeyEnvVar}. Get one at https://cloud.sambanova.ai/apis"},{status:402,pattern:"PAYMENT_METHOD_REQUIRED|balance_units",class:"provider",message:"SambaNova account has no credits (new accounts have no free allowance). Add a payment method and purchase credits at https://cloud.sambanova.ai/plans/billing"}],setup:{url:"https://cloud.sambanova.ai/apis",apiKeyFormat:null,billingPolicy:"no-free-tier",instructions:["1. Visit: https://cloud.sambanova.ai (Google/Microsoft OAuth works)","2. Complete the profile step; note new accounts have NO free allowance \u2014 a payment method and purchased credits are required before calls succeed","3. Create an API key under API Keys","4. Set {apiKeyEnvVar} in your .env file"]},evidence:{rosterVerified:{date:"2026-08-27",method:"authenticated GET /v1/models"},authProbe:{date:"2026-08-27",status:401,code:"invalid_api_key"},billingProbe:{date:"2026-08-27",status:402,code:"PAYMENT_METHOD_REQUIRED"},liveMatrix:{date:"2026-08-30",result:"Six of seven ids answer. Vision re-tested with a valid 64x64 PNG: gemma-4-31B-it and Meta-Llama-3.3-70B-Instruct both describe it correctly, so Meta-Llama's vision flag is now true. MiniMax-M3 returned 429 'currently experiencing high demand' \u2014 the model is served and simply busy, so it stays production rather than being retired; its declared vision support is therefore still unverified."},addedInPR:"https://github.com/juspay/neurolink/pull/1586"}}}}),Zue,_ur=S({"src/lib/providers/catalog/together-ai.json"(){Zue={$schema:"./provider-catalog.schema.json",id:"together-ai",displayName:"Together AI",enumTypeName:"TogetherAIModels",credentialsKey:"together",aliases:["together"],tier:2,wire:{baseURL:"https://api.together.xyz/v1",envOverrides:{apiKey:"TOGETHER_API_KEY",baseURL:"TOGETHER_BASE_URL",model:"TOGETHER_MODEL"}},models:{default:"meta-llama/Llama-3.3-70B-Instruct-Turbo",fallbackModelName:"meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo",fallbacks:["meta-llama/Llama-3.3-70B-Instruct-Turbo","meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo","meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo","meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo","mistralai/Mixtral-8x22B-Instruct-v0.1","Qwen/Qwen2.5-72B-Instruct-Turbo","deepseek-ai/DeepSeek-R1","deepseek-ai/DeepSeek-V3"],defaultContextWindow:128e3,defaultMaxOutputTokens:4096,catalog:{"meta-llama/Llama-3.3-70B-Instruct-Turbo":{enumMember:"LLAMA_3_3_70B_INSTRUCT_TURBO",contextWindow:128e3,pricingPerMTok:{input:.88,output:.88},vision:!1,status:"production",description:"Recommended - Llama 3.3 70B Turbo"},"meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo":{enumMember:"LLAMA_3_1_405B_INSTRUCT_TURBO",contextWindow:128e3,pricingPerMTok:{input:3.5,output:3.5},vision:!1,status:"production",description:"Flagship 405B"},"meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo":{enumMember:"LLAMA_3_1_70B_INSTRUCT_TURBO",contextWindow:128e3,pricingPerMTok:{input:.88,output:.88},vision:!1,status:"production",description:"Llama 3.1 70B Instruct Turbo"},"meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo":{enumMember:"LLAMA_3_1_8B_INSTRUCT_TURBO",contextWindow:128e3,pricingPerMTok:{input:.18,output:.18},vision:!1,status:"production",description:"Llama 3.1 8B Instruct Turbo \u2014 fastest"},"mistralai/Mixtral-8x22B-Instruct-v0.1":{enumMember:"MIXTRAL_8X22B_INSTRUCT",contextWindow:65536,pricingPerMTok:{input:1.2,output:1.2},vision:!1,status:"production",description:"Mistral 8x22B MoE"},"mistralai/Mixtral-8x7B-Instruct-v0.1":{enumMember:"MIXTRAL_8X7B_INSTRUCT",contextWindow:32768,pricingPerMTok:{input:.6,output:.6},vision:!1,status:"production",description:"Mixtral 8x7B Instruct"},"Qwen/Qwen2.5-72B-Instruct-Turbo":{enumMember:"QWEN_2_5_72B_INSTRUCT_TURBO",contextWindow:32768,pricingPerMTok:{input:1.2,output:1.2},vision:!1,status:"production",description:"Qwen 2.5 72B Turbo"},"Qwen/Qwen2.5-Coder-32B-Instruct":{enumMember:"QWEN_2_5_CODER_32B",contextWindow:32768,vision:!1,status:"production",description:"Qwen 2.5 Coder 32B Instruct"},"deepseek-ai/DeepSeek-R1":{enumMember:"DEEPSEEK_R1",contextWindow:64e3,pricingPerMTok:{input:7,output:7},vision:!1,status:"production",description:"DeepSeek R1 reasoning"},"deepseek-ai/DeepSeek-V3":{enumMember:"DEEPSEEK_V3",contextWindow:64e3,pricingPerMTok:{input:1.25,output:1.25},vision:!1,status:"production",description:"DeepSeek V3"},"google/gemma-2-27b-it":{enumMember:"GEMMA_2_27B_IT",contextWindow:8192,vision:!1,status:"production",description:"Google Gemma 2 27B IT"},"microsoft/WizardLM-2-8x22B":{enumMember:"WIZARDLM_2_8X22B",contextWindow:65536,vision:!1,status:"production",description:"WizardLM 2 8x22B"}},topModels:["meta-llama/Llama-3.3-70B-Instruct-Turbo","meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo","Qwen/Qwen2.5-72B-Instruct-Turbo","deepseek-ai/DeepSeek-R1","mistralai/Mixtral-8x22B-Instruct-v0.1"]},capabilities:{text:!0,streaming:!0,tools:!0,toolsWithStreaming:!0,structuredOutput:!0,structuredOutputWithTools:!0,embeddings:!1,thinking:!1},errorRules:[{status:401,pattern:"Invalid API key|Authentication",class:"authentication",message:"Invalid Together AI API key. Get one at https://api.together.xyz/settings/api-keys"}],setup:{url:"https://api.together.xyz/settings/api-keys",apiKeyFormat:null,billingPolicy:"free-with-card",instructions:["1. Visit: https://api.together.xyz/settings/api-keys","2. Sign in to your Together AI account","3. Create a new API key","4. Set {apiKeyEnvVar} in your .env file"]},evidence:{rosterVerified:{date:"2026-08-28",method:"transcribed from pre-migration TS catalog"},liveMatrix:null,addedInPR:"https://github.com/juspay/neurolink/pull/1587"}}}}),Que,Cur=S({"src/lib/providers/catalog/upstage.json"(){Que={$schema:"./provider-catalog.schema.json",id:"upstage",displayName:"Upstage",aliases:["solar"],tier:2,wire:{baseURL:"https://api.upstage.ai/v1"},models:{default:"solar-pro4",fallbacks:["solar-pro3","solar-mini"],defaultContextWindow:524288,defaultMaxOutputTokens:131072,catalog:{"solar-pro4":{contextWindow:524288,maxOutputTokens:131072,pricingPerMTok:{input:.3,output:1.2,cachedInput:.06},vision:!1,status:"production",description:"Recommended - Solar Pro 4; 512K context, up to 128K output tokens; agentic flagship for tool calling, terminal tasks and long-document reasoning"},"solar-pro4-260806":{contextWindow:524288,maxOutputTokens:131072,pricingPerMTok:{input:.3,output:1.2,cachedInput:.06},vision:!1,status:"production",description:"Pinned dated snapshot of Solar Pro 4 (2026-08-06 build) \u2014 the id the solar-pro4 alias currently resolves to"},"solar-pro3":{pricingPerMTok:{input:.15,output:.6,cachedInput:.015},vision:!1,status:"production",description:"Solar Pro 3; drop-in replacement for Solar Pro 2 with the same API interface, throughput and latency"},"solar-pro3-260323":{pricingPerMTok:{input:.15,output:.6,cachedInput:.015},vision:!1,status:"production",description:"Pinned dated snapshot of Solar Pro 3 (2026-03-23 build)"},"solar-pro2":{pricingPerMTok:{input:.15,output:.6,cachedInput:.015},vision:!1,status:"production",description:"Solar Pro 2; 31B-parameter model with an optional Reasoning Mode"},"solar-pro2-251215":{pricingPerMTok:{input:.15,output:.6,cachedInput:.015},vision:!1,status:"production",description:"Pinned dated snapshot of Solar Pro 2 (2025-12-15 build)"},"solar-mini":{pricingPerMTok:{input:.15,output:.15},vision:!1,status:"production",description:"Solar Mini; small, fast model for lightweight reasoning and cost-efficient tasks"},"solar-mini-250422":{pricingPerMTok:{input:.15,output:.15},vision:!1,status:"production",description:"Pinned dated snapshot of Solar Mini (2025-04-22 build)"},"syn-pro":{vision:!1,status:"production",description:"Syn Pro; Upstage's Japan-focused LLM"},"syn-pro-251021":{vision:!1,status:"production",description:"Pinned dated snapshot of Syn Pro (2025-10-21 build)"}},topModels:["solar-pro4","solar-pro3","solar-pro2","solar-mini","syn-pro"]},capabilities:{text:!0,streaming:!0,tools:!0,toolsWithStreaming:!0,structuredOutput:!0,structuredOutputWithTools:!0,embeddings:!1,thinking:!1},errorRules:[{status:401,pattern:"invalid_api_key|API key is invalid",class:"authentication",message:"Invalid Upstage API key. Check {apiKeyEnvVar}. Get one at https://console.upstage.ai/api-keys"},{pattern:"requested model is invalid or no longer supported",class:"invalid-model",message:"Upstage model '{model}' is invalid or no longer supported. Pick a current model from https://console.upstage.ai/docs/models."}],setup:{url:"https://console.upstage.ai/api-keys",apiKeyFormat:"^up_[A-Za-z0-9]+$",billingPolicy:"free-tier",instructions:["1. Visit: https://console.upstage.ai (Google OAuth works)","2. New accounts get a $10 sign-up credit \u2014 no payment method required","3. Create an API key under API Keys","4. Set {apiKeyEnvVar} in your .env file"]},evidence:{rosterVerified:{date:"2026-09-03",method:"authenticated GET /v1/models",status:200},authProbe:{date:"2026-09-03",status:401,code:"invalid_api_key"},liveMatrix:null,addedInPR:"pending"}}}}),ede,kur=S({"src/lib/providers/catalog/xai.json"(){ede={$schema:"./provider-catalog.schema.json",id:"xai",displayName:"xAI",aliases:["grok"],tier:2,wire:{baseURL:"https://api.x.ai/v1"},models:{default:"grok-4.6",fallbacks:["grok-4.6","grok-4.5","grok-4.3","grok-3","grok-3-mini"],defaultContextWindow:131072,defaultMaxOutputTokens:4096,catalog:{"grok-4.6":{enumMember:"GROK_4_6",contextWindow:131072,vision:!0,status:"production",description:"Recommended - Grok 4.6, current flagship; vision-capable"},"grok-4.5":{enumMember:"GROK_4_5",contextWindow:131072,vision:!0,status:"production",description:"Grok 4.5 \u2014 vision-capable"},"grok-4.3":{enumMember:"GROK_4_3",contextWindow:131072,vision:!0,status:"production",description:"Grok 4.3 \u2014 vision-capable"},"grok-3":{contextWindow:131072,pricingPerMTok:{input:3,output:15},vision:!1,status:"production",description:"Grok 3 \u2014 still served, though absent from the /models roster"},"grok-3-mini":{contextWindow:131072,pricingPerMTok:{input:.3,output:.5},vision:!1,status:"production",description:"Faster + cheaper Grok 3"},"grok-2-latest":{contextWindow:131072,pricingPerMTok:{input:2,output:10},vision:!1,status:"retired",description:"Retired 2026-08 \u2014 xAI rejects it as an invalid model"},"grok-2-vision-latest":{contextWindow:32768,pricingPerMTok:{input:2,output:10},vision:!1,status:"retired",description:"Retired 2026-08 \u2014 xAI rejects it as an invalid model; vision moved to the grok-4.x line"},"grok-beta":{contextWindow:131072,pricingPerMTok:{input:5,output:15},vision:!1,status:"retired",description:"Retired 2026-08 \u2014 xAI rejects it as an invalid model"}},visionModel:"grok-4.6",topModels:["grok-4.6","grok-4.5","grok-4.3","grok-3"]},capabilities:{text:!0,streaming:!0,tools:!0,toolsWithStreaming:!0,structuredOutput:!0,structuredOutputWithTools:!0,embeddings:!1,thinking:!1},errorRules:[{status:401,pattern:"Invalid API key|Authentication|invalid_api_key",class:"authentication",message:"Invalid xAI API key. Please check your {apiKeyEnvVar} environment variable. Get one at https://console.x.ai/"},{pattern:"insufficient_quota|quota exceeded",class:"provider",message:"xAI account has insufficient quota. Top up at https://console.x.ai/"}],setup:{url:"https://console.x.ai/",apiKeyFormat:null,billingPolicy:"no-free-tier",instructions:["1. Visit: https://console.x.ai/","2. Sign in with your xAI account","3. Create an API key","4. Set {apiKeyEnvVar} in your .env file"]},evidence:{rosterVerified:{date:"2026-08-30",method:"GET /models against the live account, cross-checked with a real chat call per id"},liveMatrix:{date:"2026-08-30",result:"grok-2-latest, grok-2-vision-latest and grok-beta are rejected as invalid models. The grok-4.x line replaces them: 4.3/4.5/4.6 all answer, and all three read a 64x64 PNG correctly, so vision moved there from the retired grok-2-vision-latest. An earlier probe with an 8x8 PNG reported no vision \u2014 that was xAI answering 'Invalid PNG image', a complaint about the file rather than the capability. grok-3 and grok-3-mini are kept because they still serve, even though xAI's /models roster omits them: roster absence is not evidence of death here."},addedInPR:"https://github.com/juspay/neurolink/pull/1587"}}}}),r3,Aur=S({"src/lib/providers/catalog/index.generated.ts"(){"use strict";iur(),aur(),cur(),lur(),uur(),dur(),mur(),pur(),hur(),fur(),gur(),yur(),vur(),Tur(),wur(),Eur(),bur(),Sur(),_ur(),Cur(),kur(),r3=[Oue,Nue,Lue,Fue,$ue,Uue,Bue,zue,que,Gue,jue,Hue,Vue,Wue,Kue,Jue,Yue,Xue,Zue,Que,ede]}}),xur=S({"src/lib/types/enums.ts"(){"use strict"}}),Iur=S({"src/lib/types/action.ts"(){"use strict"}}),Rur=S({"src/lib/types/agentMode.ts"(){"use strict"}}),tde,n3,rde,o3=S({"node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/Options.js"(){tde=Symbol("Let zodToJsonSchema decide on which parser to use"),n3={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"},rde=e=>typeof e=="string"?{...n3,name:e}:{...n3,...e}}}),nde,ode=S({"node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/Refs.js"(){o3(),nde=e=>{const t=rde(e),r=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,flags:{hasReferencedOpenAiAnyType:!1},currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([n,o])=>[o._def,{def:o._def,path:[...t.basePath,t.definitionPath,n],jsonSchema:void 0}]))}}}});function sde(e,t,r,n){n?.errorMessages&&r&&(e.errorMessage={...e.errorMessage,[t]:r})}function Nr(e,t,r,n,o){e[t]=r,sde(e,t,n,o)}var ah=S({"node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/errorMessages.js"(){}}),s3,i3=S({"node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js"(){s3=(e,t)=>{let r=0;for(;r<e.length&&r<t.length&&e[r]===t[r];r++);return[(e.length-r).toString(),...t.slice(r)].join("/")}}}),wr,ide,ct,Xu,nI=S({"node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/helpers/util.js"(){(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function r(o){throw new Error}e.assertNever=r,e.arrayToEnum=o=>{const s={};for(const i of o)s[i]=i;return s},e.getValidEnumValues=o=>{const s=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),i={};for(const a of s)i[a]=o[a];return e.objectValues(i)},e.objectValues=o=>e.objectKeys(o).map(function(s){return o[s]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const s=[];for(const i in o)Object.prototype.hasOwnProperty.call(o,i)&&s.push(i);return s},e.find=(o,s)=>{for(const i of o)if(s(i))return i},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function n(o,s=" | "){return o.map(i=>typeof i=="string"?`'${i}'`:i).join(s)}e.joinValues=n,e.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(wr||(wr={})),(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(ide||(ide={})),ct=wr.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Xu=e=>{switch(typeof e){case"undefined":return ct.undefined;case"string":return ct.string;case"number":return Number.isNaN(e)?ct.nan:ct.number;case"boolean":return ct.boolean;case"function":return ct.function;case"bigint":return ct.bigint;case"symbol":return ct.symbol;case"object":return Array.isArray(e)?ct.array:e===null?ct.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ct.promise:typeof Map<"u"&&e instanceof Map?ct.map:typeof Set<"u"&&e instanceof Set?ct.set:typeof Date<"u"&&e instanceof Date?ct.date:ct.object;default:return ct.unknown}}}}),qe,il,a3=S({"node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/ZodError.js"(){nI(),qe=wr.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),il=class alr extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){const r=t||function(s){return s.message},n={_errors:[]},o=s=>{for(const i of s.issues)if(i.code==="invalid_union")i.unionErrors.map(o);else if(i.code==="invalid_return_type")o(i.returnTypeError);else if(i.code==="invalid_arguments")o(i.argumentsError);else if(i.path.length===0)n._errors.push(r(i));else{let a=n,c=0;for(;c<i.path.length;){const l=i.path[c];c===i.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(r(i))):a[l]=a[l]||{_errors:[]},a=a[l],c++}}};return o(this),n}static assert(t){if(!(t instanceof alr))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,wr.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){const r=Object.create(null),n=[];for(const o of this.issues)if(o.path.length>0){const s=o.path[0];r[s]=r[s]||[],r[s].push(t(o))}else n.push(t(o));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}},il.create=e=>new il(e)}}),ade,wy,cde=S({"node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/locales/en.js"(){a3(),nI(),ade=(e,t)=>{let r;switch(e.code){case qe.invalid_type:e.received===ct.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case qe.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,wr.jsonStringifyReplacer)}`;break;case qe.unrecognized_keys:r=`Unrecognized key(s) in object: ${wr.joinValues(e.keys,", ")}`;break;case qe.invalid_union:r="Invalid input";break;case qe.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${wr.joinValues(e.options)}`;break;case qe.invalid_enum_value:r=`Invalid enum value. Expected ${wr.joinValues(e.options)}, received '${e.received}'`;break;case qe.invalid_arguments:r="Invalid function arguments";break;case qe.invalid_return_type:r="Invalid function return type";break;case qe.invalid_date:r="Invalid date";break;case qe.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:wr.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case qe.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case qe.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case qe.custom:r="Invalid input";break;case qe.invalid_intersection_types:r="Intersection results could not be merged";break;case qe.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case qe.not_finite:r="Number must be finite";break;default:r=t.defaultError,wr.assertNever(e)}return{message:r}},wy=ade}});function c3(){return lde}var lde,l3=S({"node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/errors.js"(){cde(),lde=wy}});function nt(e,t){const r=c3(),n=oI({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===wy?void 0:wy].filter(o=>!!o)});e.common.issues.push(n)}var oI,aa,Rt,Ey,$i,u3,d3,ch,rE,ude=S({"node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/helpers/parseUtil.js"(){l3(),cde(),oI=e=>{const{data:t,path:r,errorMaps:n,issueData:o}=e,s=[...r,...o.path||[]],i={...o,path:s};if(o.message!==void 0)return{...o,path:s,message:o.message};let a="";const c=n.filter(l=>!!l).slice().reverse();for(const l of c)a=l(i,{data:t,defaultError:a}).message;return{...o,path:s,message:a}},aa=class clr{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){const n=[];for(const o of r){if(o.status==="aborted")return Rt;o.status==="dirty"&&t.dirty(),n.push(o.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){const n=[];for(const o of r){const s=await o.key,i=await o.value;n.push({key:s,value:i})}return clr.mergeObjectSync(t,n)}static mergeObjectSync(t,r){const n={};for(const o of r){const{key:s,value:i}=o;if(s.status==="aborted"||i.status==="aborted")return Rt;s.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof i.value<"u"||o.alwaysSet)&&(n[s.value]=i.value)}return{status:t.value,value:n}}},Rt=Object.freeze({status:"aborted"}),Ey=e=>({status:"dirty",value:e}),$i=e=>({status:"valid",value:e}),u3=e=>e.status==="aborted",d3=e=>e.status==="dirty",ch=e=>e.status==="valid",rE=e=>typeof Promise<"u"&&e instanceof Promise}}),Mur=S({"node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/helpers/typeAliases.js"(){}}),ht,Pur=S({"node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/helpers/errorUtil.js"(){(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(ht||(ht={}))}});function Kt(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:o}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(i,a)=>{const{message:c}=e;return i.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??n??a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:c??r??a.defaultError}},description:o}}function dde(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function Dur(e){return new RegExp(`^${dde(e)}$`)}function Our(e){let t=`${f3}T${dde(e)}`;const r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function Nur(e,t){return!!((t==="v4"||!t)&&bde.test(e)||(t==="v6"||!t)&&_de.test(e))}function Lur(e,t){if(!vde.test(e))return!1;try{const[r]=e.split(".");if(!r)return!1;const n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),o=JSON.parse(atob(n));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function Fur(e,t){return!!((t==="v4"||!t)&&Sde.test(e)||(t==="v6"||!t)&&Cde.test(e))}function $ur(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,o=r>n?r:n,s=Number.parseInt(e.toFixed(o).replace(".","")),i=Number.parseInt(t.toFixed(o).replace(".",""));return s%i/10**o}function by(e){if(e instanceof yc){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=su.create(by(n))}return new yc({...e._def,shape:()=>t})}else return e instanceof uh?new uh({...e._def,type:by(e.element)}):e instanceof su?su.create(by(e.unwrap())):e instanceof Cm?Cm.create(by(e.unwrap())):e instanceof _m?_m.create(e.items.map(t=>by(t))):e}function m3(e,t){const r=Xu(e),n=Xu(t);if(e===t)return{valid:!0,data:e};if(r===ct.object&&n===ct.object){const o=wr.objectKeys(t),s=wr.objectKeys(e).filter(a=>o.indexOf(a)!==-1),i={...e,...t};for(const a of s){const c=m3(e[a],t[a]);if(!c.valid)return{valid:!1};i[a]=c.data}return{valid:!0,data:i}}else if(r===ct.array&&n===ct.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let s=0;s<e.length;s++){const i=e[s],a=t[s],c=m3(i,a);if(!c.valid)return{valid:!1};o.push(c.data)}return{valid:!0,data:o}}else return r===ct.date&&n===ct.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}function mde(e,t){return new uE({values:e,typeName:He.ZodEnum,...Kt(t)})}var al,p3,ar,pde,hde,fde,gde,yde,vde,Tde,wde,Ede,h3,bde,Sde,_de,Cde,kde,Ade,f3,xde,nE,sI,iI,aI,cI,lI,oE,sE,uI,lh,Zu,dI,uh,yc,iE,nu,Ide,aE,_m,Rde,mI,pI,Mde,cE,lE,uE,dE,Sy,ou,su,Cm,mE,pE,hI,g3,y3,hE,Uur,He,Bur,zur,qur,Gur,jur,Hur,Vur,Wur,Kur,Jur,Yur,Xur,Zur,Qur,edr,tdr,rdr,ndr,odr,sdr,idr,adr,cdr,ldr,udr,ddr,mdr,pdr,hdr,fdr,gdr,ydr,vdr,Tdr,wdr=S({"node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/types.js"(){a3(),l3(),Pur(),ude(),nI(),al=class{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},p3=(e,t)=>{if(ch(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new il(e.common.issues);return this._error=r,this._error}}},ar=class{get description(){return this._def.description}_getType(e){return Xu(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Xu(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new aa,ctx:{common:e.parent.common,data:e.data,parsedType:Xu(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(rE(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){const r={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Xu(e)},n=this._parseSync({data:e,path:r.path,parent:r});return p3(r,n)}"~validate"(e){const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Xu(e)};if(!this["~standard"].async)try{const r=this._parseSync({data:e,path:[],parent:t});return ch(r)?{value:r.value}:{issues:t.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(r=>ch(r)?{value:r.value}:{issues:t.common.issues})}async parseAsync(e,t){const r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){const r={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Xu(e)},n=this._parse({data:e,path:r.path,parent:r}),o=await(rE(n)?n:Promise.resolve(n));return p3(r,o)}refine(e,t){const r=n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,o)=>{const s=e(n),i=()=>o.addIssue({code:qe.custom,...r(n)});return typeof Promise<"u"&&s instanceof Promise?s.then(a=>a?!0:(i(),!1)):s?!0:(i(),!1)})}refinement(e,t){return this._refinement((r,n)=>e(r)?!0:(n.addIssue(typeof t=="function"?t(r,n):t),!1))}_refinement(e){return new ou({schema:this,typeName:He.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return su.create(this,this._def)}nullable(){return Cm.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return uh.create(this)}promise(){return Sy.create(this,this._def)}or(e){return iE.create([this,e],this._def)}and(e){return aE.create(this,e,this._def)}transform(e){return new ou({...Kt(this._def),schema:this,typeName:He.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new mE({...Kt(this._def),innerType:this,defaultValue:t,typeName:He.ZodDefault})}brand(){return new g3({typeName:He.ZodBranded,type:this,...Kt(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new pE({...Kt(this._def),innerType:this,catchValue:t,typeName:He.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return y3.create(this,e)}readonly(){return hE.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},pde=/^c[^\s-]{8,}$/i,hde=/^[0-9a-z]+$/,fde=/^[0-9A-HJKMNP-TV-Z]{26}$/i,gde=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,yde=/^[a-z0-9_-]{21}$/i,vde=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Tde=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,wde=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ede="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",bde=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Sde=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,_de=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Cde=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,kde=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ade=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,f3="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",xde=new RegExp(`^${f3}$`),nE=class Ux extends ar{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ct.string){const s=this._getOrReturnCtx(t);return nt(s,{code:qe.invalid_type,expected:ct.string,received:s.parsedType}),Rt}const n=new aa;let o;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(o=this._getOrReturnCtx(t,o),nt(o,{code:qe.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")t.data.length>s.value&&(o=this._getOrReturnCtx(t,o),nt(o,{code:qe.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){const i=t.data.length>s.value,a=t.data.length<s.value;(i||a)&&(o=this._getOrReturnCtx(t,o),i?nt(o,{code:qe.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&nt(o,{code:qe.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")wde.test(t.data)||(o=this._getOrReturnCtx(t,o),nt(o,{validation:"email",code:qe.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")h3||(h3=new RegExp(Ede,"u")),h3.test(t.data)||(o=this._getOrReturnCtx(t,o),nt(o,{validation:"emoji",code:qe.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")gde.test(t.data)||(o=this._getOrReturnCtx(t,o),nt(o,{validation:"uuid",code:qe.invalid_string,message:s.message}),n.dirty());else if(s.kind==="nanoid")yde.test(t.data)||(o=this._getOrReturnCtx(t,o),nt(o,{validation:"nanoid",code:qe.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")pde.test(t.data)||(o=this._getOrReturnCtx(t,o),nt(o,{validation:"cuid",code:qe.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")hde.test(t.data)||(o=this._getOrReturnCtx(t,o),nt(o,{validation:"cuid2",code:qe.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")fde.test(t.data)||(o=this._getOrReturnCtx(t,o),nt(o,{validation:"ulid",code:qe.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),nt(o,{validation:"url",code:qe.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),nt(o,{validation:"regex",code:qe.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(t,o),nt(o,{code:qe.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(o=this._getOrReturnCtx(t,o),nt(o,{code:qe.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(o=this._getOrReturnCtx(t,o),nt(o,{code:qe.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?Our(s).test(t.data)||(o=this._getOrReturnCtx(t,o),nt(o,{code:qe.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="date"?xde.test(t.data)||(o=this._getOrReturnCtx(t,o),nt(o,{code:qe.invalid_string,validation:"date",message:s.message}),n.dirty()):s.kind==="time"?Dur(s).test(t.data)||(o=this._getOrReturnCtx(t,o),nt(o,{code:qe.invalid_string,validation:"time",message:s.message}),n.dirty()):s.kind==="duration"?Tde.test(t.data)||(o=this._getOrReturnCtx(t,o),nt(o,{validation:"duration",code:qe.invalid_string,message:s.message}),n.dirty()):s.kind==="ip"?Nur(t.data,s.version)||(o=this._getOrReturnCtx(t,o),nt(o,{validation:"ip",code:qe.invalid_string,message:s.message}),n.dirty()):s.kind==="jwt"?Lur(t.data,s.alg)||(o=this._getOrReturnCtx(t,o),nt(o,{validation:"jwt",code:qe.invalid_string,message:s.message}),n.dirty()):s.kind==="cidr"?Fur(t.data,s.version)||(o=this._getOrReturnCtx(t,o),nt(o,{validation:"cidr",code:qe.invalid_string,message:s.message}),n.dirty()):s.kind==="base64"?kde.test(t.data)||(o=this._getOrReturnCtx(t,o),nt(o,{validation:"base64",code:qe.invalid_string,message:s.message}),n.dirty()):s.kind==="base64url"?Ade.test(t.data)||(o=this._getOrReturnCtx(t,o),nt(o,{validation:"base64url",code:qe.invalid_string,message:s.message}),n.dirty()):wr.assertNever(s);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(o=>t.test(o),{validation:r,code:qe.invalid_string,...ht.errToObj(n)})}_addCheck(t){return new Ux({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ht.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ht.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ht.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ht.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ht.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ht.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ht.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ht.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ht.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ht.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ht.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ht.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ht.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...ht.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...ht.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...ht.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...ht.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...ht.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...ht.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...ht.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...ht.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...ht.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...ht.errToObj(r)})}nonempty(t){return this.min(1,ht.errToObj(t))}trim(){return new Ux({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ux({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ux({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}},nE.create=e=>new nE({checks:[],typeName:He.ZodString,coerce:e?.coerce??!1,...Kt(e)}),sI=class Ile extends ar{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ct.number){const s=this._getOrReturnCtx(t);return nt(s,{code:qe.invalid_type,expected:ct.number,received:s.parsedType}),Rt}let n;const o=new aa;for(const s of this._def.checks)s.kind==="int"?wr.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),nt(n,{code:qe.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(n=this._getOrReturnCtx(t,n),nt(n,{code:qe.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(n=this._getOrReturnCtx(t,n),nt(n,{code:qe.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?$ur(t.data,s.value)!==0&&(n=this._getOrReturnCtx(t,n),nt(n,{code:qe.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),nt(n,{code:qe.not_finite,message:s.message}),o.dirty()):wr.assertNever(s);return{status:o.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,ht.toString(r))}gt(t,r){return this.setLimit("min",t,!1,ht.toString(r))}lte(t,r){return this.setLimit("max",t,!0,ht.toString(r))}lt(t,r){return this.setLimit("max",t,!1,ht.toString(r))}setLimit(t,r,n,o){return new Ile({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:ht.toString(o)}]})}_addCheck(t){return new Ile({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ht.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ht.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ht.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ht.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ht.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:ht.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:ht.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ht.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ht.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&wr.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}},sI.create=e=>new sI({checks:[],typeName:He.ZodNumber,coerce:e?.coerce||!1,...Kt(e)}),iI=class Rle extends ar{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==ct.bigint)return this._getInvalidInput(t);let n;const o=new aa;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(n=this._getOrReturnCtx(t,n),nt(n,{code:qe.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(n=this._getOrReturnCtx(t,n),nt(n,{code:qe.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),nt(n,{code:qe.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):wr.assertNever(s);return{status:o.value,value:t.data}}_getInvalidInput(t){const r=this._getOrReturnCtx(t);return nt(r,{code:qe.invalid_type,expected:ct.bigint,received:r.parsedType}),Rt}gte(t,r){return this.setLimit("min",t,!0,ht.toString(r))}gt(t,r){return this.setLimit("min",t,!1,ht.toString(r))}lte(t,r){return this.setLimit("max",t,!0,ht.toString(r))}lt(t,r){return this.setLimit("max",t,!1,ht.toString(r))}setLimit(t,r,n,o){return new Rle({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:ht.toString(o)}]})}_addCheck(t){return new Rle({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ht.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ht.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ht.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ht.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:ht.toString(r)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}},iI.create=e=>new iI({checks:[],typeName:He.ZodBigInt,coerce:e?.coerce??!1,...Kt(e)}),aI=class extends ar{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==ct.boolean){const r=this._getOrReturnCtx(e);return nt(r,{code:qe.invalid_type,expected:ct.boolean,received:r.parsedType}),Rt}return $i(e.data)}},aI.create=e=>new aI({typeName:He.ZodBoolean,coerce:e?.coerce||!1,...Kt(e)}),cI=class llr extends ar{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ct.date){const s=this._getOrReturnCtx(t);return nt(s,{code:qe.invalid_type,expected:ct.date,received:s.parsedType}),Rt}if(Number.isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return nt(s,{code:qe.invalid_date}),Rt}const n=new aa;let o;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(o=this._getOrReturnCtx(t,o),nt(o,{code:qe.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(o=this._getOrReturnCtx(t,o),nt(o,{code:qe.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):wr.assertNever(s);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new llr({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:ht.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:ht.toString(r)})}get minDate(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}},cI.create=e=>new cI({checks:[],coerce:e?.coerce||!1,typeName:He.ZodDate,...Kt(e)}),lI=class extends ar{_parse(e){if(this._getType(e)!==ct.symbol){const r=this._getOrReturnCtx(e);return nt(r,{code:qe.invalid_type,expected:ct.symbol,received:r.parsedType}),Rt}return $i(e.data)}},lI.create=e=>new lI({typeName:He.ZodSymbol,...Kt(e)}),oE=class extends ar{_parse(e){if(this._getType(e)!==ct.undefined){const r=this._getOrReturnCtx(e);return nt(r,{code:qe.invalid_type,expected:ct.undefined,received:r.parsedType}),Rt}return $i(e.data)}},oE.create=e=>new oE({typeName:He.ZodUndefined,...Kt(e)}),sE=class extends ar{_parse(e){if(this._getType(e)!==ct.null){const r=this._getOrReturnCtx(e);return nt(r,{code:qe.invalid_type,expected:ct.null,received:r.parsedType}),Rt}return $i(e.data)}},sE.create=e=>new sE({typeName:He.ZodNull,...Kt(e)}),uI=class extends ar{constructor(){super(...arguments),this._any=!0}_parse(e){return $i(e.data)}},uI.create=e=>new uI({typeName:He.ZodAny,...Kt(e)}),lh=class extends ar{constructor(){super(...arguments),this._unknown=!0}_parse(e){return $i(e.data)}},lh.create=e=>new lh({typeName:He.ZodUnknown,...Kt(e)}),Zu=class extends ar{_parse(e){const t=this._getOrReturnCtx(e);return nt(t,{code:qe.invalid_type,expected:ct.never,received:t.parsedType}),Rt}},Zu.create=e=>new Zu({typeName:He.ZodNever,...Kt(e)}),dI=class extends ar{_parse(e){if(this._getType(e)!==ct.undefined){const r=this._getOrReturnCtx(e);return nt(r,{code:qe.invalid_type,expected:ct.void,received:r.parsedType}),Rt}return $i(e.data)}},dI.create=e=>new dI({typeName:He.ZodVoid,...Kt(e)}),uh=class z$ extends ar{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),o=this._def;if(r.parsedType!==ct.array)return nt(r,{code:qe.invalid_type,expected:ct.array,received:r.parsedType}),Rt;if(o.exactLength!==null){const i=r.data.length>o.exactLength.value,a=r.data.length<o.exactLength.value;(i||a)&&(nt(r,{code:i?qe.too_big:qe.too_small,minimum:a?o.exactLength.value:void 0,maximum:i?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),n.dirty())}if(o.minLength!==null&&r.data.length<o.minLength.value&&(nt(r,{code:qe.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),n.dirty()),o.maxLength!==null&&r.data.length>o.maxLength.value&&(nt(r,{code:qe.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((i,a)=>o.type._parseAsync(new al(r,i,r.path,a)))).then(i=>aa.mergeArray(n,i));const s=[...r.data].map((i,a)=>o.type._parseSync(new al(r,i,r.path,a)));return aa.mergeArray(n,s)}get element(){return this._def.type}min(t,r){return new z$({...this._def,minLength:{value:t,message:ht.toString(r)}})}max(t,r){return new z$({...this._def,maxLength:{value:t,message:ht.toString(r)}})}length(t,r){return new z$({...this._def,exactLength:{value:t,message:ht.toString(r)}})}nonempty(t){return this.min(1,t)}},uh.create=(e,t)=>new uh({type:e,minLength:null,maxLength:null,exactLength:null,typeName:He.ZodArray,...Kt(t)}),yc=class eu extends ar{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),r=wr.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==ct.object){const l=this._getOrReturnCtx(t);return nt(l,{code:qe.invalid_type,expected:ct.object,received:l.parsedType}),Rt}const{status:n,ctx:o}=this._processInputParams(t),{shape:s,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof Zu&&this._def.unknownKeys==="strip"))for(const l in o.data)i.includes(l)||a.push(l);const c=[];for(const l of i){const u=s[l],d=o.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new al(o,d,o.path,l)),alwaysSet:l in o.data})}if(this._def.catchall instanceof Zu){const l=this._def.unknownKeys;if(l==="passthrough")for(const u of a)c.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(l==="strict")a.length>0&&(nt(o,{code:qe.unrecognized_keys,keys:a}),n.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const u of a){const d=o.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new al(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const l=[];for(const u of c){const d=await u.key,m=await u.value;l.push({key:d,value:m,alwaysSet:u.alwaysSet})}return l}).then(l=>aa.mergeObjectSync(n,l)):aa.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return ht.errToObj,new eu({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{const o=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:ht.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new eu({...this._def,unknownKeys:"strip"})}passthrough(){return new eu({...this._def,unknownKeys:"passthrough"})}extend(t){return new eu({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new eu({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:He.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new eu({...this._def,catchall:t})}pick(t){const r={};for(const n of wr.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new eu({...this._def,shape:()=>r})}omit(t){const r={};for(const n of wr.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new eu({...this._def,shape:()=>r})}deepPartial(){return by(this)}partial(t){const r={};for(const n of wr.objectKeys(this.shape)){const o=this.shape[n];t&&!t[n]?r[n]=o:r[n]=o.optional()}return new eu({...this._def,shape:()=>r})}required(t){const r={};for(const n of wr.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof su;)s=s._def.innerType;r[n]=s}return new eu({...this._def,shape:()=>r})}keyof(){return mde(wr.objectKeys(this.shape))}},yc.create=(e,t)=>new yc({shape:()=>e,unknownKeys:"strip",catchall:Zu.create(),typeName:He.ZodObject,...Kt(t)}),yc.strictCreate=(e,t)=>new yc({shape:()=>e,unknownKeys:"strict",catchall:Zu.create(),typeName:He.ZodObject,...Kt(t)}),yc.lazycreate=(e,t)=>new yc({shape:e,unknownKeys:"strip",catchall:Zu.create(),typeName:He.ZodObject,...Kt(t)}),iE=class extends ar{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.options;function n(o){for(const i of o)if(i.result.status==="valid")return i.result;for(const i of o)if(i.result.status==="dirty")return t.common.issues.push(...i.ctx.common.issues),i.result;const s=o.map(i=>new il(i.ctx.common.issues));return nt(t,{code:qe.invalid_union,unionErrors:s}),Rt}if(t.common.async)return Promise.all(r.map(async o=>{const s={...t,common:{...t.common,issues:[]},parent:null};return{result:await o._parseAsync({data:t.data,path:t.path,parent:s}),ctx:s}})).then(n);{let o;const s=[];for(const a of r){const c={...t,common:{...t.common,issues:[]},parent:null},l=a._parseSync({data:t.data,path:t.path,parent:c});if(l.status==="valid")return l;l.status==="dirty"&&!o&&(o={result:l,ctx:c}),c.common.issues.length&&s.push(c.common.issues)}if(o)return t.common.issues.push(...o.ctx.common.issues),o.result;const i=s.map(a=>new il(a));return nt(t,{code:qe.invalid_union,unionErrors:i}),Rt}}get options(){return this._def.options}},iE.create=(e,t)=>new iE({options:e,typeName:He.ZodUnion,...Kt(t)}),nu=e=>e instanceof cE?nu(e.schema):e instanceof ou?nu(e.innerType()):e instanceof lE?[e.value]:e instanceof uE?e.options:e instanceof dE?wr.objectValues(e.enum):e instanceof mE?nu(e._def.innerType):e instanceof oE?[void 0]:e instanceof sE?[null]:e instanceof su?[void 0,...nu(e.unwrap())]:e instanceof Cm?[null,...nu(e.unwrap())]:e instanceof g3||e instanceof hE?nu(e.unwrap()):e instanceof pE?nu(e._def.innerType):[],Ide=class ulr extends ar{_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==ct.object)return nt(r,{code:qe.invalid_type,expected:ct.object,received:r.parsedType}),Rt;const n=this.discriminator,o=r.data[n],s=this.optionsMap.get(o);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(nt(r,{code:qe.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Rt)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){const o=new Map;for(const s of r){const i=nu(s.shape[t]);if(!i.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of i){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,s)}}return new ulr({typeName:He.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:o,...Kt(n)})}},aE=class extends ar{_parse(e){const{status:t,ctx:r}=this._processInputParams(e),n=(o,s)=>{if(u3(o)||u3(s))return Rt;const i=m3(o.value,s.value);return i.valid?((d3(o)||d3(s))&&t.dirty(),{status:t.value,value:i.data}):(nt(r,{code:qe.invalid_intersection_types}),Rt)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,s])=>n(o,s)):n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}},aE.create=(e,t,r)=>new aE({left:e,right:t,typeName:He.ZodIntersection,...Kt(r)}),_m=class dlr extends ar{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ct.array)return nt(n,{code:qe.invalid_type,expected:ct.array,received:n.parsedType}),Rt;if(n.data.length<this._def.items.length)return nt(n,{code:qe.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Rt;!this._def.rest&&n.data.length>this._def.items.length&&(nt(n,{code:qe.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const s=[...n.data].map((i,a)=>{const c=this._def.items[a]||this._def.rest;return c?c._parse(new al(n,i,n.path,a)):null}).filter(i=>!!i);return n.common.async?Promise.all(s).then(i=>aa.mergeArray(r,i)):aa.mergeArray(r,s)}get items(){return this._def.items}rest(t){return new dlr({...this._def,rest:t})}},_m.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new _m({items:e,typeName:He.ZodTuple,rest:null,...Kt(t)})},Rde=class Mle extends ar{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ct.object)return nt(n,{code:qe.invalid_type,expected:ct.object,received:n.parsedType}),Rt;const o=[],s=this._def.keyType,i=this._def.valueType;for(const a in n.data)o.push({key:s._parse(new al(n,a,n.path,a)),value:i._parse(new al(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?aa.mergeObjectAsync(r,o):aa.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof ar?new Mle({keyType:t,valueType:r,typeName:He.ZodRecord,...Kt(n)}):new Mle({keyType:nE.create(),valueType:t,typeName:He.ZodRecord,...Kt(r)})}},mI=class extends ar{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==ct.map)return nt(r,{code:qe.invalid_type,expected:ct.map,received:r.parsedType}),Rt;const n=this._def.keyType,o=this._def.valueType,s=[...r.data.entries()].map(([i,a],c)=>({key:n._parse(new al(r,i,r.path,[c,"key"])),value:o._parse(new al(r,a,r.path,[c,"value"]))}));if(r.common.async){const i=new Map;return Promise.resolve().then(async()=>{for(const a of s){const c=await a.key,l=await a.value;if(c.status==="aborted"||l.status==="aborted")return Rt;(c.status==="dirty"||l.status==="dirty")&&t.dirty(),i.set(c.value,l.value)}return{status:t.value,value:i}})}else{const i=new Map;for(const a of s){const c=a.key,l=a.value;if(c.status==="aborted"||l.status==="aborted")return Rt;(c.status==="dirty"||l.status==="dirty")&&t.dirty(),i.set(c.value,l.value)}return{status:t.value,value:i}}}},mI.create=(e,t,r)=>new mI({valueType:t,keyType:e,typeName:He.ZodMap,...Kt(r)}),pI=class Ple extends ar{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==ct.set)return nt(n,{code:qe.invalid_type,expected:ct.set,received:n.parsedType}),Rt;const o=this._def;o.minSize!==null&&n.data.size<o.minSize.value&&(nt(n,{code:qe.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),r.dirty()),o.maxSize!==null&&n.data.size>o.maxSize.value&&(nt(n,{code:qe.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),r.dirty());const s=this._def.valueType;function i(c){const l=new Set;for(const u of c){if(u.status==="aborted")return Rt;u.status==="dirty"&&r.dirty(),l.add(u.value)}return{status:r.value,value:l}}const a=[...n.data.values()].map((c,l)=>s._parse(new al(n,c,n.path,l)));return n.common.async?Promise.all(a).then(c=>i(c)):i(a)}min(t,r){return new Ple({...this._def,minSize:{value:t,message:ht.toString(r)}})}max(t,r){return new Ple({...this._def,maxSize:{value:t,message:ht.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}},pI.create=(e,t)=>new pI({valueType:e,minSize:null,maxSize:null,typeName:He.ZodSet,...Kt(t)}),Mde=class q$ extends ar{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==ct.function)return nt(r,{code:qe.invalid_type,expected:ct.function,received:r.parsedType}),Rt;function n(a,c){return oI({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,c3(),wy].filter(l=>!!l),issueData:{code:qe.invalid_arguments,argumentsError:c}})}function o(a,c){return oI({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,c3(),wy].filter(l=>!!l),issueData:{code:qe.invalid_return_type,returnTypeError:c}})}const s={errorMap:r.common.contextualErrorMap},i=r.data;if(this._def.returns instanceof Sy){const a=this;return $i(async function(...c){const l=new il([]),u=await a._def.args.parseAsync(c,s).catch(h=>{throw l.addIssue(n(c,h)),l}),d=await Reflect.apply(i,this,u);return await a._def.returns._def.type.parseAsync(d,s).catch(h=>{throw l.addIssue(o(d,h)),l})})}else{const a=this;return $i(function(...c){const l=a._def.args.safeParse(c,s);if(!l.success)throw new il([n(c,l.error)]);const u=Reflect.apply(i,this,l.data),d=a._def.returns.safeParse(u,s);if(!d.success)throw new il([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new q$({...this._def,args:_m.create(t).rest(lh.create())})}returns(t){return new q$({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new q$({args:t||_m.create([]).rest(lh.create()),returns:r||lh.create(),typeName:He.ZodFunction,...Kt(n)})}},cE=class extends ar{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}},cE.create=(e,t)=>new cE({getter:e,typeName:He.ZodLazy,...Kt(t)}),lE=class extends ar{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return nt(t,{received:t.data,code:qe.invalid_literal,expected:this._def.value}),Rt}return{status:"valid",value:e.data}}get value(){return this._def.value}},lE.create=(e,t)=>new lE({value:e,typeName:He.ZodLiteral,...Kt(t)}),uE=class Dle extends ar{_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return nt(r,{expected:wr.joinValues(n),received:r.parsedType,code:qe.invalid_type}),Rt}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const r=this._getOrReturnCtx(t),n=this._def.values;return nt(r,{received:r.data,code:qe.invalid_enum_value,options:n}),Rt}return $i(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return Dle.create(t,{...this._def,...r})}exclude(t,r=this._def){return Dle.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}},uE.create=mde,dE=class extends ar{_parse(e){const t=wr.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==ct.string&&r.parsedType!==ct.number){const n=wr.objectValues(t);return nt(r,{expected:wr.joinValues(n),received:r.parsedType,code:qe.invalid_type}),Rt}if(this._cache||(this._cache=new Set(wr.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const n=wr.objectValues(t);return nt(r,{received:r.data,code:qe.invalid_enum_value,options:n}),Rt}return $i(e.data)}get enum(){return this._def.values}},dE.create=(e,t)=>new dE({values:e,typeName:He.ZodNativeEnum,...Kt(t)}),Sy=class extends ar{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==ct.promise&&t.common.async===!1)return nt(t,{code:qe.invalid_type,expected:ct.promise,received:t.parsedType}),Rt;const r=t.parsedType===ct.promise?t.data:Promise.resolve(t.data);return $i(r.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}},Sy.create=(e,t)=>new Sy({type:e,typeName:He.ZodPromise,...Kt(t)}),ou=class extends ar{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===He.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null,o={addIssue:s=>{nt(r,s),s.fatal?t.abort():t.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),n.type==="preprocess"){const s=n.transform(r.data,o);if(r.common.async)return Promise.resolve(s).then(async i=>{if(t.value==="aborted")return Rt;const a=await this._def.schema._parseAsync({data:i,path:r.path,parent:r});return a.status==="aborted"?Rt:a.status==="dirty"||t.value==="dirty"?Ey(a.value):a});{if(t.value==="aborted")return Rt;const i=this._def.schema._parseSync({data:s,path:r.path,parent:r});return i.status==="aborted"?Rt:i.status==="dirty"||t.value==="dirty"?Ey(i.value):i}}if(n.type==="refinement"){const s=i=>{const a=n.refinement(i,o);if(r.common.async)return Promise.resolve(a);if(a instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return i};if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Rt:(i.status==="dirty"&&t.dirty(),s(i.value),{status:t.value,value:i.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>i.status==="aborted"?Rt:(i.status==="dirty"&&t.dirty(),s(i.value).then(()=>({status:t.value,value:i.value}))))}if(n.type==="transform")if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!ch(s))return Rt;const i=n.transform(s.value,o);if(i instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:i}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>ch(s)?Promise.resolve(n.transform(s.value,o)).then(i=>({status:t.value,value:i})):Rt);wr.assertNever(n)}},ou.create=(e,t,r)=>new ou({schema:e,typeName:He.ZodEffects,effect:t,...Kt(r)}),ou.createWithPreprocess=(e,t,r)=>new ou({schema:t,effect:{type:"preprocess",transform:e},typeName:He.ZodEffects,...Kt(r)}),su=class extends ar{_parse(e){return this._getType(e)===ct.undefined?$i(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}},su.create=(e,t)=>new su({innerType:e,typeName:He.ZodOptional,...Kt(t)}),Cm=class extends ar{_parse(e){return this._getType(e)===ct.null?$i(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}},Cm.create=(e,t)=>new Cm({innerType:e,typeName:He.ZodNullable,...Kt(t)}),mE=class extends ar{_parse(e){const{ctx:t}=this._processInputParams(e);let r=t.data;return t.parsedType===ct.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}},mE.create=(e,t)=>new mE({innerType:e,typeName:He.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Kt(t)}),pE=class extends ar{_parse(e){const{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return rE(n)?n.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new il(r.common.issues)},input:r.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new il(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}},pE.create=(e,t)=>new pE({innerType:e,typeName:He.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Kt(t)}),hI=class extends ar{_parse(e){if(this._getType(e)!==ct.nan){const r=this._getOrReturnCtx(e);return nt(r,{code:qe.invalid_type,expected:ct.nan,received:r.parsedType}),Rt}return{status:"valid",value:e.data}}},hI.create=e=>new hI({typeName:He.ZodNaN,...Kt(e)}),g3=class extends ar{_parse(e){const{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}},y3=class mlr extends ar{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?Rt:s.status==="dirty"?(r.dirty(),Ey(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})})();{const o=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?Rt:o.status==="dirty"?(r.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:n.path,parent:n})}}static create(t,r){return new mlr({in:t,out:r,typeName:He.ZodPipeline})}},hE=class extends ar{_parse(e){const t=this._def.innerType._parse(e),r=n=>(ch(n)&&(n.value=Object.freeze(n.value)),n);return rE(t)?t.then(n=>r(n)):r(t)}unwrap(){return this._def.innerType}},hE.create=(e,t)=>new hE({innerType:e,typeName:He.ZodReadonly,...Kt(t)}),Uur={object:yc.lazycreate},(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(He||(He={})),Bur=nE.create,zur=sI.create,qur=hI.create,Gur=iI.create,jur=aI.create,Hur=cI.create,Vur=lI.create,Wur=oE.create,Kur=sE.create,Jur=uI.create,Yur=lh.create,Xur=Zu.create,Zur=dI.create,Qur=uh.create,edr=yc.create,tdr=yc.strictCreate,rdr=iE.create,ndr=Ide.create,odr=aE.create,sdr=_m.create,idr=Rde.create,adr=mI.create,cdr=pI.create,ldr=Mde.create,udr=cE.create,ddr=lE.create,mdr=uE.create,pdr=dE.create,hdr=Sy.create,fdr=ou.create,gdr=su.create,ydr=Cm.create,vdr=ou.createWithPreprocess,Tdr=y3.create}}),Pde=S({"node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/external.js"(){l3(),ude(),Mur(),nI(),wdr(),a3()}}),fI=S({"node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/index.js"(){Pde(),Pde()}});function ca(e){if(e.target!=="openAi")return{};const t=[...e.basePath,e.definitionPath,e.openAiAnyTypeName];return e.flags.hasReferencedOpenAiAnyType=!0,{$ref:e.$refStrategy==="relative"?s3(t,e.currentPath):t.join("/")}}var cl=S({"node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/any.js"(){i3()}});function Edr(e,t){const r={type:"array"};return e.type?._def&&e.type?._def?.typeName!==He.ZodAny&&(r.items=Ir(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&Nr(r,"minItems",e.minLength.value,e.minLength.message,t),e.maxLength&&Nr(r,"maxItems",e.maxLength.value,e.maxLength.message,t),e.exactLength&&(Nr(r,"minItems",e.exactLength.value,e.exactLength.message,t),Nr(r,"maxItems",e.exactLength.value,e.exactLength.message,t)),r}var Dde=S({"node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/array.js"(){fI(),ah(),vs()}});function bdr(e,t){const r={type:"integer",format:"int64"};if(!e.checks)return r;for(const n of e.checks)switch(n.kind){case"min":t.target==="jsonSchema7"?n.inclusive?Nr(r,"minimum",n.value,n.message,t):Nr(r,"exclusiveMinimum",n.value,n.message,t):(n.inclusive||(r.exclusiveMinimum=!0),Nr(r,"minimum",n.value,n.message,t));break;case"max":t.target==="jsonSchema7"?n.inclusive?Nr(r,"maximum",n.value,n.message,t):Nr(r,"exclusiveMaximum",n.value,n.message,t):(n.inclusive||(r.exclusiveMaximum=!0),Nr(r,"maximum",n.value,n.message,t));break;case"multipleOf":Nr(r,"multipleOf",n.value,n.message,t);break}return r}var Ode=S({"node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js"(){ah()}});function Sdr(){return{type:"boolean"}}var Nde=S({"node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js"(){}});function Lde(e,t){return Ir(e.type._def,t)}var v3=S({"node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js"(){vs()}}),Fde,$de=S({"node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js"(){vs(),Fde=(e,t)=>Ir(e.innerType._def,t)}});function Ude(e,t,r){const n=r??t.dateStrategy;if(Array.isArray(n))return{anyOf:n.map((o,s)=>Ude(e,t,o))};switch(n){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return Bde(e,t)}}var Bde,zde=S({"node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/date.js"(){ah(),Bde=(e,t)=>{const r={type:"integer",format:"unix-time"};if(t.target==="openApi3")return r;for(const n of e.checks)switch(n.kind){case"min":Nr(r,"minimum",n.value,n.message,t);break;case"max":Nr(r,"maximum",n.value,n.message,t);break}return r}}});function _dr(e,t){return{...Ir(e.innerType._def,t),default:e.defaultValue()}}var qde=S({"node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/default.js"(){vs()}});function Cdr(e,t){return t.effectStrategy==="input"?Ir(e.schema._def,t):ca(t)}var Gde=S({"node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js"(){vs(),cl()}});function kdr(e){return{type:"string",enum:Array.from(e.values)}}var jde=S({"node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js"(){}});function Adr(e,t){const r=[Ir(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),Ir(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(s=>!!s);let n=t.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0;const o=[];return r.forEach(s=>{if(Hde(s))o.push(...s.allOf),s.unevaluatedProperties===void 0&&(n=void 0);else{let i=s;if("additionalProperties"in s&&s.additionalProperties===!1){const{additionalProperties:a,...c}=s;i=c}else n=void 0;o.push(i)}}),o.length?{allOf:o,...n}:void 0}var Hde,Vde=S({"node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js"(){vs(),Hde=e=>"type"in e&&e.type==="string"?!1:"allOf"in e}});function xdr(e,t){const r=typeof e.value;return r!=="bigint"&&r!=="number"&&r!=="boolean"&&r!=="string"?{type:Array.isArray(e.value)?"array":"object"}:t.target==="openApi3"?{type:r==="bigint"?"integer":r,enum:[e.value]}:{type:r==="bigint"?"integer":r,const:e.value}}var Wde=S({"node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.3.6/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js"(){}});function Kde(e,t){const r={type:"string"};if(e.checks)for(const n of e.checks)switch(n.kind){case"min":Nr(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,n.value):n.value,n.message,t);break;case"max":Nr(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,n.value):n.value,n.message,t);break;case"email":switch(t.emailStrategy){case"format:email":ll(r,"email",n.message,t);break;case"format:idn-email":ll(r,"idn-email",n.message,t);break;case"pattern:zod":Ui(r,vc.email,n.message,t);break}break;case"url":ll(r,"uri",n.message,t);break;case"uuid":ll(r,"uuid",n.message,t);break;case"regex":Ui(r,n.regex,n.message,t);break;case"cuid":Ui(r,vc.cuid,n.message,t);break;case"cuid2":Ui(r,vc.cuid2,n.message,t);break;case"startsWith":Ui(r,RegExp(`^${T3(n.value,t)}`),n.message,t);break;case"endsWith":Ui(r,RegExp(`${T3(n.value,t)}$`),n.message,t);break;case"datetime":ll(r,"date-time",n.message,t);break;case"date":ll(r,"date",n.message,t);break;case"time":ll(r,"time",n.message,t);break;case"duration":ll(r,"duration",n.message,t);break;case"length":Nr(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,n.value):n.value,n.message,t),Nr(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,n.value):n.value,n.message,t);break;case"includes":{Ui(r,RegExp(T3(n.value,t)),n.message,t);break}case"ip":{n.version!=="v6"&&ll(r,"ipv4",n.message,t),n.version!=="v4"&&ll(r,"ipv6",n.message,t);break}case"base64url":Ui(r,vc.base64url,n.message,t);break;case"jwt":Ui(r,vc.jwt,n.message,t);break;case"cidr":{n.version!=="v6"&&Ui(r,vc.ipv4Cidr,n.message,t),n.version!=="v4"&&Ui(r,vc.ipv6Cidr,n.message,t);break}case"emoji":Ui(r,vc.emoji(),n.message,t);break;case"ulid":{Ui(r,vc.ulid,n.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{ll(r,"binary",n.message,t);break}case"contentEncoding:base64":{Nr(r,"contentEncoding","base64",n.message,t);break}case"pattern:zod":{Ui(r,vc.base64,n.message,t);break}}break}case"nanoid":Ui(r,vc.nanoid,n.message,t);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return r}function T3(e,t){return t.patternStrategy==="escape"?Idr(e):e}function Idr(e){let t="";for(let r=0;r<e.length;r++)Yde.has(e[r])||(t+="\\"),t+=e[r];return t}function ll(e,t,r,n){e.format||e.anyOf?.some(o=>o.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format,...e.errorMessage&&n.errorMessages&&{errorMessage:{format:e.errorMessage.format}}}),delete e.format,e.errorMessage&&(delete e.errorMessage.format,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.anyOf.push({format:t,...r&&n.errorMessages&&{errorMessage:{format:r}}})):Nr(e,"format",t,r,n)}function Ui(e,t,r,n){e.pattern||e.allOf?.some(o=>o.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern,...e.errorMessage&&n.errorMessages&&{errorMessage:{pattern:e.errorMessage.pattern}}}),delete e.pattern,e.errorMessage&&(delete e.errorMessage.pattern,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.allOf.push({pattern:Jde(t,n),...r&&n.errorMessages&&{errorMessage:{pattern:r}}})):Nr(e,"pattern",Jde(t,n),r,n)}function Jde(e,t){if(!t.applyRegexFlags||!e.flags)return e.source;const r={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},n=r.i?e.source.toLowerCase():e.source;let o="",s=!1,i=!1,a=!1;for(let c=0;c<n.length;c++){if(s){o+=n[c],s=!1;continue}if(r.i){if(i){if(n[c].match(/[a-z]/)){a?(o+=n[c],o+=`${n[c-2]}-${n[c]}`.toUpperCase(),a=!1):n[c+1]==="-"&&n[c+2]?.match(/[a-z]/)?(o+=n[c],a=!0):o+=`${n[c]}${n[c].toUpperCase()}`;continue}}else if(n[c].match(/[a-z]/)){o+=`[${n[c]}${n[c].toUpperCase()}]`;continue}}if(r.m){if(n[c]==="^"){o+=`(^|(?<=[\r
|
|
12
12
|
]))`;continue}else if(n[c]==="$"){o+=`($|(?=[\r
|
|
13
13
|
]))`;continue}}if(r.s&&n[c]==="."){o+=i?`${n[c]}\r
|
|
14
14
|
`:`[${n[c]}\r
|
|
@@ -63,7 +63,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
63
63
|
|
|
64
64
|
Alternatives:
|
|
65
65
|
`+n.map((o,s)=>`${s+1}. ${o}`).join(`
|
|
66
|
-
`),category:"validation",severity:"medium",retriable:!1,context:{estimatedPages:e,maxPages:t,provider:r,alternatives:n}})}static pdfAggregatePageLimitExceeded(e,t,r,n){return new Pe({code:je.PDF_AGGREGATE_PAGE_LIMIT_EXCEEDED,message:`[PDF] Combined page count across ${e} PDF(s) (${t}) exceeds the ${r}-page limit for ${n}. Split the request or reduce the number of PDFs.`,category:"validation",severity:"medium",retriable:!1,context:{fileCount:e,totalPages:t,maxPages:r,provider:n}})}static pdfAggregateSizeLimitExceeded(e,t,r,n){return new Pe({code:je.PDF_AGGREGATE_SIZE_LIMIT_EXCEEDED,message:`[PDF] Combined size across ${e} PDF(s) (${t.toFixed(2)}MB) exceeds the ${r}MB limit for ${n}.`,category:"validation",severity:"medium",retriable:!1,context:{fileCount:e,totalMB:t,maxSizeMB:r,provider:n}})}static pdfPageCountUnverifiable(e,t){return new Pe({code:je.PDF_PAGE_COUNT_UNVERIFIABLE,message:`[PDF] Cannot verify the page count for ${e.length} PDF(s) supplied via input.content (${e.join(", ")}). Provide readable PDFs, or submit them via input.pdfFiles where page counts are derived during detection.`,category:"validation",severity:"medium",retriable:!1,context:{filenames:e,provider:t}})}static pdfPasswordRequired(){return new Pe({code:je.PDF_PASSWORD_REQUIRED,message:"This PDF is password-protected. Supply the password via `pdfOptions: { password: '\u2026' }` (SDK) or `--pdf-password` (CLI).",category:"validation",severity:"medium",retriable:!1})}static pdfIncorrectPassword(){return new Pe({code:je.PDF_INCORRECT_PASSWORD,message:"The password supplied for this PDF is incorrect. Check the `pdfOptions.password` / `--pdf-password` value and try again.",category:"validation",severity:"medium",retriable:!1})}static imageTooLarge(e,t){return new Pe({code:je.IMAGE_TOO_LARGE,message:`Image size (${e}MB) exceeds maximum (${t}MB)`,category:"validation",severity:"medium",retriable:!1,context:{field:"input.images",sizeMB:e,maxMB:t,suggestions:[`Compress or resize the image to under ${t}MB`,"Use a lower quality JPEG compression","Reduce image dimensions"]}})}static invalidImageSize(e){return new Pe({code:je.INVALID_IMAGE_SIZE,message:`Invalid image size: ${e} (must be a finite, non-negative number)`,category:"validation",severity:"medium",retriable:!1,context:{field:"input.images",size:e}})}static imageTooSmall(){return new Pe({code:je.IMAGE_TOO_SMALL,message:"Image data is too small to be a valid image file",category:"validation",severity:"medium",retriable:!1,context:{field:"input.images",suggestions:["Provide a valid JPEG, PNG, or WebP image file"]}})}static invalidImageFormat(){return new Pe({code:je.INVALID_IMAGE_FORMAT,message:"Unsupported image format. Use JPEG, PNG, or WebP",category:"validation",severity:"medium",retriable:!1,context:{field:"input.images",suggestions:["Convert your image to JPEG, PNG, or WebP format","Ensure the file is not corrupted","Check that the file extension matches the actual format"]}})}static imageBufferInvalid(e){return new Pe({code:je.IMAGE_BUFFER_INVALID,message:e,category:"validation",severity:"medium",retriable:!1,context:{field:"input.images"}})}static rateLimiterQueueFull(e){return new Pe({code:je.RATE_LIMITER_QUEUE_FULL,message:`Rate limiter queue full: too many pending requests (${e} max)`,category:"resource",severity:"high",retriable:!0,context:{maxQueueSize:e}})}static rateLimiterQueueTimeout(e){return new Pe({code:je.RATE_LIMITER_QUEUE_TIMEOUT,message:`Rate limiter queue timeout: request exceeded ${e}ms wait time`,category:"timeout",severity:"high",retriable:!0,context:{timeoutMs:e}})}static rateLimiterReset(){return new Pe({code:je.RATE_LIMITER_RESET,message:"Rate limiter was reset while request was pending",category:"execution",severity:"medium",retriable:!0,context:{}})}static missingPPTProperty(e,t){const r=[`Provide the required '${e}' field`];return new Pe({code:je.MISSING_PPT_PROPERTIES,message:`PPT generation requires '${e}' field`,category:"validation",severity:"medium",retriable:!1,context:{field:e,suggestions:t||r}})}static invalidPPTPages(e,t){return new Pe({code:je.INVALID_PPT_PAGES,message:`Invalid pages value '${e}': ${t}`,category:"validation",severity:"medium",retriable:!1,context:{field:"output.ppt.pages",providedValue:e,suggestions:["Use a number between 5 and 50","For longer presentations, consider breaking into multiple decks"]}})}static invalidPPTFormat(e){return new Pe({code:je.INVALID_PPT_FORMAT,message:`Invalid format '${e}'. Only 'pptx' is supported`,category:"validation",severity:"medium",retriable:!1,context:{field:"output.ppt.format",providedValue:e,suggestions:["Use format: 'pptx' or omit (defaults to 'pptx')"]}})}static invalidPPTOutputOptions(e,t,r){const n=r?r.map(o=>`Use '${o}'`):["Check the documentation for valid options"];return new Pe({code:je.INVALID_PPT_OUTPUT_OPTIONS,message:`Invalid ${e} value '${t}'`,category:"validation",severity:"medium",retriable:!1,context:{field:`output.ppt.${e}`,providedValue:t,suggestions:n}})}static invalidPPTOutputPath(e,t){return new Pe({code:je.INVALID_PPT_OUTPUT_PATH,message:`Invalid outputPath '${e}': ${t}`,category:"validation",severity:"medium",retriable:!1,context:{field:"output.ppt.outputPath",providedValue:e,suggestions:["Provide a valid file path string","Example: './presentations/my-deck.pptx'","Omit to use auto-generated path"]}})}static invalidPPTMode(){return new Pe({code:je.INVALID_PPT_MODE,message:"Presentation generation requires output.mode to be 'ppt'",category:"validation",severity:"medium",retriable:!1,context:{field:"output.mode",suggestions:["Set output: { mode: 'ppt' } for presentation generation"]}})}static invalidPPTPrompt(e){return new Pe({code:je.INVALID_PPT_PROMPT,message:`Invalid PPT prompt: ${e}`,category:"validation",severity:"medium",retriable:!1,context:{field:"input.text",suggestions:["Provide a non-empty text prompt","Keep the prompt under 1000 characters","Focus on key topics and structure for the presentation"]}})}static invalidPPTLogoPath(e,t){return new Pe({code:je.INVALID_PPT_LOGO_PATH,message:`Invalid logoPath '${e}': ${t}`,category:"validation",severity:"medium",retriable:!1,context:{field:"output.ppt.logoPath",providedValue:e,suggestions:["Provide a valid file path string","Example: './assets/logo.png'","Omit to skip logo inclusion"]}})}static invalidPPTProvider(e){return new Pe({code:je.INVALID_PPT_PROVIDER,message:`Invalid provider '${e}' for PPT generation. Supported providers: vertex, openai, azure, anthropic, google-ai, bedrock`,category:"validation",severity:"medium",retriable:!1,context:{field:"provider",providedValue:e,suggestions:["Use 'vertex' for Google Vertex AI (Gemini)","Use 'openai' for OpenAI GPT models","Use 'azure' for Azure OpenAI","Use 'anthropic' for Anthropic Claude models","Use 'google-ai' for Google AI Studio (Gemini)","Use 'bedrock' for AWS Bedrock (Claude, Llama, Nova, etc.)"]}})}static scorerNotFound(e,t){return new Pe({code:je.SCORER_NOT_FOUND,message:`Scorer '${e}' not found. Use neurolink.getAvailableScorers() to see available scorers.`,category:"validation",severity:"medium",retriable:!1,context:{scorerId:e,availableScorers:t}})}static evaluationValidationFailed(e,t){return new Pe({code:je.EVALUATION_VALIDATION_FAILED,message:`Invalid input for scorer '${e}': ${t.join(", ")}`,category:"validation",severity:"medium",retriable:!1,context:{scorerId:e,validationErrors:t}})}static evaluationTimeout(e,t){return new Pe({code:je.EVALUATION_TIMEOUT,message:`Evaluation ${e} timed out after ${t}ms`,category:"timeout",severity:"high",retriable:!0,context:{operation:e,timeoutMs:t}})}static evaluationExecutionFailed(e,t){return new Pe({code:je.EVALUATION_EXECUTION_FAILED,message:`Evaluation ${e} failed: ${t.message}`,category:"execution",severity:"high",retriable:!1,originalError:t})}static proxyWorkerLifecycle(e,t){return new Pe({code:je.PROXY_WORKER_LIFECYCLE_FAILED,message:e,category:"system",severity:"high",retriable:!1,context:t||{}})}static fileProcessingFailed(e,t){return new Pe({code:je.FILE_PROCESSING_FAILED,message:`Failed to process file "${e}": ${t.message}`,category:"execution",severity:"high",retriable:!1,context:{filename:e},originalError:t})}static csvProcessingFailed(e,t){return new Pe({code:je.CSV_PROCESSING_FAILED,message:`Failed to process CSV file "${e}": ${t.message}`,category:"execution",severity:"high",retriable:!1,context:{filename:e},originalError:t})}},w1=class{constructor(e=5,t=6e4,r="tool-execution"){this.failureThreshold=e,this.resetTimeoutMs=t,this.name=r}failureThreshold;resetTimeoutMs;failures=0;lastFailureTime=0;state="closed";name;async execute(e){if(this.state==="open"){const t=this.resetTimeoutMs-(Date.now()-this.lastFailureTime);if(t>0)throw new km({breakerName:this.name,retryAfter:new Date(this.lastFailureTime+this.resetTimeoutMs),retryAfterMs:t,breakerState:"open",failureCount:this.failures});this.state="half-open"}try{const t=await e();return this.onSuccess(),t}catch(t){throw this.onFailure(),t}}onSuccess(){this.failures=0,this.state="closed"}onFailure(){this.failures++,this.lastFailureTime=Date.now(),this.failures>=this.failureThreshold&&(this.state="open")}getState(){return this.state}getFailureCount(){return this.failures}}}}),Nye={};se(Nye,{APICallError:()=>mb,InvalidToolInputError:()=>cz,NoObjectGeneratedError:()=>Lye,NoOutputGeneratedError:()=>au,NoSuchToolError:()=>az});var iz,Qy,e0,au,Lye,az,cz,mb,Fm=S({"src/lib/utils/generationErrors.ts"(){"use strict";iz=e=>Symbol.for(`vercel.ai.error.${e}`),Qy=(e,t)=>{const r=iz(t);return e!==null&&typeof e=="object"&&r in e&&e[r]===!0},e0=class extends Error{cause;constructor(e,t,r){super(t),this.name=e,r!==void 0&&(this.cause=r),Object.defineProperty(this,iz(e),{value:!0,enumerable:!1,writable:!1})}},au=class extends e0{constructor(e={}){super("AI_NoOutputGeneratedError",e.message??"No output generated.",e.cause)}static isInstance(e){return Qy(e,"AI_NoOutputGeneratedError")}},Lye=class extends e0{text;finishReason;constructor(e={}){super("AI_NoObjectGeneratedError",e.message??"No object generated.",e.cause),this.text=e.text,this.finishReason=e.finishReason}static isInstance(e){return Qy(e,"AI_NoObjectGeneratedError")}},az=class extends e0{toolName;constructor(e={}){super("AI_NoSuchToolError",e.message??`Model tried to call unavailable tool '${e.toolName??"unknown"}'.`),this.toolName=e.toolName}static isInstance(e){return Qy(e,"AI_NoSuchToolError")}},cz=class extends e0{toolName;constructor(e={}){super("AI_InvalidToolInputError",e.message??`Invalid input for tool '${e.toolName??"unknown"}'.`,e.cause),this.toolName=e.toolName}static isInstance(e){return Qy(e,"AI_InvalidToolInputError")}},mb=class extends e0{url;statusCode;responseBody;responseHeaders;isRetryable;requestBodyValues;constructor(e={}){super("AI_APICallError",e.message??"API call error.",e.cause),this.url=e.url,this.statusCode=e.statusCode,this.responseBody=e.responseBody,this.responseHeaders=e.responseHeaders,this.isRetryable=e.isRetryable??(e.statusCode!==null&&e.statusCode!==void 0&&(e.statusCode===408||e.statusCode===409||e.statusCode===429||e.statusCode>=500)),this.requestBodyValues=e.requestBodyValues}static isInstance(e){return Qy(e,"AI_APICallError")}}}});function lz(e,t){if("get"in e&&typeof e.get=="function")return e.get(t);const r=t.toLowerCase();for(const[n,o]of Object.entries(e))if(n.toLowerCase()===r)return o;return null}function pb(e){const t=lz(e,"Retry-After");if(t){const n=parseInt(t,10);if(!Number.isNaN(n))return Math.max(0,n*1e3);const o=new Date(t);if(!Number.isNaN(o.getTime()))return Math.max(0,o.getTime()-Date.now())}const r=lz(e,"X-RateLimit-Reset");if(r){const n=parseInt(r,10);if(!Number.isNaN(n)){const o=n>1e12?n:n*1e3;return Math.max(0,o-Date.now())}}if(lz(e,"X-RateLimit-Remaining")==="0")return 1e3}var uz=S({"src/lib/utils/retryAfter.ts"(){"use strict"}});function hb(e){if(!e||typeof e!="object")return;const t=e;if(typeof t.statusCode=="number")return t.statusCode;if(typeof t.status=="number")return t.status;const r=t.$metadata;if(typeof r=="object"&&r!==null){const n=r.httpStatusCode;if(typeof n=="number")return n}}function Fye(e){if(!e||typeof e!="object")return;const t=e;if(typeof t.retryAfterMs=="number"&&Number.isFinite(t.retryAfterMs))return t.retryAfterMs;for(const r of[t.headers,t.responseHeaders])if(r&&typeof r=="object"){const n=pb(r);if(n!==void 0)return n}}function $ye(e){if(typeof e!="object"||e===null)return!1;const t=e;if(t.type==="insufficient_quota")return!0;if(typeof t.responseBody=="string")try{return JSON.parse(t.responseBody)?.error?.type==="insufficient_quota"}catch{return!1}return!1}function Uye(e,t=0){if(t>8||e===null||typeof e!="object")return cr(e);if(cr(e))return!0;const{cause:r}=e;return r===void 0||r===e?!1:Uye(r,t+1)}function kyr(e){if(Uye(e)||$ye(e))return!1;if(mb.isInstance(e))return e.isRetryable;if(e instanceof Pe)return e.retriable;const t=hb(e);return t!==void 0?t===429||t>=500:!1}function Bye(e){return mb.isInstance(e)?e.statusCode:hb(e)}function Ayr(e){if(mb.isInstance(e)&&e.responseHeaders){const t=pb(e.responseHeaders);if(t!==void 0)return t}return e instanceof Pe&&e.retryAfterMs!==void 0&&Number.isFinite(e.retryAfterMs)?e.retryAfterMs:Fye(e)}async function t0(e,t,r,n=Gye){for(let o=0;o<=E1;o++)try{const s=await e();return t?.setAttribute("gen_ai.provider.total_attempts",o+1),o>0&&p.info(`[providerRetry] ${r} succeeded after ${o+1} attempts`),s}catch(s){const i=kyr(s),a=Bye(s),c=s instanceof Error?s.message:String(s);if(!i||o===E1)throw t?.setAttribute("gen_ai.provider.total_attempts",o+1),o>0&&t?.setAttribute("gen_ai.provider.retries_exhausted",!0),p.warn(`[providerRetry] ${r} failed (non-retryable or retries exhausted)`,{attempt:o+1,retryable:i,statusCode:a,error:c}),s;const l=Ayr(s);if(l!==void 0&&l>dz){t?.setAttribute("gen_ai.provider.total_attempts",o+1),t?.addEvent("gen_ai.provider.retry_suppressed",{"retry.after_ms":l,...a!==void 0&&{"retry.status_code":a}});try{Object.assign(s,{isRetryable:!1,retryAfterMs:l})}catch{}throw p.warn(`[providerRetry] ${r} not retrying \u2014 server requested a ${Math.round(l/1e3)}s wait (cap ${dz/1e3}s); surfacing for fallback`,{attempt:o+1,retryAfterMs:l,statusCode:a}),s}const u=(l===void 0?void 0:Math.max(0,l))??Math.max(zye*Math.pow(2,o),qye);t?.addEvent("gen_ai.provider.retry",{"retry.attempt":o+1,"retry.delay_ms":u,...a!==void 0&&{"retry.status_code":a},"retry.error":c.slice(0,256)}),p.warn(`[providerRetry] ${r} retrying after ${a||"unknown"} error`,{attempt:o+1,maxRetries:E1,delayMs:u,statusCode:a,error:c}),await n(u)}throw new Error(`[providerRetry] ${r} exhausted all retries`)}var E1,zye,qye,dz,Gye,ad=S({"src/lib/utils/providerRetry.ts"(){"use strict";Xt(),Ze(),z(),Fm(),uz(),E1=2,zye=1e3,qye=1e4,dz=6e4,Gye=e=>new Promise(t=>setTimeout(t,e))}}),mz,jye=S({"src/lib/constants/networkErrorCodes.ts"(){"use strict";mz=new Set(["ECONNRESET","ETIMEDOUT","ECONNREFUSED","EPIPE","UND_ERR_SOCKET","UND_ERR_CONNECT_TIMEOUT"])}}),fb={};se(fb,{Agent:()=>Xye,AsyncLocalStorage:()=>d0e,Buffer:()=>lTe,Channel:()=>Zve,DatabaseSync:()=>cTe,Duplex:()=>p0e,EventEmitter:()=>u0e,Http2ServerRequest:()=>hTe,Http2ServerResponse:()=>fTe,Interface:()=>aTe,MIMEType:()=>ETe,PassThrough:()=>h0e,PerformanceObserver:()=>Jve,Readable:()=>hz,ReadableStream:()=>f0e,Resolver:()=>Wve,STATUS_CODES:()=>gve,TextDecoder:()=>yz,TextEncoder:()=>yb,Transform:()=>m0e,URL:()=>Ove,URLSearchParams:()=>Nve,Worker:()=>rTe,Writable:()=>fz,access:()=>K0e,appendFile:()=>k0e,appendFileSync:()=>Kye,arch:()=>mve,arrayBuffer:()=>gTe,availableParallelism:()=>S0e,basename:()=>n0e,builtinModules:()=>Rve,callbackify:()=>qve,channel:()=>Xve,chmod:()=>b0e,chmodSync:()=>E0e,clearInterval:()=>wTe,clearTimeout:()=>vTe,closeSync:()=>R0e,connect:()=>yve,constants:()=>uTe,copyFileSync:()=>x0e,cpSync:()=>Jye,cpus:()=>cve,createConnection:()=>vve,createGunzip:()=>Cve,createGzip:()=>kve,createHash:()=>cu,createHmac:()=>pz,createInterface:()=>iTe,createReadStream:()=>z0e,createRequire:()=>Ive,createServer:()=>Yye,createWriteStream:()=>B0e,debug:()=>Bve,debuglog:()=>gz,default:()=>Hye,deflateSync:()=>wve,deprecate:()=>zve,deserialize:()=>tTe,dirname:()=>r0e,exec:()=>eve,execFile:()=>rve,execFileSync:()=>nve,execSync:()=>tve,existsSync:()=>v0e,extname:()=>o0e,fileURLToPath:()=>Lve,finished:()=>y0e,format:()=>Dve,freemem:()=>lve,fstatSync:()=>M0e,get:()=>fve,gunzip:()=>_ve,gunzipSync:()=>Eve,gzip:()=>Sve,gzipSync:()=>bve,hasSubscribers:()=>Qve,homedir:()=>sve,hostname:()=>ave,inflateSync:()=>Tve,inherits:()=>$ve,inspect:()=>gb,isAbsolute:()=>i0e,isBuiltin:()=>Mve,isDeepStrictEqual:()=>Gve,isIP:()=>pTe,isIPv4:()=>mTe,isIPv6:()=>dTe,isMainThread:()=>nTe,join:()=>e0e,loadavg:()=>_0e,lookup:()=>Vve,lstatSync:()=>O0e,mkdir:()=>j0e,mkdirSync:()=>P0e,monitorEventLoopDelay:()=>Yve,normalize:()=>l0e,ok:()=>Ave,open:()=>X0e,openSync:()=>I0e,parentPort:()=>oTe,parse:()=>Pve,pathToFileURL:()=>Fve,performance:()=>Kve,pipeline:()=>g0e,platform:()=>ove,posix:()=>c0e,promises:()=>Vye,promisify:()=>Uve,randomBytes:()=>Sh,randomUUID:()=>Xe,readFile:()=>q0e,readFileSync:()=>T0e,readdir:()=>V0e,readdirSync:()=>N0e,realpath:()=>Z0e,realpathSync:()=>A0e,relative:()=>s0e,release:()=>pve,rename:()=>J0e,renameSync:()=>F0e,request:()=>hve,resolve:()=>t0e,rm:()=>Y0e,rmSync:()=>U0e,rmdirSync:()=>$0e,sep:()=>a0e,serialize:()=>eTe,setImmediate:()=>C0e,setInterval:()=>TTe,setTimeout:()=>yTe,spawn:()=>Q0e,stat:()=>H0e,statSync:()=>D0e,strict:()=>xve,tmpdir:()=>ive,toUSVString:()=>jve,totalmem:()=>uve,type:()=>dve,types:()=>Hve,unlink:()=>W0e,unlinkSync:()=>L0e,validateHeaderName:()=>Zye,validateHeaderValue:()=>Qye,webcrypto:()=>Wye,workerData:()=>sTe,writeFile:()=>G0e,writeFileSync:()=>w0e});var zn,tn,Hye,Vye,cu,pz,Sh,Xe,Wye,Kye,Jye,Yye,Xye,Zye,Qye,e0e,t0e,r0e,n0e,o0e,s0e,i0e,a0e,c0e,l0e,u0e,d0e,hz,fz,m0e,p0e,h0e,f0e,g0e,y0e,v0e,T0e,w0e,E0e,b0e,S0e,_0e,C0e,k0e,A0e,x0e,I0e,R0e,M0e,P0e,D0e,O0e,N0e,L0e,F0e,$0e,U0e,B0e,z0e,q0e,G0e,j0e,H0e,V0e,W0e,K0e,J0e,Y0e,X0e,Z0e,Q0e,eve,tve,rve,nve,ove,sve,ive,ave,cve,lve,uve,dve,mve,pve,hve,fve,gve,yve,vve,Tve,wve,Eve,bve,Sve,_ve,Cve,kve,Ave,xve,Ive,Rve,Mve,Pve,Dve,Ove,Nve,Lve,Fve,$ve,Uve,gz,Bve,gb,zve,qve,Gve,jve,Hve,yz,yb,Vve,Wve,Kve,Jve,Yve,Xve,Zve,Qve,eTe,tTe,rTe,nTe,oTe,sTe,iTe,aTe,cTe,lTe,uTe,dTe,mTe,pTe,hTe,fTe,gTe,vz,yTe,vTe,TTe,wTe,ETe,Ot=S({"node-stub:crypto"(){zn=()=>{},tn=async()=>{},Hye={},Vye={readFile:tn,writeFile:tn,mkdir:tn,stat:tn,readdir:tn,unlink:tn,access:tn,rm:tn,rename:tn},cu=e=>{const t=[];return{update(r){return t.push(typeof r=="string"?new yb().encode(r):r),this},digest(r){let n=0;for(const s of t)for(let i=0;i<s.length;i++)n=(n<<5)-n+s[i]|0;const o=(n>>>0).toString(16).padStart(8,"0");return r==="hex"?o:r==="base64"?btoa(o):o}}},pz=(e,t)=>cu(e),Sh=e=>new Uint8Array(e||32),Xe=()=>globalThis.crypto?.randomUUID?.()||Math.random().toString(36),Wye=globalThis.crypto,Kye=()=>{throw new Error("[NeuroLink:browser] fs.appendFileSync is not supported in browser runtime \u2014 use server-side execution")},Jye=()=>{throw new Error("[NeuroLink:browser] fs.cpSync is not supported in browser runtime \u2014 use server-side execution")},Yye=()=>({listen:zn,close:zn,on:zn}),Xye=class{constructor(){throw new Error("[NeuroLink:browser] Node HTTP agents require a server runtime")}},Zye=zn,Qye=zn,e0e=(...e)=>e.join("/"),t0e=(...e)=>e.join("/"),r0e=e=>e||"",n0e=e=>e?.split?.("/")?.pop?.()||"",o0e=e=>{const t=e?.match?.(/\.[^.]+$/);return t?t[0]:""},s0e=(e,t)=>t||"",i0e=()=>!1,a0e="/",c0e={normalize:e=>e,join:(...e)=>e.join("/"),resolve:(...e)=>e.join("/"),sep:"/"},l0e=e=>e,u0e=class{constructor(){this._ev=new Map}_list(t){let r=this._ev.get(t);return r||(r=[],this._ev.set(t,r)),r}on(t,r){return this._list(t).push(r),this}addListener(t,r){return this.on(t,r)}prependListener(t,r){return this._list(t).unshift(r),this}once(t,r){const n=(...o)=>{this.off(t,n),r(...o)};return n.listener=r,this.on(t,n)}prependOnceListener(t,r){const n=(...o)=>{this.off(t,n),r(...o)};return n.listener=r,this.prependListener(t,n)}off(t,r){const n=this._ev.get(t);if(n){const o=n.findIndex(s=>s===r||s.listener===r);o>=0&&n.splice(o,1)}return this}removeListener(t,r){return this.off(t,r)}removeAllListeners(t){return t===void 0?this._ev.clear():this._ev.delete(t),this}emit(t,...r){const n=this._ev.get(t);if(!n||n.length===0){if(t==="error")throw r[0]instanceof Error?r[0]:new Error("Unhandled error.");return!1}for(const o of[...n])o.apply(this,r);return!0}listenerCount(t){return(this._ev.get(t)||[]).length}listeners(t){return[...this._ev.get(t)||[]]}rawListeners(t){return this.listeners(t)}eventNames(){return[...this._ev.keys()]}setMaxListeners(){return this}getMaxListeners(){return 10}},d0e=class{getStore(){}run(e,t,...r){return t(...r)}enterWith(){}disable(){}},hz=class{pipe(){return this}on(){return this}read(){return null}push(){}destroy(){}},fz=class{write(){return!0}end(){}on(){return this}destroy(){}},m0e=class{push(){}on(){return this}},p0e=class{on(){return this}},h0e=class{pipe(){return this}on(){return this}},f0e=globalThis.ReadableStream||class{},g0e=zn,y0e=zn,v0e=()=>!1,T0e=()=>"",w0e=zn,E0e=zn,b0e=tn,S0e=()=>1,_0e=()=>[0,0,0],C0e=tn,k0e=tn,A0e=e=>e,x0e=zn,I0e=()=>0,R0e=zn,M0e=()=>({}),P0e=zn,D0e=()=>({}),O0e=()=>({isSymbolicLink:()=>!1}),N0e=()=>[],L0e=zn,F0e=zn,$0e=zn,U0e=zn,B0e=()=>new fz,z0e=()=>new hz,q0e=tn,G0e=tn,j0e=tn,H0e=tn,V0e=tn,W0e=tn,K0e=tn,J0e=tn,Y0e=tn,X0e=async()=>({stat:tn,readFile:tn,close:tn,read:tn,write:tn}),Z0e=async e=>e,Q0e=()=>({on:zn,stdout:{on:zn},stderr:{on:zn},kill:zn}),eve=(e,t)=>t?.(null,"",""),tve=()=>"",rve=(e,t,r)=>{typeof t=="function"?t(null,"",""):r?.(null,"","")},nve=()=>"",ove="browser",sve=()=>"/",ive=()=>"/tmp",ave=()=>"browser",cve=()=>[{}],lve=()=>0,uve=()=>0,dve=()=>"Browser",mve=()=>"wasm",pve=()=>"0",hve=()=>({}),fve=()=>({}),gve={100:"Continue",101:"Switching Protocols",200:"OK",201:"Created",202:"Accepted",204:"No Content",206:"Partial Content",301:"Moved Permanently",302:"Found",304:"Not Modified",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",422:"Unprocessable Entity",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported"},yve=()=>({}),vve=()=>({}),Tve=()=>new Uint8Array,wve=()=>new Uint8Array,Eve=()=>new Uint8Array,bve=()=>new Uint8Array,Sve=(e,t)=>t?.(null,e),_ve=(e,t)=>t?.(null,e),Cve=()=>({}),kve=()=>({}),Ave=zn,xve={},Ive=()=>()=>({}),Rve=[],Mve=()=>!1,Pve=e=>({pathname:e||"",hostname:"",protocol:"",search:"",hash:""}),Dve=()=>"",Ove=globalThis.URL,Nve=globalThis.URLSearchParams,Lve=e=>typeof e=="string"?e.replace("file://",""):e,Fve=e=>new globalThis.URL("file://"+e),$ve=(e,t)=>{t&&(e.super_=t,Object.setPrototypeOf(e.prototype,t.prototype))},Uve=e=>(...t)=>new Promise((r,n)=>e(...t,(o,s)=>o?n(o):r(s))),gz=e=>{const t=(...r)=>{};return t.enabled=!1,t},Bve=gz,gb=e=>{try{return JSON.stringify(e,null,2)}catch{return String(e)}},gb.custom=Symbol.for("nodejs.util.inspect.custom"),gb.colors={},gb.styles={},zve=e=>e,qve=e=>(...t)=>{const r=t.pop();e(...t).then(n=>r(null,n)).catch(r)},Gve=(e,t)=>JSON.stringify(e)===JSON.stringify(t),jve=e=>String(e),Hve={isPromise:e=>e instanceof Promise,isDate:e=>e instanceof Date,isRegExp:e=>e instanceof RegExp,isNativeError:e=>e instanceof Error,isArrayBuffer:e=>e instanceof ArrayBuffer,isTypedArray:e=>ArrayBuffer.isView(e),isUint8Array:e=>e instanceof Uint8Array,isProxy:()=>!1},yz=globalThis.TextDecoder,yb=globalThis.TextEncoder,Vve=(e,t)=>t?.(null,"127.0.0.1",4),Wve=class{},Kve=globalThis.performance||{now:()=>Date.now()},Jve=class{observe(){}disconnect(){}},Yve=()=>({enable:zn,disable:zn,percentile:()=>0}),Xve=()=>({}),Zve=class{},Qve=()=>!1,eTe=()=>new Uint8Array,tTe=zn,rTe=class{},nTe=!0,oTe=null,sTe=null,iTe=()=>({}),aTe=class{},cTe=class{},lTe=globalThis.Buffer||class extends Uint8Array{static from(t,r){if(typeof t=="string"){const n=(r||"utf8").toLowerCase();if(n==="base64"){const o=atob(t),s=new Uint8Array(o.length);for(let i=0;i<o.length;i++)s[i]=o.charCodeAt(i);return s}if(n==="hex"){const o=new Uint8Array(t.length/2);for(let s=0;s<t.length;s+=2)o[s/2]=parseInt(t.substr(s,2),16);return o}return new yb().encode(t)}return new Uint8Array(t)}static alloc(t){return new Uint8Array(t)}static isBuffer(t){return t instanceof Uint8Array}static concat(t){const r=t.reduce((s,i)=>s+i.length,0),n=new Uint8Array(r);let o=0;for(const s of t)n.set(s,o),o+=s.length;return n}static byteLength(t,r){return r==="base64"?Math.ceil(t.length*3/4):new yb().encode(t).length}toString(t){const r=(t||"utf8").toLowerCase();if(r==="hex")return Array.from(new Uint8Array(this.buffer,this.byteOffset,this.byteLength)).map(n=>n.toString(16).padStart(2,"0")).join("");if(r==="base64"){let n="";for(let o=0;o<this.length;o++)n+=String.fromCharCode(this[o]);return btoa(n)}return new yz().decode(this)}},uTe={F_OK:0,R_OK:4,W_OK:2,X_OK:1},dTe=()=>!1,mTe=()=>!1,pTe=()=>0,hTe=class{},fTe=class{},gTe=async()=>new ArrayBuffer(0),vz=e=>({[Symbol.toPrimitive](){return e},ref(){return this},unref(){return this},hasRef(){return!1},refresh(){return this},close(){}}),yTe=(...e)=>vz(globalThis.setTimeout(...e)),vTe=globalThis.clearTimeout,TTe=(...e)=>vz(globalThis.setInterval(...e)),wTe=globalThis.clearInterval,ETe=class{constructor(e){this.type=e}toString(){return this.type}}}}),$m={};se($m,{Agent:()=>RTe,AsyncLocalStorage:()=>NTe,Buffer:()=>DEe,Channel:()=>bEe,DatabaseSync:()=>PEe,Duplex:()=>FTe,EventEmitter:()=>OTe,Http2ServerRequest:()=>$Ee,Http2ServerResponse:()=>UEe,Interface:()=>MEe,MIMEType:()=>HEe,PassThrough:()=>$Te,PerformanceObserver:()=>TEe,Readable:()=>_z,ReadableStream:()=>UTe,Resolver:()=>yEe,STATUS_CODES:()=>Bwe,TextDecoder:()=>Az,TextEncoder:()=>Tb,Transform:()=>LTe,URL:()=>oEe,URLSearchParams:()=>sEe,Worker:()=>kEe,Writable:()=>Cz,access:()=>vwe,appendFile:()=>YTe,appendFileSync:()=>ATe,arch:()=>Lwe,arrayBuffer:()=>BEe,availableParallelism:()=>WTe,basename:()=>Si,builtinModules:()=>eEe,callbackify:()=>mEe,channel:()=>EEe,chmod:()=>VTe,chmodSync:()=>HTe,clearInterval:()=>jEe,clearTimeout:()=>qEe,closeSync:()=>ewe,connect:()=>zwe,constants:()=>OEe,copyFileSync:()=>ZTe,cpSync:()=>xTe,cpus:()=>Pwe,createConnection:()=>qwe,createGunzip:()=>Jwe,createGzip:()=>Ywe,createHash:()=>Tz,createHmac:()=>STe,createInterface:()=>REe,createReadStream:()=>dwe,createRequire:()=>Qwe,createServer:()=>ITe,createWriteStream:()=>uwe,debug:()=>uEe,debuglog:()=>kz,default:()=>Um,deflateSync:()=>jwe,deprecate:()=>dEe,deserialize:()=>CEe,dirname:()=>wz,exec:()=>_we,execFile:()=>kwe,execFileSync:()=>Awe,execSync:()=>Cwe,existsSync:()=>qTe,extname:()=>ws,fileURLToPath:()=>iEe,finished:()=>zTe,format:()=>nEe,freemem:()=>Dwe,fstatSync:()=>twe,get:()=>Uwe,gunzip:()=>Kwe,gunzipSync:()=>Hwe,gzip:()=>Wwe,gzipSync:()=>Vwe,hasSubscribers:()=>SEe,homedir:()=>Iwe,hostname:()=>Mwe,inflateSync:()=>Gwe,inherits:()=>cEe,inspect:()=>vb,isAbsolute:()=>b1,isBuiltin:()=>tEe,isDeepStrictEqual:()=>pEe,isIP:()=>FEe,isIPv4:()=>LEe,isIPv6:()=>NEe,isMainThread:()=>AEe,join:()=>At,loadavg:()=>KTe,lookup:()=>gEe,lstatSync:()=>owe,mkdir:()=>hwe,mkdirSync:()=>rwe,monitorEventLoopDelay:()=>wEe,normalize:()=>DTe,ok:()=>Xwe,open:()=>Ewe,openSync:()=>QTe,parentPort:()=>xEe,parse:()=>rEe,pathToFileURL:()=>aEe,performance:()=>vEe,pipeline:()=>BTe,platform:()=>xwe,posix:()=>Sz,promises:()=>bTe,promisify:()=>lEe,randomBytes:()=>_Te,randomUUID:()=>CTe,readFile:()=>mwe,readFileSync:()=>GTe,readdir:()=>gwe,readdirSync:()=>swe,realpath:()=>bwe,realpathSync:()=>XTe,relative:()=>Ez,release:()=>Fwe,rename:()=>Twe,renameSync:()=>awe,request:()=>$we,resolve:()=>Bm,rm:()=>wwe,rmSync:()=>lwe,rmdirSync:()=>cwe,sep:()=>bz,serialize:()=>_Ee,setImmediate:()=>JTe,setInterval:()=>GEe,setTimeout:()=>zEe,spawn:()=>Swe,stat:()=>fwe,statSync:()=>nwe,strict:()=>Zwe,tmpdir:()=>Rwe,toUSVString:()=>hEe,totalmem:()=>Owe,type:()=>Nwe,types:()=>fEe,unlink:()=>ywe,unlinkSync:()=>iwe,validateHeaderName:()=>MTe,validateHeaderValue:()=>PTe,webcrypto:()=>kTe,workerData:()=>IEe,writeFile:()=>pwe,writeFileSync:()=>jTe});var qn,rn,Um,bTe,Tz,STe,_Te,CTe,kTe,ATe,xTe,ITe,RTe,MTe,PTe,At,Bm,wz,Si,ws,Ez,b1,bz,Sz,DTe,OTe,NTe,_z,Cz,LTe,FTe,$Te,UTe,BTe,zTe,qTe,GTe,jTe,HTe,VTe,WTe,KTe,JTe,YTe,XTe,ZTe,QTe,ewe,twe,rwe,nwe,owe,swe,iwe,awe,cwe,lwe,uwe,dwe,mwe,pwe,hwe,fwe,gwe,ywe,vwe,Twe,wwe,Ewe,bwe,Swe,_we,Cwe,kwe,Awe,xwe,Iwe,Rwe,Mwe,Pwe,Dwe,Owe,Nwe,Lwe,Fwe,$we,Uwe,Bwe,zwe,qwe,Gwe,jwe,Hwe,Vwe,Wwe,Kwe,Jwe,Ywe,Xwe,Zwe,Qwe,eEe,tEe,rEe,nEe,oEe,sEe,iEe,aEe,cEe,lEe,kz,uEe,vb,dEe,mEe,pEe,hEe,fEe,Az,Tb,gEe,yEe,vEe,TEe,wEe,EEe,bEe,SEe,_Ee,CEe,kEe,AEe,xEe,IEe,REe,MEe,PEe,DEe,OEe,NEe,LEe,FEe,$Ee,UEe,BEe,xz,zEe,qEe,GEe,jEe,HEe,hr=S({"node-stub:path"(){qn=()=>{},rn=async()=>{},Um={},bTe={readFile:rn,writeFile:rn,mkdir:rn,stat:rn,readdir:rn,unlink:rn,access:rn,rm:rn,rename:rn},Tz=e=>{const t=[];return{update(r){return t.push(typeof r=="string"?new Tb().encode(r):r),this},digest(r){let n=0;for(const s of t)for(let i=0;i<s.length;i++)n=(n<<5)-n+s[i]|0;const o=(n>>>0).toString(16).padStart(8,"0");return r==="hex"?o:r==="base64"?btoa(o):o}}},STe=(e,t)=>Tz(e),_Te=e=>new Uint8Array(e||32),CTe=()=>globalThis.crypto?.randomUUID?.()||Math.random().toString(36),kTe=globalThis.crypto,ATe=()=>{throw new Error("[NeuroLink:browser] fs.appendFileSync is not supported in browser runtime \u2014 use server-side execution")},xTe=()=>{throw new Error("[NeuroLink:browser] fs.cpSync is not supported in browser runtime \u2014 use server-side execution")},ITe=()=>({listen:qn,close:qn,on:qn}),RTe=class{constructor(){throw new Error("[NeuroLink:browser] Node HTTP agents require a server runtime")}},MTe=qn,PTe=qn,At=(...e)=>e.join("/"),Bm=(...e)=>e.join("/"),wz=e=>e||"",Si=e=>e?.split?.("/")?.pop?.()||"",ws=e=>{const t=e?.match?.(/\.[^.]+$/);return t?t[0]:""},Ez=(e,t)=>t||"",b1=()=>!1,bz="/",Sz={normalize:e=>e,join:(...e)=>e.join("/"),resolve:(...e)=>e.join("/"),sep:"/"},DTe=e=>e,OTe=class{constructor(){this._ev=new Map}_list(t){let r=this._ev.get(t);return r||(r=[],this._ev.set(t,r)),r}on(t,r){return this._list(t).push(r),this}addListener(t,r){return this.on(t,r)}prependListener(t,r){return this._list(t).unshift(r),this}once(t,r){const n=(...o)=>{this.off(t,n),r(...o)};return n.listener=r,this.on(t,n)}prependOnceListener(t,r){const n=(...o)=>{this.off(t,n),r(...o)};return n.listener=r,this.prependListener(t,n)}off(t,r){const n=this._ev.get(t);if(n){const o=n.findIndex(s=>s===r||s.listener===r);o>=0&&n.splice(o,1)}return this}removeListener(t,r){return this.off(t,r)}removeAllListeners(t){return t===void 0?this._ev.clear():this._ev.delete(t),this}emit(t,...r){const n=this._ev.get(t);if(!n||n.length===0){if(t==="error")throw r[0]instanceof Error?r[0]:new Error("Unhandled error.");return!1}for(const o of[...n])o.apply(this,r);return!0}listenerCount(t){return(this._ev.get(t)||[]).length}listeners(t){return[...this._ev.get(t)||[]]}rawListeners(t){return this.listeners(t)}eventNames(){return[...this._ev.keys()]}setMaxListeners(){return this}getMaxListeners(){return 10}},NTe=class{getStore(){}run(e,t,...r){return t(...r)}enterWith(){}disable(){}},_z=class{pipe(){return this}on(){return this}read(){return null}push(){}destroy(){}},Cz=class{write(){return!0}end(){}on(){return this}destroy(){}},LTe=class{push(){}on(){return this}},FTe=class{on(){return this}},$Te=class{pipe(){return this}on(){return this}},UTe=globalThis.ReadableStream||class{},BTe=qn,zTe=qn,qTe=()=>!1,GTe=()=>"",jTe=qn,HTe=qn,VTe=rn,WTe=()=>1,KTe=()=>[0,0,0],JTe=rn,YTe=rn,XTe=e=>e,ZTe=qn,QTe=()=>0,ewe=qn,twe=()=>({}),rwe=qn,nwe=()=>({}),owe=()=>({isSymbolicLink:()=>!1}),swe=()=>[],iwe=qn,awe=qn,cwe=qn,lwe=qn,uwe=()=>new Cz,dwe=()=>new _z,mwe=rn,pwe=rn,hwe=rn,fwe=rn,gwe=rn,ywe=rn,vwe=rn,Twe=rn,wwe=rn,Ewe=async()=>({stat:rn,readFile:rn,close:rn,read:rn,write:rn}),bwe=async e=>e,Swe=()=>({on:qn,stdout:{on:qn},stderr:{on:qn},kill:qn}),_we=(e,t)=>t?.(null,"",""),Cwe=()=>"",kwe=(e,t,r)=>{typeof t=="function"?t(null,"",""):r?.(null,"","")},Awe=()=>"",xwe="browser",Iwe=()=>"/",Rwe=()=>"/tmp",Mwe=()=>"browser",Pwe=()=>[{}],Dwe=()=>0,Owe=()=>0,Nwe=()=>"Browser",Lwe=()=>"wasm",Fwe=()=>"0",$we=()=>({}),Uwe=()=>({}),Bwe={100:"Continue",101:"Switching Protocols",200:"OK",201:"Created",202:"Accepted",204:"No Content",206:"Partial Content",301:"Moved Permanently",302:"Found",304:"Not Modified",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",422:"Unprocessable Entity",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported"},zwe=()=>({}),qwe=()=>({}),Gwe=()=>new Uint8Array,jwe=()=>new Uint8Array,Hwe=()=>new Uint8Array,Vwe=()=>new Uint8Array,Wwe=(e,t)=>t?.(null,e),Kwe=(e,t)=>t?.(null,e),Jwe=()=>({}),Ywe=()=>({}),Xwe=qn,Zwe={},Qwe=()=>()=>({}),eEe=[],tEe=()=>!1,rEe=e=>({pathname:e||"",hostname:"",protocol:"",search:"",hash:""}),nEe=()=>"",oEe=globalThis.URL,sEe=globalThis.URLSearchParams,iEe=e=>typeof e=="string"?e.replace("file://",""):e,aEe=e=>new globalThis.URL("file://"+e),cEe=(e,t)=>{t&&(e.super_=t,Object.setPrototypeOf(e.prototype,t.prototype))},lEe=e=>(...t)=>new Promise((r,n)=>e(...t,(o,s)=>o?n(o):r(s))),kz=e=>{const t=(...r)=>{};return t.enabled=!1,t},uEe=kz,vb=e=>{try{return JSON.stringify(e,null,2)}catch{return String(e)}},vb.custom=Symbol.for("nodejs.util.inspect.custom"),vb.colors={},vb.styles={},dEe=e=>e,mEe=e=>(...t)=>{const r=t.pop();e(...t).then(n=>r(null,n)).catch(r)},pEe=(e,t)=>JSON.stringify(e)===JSON.stringify(t),hEe=e=>String(e),fEe={isPromise:e=>e instanceof Promise,isDate:e=>e instanceof Date,isRegExp:e=>e instanceof RegExp,isNativeError:e=>e instanceof Error,isArrayBuffer:e=>e instanceof ArrayBuffer,isTypedArray:e=>ArrayBuffer.isView(e),isUint8Array:e=>e instanceof Uint8Array,isProxy:()=>!1},Az=globalThis.TextDecoder,Tb=globalThis.TextEncoder,gEe=(e,t)=>t?.(null,"127.0.0.1",4),yEe=class{},vEe=globalThis.performance||{now:()=>Date.now()},TEe=class{observe(){}disconnect(){}},wEe=()=>({enable:qn,disable:qn,percentile:()=>0}),EEe=()=>({}),bEe=class{},SEe=()=>!1,_Ee=()=>new Uint8Array,CEe=qn,kEe=class{},AEe=!0,xEe=null,IEe=null,REe=()=>({}),MEe=class{},PEe=class{},DEe=globalThis.Buffer||class extends Uint8Array{static from(t,r){if(typeof t=="string"){const n=(r||"utf8").toLowerCase();if(n==="base64"){const o=atob(t),s=new Uint8Array(o.length);for(let i=0;i<o.length;i++)s[i]=o.charCodeAt(i);return s}if(n==="hex"){const o=new Uint8Array(t.length/2);for(let s=0;s<t.length;s+=2)o[s/2]=parseInt(t.substr(s,2),16);return o}return new Tb().encode(t)}return new Uint8Array(t)}static alloc(t){return new Uint8Array(t)}static isBuffer(t){return t instanceof Uint8Array}static concat(t){const r=t.reduce((s,i)=>s+i.length,0),n=new Uint8Array(r);let o=0;for(const s of t)n.set(s,o),o+=s.length;return n}static byteLength(t,r){return r==="base64"?Math.ceil(t.length*3/4):new Tb().encode(t).length}toString(t){const r=(t||"utf8").toLowerCase();if(r==="hex")return Array.from(new Uint8Array(this.buffer,this.byteOffset,this.byteLength)).map(n=>n.toString(16).padStart(2,"0")).join("");if(r==="base64"){let n="";for(let o=0;o<this.length;o++)n+=String.fromCharCode(this[o]);return btoa(n)}return new Az().decode(this)}},OEe={F_OK:0,R_OK:4,W_OK:2,X_OK:1},NEe=()=>!1,LEe=()=>!1,FEe=()=>0,$Ee=class{},UEe=class{},BEe=async()=>new ArrayBuffer(0),xz=e=>({[Symbol.toPrimitive](){return e},ref(){return this},unref(){return this},hasRef(){return!1},refresh(){return this},close(){}}),zEe=(...e)=>xz(globalThis.setTimeout(...e)),qEe=globalThis.clearTimeout,GEe=(...e)=>xz(globalThis.setInterval(...e)),jEe=globalThis.clearInterval,HEe=class{constructor(e){this.type=e}toString(){return this.type}}}});function lr(e,t=500){return e&&e.slice(0,t).replace(YEe,"***")}function r0(e){if(typeof e=="string")return e;try{return JSON.stringify(e)??String(e)}catch{return"[content too large to serialize]"}}function S1(e,t=1e4){try{const r=JSON.stringify(e);return r===void 0?String(e):r.length>t?`${r.slice(0,t)}\u2026[truncated ${r.length-t} chars]`:r}catch(r){return`[unserializable: ${r instanceof Error?r.message:String(r)}]`}}function No(e){return e.replace(/\/\/[^/\s"'<>]*@/g,"//***@").replace(/\/\/(?:(?!\/\/)[^\s"'<>])*@/g,"//***@")}function rr(e){const t=r=>r.length>200?`${r.slice(0,200)}\u2026`:r;try{const r=new URL(e);return t(`${r.protocol}//${r.host}${r.pathname}`)}catch{const r=e.split(/[?#]/)[0];return t(No(r))}}function xyr(e){QEe.forEach(t=>e.searchParams.delete(t))}function Iyr(e){const t=[],r=[];for(const[o,s]of e.searchParams.entries())ZEe.includes(o.toLowerCase())&&(t.push(`${o.toLowerCase()}=${s}`),r.push(o));return t.length===0?"":(r.forEach(o=>e.searchParams.delete(o)),t.sort(),`\0auth=${cu("sha256").update(t.join("&")).digest("hex").slice(0,16)}`)}function VEe(e){try{const t=new URL(e);xyr(t);const r=Iyr(t);return t.toString()+r}catch{return e}}function _1(e){return e.replace(/[a-zA-Z][a-zA-Z0-9+.-]*:\/\/[^\s"'<>)]+/g,t=>rr(t))}function WEe(e,t){const r=Si(t);return e.split(Bm(t)).join(r).split(t).join(r)}function _h(e,t){const r=s=>{const i=_1(s);return t?.filePath?WEe(i,t.filePath):i};if(!(e instanceof Error))return new Error(r(String(e)));const n=new Error(r(e.message));n.name=e.name;const o=e.code;return o!==void 0&&(n.code=o),n}function C1(e,t=1e3){const r=new WeakSet,n=o=>{if(o==null)return o;if(typeof o=="string")return lr(o,t);if(typeof o!="object")return o;if(r.has(o))return"[Circular]";if(r.add(o),Array.isArray(o))return o.map(n);const s={};for(const[i,a]of Object.entries(o))XEe.some(c=>c.toLowerCase()===i.toLowerCase())?s[i]="***":s[i]=n(a);return s};return n(e)}var KEe,JEe,YEe,XEe,ZEe,QEe,Ut=S({"src/lib/utils/logSanitize.ts"(){"use strict";Ot(),hr(),KEe=["sk","pk","r8","gsk","csk","xai","tgp","fw","pplx","pa","jina","fish"],JEe=KEe.join("|"),YEe=new RegExp(`\\bBearer\\s+[A-Za-z0-9_\\-\\.]{8,}\\b|\\bToken\\s+[A-Za-z0-9_\\-\\.]{8,}\\b|\\bBasic\\s+[A-Za-z0-9+/=]{12,}\\b|\\b(?:${JEe})[_\\-][A-Za-z0-9_\\-\\.]{8,}\\b|\\b(?:api[_-]?key|access[_-]?token|secret[_-]?key|refresh[_-]?token)['"]?\\s*[:=]\\s*['"]?[^\\s,;'"&]+`,"gi"),XEe=["apikey","api_key","apiKey","access_token","accessToken","refresh_token","refreshToken","secret","secretkey","secret_key","secretKey","password","authorization","oauth","oauthToken","credentials","authContext","authToken","sessionToken","serviceAccountKey","secretAccessKey","userEmail"],ZEe=["token","signature","x-amz-signature","x-amz-credential","x-amz-security-token","awsaccesskeyid","expires","sig","se","sp","sr","sv","x-goog-signature","x-goog-credential","x-goog-algorithm","x-goog-date","x-goog-expires","x-goog-signedheaders"],QEe=["utm_source","utm_medium","utm_campaign","utm_term","utm_content","fbclid","gclid","_ga"]}});function Ryr(e){const t=[],r=new Set;let n=e;for(;n&&typeof n=="object"&&!r.has(n)&&t.length<tbe;){r.add(n);const o=n;t.push(o),n=o.cause}return t}function ebe(e,t){for(const r of e)if(typeof r[t]=="string")return r[t]}function Myr(e,t,r){const n=Ryr(e),o=n[0],s=typeof o?.message=="string"?o.message:e instanceof Error?e.message:"Unknown error",i=n[n.length-1],a=typeof i?.message=="string"?_1(i.message):void 0,c=a&&a!==s?`${s}: ${a}`:s;let l;for(const u of n)if(l=hb(u),l!==void 0)break;return{error:e,message:c,statusCode:l,errorName:ebe(n,"name"),errorCode:ebe(n,"code"),provider:t,modelName:r}}function fa(e,t,r,n){if(e instanceof pa)return new Go(`Request timed out: ${e.message}`,r);const o=Myr(e,r,n),s=t.find(a=>a.match(o));if(!s)return new ot(`${r} error: ${o.message}`,r);const i=typeof s.message=="function"?s.message(o):s.message;return new s.errorClass(i,r)}var tbe,_c,zi=S({"src/lib/utils/errorClassifier.ts"(){"use strict";ut(),ha(),ad(),jye(),Ut(),tbe=5,_c=[{match:e=>e.statusCode===401||/API_KEY_INVALID|Invalid API key|Unauthorized|invalid_api_key/i.test(e.message),errorClass:Pr,message:e=>`Invalid ${e.provider} API key. Please check your credentials.`},{match:e=>e.statusCode===429||/rate limit/i.test(e.message),errorClass:$s,message:e=>`${e.provider} rate limit exceeded. Please try again later.`},{match:e=>e.statusCode===404||/model_not_found|model not found/i.test(e.message),errorClass:Do,message:e=>e.modelName?`${e.provider} model '${e.modelName}' not found.`:`${e.provider} model not found.`},{match:e=>/ECONNRESET|ENOTFOUND|ECONNREFUSED|ETIMEDOUT|network|connection/i.test(e.message)||e.errorCode!==void 0&&mz.has(e.errorCode),errorClass:Go,message:e=>`Connection error: ${e.message}`},{match:e=>e.statusCode!==void 0&&e.statusCode>=500&&e.statusCode<=599||/server error|bad gateway|service unavailable|gateway timeout|\berror\b\D{0,12}\b5\d\d\b|\b5\d\d\b\D{0,12}\berror\b|\bstatus(?:\s*code)?\b\D{0,12}\b5\d\d\b/i.test(e.message),errorClass:ot,message:e=>`${e.provider} server error: ${e.message}`}]}});function Pyr(e){return e.replace(/-([a-z])/g,(t,r)=>r.toUpperCase())}function Dyr(e){return e.credentialsKey??Pyr(e.id)}function lu(e,t){const r=e.wire.envOverrides?.[t];if(r)return r;const n=e.id.toUpperCase().replace(/-/g,"_");return t==="apiKey"?`${n}_API_KEY`:t==="baseURL"?`${n}_BASE_URL`:`${n}_MODEL`}function Iz(e,t,r,n){return e.replace(/\{apiKeyEnvVar\}/g,lu(t,"apiKey")).replace(/\{setupUrl\}/g,t.setup.url).replace(/\{model\}/g,r??"").replace(/\{message\}/g,n??"")}function Oyr(e){return{providerName:e.displayName,envVarName:lu(e,"apiKey"),setupUrl:e.setup.url,description:e.setup.description??"API key",instructions:e.setup.instructions.map(t=>Iz(t,e)),...e.wire.apiKeyFallbackEnvVars?{fallbackEnvVars:e.wire.apiKeyFallbackEnvVars}:{}}}function Nyr(e){return[...e.errorRules.map(r=>{const n=r.pattern?new RegExp(r.pattern,"i"):void 0,o=r.message.includes("{model}")||r.message.includes("{message}");return{match:s=>r.status!==void 0&&s.statusCode===r.status||n!==void 0&&n.test(s.message),errorClass:rbe[r.class],message:o?s=>Iz(r.message,e,s.modelName,s.message):Iz(r.message,e)}}),..._c]}function Rz(e){if(Array.isArray(e)){for(const t of e)Rz(t);return Object.freeze(e)}if(e!==null&&typeof e=="object"){for(const t of Object.keys(e))Rz(e[t]);return Object.freeze(e)}return e}function n0(){return Rz(structuredClone(r3))}function Lyr(){return r3.map(e=>{const t={providerName:e.id,aliases:[e.id,...e.aliases],apiKeyEnvVar:lu(e,"apiKey"),configOptions:Oyr(e),modelEnvVar:lu(e,"model"),defaultModel:e.models.default,registryDefaultModel:e.models.registryDefaultModel??e.models.default,registryDefaultModelChecksEnvVar:e.quirks?.registryDefaultIgnoresModelEnvVar!==!0,fallbackModelName:e.models.fallbackModelName??e.models.fallbacks[1]??e.models.fallbacks[0],fallbackModels:[...e.models.fallbacks],errorRules:Nyr(e),...typeof e.capabilities.tools=="boolean"?{supportsTools:e.capabilities.tools}:{}},{baseURLTemplate:r}=e.wire;if(r){const n=e.wire.extraCredentials?.[0]??"accountId";t.computedBaseURL={envVar:`${e.id.toUpperCase().replace(/-/g,"_")}_${n.replace(/([A-Z])/g,"_$1").toUpperCase()}`,missingValueMessage:e.wire.missingCredentialMessage??`Missing ${n} for ${e.displayName}`,build:o=>r.replaceAll(`{${n}}`,o)}}else t.baseURLEnvVar=lu(e,"baseURL"),t.defaultBaseURL=e.wire.baseURL;return e.quirks?.messageContentFormat&&(t.messageContentFormat=e.quirks.messageContentFormat),e.quirks?.timeoutErrorClass==="provider"&&(t.timeoutErrorClass=ot),e.quirks?.responseFormatDowngrade&&(t.responseFormatDowngrade=e.quirks.responseFormatDowngrade),e.quirks?.replayReasoningContent&&(t.replayReasoningContent=!0),t})}var rbe,o0=S({"src/lib/providers/catalog/loader.ts"(){"use strict";Aur(),zi(),ut(),rbe={authentication:Pr,"rate-limit":$s,"invalid-model":Do,network:Go,provider:ot}}});function ga(e){let t=process.env[e.envVarName];if(!t&&e.fallbackEnvVars){for(const r of e.fallbackEnvVars)if(t=process.env[r],t)break}if(!t){if(e.optional)return"";throw new Error(Fyr(e))}return t}function Fyr(e){const t=e.fallbackEnvVars?[e.envVarName,...e.fallbackEnvVars].join(" or "):e.envVarName;return`\u274C ${e.providerName} Provider Configuration Error
|
|
66
|
+
`),category:"validation",severity:"medium",retriable:!1,context:{estimatedPages:e,maxPages:t,provider:r,alternatives:n}})}static pdfAggregatePageLimitExceeded(e,t,r,n){return new Pe({code:je.PDF_AGGREGATE_PAGE_LIMIT_EXCEEDED,message:`[PDF] Combined page count across ${e} PDF(s) (${t}) exceeds the ${r}-page limit for ${n}. Split the request or reduce the number of PDFs.`,category:"validation",severity:"medium",retriable:!1,context:{fileCount:e,totalPages:t,maxPages:r,provider:n}})}static pdfAggregateSizeLimitExceeded(e,t,r,n){return new Pe({code:je.PDF_AGGREGATE_SIZE_LIMIT_EXCEEDED,message:`[PDF] Combined size across ${e} PDF(s) (${t.toFixed(2)}MB) exceeds the ${r}MB limit for ${n}.`,category:"validation",severity:"medium",retriable:!1,context:{fileCount:e,totalMB:t,maxSizeMB:r,provider:n}})}static pdfPageCountUnverifiable(e,t){return new Pe({code:je.PDF_PAGE_COUNT_UNVERIFIABLE,message:`[PDF] Cannot verify the page count for ${e.length} PDF(s) supplied via input.content (${e.join(", ")}). Provide readable PDFs, or submit them via input.pdfFiles where page counts are derived during detection.`,category:"validation",severity:"medium",retriable:!1,context:{filenames:e,provider:t}})}static pdfPasswordRequired(){return new Pe({code:je.PDF_PASSWORD_REQUIRED,message:"This PDF is password-protected. Supply the password via `pdfOptions: { password: '\u2026' }` (SDK) or `--pdf-password` (CLI).",category:"validation",severity:"medium",retriable:!1})}static pdfIncorrectPassword(){return new Pe({code:je.PDF_INCORRECT_PASSWORD,message:"The password supplied for this PDF is incorrect. Check the `pdfOptions.password` / `--pdf-password` value and try again.",category:"validation",severity:"medium",retriable:!1})}static imageTooLarge(e,t){return new Pe({code:je.IMAGE_TOO_LARGE,message:`Image size (${e}MB) exceeds maximum (${t}MB)`,category:"validation",severity:"medium",retriable:!1,context:{field:"input.images",sizeMB:e,maxMB:t,suggestions:[`Compress or resize the image to under ${t}MB`,"Use a lower quality JPEG compression","Reduce image dimensions"]}})}static invalidImageSize(e){return new Pe({code:je.INVALID_IMAGE_SIZE,message:`Invalid image size: ${e} (must be a finite, non-negative number)`,category:"validation",severity:"medium",retriable:!1,context:{field:"input.images",size:e}})}static imageTooSmall(){return new Pe({code:je.IMAGE_TOO_SMALL,message:"Image data is too small to be a valid image file",category:"validation",severity:"medium",retriable:!1,context:{field:"input.images",suggestions:["Provide a valid JPEG, PNG, or WebP image file"]}})}static invalidImageFormat(){return new Pe({code:je.INVALID_IMAGE_FORMAT,message:"Unsupported image format. Use JPEG, PNG, or WebP",category:"validation",severity:"medium",retriable:!1,context:{field:"input.images",suggestions:["Convert your image to JPEG, PNG, or WebP format","Ensure the file is not corrupted","Check that the file extension matches the actual format"]}})}static imageBufferInvalid(e){return new Pe({code:je.IMAGE_BUFFER_INVALID,message:e,category:"validation",severity:"medium",retriable:!1,context:{field:"input.images"}})}static rateLimiterQueueFull(e){return new Pe({code:je.RATE_LIMITER_QUEUE_FULL,message:`Rate limiter queue full: too many pending requests (${e} max)`,category:"resource",severity:"high",retriable:!0,context:{maxQueueSize:e}})}static rateLimiterQueueTimeout(e){return new Pe({code:je.RATE_LIMITER_QUEUE_TIMEOUT,message:`Rate limiter queue timeout: request exceeded ${e}ms wait time`,category:"timeout",severity:"high",retriable:!0,context:{timeoutMs:e}})}static rateLimiterReset(){return new Pe({code:je.RATE_LIMITER_RESET,message:"Rate limiter was reset while request was pending",category:"execution",severity:"medium",retriable:!0,context:{}})}static missingPPTProperty(e,t){const r=[`Provide the required '${e}' field`];return new Pe({code:je.MISSING_PPT_PROPERTIES,message:`PPT generation requires '${e}' field`,category:"validation",severity:"medium",retriable:!1,context:{field:e,suggestions:t||r}})}static invalidPPTPages(e,t){return new Pe({code:je.INVALID_PPT_PAGES,message:`Invalid pages value '${e}': ${t}`,category:"validation",severity:"medium",retriable:!1,context:{field:"output.ppt.pages",providedValue:e,suggestions:["Use a number between 5 and 50","For longer presentations, consider breaking into multiple decks"]}})}static invalidPPTFormat(e){return new Pe({code:je.INVALID_PPT_FORMAT,message:`Invalid format '${e}'. Only 'pptx' is supported`,category:"validation",severity:"medium",retriable:!1,context:{field:"output.ppt.format",providedValue:e,suggestions:["Use format: 'pptx' or omit (defaults to 'pptx')"]}})}static invalidPPTOutputOptions(e,t,r){const n=r?r.map(o=>`Use '${o}'`):["Check the documentation for valid options"];return new Pe({code:je.INVALID_PPT_OUTPUT_OPTIONS,message:`Invalid ${e} value '${t}'`,category:"validation",severity:"medium",retriable:!1,context:{field:`output.ppt.${e}`,providedValue:t,suggestions:n}})}static invalidPPTOutputPath(e,t){return new Pe({code:je.INVALID_PPT_OUTPUT_PATH,message:`Invalid outputPath '${e}': ${t}`,category:"validation",severity:"medium",retriable:!1,context:{field:"output.ppt.outputPath",providedValue:e,suggestions:["Provide a valid file path string","Example: './presentations/my-deck.pptx'","Omit to use auto-generated path"]}})}static invalidPPTMode(){return new Pe({code:je.INVALID_PPT_MODE,message:"Presentation generation requires output.mode to be 'ppt'",category:"validation",severity:"medium",retriable:!1,context:{field:"output.mode",suggestions:["Set output: { mode: 'ppt' } for presentation generation"]}})}static invalidPPTPrompt(e){return new Pe({code:je.INVALID_PPT_PROMPT,message:`Invalid PPT prompt: ${e}`,category:"validation",severity:"medium",retriable:!1,context:{field:"input.text",suggestions:["Provide a non-empty text prompt","Keep the prompt under 1000 characters","Focus on key topics and structure for the presentation"]}})}static invalidPPTLogoPath(e,t){return new Pe({code:je.INVALID_PPT_LOGO_PATH,message:`Invalid logoPath '${e}': ${t}`,category:"validation",severity:"medium",retriable:!1,context:{field:"output.ppt.logoPath",providedValue:e,suggestions:["Provide a valid file path string","Example: './assets/logo.png'","Omit to skip logo inclusion"]}})}static invalidPPTProvider(e){return new Pe({code:je.INVALID_PPT_PROVIDER,message:`Invalid provider '${e}' for PPT generation. Supported providers: vertex, openai, azure, anthropic, google-ai, bedrock`,category:"validation",severity:"medium",retriable:!1,context:{field:"provider",providedValue:e,suggestions:["Use 'vertex' for Google Vertex AI (Gemini)","Use 'openai' for OpenAI GPT models","Use 'azure' for Azure OpenAI","Use 'anthropic' for Anthropic Claude models","Use 'google-ai' for Google AI Studio (Gemini)","Use 'bedrock' for AWS Bedrock (Claude, Llama, Nova, etc.)"]}})}static scorerNotFound(e,t){return new Pe({code:je.SCORER_NOT_FOUND,message:`Scorer '${e}' not found. Use neurolink.getAvailableScorers() to see available scorers.`,category:"validation",severity:"medium",retriable:!1,context:{scorerId:e,availableScorers:t}})}static evaluationValidationFailed(e,t){return new Pe({code:je.EVALUATION_VALIDATION_FAILED,message:`Invalid input for scorer '${e}': ${t.join(", ")}`,category:"validation",severity:"medium",retriable:!1,context:{scorerId:e,validationErrors:t}})}static evaluationTimeout(e,t){return new Pe({code:je.EVALUATION_TIMEOUT,message:`Evaluation ${e} timed out after ${t}ms`,category:"timeout",severity:"high",retriable:!0,context:{operation:e,timeoutMs:t}})}static evaluationExecutionFailed(e,t){return new Pe({code:je.EVALUATION_EXECUTION_FAILED,message:`Evaluation ${e} failed: ${t.message}`,category:"execution",severity:"high",retriable:!1,originalError:t})}static proxyWorkerLifecycle(e,t){return new Pe({code:je.PROXY_WORKER_LIFECYCLE_FAILED,message:e,category:"system",severity:"high",retriable:!1,context:t||{}})}static fileProcessingFailed(e,t){return new Pe({code:je.FILE_PROCESSING_FAILED,message:`Failed to process file "${e}": ${t.message}`,category:"execution",severity:"high",retriable:!1,context:{filename:e},originalError:t})}static csvProcessingFailed(e,t){return new Pe({code:je.CSV_PROCESSING_FAILED,message:`Failed to process CSV file "${e}": ${t.message}`,category:"execution",severity:"high",retriable:!1,context:{filename:e},originalError:t})}},w1=class{constructor(e=5,t=6e4,r="tool-execution"){this.failureThreshold=e,this.resetTimeoutMs=t,this.name=r}failureThreshold;resetTimeoutMs;failures=0;lastFailureTime=0;state="closed";name;async execute(e){if(this.state==="open"){const t=this.resetTimeoutMs-(Date.now()-this.lastFailureTime);if(t>0)throw new km({breakerName:this.name,retryAfter:new Date(this.lastFailureTime+this.resetTimeoutMs),retryAfterMs:t,breakerState:"open",failureCount:this.failures});this.state="half-open"}try{const t=await e();return this.onSuccess(),t}catch(t){throw this.onFailure(),t}}onSuccess(){this.failures=0,this.state="closed"}onFailure(){this.failures++,this.lastFailureTime=Date.now(),this.failures>=this.failureThreshold&&(this.state="open")}getState(){return this.state}getFailureCount(){return this.failures}}}}),Nye={};se(Nye,{APICallError:()=>mb,InvalidToolInputError:()=>cz,NoObjectGeneratedError:()=>Lye,NoOutputGeneratedError:()=>au,NoSuchToolError:()=>az});var iz,Qy,e0,au,Lye,az,cz,mb,Fm=S({"src/lib/utils/generationErrors.ts"(){"use strict";iz=e=>Symbol.for(`vercel.ai.error.${e}`),Qy=(e,t)=>{const r=iz(t);return e!==null&&typeof e=="object"&&r in e&&e[r]===!0},e0=class extends Error{cause;constructor(e,t,r){super(t),this.name=e,r!==void 0&&(this.cause=r),Object.defineProperty(this,iz(e),{value:!0,enumerable:!1,writable:!1})}},au=class extends e0{constructor(e={}){super("AI_NoOutputGeneratedError",e.message??"No output generated.",e.cause)}static isInstance(e){return Qy(e,"AI_NoOutputGeneratedError")}},Lye=class extends e0{text;finishReason;constructor(e={}){super("AI_NoObjectGeneratedError",e.message??"No object generated.",e.cause),this.text=e.text,this.finishReason=e.finishReason}static isInstance(e){return Qy(e,"AI_NoObjectGeneratedError")}},az=class extends e0{toolName;constructor(e={}){super("AI_NoSuchToolError",e.message??`Model tried to call unavailable tool '${e.toolName??"unknown"}'.`),this.toolName=e.toolName}static isInstance(e){return Qy(e,"AI_NoSuchToolError")}},cz=class extends e0{toolName;constructor(e={}){super("AI_InvalidToolInputError",e.message??`Invalid input for tool '${e.toolName??"unknown"}'.`,e.cause),this.toolName=e.toolName}static isInstance(e){return Qy(e,"AI_InvalidToolInputError")}},mb=class extends e0{url;statusCode;responseBody;responseHeaders;isRetryable;requestBodyValues;constructor(e={}){super("AI_APICallError",e.message??"API call error.",e.cause),this.url=e.url,this.statusCode=e.statusCode,this.responseBody=e.responseBody,this.responseHeaders=e.responseHeaders,this.isRetryable=e.isRetryable??(e.statusCode!==null&&e.statusCode!==void 0&&(e.statusCode===408||e.statusCode===409||e.statusCode===429||e.statusCode>=500)),this.requestBodyValues=e.requestBodyValues}static isInstance(e){return Qy(e,"AI_APICallError")}}}});function lz(e,t){if("get"in e&&typeof e.get=="function")return e.get(t);const r=t.toLowerCase();for(const[n,o]of Object.entries(e))if(n.toLowerCase()===r)return o;return null}function pb(e){const t=lz(e,"Retry-After");if(t){const n=parseInt(t,10);if(!Number.isNaN(n))return Math.max(0,n*1e3);const o=new Date(t);if(!Number.isNaN(o.getTime()))return Math.max(0,o.getTime()-Date.now())}const r=lz(e,"X-RateLimit-Reset");if(r){const n=parseInt(r,10);if(!Number.isNaN(n)){const o=n>1e12?n:n*1e3;return Math.max(0,o-Date.now())}}if(lz(e,"X-RateLimit-Remaining")==="0")return 1e3}var uz=S({"src/lib/utils/retryAfter.ts"(){"use strict"}});function hb(e){if(!e||typeof e!="object")return;const t=e;if(typeof t.statusCode=="number")return t.statusCode;if(typeof t.status=="number")return t.status;const r=t.$metadata;if(typeof r=="object"&&r!==null){const n=r.httpStatusCode;if(typeof n=="number")return n}}function Fye(e){if(!e||typeof e!="object")return;const t=e;if(typeof t.retryAfterMs=="number"&&Number.isFinite(t.retryAfterMs))return t.retryAfterMs;for(const r of[t.headers,t.responseHeaders])if(r&&typeof r=="object"){const n=pb(r);if(n!==void 0)return n}}function $ye(e){if(typeof e!="object"||e===null)return!1;const t=e;if(t.type==="insufficient_quota")return!0;if(typeof t.responseBody=="string")try{return JSON.parse(t.responseBody)?.error?.type==="insufficient_quota"}catch{return!1}return!1}function Uye(e,t=0){if(t>8||e===null||typeof e!="object")return cr(e);if(cr(e))return!0;const{cause:r}=e;return r===void 0||r===e?!1:Uye(r,t+1)}function kyr(e){if(Uye(e)||$ye(e))return!1;if(mb.isInstance(e))return e.isRetryable;if(e instanceof Pe)return e.retriable;const t=hb(e);return t!==void 0?t===429||t>=500:!1}function Bye(e){return mb.isInstance(e)?e.statusCode:hb(e)}function Ayr(e){if(mb.isInstance(e)&&e.responseHeaders){const t=pb(e.responseHeaders);if(t!==void 0)return t}return e instanceof Pe&&e.retryAfterMs!==void 0&&Number.isFinite(e.retryAfterMs)?e.retryAfterMs:Fye(e)}async function t0(e,t,r,n=Gye){for(let o=0;o<=E1;o++)try{const s=await e();return t?.setAttribute("gen_ai.provider.total_attempts",o+1),o>0&&p.info(`[providerRetry] ${r} succeeded after ${o+1} attempts`),s}catch(s){const i=kyr(s),a=Bye(s),c=s instanceof Error?s.message:String(s);if(!i||o===E1)throw t?.setAttribute("gen_ai.provider.total_attempts",o+1),o>0&&t?.setAttribute("gen_ai.provider.retries_exhausted",!0),p.warn(`[providerRetry] ${r} failed (non-retryable or retries exhausted)`,{attempt:o+1,retryable:i,statusCode:a,error:c}),s;const l=Ayr(s);if(l!==void 0&&l>dz){t?.setAttribute("gen_ai.provider.total_attempts",o+1),t?.addEvent("gen_ai.provider.retry_suppressed",{"retry.after_ms":l,...a!==void 0&&{"retry.status_code":a}});try{Object.assign(s,{isRetryable:!1,retryAfterMs:l})}catch{}throw p.warn(`[providerRetry] ${r} not retrying \u2014 server requested a ${Math.round(l/1e3)}s wait (cap ${dz/1e3}s); surfacing for fallback`,{attempt:o+1,retryAfterMs:l,statusCode:a}),s}const u=(l===void 0?void 0:Math.max(0,l))??Math.max(zye*Math.pow(2,o),qye);t?.addEvent("gen_ai.provider.retry",{"retry.attempt":o+1,"retry.delay_ms":u,...a!==void 0&&{"retry.status_code":a},"retry.error":c.slice(0,256)}),p.warn(`[providerRetry] ${r} retrying after ${a||"unknown"} error`,{attempt:o+1,maxRetries:E1,delayMs:u,statusCode:a,error:c}),await n(u)}throw new Error(`[providerRetry] ${r} exhausted all retries`)}var E1,zye,qye,dz,Gye,ad=S({"src/lib/utils/providerRetry.ts"(){"use strict";Xt(),Ze(),z(),Fm(),uz(),E1=2,zye=1e3,qye=1e4,dz=6e4,Gye=e=>new Promise(t=>setTimeout(t,e))}}),mz,jye=S({"src/lib/constants/networkErrorCodes.ts"(){"use strict";mz=new Set(["ECONNRESET","ETIMEDOUT","ECONNREFUSED","EPIPE","UND_ERR_SOCKET","UND_ERR_CONNECT_TIMEOUT"])}}),fb={};se(fb,{Agent:()=>Xye,AsyncLocalStorage:()=>d0e,Buffer:()=>lTe,Channel:()=>Zve,DatabaseSync:()=>cTe,Duplex:()=>p0e,EventEmitter:()=>u0e,Http2ServerRequest:()=>hTe,Http2ServerResponse:()=>fTe,Interface:()=>aTe,MIMEType:()=>ETe,PassThrough:()=>h0e,PerformanceObserver:()=>Jve,Readable:()=>hz,ReadableStream:()=>f0e,Resolver:()=>Wve,STATUS_CODES:()=>gve,TextDecoder:()=>yz,TextEncoder:()=>yb,Transform:()=>m0e,URL:()=>Ove,URLSearchParams:()=>Nve,Worker:()=>rTe,Writable:()=>fz,access:()=>K0e,appendFile:()=>k0e,appendFileSync:()=>Kye,arch:()=>mve,arrayBuffer:()=>gTe,availableParallelism:()=>S0e,basename:()=>n0e,builtinModules:()=>Rve,callbackify:()=>qve,channel:()=>Xve,chmod:()=>b0e,chmodSync:()=>E0e,clearInterval:()=>wTe,clearTimeout:()=>vTe,closeSync:()=>R0e,connect:()=>yve,constants:()=>uTe,copyFileSync:()=>x0e,cpSync:()=>Jye,cpus:()=>cve,createConnection:()=>vve,createGunzip:()=>Cve,createGzip:()=>kve,createHash:()=>cu,createHmac:()=>pz,createInterface:()=>iTe,createReadStream:()=>z0e,createRequire:()=>Ive,createServer:()=>Yye,createWriteStream:()=>B0e,debug:()=>Bve,debuglog:()=>gz,default:()=>Hye,deflateSync:()=>wve,deprecate:()=>zve,deserialize:()=>tTe,dirname:()=>r0e,exec:()=>eve,execFile:()=>rve,execFileSync:()=>nve,execSync:()=>tve,existsSync:()=>v0e,extname:()=>o0e,fileURLToPath:()=>Lve,finished:()=>y0e,format:()=>Dve,freemem:()=>lve,fstatSync:()=>M0e,get:()=>fve,gunzip:()=>_ve,gunzipSync:()=>Eve,gzip:()=>Sve,gzipSync:()=>bve,hasSubscribers:()=>Qve,homedir:()=>sve,hostname:()=>ave,inflateSync:()=>Tve,inherits:()=>$ve,inspect:()=>gb,isAbsolute:()=>i0e,isBuiltin:()=>Mve,isDeepStrictEqual:()=>Gve,isIP:()=>pTe,isIPv4:()=>mTe,isIPv6:()=>dTe,isMainThread:()=>nTe,join:()=>e0e,loadavg:()=>_0e,lookup:()=>Vve,lstatSync:()=>O0e,mkdir:()=>j0e,mkdirSync:()=>P0e,monitorEventLoopDelay:()=>Yve,normalize:()=>l0e,ok:()=>Ave,open:()=>X0e,openSync:()=>I0e,parentPort:()=>oTe,parse:()=>Pve,pathToFileURL:()=>Fve,performance:()=>Kve,pipeline:()=>g0e,platform:()=>ove,posix:()=>c0e,promises:()=>Vye,promisify:()=>Uve,randomBytes:()=>Sh,randomUUID:()=>Xe,readFile:()=>q0e,readFileSync:()=>T0e,readdir:()=>V0e,readdirSync:()=>N0e,realpath:()=>Z0e,realpathSync:()=>A0e,relative:()=>s0e,release:()=>pve,rename:()=>J0e,renameSync:()=>F0e,request:()=>hve,resolve:()=>t0e,rm:()=>Y0e,rmSync:()=>U0e,rmdirSync:()=>$0e,sep:()=>a0e,serialize:()=>eTe,setImmediate:()=>C0e,setInterval:()=>TTe,setTimeout:()=>yTe,spawn:()=>Q0e,stat:()=>H0e,statSync:()=>D0e,strict:()=>xve,tmpdir:()=>ive,toUSVString:()=>jve,totalmem:()=>uve,type:()=>dve,types:()=>Hve,unlink:()=>W0e,unlinkSync:()=>L0e,validateHeaderName:()=>Zye,validateHeaderValue:()=>Qye,webcrypto:()=>Wye,workerData:()=>sTe,writeFile:()=>G0e,writeFileSync:()=>w0e});var zn,tn,Hye,Vye,cu,pz,Sh,Xe,Wye,Kye,Jye,Yye,Xye,Zye,Qye,e0e,t0e,r0e,n0e,o0e,s0e,i0e,a0e,c0e,l0e,u0e,d0e,hz,fz,m0e,p0e,h0e,f0e,g0e,y0e,v0e,T0e,w0e,E0e,b0e,S0e,_0e,C0e,k0e,A0e,x0e,I0e,R0e,M0e,P0e,D0e,O0e,N0e,L0e,F0e,$0e,U0e,B0e,z0e,q0e,G0e,j0e,H0e,V0e,W0e,K0e,J0e,Y0e,X0e,Z0e,Q0e,eve,tve,rve,nve,ove,sve,ive,ave,cve,lve,uve,dve,mve,pve,hve,fve,gve,yve,vve,Tve,wve,Eve,bve,Sve,_ve,Cve,kve,Ave,xve,Ive,Rve,Mve,Pve,Dve,Ove,Nve,Lve,Fve,$ve,Uve,gz,Bve,gb,zve,qve,Gve,jve,Hve,yz,yb,Vve,Wve,Kve,Jve,Yve,Xve,Zve,Qve,eTe,tTe,rTe,nTe,oTe,sTe,iTe,aTe,cTe,lTe,uTe,dTe,mTe,pTe,hTe,fTe,gTe,vz,yTe,vTe,TTe,wTe,ETe,Ot=S({"node-stub:crypto"(){zn=()=>{},tn=async()=>{},Hye={},Vye={readFile:tn,writeFile:tn,mkdir:tn,stat:tn,readdir:tn,unlink:tn,access:tn,rm:tn,rename:tn},cu=e=>{const t=[];return{update(r){return t.push(typeof r=="string"?new yb().encode(r):r),this},digest(r){let n=0;for(const s of t)for(let i=0;i<s.length;i++)n=(n<<5)-n+s[i]|0;const o=(n>>>0).toString(16).padStart(8,"0");return r==="hex"?o:r==="base64"?btoa(o):o}}},pz=(e,t)=>cu(e),Sh=e=>new Uint8Array(e||32),Xe=()=>globalThis.crypto?.randomUUID?.()||Math.random().toString(36),Wye=globalThis.crypto,Kye=()=>{throw new Error("[NeuroLink:browser] fs.appendFileSync is not supported in browser runtime \u2014 use server-side execution")},Jye=()=>{throw new Error("[NeuroLink:browser] fs.cpSync is not supported in browser runtime \u2014 use server-side execution")},Yye=()=>({listen:zn,close:zn,on:zn}),Xye=class{constructor(){throw new Error("[NeuroLink:browser] Node HTTP agents require a server runtime")}},Zye=zn,Qye=zn,e0e=(...e)=>e.join("/"),t0e=(...e)=>e.join("/"),r0e=e=>e||"",n0e=e=>e?.split?.("/")?.pop?.()||"",o0e=e=>{const t=e?.match?.(/\.[^.]+$/);return t?t[0]:""},s0e=(e,t)=>t||"",i0e=()=>!1,a0e="/",c0e={normalize:e=>e,join:(...e)=>e.join("/"),resolve:(...e)=>e.join("/"),sep:"/"},l0e=e=>e,u0e=class{constructor(){this._ev=new Map}_list(t){let r=this._ev.get(t);return r||(r=[],this._ev.set(t,r)),r}on(t,r){return this._list(t).push(r),this}addListener(t,r){return this.on(t,r)}prependListener(t,r){return this._list(t).unshift(r),this}once(t,r){const n=(...o)=>{this.off(t,n),r(...o)};return n.listener=r,this.on(t,n)}prependOnceListener(t,r){const n=(...o)=>{this.off(t,n),r(...o)};return n.listener=r,this.prependListener(t,n)}off(t,r){const n=this._ev.get(t);if(n){const o=n.findIndex(s=>s===r||s.listener===r);o>=0&&n.splice(o,1)}return this}removeListener(t,r){return this.off(t,r)}removeAllListeners(t){return t===void 0?this._ev.clear():this._ev.delete(t),this}emit(t,...r){const n=this._ev.get(t);if(!n||n.length===0){if(t==="error")throw r[0]instanceof Error?r[0]:new Error("Unhandled error.");return!1}for(const o of[...n])o.apply(this,r);return!0}listenerCount(t){return(this._ev.get(t)||[]).length}listeners(t){return[...this._ev.get(t)||[]]}rawListeners(t){return this.listeners(t)}eventNames(){return[...this._ev.keys()]}setMaxListeners(){return this}getMaxListeners(){return 10}},d0e=class{getStore(){}run(e,t,...r){return t(...r)}enterWith(){}disable(){}},hz=class{pipe(){return this}on(){return this}read(){return null}push(){}destroy(){}},fz=class{write(){return!0}end(){}on(){return this}destroy(){}},m0e=class{push(){}on(){return this}},p0e=class{on(){return this}},h0e=class{pipe(){return this}on(){return this}},f0e=globalThis.ReadableStream||class{},g0e=zn,y0e=zn,v0e=()=>!1,T0e=()=>"",w0e=zn,E0e=zn,b0e=tn,S0e=()=>1,_0e=()=>[0,0,0],C0e=tn,k0e=tn,A0e=e=>e,x0e=zn,I0e=()=>0,R0e=zn,M0e=()=>({}),P0e=zn,D0e=()=>({}),O0e=()=>({isSymbolicLink:()=>!1}),N0e=()=>[],L0e=zn,F0e=zn,$0e=zn,U0e=zn,B0e=()=>new fz,z0e=()=>new hz,q0e=tn,G0e=tn,j0e=tn,H0e=tn,V0e=tn,W0e=tn,K0e=tn,J0e=tn,Y0e=tn,X0e=async()=>({stat:tn,readFile:tn,close:tn,read:tn,write:tn}),Z0e=async e=>e,Q0e=()=>({on:zn,stdout:{on:zn},stderr:{on:zn},kill:zn}),eve=(e,t)=>t?.(null,"",""),tve=()=>"",rve=(e,t,r)=>{typeof t=="function"?t(null,"",""):r?.(null,"","")},nve=()=>"",ove="browser",sve=()=>"/",ive=()=>"/tmp",ave=()=>"browser",cve=()=>[{}],lve=()=>0,uve=()=>0,dve=()=>"Browser",mve=()=>"wasm",pve=()=>"0",hve=()=>({}),fve=()=>({}),gve={100:"Continue",101:"Switching Protocols",200:"OK",201:"Created",202:"Accepted",204:"No Content",206:"Partial Content",301:"Moved Permanently",302:"Found",304:"Not Modified",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",422:"Unprocessable Entity",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported"},yve=()=>({}),vve=()=>({}),Tve=()=>new Uint8Array,wve=()=>new Uint8Array,Eve=()=>new Uint8Array,bve=()=>new Uint8Array,Sve=(e,t)=>t?.(null,e),_ve=(e,t)=>t?.(null,e),Cve=()=>({}),kve=()=>({}),Ave=zn,xve={},Ive=()=>()=>({}),Rve=[],Mve=()=>!1,Pve=e=>({pathname:e||"",hostname:"",protocol:"",search:"",hash:""}),Dve=()=>"",Ove=globalThis.URL,Nve=globalThis.URLSearchParams,Lve=e=>typeof e=="string"?e.replace("file://",""):e,Fve=e=>new globalThis.URL("file://"+e),$ve=(e,t)=>{t&&(e.super_=t,Object.setPrototypeOf(e.prototype,t.prototype))},Uve=e=>(...t)=>new Promise((r,n)=>e(...t,(o,s)=>o?n(o):r(s))),gz=e=>{const t=(...r)=>{};return t.enabled=!1,t},Bve=gz,gb=e=>{try{return JSON.stringify(e,null,2)}catch{return String(e)}},gb.custom=Symbol.for("nodejs.util.inspect.custom"),gb.colors={},gb.styles={},zve=e=>e,qve=e=>(...t)=>{const r=t.pop();e(...t).then(n=>r(null,n)).catch(r)},Gve=(e,t)=>JSON.stringify(e)===JSON.stringify(t),jve=e=>String(e),Hve={isPromise:e=>e instanceof Promise,isDate:e=>e instanceof Date,isRegExp:e=>e instanceof RegExp,isNativeError:e=>e instanceof Error,isArrayBuffer:e=>e instanceof ArrayBuffer,isTypedArray:e=>ArrayBuffer.isView(e),isUint8Array:e=>e instanceof Uint8Array,isProxy:()=>!1},yz=globalThis.TextDecoder,yb=globalThis.TextEncoder,Vve=(e,t)=>t?.(null,"127.0.0.1",4),Wve=class{},Kve=globalThis.performance||{now:()=>Date.now()},Jve=class{observe(){}disconnect(){}},Yve=()=>({enable:zn,disable:zn,percentile:()=>0}),Xve=()=>({}),Zve=class{},Qve=()=>!1,eTe=()=>new Uint8Array,tTe=zn,rTe=class{},nTe=!0,oTe=null,sTe=null,iTe=()=>({}),aTe=class{},cTe=class{},lTe=globalThis.Buffer||class extends Uint8Array{static from(t,r){if(typeof t=="string"){const n=(r||"utf8").toLowerCase();if(n==="base64"){const o=atob(t),s=new Uint8Array(o.length);for(let i=0;i<o.length;i++)s[i]=o.charCodeAt(i);return s}if(n==="hex"){const o=new Uint8Array(t.length/2);for(let s=0;s<t.length;s+=2)o[s/2]=parseInt(t.substr(s,2),16);return o}return new yb().encode(t)}return new Uint8Array(t)}static alloc(t){return new Uint8Array(t)}static isBuffer(t){return t instanceof Uint8Array}static concat(t){const r=t.reduce((s,i)=>s+i.length,0),n=new Uint8Array(r);let o=0;for(const s of t)n.set(s,o),o+=s.length;return n}static byteLength(t,r){return r==="base64"?Math.ceil(t.length*3/4):new yb().encode(t).length}toString(t){const r=(t||"utf8").toLowerCase();if(r==="hex")return Array.from(new Uint8Array(this.buffer,this.byteOffset,this.byteLength)).map(n=>n.toString(16).padStart(2,"0")).join("");if(r==="base64"){let n="";for(let o=0;o<this.length;o++)n+=String.fromCharCode(this[o]);return btoa(n)}return new yz().decode(this)}},uTe={F_OK:0,R_OK:4,W_OK:2,X_OK:1},dTe=()=>!1,mTe=()=>!1,pTe=()=>0,hTe=class{},fTe=class{},gTe=async()=>new ArrayBuffer(0),vz=e=>({[Symbol.toPrimitive](){return e},ref(){return this},unref(){return this},hasRef(){return!1},refresh(){return this},close(){}}),yTe=(...e)=>vz(globalThis.setTimeout(...e)),vTe=globalThis.clearTimeout,TTe=(...e)=>vz(globalThis.setInterval(...e)),wTe=globalThis.clearInterval,ETe=class{constructor(e){this.type=e}toString(){return this.type}}}}),$m={};se($m,{Agent:()=>RTe,AsyncLocalStorage:()=>NTe,Buffer:()=>DEe,Channel:()=>bEe,DatabaseSync:()=>PEe,Duplex:()=>FTe,EventEmitter:()=>OTe,Http2ServerRequest:()=>$Ee,Http2ServerResponse:()=>UEe,Interface:()=>MEe,MIMEType:()=>HEe,PassThrough:()=>$Te,PerformanceObserver:()=>TEe,Readable:()=>_z,ReadableStream:()=>UTe,Resolver:()=>yEe,STATUS_CODES:()=>Bwe,TextDecoder:()=>Az,TextEncoder:()=>Tb,Transform:()=>LTe,URL:()=>oEe,URLSearchParams:()=>sEe,Worker:()=>kEe,Writable:()=>Cz,access:()=>vwe,appendFile:()=>YTe,appendFileSync:()=>ATe,arch:()=>Lwe,arrayBuffer:()=>BEe,availableParallelism:()=>WTe,basename:()=>Si,builtinModules:()=>eEe,callbackify:()=>mEe,channel:()=>EEe,chmod:()=>VTe,chmodSync:()=>HTe,clearInterval:()=>jEe,clearTimeout:()=>qEe,closeSync:()=>ewe,connect:()=>zwe,constants:()=>OEe,copyFileSync:()=>ZTe,cpSync:()=>xTe,cpus:()=>Pwe,createConnection:()=>qwe,createGunzip:()=>Jwe,createGzip:()=>Ywe,createHash:()=>Tz,createHmac:()=>STe,createInterface:()=>REe,createReadStream:()=>dwe,createRequire:()=>Qwe,createServer:()=>ITe,createWriteStream:()=>uwe,debug:()=>uEe,debuglog:()=>kz,default:()=>Um,deflateSync:()=>jwe,deprecate:()=>dEe,deserialize:()=>CEe,dirname:()=>wz,exec:()=>_we,execFile:()=>kwe,execFileSync:()=>Awe,execSync:()=>Cwe,existsSync:()=>qTe,extname:()=>ws,fileURLToPath:()=>iEe,finished:()=>zTe,format:()=>nEe,freemem:()=>Dwe,fstatSync:()=>twe,get:()=>Uwe,gunzip:()=>Kwe,gunzipSync:()=>Hwe,gzip:()=>Wwe,gzipSync:()=>Vwe,hasSubscribers:()=>SEe,homedir:()=>Iwe,hostname:()=>Mwe,inflateSync:()=>Gwe,inherits:()=>cEe,inspect:()=>vb,isAbsolute:()=>b1,isBuiltin:()=>tEe,isDeepStrictEqual:()=>pEe,isIP:()=>FEe,isIPv4:()=>LEe,isIPv6:()=>NEe,isMainThread:()=>AEe,join:()=>At,loadavg:()=>KTe,lookup:()=>gEe,lstatSync:()=>owe,mkdir:()=>hwe,mkdirSync:()=>rwe,monitorEventLoopDelay:()=>wEe,normalize:()=>DTe,ok:()=>Xwe,open:()=>Ewe,openSync:()=>QTe,parentPort:()=>xEe,parse:()=>rEe,pathToFileURL:()=>aEe,performance:()=>vEe,pipeline:()=>BTe,platform:()=>xwe,posix:()=>Sz,promises:()=>bTe,promisify:()=>lEe,randomBytes:()=>_Te,randomUUID:()=>CTe,readFile:()=>mwe,readFileSync:()=>GTe,readdir:()=>gwe,readdirSync:()=>swe,realpath:()=>bwe,realpathSync:()=>XTe,relative:()=>Ez,release:()=>Fwe,rename:()=>Twe,renameSync:()=>awe,request:()=>$we,resolve:()=>Bm,rm:()=>wwe,rmSync:()=>lwe,rmdirSync:()=>cwe,sep:()=>bz,serialize:()=>_Ee,setImmediate:()=>JTe,setInterval:()=>GEe,setTimeout:()=>zEe,spawn:()=>Swe,stat:()=>fwe,statSync:()=>nwe,strict:()=>Zwe,tmpdir:()=>Rwe,toUSVString:()=>hEe,totalmem:()=>Owe,type:()=>Nwe,types:()=>fEe,unlink:()=>ywe,unlinkSync:()=>iwe,validateHeaderName:()=>MTe,validateHeaderValue:()=>PTe,webcrypto:()=>kTe,workerData:()=>IEe,writeFile:()=>pwe,writeFileSync:()=>jTe});var qn,rn,Um,bTe,Tz,STe,_Te,CTe,kTe,ATe,xTe,ITe,RTe,MTe,PTe,At,Bm,wz,Si,ws,Ez,b1,bz,Sz,DTe,OTe,NTe,_z,Cz,LTe,FTe,$Te,UTe,BTe,zTe,qTe,GTe,jTe,HTe,VTe,WTe,KTe,JTe,YTe,XTe,ZTe,QTe,ewe,twe,rwe,nwe,owe,swe,iwe,awe,cwe,lwe,uwe,dwe,mwe,pwe,hwe,fwe,gwe,ywe,vwe,Twe,wwe,Ewe,bwe,Swe,_we,Cwe,kwe,Awe,xwe,Iwe,Rwe,Mwe,Pwe,Dwe,Owe,Nwe,Lwe,Fwe,$we,Uwe,Bwe,zwe,qwe,Gwe,jwe,Hwe,Vwe,Wwe,Kwe,Jwe,Ywe,Xwe,Zwe,Qwe,eEe,tEe,rEe,nEe,oEe,sEe,iEe,aEe,cEe,lEe,kz,uEe,vb,dEe,mEe,pEe,hEe,fEe,Az,Tb,gEe,yEe,vEe,TEe,wEe,EEe,bEe,SEe,_Ee,CEe,kEe,AEe,xEe,IEe,REe,MEe,PEe,DEe,OEe,NEe,LEe,FEe,$Ee,UEe,BEe,xz,zEe,qEe,GEe,jEe,HEe,hr=S({"node-stub:path"(){qn=()=>{},rn=async()=>{},Um={},bTe={readFile:rn,writeFile:rn,mkdir:rn,stat:rn,readdir:rn,unlink:rn,access:rn,rm:rn,rename:rn},Tz=e=>{const t=[];return{update(r){return t.push(typeof r=="string"?new Tb().encode(r):r),this},digest(r){let n=0;for(const s of t)for(let i=0;i<s.length;i++)n=(n<<5)-n+s[i]|0;const o=(n>>>0).toString(16).padStart(8,"0");return r==="hex"?o:r==="base64"?btoa(o):o}}},STe=(e,t)=>Tz(e),_Te=e=>new Uint8Array(e||32),CTe=()=>globalThis.crypto?.randomUUID?.()||Math.random().toString(36),kTe=globalThis.crypto,ATe=()=>{throw new Error("[NeuroLink:browser] fs.appendFileSync is not supported in browser runtime \u2014 use server-side execution")},xTe=()=>{throw new Error("[NeuroLink:browser] fs.cpSync is not supported in browser runtime \u2014 use server-side execution")},ITe=()=>({listen:qn,close:qn,on:qn}),RTe=class{constructor(){throw new Error("[NeuroLink:browser] Node HTTP agents require a server runtime")}},MTe=qn,PTe=qn,At=(...e)=>e.join("/"),Bm=(...e)=>e.join("/"),wz=e=>e||"",Si=e=>e?.split?.("/")?.pop?.()||"",ws=e=>{const t=e?.match?.(/\.[^.]+$/);return t?t[0]:""},Ez=(e,t)=>t||"",b1=()=>!1,bz="/",Sz={normalize:e=>e,join:(...e)=>e.join("/"),resolve:(...e)=>e.join("/"),sep:"/"},DTe=e=>e,OTe=class{constructor(){this._ev=new Map}_list(t){let r=this._ev.get(t);return r||(r=[],this._ev.set(t,r)),r}on(t,r){return this._list(t).push(r),this}addListener(t,r){return this.on(t,r)}prependListener(t,r){return this._list(t).unshift(r),this}once(t,r){const n=(...o)=>{this.off(t,n),r(...o)};return n.listener=r,this.on(t,n)}prependOnceListener(t,r){const n=(...o)=>{this.off(t,n),r(...o)};return n.listener=r,this.prependListener(t,n)}off(t,r){const n=this._ev.get(t);if(n){const o=n.findIndex(s=>s===r||s.listener===r);o>=0&&n.splice(o,1)}return this}removeListener(t,r){return this.off(t,r)}removeAllListeners(t){return t===void 0?this._ev.clear():this._ev.delete(t),this}emit(t,...r){const n=this._ev.get(t);if(!n||n.length===0){if(t==="error")throw r[0]instanceof Error?r[0]:new Error("Unhandled error.");return!1}for(const o of[...n])o.apply(this,r);return!0}listenerCount(t){return(this._ev.get(t)||[]).length}listeners(t){return[...this._ev.get(t)||[]]}rawListeners(t){return this.listeners(t)}eventNames(){return[...this._ev.keys()]}setMaxListeners(){return this}getMaxListeners(){return 10}},NTe=class{getStore(){}run(e,t,...r){return t(...r)}enterWith(){}disable(){}},_z=class{pipe(){return this}on(){return this}read(){return null}push(){}destroy(){}},Cz=class{write(){return!0}end(){}on(){return this}destroy(){}},LTe=class{push(){}on(){return this}},FTe=class{on(){return this}},$Te=class{pipe(){return this}on(){return this}},UTe=globalThis.ReadableStream||class{},BTe=qn,zTe=qn,qTe=()=>!1,GTe=()=>"",jTe=qn,HTe=qn,VTe=rn,WTe=()=>1,KTe=()=>[0,0,0],JTe=rn,YTe=rn,XTe=e=>e,ZTe=qn,QTe=()=>0,ewe=qn,twe=()=>({}),rwe=qn,nwe=()=>({}),owe=()=>({isSymbolicLink:()=>!1}),swe=()=>[],iwe=qn,awe=qn,cwe=qn,lwe=qn,uwe=()=>new Cz,dwe=()=>new _z,mwe=rn,pwe=rn,hwe=rn,fwe=rn,gwe=rn,ywe=rn,vwe=rn,Twe=rn,wwe=rn,Ewe=async()=>({stat:rn,readFile:rn,close:rn,read:rn,write:rn}),bwe=async e=>e,Swe=()=>({on:qn,stdout:{on:qn},stderr:{on:qn},kill:qn}),_we=(e,t)=>t?.(null,"",""),Cwe=()=>"",kwe=(e,t,r)=>{typeof t=="function"?t(null,"",""):r?.(null,"","")},Awe=()=>"",xwe="browser",Iwe=()=>"/",Rwe=()=>"/tmp",Mwe=()=>"browser",Pwe=()=>[{}],Dwe=()=>0,Owe=()=>0,Nwe=()=>"Browser",Lwe=()=>"wasm",Fwe=()=>"0",$we=()=>({}),Uwe=()=>({}),Bwe={100:"Continue",101:"Switching Protocols",200:"OK",201:"Created",202:"Accepted",204:"No Content",206:"Partial Content",301:"Moved Permanently",302:"Found",304:"Not Modified",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",422:"Unprocessable Entity",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported"},zwe=()=>({}),qwe=()=>({}),Gwe=()=>new Uint8Array,jwe=()=>new Uint8Array,Hwe=()=>new Uint8Array,Vwe=()=>new Uint8Array,Wwe=(e,t)=>t?.(null,e),Kwe=(e,t)=>t?.(null,e),Jwe=()=>({}),Ywe=()=>({}),Xwe=qn,Zwe={},Qwe=()=>()=>({}),eEe=[],tEe=()=>!1,rEe=e=>({pathname:e||"",hostname:"",protocol:"",search:"",hash:""}),nEe=()=>"",oEe=globalThis.URL,sEe=globalThis.URLSearchParams,iEe=e=>typeof e=="string"?e.replace("file://",""):e,aEe=e=>new globalThis.URL("file://"+e),cEe=(e,t)=>{t&&(e.super_=t,Object.setPrototypeOf(e.prototype,t.prototype))},lEe=e=>(...t)=>new Promise((r,n)=>e(...t,(o,s)=>o?n(o):r(s))),kz=e=>{const t=(...r)=>{};return t.enabled=!1,t},uEe=kz,vb=e=>{try{return JSON.stringify(e,null,2)}catch{return String(e)}},vb.custom=Symbol.for("nodejs.util.inspect.custom"),vb.colors={},vb.styles={},dEe=e=>e,mEe=e=>(...t)=>{const r=t.pop();e(...t).then(n=>r(null,n)).catch(r)},pEe=(e,t)=>JSON.stringify(e)===JSON.stringify(t),hEe=e=>String(e),fEe={isPromise:e=>e instanceof Promise,isDate:e=>e instanceof Date,isRegExp:e=>e instanceof RegExp,isNativeError:e=>e instanceof Error,isArrayBuffer:e=>e instanceof ArrayBuffer,isTypedArray:e=>ArrayBuffer.isView(e),isUint8Array:e=>e instanceof Uint8Array,isProxy:()=>!1},Az=globalThis.TextDecoder,Tb=globalThis.TextEncoder,gEe=(e,t)=>t?.(null,"127.0.0.1",4),yEe=class{},vEe=globalThis.performance||{now:()=>Date.now()},TEe=class{observe(){}disconnect(){}},wEe=()=>({enable:qn,disable:qn,percentile:()=>0}),EEe=()=>({}),bEe=class{},SEe=()=>!1,_Ee=()=>new Uint8Array,CEe=qn,kEe=class{},AEe=!0,xEe=null,IEe=null,REe=()=>({}),MEe=class{},PEe=class{},DEe=globalThis.Buffer||class extends Uint8Array{static from(t,r){if(typeof t=="string"){const n=(r||"utf8").toLowerCase();if(n==="base64"){const o=atob(t),s=new Uint8Array(o.length);for(let i=0;i<o.length;i++)s[i]=o.charCodeAt(i);return s}if(n==="hex"){const o=new Uint8Array(t.length/2);for(let s=0;s<t.length;s+=2)o[s/2]=parseInt(t.substr(s,2),16);return o}return new Tb().encode(t)}return new Uint8Array(t)}static alloc(t){return new Uint8Array(t)}static isBuffer(t){return t instanceof Uint8Array}static concat(t){const r=t.reduce((s,i)=>s+i.length,0),n=new Uint8Array(r);let o=0;for(const s of t)n.set(s,o),o+=s.length;return n}static byteLength(t,r){return r==="base64"?Math.ceil(t.length*3/4):new Tb().encode(t).length}toString(t){const r=(t||"utf8").toLowerCase();if(r==="hex")return Array.from(new Uint8Array(this.buffer,this.byteOffset,this.byteLength)).map(n=>n.toString(16).padStart(2,"0")).join("");if(r==="base64"){let n="";for(let o=0;o<this.length;o++)n+=String.fromCharCode(this[o]);return btoa(n)}return new Az().decode(this)}},OEe={F_OK:0,R_OK:4,W_OK:2,X_OK:1},NEe=()=>!1,LEe=()=>!1,FEe=()=>0,$Ee=class{},UEe=class{},BEe=async()=>new ArrayBuffer(0),xz=e=>({[Symbol.toPrimitive](){return e},ref(){return this},unref(){return this},hasRef(){return!1},refresh(){return this},close(){}}),zEe=(...e)=>xz(globalThis.setTimeout(...e)),qEe=globalThis.clearTimeout,GEe=(...e)=>xz(globalThis.setInterval(...e)),jEe=globalThis.clearInterval,HEe=class{constructor(e){this.type=e}toString(){return this.type}}}});function lr(e,t=500){return e&&e.slice(0,t).replace(YEe,"***")}function r0(e){if(typeof e=="string")return e;try{return JSON.stringify(e)??String(e)}catch{return"[content too large to serialize]"}}function S1(e,t=1e4){try{const r=JSON.stringify(e);return r===void 0?String(e):r.length>t?`${r.slice(0,t)}\u2026[truncated ${r.length-t} chars]`:r}catch(r){return`[unserializable: ${r instanceof Error?r.message:String(r)}]`}}function No(e){return e.replace(/\/\/[^/\s"'<>]*@/g,"//***@").replace(/\/\/(?:(?!\/\/)[^\s"'<>])*@/g,"//***@")}function rr(e){const t=r=>r.length>200?`${r.slice(0,200)}\u2026`:r;try{const r=new URL(e);return t(`${r.protocol}//${r.host}${r.pathname}`)}catch{const r=e.split(/[?#]/)[0];return t(No(r))}}function xyr(e){QEe.forEach(t=>e.searchParams.delete(t))}function Iyr(e){const t=[],r=[];for(const[o,s]of e.searchParams.entries())ZEe.includes(o.toLowerCase())&&(t.push(`${o.toLowerCase()}=${s}`),r.push(o));return t.length===0?"":(r.forEach(o=>e.searchParams.delete(o)),t.sort(),`\0auth=${cu("sha256").update(t.join("&")).digest("hex").slice(0,16)}`)}function VEe(e){try{const t=new URL(e);xyr(t);const r=Iyr(t);return t.toString()+r}catch{return e}}function _1(e){return e.replace(/[a-zA-Z][a-zA-Z0-9+.-]*:\/\/[^\s"'<>)]+/g,t=>rr(t))}function WEe(e,t){const r=Si(t);return e.split(Bm(t)).join(r).split(t).join(r)}function _h(e,t){const r=s=>{const i=_1(s);return t?.filePath?WEe(i,t.filePath):i};if(!(e instanceof Error))return new Error(r(String(e)));const n=new Error(r(e.message));n.name=e.name;const o=e.code;return o!==void 0&&(n.code=o),n}function C1(e,t=1e3){const r=new WeakSet,n=o=>{if(o==null)return o;if(typeof o=="string")return lr(o,t);if(typeof o!="object")return o;if(r.has(o))return"[Circular]";if(r.add(o),Array.isArray(o))return o.map(n);const s={};for(const[i,a]of Object.entries(o))XEe.some(c=>c.toLowerCase()===i.toLowerCase())?s[i]="***":s[i]=n(a);return s};return n(e)}var KEe,JEe,YEe,XEe,ZEe,QEe,Ut=S({"src/lib/utils/logSanitize.ts"(){"use strict";Ot(),hr(),KEe=["sk","pk","r8","gsk","csk","xai","tgp","fw","pplx","pa","jina","fish"],JEe=KEe.join("|"),YEe=new RegExp(`\\bBearer\\s+[A-Za-z0-9_\\-\\.]{8,}\\b|\\bToken\\s+[A-Za-z0-9_\\-\\.]{8,}\\b|\\bBasic\\s+[A-Za-z0-9+/=]{12,}\\b|\\b(?:${JEe})[_\\-][A-Za-z0-9_\\-\\.]{8,}\\b|\\b(?:api[_-]?key|access[_-]?token|secret[_-]?key|refresh[_-]?token)['"]?\\s*[:=]\\s*['"]?[^\\s,;'"&]+`,"gi"),XEe=["apikey","api_key","apiKey","access_token","accessToken","refresh_token","refreshToken","secret","secretkey","secret_key","secretKey","password","authorization","oauth","oauthToken","credentials","authContext","authToken","sessionToken","serviceAccountKey","secretAccessKey","userEmail"],ZEe=["token","signature","x-amz-signature","x-amz-credential","x-amz-security-token","awsaccesskeyid","expires","sig","se","sp","sr","sv","x-goog-signature","x-goog-credential","x-goog-algorithm","x-goog-date","x-goog-expires","x-goog-signedheaders"],QEe=["utm_source","utm_medium","utm_campaign","utm_term","utm_content","fbclid","gclid","_ga"]}});function Ryr(e){const t=[],r=new Set;let n=e;for(;n&&typeof n=="object"&&!r.has(n)&&t.length<tbe;){r.add(n);const o=n;t.push(o),n=o.cause}return t}function ebe(e,t){for(const r of e)if(typeof r[t]=="string")return r[t]}function Myr(e,t,r){const n=Ryr(e),o=n[0],s=typeof o?.message=="string"?o.message:e instanceof Error?e.message:"Unknown error",i=n[n.length-1],a=typeof i?.message=="string"?_1(i.message):void 0,c=a&&a!==s?`${s}: ${a}`:s;let l;for(const u of n)if(l=hb(u),l!==void 0)break;return{error:e,message:c,statusCode:l,errorName:ebe(n,"name"),errorCode:ebe(n,"code"),provider:t,modelName:r}}function fa(e,t,r,n){if(e instanceof pa)return new Go(`Request timed out: ${e.message}`,r);const o=Myr(e,r,n),s=t.find(a=>a.match(o));if(!s)return new ot(`${r} error: ${o.message}`,r);const i=typeof s.message=="function"?s.message(o):s.message;return new s.errorClass(i,r)}var tbe,_c,zi=S({"src/lib/utils/errorClassifier.ts"(){"use strict";ut(),ha(),ad(),jye(),Ut(),tbe=5,_c=[{match:e=>e.statusCode===401||/API_KEY_INVALID|Invalid API key|Unauthorized|invalid_api_key/i.test(e.message),errorClass:Pr,message:e=>`Invalid ${e.provider} API key. Please check your credentials.`},{match:e=>e.statusCode===429||/rate limit/i.test(e.message),errorClass:$s,message:e=>`${e.provider} rate limit exceeded. Please try again later.`},{match:e=>e.statusCode===404||/model_not_found|model not found/i.test(e.message),errorClass:Do,message:e=>e.modelName?`${e.provider} model '${e.modelName}' not found.`:`${e.provider} model not found.`},{match:e=>/ECONNRESET|ENOTFOUND|ECONNREFUSED|ETIMEDOUT|network|connection/i.test(e.message)||e.errorCode!==void 0&&mz.has(e.errorCode),errorClass:Go,message:e=>`Connection error: ${e.message}`},{match:e=>e.statusCode!==void 0&&e.statusCode>=500&&e.statusCode<=599||/server error|bad gateway|service unavailable|gateway timeout|\berror\b\D{0,12}\b5\d\d\b|\b5\d\d\b\D{0,12}\berror\b|\bstatus(?:\s*code)?\b\D{0,12}\b5\d\d\b/i.test(e.message),errorClass:ot,message:e=>`${e.provider} server error: ${e.message}`}]}});function Pyr(e){return e.replace(/-([a-z])/g,(t,r)=>r.toUpperCase())}function Dyr(e){return e.credentialsKey??Pyr(e.id)}function lu(e,t){const r=e.wire.envOverrides?.[t];if(r)return r;const n=e.id.toUpperCase().replace(/-/g,"_");return t==="apiKey"?`${n}_API_KEY`:t==="baseURL"?`${n}_BASE_URL`:`${n}_MODEL`}function Iz(e,t,r,n){return e.replace(/\{apiKeyEnvVar\}/g,lu(t,"apiKey")).replace(/\{setupUrl\}/g,t.setup.url).replace(/\{model\}/g,r??"").replace(/\{message\}/g,n??"")}function Oyr(e){return{providerName:e.displayName,envVarName:lu(e,"apiKey"),setupUrl:e.setup.url,description:e.setup.description??"API key",instructions:e.setup.instructions.map(t=>Iz(t,e)),...e.wire.apiKeyFallbackEnvVars?{fallbackEnvVars:e.wire.apiKeyFallbackEnvVars}:{}}}function Nyr(e){return[...e.errorRules.map(r=>{const n=r.pattern?new RegExp(r.pattern,"i"):void 0,o=r.message.includes("{model}")||r.message.includes("{message}");return{match:s=>r.status!==void 0&&s.statusCode===r.status||n!==void 0&&n.test(s.message),errorClass:rbe[r.class],message:o?s=>Iz(r.message,e,s.modelName,s.message):Iz(r.message,e)}}),..._c]}function Rz(e){if(Array.isArray(e)){for(const t of e)Rz(t);return Object.freeze(e)}if(e!==null&&typeof e=="object"){for(const t of Object.keys(e))Rz(e[t]);return Object.freeze(e)}return e}function n0(){return Rz(structuredClone(r3))}function Lyr(){return r3.map(e=>{const t={providerName:e.id,aliases:[e.id,...e.aliases],apiKeyEnvVar:lu(e,"apiKey"),configOptions:Oyr(e),modelEnvVar:lu(e,"model"),defaultModel:e.models.default,registryDefaultModel:e.models.registryDefaultModel??e.models.default,registryDefaultModelChecksEnvVar:e.quirks?.registryDefaultIgnoresModelEnvVar!==!0,fallbackModelName:e.models.fallbackModelName??e.models.fallbacks[1]??e.models.fallbacks[0],fallbackModels:[...e.models.fallbacks],errorRules:Nyr(e),...typeof e.capabilities.tools=="boolean"?{supportsTools:e.capabilities.tools}:{},supportsStructuredOutputWithTools:e.capabilities.structuredOutputWithTools},{baseURLTemplate:r}=e.wire;if(r){const n=e.wire.extraCredentials?.[0]??"accountId";t.computedBaseURL={envVar:`${e.id.toUpperCase().replace(/-/g,"_")}_${n.replace(/([A-Z])/g,"_$1").toUpperCase()}`,missingValueMessage:e.wire.missingCredentialMessage??`Missing ${n} for ${e.displayName}`,build:o=>r.replaceAll(`{${n}}`,o)}}else t.baseURLEnvVar=lu(e,"baseURL"),t.defaultBaseURL=e.wire.baseURL;return e.quirks?.messageContentFormat&&(t.messageContentFormat=e.quirks.messageContentFormat),e.quirks?.timeoutErrorClass==="provider"&&(t.timeoutErrorClass=ot),e.quirks?.responseFormatDowngrade&&(t.responseFormatDowngrade=e.quirks.responseFormatDowngrade),e.quirks?.replayReasoningContent&&(t.replayReasoningContent=!0),t})}var rbe,o0=S({"src/lib/providers/catalog/loader.ts"(){"use strict";Aur(),zi(),ut(),rbe={authentication:Pr,"rate-limit":$s,"invalid-model":Do,network:Go,provider:ot}}});function ga(e){let t=process.env[e.envVarName];if(!t&&e.fallbackEnvVars){for(const r of e.fallbackEnvVars)if(t=process.env[r],t)break}if(!t){if(e.optional)return"";throw new Error(Fyr(e))}return t}function Fyr(e){const t=e.fallbackEnvVars?[e.envVarName,...e.fallbackEnvVars].join(" or "):e.envVarName;return`\u274C ${e.providerName} Provider Configuration Error
|
|
67
67
|
|
|
68
68
|
Missing required environment variable: ${t}
|
|
69
69
|
|
|
@@ -1153,7 +1153,7 @@ Reason: ${i instanceof Error?i.message:"Unknown error"}`}}return{...t,prompt:n,i
|
|
|
1153
1153
|
`}),t&&t.toLowerCase().includes("claude")&&(a+=`
|
|
1154
1154
|
\u{1F4A1} Tip: this model id appears to be a Claude model, which just failed.
|
|
1155
1155
|
`,a+=`Ensure Anthropic integration is enabled in your Google Cloud project.
|
|
1156
|
-
`,a+="Try another Claude model from the list above."),a}async embed(t,r){if(typeof t!="string"&&t.image)throw new ot(`${this.providerName} does not support image embeddings; provide text input`,this.providerName);const n=typeof t=="string"?t:t.text??"",o=r||this.getDefaultEmbeddingModel()||"text-embedding-004";p.debug("Generating embedding",{provider:this.providerName,model:o,textLength:n.length});try{const s=Lv(o,void 0),c=(await(await this.createVertexGenAIClient(s)).models.embedContent({model:o,contents:[n]})).embeddings?.[0]?.values;if(!c||c.length===0)throw new ot("No embedding returned from Vertex AI",this.providerName);return p.debug("Embedding generated successfully",{provider:this.providerName,model:o,embeddingDimension:c.length}),c}catch(s){throw p.error("Embedding generation failed",{error:s instanceof Error?s.message:String(s),model:o,textLength:n.length}),this.handleProviderError(s)}}async embedMany(t,r){const n=r||this.getDefaultEmbeddingModel()||"text-embedding-004";p.debug("Generating batch embeddings",{provider:this.providerName,model:n,count:t.length});try{const o=Lv(n,void 0),a=((await(await this.createVertexGenAIClient(o)).models.embedContent({model:n,contents:t})).embeddings||[]).map(c=>c.values||[]);return p.debug("Batch embeddings generated successfully",{provider:this.providerName,model:n,count:a.length,embeddingDimension:a[0]?.length}),a}catch(o){throw p.error("Batch embedding generation failed",{error:o instanceof Error?o.message:String(o),model:n,count:t.length}),this.handleProviderError(o)}}}}}),Fkt,$kt,VX,Ukt,Bkt,MFr=S({"src/lib/providers/googleVertex/constants.ts"(){"use strict";Xt(),Fkt=10*1024*1024,$kt=lt.getTracer("neurolink.provider.vertex"),VX=null,Ukt={"claude-sonnet-4-5":"claude-sonnet-4-5@20250929","claude-opus-4-5":"claude-opus-4-5@20251101","claude-haiku-4-5":"claude-haiku-4-5@20251001","claude-sonnet-4":"claude-sonnet-4@20250514","claude-opus-4":"claude-opus-4@20250514","claude-opus-4-1":"claude-opus-4-1@20250805","claude-3-7-sonnet":"claude-3-7-sonnet@20250219","claude-3-5-sonnet":"claude-3-5-sonnet-20241022","claude-3-5-haiku":"claude-3-5-haiku-20241022","claude-3-opus":"claude-3-opus-20240229","claude-3-sonnet":"claude-3-sonnet-20240229","claude-3-haiku":"claude-3-haiku-20240307","gemini-3-pro":"gemini-3.1-pro-preview","gemini-3-flash":"gemini-3-flash-preview"},Bkt=e=>{VX=e}}}),zkt={};se(zkt,{GoogleVertexAI:()=>HX,GoogleVertexProvider:()=>HX,MAX_IMAGE_DOWNLOAD_BYTES:()=>Fkt,VERTEX_MODEL_ALIASES:()=>Ukt,appendUserMessage:()=>qX,buildAnthropicHistoryMessages:()=>zX,cachedCredentialsPath:()=>VX,resolveVertexLocation:()=>jX,setCachedCredentialsPath:()=>Bkt,streamTracer:()=>$kt,stripAdditionalPropertiesDeep:()=>ng});var PFr=S({"src/lib/providers/googleVertex/index.ts"(){"use strict";RFr(),MFr()}}),qkt={};se(qkt,{ConfiguredOpenAICompatProvider:()=>jkt});var Gkt,jkt,DFr=S({"src/lib/providers/configuredOpenAICompat.ts"(){"use strict";z(),Ut(),ts(),zi(),ha(),kl(),Gkt=e=>typeof e=="string"?e:e==null?"":e.map(t=>t.type==="text"?t.text:"").join(""),jkt=class extends Lc{entry;constructor(e,t,r,n){const{apiKey:o,baseURL:s}=Qyr(e,n),i=t||_i(e.modelEnvVar,e.defaultModel);super(e.providerName,i,r,{baseURL:s,apiKey:o}),this.entry=e,p.debug(`${e.configOptions.providerName} Provider initialized`,{modelName:this.modelName,providerName:this.providerName,baseURL:No(this.config.baseURL)})}getProviderName(){return this.entry.providerName}getDefaultModel(){return _i(this.entry.modelEnvVar,this.entry.defaultModel)}getFallbackModelName(){return this.entry.fallbackModelName}getFallbackModels(){return this.entry.fallbackModels}supportsTools(){return this.entry.supportsTools===!1?!1:super.supportsTools()}adjustRequestBody(e,t){const r=super.adjustRequestBody(e,t);return this.entry.messageContentFormat!=="string"?r:{...r,messages:r.messages.map(n=>({...n,content:Gkt(n.content)}))}}adjustResponseFormat(e,t){return this.entry.responseFormatDowngrade==="json-schema-to-json-object"&&e?.type==="json_schema"?{type:"json_object"}:super.adjustResponseFormat(e,t)}replayReasoningContent(){return this.entry.replayReasoningContent===!0}formatProviderError(e){return e instanceof pa&&this.entry.timeoutErrorClass?new this.entry.timeoutErrorClass(`${this.entry.configOptions.providerName} request timed out: ${e.message}`,this.entry.providerName):fa(e,this.entry.errorRules,this.entry.providerName,this.modelName)}}}});function WX(e,t){const r=e,n=r?.cause??{},o=r?.code??n?.code;return{match:s=>o==="ECONNREFUSED"||/ECONNREFUSED|Failed to fetch|fetch failed/.test(s.message),errorClass:Go,message:t}}var KX=S({"src/lib/providers/localRuntimeOpenAICompat.ts"(){"use strict";ut()}}),KC,Hkt,Vkt,BO=S({"src/lib/providers/ollama/constants.ts"(){"use strict";Dn(),KC="llama3.2:latest",Hkt="llama3.2:latest",Vkt=Mt()}}),Wkt,Kkt,JX,YX,Jkt,JC,Ykt,Xkt,OFr=S({"src/lib/providers/ollama/client.ts"(){"use strict";rf(),Dn(),ut(),zi(),z(),Ut(),ha(),kl(),KX(),yp(),BO(),Wkt="http://localhost:11434/v1",Kkt="ollama",JX="llama3.1:8b",YX="nomic-embed-text",Jkt=3e4,JC=()=>process.env.OLLAMA_MODEL||KC,Ykt=e=>{const t=e?.trim()||process.env.OLLAMA_BASE_URL?.trim()||Wkt,r=Ca(t);return r.endsWith("/v1")?r:`${r}/v1`},Xkt=class extends Lc{constructor(e,t,r,n){const o=Ykt(n?.baseURL),s=n?.apiKey?.trim()||process.env.OLLAMA_API_KEY?.trim()||Kkt;super("ollama",e,t,{baseURL:o,apiKey:s}),p.debug("Ollama Provider initialized",{modelName:this.modelName,providerName:this.providerName,baseURL:No(this.config.baseURL)})}getProviderName(){return"ollama"}getDefaultModel(){return JC()}getFallbackModelName(){return JX}formatProviderError(e){if(e instanceof pa)return new Go("Ollama request timed out. The model may be loading or the request is too large.","ollama");const t=e,r=typeof t?.responseBody=="string"?t.responseBody:"",n=[WX(e,()=>`Cannot connect to Ollama at ${No(this.config.baseURL)}. Install Ollama (https://ollama.com), start it with 'ollama serve', then try again.`),{match:o=>{const s=`${o.message} ${r}`.toLowerCase();return s.includes("model_not_found")||s.includes("model")&&s.includes("not found")},errorClass:Do,message:()=>`Ollama model '${this.modelName}' is not available locally. Pull it first with 'ollama pull ${this.modelName}' (or try '${JX}'); list installed models with 'ollama list'.`},{match:o=>{const s=`${o.message} ${r}`.toLowerCase();return o.statusCode===404||s.includes("status 404")},errorClass:ot,message:()=>`Ollama returned HTTP 404 from ${No(this.config.baseURL)}. Verify the base URL serves the OpenAI-compatible /v1 API and that the model is installed ('ollama list').`},..._c];return fa(e,n,this.providerName,this.modelName)}supportsTools(){const e=(this.modelName??JC()).toLowerCase(),r=tf.getProviderConfiguration("ollama")?.modelBehavior?.toolCapableModels||[];if(r.length===0)return!0;const n=r.some(o=>e.includes(o.toLowerCase()));return n||p.debug("Ollama tool calling disabled",{model:this.modelName,reason:"Model not in OLLAMA_TOOL_CAPABLE_MODELS list"}),n}getTimeout(e){if(e.timeout===void 0||e.timeout===null){const t=process.env.OLLAMA_TIMEOUT?.trim();if(t)try{const r=ml(t);if(r!==void 0&&r>0)return r}catch{p.debug(`Ignoring invalid OLLAMA_TIMEOUT='${t}'; using the default. Use a millisecond number (240000) or a duration like '4m' / '30s'.`)}}return super.getTimeout(e)}async validateConfiguration(){return this.probeModelsEndpoint(this.getAuthHeaders())}getConfiguration(){return{provider:this.providerName,model:this.modelName||this.resolvedModel||JC(),defaultModel:JC(),baseURL:this.config.baseURL}}async embed(e,t){if(typeof e!="string"&&e.image)throw new ot(`${this.providerName} does not support image embeddings; provide text input`,this.providerName);const r=typeof e=="string"?e:e.text??"",n=t||process.env.OLLAMA_EMBEDDING_MODEL||YX,[o]=await this.callEmbeddings(n,[r],"embed");return o}async embedMany(e,t){const r=t||process.env.OLLAMA_EMBEDDING_MODEL||YX;return this.callEmbeddings(r,e,"embedMany")}async callEmbeddings(e,t,r){const n=`${Ca(this.config.baseURL)}/embeddings`,o=Mt(),s=ma(Jkt,this.providerName,"generate");try{const i=await o(n,{method:"POST",headers:{"Content-Type":"application/json",...this.getAuthHeaders()},body:JSON.stringify({model:e,input:t.length===1?t[0]:t}),...s?.controller.signal?{signal:s.controller.signal}:{}});if(!i.ok){const l=await i.text().catch(()=>"");let u;if(l)try{u=JSON.parse(l)}catch{u=void 0}throw this.formatProviderError(new Error(u?.error?.message||`Ollama ${r} failed with status ${i.status}`))}const c=((await i.json()).data??[]).map(l=>l.embedding).filter(l=>Array.isArray(l));if(c.length===0)throw new ot(`Ollama ${r} returned no embeddings`,"ollama");return c}finally{s?.cleanup()}}}}}),Zkt={};se(Zkt,{DEFAULT_OLLAMA_MODEL:()=>KC,FALLBACK_OLLAMA_MODEL:()=>Hkt,OllamaProvider:()=>Xkt,proxyFetch:()=>Vkt});var NFr=S({"src/lib/providers/ollama/index.ts"(){"use strict";OFr(),BO()}});function LFr(){YC.clear(),zO.clear(),qO.clear()}async function FFr(e,t){const r=`${e}/model/info`,n=Mt(),o=new AbortController,s=setTimeout(()=>o.abort(),5e3);try{const i=await n(r,{method:"GET",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"},signal:o.signal});if(!i.ok)throw new Error(`HTTP ${i.status}: ${i.statusText}`);const a=await i.json(),c=u=>typeof u=="number"&&Number.isFinite(u)&&u>0,l=new Map;for(const u of a.data??[]){const d=u?.model_name;if(typeof d!="string"||d.length===0)continue;const m=u?.model_info?.max_input_tokens,h=u?.model_info?.max_output_tokens;if(!c(m)&&!c(h))continue;const f=l.get(d)??{};c(m)&&(f.maxInputTokens=f.maxInputTokens===void 0?m:Math.min(f.maxInputTokens,m)),c(h)&&(f.maxOutputTokens=f.maxOutputTokens===void 0?h:Math.min(f.maxOutputTokens,h)),l.set(d,f)}return l}catch(i){throw cr(i)?new Go("Request timed out after 5 seconds","litellm"):i}finally{clearTimeout(s)}}function XX(e,t){const r=Ca(e),n=zO.get(r)??0;if(Date.now()-n<rAt)return Promise.resolve();const o=YC.get(r);if(o)return o;const s=FFr(r,t).then(i=>{qO.set(r,i);const a=new Map;for(const c of qO.values())for(const[l,u]of c){const d=a.get(l)??{};u.maxInputTokens!==void 0&&(d.maxInputTokens=d.maxInputTokens===void 0?u.maxInputTokens:Math.min(d.maxInputTokens,u.maxInputTokens)),u.maxOutputTokens!==void 0&&(d.maxOutputTokens=d.maxOutputTokens===void 0?u.maxOutputTokens:Math.min(d.maxOutputTokens,u.maxOutputTokens)),a.set(l,d)}for(const[c,l]of a)l.maxInputTokens!==void 0&&xV("litellm",c,l.maxInputTokens),l.maxOutputTokens!==void 0&&net("litellm",c,l.maxOutputTokens);zO.set(r,Date.now()),i.size>0&&p.debug("[LiteLLM] Registered runtime model limits from /model/info",{baseURL:No(r),models:i.size})}).catch(i=>{p.debug("[LiteLLM] /model/info discovery failed; static context-window defaults remain in force",{error:i instanceof Error?i.message:String(i)})}).finally(()=>{YC.delete(r)});return YC.set(r,s),s}var Qkt,ZX,eAt,tAt,rAt,YC,zO,qO,nAt,oAt,$Fr=S({"src/lib/providers/litellm/client.ts"(){"use strict";Xt(),Sl(),Dn(),ut(),zi(),Ze(),z(),Ut(),zP(),Ja(),ts(),ha(),yp(),kl(),Qkt=lt.getTracer("neurolink.provider.litellm"),ZX="openai/gpt-4o-mini",eAt=()=>({baseURL:process.env.LITELLM_BASE_URL||"http://localhost:4000",apiKey:process.env.LITELLM_API_KEY||"sk-anything"}),tAt=()=>_i("LITELLM_MODEL",ZX),rAt=600*1e3,YC=new Map,zO=new Map,qO=new Map,nAt=e=>{const t=e.includes("/")?e.slice(e.lastIndexOf("/")+1):e;return Lgt(t)},oAt=class Em extends Lc{static modelsCache=[];static modelsCacheTime=0;static MODELS_CACHE_DURATION=600*1e3;constructor(t,r,n,o){const s=eAt();super("litellm",t,r,{baseURL:o?.baseURL??s.baseURL,apiKey:o?.apiKey??s.apiKey}),XX(this.config.baseURL,this.config.apiKey),p.debug("LiteLLM Provider initialized",{modelName:this.modelName,provider:this.providerName,baseURL:No(this.config.baseURL)})}async ensureModelLimits(){await XX(this.config.baseURL,this.config.apiKey)}getProviderName(){return"litellm"}getDefaultModel(){return tAt()}getFallbackModelName(){return ZX}getFallbackModels(){return process.env.LITELLM_FALLBACK_MODELS?.split(",").map(t=>t.trim()).filter(t=>t.length>0)||["openai/gpt-4o","anthropic/claude-3-haiku","meta-llama/llama-3.1-8b-instruct","google/gemini-2.5-flash"]}useStreamingWireForGenerate(){return process.env.NEUROLINK_LITELLM_SSE_GENERATE!=="false"}adjustBuildBodyOptions(t,r){return nAt(t)&&r.maxTokens!==void 0?(p.shouldLog("debug")&&p.debug("LiteLLM: Skipping maxTokens for Gemini 2.5 model (known compatibility issue)",{modelId:t,requestedMaxTokens:r.maxTokens}),{...r,maxTokens:void 0}):r}onStreamStart(t){const r=Qkt.startSpan("neurolink.provider.streamText",{kind:zr.CLIENT,attributes:{"gen_ai.system":"litellm","gen_ai.request.model":t}});let n=!1;const o=()=>{n||(n=!0,r.end())};return{onUsage:s=>{r.setAttribute("gen_ai.usage.input_tokens",s.promptTokens+(s.cacheReadTokens??0)+(s.cacheCreationTokens??0)),r.setAttribute("gen_ai.usage.output_tokens",s.completionTokens);const i=xi(this.providerName,t,{input:s.promptTokens,output:s.completionTokens,total:s.totalTokens,...s.cacheReadTokens?{cacheReadTokens:s.cacheReadTokens}:{},...s.cacheCreationTokens?{cacheCreationTokens:s.cacheCreationTokens}:{}});i&&i>0&&r.setAttribute("neurolink.cost",i)},onFinish:(s,i)=>{r.setAttribute("gen_ai.response.finish_reason",s||"unknown"),s==="error"&&r.setStatus({code:Ue.ERROR,message:i instanceof Error?i.message:String(i??"stream error")}),o()}}}formatProviderError(t){const r=t;if(typeof r?.message=="string"&&Nme(r.message))return new Ay(r.message,{provider:this.providerName,requestedModel:this.modelName,allowedModels:Ome(r.message)});const n=[{match:o=>o.errorName==="TimeoutError"||/timeout/i.test(o.message),errorClass:Go,message:o=>`Request timed out: ${o.message}`},{match:o=>/ECONNREFUSED|Failed to fetch/.test(o.message),errorClass:Go,message:()=>"LiteLLM proxy server not available. Please start the LiteLLM proxy server at "+No(this.config.baseURL)},{match:o=>/API_KEY_INVALID|Invalid API key/.test(o.message),errorClass:Pr,message:"Invalid LiteLLM configuration. Please check your LITELLM_API_KEY environment variable."},{match:o=>/rate limit/i.test(o.message),errorClass:$s,message:"LiteLLM rate limit exceeded. Please try again later."},{match:o=>/model/i.test(o.message)&&/not found/i.test(o.message),errorClass:Do,message:()=>`Model '${this.modelName}' not available in LiteLLM proxy. Please check your LiteLLM configuration and ensure the model is configured.`},..._c];return fa(t,n,this.providerName,this.modelName)}async getAvailableModels(){const t=Date.now();if(Em.modelsCache.length>0&&t-Em.modelsCacheTime<Em.MODELS_CACHE_DURATION)return p.debug("[LiteLLMProvider.getAvailableModels] Using cached models",{cacheAge:Math.round((t-Em.modelsCacheTime)/1e3),modelCount:Em.modelsCache.length}),Em.modelsCache;try{const r=await this.fetchModelsFromAPI();if(r.length>0)return Em.modelsCache=r,Em.modelsCacheTime=t,r}catch(r){p.warn("[LiteLLMProvider.getAvailableModels] Failed to fetch models from API, using fallback",{error:r instanceof Error?r.message:String(r)})}return this.getFallbackModels()}async fetchModelsFromAPI(){const r=`${Ca(this.config.baseURL).replace(/\/v1$/,"")}/v1/models`,n=Mt(),o=new AbortController,s=setTimeout(()=>o.abort(),5e3);try{const i=await n(r,{method:"GET",headers:{Authorization:`Bearer ${this.config.apiKey}`,"Content-Type":"application/json"},signal:o.signal});if(!i.ok)throw new Error(`HTTP ${i.status}: ${i.statusText}`);const a=await i.json();if(!Array.isArray(a.data))throw new Error("Invalid response format: expected data.data array");return a.data.map(c=>c.id).filter(c=>typeof c=="string"&&c.length>0).sort()}catch(i){throw cr(i)?new Go("Request timed out after 5 seconds",this.providerName):i}finally{clearTimeout(s)}}async embed(t,r){if(typeof t!="string"&&t.image)throw new ot(`${this.providerName} does not support image embeddings; provide text input`,this.providerName);const n=typeof t=="string"?t:t.text??"",o=r||process.env.LITELLM_EMBEDDING_MODEL||"gemini-embedding-001",[s]=await this.callEmbeddings(o,[n],"embed");return s}async embedMany(t,r){const n=r||process.env.LITELLM_EMBEDDING_MODEL||"gemini-embedding-001";return this.callEmbeddings(n,t,"embedMany")}async callEmbeddings(t,r,n){const o=`${Ca(this.config.baseURL)}/embeddings`,s=Mt(),i=ma(3e4,this.providerName,"generate");try{const a=await s(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.config.apiKey}`},body:JSON.stringify({model:t,input:r.length===1?r[0]:r}),...i?.controller.signal?{signal:i.controller.signal}:{}});if(!a.ok){const u=await a.text().catch(()=>""),d=u?JSON.parse(u):void 0;throw this.formatProviderError(new Error(d?.error?.message||`LiteLLM ${n} failed with status ${a.status}`))}const l=((await a.json()).data??[]).map(u=>u.embedding).filter(u=>Array.isArray(u));if(l.length===0)throw new ot(`LiteLLM ${n} returned no embeddings`,this.providerName);return l}finally{i?.cleanup()}}}}}),sAt={};se(sAt,{LiteLLMProvider:()=>oAt,clearLiteLLMModelLimitsCache:()=>LFr,ensureLiteLLMModelLimits:()=>XX});var UFr=S({"src/lib/providers/litellm/index.ts"(){"use strict";$Fr()}}),GO,iAt=S({"src/lib/providers/openaiCompatible/constants.ts"(){"use strict";GO="gpt-3.5-turbo"}}),QX,eZ,aAt=S({"src/lib/providers/openaiCompatible/utils.ts"(){"use strict";QX=()=>{const e=process.env.OPENAI_COMPATIBLE_BASE_URL,t=process.env.OPENAI_COMPATIBLE_API_KEY;if(!e)throw new Error("OPENAI_COMPATIBLE_BASE_URL environment variable is required. Please set it to your OpenAI-compatible endpoint (e.g., https://api.openrouter.ai/api/v1)");if(!t)throw new Error("OPENAI_COMPATIBLE_API_KEY environment variable is required. Please set it to your API key for the OpenAI-compatible service.");return{baseURL:e,apiKey:t}},eZ=()=>process.env.OPENAI_COMPATIBLE_MODEL||void 0}}),cAt,BFr=S({"src/lib/providers/openaiCompatible/client.ts"(){"use strict";ut(),z(),Ut(),zi(),kl(),iAt(),aAt(),cAt=class extends Lc{constructor(e,t,r,n){const o=n?.apiKey&&n?.baseURL?{apiKey:n.apiKey,baseURL:n.baseURL}:(()=>{const s=QX();return{apiKey:n?.apiKey??s.apiKey,baseURL:n?.baseURL??s.baseURL}})();super("openai-compatible",e,t,o),p.debug("OpenAI Compatible Provider initialized",{modelName:this.modelName,provider:this.providerName,baseURL:No(this.config.baseURL)})}getProviderName(){return"openai-compatible"}getDefaultModel(){return eZ()||""}getFallbackModelName(){return GO}getFallbackModels(){return["gpt-4o","gpt-4o-mini","gpt-4-turbo",GO,"claude-3-5-sonnet","claude-3-haiku","gemini-pro"]}formatProviderError(e){const t=[{match:r=>r.errorName==="TimeoutError"||/Timeout/.test(r.message),errorClass:Go,message:r=>`Request timed out: ${r.message}`},{match:r=>/ECONNREFUSED|Failed to fetch/i.test(r.message),errorClass:Go,message:()=>`OpenAI Compatible endpoint not available. Please check your OPENAI_COMPATIBLE_BASE_URL: ${No(this.config.baseURL)}`},{match:r=>r.statusCode===401||/API_KEY_INVALID|Invalid API key|Unauthorized/i.test(r.message),errorClass:Pr,message:"Invalid OpenAI Compatible API key. Please check your OPENAI_COMPATIBLE_API_KEY environment variable."},{match:r=>/model/i.test(r.message)&&(/not found/i.test(r.message)||/does not exist/i.test(r.message)),errorClass:Do,message:r=>`Model '${r.modelName}' not available on OpenAI Compatible endpoint. Please check available models or use getAvailableModels() to see supported models.`},..._c];return fa(e,t,this.providerName,this.modelName)}}}}),lAt={};se(lAt,{FALLBACK_OPENAI_COMPATIBLE_MODEL:()=>GO,OpenAICompatibleProvider:()=>cAt,getDefaultOpenAICompatibleModel:()=>eZ,getOpenAICompatibleConfig:()=>QX});var zFr=S({"src/lib/providers/openaiCompatible/index.ts"(){"use strict";BFr(),iAt(),aAt()}}),XC,uAt=S({"src/lib/providers/openRouter/utils.ts"(){"use strict";ts(),XC=()=>_i("OPENROUTER_MODEL","anthropic/claude-sonnet-4.5")}}),dAt,jO,mAt,pAt,qFr=S({"src/lib/providers/openRouter/client.ts"(){"use strict";ut(),Dn(),zi(),Ze(),z(),Ut(),kl(),yp(),uAt(),dAt="https://openrouter.ai/api/v1",jO=5e3,mAt=()=>{const e=process.env.OPENROUTER_API_KEY;if(!e)throw new Error("OPENROUTER_API_KEY environment variable is required. Get your API key at https://openrouter.ai/keys");return e},pAt=class Ua extends Lc{referer;appName;static modelsCache=[];static modelsCacheTime=0;static MODELS_CACHE_DURATION=600*1e3;static toolCapableModels=new Set;static capabilitiesCached=!1;constructor(t,r,n,o){const s=o?.apiKey?.trim(),i=s&&s.length>0?s:mAt(),a=o?.baseURL?.trim()||process.env.OPENROUTER_BASE_URL?.trim()||dAt;super("openrouter",t,r,{baseURL:a,apiKey:i}),this.referer=process.env.OPENROUTER_REFERER?.trim()||void 0,this.appName=process.env.OPENROUTER_APP_NAME?.trim()||void 0,p.debug("OpenRouter Provider initialized",{modelName:this.modelName,providerName:this.providerName,baseURL:No(this.config.baseURL)})}getProviderName(){return"openrouter"}getDefaultModel(){return XC()}formatProviderError(t){const r=[{match:n=>n.errorName==="TimeoutError"||/Timeout/.test(n.message),errorClass:Go,message:n=>`Request timed out: ${n.message}`},{match:n=>/ECONNREFUSED|Failed to fetch/.test(n.message),errorClass:Go,message:"OpenRouter API not available. Please check your network connection and try again."},{match:n=>/API_KEY_INVALID|Invalid API key|invalid_api_key|Unauthorized/.test(n.message),errorClass:Pr,message:"Invalid OpenRouter API key. Please check your OPENROUTER_API_KEY environment variable. Get your key at https://openrouter.ai/keys"},{match:n=>/rate limit/.test(n.message),errorClass:$s,message:"OpenRouter rate limit exceeded. Please try again later or upgrade your account at https://openrouter.ai/credits"},{match:n=>/model/.test(n.message)&&/not found/.test(n.message),errorClass:Do,message:()=>`Model '${this.modelName}' not available on OpenRouter. Browse available models at https://openrouter.ai/models`},{match:n=>/insufficient_credits/.test(n.message),errorClass:ot,message:"Insufficient OpenRouter credits. Add credits at https://openrouter.ai/credits"},{match:n=>/No endpoints found/.test(n.message),errorClass:Do,message:()=>`No endpoints found for model '${this.modelName}' on OpenRouter. The model may be temporarily unavailable or does not support the requested parameters. Try a different model or check availability at https://openrouter.ai/models`},{match:n=>/tool use|tool_use|function_call|tools are not supported/.test(n.message),errorClass:ot,message:()=>`Model '${this.modelName}' does not support tool calling. Use a tool-capable model like:
|
|
1156
|
+
`,a+="Try another Claude model from the list above."),a}async embed(t,r){if(typeof t!="string"&&t.image)throw new ot(`${this.providerName} does not support image embeddings; provide text input`,this.providerName);const n=typeof t=="string"?t:t.text??"",o=r||this.getDefaultEmbeddingModel()||"text-embedding-004";p.debug("Generating embedding",{provider:this.providerName,model:o,textLength:n.length});try{const s=Lv(o,void 0),c=(await(await this.createVertexGenAIClient(s)).models.embedContent({model:o,contents:[n]})).embeddings?.[0]?.values;if(!c||c.length===0)throw new ot("No embedding returned from Vertex AI",this.providerName);return p.debug("Embedding generated successfully",{provider:this.providerName,model:o,embeddingDimension:c.length}),c}catch(s){throw p.error("Embedding generation failed",{error:s instanceof Error?s.message:String(s),model:o,textLength:n.length}),this.handleProviderError(s)}}async embedMany(t,r){const n=r||this.getDefaultEmbeddingModel()||"text-embedding-004";p.debug("Generating batch embeddings",{provider:this.providerName,model:n,count:t.length});try{const o=Lv(n,void 0),a=((await(await this.createVertexGenAIClient(o)).models.embedContent({model:n,contents:t})).embeddings||[]).map(c=>c.values||[]);return p.debug("Batch embeddings generated successfully",{provider:this.providerName,model:n,count:a.length,embeddingDimension:a[0]?.length}),a}catch(o){throw p.error("Batch embedding generation failed",{error:o instanceof Error?o.message:String(o),model:n,count:t.length}),this.handleProviderError(o)}}}}}),Fkt,$kt,VX,Ukt,Bkt,MFr=S({"src/lib/providers/googleVertex/constants.ts"(){"use strict";Xt(),Fkt=10*1024*1024,$kt=lt.getTracer("neurolink.provider.vertex"),VX=null,Ukt={"claude-sonnet-4-5":"claude-sonnet-4-5@20250929","claude-opus-4-5":"claude-opus-4-5@20251101","claude-haiku-4-5":"claude-haiku-4-5@20251001","claude-sonnet-4":"claude-sonnet-4@20250514","claude-opus-4":"claude-opus-4@20250514","claude-opus-4-1":"claude-opus-4-1@20250805","claude-3-7-sonnet":"claude-3-7-sonnet@20250219","claude-3-5-sonnet":"claude-3-5-sonnet-20241022","claude-3-5-haiku":"claude-3-5-haiku-20241022","claude-3-opus":"claude-3-opus-20240229","claude-3-sonnet":"claude-3-sonnet-20240229","claude-3-haiku":"claude-3-haiku-20240307","gemini-3-pro":"gemini-3.1-pro-preview","gemini-3-flash":"gemini-3-flash-preview"},Bkt=e=>{VX=e}}}),zkt={};se(zkt,{GoogleVertexAI:()=>HX,GoogleVertexProvider:()=>HX,MAX_IMAGE_DOWNLOAD_BYTES:()=>Fkt,VERTEX_MODEL_ALIASES:()=>Ukt,appendUserMessage:()=>qX,buildAnthropicHistoryMessages:()=>zX,cachedCredentialsPath:()=>VX,resolveVertexLocation:()=>jX,setCachedCredentialsPath:()=>Bkt,streamTracer:()=>$kt,stripAdditionalPropertiesDeep:()=>ng});var PFr=S({"src/lib/providers/googleVertex/index.ts"(){"use strict";RFr(),MFr()}}),qkt={};se(qkt,{ConfiguredOpenAICompatProvider:()=>jkt});var Gkt,jkt,DFr=S({"src/lib/providers/configuredOpenAICompat.ts"(){"use strict";z(),Ut(),ts(),zi(),ha(),kl(),Gkt=e=>typeof e=="string"?e:e==null?"":e.map(t=>t.type==="text"?t.text:"").join(""),jkt=class extends Lc{entry;constructor(e,t,r,n){const{apiKey:o,baseURL:s}=Qyr(e,n),i=t||_i(e.modelEnvVar,e.defaultModel);super(e.providerName,i,r,{baseURL:s,apiKey:o}),this.entry=e,p.debug(`${e.configOptions.providerName} Provider initialized`,{modelName:this.modelName,providerName:this.providerName,baseURL:No(this.config.baseURL)})}getProviderName(){return this.entry.providerName}getDefaultModel(){return _i(this.entry.modelEnvVar,this.entry.defaultModel)}getFallbackModelName(){return this.entry.fallbackModelName}getFallbackModels(){return this.entry.fallbackModels}supportsTools(){return this.entry.supportsTools===!1?!1:super.supportsTools()}suppressResponseFormatWithTools(){return this.entry.supportsStructuredOutputWithTools!==!0}adjustRequestBody(e,t){const r=super.adjustRequestBody(e,t);return this.entry.messageContentFormat!=="string"?r:{...r,messages:r.messages.map(n=>({...n,content:Gkt(n.content)}))}}adjustResponseFormat(e,t){return this.entry.responseFormatDowngrade==="json-schema-to-json-object"&&e?.type==="json_schema"?{type:"json_object"}:super.adjustResponseFormat(e,t)}replayReasoningContent(){return this.entry.replayReasoningContent===!0}formatProviderError(e){return e instanceof pa&&this.entry.timeoutErrorClass?new this.entry.timeoutErrorClass(`${this.entry.configOptions.providerName} request timed out: ${e.message}`,this.entry.providerName):fa(e,this.entry.errorRules,this.entry.providerName,this.modelName)}}}});function WX(e,t){const r=e,n=r?.cause??{},o=r?.code??n?.code;return{match:s=>o==="ECONNREFUSED"||/ECONNREFUSED|Failed to fetch|fetch failed/.test(s.message),errorClass:Go,message:t}}var KX=S({"src/lib/providers/localRuntimeOpenAICompat.ts"(){"use strict";ut()}}),KC,Hkt,Vkt,BO=S({"src/lib/providers/ollama/constants.ts"(){"use strict";Dn(),KC="llama3.2:latest",Hkt="llama3.2:latest",Vkt=Mt()}}),Wkt,Kkt,JX,YX,Jkt,JC,Ykt,Xkt,OFr=S({"src/lib/providers/ollama/client.ts"(){"use strict";rf(),Dn(),ut(),zi(),z(),Ut(),ha(),kl(),KX(),yp(),BO(),Wkt="http://localhost:11434/v1",Kkt="ollama",JX="llama3.1:8b",YX="nomic-embed-text",Jkt=3e4,JC=()=>process.env.OLLAMA_MODEL||KC,Ykt=e=>{const t=e?.trim()||process.env.OLLAMA_BASE_URL?.trim()||Wkt,r=Ca(t);return r.endsWith("/v1")?r:`${r}/v1`},Xkt=class extends Lc{constructor(e,t,r,n){const o=Ykt(n?.baseURL),s=n?.apiKey?.trim()||process.env.OLLAMA_API_KEY?.trim()||Kkt;super("ollama",e,t,{baseURL:o,apiKey:s}),p.debug("Ollama Provider initialized",{modelName:this.modelName,providerName:this.providerName,baseURL:No(this.config.baseURL)})}getProviderName(){return"ollama"}getDefaultModel(){return JC()}getFallbackModelName(){return JX}formatProviderError(e){if(e instanceof pa)return new Go("Ollama request timed out. The model may be loading or the request is too large.","ollama");const t=e,r=typeof t?.responseBody=="string"?t.responseBody:"",n=[WX(e,()=>`Cannot connect to Ollama at ${No(this.config.baseURL)}. Install Ollama (https://ollama.com), start it with 'ollama serve', then try again.`),{match:o=>{const s=`${o.message} ${r}`.toLowerCase();return s.includes("model_not_found")||s.includes("model")&&s.includes("not found")},errorClass:Do,message:()=>`Ollama model '${this.modelName}' is not available locally. Pull it first with 'ollama pull ${this.modelName}' (or try '${JX}'); list installed models with 'ollama list'.`},{match:o=>{const s=`${o.message} ${r}`.toLowerCase();return o.statusCode===404||s.includes("status 404")},errorClass:ot,message:()=>`Ollama returned HTTP 404 from ${No(this.config.baseURL)}. Verify the base URL serves the OpenAI-compatible /v1 API and that the model is installed ('ollama list').`},..._c];return fa(e,n,this.providerName,this.modelName)}supportsTools(){const e=(this.modelName??JC()).toLowerCase(),r=tf.getProviderConfiguration("ollama")?.modelBehavior?.toolCapableModels||[];if(r.length===0)return!0;const n=r.some(o=>e.includes(o.toLowerCase()));return n||p.debug("Ollama tool calling disabled",{model:this.modelName,reason:"Model not in OLLAMA_TOOL_CAPABLE_MODELS list"}),n}getTimeout(e){if(e.timeout===void 0||e.timeout===null){const t=process.env.OLLAMA_TIMEOUT?.trim();if(t)try{const r=ml(t);if(r!==void 0&&r>0)return r}catch{p.debug(`Ignoring invalid OLLAMA_TIMEOUT='${t}'; using the default. Use a millisecond number (240000) or a duration like '4m' / '30s'.`)}}return super.getTimeout(e)}async validateConfiguration(){return this.probeModelsEndpoint(this.getAuthHeaders())}getConfiguration(){return{provider:this.providerName,model:this.modelName||this.resolvedModel||JC(),defaultModel:JC(),baseURL:this.config.baseURL}}async embed(e,t){if(typeof e!="string"&&e.image)throw new ot(`${this.providerName} does not support image embeddings; provide text input`,this.providerName);const r=typeof e=="string"?e:e.text??"",n=t||process.env.OLLAMA_EMBEDDING_MODEL||YX,[o]=await this.callEmbeddings(n,[r],"embed");return o}async embedMany(e,t){const r=t||process.env.OLLAMA_EMBEDDING_MODEL||YX;return this.callEmbeddings(r,e,"embedMany")}async callEmbeddings(e,t,r){const n=`${Ca(this.config.baseURL)}/embeddings`,o=Mt(),s=ma(Jkt,this.providerName,"generate");try{const i=await o(n,{method:"POST",headers:{"Content-Type":"application/json",...this.getAuthHeaders()},body:JSON.stringify({model:e,input:t.length===1?t[0]:t}),...s?.controller.signal?{signal:s.controller.signal}:{}});if(!i.ok){const l=await i.text().catch(()=>"");let u;if(l)try{u=JSON.parse(l)}catch{u=void 0}throw this.formatProviderError(new Error(u?.error?.message||`Ollama ${r} failed with status ${i.status}`))}const c=((await i.json()).data??[]).map(l=>l.embedding).filter(l=>Array.isArray(l));if(c.length===0)throw new ot(`Ollama ${r} returned no embeddings`,"ollama");return c}finally{s?.cleanup()}}}}}),Zkt={};se(Zkt,{DEFAULT_OLLAMA_MODEL:()=>KC,FALLBACK_OLLAMA_MODEL:()=>Hkt,OllamaProvider:()=>Xkt,proxyFetch:()=>Vkt});var NFr=S({"src/lib/providers/ollama/index.ts"(){"use strict";OFr(),BO()}});function LFr(){YC.clear(),zO.clear(),qO.clear()}async function FFr(e,t){const r=`${e}/model/info`,n=Mt(),o=new AbortController,s=setTimeout(()=>o.abort(),5e3);try{const i=await n(r,{method:"GET",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"},signal:o.signal});if(!i.ok)throw new Error(`HTTP ${i.status}: ${i.statusText}`);const a=await i.json(),c=u=>typeof u=="number"&&Number.isFinite(u)&&u>0,l=new Map;for(const u of a.data??[]){const d=u?.model_name;if(typeof d!="string"||d.length===0)continue;const m=u?.model_info?.max_input_tokens,h=u?.model_info?.max_output_tokens;if(!c(m)&&!c(h))continue;const f=l.get(d)??{};c(m)&&(f.maxInputTokens=f.maxInputTokens===void 0?m:Math.min(f.maxInputTokens,m)),c(h)&&(f.maxOutputTokens=f.maxOutputTokens===void 0?h:Math.min(f.maxOutputTokens,h)),l.set(d,f)}return l}catch(i){throw cr(i)?new Go("Request timed out after 5 seconds","litellm"):i}finally{clearTimeout(s)}}function XX(e,t){const r=Ca(e),n=zO.get(r)??0;if(Date.now()-n<rAt)return Promise.resolve();const o=YC.get(r);if(o)return o;const s=FFr(r,t).then(i=>{qO.set(r,i);const a=new Map;for(const c of qO.values())for(const[l,u]of c){const d=a.get(l)??{};u.maxInputTokens!==void 0&&(d.maxInputTokens=d.maxInputTokens===void 0?u.maxInputTokens:Math.min(d.maxInputTokens,u.maxInputTokens)),u.maxOutputTokens!==void 0&&(d.maxOutputTokens=d.maxOutputTokens===void 0?u.maxOutputTokens:Math.min(d.maxOutputTokens,u.maxOutputTokens)),a.set(l,d)}for(const[c,l]of a)l.maxInputTokens!==void 0&&xV("litellm",c,l.maxInputTokens),l.maxOutputTokens!==void 0&&net("litellm",c,l.maxOutputTokens);zO.set(r,Date.now()),i.size>0&&p.debug("[LiteLLM] Registered runtime model limits from /model/info",{baseURL:No(r),models:i.size})}).catch(i=>{p.debug("[LiteLLM] /model/info discovery failed; static context-window defaults remain in force",{error:i instanceof Error?i.message:String(i)})}).finally(()=>{YC.delete(r)});return YC.set(r,s),s}var Qkt,ZX,eAt,tAt,rAt,YC,zO,qO,nAt,oAt,$Fr=S({"src/lib/providers/litellm/client.ts"(){"use strict";Xt(),Sl(),Dn(),ut(),zi(),Ze(),z(),Ut(),zP(),Ja(),ts(),ha(),yp(),kl(),Qkt=lt.getTracer("neurolink.provider.litellm"),ZX="openai/gpt-4o-mini",eAt=()=>({baseURL:process.env.LITELLM_BASE_URL||"http://localhost:4000",apiKey:process.env.LITELLM_API_KEY||"sk-anything"}),tAt=()=>_i("LITELLM_MODEL",ZX),rAt=600*1e3,YC=new Map,zO=new Map,qO=new Map,nAt=e=>{const t=e.includes("/")?e.slice(e.lastIndexOf("/")+1):e;return Lgt(t)},oAt=class Em extends Lc{static modelsCache=[];static modelsCacheTime=0;static MODELS_CACHE_DURATION=600*1e3;constructor(t,r,n,o){const s=eAt();super("litellm",t,r,{baseURL:o?.baseURL??s.baseURL,apiKey:o?.apiKey??s.apiKey}),XX(this.config.baseURL,this.config.apiKey),p.debug("LiteLLM Provider initialized",{modelName:this.modelName,provider:this.providerName,baseURL:No(this.config.baseURL)})}async ensureModelLimits(){await XX(this.config.baseURL,this.config.apiKey)}getProviderName(){return"litellm"}getDefaultModel(){return tAt()}getFallbackModelName(){return ZX}getFallbackModels(){return process.env.LITELLM_FALLBACK_MODELS?.split(",").map(t=>t.trim()).filter(t=>t.length>0)||["openai/gpt-4o","anthropic/claude-3-haiku","meta-llama/llama-3.1-8b-instruct","google/gemini-2.5-flash"]}useStreamingWireForGenerate(){return process.env.NEUROLINK_LITELLM_SSE_GENERATE!=="false"}adjustBuildBodyOptions(t,r){return nAt(t)&&r.maxTokens!==void 0?(p.shouldLog("debug")&&p.debug("LiteLLM: Skipping maxTokens for Gemini 2.5 model (known compatibility issue)",{modelId:t,requestedMaxTokens:r.maxTokens}),{...r,maxTokens:void 0}):r}onStreamStart(t){const r=Qkt.startSpan("neurolink.provider.streamText",{kind:zr.CLIENT,attributes:{"gen_ai.system":"litellm","gen_ai.request.model":t}});let n=!1;const o=()=>{n||(n=!0,r.end())};return{onUsage:s=>{r.setAttribute("gen_ai.usage.input_tokens",s.promptTokens+(s.cacheReadTokens??0)+(s.cacheCreationTokens??0)),r.setAttribute("gen_ai.usage.output_tokens",s.completionTokens);const i=xi(this.providerName,t,{input:s.promptTokens,output:s.completionTokens,total:s.totalTokens,...s.cacheReadTokens?{cacheReadTokens:s.cacheReadTokens}:{},...s.cacheCreationTokens?{cacheCreationTokens:s.cacheCreationTokens}:{}});i&&i>0&&r.setAttribute("neurolink.cost",i)},onFinish:(s,i)=>{r.setAttribute("gen_ai.response.finish_reason",s||"unknown"),s==="error"&&r.setStatus({code:Ue.ERROR,message:i instanceof Error?i.message:String(i??"stream error")}),o()}}}formatProviderError(t){const r=t;if(typeof r?.message=="string"&&Nme(r.message))return new Ay(r.message,{provider:this.providerName,requestedModel:this.modelName,allowedModels:Ome(r.message)});const n=[{match:o=>o.errorName==="TimeoutError"||/timeout/i.test(o.message),errorClass:Go,message:o=>`Request timed out: ${o.message}`},{match:o=>/ECONNREFUSED|Failed to fetch/.test(o.message),errorClass:Go,message:()=>"LiteLLM proxy server not available. Please start the LiteLLM proxy server at "+No(this.config.baseURL)},{match:o=>/API_KEY_INVALID|Invalid API key/.test(o.message),errorClass:Pr,message:"Invalid LiteLLM configuration. Please check your LITELLM_API_KEY environment variable."},{match:o=>/rate limit/i.test(o.message),errorClass:$s,message:"LiteLLM rate limit exceeded. Please try again later."},{match:o=>/model/i.test(o.message)&&/not found/i.test(o.message),errorClass:Do,message:()=>`Model '${this.modelName}' not available in LiteLLM proxy. Please check your LiteLLM configuration and ensure the model is configured.`},..._c];return fa(t,n,this.providerName,this.modelName)}async getAvailableModels(){const t=Date.now();if(Em.modelsCache.length>0&&t-Em.modelsCacheTime<Em.MODELS_CACHE_DURATION)return p.debug("[LiteLLMProvider.getAvailableModels] Using cached models",{cacheAge:Math.round((t-Em.modelsCacheTime)/1e3),modelCount:Em.modelsCache.length}),Em.modelsCache;try{const r=await this.fetchModelsFromAPI();if(r.length>0)return Em.modelsCache=r,Em.modelsCacheTime=t,r}catch(r){p.warn("[LiteLLMProvider.getAvailableModels] Failed to fetch models from API, using fallback",{error:r instanceof Error?r.message:String(r)})}return this.getFallbackModels()}async fetchModelsFromAPI(){const r=`${Ca(this.config.baseURL).replace(/\/v1$/,"")}/v1/models`,n=Mt(),o=new AbortController,s=setTimeout(()=>o.abort(),5e3);try{const i=await n(r,{method:"GET",headers:{Authorization:`Bearer ${this.config.apiKey}`,"Content-Type":"application/json"},signal:o.signal});if(!i.ok)throw new Error(`HTTP ${i.status}: ${i.statusText}`);const a=await i.json();if(!Array.isArray(a.data))throw new Error("Invalid response format: expected data.data array");return a.data.map(c=>c.id).filter(c=>typeof c=="string"&&c.length>0).sort()}catch(i){throw cr(i)?new Go("Request timed out after 5 seconds",this.providerName):i}finally{clearTimeout(s)}}async embed(t,r){if(typeof t!="string"&&t.image)throw new ot(`${this.providerName} does not support image embeddings; provide text input`,this.providerName);const n=typeof t=="string"?t:t.text??"",o=r||process.env.LITELLM_EMBEDDING_MODEL||"gemini-embedding-001",[s]=await this.callEmbeddings(o,[n],"embed");return s}async embedMany(t,r){const n=r||process.env.LITELLM_EMBEDDING_MODEL||"gemini-embedding-001";return this.callEmbeddings(n,t,"embedMany")}async callEmbeddings(t,r,n){const o=`${Ca(this.config.baseURL)}/embeddings`,s=Mt(),i=ma(3e4,this.providerName,"generate");try{const a=await s(o,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.config.apiKey}`},body:JSON.stringify({model:t,input:r.length===1?r[0]:r}),...i?.controller.signal?{signal:i.controller.signal}:{}});if(!a.ok){const u=await a.text().catch(()=>""),d=u?JSON.parse(u):void 0;throw this.formatProviderError(new Error(d?.error?.message||`LiteLLM ${n} failed with status ${a.status}`))}const l=((await a.json()).data??[]).map(u=>u.embedding).filter(u=>Array.isArray(u));if(l.length===0)throw new ot(`LiteLLM ${n} returned no embeddings`,this.providerName);return l}finally{i?.cleanup()}}}}}),sAt={};se(sAt,{LiteLLMProvider:()=>oAt,clearLiteLLMModelLimitsCache:()=>LFr,ensureLiteLLMModelLimits:()=>XX});var UFr=S({"src/lib/providers/litellm/index.ts"(){"use strict";$Fr()}}),GO,iAt=S({"src/lib/providers/openaiCompatible/constants.ts"(){"use strict";GO="gpt-3.5-turbo"}}),QX,eZ,aAt=S({"src/lib/providers/openaiCompatible/utils.ts"(){"use strict";QX=()=>{const e=process.env.OPENAI_COMPATIBLE_BASE_URL,t=process.env.OPENAI_COMPATIBLE_API_KEY;if(!e)throw new Error("OPENAI_COMPATIBLE_BASE_URL environment variable is required. Please set it to your OpenAI-compatible endpoint (e.g., https://api.openrouter.ai/api/v1)");if(!t)throw new Error("OPENAI_COMPATIBLE_API_KEY environment variable is required. Please set it to your API key for the OpenAI-compatible service.");return{baseURL:e,apiKey:t}},eZ=()=>process.env.OPENAI_COMPATIBLE_MODEL||void 0}}),cAt,BFr=S({"src/lib/providers/openaiCompatible/client.ts"(){"use strict";ut(),z(),Ut(),zi(),kl(),iAt(),aAt(),cAt=class extends Lc{constructor(e,t,r,n){const o=n?.apiKey&&n?.baseURL?{apiKey:n.apiKey,baseURL:n.baseURL}:(()=>{const s=QX();return{apiKey:n?.apiKey??s.apiKey,baseURL:n?.baseURL??s.baseURL}})();super("openai-compatible",e,t,o),p.debug("OpenAI Compatible Provider initialized",{modelName:this.modelName,provider:this.providerName,baseURL:No(this.config.baseURL)})}getProviderName(){return"openai-compatible"}getDefaultModel(){return eZ()||""}getFallbackModelName(){return GO}getFallbackModels(){return["gpt-4o","gpt-4o-mini","gpt-4-turbo",GO,"claude-3-5-sonnet","claude-3-haiku","gemini-pro"]}formatProviderError(e){const t=[{match:r=>r.errorName==="TimeoutError"||/Timeout/.test(r.message),errorClass:Go,message:r=>`Request timed out: ${r.message}`},{match:r=>/ECONNREFUSED|Failed to fetch/i.test(r.message),errorClass:Go,message:()=>`OpenAI Compatible endpoint not available. Please check your OPENAI_COMPATIBLE_BASE_URL: ${No(this.config.baseURL)}`},{match:r=>r.statusCode===401||/API_KEY_INVALID|Invalid API key|Unauthorized/i.test(r.message),errorClass:Pr,message:"Invalid OpenAI Compatible API key. Please check your OPENAI_COMPATIBLE_API_KEY environment variable."},{match:r=>/model/i.test(r.message)&&(/not found/i.test(r.message)||/does not exist/i.test(r.message)),errorClass:Do,message:r=>`Model '${r.modelName}' not available on OpenAI Compatible endpoint. Please check available models or use getAvailableModels() to see supported models.`},..._c];return fa(e,t,this.providerName,this.modelName)}}}}),lAt={};se(lAt,{FALLBACK_OPENAI_COMPATIBLE_MODEL:()=>GO,OpenAICompatibleProvider:()=>cAt,getDefaultOpenAICompatibleModel:()=>eZ,getOpenAICompatibleConfig:()=>QX});var zFr=S({"src/lib/providers/openaiCompatible/index.ts"(){"use strict";BFr(),iAt(),aAt()}}),XC,uAt=S({"src/lib/providers/openRouter/utils.ts"(){"use strict";ts(),XC=()=>_i("OPENROUTER_MODEL","anthropic/claude-sonnet-4.5")}}),dAt,jO,mAt,pAt,qFr=S({"src/lib/providers/openRouter/client.ts"(){"use strict";ut(),Dn(),zi(),Ze(),z(),Ut(),kl(),yp(),uAt(),dAt="https://openrouter.ai/api/v1",jO=5e3,mAt=()=>{const e=process.env.OPENROUTER_API_KEY;if(!e)throw new Error("OPENROUTER_API_KEY environment variable is required. Get your API key at https://openrouter.ai/keys");return e},pAt=class Ua extends Lc{referer;appName;static modelsCache=[];static modelsCacheTime=0;static MODELS_CACHE_DURATION=600*1e3;static toolCapableModels=new Set;static capabilitiesCached=!1;constructor(t,r,n,o){const s=o?.apiKey?.trim(),i=s&&s.length>0?s:mAt(),a=o?.baseURL?.trim()||process.env.OPENROUTER_BASE_URL?.trim()||dAt;super("openrouter",t,r,{baseURL:a,apiKey:i}),this.referer=process.env.OPENROUTER_REFERER?.trim()||void 0,this.appName=process.env.OPENROUTER_APP_NAME?.trim()||void 0,p.debug("OpenRouter Provider initialized",{modelName:this.modelName,providerName:this.providerName,baseURL:No(this.config.baseURL)})}getProviderName(){return"openrouter"}getDefaultModel(){return XC()}formatProviderError(t){const r=[{match:n=>n.errorName==="TimeoutError"||/Timeout/.test(n.message),errorClass:Go,message:n=>`Request timed out: ${n.message}`},{match:n=>/ECONNREFUSED|Failed to fetch/.test(n.message),errorClass:Go,message:"OpenRouter API not available. Please check your network connection and try again."},{match:n=>/API_KEY_INVALID|Invalid API key|invalid_api_key|Unauthorized/.test(n.message),errorClass:Pr,message:"Invalid OpenRouter API key. Please check your OPENROUTER_API_KEY environment variable. Get your key at https://openrouter.ai/keys"},{match:n=>/rate limit/.test(n.message),errorClass:$s,message:"OpenRouter rate limit exceeded. Please try again later or upgrade your account at https://openrouter.ai/credits"},{match:n=>/model/.test(n.message)&&/not found/.test(n.message),errorClass:Do,message:()=>`Model '${this.modelName}' not available on OpenRouter. Browse available models at https://openrouter.ai/models`},{match:n=>/insufficient_credits/.test(n.message),errorClass:ot,message:"Insufficient OpenRouter credits. Add credits at https://openrouter.ai/credits"},{match:n=>/No endpoints found/.test(n.message),errorClass:Do,message:()=>`No endpoints found for model '${this.modelName}' on OpenRouter. The model may be temporarily unavailable or does not support the requested parameters. Try a different model or check availability at https://openrouter.ai/models`},{match:n=>/tool use|tool_use|function_call|tools are not supported/.test(n.message),errorClass:ot,message:()=>`Model '${this.modelName}' does not support tool calling. Use a tool-capable model like:
|
|
1157
1157
|
\u2022 google/gemini-2.0-flash-exp:free (free)
|
|
1158
1158
|
\u2022 meta-llama/llama-3.3-70b-instruct:free (free)
|
|
1159
1159
|
\u2022 anthropic/claude-3.7-sonnet (paid)
|