@psnext/slingcli 3.0.20260811-2 → 3.0.20260811-3

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.
@@ -33,7 +33,7 @@ ${s}`),i.push({type:"error",reason:r.stopReason,error:r}),i.end()}})(),i},iB=(t,
33
33
  `);for(;s!==-1;){let a=DR(i.slice(0,s));a&&(yield a),i=i.slice(s+2),s=i.indexOf(`
34
34
 
35
35
  `)}if(r)break}if(i.trim()){let r=DR(i);r&&(yield r)}}finally{n.releaseLock()}}function DR(t){let e=t.split(`
36
- `).find(n=>n.startsWith("data:"))?.slice(5).trim();return e&&e!=="[DONE]"?JSON.parse(e):void 0}function OB(t,e,n){let i=n?"aborted":"error",r={role:"assistant",content:[],api:t.api,provider:t.provider,model:t.id,usage:UR(),stopReason:i,errorMessage:e instanceof Error?e.message:String(e),timestamp:Date.now()};return!n&&e instanceof iu&&Vc(r,Od("pi_messages_response_failure",e,e.diagnosticDetails)),{type:"error",reason:i,error:r}}function LB(t,e){return t||(Fe("PI_CACHE_RETENTION",e)==="long"?"long":void 0)}var iu,$R,WB,BR=Ae(()=>{"use strict";Qc();qn();Ei();Bo();lr();iu=class extends Error{constructor(e,n,i){super(e),this.name="PiMessagesResponseError",this.code=n,this.diagnosticDetails=i}};$R=(t,e,n)=>{let i=new pt,r=EB(t);return(async()=>{try{let o=n?.apiKey;if(!o)throw new Error(`No API key provided for provider "${t.provider}"`);let s=new URL(`${t.baseUrl.replace(/\/+$/u,"")}/messages`);n?.debug&&s.searchParams.set("debug","1");let a={model:t.id,context:e,options:{temperature:n?.temperature,maxTokens:n?.maxTokens,reasoning:n?.reasoning,cacheRetention:LB(n?.cacheRetention,n?.env),sessionId:n?.sessionId,toolChoice:n?.toolChoice}},l=await n?.onPayload?.(a,t);l!==void 0&&(a=l);let c=await(n?.fetch??globalThis.fetch)(s,{method:"POST",headers:{authorization:`Bearer ${o}`,accept:"text/event-stream","content-type":"application/json",...Ka(n?.headers)},body:JSON.stringify(a),signal:n?.signal});if(await n?.onResponse?.({status:c.status,headers:Xt(c.headers)},t),!c.ok){let u=await c.text();throw AB(t,s,c,u)}if(!c.body)throw new Error(`${t.provider} response has no body`);for await(let u of _B(c.body)){let p=r(u);if(i.push(p),p.type==="done"||p.type==="error")return}throw new Error(`${t.provider} stream ended without a terminal event`)}catch(o){i.push(OB(t,o,n?.signal?.aborted??!1))}})(),i},WB=(t,e,n)=>{let i=n;return $R(t,e,{...n,reasoning:n?.reasoning,toolChoice:i?.toolChoice,debug:i?.debug})}});var nn=M(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.HasPropertyKey=_Z;Ft.IsAsyncIterator=OZ;Ft.IsArray=tw;Ft.IsBigInt=LZ;Ft.IsBoolean=WZ;Ft.IsDate=FZ;Ft.IsFunction=DZ;Ft.IsIterator=UZ;Ft.IsNull=$Z;Ft.IsNumber=NZ;Ft.IsObject=nw;Ft.IsRegExp=BZ;Ft.IsString=jZ;Ft.IsSymbol=qZ;Ft.IsUint8Array=iw;Ft.IsUndefined=GZ;function _Z(t,e){return e in t}function OZ(t){return nw(t)&&!tw(t)&&!iw(t)&&Symbol.asyncIterator in t}function tw(t){return Array.isArray(t)}function LZ(t){return typeof t=="bigint"}function WZ(t){return typeof t=="boolean"}function FZ(t){return t instanceof globalThis.Date}function DZ(t){return typeof t=="function"}function UZ(t){return nw(t)&&!tw(t)&&!iw(t)&&Symbol.iterator in t}function $Z(t){return t===null}function NZ(t){return typeof t=="number"}function nw(t){return typeof t=="object"&&t!==null}function BZ(t){return t instanceof globalThis.RegExp}function jZ(t){return typeof t=="string"}function qZ(t){return typeof t=="symbol"}function iw(t){return t instanceof globalThis.Uint8Array}function GZ(t){return t===void 0}});var bn=M(Mr=>{"use strict";var KZ=Mr&&Mr.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),HZ=Mr&&Mr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),zZ=Mr&&Mr.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;r<i.length;r++)i[r]!=="default"&&KZ(n,e,i[r]);return HZ(n,e),n}})();Object.defineProperty(Mr,"__esModule",{value:!0});Mr.Clone=ZZ;var $p=zZ(nn());function VZ(t){return t.map(e=>jg(e))}function QZ(t){return new Date(t.getTime())}function JZ(t){return new Uint8Array(t)}function YZ(t){return new RegExp(t.source,t.flags)}function XZ(t){let e={};for(let n of Object.getOwnPropertyNames(t))e[n]=jg(t[n]);for(let n of Object.getOwnPropertySymbols(t))e[n]=jg(t[n]);return e}function jg(t){return $p.IsArray(t)?VZ(t):$p.IsDate(t)?QZ(t):$p.IsUint8Array(t)?JZ(t):$p.IsRegExp(t)?YZ(t):$p.IsObject(t)?XZ(t):t}function ZZ(t){return jg(t)}});var Gg=M(qg=>{"use strict";Object.defineProperty(qg,"__esModule",{value:!0});qg.CloneRest=eee;qg.CloneType=T2;var S2=bn();function eee(t){return t.map(e=>T2(e))}function T2(t,e){return e===void 0?(0,S2.Clone)(t):(0,S2.Clone)({...e,...t})}});var rw=M(Co=>{"use strict";var tee=Co&&Co.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),k2=Co&&Co.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&tee(e,t,n)};Object.defineProperty(Co,"__esModule",{value:!0});k2(Gg(),Co);k2(bn(),Co)});var L2=M(We=>{"use strict";Object.defineProperty(We,"__esModule",{value:!0});We.IsAsyncIterator=nee;We.IsIterator=iee;We.IsStandardObject=ree;We.IsInstanceObject=oee;We.IsPromise=see;We.IsDate=aee;We.IsMap=lee;We.IsSet=cee;We.IsRegExp=uee;We.IsTypedArray=pee;We.IsInt8Array=dee;We.IsUint8Array=mee;We.IsUint8ClampedArray=hee;We.IsInt16Array=gee;We.IsUint16Array=fee;We.IsInt32Array=bee;We.IsUint32Array=xee;We.IsFloat32Array=vee;We.IsFloat64Array=yee;We.IsBigInt64Array=wee;We.IsBigUint64Array=See;We.HasPropertyKey=Tee;We.IsObject=Np;We.IsArray=C2;We.IsUndefined=R2;We.IsNull=M2;We.IsBoolean=P2;We.IsNumber=I2;We.IsInteger=kee;We.IsBigInt=A2;We.IsString=E2;We.IsFunction=_2;We.IsSymbol=O2;We.IsValueType=Cee;function nee(t){return Np(t)&&globalThis.Symbol.asyncIterator in t}function iee(t){return Np(t)&&globalThis.Symbol.iterator in t}function ree(t){return Np(t)&&(globalThis.Object.getPrototypeOf(t)===Object.prototype||globalThis.Object.getPrototypeOf(t)===null)}function oee(t){return Np(t)&&!C2(t)&&_2(t.constructor)&&t.constructor.name!=="Object"}function see(t){return t instanceof globalThis.Promise}function aee(t){return t instanceof Date&&globalThis.Number.isFinite(t.getTime())}function lee(t){return t instanceof globalThis.Map}function cee(t){return t instanceof globalThis.Set}function uee(t){return t instanceof globalThis.RegExp}function pee(t){return globalThis.ArrayBuffer.isView(t)}function dee(t){return t instanceof globalThis.Int8Array}function mee(t){return t instanceof globalThis.Uint8Array}function hee(t){return t instanceof globalThis.Uint8ClampedArray}function gee(t){return t instanceof globalThis.Int16Array}function fee(t){return t instanceof globalThis.Uint16Array}function bee(t){return t instanceof globalThis.Int32Array}function xee(t){return t instanceof globalThis.Uint32Array}function vee(t){return t instanceof globalThis.Float32Array}function yee(t){return t instanceof globalThis.Float64Array}function wee(t){return t instanceof globalThis.BigInt64Array}function See(t){return t instanceof globalThis.BigUint64Array}function Tee(t,e){return e in t}function Np(t){return t!==null&&typeof t=="object"}function C2(t){return globalThis.Array.isArray(t)&&!globalThis.ArrayBuffer.isView(t)}function R2(t){return t===void 0}function M2(t){return t===null}function P2(t){return typeof t=="boolean"}function I2(t){return typeof t=="number"}function kee(t){return globalThis.Number.isInteger(t)}function A2(t){return typeof t=="bigint"}function E2(t){return typeof t=="string"}function _2(t){return typeof t=="function"}function O2(t){return typeof t=="symbol"}function Cee(t){return A2(t)||P2(t)||M2(t)||I2(t)||E2(t)||O2(t)||R2(t)}});var W2=M(_s=>{"use strict";var Ree=_s&&_s.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Mee=_s&&_s.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Ree(e,t,n)};Object.defineProperty(_s,"__esModule",{value:!0});Mee(L2(),_s)});var D2=M(Hg=>{"use strict";Object.defineProperty(Hg,"__esModule",{value:!0});Hg.TypeSystemPolicy=void 0;var Kg=W2(),F2;(function(t){t.InstanceMode="default",t.ExactOptionalPropertyTypes=!1,t.AllowArrayObject=!1,t.AllowNaN=!1,t.AllowNullVoid=!1;function e(s,a){return t.ExactOptionalPropertyTypes?a in s:s[a]!==void 0}t.IsExactOptionalProperty=e;function n(s){let a=(0,Kg.IsObject)(s);return t.AllowArrayObject?a:a&&!(0,Kg.IsArray)(s)}t.IsObjectLike=n;function i(s){return n(s)&&!(s instanceof Date)&&!(s instanceof Uint8Array)}t.IsRecordLike=i;function r(s){return t.AllowNaN?(0,Kg.IsNumber)(s):Number.isFinite(s)}t.IsNumberLike=r;function o(s){let a=(0,Kg.IsUndefined)(s);return t.AllowNullVoid?a||s===null:a}t.IsVoidLike=o})(F2||(Hg.TypeSystemPolicy=F2={}))});var U2=M(Pr=>{"use strict";var Pee=Pr&&Pr.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Iee=Pr&&Pr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Aee=Pr&&Pr.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;r<i.length;r++)i[r]!=="default"&&Pee(n,e,i[r]);return Iee(n,e),n}})();Object.defineProperty(Pr,"__esModule",{value:!0});Pr.Immutable=zg;var Bp=Aee(nn());function Eee(t){return globalThis.Object.freeze(t).map(e=>zg(e))}function _ee(t){let e={};for(let n of Object.getOwnPropertyNames(t))e[n]=zg(t[n]);for(let n of Object.getOwnPropertySymbols(t))e[n]=zg(t[n]);return globalThis.Object.freeze(e)}function zg(t){return Bp.IsArray(t)?Eee(t):Bp.IsDate(t)?t:Bp.IsUint8Array(t)?t:Bp.IsRegExp(t)?t:Bp.IsObject(t)?_ee(t):t}});var fe=M(ow=>{"use strict";Object.defineProperty(ow,"__esModule",{value:!0});ow.CreateType=Fee;var Oee=D2(),Lee=U2(),Wee=bn();function Fee(t,e){let n=e!==void 0?{...e,...t}:t;switch(Oee.TypeSystemPolicy.InstanceMode){case"freeze":return(0,Lee.Immutable)(n);case"clone":return(0,Wee.Clone)(n);default:return n}}});var Ir=M(Os=>{"use strict";var Dee=Os&&Os.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Uee=Os&&Os.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Dee(e,t,n)};Object.defineProperty(Os,"__esModule",{value:!0});Uee(fe(),Os)});var $2=M(Vg=>{"use strict";Object.defineProperty(Vg,"__esModule",{value:!0});Vg.TypeBoxError=void 0;var sw=class extends Error{constructor(e){super(e)}};Vg.TypeBoxError=sw});var Ki=M(Ls=>{"use strict";var $ee=Ls&&Ls.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Nee=Ls&&Ls.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&$ee(e,t,n)};Object.defineProperty(Ls,"__esModule",{value:!0});Nee($2(),Ls)});var jp=M(ri=>{"use strict";Object.defineProperty(ri,"__esModule",{value:!0});ri.Kind=ri.Hint=ri.OptionalKind=ri.ReadonlyKind=ri.TransformKind=void 0;ri.TransformKind=Symbol.for("TypeBox.Transform");ri.ReadonlyKind=Symbol.for("TypeBox.Readonly");ri.OptionalKind=Symbol.for("TypeBox.Optional");ri.Hint=Symbol.for("TypeBox.Hint");ri.Kind=Symbol.for("TypeBox.Kind")});var ge=M(Ws=>{"use strict";var Bee=Ws&&Ws.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),jee=Ws&&Ws.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Bee(e,t,n)};Object.defineProperty(Ws,"__esModule",{value:!0});jee(jp(),Ws)});var Ue=M(de=>{"use strict";var qee=de&&de.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Gee=de&&de.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Kee=de&&de.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;r<i.length;r++)i[r]!=="default"&&qee(n,e,i[r]);return Gee(n,e),n}})();Object.defineProperty(de,"__esModule",{value:!0});de.IsReadonly=Hee;de.IsOptional=zee;de.IsAny=N2;de.IsArgument=B2;de.IsArray=j2;de.IsAsyncIterator=q2;de.IsBigInt=G2;de.IsBoolean=K2;de.IsComputed=H2;de.IsConstructor=z2;de.IsDate=V2;de.IsFunction=Q2;de.IsImport=Vee;de.IsInteger=J2;de.IsProperties=Qee;de.IsIntersect=Y2;de.IsIterator=X2;de.IsKindOf=Oe;de.IsLiteralString=Jee;de.IsLiteralNumber=Yee;de.IsLiteralBoolean=Xee;de.IsLiteralValue=Zee;de.IsLiteral=qp;de.IsMappedKey=Z2;de.IsMappedResult=e5;de.IsNever=t5;de.IsNot=n5;de.IsNull=i5;de.IsNumber=r5;de.IsObject=o5;de.IsPromise=s5;de.IsRecord=a5;de.IsRecursive=ete;de.IsRef=l5;de.IsRegExp=c5;de.IsString=u5;de.IsSymbol=p5;de.IsTemplateLiteral=d5;de.IsThis=m5;de.IsTransform=tte;de.IsTuple=h5;de.IsUndefined=g5;de.IsUnion=f5;de.IsUint8Array=b5;de.IsUnknown=x5;de.IsUnsafe=v5;de.IsVoid=y5;de.IsKind=w5;de.IsSchema=nte;var xn=Kee(nn()),Ar=ge();function Hee(t){return xn.IsObject(t)&&t[Ar.ReadonlyKind]==="Readonly"}function zee(t){return xn.IsObject(t)&&t[Ar.OptionalKind]==="Optional"}function N2(t){return Oe(t,"Any")}function B2(t){return Oe(t,"Argument")}function j2(t){return Oe(t,"Array")}function q2(t){return Oe(t,"AsyncIterator")}function G2(t){return Oe(t,"BigInt")}function K2(t){return Oe(t,"Boolean")}function H2(t){return Oe(t,"Computed")}function z2(t){return Oe(t,"Constructor")}function V2(t){return Oe(t,"Date")}function Q2(t){return Oe(t,"Function")}function Vee(t){return Oe(t,"Import")}function J2(t){return Oe(t,"Integer")}function Qee(t){return xn.IsObject(t)}function Y2(t){return Oe(t,"Intersect")}function X2(t){return Oe(t,"Iterator")}function Oe(t,e){return xn.IsObject(t)&&Ar.Kind in t&&t[Ar.Kind]===e}function Jee(t){return qp(t)&&xn.IsString(t.const)}function Yee(t){return qp(t)&&xn.IsNumber(t.const)}function Xee(t){return qp(t)&&xn.IsBoolean(t.const)}function Zee(t){return xn.IsBoolean(t)||xn.IsNumber(t)||xn.IsString(t)}function qp(t){return Oe(t,"Literal")}function Z2(t){return Oe(t,"MappedKey")}function e5(t){return Oe(t,"MappedResult")}function t5(t){return Oe(t,"Never")}function n5(t){return Oe(t,"Not")}function i5(t){return Oe(t,"Null")}function r5(t){return Oe(t,"Number")}function o5(t){return Oe(t,"Object")}function s5(t){return Oe(t,"Promise")}function a5(t){return Oe(t,"Record")}function ete(t){return xn.IsObject(t)&&Ar.Hint in t&&t[Ar.Hint]==="Recursive"}function l5(t){return Oe(t,"Ref")}function c5(t){return Oe(t,"RegExp")}function u5(t){return Oe(t,"String")}function p5(t){return Oe(t,"Symbol")}function d5(t){return Oe(t,"TemplateLiteral")}function m5(t){return Oe(t,"This")}function tte(t){return xn.IsObject(t)&&Ar.TransformKind in t}function h5(t){return Oe(t,"Tuple")}function g5(t){return Oe(t,"Undefined")}function f5(t){return Oe(t,"Union")}function b5(t){return Oe(t,"Uint8Array")}function x5(t){return Oe(t,"Unknown")}function v5(t){return Oe(t,"Unsafe")}function y5(t){return Oe(t,"Void")}function w5(t){return xn.IsObject(t)&&Ar.Kind in t&&xn.IsString(t[Ar.Kind])}function nte(t){return N2(t)||B2(t)||j2(t)||K2(t)||G2(t)||q2(t)||H2(t)||z2(t)||V2(t)||Q2(t)||J2(t)||Y2(t)||X2(t)||qp(t)||Z2(t)||e5(t)||t5(t)||n5(t)||i5(t)||r5(t)||o5(t)||s5(t)||a5(t)||l5(t)||c5(t)||u5(t)||p5(t)||d5(t)||m5(t)||h5(t)||g5(t)||f5(t)||b5(t)||x5(t)||v5(t)||y5(t)||w5(t)}});var uW=M(le=>{"use strict";var ite=le&&le.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),rte=le&&le.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),ote=le&&le.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;r<i.length;r++)i[r]!=="default"&&ite(n,e,i[r]);return rte(n,e),n}})();Object.defineProperty(le,"__esModule",{value:!0});le.TypeGuardUnknownTypeError=void 0;le.IsReadonly=ute;le.IsOptional=pte;le.IsAny=C5;le.IsArgument=R5;le.IsArray=M5;le.IsAsyncIterator=P5;le.IsBigInt=I5;le.IsBoolean=A5;le.IsComputed=E5;le.IsConstructor=_5;le.IsDate=O5;le.IsFunction=L5;le.IsImport=dte;le.IsInteger=W5;le.IsProperties=Qg;le.IsIntersect=F5;le.IsIterator=D5;le.IsKindOf=Le;le.IsLiteralString=U5;le.IsLiteralNumber=$5;le.IsLiteralBoolean=mte;le.IsLiteral=Kp;le.IsLiteralValue=N5;le.IsMappedKey=B5;le.IsMappedResult=j5;le.IsNever=q5;le.IsNot=G5;le.IsNull=K5;le.IsNumber=H5;le.IsObject=z5;le.IsPromise=V5;le.IsRecord=Q5;le.IsRecursive=hte;le.IsRef=J5;le.IsRegExp=Y5;le.IsString=X5;le.IsSymbol=Z5;le.IsTemplateLiteral=eW;le.IsThis=tW;le.IsTransform=nW;le.IsTuple=iW;le.IsUndefined=rW;le.IsUnionLiteral=gte;le.IsUnion=uw;le.IsUint8Array=oW;le.IsUnknown=sW;le.IsUnsafe=aW;le.IsVoid=lW;le.IsKind=cW;le.IsSchema=Dt;var ue=ote(nn()),Hi=ge(),ste=Ki(),aw=class extends ste.TypeBoxError{};le.TypeGuardUnknownTypeError=aw;var ate=["Argument","Any","Array","AsyncIterator","BigInt","Boolean","Computed","Constructor","Date","Enum","Function","Integer","Intersect","Iterator","Literal","MappedKey","MappedResult","Not","Null","Number","Object","Promise","Record","Ref","RegExp","String","Symbol","TemplateLiteral","This","Tuple","Undefined","Union","Uint8Array","Unknown","Void"];function S5(t){try{return new RegExp(t),!0}catch{return!1}}function lw(t){if(!ue.IsString(t))return!1;for(let e=0;e<t.length;e++){let n=t.charCodeAt(e);if(n>=7&&n<=13||n===27||n===127)return!1}return!0}function T5(t){return cw(t)||Dt(t)}function Gp(t){return ue.IsUndefined(t)||ue.IsBigInt(t)}function Je(t){return ue.IsUndefined(t)||ue.IsNumber(t)}function cw(t){return ue.IsUndefined(t)||ue.IsBoolean(t)}function Ke(t){return ue.IsUndefined(t)||ue.IsString(t)}function lte(t){return ue.IsUndefined(t)||ue.IsString(t)&&lw(t)&&S5(t)}function cte(t){return ue.IsUndefined(t)||ue.IsString(t)&&lw(t)}function k5(t){return ue.IsUndefined(t)||Dt(t)}function ute(t){return ue.IsObject(t)&&t[Hi.ReadonlyKind]==="Readonly"}function pte(t){return ue.IsObject(t)&&t[Hi.OptionalKind]==="Optional"}function C5(t){return Le(t,"Any")&&Ke(t.$id)}function R5(t){return Le(t,"Argument")&&ue.IsNumber(t.index)}function M5(t){return Le(t,"Array")&&t.type==="array"&&Ke(t.$id)&&Dt(t.items)&&Je(t.minItems)&&Je(t.maxItems)&&cw(t.uniqueItems)&&k5(t.contains)&&Je(t.minContains)&&Je(t.maxContains)}function P5(t){return Le(t,"AsyncIterator")&&t.type==="AsyncIterator"&&Ke(t.$id)&&Dt(t.items)}function I5(t){return Le(t,"BigInt")&&t.type==="bigint"&&Ke(t.$id)&&Gp(t.exclusiveMaximum)&&Gp(t.exclusiveMinimum)&&Gp(t.maximum)&&Gp(t.minimum)&&Gp(t.multipleOf)}function A5(t){return Le(t,"Boolean")&&t.type==="boolean"&&Ke(t.$id)}function E5(t){return Le(t,"Computed")&&ue.IsString(t.target)&&ue.IsArray(t.parameters)&&t.parameters.every(e=>Dt(e))}function _5(t){return Le(t,"Constructor")&&t.type==="Constructor"&&Ke(t.$id)&&ue.IsArray(t.parameters)&&t.parameters.every(e=>Dt(e))&&Dt(t.returns)}function O5(t){return Le(t,"Date")&&t.type==="Date"&&Ke(t.$id)&&Je(t.exclusiveMaximumTimestamp)&&Je(t.exclusiveMinimumTimestamp)&&Je(t.maximumTimestamp)&&Je(t.minimumTimestamp)&&Je(t.multipleOfTimestamp)}function L5(t){return Le(t,"Function")&&t.type==="Function"&&Ke(t.$id)&&ue.IsArray(t.parameters)&&t.parameters.every(e=>Dt(e))&&Dt(t.returns)}function dte(t){return Le(t,"Import")&&ue.HasPropertyKey(t,"$defs")&&ue.IsObject(t.$defs)&&Qg(t.$defs)&&ue.HasPropertyKey(t,"$ref")&&ue.IsString(t.$ref)&&t.$ref in t.$defs}function W5(t){return Le(t,"Integer")&&t.type==="integer"&&Ke(t.$id)&&Je(t.exclusiveMaximum)&&Je(t.exclusiveMinimum)&&Je(t.maximum)&&Je(t.minimum)&&Je(t.multipleOf)}function Qg(t){return ue.IsObject(t)&&Object.entries(t).every(([e,n])=>lw(e)&&Dt(n))}function F5(t){return Le(t,"Intersect")&&!(ue.IsString(t.type)&&t.type!=="object")&&ue.IsArray(t.allOf)&&t.allOf.every(e=>Dt(e)&&!nW(e))&&Ke(t.type)&&(cw(t.unevaluatedProperties)||k5(t.unevaluatedProperties))&&Ke(t.$id)}function D5(t){return Le(t,"Iterator")&&t.type==="Iterator"&&Ke(t.$id)&&Dt(t.items)}function Le(t,e){return ue.IsObject(t)&&Hi.Kind in t&&t[Hi.Kind]===e}function U5(t){return Kp(t)&&ue.IsString(t.const)}function $5(t){return Kp(t)&&ue.IsNumber(t.const)}function mte(t){return Kp(t)&&ue.IsBoolean(t.const)}function Kp(t){return Le(t,"Literal")&&Ke(t.$id)&&N5(t.const)}function N5(t){return ue.IsBoolean(t)||ue.IsNumber(t)||ue.IsString(t)}function B5(t){return Le(t,"MappedKey")&&ue.IsArray(t.keys)&&t.keys.every(e=>ue.IsNumber(e)||ue.IsString(e))}function j5(t){return Le(t,"MappedResult")&&Qg(t.properties)}function q5(t){return Le(t,"Never")&&ue.IsObject(t.not)&&Object.getOwnPropertyNames(t.not).length===0}function G5(t){return Le(t,"Not")&&Dt(t.not)}function K5(t){return Le(t,"Null")&&t.type==="null"&&Ke(t.$id)}function H5(t){return Le(t,"Number")&&t.type==="number"&&Ke(t.$id)&&Je(t.exclusiveMaximum)&&Je(t.exclusiveMinimum)&&Je(t.maximum)&&Je(t.minimum)&&Je(t.multipleOf)}function z5(t){return Le(t,"Object")&&t.type==="object"&&Ke(t.$id)&&Qg(t.properties)&&T5(t.additionalProperties)&&Je(t.minProperties)&&Je(t.maxProperties)}function V5(t){return Le(t,"Promise")&&t.type==="Promise"&&Ke(t.$id)&&Dt(t.item)}function Q5(t){return Le(t,"Record")&&t.type==="object"&&Ke(t.$id)&&T5(t.additionalProperties)&&ue.IsObject(t.patternProperties)&&(e=>{let n=Object.getOwnPropertyNames(e.patternProperties);return n.length===1&&S5(n[0])&&ue.IsObject(e.patternProperties)&&Dt(e.patternProperties[n[0]])})(t)}function hte(t){return ue.IsObject(t)&&Hi.Hint in t&&t[Hi.Hint]==="Recursive"}function J5(t){return Le(t,"Ref")&&Ke(t.$id)&&ue.IsString(t.$ref)}function Y5(t){return Le(t,"RegExp")&&Ke(t.$id)&&ue.IsString(t.source)&&ue.IsString(t.flags)&&Je(t.maxLength)&&Je(t.minLength)}function X5(t){return Le(t,"String")&&t.type==="string"&&Ke(t.$id)&&Je(t.minLength)&&Je(t.maxLength)&&lte(t.pattern)&&cte(t.format)}function Z5(t){return Le(t,"Symbol")&&t.type==="symbol"&&Ke(t.$id)}function eW(t){return Le(t,"TemplateLiteral")&&t.type==="string"&&ue.IsString(t.pattern)&&t.pattern[0]==="^"&&t.pattern[t.pattern.length-1]==="$"}function tW(t){return Le(t,"This")&&Ke(t.$id)&&ue.IsString(t.$ref)}function nW(t){return ue.IsObject(t)&&Hi.TransformKind in t}function iW(t){return Le(t,"Tuple")&&t.type==="array"&&Ke(t.$id)&&ue.IsNumber(t.minItems)&&ue.IsNumber(t.maxItems)&&t.minItems===t.maxItems&&(ue.IsUndefined(t.items)&&ue.IsUndefined(t.additionalItems)&&t.minItems===0||ue.IsArray(t.items)&&t.items.every(e=>Dt(e)))}function rW(t){return Le(t,"Undefined")&&t.type==="undefined"&&Ke(t.$id)}function gte(t){return uw(t)&&t.anyOf.every(e=>U5(e)||$5(e))}function uw(t){return Le(t,"Union")&&Ke(t.$id)&&ue.IsObject(t)&&ue.IsArray(t.anyOf)&&t.anyOf.every(e=>Dt(e))}function oW(t){return Le(t,"Uint8Array")&&t.type==="Uint8Array"&&Ke(t.$id)&&Je(t.minByteLength)&&Je(t.maxByteLength)}function sW(t){return Le(t,"Unknown")&&Ke(t.$id)}function aW(t){return Le(t,"Unsafe")}function lW(t){return Le(t,"Void")&&t.type==="void"&&Ke(t.$id)}function cW(t){return ue.IsObject(t)&&Hi.Kind in t&&ue.IsString(t[Hi.Kind])&&!ate.includes(t[Hi.Kind])}function Dt(t){return ue.IsObject(t)&&(C5(t)||R5(t)||M5(t)||A5(t)||I5(t)||P5(t)||E5(t)||_5(t)||O5(t)||L5(t)||W5(t)||F5(t)||D5(t)||Kp(t)||B5(t)||j5(t)||q5(t)||G5(t)||K5(t)||H5(t)||z5(t)||V5(t)||Q5(t)||J5(t)||Y5(t)||X5(t)||Z5(t)||eW(t)||tW(t)||iW(t)||rW(t)||uw(t)||oW(t)||sW(t)||aW(t)||lW(t)||cW(t))}});var dw=M(vn=>{"use strict";var fte=vn&&vn.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),bte=vn&&vn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),pw=vn&&vn.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;r<i.length;r++)i[r]!=="default"&&fte(n,e,i[r]);return bte(n,e),n}})();Object.defineProperty(vn,"__esModule",{value:!0});vn.ValueGuard=vn.TypeGuard=vn.KindGuard=void 0;vn.KindGuard=pw(Ue());vn.TypeGuard=pw(uW());vn.ValueGuard=pw(nn())});var pW=M(mw=>{"use strict";Object.defineProperty(mw,"__esModule",{value:!0});mw.Increment=xte;function xte(t){return(parseInt(t)+1).toString()}});var dW=M(Fs=>{"use strict";var vte=Fs&&Fs.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),yte=Fs&&Fs.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&vte(e,t,n)};Object.defineProperty(Fs,"__esModule",{value:!0});yte(pW(),Fs)});var mW=M(ft=>{"use strict";Object.defineProperty(ft,"__esModule",{value:!0});ft.PatternNeverExact=ft.PatternStringExact=ft.PatternNumberExact=ft.PatternBooleanExact=ft.PatternNever=ft.PatternString=ft.PatternNumber=ft.PatternBoolean=void 0;ft.PatternBoolean="(true|false)";ft.PatternNumber="(0|[1-9][0-9]*)";ft.PatternString="(.*)";ft.PatternNever="(?!.*)";ft.PatternBooleanExact=`^${ft.PatternBoolean}$`;ft.PatternNumberExact=`^${ft.PatternNumber}$`;ft.PatternStringExact=`^${ft.PatternString}$`;ft.PatternNeverExact=`^${ft.PatternNever}$`});var Hp=M(Ds=>{"use strict";var wte=Ds&&Ds.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Ste=Ds&&Ds.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&wte(e,t,n)};Object.defineProperty(Ds,"__esModule",{value:!0});Ste(mW(),Ds)});var hW=M(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});Ro.Entries=Tte;Ro.Clear=kte;Ro.Delete=Cte;Ro.Has=Rte;Ro.Set=Mte;Ro.Get=Pte;var bc=new Map;function Tte(){return new Map(bc)}function kte(){return bc.clear()}function Cte(t){return bc.delete(t)}function Rte(t){return bc.has(t)}function Mte(t,e){bc.set(t,e)}function Pte(t){return bc.get(t)}});var gW=M(Mo=>{"use strict";Object.defineProperty(Mo,"__esModule",{value:!0});Mo.Entries=Ite;Mo.Clear=Ate;Mo.Delete=Ete;Mo.Has=_te;Mo.Set=Ote;Mo.Get=Lte;var xc=new Map;function Ite(){return new Map(xc)}function Ate(){return xc.clear()}function Ete(t){return xc.delete(t)}function _te(t){return xc.has(t)}function Ote(t,e){xc.set(t,e)}function Lte(t){return xc.get(t)}});var bW=M(oi=>{"use strict";var Wte=oi&&oi.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Fte=oi&&oi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),fW=oi&&oi.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;r<i.length;r++)i[r]!=="default"&&Wte(n,e,i[r]);return Fte(n,e),n}})();Object.defineProperty(oi,"__esModule",{value:!0});oi.TypeRegistry=oi.FormatRegistry=void 0;oi.FormatRegistry=fW(hW());oi.TypeRegistry=fW(gW())});var yW=M(zi=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});zi.SetIncludes=xW;zi.SetIsSubset=Dte;zi.SetDistinct=Ute;zi.SetIntersect=vW;zi.SetUnion=$te;zi.SetComplement=Nte;zi.SetIntersectMany=jte;zi.SetUnionMany=qte;function xW(t,e){return t.includes(e)}function Dte(t,e){return t.every(n=>xW(e,n))}function Ute(t){return[...new Set(t)]}function vW(t,e){return t.filter(n=>e.includes(n))}function $te(t,e){return[...t,...e]}function Nte(t,e){return t.filter(n=>!e.includes(n))}function Bte(t,e){return t.reduce((n,i)=>vW(n,i),e)}function jte(t){return t.length===1?t[0]:t.length>1?Bte(t.slice(1),t[0]):[]}function qte(t){let e=[];for(let n of t)e.push(...n);return e}});var zp=M(Us=>{"use strict";var Gte=Us&&Us.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Kte=Us&&Us.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Gte(e,t,n)};Object.defineProperty(Us,"__esModule",{value:!0});Kte(yW(),Us)});var wW=M(hw=>{"use strict";Object.defineProperty(hw,"__esModule",{value:!0});hw.Any=Vte;var Hte=Ir(),zte=ge();function Vte(t){return(0,Hte.CreateType)({[zte.Kind]:"Any"},t)}});var vc=M($s=>{"use strict";var Qte=$s&&$s.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Jte=$s&&$s.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Qte(e,t,n)};Object.defineProperty($s,"__esModule",{value:!0});Jte(wW(),$s)});var SW=M(gw=>{"use strict";Object.defineProperty(gw,"__esModule",{value:!0});gw.Array=Zte;var Yte=fe(),Xte=ge();function Zte(t,e){return(0,Yte.CreateType)({[Xte.Kind]:"Array",type:"array",items:t},e)}});var yc=M(Ns=>{"use strict";var ene=Ns&&Ns.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),tne=Ns&&Ns.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&ene(e,t,n)};Object.defineProperty(Ns,"__esModule",{value:!0});tne(SW(),Ns)});var TW=M(fw=>{"use strict";Object.defineProperty(fw,"__esModule",{value:!0});fw.Argument=rne;var nne=fe(),ine=ge();function rne(t){return(0,nne.CreateType)({[ine.Kind]:"Argument",index:t})}});var Jg=M(Bs=>{"use strict";var one=Bs&&Bs.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),sne=Bs&&Bs.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&one(e,t,n)};Object.defineProperty(Bs,"__esModule",{value:!0});sne(TW(),Bs)});var kW=M(bw=>{"use strict";Object.defineProperty(bw,"__esModule",{value:!0});bw.AsyncIterator=cne;var ane=ge(),lne=fe();function cne(t,e){return(0,lne.CreateType)({[ane.Kind]:"AsyncIterator",type:"AsyncIterator",items:t},e)}});var wc=M(js=>{"use strict";var une=js&&js.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),pne=js&&js.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&une(e,t,n)};Object.defineProperty(js,"__esModule",{value:!0});pne(kW(),js)});var CW=M(xw=>{"use strict";Object.defineProperty(xw,"__esModule",{value:!0});xw.Computed=hne;var dne=Ir(),mne=jp();function hne(t,e,n){return(0,dne.CreateType)({[mne.Kind]:"Computed",target:t,parameters:e},n)}});var Po=M(qs=>{"use strict";var gne=qs&&qs.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),fne=qs&&qs.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&gne(e,t,n)};Object.defineProperty(qs,"__esModule",{value:!0});fne(CW(),qs)});var Yg=M(vw=>{"use strict";Object.defineProperty(vw,"__esModule",{value:!0});vw.Discard=xne;function bne(t,e){let{[e]:n,...i}=t;return i}function xne(t,e){return e.reduce((n,i)=>bne(n,i),t)}});var Er=M(Gs=>{"use strict";var vne=Gs&&Gs.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),yne=Gs&&Gs.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&vne(e,t,n)};Object.defineProperty(Gs,"__esModule",{value:!0});yne(Yg(),Gs)});var RW=M(yw=>{"use strict";Object.defineProperty(yw,"__esModule",{value:!0});yw.Never=Tne;var wne=fe(),Sne=ge();function Tne(t){return(0,wne.CreateType)({[Sne.Kind]:"Never",not:{}},t)}});var Ut=M(Ks=>{"use strict";var kne=Ks&&Ks.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Cne=Ks&&Ks.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&kne(e,t,n)};Object.defineProperty(Ks,"__esModule",{value:!0});Cne(RW(),Ks)});var MW=M(ww=>{"use strict";Object.defineProperty(ww,"__esModule",{value:!0});ww.MappedKey=Pne;var Rne=fe(),Mne=ge();function Pne(t){return(0,Rne.CreateType)({[Mne.Kind]:"MappedKey",keys:t})}});var Tw=M(Sw=>{"use strict";Object.defineProperty(Sw,"__esModule",{value:!0});Sw.MappedResult=Ene;var Ine=fe(),Ane=ge();function Ene(t){return(0,Ine.CreateType)({[Ane.Kind]:"MappedResult",properties:t})}});var PW=M(kw=>{"use strict";Object.defineProperty(kw,"__esModule",{value:!0});kw.Constructor=Lne;var _ne=fe(),One=ge();function Lne(t,e,n){return(0,_ne.CreateType)({[One.Kind]:"Constructor",type:"Constructor",parameters:t,returns:e},n)}});var Sc=M(Hs=>{"use strict";var Wne=Hs&&Hs.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Fne=Hs&&Hs.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Wne(e,t,n)};Object.defineProperty(Hs,"__esModule",{value:!0});Fne(PW(),Hs)});var IW=M(Cw=>{"use strict";Object.defineProperty(Cw,"__esModule",{value:!0});Cw.Function=$ne;var Dne=fe(),Une=ge();function $ne(t,e,n){return(0,Dne.CreateType)({[Une.Kind]:"Function",type:"Function",parameters:t,returns:e},n)}});var Io=M(zs=>{"use strict";var Nne=zs&&zs.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Bne=zs&&zs.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Nne(e,t,n)};Object.defineProperty(zs,"__esModule",{value:!0});Bne(IW(),zs)});var Mw=M(Rw=>{"use strict";Object.defineProperty(Rw,"__esModule",{value:!0});Rw.UnionCreate=Gne;var jne=fe(),qne=ge();function Gne(t,e){return(0,jne.CreateType)({[qne.Kind]:"Union",anyOf:t},e)}});var OW=M(Pw=>{"use strict";Object.defineProperty(Pw,"__esModule",{value:!0});Pw.UnionEvaluated=Zne;var Kne=fe(),Hne=ge(),zne=Er(),Vne=Ut(),Qne=Vi(),AW=Mw(),_W=Ue();function Jne(t){return t.some(e=>(0,_W.IsOptional)(e))}function EW(t){return t.map(e=>(0,_W.IsOptional)(e)?Yne(e):e)}function Yne(t){return(0,zne.Discard)(t,[Hne.OptionalKind])}function Xne(t,e){return Jne(t)?(0,Qne.Optional)((0,AW.UnionCreate)(EW(t),e)):(0,AW.UnionCreate)(EW(t),e)}function Zne(t,e){return t.length===1?(0,Kne.CreateType)(t[0],e):t.length===0?(0,Vne.Never)(e):Xne(t,e)}});var WW=M(LW=>{"use strict";Object.defineProperty(LW,"__esModule",{value:!0});var T9e=ge()});var FW=M(Iw=>{"use strict";Object.defineProperty(Iw,"__esModule",{value:!0});Iw.Union=iie;var eie=Ut(),tie=fe(),nie=Mw();function iie(t,e){return t.length===0?(0,eie.Never)(e):t.length===1?(0,tie.CreateType)(t[0],e):(0,nie.UnionCreate)(t,e)}});var vt=M(_r=>{"use strict";var rie=_r&&_r.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Aw=_r&&_r.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&rie(e,t,n)};Object.defineProperty(_r,"__esModule",{value:!0});Aw(OW(),_r);Aw(WW(),_r);Aw(FW(),_r)});var Xg=M(Tc=>{"use strict";Object.defineProperty(Tc,"__esModule",{value:!0});Tc.TemplateLiteralParserError=void 0;Tc.TemplateLiteralParse=Vs;Tc.TemplateLiteralParseExact=mie;var oie=Ki(),Vp=class extends oie.TypeBoxError{};Tc.TemplateLiteralParserError=Vp;function sie(t){return t.replace(/\\\$/g,"$").replace(/\\\*/g,"*").replace(/\\\^/g,"^").replace(/\\\|/g,"|").replace(/\\\(/g,"(").replace(/\\\)/g,")")}function Ew(t,e,n){return t[e]===n&&t.charCodeAt(e-1)!==92}function Or(t,e){return Ew(t,e,"(")}function Qp(t,e){return Ew(t,e,")")}function DW(t,e){return Ew(t,e,"|")}function aie(t){if(!(Or(t,0)&&Qp(t,t.length-1)))return!1;let e=0;for(let n=0;n<t.length;n++)if(Or(t,n)&&(e+=1),Qp(t,n)&&(e-=1),e===0&&n!==t.length-1)return!1;return!0}function lie(t){return t.slice(1,t.length-1)}function cie(t){let e=0;for(let n=0;n<t.length;n++)if(Or(t,n)&&(e+=1),Qp(t,n)&&(e-=1),DW(t,n)&&e===0)return!0;return!1}function uie(t){for(let e=0;e<t.length;e++)if(Or(t,e))return!0;return!1}function pie(t){let[e,n]=[0,0],i=[];for(let o=0;o<t.length;o++)if(Or(t,o)&&(e+=1),Qp(t,o)&&(e-=1),DW(t,o)&&e===0){let s=t.slice(n,o);s.length>0&&i.push(Vs(s)),n=o+1}let r=t.slice(n);return r.length>0&&i.push(Vs(r)),i.length===0?{type:"const",const:""}:i.length===1?i[0]:{type:"or",expr:i}}function die(t){function e(r,o){if(!Or(r,o))throw new Vp("TemplateLiteralParser: Index must point to open parens");let s=0;for(let a=o;a<r.length;a++)if(Or(r,a)&&(s+=1),Qp(r,a)&&(s-=1),s===0)return[o,a];throw new Vp("TemplateLiteralParser: Unclosed group parens in expression")}function n(r,o){for(let s=o;s<r.length;s++)if(Or(r,s))return[o,s];return[o,r.length]}let i=[];for(let r=0;r<t.length;r++)if(Or(t,r)){let[o,s]=e(t,r),a=t.slice(o,s+1);i.push(Vs(a)),r=s}else{let[o,s]=n(t,r),a=t.slice(o,s);a.length>0&&i.push(Vs(a)),r=s-1}return i.length===0?{type:"const",const:""}:i.length===1?i[0]:{type:"and",expr:i}}function Vs(t){return aie(t)?Vs(lie(t)):cie(t)?pie(t):uie(t)?die(t):{type:"const",const:sie(t)}}function mie(t){return Vs(t.slice(1,t.length-1))}});var _w=M(kc=>{"use strict";Object.defineProperty(kc,"__esModule",{value:!0});kc.TemplateLiteralFiniteError=void 0;kc.IsTemplateLiteralExpressionFinite=ef;kc.IsTemplateLiteralFinite=vie;var hie=Xg(),gie=Ki(),Zg=class extends gie.TypeBoxError{};kc.TemplateLiteralFiniteError=Zg;function fie(t){return t.type==="or"&&t.expr.length===2&&t.expr[0].type==="const"&&t.expr[0].const==="0"&&t.expr[1].type==="const"&&t.expr[1].const==="[1-9][0-9]*"}function bie(t){return t.type==="or"&&t.expr.length===2&&t.expr[0].type==="const"&&t.expr[0].const==="true"&&t.expr[1].type==="const"&&t.expr[1].const==="false"}function xie(t){return t.type==="const"&&t.const===".*"}function ef(t){return fie(t)||xie(t)?!1:bie(t)?!0:t.type==="and"?t.expr.every(e=>ef(e)):t.type==="or"?t.expr.every(e=>ef(e)):t.type==="const"?!0:(()=>{throw new Zg("Unknown expression type")})()}function vie(t){let e=(0,hie.TemplateLiteralParseExact)(t.pattern);return ef(e)}});var Ow=M(Cc=>{"use strict";Object.defineProperty(Cc,"__esModule",{value:!0});Cc.TemplateLiteralGenerateError=void 0;Cc.TemplateLiteralExpressionGenerate=nf;Cc.TemplateLiteralGenerate=Rie;var yie=_w(),wie=Xg(),Sie=Ki(),tf=class extends Sie.TypeBoxError{};Cc.TemplateLiteralGenerateError=tf;function*UW(t){if(t.length===1)return yield*t[0];for(let e of t[0])for(let n of UW(t.slice(1)))yield`${e}${n}`}function*Tie(t){return yield*UW(t.expr.map(e=>[...nf(e)]))}function*kie(t){for(let e of t.expr)yield*nf(e)}function*Cie(t){return yield t.const}function*nf(t){return t.type==="and"?yield*Tie(t):t.type==="or"?yield*kie(t):t.type==="const"?yield*Cie(t):(()=>{throw new tf("Unknown expression")})()}function Rie(t){let e=(0,wie.TemplateLiteralParseExact)(t.pattern);return(0,yie.IsTemplateLiteralExpressionFinite)(e)?[...nf(e)]:[]}});var $W=M(Lw=>{"use strict";Object.defineProperty(Lw,"__esModule",{value:!0});Lw.Literal=Iie;var Mie=fe(),Pie=ge();function Iie(t,e){return(0,Mie.CreateType)({[Pie.Kind]:"Literal",const:t,type:typeof t},e)}});var rn=M(Qs=>{"use strict";var Aie=Qs&&Qs.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Eie=Qs&&Qs.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Aie(e,t,n)};Object.defineProperty(Qs,"__esModule",{value:!0});Eie($W(),Qs)});var NW=M(Ww=>{"use strict";Object.defineProperty(Ww,"__esModule",{value:!0});Ww.Boolean=Lie;var _ie=ge(),Oie=Ir();function Lie(t){return(0,Oie.CreateType)({[_ie.Kind]:"Boolean",type:"boolean"},t)}});var Jp=M(Js=>{"use strict";var Wie=Js&&Js.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Fie=Js&&Js.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Wie(e,t,n)};Object.defineProperty(Js,"__esModule",{value:!0});Fie(NW(),Js)});var BW=M(Fw=>{"use strict";Object.defineProperty(Fw,"__esModule",{value:!0});Fw.BigInt=$ie;var Die=ge(),Uie=Ir();function $ie(t){return(0,Uie.CreateType)({[Die.Kind]:"BigInt",type:"bigint"},t)}});var Rc=M(Ys=>{"use strict";var Nie=Ys&&Ys.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Bie=Ys&&Ys.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Nie(e,t,n)};Object.defineProperty(Ys,"__esModule",{value:!0});Bie(BW(),Ys)});var jW=M(Dw=>{"use strict";Object.defineProperty(Dw,"__esModule",{value:!0});Dw.Number=Gie;var jie=fe(),qie=ge();function Gie(t){return(0,jie.CreateType)({[qie.Kind]:"Number",type:"number"},t)}});var Ao=M(Xs=>{"use strict";var Kie=Xs&&Xs.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Hie=Xs&&Xs.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Kie(e,t,n)};Object.defineProperty(Xs,"__esModule",{value:!0});Hie(jW(),Xs)});var qW=M(Uw=>{"use strict";Object.defineProperty(Uw,"__esModule",{value:!0});Uw.String=Qie;var zie=fe(),Vie=ge();function Qie(t){return(0,zie.CreateType)({[Vie.Kind]:"String",type:"string"},t)}});var ea=M(Zs=>{"use strict";var Jie=Zs&&Zs.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Yie=Zs&&Zs.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Jie(e,t,n)};Object.defineProperty(Zs,"__esModule",{value:!0});Yie(qW(),Zs)});var Bw=M(Nw=>{"use strict";Object.defineProperty(Nw,"__esModule",{value:!0});Nw.TemplateLiteralSyntax=sre;var Yp=rn(),Xie=Jp(),Zie=Rc(),ere=Ao(),tre=ea(),nre=vt(),ire=Ut();function*rre(t){let e=t.trim().replace(/"|'/g,"");return e==="boolean"?yield(0,Xie.Boolean)():e==="number"?yield(0,ere.Number)():e==="bigint"?yield(0,Zie.BigInt)():e==="string"?yield(0,tre.String)():yield(()=>{let n=e.split("|").map(i=>(0,Yp.Literal)(i.trim()));return n.length===0?(0,ire.Never)():n.length===1?n[0]:(0,nre.UnionEvaluated)(n)})()}function*ore(t){if(t[1]!=="{"){let e=(0,Yp.Literal)("$"),n=$w(t.slice(1));return yield*[e,...n]}for(let e=2;e<t.length;e++)if(t[e]==="}"){let n=rre(t.slice(2,e)),i=$w(t.slice(e+1));return yield*[...n,...i]}yield(0,Yp.Literal)(t)}function*$w(t){for(let e=0;e<t.length;e++)if(t[e]==="$"){let n=(0,Yp.Literal)(t.slice(0,e)),i=ore(t.slice(e));return yield*[n,...i]}yield(0,Yp.Literal)(t)}function sre(t){return[...$w(t)]}});var jw=M(Zp=>{"use strict";Object.defineProperty(Zp,"__esModule",{value:!0});Zp.TemplateLiteralPatternError=void 0;Zp.TemplateLiteralPattern=ure;var Xp=Hp(),are=ge(),lre=Ki(),Eo=Ue(),rf=class extends lre.TypeBoxError{};Zp.TemplateLiteralPatternError=rf;function cre(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function GW(t,e){return(0,Eo.IsTemplateLiteral)(t)?t.pattern.slice(1,t.pattern.length-1):(0,Eo.IsUnion)(t)?`(${t.anyOf.map(n=>GW(n,e)).join("|")})`:(0,Eo.IsNumber)(t)?`${e}${Xp.PatternNumber}`:(0,Eo.IsInteger)(t)?`${e}${Xp.PatternNumber}`:(0,Eo.IsBigInt)(t)?`${e}${Xp.PatternNumber}`:(0,Eo.IsString)(t)?`${e}${Xp.PatternString}`:(0,Eo.IsLiteral)(t)?`${e}${cre(t.const.toString())}`:(0,Eo.IsBoolean)(t)?`${e}${Xp.PatternBoolean}`:(()=>{throw new rf(`Unexpected Kind '${t[are.Kind]}'`)})()}function ure(t){return`^${t.map(e=>GW(e,"")).join("")}$`}});var KW=M(qw=>{"use strict";Object.defineProperty(qw,"__esModule",{value:!0});qw.TemplateLiteralToUnion=hre;var pre=vt(),dre=rn(),mre=Ow();function hre(t){let n=(0,mre.TemplateLiteralGenerate)(t).map(i=>(0,dre.Literal)(i));return(0,pre.UnionEvaluated)(n)}});var zW=M(Gw=>{"use strict";Object.defineProperty(Gw,"__esModule",{value:!0});Gw.TemplateLiteral=vre;var gre=fe(),fre=Bw(),HW=jw(),bre=nn(),xre=ge();function vre(t,e){let n=(0,bre.IsString)(t)?(0,HW.TemplateLiteralPattern)((0,fre.TemplateLiteralSyntax)(t)):(0,HW.TemplateLiteralPattern)(t);return(0,gre.CreateType)({[xre.Kind]:"TemplateLiteral",type:"string",pattern:n},e)}});var Qi=M($n=>{"use strict";var yre=$n&&$n.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),ta=$n&&$n.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&yre(e,t,n)};Object.defineProperty($n,"__esModule",{value:!0});ta(_w(),$n);ta(Ow(),$n);ta(Bw(),$n);ta(Xg(),$n);ta(jw(),$n);ta(KW(),$n);ta(zW(),$n)});var of=M(Kw=>{"use strict";Object.defineProperty(Kw,"__esModule",{value:!0});Kw.IndexPropertyKeys=VW;var wre=Qi(),ed=Ue();function Sre(t){return(0,wre.TemplateLiteralGenerate)(t).map(n=>n.toString())}function Tre(t){let e=[];for(let n of t)e.push(...VW(n));return e}function kre(t){return[t.toString()]}function VW(t){return[...new Set((0,ed.IsTemplateLiteral)(t)?Sre(t):(0,ed.IsUnion)(t)?Tre(t.anyOf):(0,ed.IsLiteral)(t)?kre(t.const):(0,ed.IsNumber)(t)?["[number]"]:(0,ed.IsInteger)(t)?["[number]"]:[])]}});var zw=M(Hw=>{"use strict";Object.defineProperty(Hw,"__esModule",{value:!0});Hw.IndexFromMappedResult=Are;var Cre=Tt(),Rre=of(),Mre=ki();function Pre(t,e,n){let i={};for(let r of Object.getOwnPropertyNames(e))i[r]=(0,Mre.Index)(t,(0,Rre.IndexPropertyKeys)(e[r]),n);return i}function Ire(t,e,n){return Pre(t,e.properties,n)}function Are(t,e,n){let i=Ire(t,e,n);return(0,Cre.MappedResult)(i)}});var af=M(Mc=>{"use strict";Object.defineProperty(Mc,"__esModule",{value:!0});Mc.IndexFromPropertyKey=Qw;Mc.IndexFromPropertyKeys=XW;Mc.IndexFromComputed=Gre;Mc.Index=Kre;var Ere=fe(),_re=Ki(),JW=Po(),sf=Ut(),Ore=Nn(),Vw=vt(),Lre=of(),Wre=Jw(),Fre=zw(),yn=Ue();function YW(t,e){return t.map(n=>Qw(n,e))}function Dre(t){return t.filter(e=>!(0,yn.IsNever)(e))}function Ure(t,e){return(0,Ore.IntersectEvaluated)(Dre(YW(t,e)))}function $re(t){return t.some(e=>(0,yn.IsNever)(e))?[]:t}function Nre(t,e){return(0,Vw.UnionEvaluated)($re(YW(t,e)))}function Bre(t,e){return e in t?t[e]:e==="[number]"?(0,Vw.UnionEvaluated)(t):(0,sf.Never)()}function jre(t,e){return e==="[number]"?t:(0,sf.Never)()}function qre(t,e){return e in t?t[e]:(0,sf.Never)()}function Qw(t,e){return(0,yn.IsIntersect)(t)?Ure(t.allOf,e):(0,yn.IsUnion)(t)?Nre(t.anyOf,e):(0,yn.IsTuple)(t)?Bre(t.items??[],e):(0,yn.IsArray)(t)?jre(t.items,e):(0,yn.IsObject)(t)?qre(t.properties,e):(0,sf.Never)()}function XW(t,e){return e.map(n=>Qw(t,n))}function QW(t,e){return(0,Vw.UnionEvaluated)(XW(t,e))}function Gre(t,e){return(0,JW.Computed)("Index",[t,e])}function Kre(t,e,n){if((0,yn.IsRef)(t)||(0,yn.IsRef)(e)){let i="Index types using Ref parameters require both Type and Key to be of TSchema";if(!(0,yn.IsSchema)(t)||!(0,yn.IsSchema)(e))throw new _re.TypeBoxError(i);return(0,JW.Computed)("Index",[t,e])}return(0,yn.IsMappedResult)(e)?(0,Fre.IndexFromMappedResult)(t,e,n):(0,yn.IsMappedKey)(e)?(0,Wre.IndexFromMappedKey)(t,e,n):(0,Ere.CreateType)((0,yn.IsSchema)(e)?QW(t,(0,Lre.IndexPropertyKeys)(e)):QW(t,e),n)}});var Jw=M(Yw=>{"use strict";Object.defineProperty(Yw,"__esModule",{value:!0});Yw.IndexFromMappedKey=Xre;var Hre=af(),zre=Tt(),Vre=bn();function Qre(t,e,n){return{[e]:(0,Hre.Index)(t,[e],(0,Vre.Clone)(n))}}function Jre(t,e,n){return e.reduce((i,r)=>({...i,...Qre(t,r,n)}),{})}function Yre(t,e,n){return Jre(t,e.keys,n)}function Xre(t,e,n){let i=Yre(t,e,n);return(0,zre.MappedResult)(i)}});var ki=M(Ji=>{"use strict";var Zre=Ji&&Ji.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),lf=Ji&&Ji.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Zre(e,t,n)};Object.defineProperty(Ji,"__esModule",{value:!0});lf(Jw(),Ji);lf(zw(),Ji);lf(of(),Ji);lf(af(),Ji)});var ZW=M(Xw=>{"use strict";Object.defineProperty(Xw,"__esModule",{value:!0});Xw.Iterator=noe;var eoe=fe(),toe=ge();function noe(t,e){return(0,eoe.CreateType)({[toe.Kind]:"Iterator",type:"Iterator",items:t},e)}});var Pc=M(na=>{"use strict";var ioe=na&&na.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),roe=na&&na.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&ioe(e,t,n)};Object.defineProperty(na,"__esModule",{value:!0});roe(ZW(),na)});var tF=M(cf=>{"use strict";Object.defineProperty(cf,"__esModule",{value:!0});cf.Object=void 0;var ooe=fe(),eF=ge(),soe=Ue();function aoe(t){return globalThis.Object.keys(t).filter(e=>!(0,soe.IsOptional)(t[e]))}function loe(t,e){let n=aoe(t),i=n.length>0?{[eF.Kind]:"Object",type:"object",required:n,properties:t}:{[eF.Kind]:"Object",type:"object",properties:t};return(0,ooe.CreateType)(i,e)}cf.Object=loe});var wn=M(ia=>{"use strict";var coe=ia&&ia.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),uoe=ia&&ia.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&coe(e,t,n)};Object.defineProperty(ia,"__esModule",{value:!0});uoe(tF(),ia)});var nF=M(Zw=>{"use strict";Object.defineProperty(Zw,"__esModule",{value:!0});Zw.Promise=moe;var poe=fe(),doe=ge();function moe(t,e){return(0,poe.CreateType)({[doe.Kind]:"Promise",type:"Promise",item:t},e)}});var td=M(ra=>{"use strict";var hoe=ra&&ra.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),goe=ra&&ra.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&hoe(e,t,n)};Object.defineProperty(ra,"__esModule",{value:!0});goe(nF(),ra)});var tS=M(eS=>{"use strict";Object.defineProperty(eS,"__esModule",{value:!0});eS.Readonly=Soe;var iF=fe(),rF=ge(),foe=Er(),boe=nS(),xoe=Ue();function voe(t){return(0,iF.CreateType)((0,foe.Discard)(t,[rF.ReadonlyKind]))}function yoe(t){return(0,iF.CreateType)({...t,[rF.ReadonlyKind]:"Readonly"})}function woe(t,e){return e===!1?voe(t):yoe(t)}function Soe(t,e){let n=e??!0;return(0,xoe.IsMappedResult)(t)?(0,boe.ReadonlyFromMappedResult)(t,n):woe(t,n)}});var nS=M(iS=>{"use strict";Object.defineProperty(iS,"__esModule",{value:!0});iS.ReadonlyFromMappedResult=Moe;var Toe=Tt(),koe=tS();function Coe(t,e){let n={};for(let i of globalThis.Object.getOwnPropertyNames(t))n[i]=(0,koe.Readonly)(t[i],e);return n}function Roe(t,e){return Coe(t.properties,e)}function Moe(t,e){let n=Roe(t,e);return(0,Toe.MappedResult)(n)}});var Oo=M(_o=>{"use strict";var Poe=_o&&_o.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),oF=_o&&_o.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Poe(e,t,n)};Object.defineProperty(_o,"__esModule",{value:!0});oF(nS(),_o);oF(tS(),_o)});var aF=M(rS=>{"use strict";Object.defineProperty(rS,"__esModule",{value:!0});rS.Tuple=Aoe;var Ioe=fe(),sF=ge();function Aoe(t,e){return(0,Ioe.CreateType)(t.length>0?{[sF.Kind]:"Tuple",type:"array",items:t,additionalItems:!1,minItems:t.length,maxItems:t.length}:{[sF.Kind]:"Tuple",type:"array",minItems:t.length,maxItems:t.length},e)}});var Lr=M(oa=>{"use strict";var Eoe=oa&&oa.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),_oe=oa&&oa.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Eoe(e,t,n)};Object.defineProperty(oa,"__esModule",{value:!0});_oe(aF(),oa)});var mF=M(uf=>{"use strict";Object.defineProperty(uf,"__esModule",{value:!0});uf.MappedFunctionReturnType=dF;uf.Mapped=Xoe;var oS=ge(),lF=Er(),Ooe=yc(),Loe=wc(),Woe=Sc(),Foe=Io(),Doe=ki(),Uoe=Nn(),$oe=Pc(),cF=rn(),uF=wn(),Noe=Vi(),Boe=td(),joe=Oo(),qoe=Lr(),Goe=vt(),Koe=zp(),Hoe=Tw(),on=Ue();function pF(t,e){return t in e?si(t,e[t]):(0,Hoe.MappedResult)(e)}function zoe(t){return{[t]:(0,cF.Literal)(t)}}function Voe(t){let e={};for(let n of t)e[n]=(0,cF.Literal)(n);return e}function Qoe(t,e){return(0,Koe.SetIncludes)(e,t)?zoe(t):Voe(e)}function Joe(t,e){let n=Qoe(t,e);return pF(t,n)}function nd(t,e){return e.map(n=>si(t,n))}function Yoe(t,e){let n={};for(let i of globalThis.Object.getOwnPropertyNames(e))n[i]=si(t,e[i]);return n}function si(t,e){let n={...e};return(0,on.IsOptional)(e)?(0,Noe.Optional)(si(t,(0,lF.Discard)(e,[oS.OptionalKind]))):(0,on.IsReadonly)(e)?(0,joe.Readonly)(si(t,(0,lF.Discard)(e,[oS.ReadonlyKind]))):(0,on.IsMappedResult)(e)?pF(t,e.properties):(0,on.IsMappedKey)(e)?Joe(t,e.keys):(0,on.IsConstructor)(e)?(0,Woe.Constructor)(nd(t,e.parameters),si(t,e.returns),n):(0,on.IsFunction)(e)?(0,Foe.Function)(nd(t,e.parameters),si(t,e.returns),n):(0,on.IsAsyncIterator)(e)?(0,Loe.AsyncIterator)(si(t,e.items),n):(0,on.IsIterator)(e)?(0,$oe.Iterator)(si(t,e.items),n):(0,on.IsIntersect)(e)?(0,Uoe.Intersect)(nd(t,e.allOf),n):(0,on.IsUnion)(e)?(0,Goe.Union)(nd(t,e.anyOf),n):(0,on.IsTuple)(e)?(0,qoe.Tuple)(nd(t,e.items??[]),n):(0,on.IsObject)(e)?(0,uF.Object)(Yoe(t,e.properties),n):(0,on.IsArray)(e)?(0,Ooe.Array)(si(t,e.items),n):(0,on.IsPromise)(e)?(0,Boe.Promise)(si(t,e.item),n):e}function dF(t,e){let n={};for(let i of t)n[i]=si(i,e);return n}function Xoe(t,e,n){let i=(0,on.IsSchema)(t)?(0,Doe.IndexPropertyKeys)(t):t,r=e({[oS.Kind]:"MappedKey",keys:i}),o=dF(i,r);return(0,uF.Object)(o,n)}});var Tt=M(Wr=>{"use strict";var Zoe=Wr&&Wr.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),sS=Wr&&Wr.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Zoe(e,t,n)};Object.defineProperty(Wr,"__esModule",{value:!0});sS(MW(),Wr);sS(Tw(),Wr);sS(mF(),Wr)});var lS=M(aS=>{"use strict";Object.defineProperty(aS,"__esModule",{value:!0});aS.Optional=sse;var hF=fe(),gF=ge(),ese=Er(),tse=cS(),nse=Ue();function ise(t){return(0,hF.CreateType)((0,ese.Discard)(t,[gF.OptionalKind]))}function rse(t){return(0,hF.CreateType)({...t,[gF.OptionalKind]:"Optional"})}function ose(t,e){return e===!1?ise(t):rse(t)}function sse(t,e){let n=e??!0;return(0,nse.IsMappedResult)(t)?(0,tse.OptionalFromMappedResult)(t,n):ose(t,n)}});var cS=M(uS=>{"use strict";Object.defineProperty(uS,"__esModule",{value:!0});uS.OptionalFromMappedResult=pse;var ase=Tt(),lse=lS();function cse(t,e){let n={};for(let i of globalThis.Object.getOwnPropertyNames(t))n[i]=(0,lse.Optional)(t[i],e);return n}function use(t,e){return cse(t.properties,e)}function pse(t,e){let n=use(t,e);return(0,ase.MappedResult)(n)}});var Vi=M(Lo=>{"use strict";var dse=Lo&&Lo.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),fF=Lo&&Lo.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&dse(e,t,n)};Object.defineProperty(Lo,"__esModule",{value:!0});fF(cS(),Lo);fF(lS(),Lo)});var mS=M(dS=>{"use strict";Object.defineProperty(dS,"__esModule",{value:!0});dS.IntersectCreate=hse;var mse=fe(),bF=ge(),pS=Ue();function hse(t,e={}){let n=t.every(r=>(0,pS.IsObject)(r)),i=(0,pS.IsSchema)(e.unevaluatedProperties)?{unevaluatedProperties:e.unevaluatedProperties}:{};return(0,mse.CreateType)(e.unevaluatedProperties===!1||(0,pS.IsSchema)(e.unevaluatedProperties)||n?{...i,[bF.Kind]:"Intersect",type:"object",allOf:t}:{...i,[bF.Kind]:"Intersect",allOf:t},e)}});var yF=M(gS=>{"use strict";Object.defineProperty(gS,"__esModule",{value:!0});gS.IntersectEvaluated=Tse;var gse=ge(),fse=fe(),bse=Er(),xse=Ut(),vse=Vi(),xF=mS(),hS=Ue();function yse(t){return t.every(e=>(0,hS.IsOptional)(e))}function wse(t){return(0,bse.Discard)(t,[gse.OptionalKind])}function vF(t){return t.map(e=>(0,hS.IsOptional)(e)?wse(e):e)}function Sse(t,e){return yse(t)?(0,vse.Optional)((0,xF.IntersectCreate)(vF(t),e)):(0,xF.IntersectCreate)(vF(t),e)}function Tse(t,e={}){if(t.length===1)return(0,fse.CreateType)(t[0],e);if(t.length===0)return(0,xse.Never)(e);if(t.some(n=>(0,hS.IsTransform)(n)))throw new Error("Cannot intersect transform types");return Sse(t,e)}});var SF=M(wF=>{"use strict";Object.defineProperty(wF,"__esModule",{value:!0});var hQe=ge()});var TF=M(fS=>{"use strict";Object.defineProperty(fS,"__esModule",{value:!0});fS.Intersect=Pse;var kse=fe(),Cse=Ut(),Rse=mS(),Mse=Ue();function Pse(t,e){if(t.length===1)return(0,kse.CreateType)(t[0],e);if(t.length===0)return(0,Cse.Never)(e);if(t.some(n=>(0,Mse.IsTransform)(n)))throw new Error("Cannot intersect transform types");return(0,Rse.IntersectCreate)(t,e)}});var Nn=M(Fr=>{"use strict";var Ise=Fr&&Fr.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),bS=Fr&&Fr.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Ise(e,t,n)};Object.defineProperty(Fr,"__esModule",{value:!0});bS(yF(),Fr);bS(SF(),Fr);bS(TF(),Fr)});var kF=M(xS=>{"use strict";Object.defineProperty(xS,"__esModule",{value:!0});xS.Ref=Ose;var Ase=Ki(),Ese=fe(),_se=ge();function Ose(...t){let[e,n]=typeof t[0]=="string"?[t[0],t[1]]:[t[0].$id,t[1]];if(typeof e!="string")throw new Ase.TypeBoxError("Ref: $ref must be a string");return(0,Ese.CreateType)({[_se.Kind]:"Ref",$ref:e},n)}});var Wo=M(sa=>{"use strict";var Lse=sa&&sa.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Wse=sa&&sa.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Lse(e,t,n)};Object.defineProperty(sa,"__esModule",{value:!0});Wse(kF(),sa)});var RF=M(wS=>{"use strict";Object.defineProperty(wS,"__esModule",{value:!0});wS.Awaited=yS;var Fse=fe(),vS=Po(),Dse=Nn(),Use=vt(),$se=Wo(),id=Ue();function Nse(t,e){return(0,vS.Computed)("Awaited",[(0,vS.Computed)(t,e)])}function Bse(t){return(0,vS.Computed)("Awaited",[(0,$se.Ref)(t)])}function jse(t){return(0,Dse.Intersect)(CF(t))}function qse(t){return(0,Use.Union)(CF(t))}function Gse(t){return yS(t)}function CF(t){return t.map(e=>yS(e))}function yS(t,e){return(0,Fse.CreateType)((0,id.IsComputed)(t)?Nse(t.target,t.parameters):(0,id.IsIntersect)(t)?jse(t.allOf):(0,id.IsUnion)(t)?qse(t.anyOf):(0,id.IsPromise)(t)?Gse(t.item):(0,id.IsRef)(t)?Bse(t.$ref):t,e)}});var rd=M(aa=>{"use strict";var Kse=aa&&aa.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Hse=aa&&aa.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Kse(e,t,n)};Object.defineProperty(aa,"__esModule",{value:!0});Hse(RF(),aa)});var df=M(pf=>{"use strict";Object.defineProperty(pf,"__esModule",{value:!0});pf.KeyOfPropertyKeys=TS;pf.KeyOfPattern=Zse;var MF=zp(),Ic=Ue();function PF(t){let e=[];for(let n of t)e.push(TS(n));return e}function zse(t){let e=PF(t);return(0,MF.SetUnionMany)(e)}function Vse(t){let e=PF(t);return(0,MF.SetIntersectMany)(e)}function Qse(t){return t.map((e,n)=>n.toString())}function Jse(t){return["[number]"]}function Yse(t){return globalThis.Object.getOwnPropertyNames(t)}function Xse(t){return SS?globalThis.Object.getOwnPropertyNames(t).map(n=>n[0]==="^"&&n[n.length-1]==="$"?n.slice(1,n.length-1):n):[]}function TS(t){return(0,Ic.IsIntersect)(t)?zse(t.allOf):(0,Ic.IsUnion)(t)?Vse(t.anyOf):(0,Ic.IsTuple)(t)?Qse(t.items??[]):(0,Ic.IsArray)(t)?Jse(t.items):(0,Ic.IsObject)(t)?Yse(t.properties):(0,Ic.IsRecord)(t)?Xse(t.patternProperties):[]}var SS=!1;function Zse(t){SS=!0;let e=TS(t);return SS=!1,`^(${e.map(i=>`(${i})`).join("|")})$`}});var RS=M(mf=>{"use strict";Object.defineProperty(mf,"__esModule",{value:!0});mf.KeyOfPropertyKeysToRest=IF;mf.KeyOf=uae;var eae=fe(),tae=rn(),nae=Ao(),CS=Po(),iae=Wo(),rae=df(),oae=vt(),sae=MS(),kS=Ue();function aae(t,e){return(0,CS.Computed)("KeyOf",[(0,CS.Computed)(t,e)])}function lae(t){return(0,CS.Computed)("KeyOf",[(0,iae.Ref)(t)])}function cae(t,e){let n=(0,rae.KeyOfPropertyKeys)(t),i=IF(n),r=(0,oae.UnionEvaluated)(i);return(0,eae.CreateType)(r,e)}function IF(t){return t.map(e=>e==="[number]"?(0,nae.Number)():(0,tae.Literal)(e))}function uae(t,e){return(0,kS.IsComputed)(t)?aae(t.target,t.parameters):(0,kS.IsRef)(t)?lae(t.$ref):(0,kS.IsMappedResult)(t)?(0,sae.KeyOfFromMappedResult)(t,e):cae(t,e)}});var MS=M(PS=>{"use strict";Object.defineProperty(PS,"__esModule",{value:!0});PS.KeyOfFromMappedResult=fae;var pae=Tt(),dae=RS(),mae=bn();function hae(t,e){let n={};for(let i of globalThis.Object.getOwnPropertyNames(t))n[i]=(0,dae.KeyOf)(t[i],(0,mae.Clone)(e));return n}function gae(t,e){return hae(t.properties,e)}function fae(t,e){let n=gae(t,e);return(0,pae.MappedResult)(n)}});var AF=M(IS=>{"use strict";Object.defineProperty(IS,"__esModule",{value:!0});IS.KeyOfPropertyEntries=vae;var bae=af(),xae=df();function vae(t){let e=(0,xae.KeyOfPropertyKeys)(t),n=(0,bae.IndexFromPropertyKeys)(t,e);return e.map((i,r)=>[e[r],n[r]])}});var Ac=M(Yi=>{"use strict";var yae=Yi&&Yi.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),hf=Yi&&Yi.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&yae(e,t,n)};Object.defineProperty(Yi,"__esModule",{value:!0});hf(MS(),Yi);hf(AF(),Yi);hf(df(),Yi);hf(RS(),Yi)});var EF=M(AS=>{"use strict";Object.defineProperty(AS,"__esModule",{value:!0});AS.Composite=Eae;var wae=Nn(),Sae=ki(),Tae=Ac(),kae=wn(),Cae=zp(),Rae=Ue();function Mae(t){let e=[];for(let n of t)e.push(...(0,Tae.KeyOfPropertyKeys)(n));return(0,Cae.SetDistinct)(e)}function Pae(t){return t.filter(e=>!(0,Rae.IsNever)(e))}function Iae(t,e){let n=[];for(let i of t)n.push(...(0,Sae.IndexFromPropertyKeys)(i,[e]));return Pae(n)}function Aae(t,e){let n={};for(let i of e)n[i]=(0,wae.IntersectEvaluated)(Iae(t,i));return n}function Eae(t,e){let n=Mae(t),i=Aae(t,n);return(0,kae.Object)(i,e)}});var gf=M(la=>{"use strict";var _ae=la&&la.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Oae=la&&la.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&_ae(e,t,n)};Object.defineProperty(la,"__esModule",{value:!0});Oae(EF(),la)});var _F=M(ES=>{"use strict";Object.defineProperty(ES,"__esModule",{value:!0});ES.Date=Fae;var Lae=ge(),Wae=fe();function Fae(t){return(0,Wae.CreateType)({[Lae.Kind]:"Date",type:"Date"},t)}});var od=M(ca=>{"use strict";var Dae=ca&&ca.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Uae=ca&&ca.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Dae(e,t,n)};Object.defineProperty(ca,"__esModule",{value:!0});Uae(_F(),ca)});var OF=M(_S=>{"use strict";Object.defineProperty(_S,"__esModule",{value:!0});_S.Null=Bae;var $ae=fe(),Nae=ge();function Bae(t){return(0,$ae.CreateType)({[Nae.Kind]:"Null",type:"null"},t)}});var sd=M(ua=>{"use strict";var jae=ua&&ua.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),qae=ua&&ua.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&jae(e,t,n)};Object.defineProperty(ua,"__esModule",{value:!0});qae(OF(),ua)});var LF=M(OS=>{"use strict";Object.defineProperty(OS,"__esModule",{value:!0});OS.Symbol=Hae;var Gae=fe(),Kae=ge();function Hae(t){return(0,Gae.CreateType)({[Kae.Kind]:"Symbol",type:"symbol"},t)}});var ad=M(pa=>{"use strict";var zae=pa&&pa.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Vae=pa&&pa.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&zae(e,t,n)};Object.defineProperty(pa,"__esModule",{value:!0});Vae(LF(),pa)});var WF=M(LS=>{"use strict";Object.defineProperty(LS,"__esModule",{value:!0});LS.Undefined=Yae;var Qae=fe(),Jae=ge();function Yae(t){return(0,Qae.CreateType)({[Jae.Kind]:"Undefined",type:"undefined"},t)}});var ld=M(da=>{"use strict";var Xae=da&&da.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Zae=da&&da.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Xae(e,t,n)};Object.defineProperty(da,"__esModule",{value:!0});Zae(WF(),da)});var FF=M(WS=>{"use strict";Object.defineProperty(WS,"__esModule",{value:!0});WS.Uint8Array=nle;var ele=fe(),tle=ge();function nle(t){return(0,ele.CreateType)({[tle.Kind]:"Uint8Array",type:"Uint8Array"},t)}});var cd=M(ma=>{"use strict";var ile=ma&&ma.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),rle=ma&&ma.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&ile(e,t,n)};Object.defineProperty(ma,"__esModule",{value:!0});rle(FF(),ma)});var DF=M(FS=>{"use strict";Object.defineProperty(FS,"__esModule",{value:!0});FS.Unknown=ale;var ole=fe(),sle=ge();function ale(t){return(0,ole.CreateType)({[sle.Kind]:"Unknown"},t)}});var ga=M(ha=>{"use strict";var lle=ha&&ha.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),cle=ha&&ha.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&lle(e,t,n)};Object.defineProperty(ha,"__esModule",{value:!0});cle(DF(),ha)});var NF=M(NS=>{"use strict";Object.defineProperty(NS,"__esModule",{value:!0});NS.Const=Sle;var UF=vc(),ule=Rc(),ple=od(),dle=Io(),DS=rn(),mle=sd(),$F=wn(),hle=ad(),gle=Lr(),US=Oo(),fle=ld(),ble=cd(),xle=ga(),vle=Ir(),Sn=nn();function yle(t){return t.map(e=>$S(e,!1))}function wle(t){let e={};for(let n of globalThis.Object.getOwnPropertyNames(t))e[n]=(0,US.Readonly)($S(t[n],!1));return e}function ff(t,e){return e===!0?t:(0,US.Readonly)(t)}function $S(t,e){return(0,Sn.IsAsyncIterator)(t)||(0,Sn.IsIterator)(t)?ff((0,UF.Any)(),e):(0,Sn.IsArray)(t)?(0,US.Readonly)((0,gle.Tuple)(yle(t))):(0,Sn.IsUint8Array)(t)?(0,ble.Uint8Array)():(0,Sn.IsDate)(t)?(0,ple.Date)():(0,Sn.IsObject)(t)?ff((0,$F.Object)(wle(t)),e):(0,Sn.IsFunction)(t)?ff((0,dle.Function)([],(0,xle.Unknown)()),e):(0,Sn.IsUndefined)(t)?(0,fle.Undefined)():(0,Sn.IsNull)(t)?(0,mle.Null)():(0,Sn.IsSymbol)(t)?(0,hle.Symbol)():(0,Sn.IsBigInt)(t)?(0,ule.BigInt)():(0,Sn.IsNumber)(t)||(0,Sn.IsBoolean)(t)||(0,Sn.IsString)(t)?(0,DS.Literal)(t):(0,$F.Object)({})}function Sle(t,e){return(0,vle.CreateType)($S(t,!0),e)}});var bf=M(fa=>{"use strict";var Tle=fa&&fa.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),kle=fa&&fa.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Tle(e,t,n)};Object.defineProperty(fa,"__esModule",{value:!0});kle(NF(),fa)});var BF=M(Dr=>{"use strict";var Cle=Dr&&Dr.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Rle=Dr&&Dr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Mle=Dr&&Dr.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;r<i.length;r++)i[r]!=="default"&&Cle(n,e,i[r]);return Rle(n,e),n}})();Object.defineProperty(Dr,"__esModule",{value:!0});Dr.ConstructorParameters=Ele;var Ple=Lr(),Ile=Ut(),Ale=Mle(Ue());function Ele(t,e){return Ale.IsConstructor(t)?(0,Ple.Tuple)(t.parameters,e):(0,Ile.Never)(e)}});var xf=M(ba=>{"use strict";var _le=ba&&ba.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Ole=ba&&ba.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&_le(e,t,n)};Object.defineProperty(ba,"__esModule",{value:!0});Ole(BF(),ba)});var jF=M(BS=>{"use strict";Object.defineProperty(BS,"__esModule",{value:!0});BS.Enum=Ule;var Lle=rn(),Wle=ge(),Fle=vt(),Dle=nn();function Ule(t,e){if((0,Dle.IsUndefined)(t))throw new Error("Enum undefined or empty");let n=globalThis.Object.getOwnPropertyNames(t).filter(o=>isNaN(o)).map(o=>t[o]),r=[...new Set(n)].map(o=>(0,Lle.Literal)(o));return(0,Fle.Union)(r,{...e,[Wle.Hint]:"Enum"})}});var vf=M(xa=>{"use strict";var $le=xa&&xa.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Nle=xa&&xa.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&$le(e,t,n)};Object.defineProperty(xa,"__esModule",{value:!0});Nle(jF(),xa)});var QS=M(va=>{"use strict";Object.defineProperty(va,"__esModule",{value:!0});va.ExtendsResult=va.ExtendsResolverError=void 0;va.ExtendsCheck=Ice;var qF=vc(),Ble=Io(),HS=Ao(),qS=ea(),jle=ga(),GF=Qi(),Ec=Hp(),QF=ge(),qle=Ki(),P=dw(),yf=class extends qle.TypeBoxError{};va.ExtendsResolverError=yf;var G;(function(t){t[t.Union=0]="Union",t[t.True=1]="True",t[t.False=2]="False"})(G||(va.ExtendsResult=G={}));function ai(t){return t===G.False?t:G.True}function _c(t){throw new yf(t)}function kt(t){return P.TypeGuard.IsNever(t)||P.TypeGuard.IsIntersect(t)||P.TypeGuard.IsUnion(t)||P.TypeGuard.IsUnknown(t)||P.TypeGuard.IsAny(t)}function Ct(t,e){return P.TypeGuard.IsNever(e)?XF(t,e):P.TypeGuard.IsIntersect(e)?wf(t,e):P.TypeGuard.IsUnion(e)?VS(t,e):P.TypeGuard.IsUnknown(e)?nD(t,e):P.TypeGuard.IsAny(e)?zS(t,e):_c("StructuralRight")}function zS(t,e){return G.True}function Gle(t,e){return P.TypeGuard.IsIntersect(e)?wf(t,e):P.TypeGuard.IsUnion(e)&&e.anyOf.some(n=>P.TypeGuard.IsAny(n)||P.TypeGuard.IsUnknown(n))?G.True:P.TypeGuard.IsUnion(e)?G.Union:P.TypeGuard.IsUnknown(e)||P.TypeGuard.IsAny(e)?G.True:G.Union}function Kle(t,e){return P.TypeGuard.IsUnknown(t)?G.False:P.TypeGuard.IsAny(t)?G.Union:P.TypeGuard.IsNever(t)?G.True:G.False}function Hle(t,e){return P.TypeGuard.IsObject(e)&&Sf(e)?G.True:kt(e)?Ct(t,e):P.TypeGuard.IsArray(e)?ai(He(t.items,e.items)):G.False}function zle(t,e){return kt(e)?Ct(t,e):P.TypeGuard.IsAsyncIterator(e)?ai(He(t.items,e.items)):G.False}function Vle(t,e){return kt(e)?Ct(t,e):P.TypeGuard.IsObject(e)?Ht(t,e):P.TypeGuard.IsRecord(e)?li(t,e):P.TypeGuard.IsBigInt(e)?G.True:G.False}function JF(t,e){return P.TypeGuard.IsLiteralBoolean(t)||P.TypeGuard.IsBoolean(t)?G.True:G.False}function Qle(t,e){return kt(e)?Ct(t,e):P.TypeGuard.IsObject(e)?Ht(t,e):P.TypeGuard.IsRecord(e)?li(t,e):P.TypeGuard.IsBoolean(e)?G.True:G.False}function Jle(t,e){return kt(e)?Ct(t,e):P.TypeGuard.IsObject(e)?Ht(t,e):P.TypeGuard.IsConstructor(e)?t.parameters.length>e.parameters.length?G.False:t.parameters.every((n,i)=>ai(He(e.parameters[i],n))===G.True)?ai(He(t.returns,e.returns)):G.False:G.False}function Yle(t,e){return kt(e)?Ct(t,e):P.TypeGuard.IsObject(e)?Ht(t,e):P.TypeGuard.IsRecord(e)?li(t,e):P.TypeGuard.IsDate(e)?G.True:G.False}function Xle(t,e){return kt(e)?Ct(t,e):P.TypeGuard.IsObject(e)?Ht(t,e):P.TypeGuard.IsFunction(e)?t.parameters.length>e.parameters.length?G.False:t.parameters.every((n,i)=>ai(He(e.parameters[i],n))===G.True)?ai(He(t.returns,e.returns)):G.False:G.False}function YF(t,e){return P.TypeGuard.IsLiteral(t)&&P.ValueGuard.IsNumber(t.const)||P.TypeGuard.IsNumber(t)||P.TypeGuard.IsInteger(t)?G.True:G.False}function Zle(t,e){return P.TypeGuard.IsInteger(e)||P.TypeGuard.IsNumber(e)?G.True:kt(e)?Ct(t,e):P.TypeGuard.IsObject(e)?Ht(t,e):P.TypeGuard.IsRecord(e)?li(t,e):G.False}function wf(t,e){return e.allOf.every(n=>He(t,n)===G.True)?G.True:G.False}function ece(t,e){return t.allOf.some(n=>He(n,e)===G.True)?G.True:G.False}function tce(t,e){return kt(e)?Ct(t,e):P.TypeGuard.IsIterator(e)?ai(He(t.items,e.items)):G.False}function nce(t,e){return P.TypeGuard.IsLiteral(e)&&e.const===t.const?G.True:kt(e)?Ct(t,e):P.TypeGuard.IsObject(e)?Ht(t,e):P.TypeGuard.IsRecord(e)?li(t,e):P.TypeGuard.IsString(e)?tD(t,e):P.TypeGuard.IsNumber(e)?ZF(t,e):P.TypeGuard.IsInteger(e)?YF(t,e):P.TypeGuard.IsBoolean(e)?JF(t,e):G.False}function XF(t,e){return G.False}function ice(t,e){return G.True}function KF(t){let[e,n]=[t,0];for(;P.TypeGuard.IsNot(e);)e=e.not,n+=1;return n%2===0?e:(0,jle.Unknown)()}function rce(t,e){return P.TypeGuard.IsNot(t)?He(KF(t),e):P.TypeGuard.IsNot(e)?He(t,KF(e)):_c("Invalid fallthrough for Not")}function oce(t,e){return kt(e)?Ct(t,e):P.TypeGuard.IsObject(e)?Ht(t,e):P.TypeGuard.IsRecord(e)?li(t,e):P.TypeGuard.IsNull(e)?G.True:G.False}function ZF(t,e){return P.TypeGuard.IsLiteralNumber(t)||P.TypeGuard.IsNumber(t)||P.TypeGuard.IsInteger(t)?G.True:G.False}function sce(t,e){return kt(e)?Ct(t,e):P.TypeGuard.IsObject(e)?Ht(t,e):P.TypeGuard.IsRecord(e)?li(t,e):P.TypeGuard.IsInteger(e)||P.TypeGuard.IsNumber(e)?G.True:G.False}function Tn(t,e){return Object.getOwnPropertyNames(t.properties).length===e}function HF(t){return Sf(t)}function zF(t){return Tn(t,0)||Tn(t,1)&&"description"in t.properties&&P.TypeGuard.IsUnion(t.properties.description)&&t.properties.description.anyOf.length===2&&(P.TypeGuard.IsString(t.properties.description.anyOf[0])&&P.TypeGuard.IsUndefined(t.properties.description.anyOf[1])||P.TypeGuard.IsString(t.properties.description.anyOf[1])&&P.TypeGuard.IsUndefined(t.properties.description.anyOf[0]))}function jS(t){return Tn(t,0)}function VF(t){return Tn(t,0)}function ace(t){return Tn(t,0)}function lce(t){return Tn(t,0)}function cce(t){return Sf(t)}function uce(t){let e=(0,HS.Number)();return Tn(t,0)||Tn(t,1)&&"length"in t.properties&&ai(He(t.properties.length,e))===G.True}function pce(t){return Tn(t,0)}function Sf(t){let e=(0,HS.Number)();return Tn(t,0)||Tn(t,1)&&"length"in t.properties&&ai(He(t.properties.length,e))===G.True}function dce(t){let e=(0,Ble.Function)([(0,qF.Any)()],(0,qF.Any)());return Tn(t,0)||Tn(t,1)&&"then"in t.properties&&ai(He(t.properties.then,e))===G.True}function eD(t,e){return He(t,e)===G.False||P.TypeGuard.IsOptional(t)&&!P.TypeGuard.IsOptional(e)?G.False:G.True}function Ht(t,e){return P.TypeGuard.IsUnknown(t)?G.False:P.TypeGuard.IsAny(t)?G.Union:P.TypeGuard.IsNever(t)||P.TypeGuard.IsLiteralString(t)&&HF(e)||P.TypeGuard.IsLiteralNumber(t)&&jS(e)||P.TypeGuard.IsLiteralBoolean(t)&&VF(e)||P.TypeGuard.IsSymbol(t)&&zF(e)||P.TypeGuard.IsBigInt(t)&&ace(e)||P.TypeGuard.IsString(t)&&HF(e)||P.TypeGuard.IsSymbol(t)&&zF(e)||P.TypeGuard.IsNumber(t)&&jS(e)||P.TypeGuard.IsInteger(t)&&jS(e)||P.TypeGuard.IsBoolean(t)&&VF(e)||P.TypeGuard.IsUint8Array(t)&&cce(e)||P.TypeGuard.IsDate(t)&&lce(e)||P.TypeGuard.IsConstructor(t)&&pce(e)||P.TypeGuard.IsFunction(t)&&uce(e)?G.True:P.TypeGuard.IsRecord(t)&&P.TypeGuard.IsString(GS(t))?e[QF.Hint]==="Record"?G.True:G.False:P.TypeGuard.IsRecord(t)&&P.TypeGuard.IsNumber(GS(t))&&Tn(e,0)?G.True:G.False}function mce(t,e){return kt(e)?Ct(t,e):P.TypeGuard.IsRecord(e)?li(t,e):P.TypeGuard.IsObject(e)?(()=>{for(let n of Object.getOwnPropertyNames(e.properties)){if(!(n in t.properties)&&!P.TypeGuard.IsOptional(e.properties[n]))return G.False;if(P.TypeGuard.IsOptional(e.properties[n]))return G.True;if(eD(t.properties[n],e.properties[n])===G.False)return G.False}return G.True})():G.False}function hce(t,e){return kt(e)?Ct(t,e):P.TypeGuard.IsObject(e)&&dce(e)?G.True:P.TypeGuard.IsPromise(e)?ai(He(t.item,e.item)):G.False}function GS(t){return Ec.PatternNumberExact in t.patternProperties?(0,HS.Number)():Ec.PatternStringExact in t.patternProperties?(0,qS.String)():_c("Unknown record key pattern")}function KS(t){return Ec.PatternNumberExact in t.patternProperties?t.patternProperties[Ec.PatternNumberExact]:Ec.PatternStringExact in t.patternProperties?t.patternProperties[Ec.PatternStringExact]:_c("Unable to get record value schema")}function li(t,e){let[n,i]=[GS(e),KS(e)];return P.TypeGuard.IsLiteralString(t)&&P.TypeGuard.IsNumber(n)&&ai(He(t,i))===G.True?G.True:P.TypeGuard.IsUint8Array(t)&&P.TypeGuard.IsNumber(n)||P.TypeGuard.IsString(t)&&P.TypeGuard.IsNumber(n)||P.TypeGuard.IsArray(t)&&P.TypeGuard.IsNumber(n)?He(t,i):P.TypeGuard.IsObject(t)?(()=>{for(let r of Object.getOwnPropertyNames(t.properties))if(eD(i,t.properties[r])===G.False)return G.False;return G.True})():G.False}function gce(t,e){return kt(e)?Ct(t,e):P.TypeGuard.IsObject(e)?Ht(t,e):P.TypeGuard.IsRecord(e)?He(KS(t),KS(e)):G.False}function fce(t,e){let n=P.TypeGuard.IsRegExp(t)?(0,qS.String)():t,i=P.TypeGuard.IsRegExp(e)?(0,qS.String)():e;return He(n,i)}function tD(t,e){return P.TypeGuard.IsLiteral(t)&&P.ValueGuard.IsString(t.const)||P.TypeGuard.IsString(t)?G.True:G.False}function bce(t,e){return kt(e)?Ct(t,e):P.TypeGuard.IsObject(e)?Ht(t,e):P.TypeGuard.IsRecord(e)?li(t,e):P.TypeGuard.IsString(e)?G.True:G.False}function xce(t,e){return kt(e)?Ct(t,e):P.TypeGuard.IsObject(e)?Ht(t,e):P.TypeGuard.IsRecord(e)?li(t,e):P.TypeGuard.IsSymbol(e)?G.True:G.False}function vce(t,e){return P.TypeGuard.IsTemplateLiteral(t)?He((0,GF.TemplateLiteralToUnion)(t),e):P.TypeGuard.IsTemplateLiteral(e)?He(t,(0,GF.TemplateLiteralToUnion)(e)):_c("Invalid fallthrough for TemplateLiteral")}function yce(t,e){return P.TypeGuard.IsArray(e)&&t.items!==void 0&&t.items.every(n=>He(n,e.items)===G.True)}function wce(t,e){return P.TypeGuard.IsNever(t)?G.True:P.TypeGuard.IsUnknown(t)?G.False:P.TypeGuard.IsAny(t)?G.Union:G.False}function Sce(t,e){return kt(e)?Ct(t,e):P.TypeGuard.IsObject(e)&&Sf(e)||P.TypeGuard.IsArray(e)&&yce(t,e)?G.True:P.TypeGuard.IsTuple(e)?P.ValueGuard.IsUndefined(t.items)&&!P.ValueGuard.IsUndefined(e.items)||!P.ValueGuard.IsUndefined(t.items)&&P.ValueGuard.IsUndefined(e.items)?G.False:P.ValueGuard.IsUndefined(t.items)&&!P.ValueGuard.IsUndefined(e.items)||t.items.every((n,i)=>He(n,e.items[i])===G.True)?G.True:G.False:G.False}function Tce(t,e){return kt(e)?Ct(t,e):P.TypeGuard.IsObject(e)?Ht(t,e):P.TypeGuard.IsRecord(e)?li(t,e):P.TypeGuard.IsUint8Array(e)?G.True:G.False}function kce(t,e){return kt(e)?Ct(t,e):P.TypeGuard.IsObject(e)?Ht(t,e):P.TypeGuard.IsRecord(e)?li(t,e):P.TypeGuard.IsVoid(e)?Mce(t,e):P.TypeGuard.IsUndefined(e)?G.True:G.False}function VS(t,e){return e.anyOf.some(n=>He(t,n)===G.True)?G.True:G.False}function Cce(t,e){return t.anyOf.every(n=>He(n,e)===G.True)?G.True:G.False}function nD(t,e){return G.True}function Rce(t,e){return P.TypeGuard.IsNever(e)?XF(t,e):P.TypeGuard.IsIntersect(e)?wf(t,e):P.TypeGuard.IsUnion(e)?VS(t,e):P.TypeGuard.IsAny(e)?zS(t,e):P.TypeGuard.IsString(e)?tD(t,e):P.TypeGuard.IsNumber(e)?ZF(t,e):P.TypeGuard.IsInteger(e)?YF(t,e):P.TypeGuard.IsBoolean(e)?JF(t,e):P.TypeGuard.IsArray(e)?Kle(t,e):P.TypeGuard.IsTuple(e)?wce(t,e):P.TypeGuard.IsObject(e)?Ht(t,e):P.TypeGuard.IsUnknown(e)?G.True:G.False}function Mce(t,e){return P.TypeGuard.IsUndefined(t)||P.TypeGuard.IsUndefined(t)?G.True:G.False}function Pce(t,e){return P.TypeGuard.IsIntersect(e)?wf(t,e):P.TypeGuard.IsUnion(e)?VS(t,e):P.TypeGuard.IsUnknown(e)?nD(t,e):P.TypeGuard.IsAny(e)?zS(t,e):P.TypeGuard.IsObject(e)?Ht(t,e):P.TypeGuard.IsVoid(e)?G.True:G.False}function He(t,e){return P.TypeGuard.IsTemplateLiteral(t)||P.TypeGuard.IsTemplateLiteral(e)?vce(t,e):P.TypeGuard.IsRegExp(t)||P.TypeGuard.IsRegExp(e)?fce(t,e):P.TypeGuard.IsNot(t)||P.TypeGuard.IsNot(e)?rce(t,e):P.TypeGuard.IsAny(t)?Gle(t,e):P.TypeGuard.IsArray(t)?Hle(t,e):P.TypeGuard.IsBigInt(t)?Vle(t,e):P.TypeGuard.IsBoolean(t)?Qle(t,e):P.TypeGuard.IsAsyncIterator(t)?zle(t,e):P.TypeGuard.IsConstructor(t)?Jle(t,e):P.TypeGuard.IsDate(t)?Yle(t,e):P.TypeGuard.IsFunction(t)?Xle(t,e):P.TypeGuard.IsInteger(t)?Zle(t,e):P.TypeGuard.IsIntersect(t)?ece(t,e):P.TypeGuard.IsIterator(t)?tce(t,e):P.TypeGuard.IsLiteral(t)?nce(t,e):P.TypeGuard.IsNever(t)?ice(t,e):P.TypeGuard.IsNull(t)?oce(t,e):P.TypeGuard.IsNumber(t)?sce(t,e):P.TypeGuard.IsObject(t)?mce(t,e):P.TypeGuard.IsRecord(t)?gce(t,e):P.TypeGuard.IsString(t)?bce(t,e):P.TypeGuard.IsSymbol(t)?xce(t,e):P.TypeGuard.IsTuple(t)?Sce(t,e):P.TypeGuard.IsPromise(t)?hce(t,e):P.TypeGuard.IsUint8Array(t)?Tce(t,e):P.TypeGuard.IsUndefined(t)?kce(t,e):P.TypeGuard.IsUnion(t)?Cce(t,e):P.TypeGuard.IsUnknown(t)?Rce(t,e):P.TypeGuard.IsVoid(t)?Pce(t,e):_c(`Unknown left type operand '${t[QF.Kind]}'`)}function Ice(t,e){return He(t,e)}});var YS=M(JS=>{"use strict";Object.defineProperty(JS,"__esModule",{value:!0});JS.ExtendsFromMappedResult=Wce;var Ace=Tt(),Ece=Tf(),_ce=bn();function Oce(t,e,n,i,r){let o={};for(let s of globalThis.Object.getOwnPropertyNames(t))o[s]=(0,Ece.Extends)(t[s],e,n,i,(0,_ce.Clone)(r));return o}function Lce(t,e,n,i,r){return Oce(t.properties,e,n,i,r)}function Wce(t,e,n,i,r){let o=Lce(t,e,n,i,r);return(0,Ace.MappedResult)(o)}});var Tf=M(ZS=>{"use strict";Object.defineProperty(ZS,"__esModule",{value:!0});ZS.Extends=Nce;var iD=fe(),Fce=vt(),XS=QS(),Dce=eT(),Uce=YS(),rD=Ue();function $ce(t,e,n,i){let r=(0,XS.ExtendsCheck)(t,e);return r===XS.ExtendsResult.Union?(0,Fce.Union)([n,i]):r===XS.ExtendsResult.True?n:i}function Nce(t,e,n,i,r){return(0,rD.IsMappedResult)(t)?(0,Uce.ExtendsFromMappedResult)(t,e,n,i,r):(0,rD.IsMappedKey)(t)?(0,iD.CreateType)((0,Dce.ExtendsFromMappedKey)(t,e,n,i,r)):(0,iD.CreateType)($ce(t,e,n,i),r)}});var eT=M(tT=>{"use strict";Object.defineProperty(tT,"__esModule",{value:!0});tT.ExtendsFromMappedKey=Vce;var Bce=Tt(),jce=rn(),qce=Tf(),Gce=bn();function Kce(t,e,n,i,r){return{[t]:(0,qce.Extends)((0,jce.Literal)(t),e,n,i,(0,Gce.Clone)(r))}}function Hce(t,e,n,i,r){return t.reduce((o,s)=>({...o,...Kce(s,e,n,i,r)}),{})}function zce(t,e,n,i,r){return Hce(t.keys,e,n,i,r)}function Vce(t,e,n,i,r){let o=zce(t,e,n,i,r);return(0,Bce.MappedResult)(o)}});var oD=M(nT=>{"use strict";Object.defineProperty(nT,"__esModule",{value:!0});nT.ExtendsUndefinedCheck=Cf;var kf=ge();function Qce(t){return t.allOf.every(e=>Cf(e))}function Jce(t){return t.anyOf.some(e=>Cf(e))}function Yce(t){return!Cf(t.not)}function Cf(t){return t[kf.Kind]==="Intersect"?Qce(t):t[kf.Kind]==="Union"?Jce(t):t[kf.Kind]==="Not"?Yce(t):t[kf.Kind]==="Undefined"}});var Oc=M(Ci=>{"use strict";var Xce=Ci&&Ci.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),ud=Ci&&Ci.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Xce(e,t,n)};Object.defineProperty(Ci,"__esModule",{value:!0});ud(QS(),Ci);ud(eT(),Ci);ud(YS(),Ci);ud(oD(),Ci);ud(Tf(),Ci)});var rT=M(iT=>{"use strict";Object.defineProperty(iT,"__esModule",{value:!0});iT.ExcludeFromTemplateLiteral=tue;var Zce=Rf(),eue=Qi();function tue(t,e){return(0,Zce.Exclude)((0,eue.TemplateLiteralToUnion)(t),e)}});var Rf=M(aT=>{"use strict";Object.defineProperty(aT,"__esModule",{value:!0});aT.Exclude=aue;var oT=fe(),nue=vt(),iue=Ut(),Mf=Oc(),rue=lT(),oue=rT(),sT=Ue();function sue(t,e){let n=t.filter(i=>(0,Mf.ExtendsCheck)(i,e)===Mf.ExtendsResult.False);return n.length===1?n[0]:(0,nue.Union)(n)}function aue(t,e,n={}){return(0,sT.IsTemplateLiteral)(t)?(0,oT.CreateType)((0,oue.ExcludeFromTemplateLiteral)(t,e),n):(0,sT.IsMappedResult)(t)?(0,oT.CreateType)((0,rue.ExcludeFromMappedResult)(t,e),n):(0,oT.CreateType)((0,sT.IsUnion)(t)?sue(t.anyOf,e):(0,Mf.ExtendsCheck)(t,e)!==Mf.ExtendsResult.False?(0,iue.Never)():t,n)}});var lT=M(cT=>{"use strict";Object.defineProperty(cT,"__esModule",{value:!0});cT.ExcludeFromMappedResult=due;var lue=Tt(),cue=Rf();function uue(t,e){let n={};for(let i of globalThis.Object.getOwnPropertyNames(t))n[i]=(0,cue.Exclude)(t[i],e);return n}function pue(t,e){return uue(t.properties,e)}function due(t,e){let n=pue(t,e);return(0,lue.MappedResult)(n)}});var Pf=M(Ur=>{"use strict";var mue=Ur&&Ur.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),uT=Ur&&Ur.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&mue(e,t,n)};Object.defineProperty(Ur,"__esModule",{value:!0});uT(lT(),Ur);uT(rT(),Ur);uT(Rf(),Ur)});var dT=M(pT=>{"use strict";Object.defineProperty(pT,"__esModule",{value:!0});pT.ExtractFromTemplateLiteral=fue;var hue=If(),gue=Qi();function fue(t,e){return(0,hue.Extract)((0,gue.TemplateLiteralToUnion)(t),e)}});var If=M(gT=>{"use strict";Object.defineProperty(gT,"__esModule",{value:!0});gT.Extract=Sue;var mT=fe(),bue=vt(),xue=Ut(),Af=Oc(),vue=fT(),yue=dT(),hT=Ue();function wue(t,e){let n=t.filter(i=>(0,Af.ExtendsCheck)(i,e)!==Af.ExtendsResult.False);return n.length===1?n[0]:(0,bue.Union)(n)}function Sue(t,e,n){return(0,hT.IsTemplateLiteral)(t)?(0,mT.CreateType)((0,yue.ExtractFromTemplateLiteral)(t,e),n):(0,hT.IsMappedResult)(t)?(0,mT.CreateType)((0,vue.ExtractFromMappedResult)(t,e),n):(0,mT.CreateType)((0,hT.IsUnion)(t)?wue(t.anyOf,e):(0,Af.ExtendsCheck)(t,e)!==Af.ExtendsResult.False?t:(0,xue.Never)(),n)}});var fT=M(bT=>{"use strict";Object.defineProperty(bT,"__esModule",{value:!0});bT.ExtractFromMappedResult=Mue;var Tue=Tt(),kue=If();function Cue(t,e){let n={};for(let i of globalThis.Object.getOwnPropertyNames(t))n[i]=(0,kue.Extract)(t[i],e);return n}function Rue(t,e){return Cue(t.properties,e)}function Mue(t,e){let n=Rue(t,e);return(0,Tue.MappedResult)(n)}});var Ef=M($r=>{"use strict";var Pue=$r&&$r.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),xT=$r&&$r.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Pue(e,t,n)};Object.defineProperty($r,"__esModule",{value:!0});xT(fT(),$r);xT(dT(),$r);xT(If(),$r)});var sD=M(Nr=>{"use strict";var Iue=Nr&&Nr.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Aue=Nr&&Nr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Eue=Nr&&Nr.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;r<i.length;r++)i[r]!=="default"&&Iue(n,e,i[r]);return Aue(n,e),n}})();Object.defineProperty(Nr,"__esModule",{value:!0});Nr.InstanceType=Wue;var _ue=fe(),Oue=Ut(),Lue=Eue(Ue());function Wue(t,e){return Lue.IsConstructor(t)?(0,_ue.CreateType)(t.returns,e):(0,Oue.Never)(e)}});var _f=M(ya=>{"use strict";var Fue=ya&&ya.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Due=ya&&ya.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Fue(e,t,n)};Object.defineProperty(ya,"__esModule",{value:!0});Due(sD(),ya)});var aD=M(vT=>{"use strict";Object.defineProperty(vT,"__esModule",{value:!0});vT.ReadonlyOptional=Nue;var Uue=Oo(),$ue=Vi();function Nue(t){return(0,Uue.Readonly)((0,$ue.Optional)(t))}});var pd=M(wa=>{"use strict";var Bue=wa&&wa.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),jue=wa&&wa.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Bue(e,t,n)};Object.defineProperty(wa,"__esModule",{value:!0});jue(aD(),wa)});var dD=M(Lc=>{"use strict";Object.defineProperty(Lc,"__esModule",{value:!0});Lc.Record=ope;Lc.RecordPattern=wT;Lc.RecordKey=spe;Lc.RecordValue=ape;var que=fe(),cD=ge(),Gue=Ut(),Kue=Ao(),uD=wn(),lD=ea(),Hue=vt(),zue=Qi(),Sa=Hp(),pD=ki(),Vue=nn(),Xi=Ue();function Ta(t,e,n){return(0,que.CreateType)({[cD.Kind]:"Record",type:"object",patternProperties:{[t]:e}},n)}function yT(t,e,n){let i={};for(let r of t)i[r]=e;return(0,uD.Object)(i,{...n,[cD.Hint]:"Record"})}function Que(t,e,n){return(0,zue.IsTemplateLiteralFinite)(t)?yT((0,pD.IndexPropertyKeys)(t),e,n):Ta(t.pattern,e,n)}function Jue(t,e,n){return yT((0,pD.IndexPropertyKeys)((0,Hue.Union)(t)),e,n)}function Yue(t,e,n){return yT([t.toString()],e,n)}function Xue(t,e,n){return Ta(t.source,e,n)}function Zue(t,e,n){let i=(0,Vue.IsUndefined)(t.pattern)?Sa.PatternStringExact:t.pattern;return Ta(i,e,n)}function epe(t,e,n){return Ta(Sa.PatternStringExact,e,n)}function tpe(t,e,n){return Ta(Sa.PatternNeverExact,e,n)}function npe(t,e,n){return(0,uD.Object)({true:e,false:e},n)}function ipe(t,e,n){return Ta(Sa.PatternNumberExact,e,n)}function rpe(t,e,n){return Ta(Sa.PatternNumberExact,e,n)}function ope(t,e,n={}){return(0,Xi.IsUnion)(t)?Jue(t.anyOf,e,n):(0,Xi.IsTemplateLiteral)(t)?Que(t,e,n):(0,Xi.IsLiteral)(t)?Yue(t.const,e,n):(0,Xi.IsBoolean)(t)?npe(t,e,n):(0,Xi.IsInteger)(t)?ipe(t,e,n):(0,Xi.IsNumber)(t)?rpe(t,e,n):(0,Xi.IsRegExp)(t)?Xue(t,e,n):(0,Xi.IsString)(t)?Zue(t,e,n):(0,Xi.IsAny)(t)?epe(t,e,n):(0,Xi.IsNever)(t)?tpe(t,e,n):(0,Gue.Never)(n)}function wT(t){return globalThis.Object.getOwnPropertyNames(t.patternProperties)[0]}function spe(t){let e=wT(t);return e===Sa.PatternStringExact?(0,lD.String)():e===Sa.PatternNumberExact?(0,Kue.Number)():(0,lD.String)({pattern:e})}function ape(t){return t.patternProperties[wT(t)]}});var Wc=M(ka=>{"use strict";var lpe=ka&&ka.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),cpe=ka&&ka.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&lpe(e,t,n)};Object.defineProperty(ka,"__esModule",{value:!0});cpe(dD(),ka)});var hD=M(Zi=>{"use strict";var upe=Zi&&Zi.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),ppe=Zi&&Zi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),mD=Zi&&Zi.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;r<i.length;r++)i[r]!=="default"&&upe(n,e,i[r]);return ppe(n,e),n}})();Object.defineProperty(Zi,"__esModule",{value:!0});Zi.FromTypes=Fc;Zi.Instantiate=Ope;var dpe=Gg(),mpe=ga(),hpe=pd(),gpe=Oo(),fpe=Vi(),bpe=wn(),ST=Wc(),xpe=mD(nn()),kn=mD(Ue());function vpe(t,e){return e.parameters=Fc(t,e.parameters),e.returns=Ri(t,e.returns),e}function ype(t,e){return e.parameters=Fc(t,e.parameters),e.returns=Ri(t,e.returns),e}function wpe(t,e){return e.allOf=Fc(t,e.allOf),e}function Spe(t,e){return e.anyOf=Fc(t,e.anyOf),e}function Tpe(t,e){return xpe.IsUndefined(e.items)||(e.items=Fc(t,e.items)),e}function kpe(t,e){return e.items=Ri(t,e.items),e}function Cpe(t,e){return e.items=Ri(t,e.items),e}function Rpe(t,e){return e.items=Ri(t,e.items),e}function Mpe(t,e){return e.item=Ri(t,e.item),e}function Ppe(t,e){let n=_pe(t,e.properties);return{...e,...(0,bpe.Object)(n)}}function Ipe(t,e){let n=Ri(t,(0,ST.RecordKey)(e)),i=Ri(t,(0,ST.RecordValue)(e)),r=(0,ST.Record)(n,i);return{...e,...r}}function Ape(t,e){return e.index in t?t[e.index]:(0,mpe.Unknown)()}function Epe(t,e){let n=kn.IsReadonly(e),i=kn.IsOptional(e),r=Ri(t,e);return n&&i?(0,hpe.ReadonlyOptional)(r):n&&!i?(0,gpe.Readonly)(r):!n&&i?(0,fpe.Optional)(r):r}function _pe(t,e){return globalThis.Object.getOwnPropertyNames(e).reduce((n,i)=>({...n,[i]:Epe(t,e[i])}),{})}function Fc(t,e){return e.map(n=>Ri(t,n))}function Ri(t,e){return kn.IsConstructor(e)?vpe(t,e):kn.IsFunction(e)?ype(t,e):kn.IsIntersect(e)?wpe(t,e):kn.IsUnion(e)?Spe(t,e):kn.IsTuple(e)?Tpe(t,e):kn.IsArray(e)?kpe(t,e):kn.IsAsyncIterator(e)?Cpe(t,e):kn.IsIterator(e)?Rpe(t,e):kn.IsPromise(e)?Mpe(t,e):kn.IsObject(e)?Ppe(t,e):kn.IsRecord(e)?Ipe(t,e):kn.IsArgument(e)?Ape(t,e):e}function Ope(t,e){return Ri(e,(0,dpe.CloneType)(t))}});var Of=M(Ca=>{"use strict";var Lpe=Ca&&Ca.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Wpe=Ca&&Ca.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Lpe(e,t,n)};Object.defineProperty(Ca,"__esModule",{value:!0});Wpe(hD(),Ca)});var gD=M(TT=>{"use strict";Object.defineProperty(TT,"__esModule",{value:!0});TT.Integer=Upe;var Fpe=fe(),Dpe=ge();function Upe(t){return(0,Fpe.CreateType)({[Dpe.Kind]:"Integer",type:"integer"},t)}});var Lf=M(Ra=>{"use strict";var $pe=Ra&&Ra.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Npe=Ra&&Ra.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&$pe(e,t,n)};Object.defineProperty(Ra,"__esModule",{value:!0});Npe(gD(),Ra)});var CT=M(kT=>{"use strict";Object.defineProperty(kT,"__esModule",{value:!0});kT.IntrinsicFromMappedKey=Vpe;var Bpe=Tt(),jpe=Ma(),qpe=rn(),Gpe=bn();function Kpe(t,e,n){return{[t]:(0,jpe.Intrinsic)((0,qpe.Literal)(t),e,(0,Gpe.Clone)(n))}}function Hpe(t,e,n){return t.reduce((r,o)=>({...r,...Kpe(o,e,n)}),{})}function zpe(t,e,n){return Hpe(t.keys,e,n)}function Vpe(t,e,n){let i=zpe(t,e,n);return(0,Bpe.MappedResult)(i)}});var Ma=M(RT=>{"use strict";Object.defineProperty(RT,"__esModule",{value:!0});RT.Intrinsic=yD;var Qpe=fe(),Wf=Qi(),Jpe=CT(),fD=rn(),bD=vt(),Ff=Ue();function Ype(t){let[e,n]=[t.slice(0,1),t.slice(1)];return[e.toLowerCase(),n].join("")}function Xpe(t){let[e,n]=[t.slice(0,1),t.slice(1)];return[e.toUpperCase(),n].join("")}function Zpe(t){return t.toUpperCase()}function ede(t){return t.toLowerCase()}function tde(t,e,n){let i=(0,Wf.TemplateLiteralParseExact)(t.pattern);if(!(0,Wf.IsTemplateLiteralExpressionFinite)(i))return{...t,pattern:xD(t.pattern,e)};let s=[...(0,Wf.TemplateLiteralExpressionGenerate)(i)].map(c=>(0,fD.Literal)(c)),a=vD(s,e),l=(0,bD.Union)(a);return(0,Wf.TemplateLiteral)([l],n)}function xD(t,e){return typeof t=="string"?e==="Uncapitalize"?Ype(t):e==="Capitalize"?Xpe(t):e==="Uppercase"?Zpe(t):e==="Lowercase"?ede(t):t:t.toString()}function vD(t,e){return t.map(n=>yD(n,e))}function yD(t,e,n={}){return(0,Ff.IsMappedKey)(t)?(0,Jpe.IntrinsicFromMappedKey)(t,e,n):(0,Ff.IsTemplateLiteral)(t)?tde(t,e,n):(0,Ff.IsUnion)(t)?(0,bD.Union)(vD(t.anyOf,e),n):(0,Ff.IsLiteral)(t)?(0,fD.Literal)(xD(t.const,e),n):(0,Qpe.CreateType)(t,n)}});var wD=M(MT=>{"use strict";Object.defineProperty(MT,"__esModule",{value:!0});MT.Capitalize=ide;var nde=Ma();function ide(t,e={}){return(0,nde.Intrinsic)(t,"Capitalize",e)}});var SD=M(PT=>{"use strict";Object.defineProperty(PT,"__esModule",{value:!0});PT.Lowercase=ode;var rde=Ma();function ode(t,e={}){return(0,rde.Intrinsic)(t,"Lowercase",e)}});var TD=M(IT=>{"use strict";Object.defineProperty(IT,"__esModule",{value:!0});IT.Uncapitalize=ade;var sde=Ma();function ade(t,e={}){return(0,sde.Intrinsic)(t,"Uncapitalize",e)}});var kD=M(AT=>{"use strict";Object.defineProperty(AT,"__esModule",{value:!0});AT.Uppercase=cde;var lde=Ma();function cde(t,e={}){return(0,lde.Intrinsic)(t,"Uppercase",e)}});var Df=M(ci=>{"use strict";var ude=ci&&ci.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Dc=ci&&ci.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&ude(e,t,n)};Object.defineProperty(ci,"__esModule",{value:!0});Dc(wD(),ci);Dc(CT(),ci);Dc(Ma(),ci);Dc(SD(),ci);Dc(TD(),ci);Dc(kD(),ci)});var _T=M(ET=>{"use strict";Object.defineProperty(ET,"__esModule",{value:!0});ET.OmitFromMappedResult=fde;var pde=Tt(),dde=Uf(),mde=bn();function hde(t,e,n){let i={};for(let r of globalThis.Object.getOwnPropertyNames(t))i[r]=(0,dde.Omit)(t[r],e,(0,mde.Clone)(n));return i}function gde(t,e,n){return hde(t.properties,e,n)}function fde(t,e,n){let i=gde(t,e,n);return(0,pde.MappedResult)(i)}});var Uf=M(WT=>{"use strict";Object.defineProperty(WT,"__esModule",{value:!0});WT.Omit=_de;var bde=fe(),xde=Yg(),vde=jp(),OT=Po(),yde=rn(),wde=ki(),Sde=Nn(),CD=vt(),RD=wn(),Tde=FT(),kde=_T(),Br=Ue(),Cde=nn();function Rde(t,e){return t.map(n=>LT(n,e))}function Mde(t,e){return t.map(n=>LT(n,e))}function Pde(t,e){let{[e]:n,...i}=t;return i}function Ide(t,e){return e.reduce((n,i)=>Pde(n,i),t)}function Ade(t,e,n){let i=(0,xde.Discard)(t,[vde.TransformKind,"$id","required","properties"]),r=Ide(n,e);return(0,RD.Object)(r,i)}function Ede(t){let e=t.reduce((n,i)=>(0,Br.IsLiteralValue)(i)?[...n,(0,yde.Literal)(i)]:n,[]);return(0,CD.Union)(e)}function LT(t,e){return(0,Br.IsIntersect)(t)?(0,Sde.Intersect)(Rde(t.allOf,e)):(0,Br.IsUnion)(t)?(0,CD.Union)(Mde(t.anyOf,e)):(0,Br.IsObject)(t)?Ade(t,e,t.properties):(0,RD.Object)({})}function _de(t,e,n){let i=(0,Cde.IsArray)(e)?Ede(e):e,r=(0,Br.IsSchema)(e)?(0,wde.IndexPropertyKeys)(e):e,o=(0,Br.IsRef)(t),s=(0,Br.IsRef)(e);return(0,Br.IsMappedResult)(t)?(0,kde.OmitFromMappedResult)(t,r,n):(0,Br.IsMappedKey)(e)?(0,Tde.OmitFromMappedKey)(t,e,n):o&&s?(0,OT.Computed)("Omit",[t,i],n):!o&&s?(0,OT.Computed)("Omit",[t,i],n):o&&!s?(0,OT.Computed)("Omit",[t,i],n):(0,bde.CreateType)({...LT(t,r),...n})}});var FT=M(DT=>{"use strict";Object.defineProperty(DT,"__esModule",{value:!0});DT.OmitFromMappedKey=$de;var Ode=Tt(),Lde=Uf(),Wde=bn();function Fde(t,e,n){return{[e]:(0,Lde.Omit)(t,[e],(0,Wde.Clone)(n))}}function Dde(t,e,n){return e.reduce((i,r)=>({...i,...Fde(t,r,n)}),{})}function Ude(t,e,n){return Dde(t,e.keys,n)}function $de(t,e,n){let i=Ude(t,e,n);return(0,Ode.MappedResult)(i)}});var dd=M(jr=>{"use strict";var Nde=jr&&jr.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),UT=jr&&jr.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Nde(e,t,n)};Object.defineProperty(jr,"__esModule",{value:!0});UT(FT(),jr);UT(_T(),jr);UT(Uf(),jr)});var NT=M($T=>{"use strict";Object.defineProperty($T,"__esModule",{value:!0});$T.PickFromMappedResult=Hde;var Bde=Tt(),jde=$f(),qde=bn();function Gde(t,e,n){let i={};for(let r of globalThis.Object.getOwnPropertyNames(t))i[r]=(0,jde.Pick)(t[r],e,(0,qde.Clone)(n));return i}function Kde(t,e,n){return Gde(t.properties,e,n)}function Hde(t,e,n){let i=Kde(t,e,n);return(0,Bde.MappedResult)(i)}});var $f=M(qT=>{"use strict";Object.defineProperty(qT,"__esModule",{value:!0});qT.Pick=ame;var zde=fe(),Vde=Yg(),BT=Po(),Qde=Nn(),Jde=rn(),MD=wn(),PD=vt(),Yde=ki(),Xde=jp(),qr=Ue(),Zde=nn(),eme=GT(),tme=NT();function nme(t,e){return t.map(n=>jT(n,e))}function ime(t,e){return t.map(n=>jT(n,e))}function rme(t,e){let n={};for(let i of e)i in t&&(n[i]=t[i]);return n}function ome(t,e,n){let i=(0,Vde.Discard)(t,[Xde.TransformKind,"$id","required","properties"]),r=rme(n,e);return(0,MD.Object)(r,i)}function sme(t){let e=t.reduce((n,i)=>(0,qr.IsLiteralValue)(i)?[...n,(0,Jde.Literal)(i)]:n,[]);return(0,PD.Union)(e)}function jT(t,e){return(0,qr.IsIntersect)(t)?(0,Qde.Intersect)(nme(t.allOf,e)):(0,qr.IsUnion)(t)?(0,PD.Union)(ime(t.anyOf,e)):(0,qr.IsObject)(t)?ome(t,e,t.properties):(0,MD.Object)({})}function ame(t,e,n){let i=(0,Zde.IsArray)(e)?sme(e):e,r=(0,qr.IsSchema)(e)?(0,Yde.IndexPropertyKeys)(e):e,o=(0,qr.IsRef)(t),s=(0,qr.IsRef)(e);return(0,qr.IsMappedResult)(t)?(0,tme.PickFromMappedResult)(t,r,n):(0,qr.IsMappedKey)(e)?(0,eme.PickFromMappedKey)(t,e,n):o&&s?(0,BT.Computed)("Pick",[t,i],n):!o&&s?(0,BT.Computed)("Pick",[t,i],n):o&&!s?(0,BT.Computed)("Pick",[t,i],n):(0,zde.CreateType)({...jT(t,r),...n})}});var GT=M(KT=>{"use strict";Object.defineProperty(KT,"__esModule",{value:!0});KT.PickFromMappedKey=hme;var lme=Tt(),cme=$f(),ume=bn();function pme(t,e,n){return{[e]:(0,cme.Pick)(t,[e],(0,ume.Clone)(n))}}function dme(t,e,n){return e.reduce((i,r)=>({...i,...pme(t,r,n)}),{})}function mme(t,e,n){return dme(t,e.keys,n)}function hme(t,e,n){let i=mme(t,e,n);return(0,lme.MappedResult)(i)}});var md=M(Gr=>{"use strict";var gme=Gr&&Gr.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),HT=Gr&&Gr.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&gme(e,t,n)};Object.defineProperty(Gr,"__esModule",{value:!0});HT(GT(),Gr);HT(NT(),Gr);HT($f(),Gr)});var VT=M(Kr=>{"use strict";var fme=Kr&&Kr.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),bme=Kr&&Kr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),xme=Kr&&Kr.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;r<i.length;r++)i[r]!=="default"&&fme(n,e,i[r]);return bme(n,e),n}})();Object.defineProperty(Kr,"__esModule",{value:!0});Kr.Partial=Eme;var vme=fe(),zT=Po(),yme=Vi(),AD=wn(),wme=Nn(),Sme=vt(),Tme=Wo(),kme=Er(),Cme=ge(),Rme=QT(),sn=xme(Ue());function Mme(t,e){return(0,zT.Computed)("Partial",[(0,zT.Computed)(t,e)])}function Pme(t){return(0,zT.Computed)("Partial",[(0,Tme.Ref)(t)])}function Ime(t){let e={};for(let n of globalThis.Object.getOwnPropertyNames(t))e[n]=(0,yme.Optional)(t[n]);return e}function Ame(t,e){let n=(0,kme.Discard)(t,[Cme.TransformKind,"$id","required","properties"]),i=Ime(e);return(0,AD.Object)(i,n)}function ID(t){return t.map(e=>ED(e))}function ED(t){return sn.IsComputed(t)?Mme(t.target,t.parameters):sn.IsRef(t)?Pme(t.$ref):sn.IsIntersect(t)?(0,wme.Intersect)(ID(t.allOf)):sn.IsUnion(t)?(0,Sme.Union)(ID(t.anyOf)):sn.IsObject(t)?Ame(t,t.properties):sn.IsBigInt(t)||sn.IsBoolean(t)||sn.IsInteger(t)||sn.IsLiteral(t)||sn.IsNull(t)||sn.IsNumber(t)||sn.IsString(t)||sn.IsSymbol(t)||sn.IsUndefined(t)?t:(0,AD.Object)({})}function Eme(t,e){return sn.IsMappedResult(t)?(0,Rme.PartialFromMappedResult)(t,e):(0,vme.CreateType)({...ED(t),...e})}});var QT=M(JT=>{"use strict";Object.defineProperty(JT,"__esModule",{value:!0});JT.PartialFromMappedResult=Dme;var _me=Tt(),Ome=VT(),Lme=bn();function Wme(t,e){let n={};for(let i of globalThis.Object.getOwnPropertyNames(t))n[i]=(0,Ome.Partial)(t[i],(0,Lme.Clone)(e));return n}function Fme(t,e){return Wme(t.properties,e)}function Dme(t,e){let n=Fme(t,e);return(0,_me.MappedResult)(n)}});var hd=M(Fo=>{"use strict";var Ume=Fo&&Fo.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),_D=Fo&&Fo.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Ume(e,t,n)};Object.defineProperty(Fo,"__esModule",{value:!0});_D(QT(),Fo);_D(VT(),Fo)});var XT=M(Hr=>{"use strict";var $me=Hr&&Hr.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Nme=Hr&&Hr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Bme=Hr&&Hr.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;r<i.length;r++)i[r]!=="default"&&$me(n,e,i[r]);return Nme(n,e),n}})();Object.defineProperty(Hr,"__esModule",{value:!0});Hr.Required=Yme;var jme=fe(),YT=Po(),LD=wn(),qme=Nn(),Gme=vt(),Kme=Wo(),WD=ge(),FD=Er(),Hme=ZT(),an=Bme(Ue());function zme(t,e){return(0,YT.Computed)("Required",[(0,YT.Computed)(t,e)])}function Vme(t){return(0,YT.Computed)("Required",[(0,Kme.Ref)(t)])}function Qme(t){let e={};for(let n of globalThis.Object.getOwnPropertyNames(t))e[n]=(0,FD.Discard)(t[n],[WD.OptionalKind]);return e}function Jme(t,e){let n=(0,FD.Discard)(t,[WD.TransformKind,"$id","required","properties"]),i=Qme(e);return(0,LD.Object)(i,n)}function OD(t){return t.map(e=>DD(e))}function DD(t){return an.IsComputed(t)?zme(t.target,t.parameters):an.IsRef(t)?Vme(t.$ref):an.IsIntersect(t)?(0,qme.Intersect)(OD(t.allOf)):an.IsUnion(t)?(0,Gme.Union)(OD(t.anyOf)):an.IsObject(t)?Jme(t,t.properties):an.IsBigInt(t)||an.IsBoolean(t)||an.IsInteger(t)||an.IsLiteral(t)||an.IsNull(t)||an.IsNumber(t)||an.IsString(t)||an.IsSymbol(t)||an.IsUndefined(t)?t:(0,LD.Object)({})}function Yme(t,e){return an.IsMappedResult(t)?(0,Hme.RequiredFromMappedResult)(t,e):(0,jme.CreateType)({...DD(t),...e})}});var ZT=M(ek=>{"use strict";Object.defineProperty(ek,"__esModule",{value:!0});ek.RequiredFromMappedResult=nhe;var Xme=Tt(),Zme=XT();function ehe(t,e){let n={};for(let i of globalThis.Object.getOwnPropertyNames(t))n[i]=(0,Zme.Required)(t[i],e);return n}function the(t,e){return ehe(t.properties,e)}function nhe(t,e){let n=the(t,e);return(0,Xme.MappedResult)(n)}});var gd=M(Do=>{"use strict";var ihe=Do&&Do.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),UD=Do&&Do.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&ihe(e,t,n)};Object.defineProperty(Do,"__esModule",{value:!0});UD(ZT(),Do);UD(XT(),Do)});var jD=M(Mi=>{"use strict";var rhe=Mi&&Mi.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),ohe=Mi&&Mi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),she=Mi&&Mi.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;r<i.length;r++)i[r]!=="default"&&rhe(n,e,i[r]);return ohe(n,e),n}})();Object.defineProperty(Mi,"__esModule",{value:!0});Mi.FromType=Rn;Mi.ComputeType=BD;Mi.ComputeModuleProperties=Ghe;var Cn=Ir(),ahe=rw(),$D=Er(),lhe=yc(),che=rd(),uhe=wc(),phe=Sc(),dhe=ki(),mhe=Io(),hhe=Nn(),ghe=Pc(),fhe=Ac(),bhe=wn(),xhe=dd(),vhe=md(),tk=Ut(),yhe=hd(),ND=Wc(),whe=gd(),She=Lr(),The=vt(),Nf=ge(),qt=she(Ue());function khe(t,e){return e.map(n=>qt.IsRef(n)?nk(t,n.$ref):Rn(t,n))}function nk(t,e){return e in t?qt.IsRef(t[e])?nk(t,t[e].$ref):Rn(t,t[e]):(0,tk.Never)()}function Che(t){return(0,che.Awaited)(t[0])}function Rhe(t){return(0,dhe.Index)(t[0],t[1])}function Mhe(t){return(0,fhe.KeyOf)(t[0])}function Phe(t){return(0,yhe.Partial)(t[0])}function Ihe(t){return(0,xhe.Omit)(t[0],t[1])}function Ahe(t){return(0,vhe.Pick)(t[0],t[1])}function Ehe(t){return(0,whe.Required)(t[0])}function _he(t,e,n){let i=khe(t,n);return e==="Awaited"?Che(i):e==="Index"?Rhe(i):e==="KeyOf"?Mhe(i):e==="Partial"?Phe(i):e==="Omit"?Ihe(i):e==="Pick"?Ahe(i):e==="Required"?Ehe(i):(0,tk.Never)()}function Ohe(t,e){return(0,lhe.Array)(Rn(t,e))}function Lhe(t,e){return(0,uhe.AsyncIterator)(Rn(t,e))}function Whe(t,e,n){return(0,phe.Constructor)(fd(t,e),Rn(t,n))}function Fhe(t,e,n){return(0,mhe.Function)(fd(t,e),Rn(t,n))}function Dhe(t,e){return(0,hhe.Intersect)(fd(t,e))}function Uhe(t,e){return(0,ghe.Iterator)(Rn(t,e))}function $he(t,e){return(0,bhe.Object)(globalThis.Object.keys(e).reduce((n,i)=>({...n,[i]:Rn(t,e[i])}),{}))}function Nhe(t,e){let[n,i]=[Rn(t,(0,ND.RecordValue)(e)),(0,ND.RecordPattern)(e)],r=(0,ahe.CloneType)(e);return r.patternProperties[i]=n,r}function Bhe(t,e){return qt.IsRef(e)?{...nk(t,e.$ref),[Nf.TransformKind]:e[Nf.TransformKind]}:e}function jhe(t,e){return(0,She.Tuple)(fd(t,e))}function qhe(t,e){return(0,The.Union)(fd(t,e))}function fd(t,e){return e.map(n=>Rn(t,n))}function Rn(t,e){return qt.IsOptional(e)?(0,Cn.CreateType)(Rn(t,(0,$D.Discard)(e,[Nf.OptionalKind])),e):qt.IsReadonly(e)?(0,Cn.CreateType)(Rn(t,(0,$D.Discard)(e,[Nf.ReadonlyKind])),e):qt.IsTransform(e)?(0,Cn.CreateType)(Bhe(t,e),e):qt.IsArray(e)?(0,Cn.CreateType)(Ohe(t,e.items),e):qt.IsAsyncIterator(e)?(0,Cn.CreateType)(Lhe(t,e.items),e):qt.IsComputed(e)?(0,Cn.CreateType)(_he(t,e.target,e.parameters)):qt.IsConstructor(e)?(0,Cn.CreateType)(Whe(t,e.parameters,e.returns),e):qt.IsFunction(e)?(0,Cn.CreateType)(Fhe(t,e.parameters,e.returns),e):qt.IsIntersect(e)?(0,Cn.CreateType)(Dhe(t,e.allOf),e):qt.IsIterator(e)?(0,Cn.CreateType)(Uhe(t,e.items),e):qt.IsObject(e)?(0,Cn.CreateType)($he(t,e.properties),e):qt.IsRecord(e)?(0,Cn.CreateType)(Nhe(t,e)):qt.IsTuple(e)?(0,Cn.CreateType)(jhe(t,e.items||[]),e):qt.IsUnion(e)?(0,Cn.CreateType)(qhe(t,e.anyOf),e):e}function BD(t,e){return e in t?Rn(t,t[e]):(0,tk.Never)()}function Ghe(t){return globalThis.Object.getOwnPropertyNames(t).reduce((e,n)=>({...e,[n]:BD(t,n)}),{})}});var GD=M(bd=>{"use strict";Object.defineProperty(bd,"__esModule",{value:!0});bd.TModule=void 0;bd.Module=zhe;var qD=Ir(),Khe=ge(),Hhe=jD(),Bf=class{constructor(e){let n=(0,Hhe.ComputeModuleProperties)(e),i=this.WithIdentifiers(n);this.$defs=i}Import(e,n){let i={...this.$defs,[e]:(0,qD.CreateType)(this.$defs[e],n)};return(0,qD.CreateType)({[Khe.Kind]:"Import",$defs:i,$ref:e})}WithIdentifiers(e){return globalThis.Object.getOwnPropertyNames(e).reduce((n,i)=>({...n,[i]:{...e[i],$id:i}}),{})}};bd.TModule=Bf;function zhe(t){return new Bf(t)}});var jf=M(Pa=>{"use strict";var Vhe=Pa&&Pa.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Qhe=Pa&&Pa.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Vhe(e,t,n)};Object.defineProperty(Pa,"__esModule",{value:!0});Qhe(GD(),Pa)});var KD=M(ik=>{"use strict";Object.defineProperty(ik,"__esModule",{value:!0});ik.Not=Xhe;var Jhe=fe(),Yhe=ge();function Xhe(t,e){return(0,Jhe.CreateType)({[Yhe.Kind]:"Not",not:t},e)}});var qf=M(Ia=>{"use strict";var Zhe=Ia&&Ia.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),ege=Ia&&Ia.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Zhe(e,t,n)};Object.defineProperty(Ia,"__esModule",{value:!0});ege(KD(),Ia)});var HD=M(zr=>{"use strict";var tge=zr&&zr.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),nge=zr&&zr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),ige=zr&&zr.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;r<i.length;r++)i[r]!=="default"&&tge(n,e,i[r]);return nge(n,e),n}})();Object.defineProperty(zr,"__esModule",{value:!0});zr.Parameters=age;var rge=Lr(),oge=Ut(),sge=ige(Ue());function age(t,e){return sge.IsFunction(t)?(0,rge.Tuple)(t.parameters,e):(0,oge.Never)()}});var Gf=M(Aa=>{"use strict";var lge=Aa&&Aa.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),cge=Aa&&Aa.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&lge(e,t,n)};Object.defineProperty(Aa,"__esModule",{value:!0});cge(HD(),Aa)});var VD=M(rk=>{"use strict";Object.defineProperty(rk,"__esModule",{value:!0});rk.Recursive=hge;var uge=Gg(),pge=fe(),dge=nn(),zD=ge(),mge=0;function hge(t,e={}){(0,dge.IsUndefined)(e.$id)&&(e.$id=`T${mge++}`);let n=(0,uge.CloneType)(t({[zD.Kind]:"This",$ref:`${e.$id}`}));return n.$id=e.$id,(0,pge.CreateType)({[zD.Hint]:"Recursive",...n},e)}});var Kf=M(Ea=>{"use strict";var gge=Ea&&Ea.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),fge=Ea&&Ea.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&gge(e,t,n)};Object.defineProperty(Ea,"__esModule",{value:!0});fge(VD(),Ea)});var QD=M(ok=>{"use strict";Object.defineProperty(ok,"__esModule",{value:!0});ok.RegExp=yge;var bge=fe(),xge=nn(),vge=ge();function yge(t,e){let n=(0,xge.IsString)(t)?new globalThis.RegExp(t):t;return(0,bge.CreateType)({[vge.Kind]:"RegExp",type:"RegExp",source:n.source,flags:n.flags},e)}});var Hf=M(_a=>{"use strict";var wge=_a&&_a.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Sge=_a&&_a.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&wge(e,t,n)};Object.defineProperty(_a,"__esModule",{value:!0});Sge(QD(),_a)});var JD=M(ak=>{"use strict";Object.defineProperty(ak,"__esModule",{value:!0});ak.Rest=kge;var sk=Ue();function Tge(t){return(0,sk.IsIntersect)(t)?t.allOf:(0,sk.IsUnion)(t)?t.anyOf:(0,sk.IsTuple)(t)?t.items??[]:[]}function kge(t){return Tge(t)}});var zf=M(Oa=>{"use strict";var Cge=Oa&&Oa.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Rge=Oa&&Oa.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Cge(e,t,n)};Object.defineProperty(Oa,"__esModule",{value:!0});Rge(JD(),Oa)});var YD=M(Vr=>{"use strict";var Mge=Vr&&Vr.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Pge=Vr&&Vr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Ige=Vr&&Vr.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;r<i.length;r++)i[r]!=="default"&&Mge(n,e,i[r]);return Pge(n,e),n}})();Object.defineProperty(Vr,"__esModule",{value:!0});Vr.ReturnType=Oge;var Age=fe(),Ege=Ut(),_ge=Ige(Ue());function Oge(t,e){return _ge.IsFunction(t)?(0,Age.CreateType)(t.returns,e):(0,Ege.Never)(e)}});var Vf=M(La=>{"use strict";var Lge=La&&La.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Wge=La&&La.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Lge(e,t,n)};Object.defineProperty(La,"__esModule",{value:!0});Wge(YD(),La)});var ZD=M(XD=>{"use strict";Object.defineProperty(XD,"__esModule",{value:!0})});var tU=M(eU=>{"use strict";Object.defineProperty(eU,"__esModule",{value:!0});var eYe=ge()});var iU=M(Uo=>{"use strict";var Fge=Uo&&Uo.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),nU=Uo&&Uo.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Fge(e,t,n)};Object.defineProperty(Uo,"__esModule",{value:!0});nU(ZD(),Uo);nU(tU(),Uo)});var oU=M(rU=>{"use strict";Object.defineProperty(rU,"__esModule",{value:!0})});var sU=M(Wa=>{"use strict";var Dge=Wa&&Wa.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Uge=Wa&&Wa.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Dge(e,t,n)};Object.defineProperty(Wa,"__esModule",{value:!0});Uge(oU(),Wa)});var aU=M(Fa=>{"use strict";Object.defineProperty(Fa,"__esModule",{value:!0});Fa.TransformEncodeBuilder=Fa.TransformDecodeBuilder=void 0;Fa.Transform=Nge;var Qf=ge(),$ge=Ue(),Jf=class{constructor(e){this.schema=e}Decode(e){return new Yf(this.schema,e)}};Fa.TransformDecodeBuilder=Jf;var Yf=class{constructor(e,n){this.schema=e,this.decode=n}EncodeTransform(e,n){let o={Encode:s=>n[Qf.TransformKind].Encode(e(s)),Decode:s=>this.decode(n[Qf.TransformKind].Decode(s))};return{...n,[Qf.TransformKind]:o}}EncodeSchema(e,n){let i={Decode:this.decode,Encode:e};return{...n,[Qf.TransformKind]:i}}Encode(e){return(0,$ge.IsTransform)(this.schema)?this.EncodeTransform(e,this.schema):this.EncodeSchema(e,this.schema)}};Fa.TransformEncodeBuilder=Yf;function Nge(t){return new Jf(t)}});var Xf=M(Da=>{"use strict";var Bge=Da&&Da.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),jge=Da&&Da.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Bge(e,t,n)};Object.defineProperty(Da,"__esModule",{value:!0});jge(aU(),Da)});var cU=M(lk=>{"use strict";Object.defineProperty(lk,"__esModule",{value:!0});lk.Unsafe=Gge;var qge=fe(),lU=ge();function Gge(t={}){return(0,qge.CreateType)({[lU.Kind]:t[lU.Kind]??"Unsafe"},t)}});var Zf=M(Ua=>{"use strict";var Kge=Ua&&Ua.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Hge=Ua&&Ua.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Kge(e,t,n)};Object.defineProperty(Ua,"__esModule",{value:!0});Hge(cU(),Ua)});var uU=M(ck=>{"use strict";Object.defineProperty(ck,"__esModule",{value:!0});ck.Void=Qge;var zge=fe(),Vge=ge();function Qge(t){return(0,zge.CreateType)({[Vge.Kind]:"Void",type:"void"},t)}});var e0=M($a=>{"use strict";var Jge=$a&&$a.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Yge=$a&&$a.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Jge(e,t,n)};Object.defineProperty($a,"__esModule",{value:!0});Yge(uU(),$a)});var pk=M(n0=>{"use strict";Object.defineProperty(n0,"__esModule",{value:!0});n0.JsonTypeBuilder=void 0;var Xge=vc(),Zge=yc(),efe=Jp(),tfe=gf(),nfe=bf(),ife=vf(),rfe=Pf(),ofe=Oc(),sfe=Ef(),afe=ki(),lfe=Lf(),cfe=Nn(),t0=Df(),ufe=Ac(),pfe=rn(),dfe=Tt(),mfe=Ut(),hfe=qf(),gfe=sd(),ffe=jf(),bfe=Ao(),xfe=wn(),vfe=dd(),yfe=Vi(),wfe=hd(),Sfe=md(),Tfe=Oo(),kfe=pd(),Cfe=Wc(),Rfe=Kf(),Mfe=Wo(),Pfe=gd(),Ife=zf(),Afe=ea(),Efe=Qi(),_fe=Xf(),Ofe=Lr(),Lfe=vt(),Wfe=ga(),Ffe=Zf(),uk=class{ReadonlyOptional(e){return(0,kfe.ReadonlyOptional)(e)}Readonly(e,n){return(0,Tfe.Readonly)(e,n??!0)}Optional(e,n){return(0,yfe.Optional)(e,n??!0)}Any(e){return(0,Xge.Any)(e)}Array(e,n){return(0,Zge.Array)(e,n)}Boolean(e){return(0,efe.Boolean)(e)}Capitalize(e,n){return(0,t0.Capitalize)(e,n)}Composite(e,n){return(0,tfe.Composite)(e,n)}Const(e,n){return(0,nfe.Const)(e,n)}Enum(e,n){return(0,ife.Enum)(e,n)}Exclude(e,n,i){return(0,rfe.Exclude)(e,n,i)}Extends(e,n,i,r,o){return(0,ofe.Extends)(e,n,i,r,o)}Extract(e,n,i){return(0,sfe.Extract)(e,n,i)}Index(e,n,i){return(0,afe.Index)(e,n,i)}Integer(e){return(0,lfe.Integer)(e)}Intersect(e,n){return(0,cfe.Intersect)(e,n)}KeyOf(e,n){return(0,ufe.KeyOf)(e,n)}Literal(e,n){return(0,pfe.Literal)(e,n)}Lowercase(e,n){return(0,t0.Lowercase)(e,n)}Mapped(e,n,i){return(0,dfe.Mapped)(e,n,i)}Module(e){return(0,ffe.Module)(e)}Never(e){return(0,mfe.Never)(e)}Not(e,n){return(0,hfe.Not)(e,n)}Null(e){return(0,gfe.Null)(e)}Number(e){return(0,bfe.Number)(e)}Object(e,n){return(0,xfe.Object)(e,n)}Omit(e,n,i){return(0,vfe.Omit)(e,n,i)}Partial(e,n){return(0,wfe.Partial)(e,n)}Pick(e,n,i){return(0,Sfe.Pick)(e,n,i)}Record(e,n,i){return(0,Cfe.Record)(e,n,i)}Recursive(e,n){return(0,Rfe.Recursive)(e,n)}Ref(...e){return(0,Mfe.Ref)(e[0],e[1])}Required(e,n){return(0,Pfe.Required)(e,n)}Rest(e){return(0,Ife.Rest)(e)}String(e){return(0,Afe.String)(e)}TemplateLiteral(e,n){return(0,Efe.TemplateLiteral)(e,n)}Transform(e){return(0,_fe.Transform)(e)}Tuple(e,n){return(0,Ofe.Tuple)(e,n)}Uncapitalize(e,n){return(0,t0.Uncapitalize)(e,n)}Union(e,n){return(0,Lfe.Union)(e,n)}Unknown(e){return(0,Wfe.Unknown)(e)}Unsafe(e){return(0,Ffe.Unsafe)(e)}Uppercase(e,n){return(0,t0.Uppercase)(e,n)}};n0.JsonTypeBuilder=uk});var pU=M(q=>{"use strict";Object.defineProperty(q,"__esModule",{value:!0});q.Rest=q.Required=q.RegExp=q.Ref=q.Recursive=q.Record=q.ReadonlyOptional=q.Readonly=q.Promise=q.Pick=q.Partial=q.Parameters=q.Optional=q.Omit=q.Object=q.Number=q.Null=q.Not=q.Never=q.Module=q.Mapped=q.Literal=q.KeyOf=q.Iterator=q.Uppercase=q.Lowercase=q.Uncapitalize=q.Capitalize=q.Intersect=q.Integer=q.Instantiate=q.InstanceType=q.Index=q.Function=q.Extract=q.Extends=q.Exclude=q.Enum=q.Date=q.ConstructorParameters=q.Constructor=q.Const=q.Composite=q.Boolean=q.BigInt=q.Awaited=q.AsyncIterator=q.Array=q.Argument=q.Any=void 0;q.Void=q.Unsafe=q.Unknown=q.Union=q.Undefined=q.Uint8Array=q.Tuple=q.Transform=q.TemplateLiteral=q.Symbol=q.String=q.ReturnType=void 0;var Dfe=vc();Object.defineProperty(q,"Any",{enumerable:!0,get:function(){return Dfe.Any}});var Ufe=Jg();Object.defineProperty(q,"Argument",{enumerable:!0,get:function(){return Ufe.Argument}});var $fe=yc();Object.defineProperty(q,"Array",{enumerable:!0,get:function(){return $fe.Array}});var Nfe=wc();Object.defineProperty(q,"AsyncIterator",{enumerable:!0,get:function(){return Nfe.AsyncIterator}});var Bfe=rd();Object.defineProperty(q,"Awaited",{enumerable:!0,get:function(){return Bfe.Awaited}});var jfe=Rc();Object.defineProperty(q,"BigInt",{enumerable:!0,get:function(){return jfe.BigInt}});var qfe=Jp();Object.defineProperty(q,"Boolean",{enumerable:!0,get:function(){return qfe.Boolean}});var Gfe=gf();Object.defineProperty(q,"Composite",{enumerable:!0,get:function(){return Gfe.Composite}});var Kfe=bf();Object.defineProperty(q,"Const",{enumerable:!0,get:function(){return Kfe.Const}});var Hfe=Sc();Object.defineProperty(q,"Constructor",{enumerable:!0,get:function(){return Hfe.Constructor}});var zfe=xf();Object.defineProperty(q,"ConstructorParameters",{enumerable:!0,get:function(){return zfe.ConstructorParameters}});var Vfe=od();Object.defineProperty(q,"Date",{enumerable:!0,get:function(){return Vfe.Date}});var Qfe=vf();Object.defineProperty(q,"Enum",{enumerable:!0,get:function(){return Qfe.Enum}});var Jfe=Pf();Object.defineProperty(q,"Exclude",{enumerable:!0,get:function(){return Jfe.Exclude}});var Yfe=Oc();Object.defineProperty(q,"Extends",{enumerable:!0,get:function(){return Yfe.Extends}});var Xfe=Ef();Object.defineProperty(q,"Extract",{enumerable:!0,get:function(){return Xfe.Extract}});var Zfe=Io();Object.defineProperty(q,"Function",{enumerable:!0,get:function(){return Zfe.Function}});var e0e=ki();Object.defineProperty(q,"Index",{enumerable:!0,get:function(){return e0e.Index}});var t0e=_f();Object.defineProperty(q,"InstanceType",{enumerable:!0,get:function(){return t0e.InstanceType}});var n0e=Of();Object.defineProperty(q,"Instantiate",{enumerable:!0,get:function(){return n0e.Instantiate}});var i0e=Lf();Object.defineProperty(q,"Integer",{enumerable:!0,get:function(){return i0e.Integer}});var r0e=Nn();Object.defineProperty(q,"Intersect",{enumerable:!0,get:function(){return r0e.Intersect}});var i0=Df();Object.defineProperty(q,"Capitalize",{enumerable:!0,get:function(){return i0.Capitalize}});Object.defineProperty(q,"Uncapitalize",{enumerable:!0,get:function(){return i0.Uncapitalize}});Object.defineProperty(q,"Lowercase",{enumerable:!0,get:function(){return i0.Lowercase}});Object.defineProperty(q,"Uppercase",{enumerable:!0,get:function(){return i0.Uppercase}});var o0e=Pc();Object.defineProperty(q,"Iterator",{enumerable:!0,get:function(){return o0e.Iterator}});var s0e=Ac();Object.defineProperty(q,"KeyOf",{enumerable:!0,get:function(){return s0e.KeyOf}});var a0e=rn();Object.defineProperty(q,"Literal",{enumerable:!0,get:function(){return a0e.Literal}});var l0e=Tt();Object.defineProperty(q,"Mapped",{enumerable:!0,get:function(){return l0e.Mapped}});var c0e=jf();Object.defineProperty(q,"Module",{enumerable:!0,get:function(){return c0e.Module}});var u0e=Ut();Object.defineProperty(q,"Never",{enumerable:!0,get:function(){return u0e.Never}});var p0e=qf();Object.defineProperty(q,"Not",{enumerable:!0,get:function(){return p0e.Not}});var d0e=sd();Object.defineProperty(q,"Null",{enumerable:!0,get:function(){return d0e.Null}});var m0e=Ao();Object.defineProperty(q,"Number",{enumerable:!0,get:function(){return m0e.Number}});var h0e=wn();Object.defineProperty(q,"Object",{enumerable:!0,get:function(){return h0e.Object}});var g0e=dd();Object.defineProperty(q,"Omit",{enumerable:!0,get:function(){return g0e.Omit}});var f0e=Vi();Object.defineProperty(q,"Optional",{enumerable:!0,get:function(){return f0e.Optional}});var b0e=Gf();Object.defineProperty(q,"Parameters",{enumerable:!0,get:function(){return b0e.Parameters}});var x0e=hd();Object.defineProperty(q,"Partial",{enumerable:!0,get:function(){return x0e.Partial}});var v0e=md();Object.defineProperty(q,"Pick",{enumerable:!0,get:function(){return v0e.Pick}});var y0e=td();Object.defineProperty(q,"Promise",{enumerable:!0,get:function(){return y0e.Promise}});var w0e=Oo();Object.defineProperty(q,"Readonly",{enumerable:!0,get:function(){return w0e.Readonly}});var S0e=pd();Object.defineProperty(q,"ReadonlyOptional",{enumerable:!0,get:function(){return S0e.ReadonlyOptional}});var T0e=Wc();Object.defineProperty(q,"Record",{enumerable:!0,get:function(){return T0e.Record}});var k0e=Kf();Object.defineProperty(q,"Recursive",{enumerable:!0,get:function(){return k0e.Recursive}});var C0e=Wo();Object.defineProperty(q,"Ref",{enumerable:!0,get:function(){return C0e.Ref}});var R0e=Hf();Object.defineProperty(q,"RegExp",{enumerable:!0,get:function(){return R0e.RegExp}});var M0e=gd();Object.defineProperty(q,"Required",{enumerable:!0,get:function(){return M0e.Required}});var P0e=zf();Object.defineProperty(q,"Rest",{enumerable:!0,get:function(){return P0e.Rest}});var I0e=Vf();Object.defineProperty(q,"ReturnType",{enumerable:!0,get:function(){return I0e.ReturnType}});var A0e=ea();Object.defineProperty(q,"String",{enumerable:!0,get:function(){return A0e.String}});var E0e=ad();Object.defineProperty(q,"Symbol",{enumerable:!0,get:function(){return E0e.Symbol}});var _0e=Qi();Object.defineProperty(q,"TemplateLiteral",{enumerable:!0,get:function(){return _0e.TemplateLiteral}});var O0e=Xf();Object.defineProperty(q,"Transform",{enumerable:!0,get:function(){return O0e.Transform}});var L0e=Lr();Object.defineProperty(q,"Tuple",{enumerable:!0,get:function(){return L0e.Tuple}});var W0e=cd();Object.defineProperty(q,"Uint8Array",{enumerable:!0,get:function(){return W0e.Uint8Array}});var F0e=ld();Object.defineProperty(q,"Undefined",{enumerable:!0,get:function(){return F0e.Undefined}});var D0e=vt();Object.defineProperty(q,"Union",{enumerable:!0,get:function(){return D0e.Union}});var U0e=ga();Object.defineProperty(q,"Unknown",{enumerable:!0,get:function(){return U0e.Unknown}});var $0e=Zf();Object.defineProperty(q,"Unsafe",{enumerable:!0,get:function(){return $0e.Unsafe}});var N0e=e0();Object.defineProperty(q,"Void",{enumerable:!0,get:function(){return N0e.Void}})});var dU=M(r0=>{"use strict";Object.defineProperty(r0,"__esModule",{value:!0});r0.JavaScriptTypeBuilder=void 0;var B0e=pk(),j0e=Jg(),q0e=wc(),G0e=rd(),K0e=Rc(),H0e=Sc(),z0e=xf(),V0e=od(),Q0e=Io(),J0e=_f(),Y0e=Of(),X0e=Pc(),Z0e=Gf(),ebe=td(),tbe=Hf(),nbe=Vf(),ibe=ad(),rbe=cd(),obe=ld(),sbe=e0(),dk=class extends B0e.JsonTypeBuilder{Argument(e){return(0,j0e.Argument)(e)}AsyncIterator(e,n){return(0,q0e.AsyncIterator)(e,n)}Awaited(e,n){return(0,G0e.Awaited)(e,n)}BigInt(e){return(0,K0e.BigInt)(e)}ConstructorParameters(e,n){return(0,z0e.ConstructorParameters)(e,n)}Constructor(e,n,i){return(0,H0e.Constructor)(e,n,i)}Date(e={}){return(0,V0e.Date)(e)}Function(e,n,i){return(0,Q0e.Function)(e,n,i)}InstanceType(e,n){return(0,J0e.InstanceType)(e,n)}Instantiate(e,n){return(0,Y0e.Instantiate)(e,n)}Iterator(e,n){return(0,X0e.Iterator)(e,n)}Parameters(e,n){return(0,Z0e.Parameters)(e,n)}Promise(e,n){return(0,ebe.Promise)(e,n)}RegExp(e,n){return(0,tbe.RegExp)(e,n)}ReturnType(e,n){return(0,nbe.ReturnType)(e,n)}Symbol(e){return(0,ibe.Symbol)(e)}Undefined(e){return(0,obe.Undefined)(e)}Uint8Array(e){return(0,rbe.Uint8Array)(e)}Void(e){return(0,sbe.Void)(e)}};r0.JavaScriptTypeBuilder=dk});var mU=M(Mn=>{"use strict";var abe=Mn&&Mn.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),lbe=Mn&&Mn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),cbe=Mn&&Mn.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;r<i.length;r++)i[r]!=="default"&&abe(n,e,i[r]);return lbe(n,e),n}})();Object.defineProperty(Mn,"__esModule",{value:!0});Mn.Type=Mn.JavaScriptTypeBuilder=Mn.JsonTypeBuilder=void 0;var ube=pk();Object.defineProperty(Mn,"JsonTypeBuilder",{enumerable:!0,get:function(){return ube.JsonTypeBuilder}});var pbe=cbe(pU()),dbe=dU();Object.defineProperty(Mn,"JavaScriptTypeBuilder",{enumerable:!0,get:function(){return dbe.JavaScriptTypeBuilder}});var mbe=pbe;Mn.Type=mbe});var hU=M(Y=>{"use strict";var hbe=Y&&Y.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),te=Y&&Y.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&hbe(e,t,n)};Object.defineProperty(Y,"__esModule",{value:!0});te(rw(),Y);te(Ir(),Y);te(Ki(),Y);te(dw(),Y);te(dW(),Y);te(Hp(),Y);te(bW(),Y);te(zp(),Y);te(ge(),Y);te(vc(),Y);te(yc(),Y);te(Jg(),Y);te(wc(),Y);te(rd(),Y);te(Rc(),Y);te(Jp(),Y);te(gf(),Y);te(bf(),Y);te(Sc(),Y);te(xf(),Y);te(od(),Y);te(vf(),Y);te(Pf(),Y);te(Oc(),Y);te(Ef(),Y);te(Io(),Y);te(ki(),Y);te(_f(),Y);te(Of(),Y);te(Lf(),Y);te(Nn(),Y);te(Pc(),Y);te(Df(),Y);te(Ac(),Y);te(rn(),Y);te(jf(),Y);te(Tt(),Y);te(Ut(),Y);te(qf(),Y);te(sd(),Y);te(Ao(),Y);te(wn(),Y);te(dd(),Y);te(Vi(),Y);te(Gf(),Y);te(hd(),Y);te(md(),Y);te(td(),Y);te(Oo(),Y);te(pd(),Y);te(Wc(),Y);te(Kf(),Y);te(Wo(),Y);te(Hf(),Y);te(gd(),Y);te(zf(),Y);te(Vf(),Y);te(iU(),Y);te(sU(),Y);te(ea(),Y);te(ad(),Y);te(Qi(),Y);te(Xf(),Y);te(Lr(),Y);te(cd(),Y);te(ld(),Y);te(vt(),Y);te(ga(),Y);te(Zf(),Y);te(e0(),Y);te(mU(),Y)});import _xe from"chalk";import{accessSync as xxe,constants as vxe,existsSync as x0,readFileSync as g3,realpathSync as yxe}from"fs";import{homedir as f3}from"os";import{basename as Txe,dirname as Md,join as Et,resolve as v0,sep as kxe,win32 as Cxe}from"path";import{fileURLToPath as b3}from"url";import{spawn as o3,spawnSync as s3}from"node:child_process";import _k from"cross-spawn";var a3=100;function Cd(t,e,n){return process.platform==="win32"?_k(t,e,n):o3(t,e,n)}function qa(t,e,n){return process.platform==="win32"?_k.sync(t,e,n):s3(t,e,n)}function b0(t){return new Promise((e,n)=>{let i=!1,r=!1,o=null,s,a=t.stdout===null,l=t.stderr===null,c=()=>{s&&(clearTimeout(s),s=void 0),t.removeListener("error",f),t.removeListener("exit",b),t.removeListener("close",v),t.stdout?.removeListener("end",g),t.stderr?.removeListener("end",h),t.stdout?.removeListener("data",m),t.stderr?.removeListener("data",m)},u=y=>{i||(i=!0,c(),t.stdout?.destroy(),t.stderr?.destroy(),e(y))},p=()=>{!r||i||a&&l&&u(o)},d=()=>{s&&clearTimeout(s),s=setTimeout(()=>u(o),a3)},m=()=>{r&&!i&&d()},g=()=>{a=!0,p()},h=()=>{l=!0,p()},f=y=>{i||(i=!0,c(),n(y))},b=y=>{r=!0,o=y,p(),i||d()},v=y=>{u(y)};t.stdout?.once("end",g),t.stderr?.once("end",h),t.stdout?.on("data",m),t.stderr?.on("data",m),t.once("error",f),t.once("exit",b),t.once("close",v)})}import{realpathSync as l3,statSync as pxe}from"node:fs";import{homedir as c3}from"node:os";import{isAbsolute as Lk,join as u3,resolve as Ok,relative as p3,sep as Wk}from"node:path";import{fileURLToPath as d3}from"node:url";var m3=/[\u00A0\u2000-\u200A\u202F\u205F\u3000]/g;function di(t){try{return l3(t)}catch{return t}}function qc(t){let e=t.trim();return!(e.startsWith("npm:")||e.startsWith("git:")||e.startsWith("github:")||e.startsWith("http:")||e.startsWith("https:")||e.startsWith("ssh:"))}function h3(t){if(!t.startsWith("/")||t.startsWith("//")||t.includes("\\"))return t;let e=t.match(/^\/(?:mnt\/|cygdrive\/)?([a-z])(?:\/(.*))?$/i);if(!e)return t;let n=e[2]?.replaceAll("/","\\");return`${e[1].toUpperCase()}:\\${n??""}`}function it(t,e={}){let n=e.trim?t.trim():t;if(e.normalizeUnicodeSpaces&&(n=n.replace(m3," ")),e.stripAtPrefix&&n.startsWith("@")&&(n=n.slice(1)),process.platform==="win32"&&(n=h3(n)),e.expandTilde??!0){let i=e.homeDir??c3();if(n==="~")return i;if(n.startsWith("~/")||process.platform==="win32"&&n.startsWith("~\\"))return u3(i,n.slice(2))}return/^file:\/\//.test(n)?d3(n):n}function Ce(t,e=process.cwd(),n={}){let i=it(t,n),r=it(e);return Lk(i)?Ok(i):Ok(r,i)}function Rd(t,e){let n=Ce(e),i=Ce(t,n),r=p3(n,i);return r===""||r!==".."&&!r.startsWith(`..${Wk}`)&&!Lk(r)?r||".":void 0}function Fk(t,e){let n=Ce(t,e);return(Rd(n,e)??n).split(Wk).join("/")}function Dk(t){let e=process.platform==="darwin"?["com.dropbox.ignored","com.apple.fileprovider.ignore#P"]:process.platform==="linux"?["user.com.dropbox.ignored"]:[];for(let n of e)process.platform==="darwin"?qa("xattr",["-w",n,"1",t],{encoding:"utf-8",stdio:"ignore"}):qa("setfattr",["-n",n,"-v","1",t],{encoding:"utf-8",stdio:"ignore"})}var x3=b3(import.meta.url),Uk=Md(x3),Gc=import.meta.url.includes("$bunfs")||import.meta.url.includes("~BUN")||import.meta.url.includes("%7EBUN"),Ixe=!!process.versions.bun;function mi(){let t=process.env.PI_PACKAGE_DIR;if(t)return it(t);if(Gc)return Md(process.execPath);let e=Uk;for(;e!==Md(e);){if(x0(Et(e,"package.json")))return e;e=Md(e)}return Uk}function y0(){if(Gc)return Et(mi(),"theme");let t=mi(),e=x0(Et(t,"src"))?"src":"dist";return Et(t,e,"modes","interactive","theme")}function v3(){return Et(mi(),"package.json")}function Pd(){return v0(Et(mi(),"README.md"))}function Kc(){return v0(Et(mi(),"docs"))}function Id(){return v0(Et(mi(),"CHANGELOG.md"))}function y3(){if(Gc)return Et(mi(),"assets");let t=mi(),e=x0(Et(t,"src"))?"src":"dist";return Et(t,e,"modes","interactive","assets")}function $k(t){return Et(y3(),t)}var Hc={};try{Hc=JSON.parse(g3(v3(),"utf-8"))}catch(t){if(t.code!=="ENOENT")throw t}var w3=Hc.piConfig?.name,Nk=Hc.name||"@earendil-works/pi-coding-agent",Mt=w3||"pi";var rt=Hc.piConfig?.configDir||".pi",Ii=Hc.version||"0.0.0",w0=`${Mt.toUpperCase()}_CODING_AGENT_DIR`,Bk=`${Mt.toUpperCase()}_CODING_AGENT_SESSION_DIR`;function jk(t){return it(t)}var S3="https://pi.dev/session/";function qk(t){return`${process.env.PI_SHARE_VIEWER_URL||S3}#${t}`}function Ee(){let t=process.env[w0];return t?jk(t):Et(f3(),rt,"agent")}function Ad(){return Et(Ee(),"themes")}function S0(){return Et(Ee(),"auth.json")}function zc(){return Et(Ee(),"bin")}function Gk(){return Et(Ee(),"sessions")}function Kk(){return Et(Ee(),`${Mt}-debug.log`)}var T3=["off","minimal","low","medium","high","xhigh","max"];function T0(t){return T3.includes(t)}An();C0();R0();import{Type as ave}from"typebox";function ie(t,e){return{name:t,login:async n=>{n.signal.throwIfAborted();let i=await n.prompt({type:"secret",message:`Enter ${t}`});return n.signal.throwIfAborted(),{type:"api_key",key:i}},resolve:async({ctx:n,credential:i,signal:r})=>{if(r.throwIfAborted(),i?.key)return{auth:{apiKey:i.key},env:i.env,source:"stored credential"};for(let o of e){let s=await n.env(o);if(r.throwIfAborted(),s)return{auth:{apiKey:s},source:o}}}}}function un(t){let e,n=()=>(e??=t.load(),e);return{name:t.name,isSubscription:t.isSubscription,loginLabel:t.loginLabel,login:async i=>(await n()).login(i),refresh:async(i,r)=>(await n()).refresh(i,r),toAuth:async i=>(await n()).toAuth(i)}}xe();I0();E0();Qc();qn();Bo();O0();An();var dt=()=>wt(()=>Promise.resolve().then(()=>(yC(),vC)));An();var Hd=()=>wt(()=>Promise.resolve().then(()=>(CC(),kC)));An();var z$=t=>import(import.meta.url.endsWith(".js")?t.replace(/\.ts$/,".js"):t),V$;var zd=()=>wt(async()=>V$??await z$("./bedrock-converse-stream.ts"));An();var Ya=()=>wt(()=>Promise.resolve().then(()=>(AC(),IC)));An();var im=()=>wt(()=>Promise.resolve().then(()=>(FC(),WC)));An();var rm=()=>wt(()=>Promise.resolve().then(()=>(zC(),HC)));An();var cm=()=>wt(()=>Promise.resolve().then(()=>(bR(),fR)));An();var he=()=>wt(()=>Promise.resolve().then(()=>(IR(),PR)));An();var pn=()=>wt(()=>Promise.resolve().then(()=>(WR(),LR)));An();var um=()=>wt(()=>Promise.resolve().then(()=>(BR(),NR)));lr();var Za=null,cb=null,ub=null,lb=t=>import(t),FB="node:fs",DB="node:os",UB="node:path";typeof process<"u"&&(process.versions?.node||process.versions?.bun)&&(lb(FB).then(t=>{Za=t.existsSync}),lb(DB).then(t=>{cb=t.homedir}),lb(UB).then(t=>{ub=t.join}));var ou="ANTHROPIC_AUTH_TOKEN",pb="ANTHROPIC_OAUTH_TOKEN",db="ANTHROPIC_API_KEY",ru=null;function $B(t){let e=t?.GOOGLE_APPLICATION_CREDENTIALS;if(e)return Za?Za(e):!1;if(ru===null){if(!Za||!cb||!ub)return typeof process<"u"&&(process.versions?.node||process.versions?.bun)||(ru=!1),!1;let n=Fe("GOOGLE_APPLICATION_CREDENTIALS",t);n?ru=Za(n):ru=Za(ub(cb(),".config","gcloud","application_default_credentials.json"))}return ru}function NB(t){if(t==="github-copilot")return["COPILOT_GITHUB_TOKEN"];if(t==="anthropic")return[ou,pb,db];let n={"ant-ling":"ANT_LING_API_KEY","qwen-token-plan":"QWEN_TOKEN_PLAN_API_KEY","qwen-token-plan-cn":"QWEN_TOKEN_PLAN_CN_API_KEY","qwen-token-plan-individual":"QWEN_TOKEN_PLAN_API_KEY",openai:"OPENAI_API_KEY","azure-openai-responses":"AZURE_OPENAI_API_KEY",nvidia:"NVIDIA_API_KEY",deepseek:"DEEPSEEK_API_KEY",google:"GEMINI_API_KEY","google-vertex":"GOOGLE_CLOUD_API_KEY",groq:"GROQ_API_KEY",cerebras:"CEREBRAS_API_KEY",xai:"XAI_API_KEY",radius:"RADIUS_API_KEY",openrouter:"OPENROUTER_API_KEY","vercel-ai-gateway":"AI_GATEWAY_API_KEY",zai:"ZAI_API_KEY","zai-coding-cn":"ZAI_CODING_CN_API_KEY",mistral:"MISTRAL_API_KEY",minimax:"MINIMAX_API_KEY","minimax-cn":"MINIMAX_CN_API_KEY",moonshotai:"MOONSHOT_API_KEY","moonshotai-cn":"MOONSHOT_API_KEY",huggingface:"HF_TOKEN",fireworks:"FIREWORKS_API_KEY",together:"TOGETHER_API_KEY",baseten:"BASETEN_API_KEY",opencode:"OPENCODE_API_KEY","opencode-go":"OPENCODE_API_KEY","kimi-coding":"KIMI_API_KEY","cloudflare-workers-ai":"CLOUDFLARE_API_KEY","cloudflare-ai-gateway":"CLOUDFLARE_API_KEY",xiaomi:"XIAOMI_API_KEY","xiaomi-token-plan-cn":"XIAOMI_TOKEN_PLAN_CN_API_KEY","xiaomi-token-plan-ams":"XIAOMI_TOKEN_PLAN_AMS_API_KEY","xiaomi-token-plan-sgp":"XIAOMI_TOKEN_PLAN_SGP_API_KEY"}[t];return n?[n]:void 0}function BB(t,e){let n=NB(t);if(!n)return;let i=n.filter(r=>!!Fe(r,e));return i.length>0?i:void 0}function jR(t,e){let n=BB(t,e);if(n?.[0]){let i=t==="anthropic"?n.find(r=>r!==ou):n[0];if(i)return Fe(i,e)}if(t==="google-vertex"){let i=$B(e),r=!!(Fe("GOOGLE_CLOUD_PROJECT",e)||Fe("GCLOUD_PROJECT",e)),o=!!Fe("GOOGLE_CLOUD_LOCATION",e);if(i&&r&&o)return"<authenticated>"}if(t==="amazon-bedrock"&&(Fe("AWS_PROFILE",e)||Fe("AWS_ACCESS_KEY_ID",e)&&Fe("AWS_SECRET_ACCESS_KEY",e)||Fe("AWS_BEARER_TOKEN_BEDROCK",e)||Fe("AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",e)||Fe("AWS_CONTAINER_CREDENTIALS_FULL_URI",e)||Fe("AWS_WEB_IDENTITY_TOKEN_FILE",e)))return"<authenticated>"}var qR={"bedrock-converse-stream":{"amazon.nova-2-lite-v1:0":{id:"amazon.nova-2-lite-v1:0",name:"Nova 2 Lite",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:.33,output:2.75,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096},"amazon.nova-lite-v1:0":{id:"amazon.nova-lite-v1:0",name:"Nova Lite",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text","image"],cost:{input:.06,output:.24,cacheRead:.015,cacheWrite:0},contextWindow:3e5,maxTokens:8192},"amazon.nova-micro-v1:0":{id:"amazon.nova-micro-v1:0",name:"Nova Micro",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text"],cost:{input:.035,output:.14,cacheRead:.00875,cacheWrite:0},contextWindow:128e3,maxTokens:8192},"amazon.nova-pro-v1:0":{id:"amazon.nova-pro-v1:0",name:"Nova Pro",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text","image"],cost:{input:.8,output:3.2,cacheRead:.2,cacheWrite:0},contextWindow:3e5,maxTokens:8192},"anthropic.claude-fable-5":{id:"anthropic.claude-fable-5",name:"Claude Fable 5",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:10,output:50,cacheRead:1,cacheWrite:12.5},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{off:null,xhigh:"xhigh",max:"max"}},"anthropic.claude-haiku-4-5-20251001-v1:0":{id:"anthropic.claude-haiku-4-5-20251001-v1:0",name:"Claude Haiku 4.5",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:1,output:5,cacheRead:.1,cacheWrite:1.25},contextWindow:2e5,maxTokens:64e3,compat:{supportsStrictMode:!0}},"anthropic.claude-opus-4-1-20250805-v1:0":{id:"anthropic.claude-opus-4-1-20250805-v1:0",name:"Claude Opus 4.1",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:15,output:75,cacheRead:1.5,cacheWrite:18.75},contextWindow:2e5,maxTokens:32e3},"anthropic.claude-opus-4-5-20251101-v1:0":{id:"anthropic.claude-opus-4-5-20251101-v1:0",name:"Claude Opus 4.5",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:2e5,maxTokens:64e3,compat:{supportsStrictMode:!0}},"anthropic.claude-opus-4-6-v1":{id:"anthropic.claude-opus-4-6-v1",name:"Claude Opus 4.6",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{max:"max"}},"anthropic.claude-opus-4-7":{id:"anthropic.claude-opus-4-7",name:"Claude Opus 4.7",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"anthropic.claude-opus-4-8":{id:"anthropic.claude-opus-4-8",name:"Claude Opus 4.8",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"anthropic.claude-sonnet-4-5-20250929-v1:0":{id:"anthropic.claude-sonnet-4-5-20250929-v1:0",name:"Claude Sonnet 4.5",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:2e5,maxTokens:64e3,compat:{supportsStrictMode:!0}},"anthropic.claude-sonnet-4-6":{id:"anthropic.claude-sonnet-4-6",name:"Claude Sonnet 4.6",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:1e6,maxTokens:64e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{max:"max"}},"anthropic.claude-sonnet-5":{id:"anthropic.claude-sonnet-5",name:"Claude Sonnet 5",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:2,output:10,cacheRead:.2,cacheWrite:2.5},contextWindow:1e6,maxTokens:128e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"au.anthropic.claude-haiku-4-5-20251001-v1:0":{id:"au.anthropic.claude-haiku-4-5-20251001-v1:0",name:"Claude Haiku 4.5 (AU)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:1,output:5,cacheRead:.1,cacheWrite:1.25},contextWindow:2e5,maxTokens:64e3,compat:{supportsStrictMode:!0}},"au.anthropic.claude-opus-4-6-v1":{id:"au.anthropic.claude-opus-4-6-v1",name:"AU Anthropic Claude Opus 4.6",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:16.5,output:82.5,cacheRead:1.65,cacheWrite:20.625},contextWindow:1e6,maxTokens:128e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{max:"max"}},"au.anthropic.claude-opus-4-8":{id:"au.anthropic.claude-opus-4-8",name:"Claude Opus 4.8 (AU)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"au.anthropic.claude-opus-5":{id:"au.anthropic.claude-opus-5",name:"Claude Opus 5 (AU)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"au.anthropic.claude-sonnet-4-5-20250929-v1:0":{id:"au.anthropic.claude-sonnet-4-5-20250929-v1:0",name:"Claude Sonnet 4.5 (AU)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:2e5,maxTokens:64e3,compat:{supportsStrictMode:!0}},"au.anthropic.claude-sonnet-4-6":{id:"au.anthropic.claude-sonnet-4-6",name:"AU Anthropic Claude Sonnet 4.6",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:3.3,output:16.5,cacheRead:.33,cacheWrite:4.125},contextWindow:1e6,maxTokens:128e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{max:"max"}},"au.anthropic.claude-sonnet-5":{id:"au.anthropic.claude-sonnet-5",name:"Claude Sonnet 5 (AU)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:2,output:10,cacheRead:.2,cacheWrite:2.5},contextWindow:1e6,maxTokens:128e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"deepseek.r1-v1:0":{id:"deepseek.r1-v1:0",name:"DeepSeek-R1",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:1.35,output:5.4,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:32768},"deepseek.v3-v1:0":{id:"deepseek.v3-v1:0",name:"DeepSeek-V3.1",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:.58,output:1.68,cacheRead:0,cacheWrite:0},contextWindow:163840,maxTokens:81920,compat:{supportsStrictMode:!0}},"deepseek.v3.2":{id:"deepseek.v3.2",name:"DeepSeek-V3.2",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:.62,output:1.85,cacheRead:0,cacheWrite:0},contextWindow:163840,maxTokens:81920,compat:{supportsStrictMode:!0}},"eu.anthropic.claude-fable-5":{id:"eu.anthropic.claude-fable-5",name:"Claude Fable 5 (EU)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.eu-central-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:11,output:55,cacheRead:1.1,cacheWrite:13.75},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{off:null,xhigh:"xhigh",max:"max"}},"eu.anthropic.claude-haiku-4-5-20251001-v1:0":{id:"eu.anthropic.claude-haiku-4-5-20251001-v1:0",name:"Claude Haiku 4.5 (EU)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.eu-central-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:1.1,output:5.5,cacheRead:.11,cacheWrite:1.375},contextWindow:2e5,maxTokens:64e3,compat:{supportsStrictMode:!0}},"eu.anthropic.claude-opus-4-5-20251101-v1:0":{id:"eu.anthropic.claude-opus-4-5-20251101-v1:0",name:"Claude Opus 4.5 (EU)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.eu-central-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5.5,output:27.5,cacheRead:.55,cacheWrite:6.875},contextWindow:2e5,maxTokens:64e3,compat:{supportsStrictMode:!0}},"eu.anthropic.claude-opus-4-6-v1":{id:"eu.anthropic.claude-opus-4-6-v1",name:"Claude Opus 4.6 (EU)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.eu-central-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5.5,output:27.5,cacheRead:.55,cacheWrite:6.875},contextWindow:1e6,maxTokens:128e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{max:"max"}},"eu.anthropic.claude-opus-4-7":{id:"eu.anthropic.claude-opus-4-7",name:"Claude Opus 4.7 (EU)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.eu-central-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5.5,output:27.5,cacheRead:.55,cacheWrite:6.875},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"eu.anthropic.claude-opus-4-8":{id:"eu.anthropic.claude-opus-4-8",name:"Claude Opus 4.8 (EU)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.eu-central-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5.5,output:27.5,cacheRead:.55,cacheWrite:6.875},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"eu.anthropic.claude-opus-5":{id:"eu.anthropic.claude-opus-5",name:"Claude Opus 5 (EU)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.eu-central-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5.5,output:27.5,cacheRead:.55,cacheWrite:6.875},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"eu.anthropic.claude-sonnet-4-5-20250929-v1:0":{id:"eu.anthropic.claude-sonnet-4-5-20250929-v1:0",name:"Claude Sonnet 4.5 (EU)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.eu-central-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:3.3,output:16.5,cacheRead:.33,cacheWrite:4.125},contextWindow:2e5,maxTokens:64e3,compat:{supportsStrictMode:!0}},"eu.anthropic.claude-sonnet-4-6":{id:"eu.anthropic.claude-sonnet-4-6",name:"Claude Sonnet 4.6 (EU)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.eu-central-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:3.3,output:16.5,cacheRead:.33,cacheWrite:4.125},contextWindow:1e6,maxTokens:64e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{max:"max"}},"eu.anthropic.claude-sonnet-5":{id:"eu.anthropic.claude-sonnet-5",name:"Claude Sonnet 5 (EU)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.eu-central-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:2.2,output:11,cacheRead:.22,cacheWrite:2.75},contextWindow:1e6,maxTokens:128e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"global.anthropic.claude-fable-5":{id:"global.anthropic.claude-fable-5",name:"Claude Fable 5 (Global)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:10,output:50,cacheRead:1,cacheWrite:12.5},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{off:null,xhigh:"xhigh",max:"max"}},"global.anthropic.claude-haiku-4-5-20251001-v1:0":{id:"global.anthropic.claude-haiku-4-5-20251001-v1:0",name:"Claude Haiku 4.5 (Global)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:1,output:5,cacheRead:.1,cacheWrite:1.25},contextWindow:2e5,maxTokens:64e3,compat:{supportsStrictMode:!0}},"global.anthropic.claude-opus-4-5-20251101-v1:0":{id:"global.anthropic.claude-opus-4-5-20251101-v1:0",name:"Claude Opus 4.5 (Global)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:2e5,maxTokens:64e3,compat:{supportsStrictMode:!0}},"global.anthropic.claude-opus-4-6-v1":{id:"global.anthropic.claude-opus-4-6-v1",name:"Claude Opus 4.6 (Global)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{max:"max"}},"global.anthropic.claude-opus-4-7":{id:"global.anthropic.claude-opus-4-7",name:"Claude Opus 4.7 (Global)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"global.anthropic.claude-opus-4-8":{id:"global.anthropic.claude-opus-4-8",name:"Claude Opus 4.8 (Global)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"global.anthropic.claude-opus-5":{id:"global.anthropic.claude-opus-5",name:"Claude Opus 5 (Global)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"global.anthropic.claude-sonnet-4-5-20250929-v1:0":{id:"global.anthropic.claude-sonnet-4-5-20250929-v1:0",name:"Claude Sonnet 4.5 (Global)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:2e5,maxTokens:64e3,compat:{supportsStrictMode:!0}},"global.anthropic.claude-sonnet-4-6":{id:"global.anthropic.claude-sonnet-4-6",name:"Claude Sonnet 4.6 (Global)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:1e6,maxTokens:64e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{max:"max"}},"global.anthropic.claude-sonnet-5":{id:"global.anthropic.claude-sonnet-5",name:"Claude Sonnet 5 (Global)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:2,output:10,cacheRead:.2,cacheWrite:2.5},contextWindow:1e6,maxTokens:128e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"google.gemma-3-27b-it":{id:"google.gemma-3-27b-it",name:"Google Gemma 3 27B Instruct",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text","image"],cost:{input:.12,output:.2,cacheRead:0,cacheWrite:0},contextWindow:202752,maxTokens:8192,compat:{supportsStrictMode:!0}},"google.gemma-3-4b-it":{id:"google.gemma-3-4b-it",name:"Gemma 3 4B IT",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text","image"],cost:{input:.04,output:.08,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096},"jp.anthropic.claude-haiku-4-5-20251001-v1:0":{id:"jp.anthropic.claude-haiku-4-5-20251001-v1:0",name:"Claude Haiku 4.5 (JP)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:1,output:5,cacheRead:.1,cacheWrite:1.25},contextWindow:2e5,maxTokens:64e3,compat:{supportsStrictMode:!0}},"jp.anthropic.claude-opus-4-7":{id:"jp.anthropic.claude-opus-4-7",name:"Claude Opus 4.7 (JP)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"jp.anthropic.claude-opus-4-8":{id:"jp.anthropic.claude-opus-4-8",name:"Claude Opus 4.8 (JP)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"jp.anthropic.claude-opus-5":{id:"jp.anthropic.claude-opus-5",name:"Claude Opus 5 (JP)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"jp.anthropic.claude-sonnet-4-5-20250929-v1:0":{id:"jp.anthropic.claude-sonnet-4-5-20250929-v1:0",name:"Claude Sonnet 4.5 (JP)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:2e5,maxTokens:64e3,compat:{supportsStrictMode:!0}},"jp.anthropic.claude-sonnet-4-6":{id:"jp.anthropic.claude-sonnet-4-6",name:"Claude Sonnet 4.6 (JP)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:1e6,maxTokens:64e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{max:"max"}},"jp.anthropic.claude-sonnet-5":{id:"jp.anthropic.claude-sonnet-5",name:"Claude Sonnet 5 (JP)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:2,output:10,cacheRead:.2,cacheWrite:2.5},contextWindow:1e6,maxTokens:128e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"meta.llama3-1-70b-instruct-v1:0":{id:"meta.llama3-1-70b-instruct-v1:0",name:"Llama 3.1 70B Instruct",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text"],cost:{input:.72,output:.72,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096},"meta.llama3-1-8b-instruct-v1:0":{id:"meta.llama3-1-8b-instruct-v1:0",name:"Llama 3.1 8B Instruct",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text"],cost:{input:.22,output:.22,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096},"meta.llama3-3-70b-instruct-v1:0":{id:"meta.llama3-3-70b-instruct-v1:0",name:"Llama 3.3 70B Instruct",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text"],cost:{input:.72,output:.72,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096},"meta.llama4-maverick-17b-instruct-v1:0":{id:"meta.llama4-maverick-17b-instruct-v1:0",name:"Llama 4 Maverick 17B Instruct",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text","image"],cost:{input:.24,output:.97,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:16384},"meta.llama4-scout-17b-instruct-v1:0":{id:"meta.llama4-scout-17b-instruct-v1:0",name:"Llama 4 Scout 17B Instruct",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text","image"],cost:{input:.17,output:.66,cacheRead:0,cacheWrite:0},contextWindow:35e5,maxTokens:16384},"minimax.minimax-m2":{id:"minimax.minimax-m2",name:"MiniMax M2",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:0,cacheWrite:0},contextWindow:204608,maxTokens:128e3},"minimax.minimax-m2.1":{id:"minimax.minimax-m2.1",name:"MiniMax M2.1",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:0,cacheWrite:0},contextWindow:204800,maxTokens:131072},"minimax.minimax-m2.5":{id:"minimax.minimax-m2.5",name:"MiniMax M2.5",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:0,cacheWrite:0},contextWindow:196608,maxTokens:98304},"mistral.devstral-2-123b":{id:"mistral.devstral-2-123b",name:"Devstral 2 123B",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text"],cost:{input:.4,output:2,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:8192,compat:{supportsStrictMode:!0}},"mistral.magistral-small-2509":{id:"mistral.magistral-small-2509",name:"Magistral Small 1.2",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:.5,output:1.5,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4e4,compat:{supportsStrictMode:!0}},"mistral.ministral-3-14b-instruct":{id:"mistral.ministral-3-14b-instruct",name:"Ministral 14B 3.0",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text"],cost:{input:.2,output:.2,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096,compat:{supportsStrictMode:!0}},"mistral.ministral-3-3b-instruct":{id:"mistral.ministral-3-3b-instruct",name:"Ministral 3 3B",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text","image"],cost:{input:.1,output:.1,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:8192,compat:{supportsStrictMode:!0}},"mistral.ministral-3-8b-instruct":{id:"mistral.ministral-3-8b-instruct",name:"Ministral 3 8B",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text"],cost:{input:.15,output:.15,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096,compat:{supportsStrictMode:!0}},"mistral.mistral-large-3-675b-instruct":{id:"mistral.mistral-large-3-675b-instruct",name:"Mistral Large 3",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text","image"],cost:{input:.5,output:1.5,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:8192,compat:{supportsStrictMode:!0}},"mistral.pixtral-large-2502-v1:0":{id:"mistral.pixtral-large-2502-v1:0",name:"Pixtral Large (25.02)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text","image"],cost:{input:2,output:6,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:8192},"mistral.voxtral-mini-3b-2507":{id:"mistral.voxtral-mini-3b-2507",name:"Voxtral Mini 3B 2507",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text"],cost:{input:.04,output:.04,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096,compat:{supportsStrictMode:!0}},"mistral.voxtral-small-24b-2507":{id:"mistral.voxtral-small-24b-2507",name:"Voxtral Small 24B 2507",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text"],cost:{input:.15,output:.35,cacheRead:0,cacheWrite:0},contextWindow:32e3,maxTokens:8192,compat:{supportsStrictMode:!0}},"moonshot.kimi-k2-thinking":{id:"moonshot.kimi-k2-thinking",name:"Kimi K2 Thinking",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:.6,output:2.5,cacheRead:0,cacheWrite:0},contextWindow:262143,maxTokens:16e3,compat:{supportsStrictMode:!0}},"moonshotai.kimi-k2.5":{id:"moonshotai.kimi-k2.5",name:"Kimi K2.5",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:.6,output:3,cacheRead:0,cacheWrite:0},contextWindow:262143,maxTokens:16e3,compat:{supportsStrictMode:!0}},"nvidia.nemotron-nano-12b-v2":{id:"nvidia.nemotron-nano-12b-v2",name:"NVIDIA Nemotron Nano 12B v2 VL BF16",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text","image"],cost:{input:.2,output:.6,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096,compat:{supportsStrictMode:!0}},"nvidia.nemotron-nano-3-30b":{id:"nvidia.nemotron-nano-3-30b",name:"NVIDIA Nemotron Nano 3 30B",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:.06,output:.24,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096,compat:{supportsStrictMode:!0}},"nvidia.nemotron-nano-9b-v2":{id:"nvidia.nemotron-nano-9b-v2",name:"NVIDIA Nemotron Nano 9B v2",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text"],cost:{input:.06,output:.23,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096,compat:{supportsStrictMode:!0}},"nvidia.nemotron-super-3-120b":{id:"nvidia.nemotron-super-3-120b",name:"NVIDIA Nemotron 3 Super 120B A12B",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:.15,output:.65,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:131072,compat:{supportsStrictMode:!0}},"openai.gpt-5.4":{id:"openai.gpt-5.4",name:"GPT-5.4",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:2.75,output:16.5,cacheRead:.275,cacheWrite:0},contextWindow:272e3,maxTokens:128e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{xhigh:"xhigh"}},"openai.gpt-5.5":{id:"openai.gpt-5.5",name:"GPT-5.5",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5.5,output:33,cacheRead:.55,cacheWrite:0},contextWindow:272e3,maxTokens:128e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{xhigh:"xhigh"}},"openai.gpt-5.6-luna":{id:"openai.gpt-5.6-luna",name:"GPT-5.6 Luna",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:.22,output:1.32,cacheRead:.022,cacheWrite:.275},contextWindow:105e4,maxTokens:128e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{xhigh:"xhigh"}},"openai.gpt-5.6-sol":{id:"openai.gpt-5.6-sol",name:"GPT-5.6 Sol",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5.5,output:33,cacheRead:.55,cacheWrite:6.875},contextWindow:105e4,maxTokens:128e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{xhigh:"xhigh"}},"openai.gpt-5.6-terra":{id:"openai.gpt-5.6-terra",name:"GPT-5.6 Terra",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:2.2,output:13.2,cacheRead:.22,cacheWrite:2.75},contextWindow:105e4,maxTokens:128e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{xhigh:"xhigh"}},"openai.gpt-oss-120b":{id:"openai.gpt-oss-120b",name:"gpt-oss-120b",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:.15,output:.6,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{supportsStrictMode:!0}},"openai.gpt-oss-120b-1:0":{id:"openai.gpt-oss-120b-1:0",name:"gpt-oss-120b",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:.15,output:.6,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{supportsStrictMode:!0}},"openai.gpt-oss-20b":{id:"openai.gpt-oss-20b",name:"gpt-oss-20b",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:.07,output:.3,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{supportsStrictMode:!0}},"openai.gpt-oss-20b-1:0":{id:"openai.gpt-oss-20b-1:0",name:"gpt-oss-20b",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:.07,output:.3,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{supportsStrictMode:!0}},"openai.gpt-oss-safeguard-120b":{id:"openai.gpt-oss-safeguard-120b",name:"GPT OSS Safeguard 120B",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text"],cost:{input:.15,output:.6,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{supportsStrictMode:!0}},"openai.gpt-oss-safeguard-20b":{id:"openai.gpt-oss-safeguard-20b",name:"GPT OSS Safeguard 20B",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text"],cost:{input:.07,output:.2,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{supportsStrictMode:!0}},"qwen.qwen3-235b-a22b-2507-v1:0":{id:"qwen.qwen3-235b-a22b-2507-v1:0",name:"Qwen3 235B A22B 2507",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text"],cost:{input:.22,output:.88,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:131072,compat:{supportsStrictMode:!0}},"qwen.qwen3-32b-v1:0":{id:"qwen.qwen3-32b-v1:0",name:"Qwen3 32B (dense)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:.15,output:.6,cacheRead:0,cacheWrite:0},contextWindow:16384,maxTokens:16384,compat:{supportsStrictMode:!0}},"qwen.qwen3-coder-30b-a3b-v1:0":{id:"qwen.qwen3-coder-30b-a3b-v1:0",name:"Qwen3 Coder 30B A3B Instruct",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text"],cost:{input:.15,output:.6,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:131072,compat:{supportsStrictMode:!0}},"qwen.qwen3-coder-480b-a35b-v1:0":{id:"qwen.qwen3-coder-480b-a35b-v1:0",name:"Qwen3 Coder 480B A35B Instruct",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text"],cost:{input:.22,output:1.8,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:65536,compat:{supportsStrictMode:!0}},"qwen.qwen3-coder-next":{id:"qwen.qwen3-coder-next",name:"Qwen3 Coder Next",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:.22,output:1.8,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:65536,compat:{supportsStrictMode:!0}},"qwen.qwen3-next-80b-a3b":{id:"qwen.qwen3-next-80b-a3b",name:"Qwen/Qwen3-Next-80B-A3B-Instruct",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text"],cost:{input:.14,output:1.4,cacheRead:0,cacheWrite:0},contextWindow:262e3,maxTokens:262e3,compat:{supportsStrictMode:!0}},"qwen.qwen3-vl-235b-a22b":{id:"qwen.qwen3-vl-235b-a22b",name:"Qwen/Qwen3-VL-235B-A22B-Instruct",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text","image"],cost:{input:.3,output:1.5,cacheRead:0,cacheWrite:0},contextWindow:262e3,maxTokens:262e3,compat:{supportsStrictMode:!0}},"us.anthropic.claude-fable-5":{id:"us.anthropic.claude-fable-5",name:"Claude Fable 5 (US)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:10,output:50,cacheRead:1,cacheWrite:12.5},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{off:null,xhigh:"xhigh",max:"max"}},"us.anthropic.claude-haiku-4-5-20251001-v1:0":{id:"us.anthropic.claude-haiku-4-5-20251001-v1:0",name:"Claude Haiku 4.5 (US)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:1,output:5,cacheRead:.1,cacheWrite:1.25},contextWindow:2e5,maxTokens:64e3,compat:{supportsStrictMode:!0}},"us.anthropic.claude-opus-4-1-20250805-v1:0":{id:"us.anthropic.claude-opus-4-1-20250805-v1:0",name:"Claude Opus 4.1 (US)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:15,output:75,cacheRead:1.5,cacheWrite:18.75},contextWindow:2e5,maxTokens:32e3},"us.anthropic.claude-opus-4-5-20251101-v1:0":{id:"us.anthropic.claude-opus-4-5-20251101-v1:0",name:"Claude Opus 4.5 (US)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:2e5,maxTokens:64e3,compat:{supportsStrictMode:!0}},"us.anthropic.claude-opus-4-6-v1":{id:"us.anthropic.claude-opus-4-6-v1",name:"Claude Opus 4.6 (US)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{max:"max"}},"us.anthropic.claude-opus-4-7":{id:"us.anthropic.claude-opus-4-7",name:"Claude Opus 4.7 (US)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"us.anthropic.claude-opus-4-8":{id:"us.anthropic.claude-opus-4-8",name:"Claude Opus 4.8 (US)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"us.anthropic.claude-opus-5":{id:"us.anthropic.claude-opus-5",name:"Claude Opus 5 (US)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"us.anthropic.claude-sonnet-4-5-20250929-v1:0":{id:"us.anthropic.claude-sonnet-4-5-20250929-v1:0",name:"Claude Sonnet 4.5 (US)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:2e5,maxTokens:64e3,compat:{supportsStrictMode:!0}},"us.anthropic.claude-sonnet-4-6":{id:"us.anthropic.claude-sonnet-4-6",name:"Claude Sonnet 4.6 (US)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:1e6,maxTokens:64e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{max:"max"}},"us.anthropic.claude-sonnet-5":{id:"us.anthropic.claude-sonnet-5",name:"Claude Sonnet 5 (US)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:2,output:10,cacheRead:.2,cacheWrite:2.5},contextWindow:1e6,maxTokens:128e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"us.deepseek.r1-v1:0":{id:"us.deepseek.r1-v1:0",name:"DeepSeek-R1 (US)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:1.35,output:5.4,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:32768},"us.meta.llama4-maverick-17b-instruct-v1:0":{id:"us.meta.llama4-maverick-17b-instruct-v1:0",name:"Llama 4 Maverick 17B Instruct (US)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text","image"],cost:{input:.24,output:.97,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:16384},"us.meta.llama4-scout-17b-instruct-v1:0":{id:"us.meta.llama4-scout-17b-instruct-v1:0",name:"Llama 4 Scout 17B Instruct (US)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text","image"],cost:{input:.17,output:.66,cacheRead:0,cacheWrite:0},contextWindow:35e5,maxTokens:16384},"writer.palmyra-x4-v1:0":{id:"writer.palmyra-x4-v1:0",name:"Palmyra X4",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:2.5,output:10,cacheRead:0,cacheWrite:0},contextWindow:122880,maxTokens:8192},"writer.palmyra-x5-v1:0":{id:"writer.palmyra-x5-v1:0",name:"Palmyra X5",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:.6,output:6,cacheRead:0,cacheWrite:0},contextWindow:104e4,maxTokens:8192},"xai.grok-4.3":{id:"xai.grok-4.3",name:"Grok 4.3",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:1.25,output:2.5,cacheRead:.2,cacheWrite:0},contextWindow:1e6,maxTokens:131072,compat:{supportsStrictMode:!0}},"zai.glm-4.7":{id:"zai.glm-4.7",name:"GLM-4.7",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:.6,output:2.2,cacheRead:0,cacheWrite:0},contextWindow:204800,maxTokens:131072,compat:{supportsStrictMode:!0}},"zai.glm-4.7-flash":{id:"zai.glm-4.7-flash",name:"GLM-4.7-Flash",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:.07,output:.4,cacheRead:0,cacheWrite:0},contextWindow:2e5,maxTokens:131072,compat:{supportsStrictMode:!0}},"zai.glm-5":{id:"zai.glm-5",name:"GLM-5",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:1,output:3.2,cacheRead:0,cacheWrite:0},contextWindow:202752,maxTokens:101376,compat:{supportsStrictMode:!0}}}};function J(t,e){return Object.assign({},...Object.values(e))}var GR=J("amazon-bedrock",qR);var KR={"openai-completions":{"Ling-2.6-1T":{id:"Ling-2.6-1T",name:"Ling 2.6 1T",api:"openai-completions",baseUrl:"https://api.ant-ling.com/v1",provider:"ant-ling",reasoning:!1,input:["text"],cost:{input:.06,output:.25,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:65536,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"ant-ling",supportsLongCacheRetention:!1}},"Ling-2.6-flash":{id:"Ling-2.6-flash",name:"Ling 2.6 Flash",api:"openai-completions",baseUrl:"https://api.ant-ling.com/v1",provider:"ant-ling",reasoning:!1,input:["text"],cost:{input:.01,output:.02,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:65536,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"ant-ling",supportsLongCacheRetention:!1}},"Ring-2.6-1T":{id:"Ring-2.6-1T",name:"Ring 2.6 1T",api:"openai-completions",baseUrl:"https://api.ant-ling.com/v1",provider:"ant-ling",reasoning:!0,input:["text"],cost:{input:.06,output:.25,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:65536,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"ant-ling",supportsLongCacheRetention:!1},thinkingLevelMap:{off:null,minimal:null,low:null,medium:null,high:"high",xhigh:"xhigh"}}}};var HR=J("ant-ling",KR);var zR={"anthropic-messages":{"claude-fable-5":{id:"claude-fable-5",name:"Claude Fable 5",api:"anthropic-messages",provider:"anthropic",baseUrl:"https://api.anthropic.com",reasoning:!0,input:["text","image"],cost:{input:10,output:50,cacheRead:1,cacheWrite:12.5},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{off:null,xhigh:"xhigh",max:"max"},compat:{forceAdaptiveThinking:!0,supportsStrictTools:!0}},"claude-haiku-4-5":{id:"claude-haiku-4-5",name:"Claude Haiku 4.5 (latest)",api:"anthropic-messages",provider:"anthropic",baseUrl:"https://api.anthropic.com",reasoning:!0,input:["text","image"],cost:{input:1,output:5,cacheRead:.1,cacheWrite:1.25},contextWindow:2e5,maxTokens:64e3,compat:{supportsStrictTools:!0}},"claude-haiku-4-5-20251001":{id:"claude-haiku-4-5-20251001",name:"Claude Haiku 4.5",api:"anthropic-messages",provider:"anthropic",baseUrl:"https://api.anthropic.com",reasoning:!0,input:["text","image"],cost:{input:1,output:5,cacheRead:.1,cacheWrite:1.25},contextWindow:2e5,maxTokens:64e3,compat:{supportsStrictTools:!0}},"claude-opus-4-5":{id:"claude-opus-4-5",name:"Claude Opus 4.5 (latest)",api:"anthropic-messages",provider:"anthropic",baseUrl:"https://api.anthropic.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:2e5,maxTokens:64e3,compat:{supportsStrictTools:!0}},"claude-opus-4-5-20251101":{id:"claude-opus-4-5-20251101",name:"Claude Opus 4.5",api:"anthropic-messages",provider:"anthropic",baseUrl:"https://api.anthropic.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:2e5,maxTokens:64e3,compat:{supportsStrictTools:!0}},"claude-opus-4-6":{id:"claude-opus-4-6",name:"Claude Opus 4.6",api:"anthropic-messages",provider:"anthropic",baseUrl:"https://api.anthropic.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{max:"max"},compat:{forceAdaptiveThinking:!0,supportsStrictTools:!0}},"claude-opus-4-7":{id:"claude-opus-4-7",name:"Claude Opus 4.7",api:"anthropic-messages",provider:"anthropic",baseUrl:"https://api.anthropic.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"},compat:{forceAdaptiveThinking:!0,supportsTemperature:!1,supportsStrictTools:!0}},"claude-opus-4-8":{id:"claude-opus-4-8",name:"Claude Opus 4.8",api:"anthropic-messages",provider:"anthropic",baseUrl:"https://api.anthropic.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"},compat:{forceAdaptiveThinking:!0,supportsTemperature:!1,supportsStrictTools:!0}},"claude-opus-5":{id:"claude-opus-5",name:"Claude Opus 5",api:"anthropic-messages",provider:"anthropic",baseUrl:"https://api.anthropic.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"},compat:{forceAdaptiveThinking:!0,supportsTemperature:!1,supportsStrictTools:!0}},"claude-sonnet-4-5":{id:"claude-sonnet-4-5",name:"Claude Sonnet 4.5 (latest)",api:"anthropic-messages",provider:"anthropic",baseUrl:"https://api.anthropic.com",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:1e6,maxTokens:64e3,compat:{supportsStrictTools:!0}},"claude-sonnet-4-5-20250929":{id:"claude-sonnet-4-5-20250929",name:"Claude Sonnet 4.5",api:"anthropic-messages",provider:"anthropic",baseUrl:"https://api.anthropic.com",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:1e6,maxTokens:64e3,compat:{supportsStrictTools:!0}},"claude-sonnet-4-6":{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6",api:"anthropic-messages",provider:"anthropic",baseUrl:"https://api.anthropic.com",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{max:"max"},compat:{forceAdaptiveThinking:!0,supportsStrictTools:!0}},"claude-sonnet-5":{id:"claude-sonnet-5",name:"Claude Sonnet 5",api:"anthropic-messages",provider:"anthropic",baseUrl:"https://api.anthropic.com",reasoning:!0,input:["text","image"],cost:{input:2,output:10,cacheRead:.2,cacheWrite:2.5},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"},compat:{forceAdaptiveThinking:!0,supportsStrictTools:!0}}}};var VR=J("anthropic",zR);var QR={"azure-openai-responses":{"gpt-4":{id:"gpt-4",name:"GPT-4",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!1,input:["text"],cost:{input:30,output:60,cacheRead:0,cacheWrite:0},contextWindow:8192,maxTokens:8192},"gpt-4-turbo":{id:"gpt-4-turbo",name:"GPT-4 Turbo",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!1,input:["text","image"],cost:{input:10,output:30,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096},"gpt-4.1":{id:"gpt-4.1",name:"GPT-4.1",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!1,input:["text","image"],cost:{input:2,output:8,cacheRead:.5,cacheWrite:0},contextWindow:1047576,maxTokens:32768},"gpt-4.1-mini":{id:"gpt-4.1-mini",name:"GPT-4.1 mini",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!1,input:["text","image"],cost:{input:.4,output:1.6,cacheRead:.1,cacheWrite:0},contextWindow:1047576,maxTokens:32768},"gpt-4.1-nano":{id:"gpt-4.1-nano",name:"GPT-4.1 nano",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!1,input:["text","image"],cost:{input:.1,output:.4,cacheRead:.025,cacheWrite:0},contextWindow:1047576,maxTokens:32768},"gpt-4o":{id:"gpt-4o",name:"GPT-4o",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!1,input:["text","image"],cost:{input:2.5,output:10,cacheRead:1.25,cacheWrite:0},contextWindow:128e3,maxTokens:16384},"gpt-4o-2024-05-13":{id:"gpt-4o-2024-05-13",name:"GPT-4o (2024-05-13)",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!1,input:["text","image"],cost:{input:5,output:15,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096},"gpt-4o-2024-08-06":{id:"gpt-4o-2024-08-06",name:"GPT-4o (2024-08-06)",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!1,input:["text","image"],cost:{input:2.5,output:10,cacheRead:1.25,cacheWrite:0},contextWindow:128e3,maxTokens:16384},"gpt-4o-2024-11-20":{id:"gpt-4o-2024-11-20",name:"GPT-4o (2024-11-20)",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!1,input:["text","image"],cost:{input:2.5,output:10,cacheRead:1.25,cacheWrite:0},contextWindow:128e3,maxTokens:16384},"gpt-4o-mini":{id:"gpt-4o-mini",name:"GPT-4o mini",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!1,input:["text","image"],cost:{input:.15,output:.6,cacheRead:.075,cacheWrite:0},contextWindow:128e3,maxTokens:16384},"gpt-5":{id:"gpt-5",name:"GPT-5",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5-chat-latest":{id:"gpt-5-chat-latest",name:"GPT-5 Chat Latest",api:"azure-openai-responses",baseUrl:"",provider:"azure-openai-responses",reasoning:!1,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:0},contextWindow:128e3,maxTokens:16384,thinkingLevelMap:{off:null},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5-mini":{id:"gpt-5-mini",name:"GPT-5 Mini",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:.25,output:2,cacheRead:.025,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5-nano":{id:"gpt-5-nano",name:"GPT-5 Nano",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:.05,output:.4,cacheRead:.005,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5-pro":{id:"gpt-5-pro",name:"GPT-5 Pro",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:15,output:120,cacheRead:0,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.1":{id:"gpt-5.1",name:"GPT-5.1",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.2":{id:"gpt-5.2",name:"GPT-5.2",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,xhigh:"xhigh"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.2-chat-latest":{id:"gpt-5.2-chat-latest",name:"GPT-5.2 Chat",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:128e3,maxTokens:16384,thinkingLevelMap:{off:null,xhigh:"xhigh"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.2-pro":{id:"gpt-5.2-pro",name:"GPT-5.2 Pro",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:21,output:168,cacheRead:0,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,xhigh:"xhigh"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.3-chat-latest":{id:"gpt-5.3-chat-latest",name:"GPT-5.3 Chat (latest)",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!1,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:128e3,maxTokens:16384,thinkingLevelMap:{off:null,xhigh:"xhigh"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.3-codex":{id:"gpt-5.3-codex",name:"GPT-5.3 Codex",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,xhigh:"xhigh"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.3-codex-spark":{id:"gpt-5.3-codex-spark",name:"GPT-5.3 Codex Spark",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:128e3,maxTokens:32e3,thinkingLevelMap:{off:null,xhigh:"xhigh"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.4":{id:"gpt-5.4",name:"GPT-5.4",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:2.5,output:15,cacheRead:.25,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,xhigh:"xhigh"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.4-mini":{id:"gpt-5.4-mini",name:"GPT-5.4 mini",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:.75,output:4.5,cacheRead:.075,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,xhigh:"xhigh"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.4-nano":{id:"gpt-5.4-nano",name:"GPT-5.4 nano",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:.2,output:1.25,cacheRead:.02,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,xhigh:"xhigh"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.4-pro":{id:"gpt-5.4-pro",name:"GPT-5.4 Pro",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:30,output:180,cacheRead:0,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,xhigh:"xhigh"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.5":{id:"gpt-5.5",name:"GPT-5.5",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,xhigh:"xhigh"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.5-pro":{id:"gpt-5.5-pro",name:"GPT-5.5 Pro",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:30,output:180,cacheRead:0,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,xhigh:"xhigh",minimal:null,low:null},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.6-luna":{id:"gpt-5.6-luna",name:"GPT-5.6 Luna",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:.2,output:1.2,cacheRead:.02,cacheWrite:.25},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,xhigh:"xhigh",max:"max"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.6-sol":{id:"gpt-5.6-sol",name:"GPT-5.6 Sol",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:6.25},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,xhigh:"xhigh",max:"max"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.6-terra":{id:"gpt-5.6-terra",name:"GPT-5.6 Terra",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:2,output:12,cacheRead:.2,cacheWrite:2.5},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,xhigh:"xhigh",max:"max"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-realtime-2.1":{id:"gpt-realtime-2.1",name:"GPT-Realtime-2.1",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:4,output:24,cacheRead:.4,cacheWrite:0},contextWindow:128e3,maxTokens:32e3},o1:{id:"o1",name:"o1",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:15,output:60,cacheRead:7.5,cacheWrite:0},contextWindow:2e5,maxTokens:1e5},"o1-pro":{id:"o1-pro",name:"o1-pro",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:150,output:600,cacheRead:0,cacheWrite:0},contextWindow:2e5,maxTokens:1e5},o3:{id:"o3",name:"o3",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:2,output:8,cacheRead:.5,cacheWrite:0},contextWindow:2e5,maxTokens:1e5},"o3-mini":{id:"o3-mini",name:"o3-mini",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text"],cost:{input:1.1,output:4.4,cacheRead:.55,cacheWrite:0},contextWindow:2e5,maxTokens:1e5},"o3-pro":{id:"o3-pro",name:"o3-pro",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:20,output:80,cacheRead:0,cacheWrite:0},contextWindow:2e5,maxTokens:1e5},"o4-mini":{id:"o4-mini",name:"o4-mini",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:1.1,output:4.4,cacheRead:.275,cacheWrite:0},contextWindow:2e5,maxTokens:1e5}}};var JR=J("azure-openai-responses",QR);var YR={"openai-completions":{"deepseek-ai/DeepSeek-V4-Flash-0731":{id:"deepseek-ai/DeepSeek-V4-Flash-0731",name:"Deepseek V4 Flash 0731",api:"openai-completions",provider:"baseten",baseUrl:"https://inference.baseten.co/v1",reasoning:!0,input:["text"],cost:{input:.13,output:.26,cacheRead:.028,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,supportsUsageInStreaming:!0,maxTokensField:"max_tokens",supportsStrictMode:!0,supportsLongCacheRetention:!1},contextWindow:1048576,maxTokens:1048576},"deepseek-ai/DeepSeek-V4-Pro":{id:"deepseek-ai/DeepSeek-V4-Pro",name:"Deepseek V4 Pro",api:"openai-completions",provider:"baseten",baseUrl:"https://inference.baseten.co/v1",reasoning:!0,thinkingLevelMap:{off:"none",minimal:"minimal",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},input:["text"],cost:{input:1.74,output:3.48,cacheRead:.145,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!0,supportsUsageInStreaming:!0,maxTokensField:"max_tokens",supportsStrictMode:!0,supportsLongCacheRetention:!1,thinkingFormat:"openai"},contextWindow:262144,maxTokens:262144},"moonshotai/Kimi-K2.5":{id:"moonshotai/Kimi-K2.5",name:"Kimi K2.5",api:"openai-completions",provider:"baseten",baseUrl:"https://inference.baseten.co/v1",reasoning:!0,thinkingLevelMap:{off:"off",minimal:null,low:null,medium:null,high:"high",xhigh:null,max:null},input:["text","image"],cost:{input:.6,output:3,cacheRead:.12,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,supportsUsageInStreaming:!0,maxTokensField:"max_tokens",supportsStrictMode:!0,supportsLongCacheRetention:!1,thinkingFormat:"baseten",chatTemplateArgs:{enable_thinking:{$var:"thinking.enabled"}}},contextWindow:262e3,maxTokens:262e3},"moonshotai/Kimi-K2.6":{id:"moonshotai/Kimi-K2.6",name:"Kimi K2.6",api:"openai-completions",provider:"baseten",baseUrl:"https://inference.baseten.co/v1",reasoning:!0,thinkingLevelMap:{off:"off",minimal:null,low:null,medium:null,high:"high",xhigh:null,max:null},input:["text","image"],cost:{input:.95,output:4,cacheRead:.16,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,supportsUsageInStreaming:!0,maxTokensField:"max_tokens",supportsStrictMode:!0,supportsLongCacheRetention:!1,thinkingFormat:"baseten",chatTemplateArgs:{enable_thinking:{$var:"thinking.enabled"}}},contextWindow:262e3,maxTokens:262e3},"moonshotai/Kimi-K2.7-Code":{id:"moonshotai/Kimi-K2.7-Code",name:"Kimi K2.7 Code",api:"openai-completions",provider:"baseten",baseUrl:"https://inference.baseten.co/v1",reasoning:!0,thinkingLevelMap:{off:"off",minimal:null,low:null,medium:null,high:"high",xhigh:null,max:null},input:["text","image"],cost:{input:.95,output:4,cacheRead:.16,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,supportsUsageInStreaming:!0,maxTokensField:"max_tokens",supportsStrictMode:!0,supportsLongCacheRetention:!1,thinkingFormat:"baseten",chatTemplateArgs:{enable_thinking:{$var:"thinking.enabled"}}},contextWindow:262e3,maxTokens:262e3},"moonshotai/Kimi-K3":{id:"moonshotai/Kimi-K3",name:"Kimi K3",api:"openai-completions",provider:"baseten",baseUrl:"https://inference.baseten.co/v1",reasoning:!0,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:null,high:"high",xhigh:null,max:"max"},input:["text","image"],cost:{input:3,output:15,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!0,supportsUsageInStreaming:!0,maxTokensField:"max_tokens",supportsStrictMode:!0,supportsLongCacheRetention:!1,thinkingFormat:"openai"},contextWindow:1048576,maxTokens:262144},"nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B":{id:"nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B",name:"Nemotron Ultra",api:"openai-completions",provider:"baseten",baseUrl:"https://inference.baseten.co/v1",reasoning:!0,thinkingLevelMap:{off:"off",minimal:null,low:null,medium:null,high:"high",xhigh:null,max:null},input:["text"],cost:{input:.6,output:2.4,cacheRead:.12,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,supportsUsageInStreaming:!0,maxTokensField:"max_tokens",supportsStrictMode:!0,supportsLongCacheRetention:!1,thinkingFormat:"baseten",chatTemplateArgs:{enable_thinking:{$var:"thinking.enabled"}}},contextWindow:202800,maxTokens:202800},"nvidia/Nemotron-120B-A12B":{id:"nvidia/Nemotron-120B-A12B",name:"Nemotron Super",api:"openai-completions",provider:"baseten",baseUrl:"https://inference.baseten.co/v1",reasoning:!0,thinkingLevelMap:{off:"off",minimal:null,low:null,medium:null,high:"high",xhigh:null,max:null},input:["text"],cost:{input:.3,output:.75,cacheRead:.06,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,supportsUsageInStreaming:!0,maxTokensField:"max_tokens",supportsStrictMode:!0,supportsLongCacheRetention:!1,thinkingFormat:"baseten",chatTemplateArgs:{enable_thinking:{$var:"thinking.enabled"}}},contextWindow:202800,maxTokens:202800},"openai/gpt-oss-120b":{id:"openai/gpt-oss-120b",name:"OpenAI GPT 120B",api:"openai-completions",provider:"baseten",baseUrl:"https://inference.baseten.co/v1",reasoning:!0,thinkingLevelMap:{off:"none",minimal:"minimal",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},input:["text"],cost:{input:.1,output:.5,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!0,supportsUsageInStreaming:!0,maxTokensField:"max_tokens",supportsStrictMode:!0,supportsLongCacheRetention:!1,thinkingFormat:"openai"},contextWindow:128072,maxTokens:128072},"thinkingmachines/inkling":{id:"thinkingmachines/inkling",name:"Inkling",api:"openai-completions",provider:"baseten",baseUrl:"https://inference.baseten.co/v1",reasoning:!0,thinkingLevelMap:{off:"none",minimal:"minimal",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},input:["text","image"],cost:{input:1,output:4.05,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!0,supportsUsageInStreaming:!0,maxTokensField:"max_tokens",supportsStrictMode:!0,supportsLongCacheRetention:!1,thinkingFormat:"openai"},contextWindow:1048576,maxTokens:32768},"thinkingmachines/inkling-small":{id:"thinkingmachines/inkling-small",name:"Inkling Small",api:"openai-completions",provider:"baseten",baseUrl:"https://inference.baseten.co/v1",reasoning:!0,thinkingLevelMap:{off:"none",minimal:"minimal",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},input:["text","image"],cost:{input:.5,output:1.2,cacheRead:.1,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!0,supportsUsageInStreaming:!0,maxTokensField:"max_tokens",supportsStrictMode:!0,supportsLongCacheRetention:!1,thinkingFormat:"openai"},contextWindow:1048576,maxTokens:32768},"zai-org/GLM-4.7":{id:"zai-org/GLM-4.7",name:"GLM 4.7",api:"openai-completions",provider:"baseten",baseUrl:"https://inference.baseten.co/v1",reasoning:!0,thinkingLevelMap:{off:"off",minimal:null,low:null,medium:null,high:"high",xhigh:null,max:null},input:["text"],cost:{input:.6,output:2.2,cacheRead:.12,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,supportsUsageInStreaming:!0,maxTokensField:"max_tokens",supportsStrictMode:!0,supportsLongCacheRetention:!1,thinkingFormat:"baseten",chatTemplateArgs:{enable_thinking:{$var:"thinking.enabled"}}},contextWindow:2e5,maxTokens:2e5},"zai-org/GLM-5":{id:"zai-org/GLM-5",name:"GLM 5",api:"openai-completions",provider:"baseten",baseUrl:"https://inference.baseten.co/v1",reasoning:!0,thinkingLevelMap:{off:"off",minimal:null,low:null,medium:null,high:"high",xhigh:null,max:null},input:["text"],cost:{input:.95,output:3.15,cacheRead:.2,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,supportsUsageInStreaming:!0,maxTokensField:"max_tokens",supportsStrictMode:!0,supportsLongCacheRetention:!1,thinkingFormat:"baseten",chatTemplateArgs:{enable_thinking:{$var:"thinking.enabled"}}},contextWindow:202800,maxTokens:202800},"zai-org/GLM-5.1":{id:"zai-org/GLM-5.1",name:"GLM 5.1",api:"openai-completions",provider:"baseten",baseUrl:"https://inference.baseten.co/v1",reasoning:!0,thinkingLevelMap:{off:"off",minimal:null,low:null,medium:null,high:"high",xhigh:null,max:null},input:["text"],cost:{input:1.3,output:4.3,cacheRead:.26,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,supportsUsageInStreaming:!0,maxTokensField:"max_tokens",supportsStrictMode:!0,supportsLongCacheRetention:!1,thinkingFormat:"baseten",chatTemplateArgs:{enable_thinking:{$var:"thinking.enabled"}}},contextWindow:202800,maxTokens:202800},"zai-org/GLM-5.2":{id:"zai-org/GLM-5.2",name:"GLM 5.2",api:"openai-completions",provider:"baseten",baseUrl:"https://inference.baseten.co/v1",reasoning:!0,thinkingLevelMap:{off:"none",minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"},input:["text"],cost:{input:1.4,output:4.4,cacheRead:.3,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!0,supportsUsageInStreaming:!0,maxTokensField:"max_tokens",supportsStrictMode:!0,supportsLongCacheRetention:!1,thinkingFormat:"baseten",chatTemplateArgs:{enable_thinking:{$var:"thinking.enabled"}}},contextWindow:1048576,maxTokens:262144},"zai-org/GLM-5.2-Fast":{id:"zai-org/GLM-5.2-Fast",name:"GLM 5.2 Fast",api:"openai-completions",provider:"baseten",baseUrl:"https://inference.baseten.co/v1",reasoning:!0,thinkingLevelMap:{off:"none",minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"},input:["text"],cost:{input:2.1,output:6.6,cacheRead:.21,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!0,supportsUsageInStreaming:!0,maxTokensField:"max_tokens",supportsStrictMode:!0,supportsLongCacheRetention:!1,thinkingFormat:"baseten",chatTemplateArgs:{enable_thinking:{$var:"thinking.enabled"}}},contextWindow:1048576,maxTokens:262144}}};var XR=J("baseten",YR);var ZR={"openai-completions":{"gemma-4-31b":{id:"gemma-4-31b",name:"Gemma 4 31B IT",api:"openai-completions",provider:"cerebras",baseUrl:"https://api.cerebras.ai/v1",reasoning:!0,input:["text","image"],cost:{input:.99,output:1.49,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:40960,compat:{supportsStore:!1,supportsDeveloperRole:!1},thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"gpt-oss-120b":{id:"gpt-oss-120b",name:"GPT OSS 120B",api:"openai-completions",provider:"cerebras",baseUrl:"https://api.cerebras.ai/v1",reasoning:!0,input:["text"],cost:{input:.35,output:.75,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:40960,compat:{supportsStore:!1,supportsDeveloperRole:!1},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"zai-glm-4.7":{id:"zai-glm-4.7",name:"Z.AI GLM-4.7",api:"openai-completions",provider:"cerebras",baseUrl:"https://api.cerebras.ai/v1",reasoning:!0,input:["text"],cost:{input:2.25,output:2.75,cacheRead:2.25,cacheWrite:0},contextWindow:131072,maxTokens:40960,compat:{supportsStore:!1,supportsDeveloperRole:!1},thinkingLevelMap:{off:"none",minimal:null,low:null,medium:null,high:null,xhigh:null,max:null}}}};var e1=J("cerebras",ZR);var t1={"anthropic-messages":{"claude-3-5-haiku":{id:"claude-3-5-haiku",name:"Claude Haiku 3.5 (latest)",api:"anthropic-messages",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",reasoning:!1,input:["text","image"],cost:{input:.8,output:4,cacheRead:.08,cacheWrite:1},contextWindow:2e5,maxTokens:8192,compat:{sendSessionAffinityHeaders:!0}},"claude-3-haiku":{id:"claude-3-haiku",name:"Claude Haiku 3",api:"anthropic-messages",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",reasoning:!1,input:["text","image"],cost:{input:.25,output:1.25,cacheRead:.03,cacheWrite:.3},contextWindow:2e5,maxTokens:4096,compat:{sendSessionAffinityHeaders:!0}},"claude-3-opus":{id:"claude-3-opus",name:"Claude Opus 3",api:"anthropic-messages",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",reasoning:!1,input:["text","image"],cost:{input:15,output:75,cacheRead:1.5,cacheWrite:18.75},contextWindow:2e5,maxTokens:4096,compat:{sendSessionAffinityHeaders:!0}},"claude-3-sonnet":{id:"claude-3-sonnet",name:"Claude Sonnet 3",api:"anthropic-messages",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",reasoning:!1,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:.3},contextWindow:2e5,maxTokens:4096,compat:{sendSessionAffinityHeaders:!0}},"claude-3.5-haiku":{id:"claude-3.5-haiku",name:"Claude Haiku 3.5 (latest)",api:"anthropic-messages",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",reasoning:!1,input:["text","image"],cost:{input:.8,output:4,cacheRead:.08,cacheWrite:1},contextWindow:2e5,maxTokens:8192,compat:{sendSessionAffinityHeaders:!0}},"claude-3.5-sonnet":{id:"claude-3.5-sonnet",name:"Claude Sonnet 3.5 v2",api:"anthropic-messages",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",reasoning:!1,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:2e5,maxTokens:8192,compat:{sendSessionAffinityHeaders:!0}},"claude-fable-5":{id:"claude-fable-5",name:"Claude Fable 5",api:"anthropic-messages",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",reasoning:!0,input:["text","image"],cost:{input:10,output:50,cacheRead:1,cacheWrite:12.5},contextWindow:1e6,maxTokens:128e3,compat:{sendSessionAffinityHeaders:!0,forceAdaptiveThinking:!0},thinkingLevelMap:{off:null,xhigh:"xhigh",max:"max"}},"claude-haiku-4-5":{id:"claude-haiku-4-5",name:"Claude Haiku 4.5 (latest)",api:"anthropic-messages",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",reasoning:!0,input:["text","image"],cost:{input:1,output:5,cacheRead:.1,cacheWrite:1.25},contextWindow:2e5,maxTokens:64e3,compat:{sendSessionAffinityHeaders:!0}},"claude-opus-4":{id:"claude-opus-4",name:"Claude Opus 4 (latest)",api:"anthropic-messages",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",reasoning:!0,input:["text","image"],cost:{input:15,output:75,cacheRead:1.5,cacheWrite:18.75},contextWindow:2e5,maxTokens:32e3,compat:{sendSessionAffinityHeaders:!0}},"claude-opus-4-1":{id:"claude-opus-4-1",name:"Claude Opus 4.1 (latest)",api:"anthropic-messages",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",reasoning:!0,input:["text","image"],cost:{input:15,output:75,cacheRead:1.5,cacheWrite:18.75},contextWindow:2e5,maxTokens:32e3,compat:{sendSessionAffinityHeaders:!0}},"claude-opus-4-5":{id:"claude-opus-4-5",name:"Claude Opus 4.5 (latest)",api:"anthropic-messages",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:2e5,maxTokens:64e3,compat:{sendSessionAffinityHeaders:!0}},"claude-opus-4-6":{id:"claude-opus-4-6",name:"Claude Opus 4.6 (latest)",api:"anthropic-messages",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,compat:{sendSessionAffinityHeaders:!0,forceAdaptiveThinking:!0},thinkingLevelMap:{max:"max"}},"claude-opus-4-7":{id:"claude-opus-4-7",name:"Claude Opus 4.7",api:"anthropic-messages",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,compat:{sendSessionAffinityHeaders:!0,forceAdaptiveThinking:!0,supportsTemperature:!1},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"claude-opus-4-8":{id:"claude-opus-4-8",name:"Claude Opus 4.8",api:"anthropic-messages",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,compat:{sendSessionAffinityHeaders:!0,forceAdaptiveThinking:!0,supportsTemperature:!1},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"claude-opus-5":{id:"claude-opus-5",name:"Claude Opus 5",api:"anthropic-messages",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,compat:{sendSessionAffinityHeaders:!0,forceAdaptiveThinking:!0,supportsTemperature:!1},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"claude-sonnet-4":{id:"claude-sonnet-4",name:"Claude Sonnet 4 (latest)",api:"anthropic-messages",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:2e5,maxTokens:64e3,compat:{sendSessionAffinityHeaders:!0}},"claude-sonnet-4-5":{id:"claude-sonnet-4-5",name:"Claude Sonnet 4.5 (latest)",api:"anthropic-messages",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:2e5,maxTokens:64e3,compat:{sendSessionAffinityHeaders:!0}},"claude-sonnet-4-6":{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6",api:"anthropic-messages",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:1e6,maxTokens:64e3,compat:{sendSessionAffinityHeaders:!0,forceAdaptiveThinking:!0},thinkingLevelMap:{max:"max"}},"claude-sonnet-5":{id:"claude-sonnet-5",name:"Claude Sonnet 5",api:"anthropic-messages",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",reasoning:!0,input:["text","image"],cost:{input:2,output:10,cacheRead:.2,cacheWrite:2.5},contextWindow:1e6,maxTokens:128e3,compat:{sendSessionAffinityHeaders:!0,forceAdaptiveThinking:!0},thinkingLevelMap:{xhigh:"xhigh",max:"max"}}},"openai-completions":{"workers-ai/@cf/moonshotai/kimi-k2.5":{id:"workers-ai/@cf/moonshotai/kimi-k2.5",name:"Kimi K2.5",api:"openai-completions",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/compat",reasoning:!0,input:["text","image"],cost:{input:.6,output:3,cacheRead:.1,cacheWrite:0},contextWindow:256e3,maxTokens:256e3,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1,sendSessionAffinityHeaders:!0}},"workers-ai/@cf/moonshotai/kimi-k2.6":{id:"workers-ai/@cf/moonshotai/kimi-k2.6",name:"Kimi K2.6",api:"openai-completions",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/compat",reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:.16,cacheWrite:0},contextWindow:256e3,maxTokens:256e3,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1,sendSessionAffinityHeaders:!0}},"workers-ai/@cf/nvidia/nemotron-3-120b-a12b":{id:"workers-ai/@cf/nvidia/nemotron-3-120b-a12b",name:"Nemotron 3 Super 120B",api:"openai-completions",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/compat",reasoning:!0,input:["text"],cost:{input:.5,output:1.5,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:256e3,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1,sendSessionAffinityHeaders:!0}},"workers-ai/@cf/zai-org/glm-4.7-flash":{id:"workers-ai/@cf/zai-org/glm-4.7-flash",name:"GLM-4.7-Flash",api:"openai-completions",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/compat",reasoning:!0,input:["text"],cost:{input:.06,output:.4,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:131072,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1,sendSessionAffinityHeaders:!0}},"workers-ai/@cf/zai-org/glm-5.2":{id:"workers-ai/@cf/zai-org/glm-5.2",name:"Glm 5.2",api:"openai-completions",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/compat",reasoning:!0,input:["text"],cost:{input:1.4,output:4.4,cacheRead:.26,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1,sendSessionAffinityHeaders:!0}}},"openai-responses":{"gpt-4":{id:"gpt-4",name:"GPT-4",api:"openai-responses",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/openai",reasoning:!1,input:["text"],cost:{input:30,output:60,cacheRead:0,cacheWrite:0},contextWindow:8192,maxTokens:8192},"gpt-4-turbo":{id:"gpt-4-turbo",name:"GPT-4 Turbo",api:"openai-responses",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/openai",reasoning:!1,input:["text","image"],cost:{input:10,output:30,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096},"gpt-4o":{id:"gpt-4o",name:"GPT-4o",api:"openai-responses",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/openai",reasoning:!1,input:["text","image"],cost:{input:2.5,output:10,cacheRead:1.25,cacheWrite:0},contextWindow:128e3,maxTokens:16384},"gpt-4o-mini":{id:"gpt-4o-mini",name:"GPT-4o mini",api:"openai-responses",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/openai",reasoning:!1,input:["text","image"],cost:{input:.15,output:.6,cacheRead:.08,cacheWrite:0},contextWindow:128e3,maxTokens:16384},"gpt-5.1":{id:"gpt-5.1",name:"GPT-5.1",api:"openai-responses",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/openai",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.13,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.1-codex":{id:"gpt-5.1-codex",name:"GPT-5.1 Codex",api:"openai-responses",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/openai",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.2":{id:"gpt-5.2",name:"GPT-5.2",api:"openai-responses",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/openai",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.2-codex":{id:"gpt-5.2-codex",name:"GPT-5.2 Codex",api:"openai-responses",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/openai",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.3-codex":{id:"gpt-5.3-codex",name:"GPT-5.3 Codex",api:"openai-responses",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/openai",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.4":{id:"gpt-5.4",name:"GPT-5.4",api:"openai-responses",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/openai",reasoning:!0,input:["text","image"],cost:{input:2.5,output:15,cacheRead:.25,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.5":{id:"gpt-5.5",name:"GPT-5.5",api:"openai-responses",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/openai",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.6-luna":{id:"gpt-5.6-luna",name:"GPT-5.6 Luna",api:"openai-responses",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/openai",reasoning:!0,input:["text","image"],cost:{input:.2,output:1.2,cacheRead:.02,cacheWrite:.25,tiers:[{inputTokensAbove:272e3,input:.4,output:1.8,cacheRead:.04,cacheWrite:.5}]},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.6-sol":{id:"gpt-5.6-sol",name:"GPT-5.6 Sol",api:"openai-responses",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/openai",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.6-terra":{id:"gpt-5.6-terra",name:"GPT-5.6 Terra",api:"openai-responses",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/openai",reasoning:!0,input:["text","image"],cost:{input:2,output:12,cacheRead:.2,cacheWrite:2.5,tiers:[{inputTokensAbove:272e3,input:4,output:18,cacheRead:.4,cacheWrite:5}]},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsOpenAIGrammarTools:!0}},o1:{id:"o1",name:"o1",api:"openai-responses",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/openai",reasoning:!0,input:["text","image"],cost:{input:15,output:60,cacheRead:7.5,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},o3:{id:"o3",name:"o3",api:"openai-responses",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/openai",reasoning:!0,input:["text","image"],cost:{input:2,output:8,cacheRead:.5,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"o3-mini":{id:"o3-mini",name:"o3-mini",api:"openai-responses",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/openai",reasoning:!0,input:["text"],cost:{input:1.1,output:4.4,cacheRead:.55,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"o3-pro":{id:"o3-pro",name:"o3-pro",api:"openai-responses",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/openai",reasoning:!0,input:["text","image"],cost:{input:20,output:80,cacheRead:0,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"o4-mini":{id:"o4-mini",name:"o4-mini",api:"openai-responses",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/openai",reasoning:!0,input:["text","image"],cost:{input:1.1,output:4.4,cacheRead:.28,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}}}};var n1=J("cloudflare-ai-gateway",t1);var i1={"openai-completions":{"@cf/google/gemma-4-26b-a4b-it":{id:"@cf/google/gemma-4-26b-a4b-it",name:"Gemma 4 26B A4B IT",api:"openai-completions",provider:"cloudflare-workers-ai",baseUrl:"https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",reasoning:!0,input:["text","image"],cost:{input:.1,output:.3,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:16384,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsLongCacheRetention:!1,sendSessionAffinityHeaders:!0},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"@cf/ibm-granite/granite-4.0-h-micro":{id:"@cf/ibm-granite/granite-4.0-h-micro",name:"Granite 4.0 H Micro",api:"openai-completions",provider:"cloudflare-workers-ai",baseUrl:"https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",reasoning:!1,input:["text"],cost:{input:.017,output:.112,cacheRead:0,cacheWrite:0},contextWindow:131e3,maxTokens:131e3,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsLongCacheRetention:!1,sendSessionAffinityHeaders:!0}},"@cf/meta/llama-3.3-70b-instruct-fp8-fast":{id:"@cf/meta/llama-3.3-70b-instruct-fp8-fast",name:"Llama 3.3 70B Instruct fp8 Fast",api:"openai-completions",provider:"cloudflare-workers-ai",baseUrl:"https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",reasoning:!1,input:["text"],cost:{input:.293,output:2.253,cacheRead:0,cacheWrite:0},contextWindow:24e3,maxTokens:24e3,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsLongCacheRetention:!1,sendSessionAffinityHeaders:!0}},"@cf/meta/llama-4-scout-17b-16e-instruct":{id:"@cf/meta/llama-4-scout-17b-16e-instruct",name:"Llama 4 Scout 17B 16E Instruct",api:"openai-completions",provider:"cloudflare-workers-ai",baseUrl:"https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",reasoning:!1,input:["text","image"],cost:{input:.27,output:.85,cacheRead:0,cacheWrite:0},contextWindow:131e3,maxTokens:16384,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsLongCacheRetention:!1,sendSessionAffinityHeaders:!0}},"@cf/mistralai/mistral-small-3.1-24b-instruct":{id:"@cf/mistralai/mistral-small-3.1-24b-instruct",name:"Mistral Small 3.1 24B Instruct",api:"openai-completions",provider:"cloudflare-workers-ai",baseUrl:"https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",reasoning:!1,input:["text"],cost:{input:.351,output:.555,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:128e3,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsLongCacheRetention:!1,sendSessionAffinityHeaders:!0}},"@cf/moonshotai/kimi-k2.6":{id:"@cf/moonshotai/kimi-k2.6",name:"Kimi K2.6",api:"openai-completions",provider:"cloudflare-workers-ai",baseUrl:"https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:.16,cacheWrite:0},contextWindow:262144,maxTokens:256e3,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsLongCacheRetention:!1,sendSessionAffinityHeaders:!0},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"@cf/moonshotai/kimi-k2.7-code":{id:"@cf/moonshotai/kimi-k2.7-code",name:"Kimi K2.7 Code",api:"openai-completions",provider:"cloudflare-workers-ai",baseUrl:"https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:.19,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsLongCacheRetention:!1,sendSessionAffinityHeaders:!0},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"@cf/nvidia/nemotron-3-120b-a12b":{id:"@cf/nvidia/nemotron-3-120b-a12b",name:"Nemotron 3 Super 120B",api:"openai-completions",provider:"cloudflare-workers-ai",baseUrl:"https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",reasoning:!0,input:["text"],cost:{input:.5,output:1.5,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:256e3,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsLongCacheRetention:!1,sendSessionAffinityHeaders:!0},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"@cf/openai/gpt-oss-120b":{id:"@cf/openai/gpt-oss-120b",name:"GPT OSS 120B",api:"openai-completions",provider:"cloudflare-workers-ai",baseUrl:"https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",reasoning:!0,input:["text"],cost:{input:.35,output:.75,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsLongCacheRetention:!1,sendSessionAffinityHeaders:!0},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"@cf/openai/gpt-oss-20b":{id:"@cf/openai/gpt-oss-20b",name:"GPT OSS 20B",api:"openai-completions",provider:"cloudflare-workers-ai",baseUrl:"https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",reasoning:!0,input:["text"],cost:{input:.2,output:.3,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsLongCacheRetention:!1,sendSessionAffinityHeaders:!0}},"@cf/qwen/qwen3-30b-a3b-fp8":{id:"@cf/qwen/qwen3-30b-a3b-fp8",name:"Qwen3 30B A3b fp8",api:"openai-completions",provider:"cloudflare-workers-ai",baseUrl:"https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",reasoning:!0,input:["text"],cost:{input:.0509,output:.335,cacheRead:0,cacheWrite:0},contextWindow:32768,maxTokens:32768,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsLongCacheRetention:!1,sendSessionAffinityHeaders:!0}},"@cf/zai-org/glm-4.7-flash":{id:"@cf/zai-org/glm-4.7-flash",name:"GLM-4.7-Flash",api:"openai-completions",provider:"cloudflare-workers-ai",baseUrl:"https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",reasoning:!0,input:["text"],cost:{input:.0605,output:.4,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:131072,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsLongCacheRetention:!1,sendSessionAffinityHeaders:!0},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"@cf/zai-org/glm-5.2":{id:"@cf/zai-org/glm-5.2",name:"Glm 5.2",api:"openai-completions",provider:"cloudflare-workers-ai",baseUrl:"https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",reasoning:!0,input:["text"],cost:{input:1.4,output:4.4,cacheRead:.26,cacheWrite:0},contextWindow:262144,maxTokens:256e3,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsLongCacheRetention:!1,sendSessionAffinityHeaders:!0},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}}}};var r1=J("cloudflare-workers-ai",i1);var o1={"openai-completions":{"deepseek-v4-flash":{id:"deepseek-v4-flash",name:"DeepSeek V4 Flash",api:"openai-completions",baseUrl:"https://api.deepseek.com",provider:"deepseek",reasoning:!0,input:["text"],cost:{input:.14,output:.28,cacheRead:.0028,cacheWrite:0},contextWindow:1e6,maxTokens:384e3,compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens",requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"deepseek"},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",max:"max"}},"deepseek-v4-pro":{id:"deepseek-v4-pro",name:"DeepSeek V4 Pro",api:"openai-completions",baseUrl:"https://api.deepseek.com",provider:"deepseek",reasoning:!0,input:["text"],cost:{input:.435,output:.87,cacheRead:.003625,cacheWrite:0},contextWindow:1e6,maxTokens:384e3,compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens",requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"deepseek"},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",max:"max"}}}};var s1=J("deepseek",o1);var a1={"anthropic-messages":{"accounts/fireworks/models/deepseek-v4-flash":{id:"accounts/fireworks/models/deepseek-v4-flash",name:"DeepSeek V4 Flash",provider:"fireworks",reasoning:!0,input:["text"],cost:{input:.14,output:.28,cacheRead:.028,cacheWrite:0},contextWindow:1e6,maxTokens:384e3,api:"anthropic-messages",baseUrl:"https://api.fireworks.ai/inference",compat:{sendSessionAffinityHeaders:!0,supportsEagerToolInputStreaming:!1,supportsCacheControlOnTools:!1,supportsLongCacheRetention:!1}},"accounts/fireworks/models/deepseek-v4-flash-0731":{id:"accounts/fireworks/models/deepseek-v4-flash-0731",name:"DeepSeek V4 Flash 0731",provider:"fireworks",reasoning:!0,input:["text"],cost:{input:.14,output:.28,cacheRead:.028,cacheWrite:0},contextWindow:1e6,maxTokens:384e3,api:"anthropic-messages",baseUrl:"https://api.fireworks.ai/inference",compat:{sendSessionAffinityHeaders:!0,supportsEagerToolInputStreaming:!1,supportsCacheControlOnTools:!1,supportsLongCacheRetention:!1}},"accounts/fireworks/models/deepseek-v4-pro":{id:"accounts/fireworks/models/deepseek-v4-pro",name:"DeepSeek V4 Pro",provider:"fireworks",reasoning:!0,input:["text"],cost:{input:1.74,output:3.48,cacheRead:.145,cacheWrite:0},contextWindow:1e6,maxTokens:384e3,api:"anthropic-messages",baseUrl:"https://api.fireworks.ai/inference",compat:{sendSessionAffinityHeaders:!0,supportsEagerToolInputStreaming:!1,supportsCacheControlOnTools:!1,supportsLongCacheRetention:!1}},"accounts/fireworks/models/gpt-oss-120b":{id:"accounts/fireworks/models/gpt-oss-120b",name:"GPT OSS 120B",provider:"fireworks",reasoning:!0,input:["text"],cost:{input:.15,output:.6,cacheRead:.015,cacheWrite:0},contextWindow:131072,maxTokens:32768,api:"anthropic-messages",baseUrl:"https://api.fireworks.ai/inference",compat:{sendSessionAffinityHeaders:!0,supportsEagerToolInputStreaming:!1,supportsCacheControlOnTools:!1,supportsLongCacheRetention:!1}},"accounts/fireworks/models/gpt-oss-20b":{id:"accounts/fireworks/models/gpt-oss-20b",name:"GPT OSS 20B",provider:"fireworks",reasoning:!0,input:["text"],cost:{input:.07,output:.3,cacheRead:.035,cacheWrite:0},contextWindow:131072,maxTokens:32768,api:"anthropic-messages",baseUrl:"https://api.fireworks.ai/inference",compat:{sendSessionAffinityHeaders:!0,supportsEagerToolInputStreaming:!1,supportsCacheControlOnTools:!1,supportsLongCacheRetention:!1}},"accounts/fireworks/models/kimi-k2p6":{id:"accounts/fireworks/models/kimi-k2p6",name:"Kimi K2.6",provider:"fireworks",reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:.16,cacheWrite:0},contextWindow:262e3,maxTokens:262e3,api:"anthropic-messages",baseUrl:"https://api.fireworks.ai/inference",compat:{sendSessionAffinityHeaders:!0,supportsEagerToolInputStreaming:!1,supportsCacheControlOnTools:!1,supportsLongCacheRetention:!1}},"accounts/fireworks/models/kimi-k2p7-code":{id:"accounts/fireworks/models/kimi-k2p7-code",name:"Kimi K2.7 Code",provider:"fireworks",reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:.19,cacheWrite:0},contextWindow:262e3,maxTokens:262e3,api:"anthropic-messages",baseUrl:"https://api.fireworks.ai/inference",compat:{sendSessionAffinityHeaders:!0,supportsEagerToolInputStreaming:!1,supportsCacheControlOnTools:!1,supportsLongCacheRetention:!1}},"accounts/fireworks/models/minimax-m2p7":{id:"accounts/fireworks/models/minimax-m2p7",name:"MiniMax-M2.7",provider:"fireworks",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:0},contextWindow:196608,maxTokens:196608,api:"anthropic-messages",baseUrl:"https://api.fireworks.ai/inference",compat:{sendSessionAffinityHeaders:!0,supportsEagerToolInputStreaming:!1,supportsCacheControlOnTools:!1,supportsLongCacheRetention:!1}},"accounts/fireworks/models/minimax-m3":{id:"accounts/fireworks/models/minimax-m3",name:"MiniMax-M3",provider:"fireworks",reasoning:!0,input:["text","image"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:0},contextWindow:512e3,maxTokens:512e3,api:"anthropic-messages",baseUrl:"https://api.fireworks.ai/inference",compat:{sendSessionAffinityHeaders:!0,supportsEagerToolInputStreaming:!1,supportsCacheControlOnTools:!1,supportsLongCacheRetention:!1}},"accounts/fireworks/models/qwen3p7-plus":{id:"accounts/fireworks/models/qwen3p7-plus",name:"Qwen 3.7 Plus",provider:"fireworks",reasoning:!0,input:["text","image"],cost:{input:.4,output:1.6,cacheRead:.08,cacheWrite:0},contextWindow:262144,maxTokens:65536,api:"anthropic-messages",baseUrl:"https://api.fireworks.ai/inference",compat:{sendSessionAffinityHeaders:!0,supportsEagerToolInputStreaming:!1,supportsCacheControlOnTools:!1,supportsLongCacheRetention:!1}},"accounts/fireworks/routers/kimi-k2p6-fast":{id:"accounts/fireworks/routers/kimi-k2p6-fast",name:"Kimi K2.6 Fast",provider:"fireworks",reasoning:!0,input:["text","image"],cost:{input:2,output:8,cacheRead:.3,cacheWrite:0},contextWindow:262e3,maxTokens:262e3,api:"anthropic-messages",baseUrl:"https://api.fireworks.ai/inference",compat:{sendSessionAffinityHeaders:!0,supportsEagerToolInputStreaming:!1,supportsCacheControlOnTools:!1,supportsLongCacheRetention:!1}},"accounts/fireworks/routers/kimi-k2p6-turbo":{id:"accounts/fireworks/routers/kimi-k2p6-turbo",name:"Kimi K2.6 Turbo",provider:"fireworks",reasoning:!0,input:["text","image"],cost:{input:2,output:8,cacheRead:.3,cacheWrite:0},contextWindow:262e3,maxTokens:262e3,api:"anthropic-messages",baseUrl:"https://api.fireworks.ai/inference",compat:{sendSessionAffinityHeaders:!0,supportsEagerToolInputStreaming:!1,supportsCacheControlOnTools:!1,supportsLongCacheRetention:!1}},"accounts/fireworks/routers/kimi-k2p7-code-fast":{id:"accounts/fireworks/routers/kimi-k2p7-code-fast",name:"Kimi K2.7 Code Fast",provider:"fireworks",reasoning:!0,input:["text","image"],cost:{input:1.9,output:8,cacheRead:.38,cacheWrite:0},contextWindow:262e3,maxTokens:262e3,api:"anthropic-messages",baseUrl:"https://api.fireworks.ai/inference",compat:{sendSessionAffinityHeaders:!0,supportsEagerToolInputStreaming:!1,supportsCacheControlOnTools:!1,supportsLongCacheRetention:!1}}},"openai-completions":{"accounts/fireworks/models/glm-5p2":{id:"accounts/fireworks/models/glm-5p2",name:"GLM 5.2",provider:"fireworks",reasoning:!0,input:["text"],cost:{input:1.4,output:4.4,cacheRead:.14,cacheWrite:0},contextWindow:1048575,maxTokens:131072,api:"openai-completions",baseUrl:"https://api.fireworks.ai/inference/v1",compat:{supportsStore:!1,supportsDeveloperRole:!1,sendSessionAffinityHeaders:!0,supportsLongCacheRetention:!1},thinkingLevelMap:{off:"none",minimal:null,low:"high",medium:"high",high:"high",xhigh:null,max:"max"}},"accounts/fireworks/models/kimi-k3":{id:"accounts/fireworks/models/kimi-k3",name:"Kimi K3",provider:"fireworks",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:0},contextWindow:1048576,maxTokens:131072,api:"openai-completions",baseUrl:"https://api.fireworks.ai/inference/v1",compat:{supportsStore:!1,supportsDeveloperRole:!1,sendSessionAffinityHeaders:!0,supportsLongCacheRetention:!1,requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"openai",deferredToolsMode:"kimi"},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:"max"}},"accounts/fireworks/routers/glm-5p2-fast":{id:"accounts/fireworks/routers/glm-5p2-fast",name:"GLM 5.2 Fast",provider:"fireworks",reasoning:!0,input:["text"],cost:{input:2.1,output:6.6,cacheRead:.21,cacheWrite:0},contextWindow:1048575,maxTokens:131072,api:"openai-completions",baseUrl:"https://api.fireworks.ai/inference/v1",compat:{supportsStore:!1,supportsDeveloperRole:!1,sendSessionAffinityHeaders:!0,supportsLongCacheRetention:!1},thinkingLevelMap:{off:"none",minimal:null,low:"high",medium:"high",high:"high",xhigh:null,max:"max"}},"accounts/fireworks/routers/kimi-k3-fast":{id:"accounts/fireworks/routers/kimi-k3-fast",name:"Kimi K3 Fast",provider:"fireworks",reasoning:!0,input:["text","image"],cost:{input:4.5,output:22.5,cacheRead:.45,cacheWrite:0},contextWindow:1048576,maxTokens:131072,api:"openai-completions",baseUrl:"https://api.fireworks.ai/inference/v1",compat:{supportsStore:!1,supportsDeveloperRole:!1,sendSessionAffinityHeaders:!0,supportsLongCacheRetention:!1,requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"openai",deferredToolsMode:"kimi"},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:"max"}}}};var l1=J("fireworks",a1);var c1={"anthropic-messages":{"claude-haiku-4.5":{id:"claude-haiku-4.5",name:"Claude Haiku 4.5 (latest)",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:1,output:5,cacheRead:.1,cacheWrite:1.25},contextWindow:2e5,maxTokens:64e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsEagerToolInputStreaming:!1}},"claude-opus-4.5":{id:"claude-opus-4.5",name:"Claude Opus 4.5 (latest)",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:2e5,maxTokens:32e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"}},"claude-opus-4.6":{id:"claude-opus-4.6",name:"Claude Opus 4.6",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:32e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{max:"max"},compat:{forceAdaptiveThinking:!0}},"claude-opus-4.7":{id:"claude-opus-4.7",name:"Claude Opus 4.7",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:32e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{xhigh:"xhigh",max:"max",minimal:"low"},compat:{forceAdaptiveThinking:!0,supportsTemperature:!1}},"claude-opus-4.8":{id:"claude-opus-4.8",name:"Claude Opus 4.8",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:64e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{xhigh:"xhigh",max:"max",minimal:"low"},compat:{forceAdaptiveThinking:!0,supportsTemperature:!1}},"claude-opus-5":{id:"claude-opus-5",name:"Claude Opus 5",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:64e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{xhigh:"xhigh",max:"max",minimal:"low"},compat:{forceAdaptiveThinking:!0,supportsTemperature:!1}},"claude-sonnet-4":{id:"claude-sonnet-4",name:"Claude Sonnet 4 (latest)",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:216e3,maxTokens:16e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsEagerToolInputStreaming:!1}},"claude-sonnet-4.5":{id:"claude-sonnet-4.5",name:"Claude Sonnet 4.5 (latest)",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:2e5,maxTokens:32e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsEagerToolInputStreaming:!1}},"claude-sonnet-4.6":{id:"claude-sonnet-4.6",name:"Claude Sonnet 4.6",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:1e6,maxTokens:32e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{max:"max",minimal:"low"},compat:{forceAdaptiveThinking:!0}},"claude-sonnet-5":{id:"claude-sonnet-5",name:"Claude Sonnet 5",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:2,output:10,cacheRead:.2,cacheWrite:2.5},contextWindow:1e6,maxTokens:128e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{xhigh:"xhigh",max:"max"},compat:{forceAdaptiveThinking:!0}}},"openai-completions":{"claude-fable-5":{id:"claude-fable-5",name:"Claude Fable 5",api:"openai-completions",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:10,output:50,cacheRead:1,cacheWrite:12.5},contextWindow:1e6,maxTokens:128e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1},thinkingLevelMap:{off:null,xhigh:"xhigh",max:"max"}},"gemini-3.1-pro-preview":{id:"gemini-3.1-pro-preview",name:"Gemini 3.1 Pro Preview",api:"openai-completions",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:2,output:12,cacheRead:.2,cacheWrite:0,tiers:[{inputTokensAbove:2e5,input:4,output:18,cacheRead:.4,cacheWrite:0}]},contextWindow:1e6,maxTokens:64e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1}},"gemini-3.5-flash":{id:"gemini-3.5-flash",name:"Gemini 3.5 Flash",api:"openai-completions",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:1.5,output:9,cacheRead:.15,cacheWrite:0},contextWindow:2e5,maxTokens:64e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1}},"gemini-3.6-flash":{id:"gemini-3.6-flash",name:"Gemini 3.6 Flash",api:"openai-completions",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:1.5,output:7.5,cacheRead:.15,cacheWrite:0},contextWindow:1e6,maxTokens:64e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1}},"gpt-4.1":{id:"gpt-4.1",name:"GPT-4.1",api:"openai-completions",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!1,input:["text","image"],cost:{input:2,output:8,cacheRead:.5,cacheWrite:0},contextWindow:128e3,maxTokens:16384,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1}},"kimi-k2.7-code":{id:"kimi-k2.7-code",name:"Kimi K2.7 Code",api:"openai-completions",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:.19,cacheWrite:0},contextWindow:256e3,maxTokens:32e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1}},"kimi-k3":{id:"kimi-k3",name:"Kimi K3",api:"openai-completions",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:0},contextWindow:1048576,maxTokens:131072,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1}}},"openai-responses":{"gpt-5-mini":{id:"gpt-5-mini",name:"GPT-5 Mini",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:.25,output:2,cacheRead:.025,cacheWrite:0},contextWindow:264e3,maxTokens:64e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.2":{id:"gpt-5.2",name:"GPT-5.2",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",xhigh:"xhigh"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.2-codex":{id:"gpt-5.2-codex",name:"GPT-5.2 Codex",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",xhigh:"xhigh"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.3-codex":{id:"gpt-5.3-codex",name:"GPT-5.3 Codex",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:1e6,maxTokens:128e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.4":{id:"gpt-5.4",name:"GPT-5.4",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:2.5,output:15,cacheRead:.25,cacheWrite:0,tiers:[{inputTokensAbove:272e3,input:5,output:22.5,cacheRead:.5,cacheWrite:0}]},contextWindow:1e6,maxTokens:128e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.4-mini":{id:"gpt-5.4-mini",name:"GPT-5.4 mini",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:.75,output:4.5,cacheRead:.075,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.4-nano":{id:"gpt-5.4-nano",name:"GPT-5.4 nano",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:.2,output:1.25,cacheRead:.02,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",xhigh:"xhigh"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.5":{id:"gpt-5.5",name:"GPT-5.5",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:0,tiers:[{inputTokensAbove:272e3,input:10,output:45,cacheRead:1,cacheWrite:0}]},contextWindow:1e6,maxTokens:128e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.6-luna":{id:"gpt-5.6-luna",name:"GPT-5.6 Luna",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:.2,output:1.2,cacheRead:.02,cacheWrite:0,tiers:[{inputTokensAbove:2e5,input:.4,output:1.8,cacheRead:.04,cacheWrite:0}]},contextWindow:105e4,maxTokens:128e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.6-sol":{id:"gpt-5.6-sol",name:"GPT-5.6 Sol",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:6.25,tiers:[{inputTokensAbove:272e3,input:10,output:45,cacheRead:1,cacheWrite:12.5}]},contextWindow:105e4,maxTokens:128e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.6-terra":{id:"gpt-5.6-terra",name:"GPT-5.6 Terra",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:2,output:12,cacheRead:.2,cacheWrite:0,tiers:[{inputTokensAbove:272e3,input:4,output:18,cacheRead:.4,cacheWrite:0}]},contextWindow:105e4,maxTokens:128e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsOpenAIGrammarTools:!0}},"grok-4.5":{id:"grok-4.5",name:"Grok 4.5",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:2,output:6,cacheRead:.5,cacheWrite:0,tiers:[{inputTokensAbove:2e5,input:4,output:12,cacheRead:1,cacheWrite:0}]},contextWindow:5e5,maxTokens:128e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"mai-code-1-flash-picker":{id:"mai-code-1-flash-picker",name:"MAI-Code-1-Flash",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text"],cost:{input:.75,output:4.5,cacheRead:.075,cacheWrite:0},contextWindow:256e3,maxTokens:128e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}}}};var u1=J("github-copilot",c1);var p1={"google-generative-ai":{"deep-research-max-preview-04-2026":{id:"deep-research-max-preview-04-2026",name:"Deep Research Max Preview (Apr-21-2026)",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:2,output:12,cacheRead:.2,cacheWrite:0},contextWindow:131072,maxTokens:65536},"deep-research-preview-04-2026":{id:"deep-research-preview-04-2026",name:"Deep Research Preview (Apr-21-2026)",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:2,output:12,cacheRead:.2,cacheWrite:0},contextWindow:131072,maxTokens:65536},"gemini-2.5-computer-use-preview-10-2025":{id:"gemini-2.5-computer-use-preview-10-2025",name:"Gemini 2.5 Computer Use Preview 10-2025",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:65536},"gemini-2.5-flash":{id:"gemini-2.5-flash",name:"Gemini 2.5 Flash",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:.3,output:2.5,cacheRead:.03,cacheWrite:0},contextWindow:1048576,maxTokens:65536},"gemini-2.5-flash-lite":{id:"gemini-2.5-flash-lite",name:"Gemini 2.5 Flash-Lite",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:.1,output:.4,cacheRead:.01,cacheWrite:0},contextWindow:1048576,maxTokens:65536},"gemini-2.5-pro":{id:"gemini-2.5-pro",name:"Gemini 2.5 Pro",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:0},contextWindow:1048576,maxTokens:65536},"gemini-3-flash-preview":{id:"gemini-3-flash-preview",name:"Gemini 3 Flash Preview",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:.5,output:3,cacheRead:.05,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null}},"gemini-3.1-flash-lite":{id:"gemini-3.1-flash-lite",name:"Gemini 3.1 Flash Lite",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:.25,output:1.5,cacheRead:.025,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null}},"gemini-3.1-flash-lite-image":{id:"gemini-3.1-flash-lite-image",name:"Nano Banana 2 Lite",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:.25,output:30,cacheRead:0,cacheWrite:0},contextWindow:65536,maxTokens:65536,thinkingLevelMap:{off:null}},"gemini-3.1-flash-lite-preview":{id:"gemini-3.1-flash-lite-preview",name:"Gemini 3.1 Flash Lite Preview",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:.25,output:1.5,cacheRead:.025,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null}},"gemini-3.1-flash-live-preview":{id:"gemini-3.1-flash-live-preview",name:"Gemini 3.1 Flash Live Preview",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:.75,output:4.5,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:65536,thinkingLevelMap:{off:null}},"gemini-3.1-pro-preview":{id:"gemini-3.1-pro-preview",name:"Gemini 3.1 Pro Preview",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:2,output:12,cacheRead:.2,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null,minimal:null,low:"LOW",medium:null,high:"HIGH"}},"gemini-3.1-pro-preview-customtools":{id:"gemini-3.1-pro-preview-customtools",name:"Gemini 3.1 Pro Preview Custom Tools",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:2,output:12,cacheRead:.2,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null,minimal:null,low:"LOW",medium:null,high:"HIGH"}},"gemini-3.5-flash":{id:"gemini-3.5-flash",name:"Gemini 3.5 Flash",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:1.5,output:9,cacheRead:.15,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null}},"gemini-3.5-flash-lite":{id:"gemini-3.5-flash-lite",name:"Gemini 3.5 Flash Lite",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:.3,output:2.5,cacheRead:.03,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null}},"gemini-3.6-flash":{id:"gemini-3.6-flash",name:"Gemini 3.6 Flash",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:1.5,output:7.5,cacheRead:.15,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null}},"gemini-flash-latest":{id:"gemini-flash-latest",name:"Gemini Flash Latest",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:1.5,output:9,cacheRead:.15,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null}},"gemini-flash-lite-latest":{id:"gemini-flash-lite-latest",name:"Gemini Flash-Lite Latest",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:.25,output:1.5,cacheRead:.025,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null}},"gemini-robotics-er-1.6-preview":{id:"gemini-robotics-er-1.6-preview",name:"Gemini Robotics-ER 1.6 Preview",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:1,output:5,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:65536},"gemma-4-26b-a4b-it":{id:"gemma-4-26b-a4b-it",name:"Gemma 4 26B A4B IT",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:32768,thinkingLevelMap:{off:null,minimal:"MINIMAL",low:null,medium:null,high:"HIGH"}},"gemma-4-31b-it":{id:"gemma-4-31b-it",name:"Gemma 4 31B IT",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:32768,thinkingLevelMap:{off:null,minimal:"MINIMAL",low:null,medium:null,high:"HIGH"}}}};var d1=J("google",p1);var m1={"google-vertex":{"gemini-2.5-flash":{id:"gemini-2.5-flash",name:"Gemini 2.5 Flash",api:"google-vertex",provider:"google-vertex",baseUrl:"https://{location}-aiplatform.googleapis.com",reasoning:!0,input:["text","image"],cost:{input:.3,output:2.5,cacheRead:.03,cacheWrite:0},contextWindow:1048576,maxTokens:65536},"gemini-2.5-flash-lite":{id:"gemini-2.5-flash-lite",name:"Gemini 2.5 Flash-Lite",api:"google-vertex",provider:"google-vertex",baseUrl:"https://{location}-aiplatform.googleapis.com",reasoning:!0,input:["text","image"],cost:{input:.1,output:.4,cacheRead:.01,cacheWrite:0},contextWindow:1048576,maxTokens:65536},"gemini-2.5-pro":{id:"gemini-2.5-pro",name:"Gemini 2.5 Pro",api:"google-vertex",provider:"google-vertex",baseUrl:"https://{location}-aiplatform.googleapis.com",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:0},contextWindow:1048576,maxTokens:65536},"gemini-3-flash-preview":{id:"gemini-3-flash-preview",name:"Gemini 3 Flash Preview",api:"google-vertex",provider:"google-vertex",baseUrl:"https://{location}-aiplatform.googleapis.com",reasoning:!0,input:["text","image"],cost:{input:.5,output:3,cacheRead:.05,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null}},"gemini-3.1-flash-lite":{id:"gemini-3.1-flash-lite",name:"Gemini 3.1 Flash Lite",api:"google-vertex",provider:"google-vertex",baseUrl:"https://{location}-aiplatform.googleapis.com",reasoning:!0,input:["text","image"],cost:{input:.25,output:1.5,cacheRead:.025,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null}},"gemini-3.1-pro-preview":{id:"gemini-3.1-pro-preview",name:"Gemini 3.1 Pro Preview",api:"google-vertex",provider:"google-vertex",baseUrl:"https://{location}-aiplatform.googleapis.com",reasoning:!0,input:["text","image"],cost:{input:2,output:12,cacheRead:.2,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null,minimal:null,low:"LOW",medium:null,high:"HIGH"}},"gemini-3.1-pro-preview-customtools":{id:"gemini-3.1-pro-preview-customtools",name:"Gemini 3.1 Pro Preview Custom Tools",api:"google-vertex",provider:"google-vertex",baseUrl:"https://{location}-aiplatform.googleapis.com",reasoning:!0,input:["text","image"],cost:{input:2,output:12,cacheRead:.2,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null,minimal:null,low:"LOW",medium:null,high:"HIGH"}},"gemini-3.5-flash":{id:"gemini-3.5-flash",name:"Gemini 3.5 Flash",api:"google-vertex",provider:"google-vertex",baseUrl:"https://{location}-aiplatform.googleapis.com",reasoning:!0,input:["text","image"],cost:{input:1.5,output:9,cacheRead:.15,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null}},"gemini-3.5-flash-lite":{id:"gemini-3.5-flash-lite",name:"Gemini 3.5 Flash Lite",api:"google-vertex",provider:"google-vertex",baseUrl:"https://{location}-aiplatform.googleapis.com",reasoning:!0,input:["text","image"],cost:{input:.3,output:2.5,cacheRead:.03,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null}},"gemini-3.6-flash":{id:"gemini-3.6-flash",name:"Gemini 3.6 Flash",api:"google-vertex",provider:"google-vertex",baseUrl:"https://{location}-aiplatform.googleapis.com",reasoning:!0,input:["text","image"],cost:{input:1.5,output:7.5,cacheRead:.15,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null}},"gemini-flash-latest":{id:"gemini-flash-latest",name:"Gemini Flash Latest",api:"google-vertex",provider:"google-vertex",baseUrl:"https://{location}-aiplatform.googleapis.com",reasoning:!0,input:["text","image"],cost:{input:1.5,output:9,cacheRead:.15,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null}},"gemini-flash-lite-latest":{id:"gemini-flash-lite-latest",name:"Gemini Flash-Lite Latest",api:"google-vertex",provider:"google-vertex",baseUrl:"https://{location}-aiplatform.googleapis.com",reasoning:!0,input:["text","image"],cost:{input:.25,output:1.5,cacheRead:.025,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null}}}};var h1=J("google-vertex",m1);var g1={"openai-completions":{"llama-3.1-8b-instant":{id:"llama-3.1-8b-instant",name:"Llama 3.1 8B",api:"openai-completions",provider:"groq",baseUrl:"https://api.groq.com/openai/v1",reasoning:!1,input:["text"],cost:{input:.05,output:.08,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:131072},"llama-3.3-70b-versatile":{id:"llama-3.3-70b-versatile",name:"Llama 3.3 70B",api:"openai-completions",provider:"groq",baseUrl:"https://api.groq.com/openai/v1",reasoning:!1,input:["text"],cost:{input:.59,output:.79,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:32768},"openai/gpt-oss-120b":{id:"openai/gpt-oss-120b",name:"GPT OSS 120B",api:"openai-completions",provider:"groq",baseUrl:"https://api.groq.com/openai/v1",reasoning:!0,input:["text"],cost:{input:.15,output:.6,cacheRead:.075,cacheWrite:0},contextWindow:131072,maxTokens:65536,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"openai/gpt-oss-20b":{id:"openai/gpt-oss-20b",name:"GPT OSS 20B",api:"openai-completions",provider:"groq",baseUrl:"https://api.groq.com/openai/v1",reasoning:!0,input:["text"],cost:{input:.075,output:.3,cacheRead:.0375,cacheWrite:0},contextWindow:131072,maxTokens:65536,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"openai/gpt-oss-safeguard-20b":{id:"openai/gpt-oss-safeguard-20b",name:"Safety GPT OSS 20B",api:"openai-completions",provider:"groq",baseUrl:"https://api.groq.com/openai/v1",reasoning:!0,input:["text"],cost:{input:.075,output:.3,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:65536,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"qwen/qwen3.6-27b":{id:"qwen/qwen3.6-27b",name:"Qwen3.6 27B",api:"openai-completions",provider:"groq",baseUrl:"https://api.groq.com/openai/v1",reasoning:!0,input:["text","image"],cost:{input:.6,output:3,cacheRead:.3,cacheWrite:0},contextWindow:131072,maxTokens:16384,thinkingLevelMap:{off:"none",minimal:null,low:null,medium:null,high:"default",xhigh:null,max:null}}}};var f1=J("groq",g1);var b1={"openai-completions":{"MiniMaxAI/MiniMax-M2":{id:"MiniMaxAI/MiniMax-M2",name:"MiniMax-M2",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:204800,maxTokens:128e3},"MiniMaxAI/MiniMax-M2.1":{id:"MiniMaxAI/MiniMax-M2.1",name:"MiniMax-M2.1",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:204800,maxTokens:131072},"MiniMaxAI/MiniMax-M2.5":{id:"MiniMaxAI/MiniMax-M2.5",name:"MiniMax-M2.5",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:.03,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:204800,maxTokens:131072},"MiniMaxAI/MiniMax-M2.7":{id:"MiniMaxAI/MiniMax-M2.7",name:"MiniMax-M2.7",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:204800,maxTokens:131072},"MiniMaxAI/MiniMax-M3":{id:"MiniMaxAI/MiniMax-M3",name:"MiniMax-M3",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text","image"],cost:{input:.3,output:1.2,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:524288,maxTokens:128e3},"Qwen/Qwen3-235B-A22B":{id:"Qwen/Qwen3-235B-A22B",name:"Qwen3 235B-A22B",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.2,output:.8,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:40960,maxTokens:16384},"Qwen/Qwen3-235B-A22B-Instruct-2507":{id:"Qwen/Qwen3-235B-A22B-Instruct-2507",name:"Qwen3 235B-A22B Instruct 2507",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!1,input:["text"],cost:{input:.855,output:2.565,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:16384},"Qwen/Qwen3-235B-A22B-Thinking-2507":{id:"Qwen/Qwen3-235B-A22B-Thinking-2507",name:"Qwen3-235B-A22B-Thinking-2507",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.3,output:3,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:131072},"Qwen/Qwen3-32B":{id:"Qwen/Qwen3-32B",name:"Qwen3 32B",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.29,output:.59,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:131072,maxTokens:16384},"Qwen/Qwen3-Coder-30B-A3B-Instruct":{id:"Qwen/Qwen3-Coder-30B-A3B-Instruct",name:"Qwen3-Coder 30B-A3B Instruct",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!1,input:["text"],cost:{input:.07,output:.26,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:65536},"Qwen/Qwen3-Coder-480B-A35B-Instruct":{id:"Qwen/Qwen3-Coder-480B-A35B-Instruct",name:"Qwen3-Coder-480B-A35B-Instruct",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!1,input:["text"],cost:{input:2,output:2,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:66536},"Qwen/Qwen3-Coder-Next":{id:"Qwen/Qwen3-Coder-Next",name:"Qwen3-Coder-Next",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!1,input:["text"],cost:{input:.2,output:1.5,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:65536},"Qwen/Qwen3-Next-80B-A3B-Instruct":{id:"Qwen/Qwen3-Next-80B-A3B-Instruct",name:"Qwen3-Next-80B-A3B-Instruct",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!1,input:["text"],cost:{input:.25,output:1,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:66536},"Qwen/Qwen3-Next-80B-A3B-Thinking":{id:"Qwen/Qwen3-Next-80B-A3B-Thinking",name:"Qwen3-Next-80B-A3B-Thinking",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!1,input:["text"],cost:{input:.3,output:2,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:131072},"Qwen/Qwen3.5-122B-A10B":{id:"Qwen/Qwen3.5-122B-A10B",name:"Qwen3.5 122B-A10B",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text","image"],cost:{input:.4,output:3.2,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:65536},"Qwen/Qwen3.5-27B":{id:"Qwen/Qwen3.5-27B",name:"Qwen3.5 27B",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text","image"],cost:{input:.3,output:2.4,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:65536},"Qwen/Qwen3.5-35B-A3B":{id:"Qwen/Qwen3.5-35B-A3B",name:"Qwen3.5 35B-A3B",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text","image"],cost:{input:.25,output:2,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:65536},"Qwen/Qwen3.5-397B-A17B":{id:"Qwen/Qwen3.5-397B-A17B",name:"Qwen3.5-397B-A17B",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text","image"],cost:{input:.6,output:3.6,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:32768,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"Qwen/Qwen3.5-9B":{id:"Qwen/Qwen3.5-9B",name:"Qwen3.5 9B",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text","image"],cost:{input:.17,output:.25,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:65536},"Qwen/Qwen3.6-27B":{id:"Qwen/Qwen3.6-27B",name:"Qwen3.6 27B",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text","image"],cost:{input:.47,output:3.19,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:65536},"Qwen/Qwen3.6-35B-A3B":{id:"Qwen/Qwen3.6-35B-A3B",name:"Qwen3.6 35B-A3B",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text","image"],cost:{input:.15,output:.95,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:65536},"XiaomiMiMo/MiMo-V2-Flash":{id:"XiaomiMiMo/MiMo-V2-Flash",name:"MiMo-V2-Flash",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.1,output:.3,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:4096},"XiaomiMiMo/MiMo-V2.5":{id:"XiaomiMiMo/MiMo-V2.5",name:"MiMo-V2.5",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.4,output:2,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:131072,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null}},"XiaomiMiMo/MiMo-V2.5-Pro":{id:"XiaomiMiMo/MiMo-V2.5-Pro",name:"MiMo-V2.5-Pro",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:1,output:3,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:1048576,maxTokens:131072,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null}},"deepseek-ai/DeepSeek-R1":{id:"deepseek-ai/DeepSeek-R1",name:"DeepSeek-R1",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.7,output:2.5,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:64e3,maxTokens:32768},"deepseek-ai/DeepSeek-R1-0528":{id:"deepseek-ai/DeepSeek-R1-0528",name:"DeepSeek-R1-0528",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:3,output:5,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:163840,maxTokens:163840},"deepseek-ai/DeepSeek-V3":{id:"deepseek-ai/DeepSeek-V3",name:"DeepSeek-V3",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!1,input:["text"],cost:{input:.4,output:1.3,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:64e3,maxTokens:8192},"deepseek-ai/DeepSeek-V3.1":{id:"deepseek-ai/DeepSeek-V3.1",name:"DeepSeek-V3.1",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.27,output:1,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:131072,maxTokens:8192},"deepseek-ai/DeepSeek-V3.2":{id:"deepseek-ai/DeepSeek-V3.2",name:"DeepSeek-V3.2",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.28,output:.4,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:163840,maxTokens:65536},"deepseek-ai/DeepSeek-V4-Flash":{id:"deepseek-ai/DeepSeek-V4-Flash",name:"DeepSeek V4 Flash",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.14,output:.28,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:1048576,maxTokens:384e3},"deepseek-ai/DeepSeek-V4-Flash-0731":{id:"deepseek-ai/DeepSeek-V4-Flash-0731",name:"DeepSeek V4 Flash 0731",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.14,output:.28,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:1048576,maxTokens:384e3,thinkingLevelMap:{off:null,minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"}},"deepseek-ai/DeepSeek-V4-Pro":{id:"deepseek-ai/DeepSeek-V4-Pro",name:"DeepSeek V4 Pro",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.435,output:.87,cacheRead:.003625,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:1048576,maxTokens:393216,thinkingLevelMap:{off:null,minimal:null,low:null,medium:null,high:"high",xhigh:null,max:null}},"google/gemma-4-26B-A4B-it":{id:"google/gemma-4-26B-A4B-it",name:"Gemma 4 26B A4B IT",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text","image"],cost:{input:.13,output:.4,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:32768},"google/gemma-4-31B-it":{id:"google/gemma-4-31B-it",name:"Gemma 4 31B IT",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text","image"],cost:{input:.14,output:.4,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:32768},"meta-llama/Llama-3.3-70B-Instruct":{id:"meta-llama/Llama-3.3-70B-Instruct",name:"Llama-3.3-70B-Instruct",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!1,input:["text"],cost:{input:.59,output:.79,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:131072,maxTokens:4096},"moonshotai/Kimi-K2-Instruct":{id:"moonshotai/Kimi-K2-Instruct",name:"Kimi-K2-Instruct",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!1,input:["text"],cost:{input:1,output:3,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:131072,maxTokens:16384},"moonshotai/Kimi-K2-Instruct-0905":{id:"moonshotai/Kimi-K2-Instruct-0905",name:"Kimi-K2-Instruct-0905",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!1,input:["text"],cost:{input:1,output:3,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:16384},"moonshotai/Kimi-K2-Thinking":{id:"moonshotai/Kimi-K2-Thinking",name:"Kimi-K2-Thinking",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.6,output:2.5,cacheRead:.15,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:262144},"moonshotai/Kimi-K2.5":{id:"moonshotai/Kimi-K2.5",name:"Kimi-K2.5",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text","image"],cost:{input:.6,output:3,cacheRead:.1,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:262144},"moonshotai/Kimi-K2.6":{id:"moonshotai/Kimi-K2.6",name:"Kimi-K2.6",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:.16,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:262144},"moonshotai/Kimi-K2.7-Code":{id:"moonshotai/Kimi-K2.7-Code",name:"Kimi K2.7 Code",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:262144},"moonshotai/Kimi-K3":{id:"moonshotai/Kimi-K3",name:"Kimi K3",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:1e6,maxTokens:131072,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:null,high:"high",xhigh:null,max:"max"}},"openai/gpt-oss-120b":{id:"openai/gpt-oss-120b",name:"GPT OSS 120B",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.25,output:.69,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:131072,maxTokens:32768,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"openai/gpt-oss-20b":{id:"openai/gpt-oss-20b",name:"GPT OSS 20B",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.1,output:.5,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:131072,maxTokens:32768,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"stepfun-ai/Step-3.5-Flash":{id:"stepfun-ai/Step-3.5-Flash",name:"Step 3.5 Flash",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.1,output:.3,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:256e3},"stepfun-ai/Step-3.7-Flash":{id:"stepfun-ai/Step-3.7-Flash",name:"Step 3.7 Flash",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text","image"],cost:{input:.2,output:1.15,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:256e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"tencent/Hy3":{id:"tencent/Hy3",name:"Hy3",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.14,output:.58,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:64e3,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:null,high:"high",xhigh:null,max:null}},"thinkingmachines/Inkling":{id:"thinkingmachines/Inkling",name:"Inkling",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text","image"],cost:{input:1,output:4.05,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:1048576,maxTokens:1048576,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"thinkingmachines/Inkling-Small":{id:"thinkingmachines/Inkling-Small",name:"Inkling Small",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text","image"],cost:{input:.5,output:1.2,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:524288,maxTokens:1048576},"zai-org/GLM-4.5":{id:"zai-org/GLM-4.5",name:"GLM-4.5",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.6,output:2.2,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:131072,maxTokens:98304},"zai-org/GLM-4.5-Air":{id:"zai-org/GLM-4.5-Air",name:"GLM-4.5-Air",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.13,output:.85,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:131072,maxTokens:98304},"zai-org/GLM-4.5V":{id:"zai-org/GLM-4.5V",name:"GLM-4.5V",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text","image"],cost:{input:.6,output:1.8,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:65536,maxTokens:16384},"zai-org/GLM-4.6":{id:"zai-org/GLM-4.6",name:"GLM-4.6",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.55,output:2.2,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:204800,maxTokens:131072},"zai-org/GLM-4.7":{id:"zai-org/GLM-4.7",name:"GLM-4.7",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.6,output:2.2,cacheRead:.11,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:204800,maxTokens:131072},"zai-org/GLM-4.7-Flash":{id:"zai-org/GLM-4.7-Flash",name:"GLM-4.7-Flash",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:2e5,maxTokens:128e3},"zai-org/GLM-5":{id:"zai-org/GLM-5",name:"GLM-5",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:1,output:3.2,cacheRead:.2,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:202752,maxTokens:131072},"zai-org/GLM-5.1":{id:"zai-org/GLM-5.1",name:"GLM-5.1",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:1,output:3.2,cacheRead:.2,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:202752,maxTokens:131072},"zai-org/GLM-5.2":{id:"zai-org/GLM-5.2",name:"GLM-5.2",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:1.4,output:4.4,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:131072}}};var x1=J("huggingface",b1);var v1={"anthropic-messages":{k3:{id:"k3",name:"Kimi K3",api:"anthropic-messages",provider:"kimi-coding",baseUrl:"https://api.kimi.com/coding",headers:{"User-Agent":"KimiCLI/1.5"},compat:{allowEmptySignature:!0,forceAdaptiveThinking:!0},reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:0},contextWindow:1048576,maxTokens:131072,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:null,high:"high",xhigh:null,max:"max"}},"k3-256k":{id:"k3-256k",name:"Kimi K3-256K",api:"anthropic-messages",provider:"kimi-coding",baseUrl:"https://api.kimi.com/coding",headers:{"User-Agent":"KimiCLI/1.5"},compat:{forceAdaptiveThinking:!0},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:131072,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:null,high:"high",xhigh:null,max:"max"}},"kimi-for-coding":{id:"kimi-for-coding",name:"Kimi K2.7 Code",api:"anthropic-messages",provider:"kimi-coding",baseUrl:"https://api.kimi.com/coding",headers:{"User-Agent":"KimiCLI/1.5"},compat:{allowEmptySignature:!0,forceAdaptiveThinking:!0},reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:.19,cacheWrite:0},contextWindow:262144,maxTokens:32768},"kimi-for-coding-highspeed":{id:"kimi-for-coding-highspeed",name:"Kimi For Coding HighSpeed",api:"anthropic-messages",provider:"kimi-coding",baseUrl:"https://api.kimi.com/coding",headers:{"User-Agent":"KimiCLI/1.5"},compat:{forceAdaptiveThinking:!0},reasoning:!0,input:["text","image"],cost:{input:1.9,output:8,cacheRead:.38,cacheWrite:0},contextWindow:262144,maxTokens:32768}}};var y1=J("kimi-coding",v1);var w1={"anthropic-messages":{"MiniMax-M2.7":{id:"MiniMax-M2.7",name:"MiniMax-M2.7",api:"anthropic-messages",provider:"minimax",baseUrl:"https://api.minimax.io/anthropic",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:.375},contextWindow:204800,maxTokens:131072},"MiniMax-M2.7-highspeed":{id:"MiniMax-M2.7-highspeed",name:"MiniMax-M2.7-highspeed",api:"anthropic-messages",provider:"minimax",baseUrl:"https://api.minimax.io/anthropic",reasoning:!0,input:["text"],cost:{input:.6,output:2.4,cacheRead:.06,cacheWrite:.375},contextWindow:204800,maxTokens:131072},"MiniMax-M3":{id:"MiniMax-M3",name:"MiniMax-M3",api:"anthropic-messages",provider:"minimax",baseUrl:"https://api.minimax.io/anthropic",reasoning:!0,input:["text","image"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:0},contextWindow:1e6,maxTokens:128e3}}};var S1=J("minimax",w1);var T1={"anthropic-messages":{"MiniMax-M2.7":{id:"MiniMax-M2.7",name:"MiniMax-M2.7",api:"anthropic-messages",provider:"minimax-cn",baseUrl:"https://api.minimaxi.com/anthropic",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:.375},contextWindow:204800,maxTokens:131072},"MiniMax-M2.7-highspeed":{id:"MiniMax-M2.7-highspeed",name:"MiniMax-M2.7-highspeed",api:"anthropic-messages",provider:"minimax-cn",baseUrl:"https://api.minimaxi.com/anthropic",reasoning:!0,input:["text"],cost:{input:.6,output:2.4,cacheRead:.06,cacheWrite:.375},contextWindow:204800,maxTokens:131072},"MiniMax-M3":{id:"MiniMax-M3",name:"MiniMax-M3",api:"anthropic-messages",provider:"minimax-cn",baseUrl:"https://api.minimaxi.com/anthropic",reasoning:!0,input:["text","image"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:0},contextWindow:1e6,maxTokens:128e3}}};var k1=J("minimax-cn",T1);var C1={"mistral-conversations":{"codestral-latest":{id:"codestral-latest",name:"Codestral (latest)",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text"],cost:{input:.3,output:.9,cacheRead:.03,cacheWrite:0},contextWindow:256e3,maxTokens:4096},"devstral-2512":{id:"devstral-2512",name:"Devstral 2",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text"],cost:{input:.4,output:2,cacheRead:.04,cacheWrite:0},contextWindow:262144,maxTokens:262144},"devstral-latest":{id:"devstral-latest",name:"Devstral 2",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text"],cost:{input:.4,output:2,cacheRead:.04,cacheWrite:0},contextWindow:262144,maxTokens:262144},"devstral-medium-2507":{id:"devstral-medium-2507",name:"Devstral Medium",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text"],cost:{input:.4,output:2,cacheRead:.04,cacheWrite:0},contextWindow:128e3,maxTokens:128e3},"devstral-medium-latest":{id:"devstral-medium-latest",name:"Devstral 2 (latest)",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text"],cost:{input:.4,output:2,cacheRead:.04,cacheWrite:0},contextWindow:262144,maxTokens:262144},"devstral-small-2505":{id:"devstral-small-2505",name:"Devstral Small 2505",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text"],cost:{input:.1,output:.3,cacheRead:.01,cacheWrite:0},contextWindow:128e3,maxTokens:128e3},"devstral-small-2507":{id:"devstral-small-2507",name:"Devstral Small",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text"],cost:{input:.1,output:.3,cacheRead:.01,cacheWrite:0},contextWindow:128e3,maxTokens:128e3},"labs-devstral-small-2512":{id:"labs-devstral-small-2512",name:"Devstral Small 2",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:256e3},"magistral-medium-latest":{id:"magistral-medium-latest",name:"Magistral Medium (latest)",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!0,input:["text"],cost:{input:2,output:5,cacheRead:.2,cacheWrite:0},contextWindow:128e3,maxTokens:16384},"magistral-small":{id:"magistral-small",name:"Magistral Small",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!0,input:["text"],cost:{input:.5,output:1.5,cacheRead:.05,cacheWrite:0},contextWindow:128e3,maxTokens:128e3},"ministral-3b-latest":{id:"ministral-3b-latest",name:"Ministral 3B (latest)",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text"],cost:{input:.04,output:.04,cacheRead:.004,cacheWrite:0},contextWindow:128e3,maxTokens:128e3},"ministral-8b-latest":{id:"ministral-8b-latest",name:"Ministral 8B (latest)",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text"],cost:{input:.1,output:.1,cacheRead:.01,cacheWrite:0},contextWindow:128e3,maxTokens:128e3},"mistral-large-2411":{id:"mistral-large-2411",name:"Mistral Large 2.1",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text"],cost:{input:2,output:6,cacheRead:.2,cacheWrite:0},contextWindow:131072,maxTokens:16384},"mistral-large-2512":{id:"mistral-large-2512",name:"Mistral Large 3",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text","image"],cost:{input:.5,output:1.5,cacheRead:.05,cacheWrite:0},contextWindow:262144,maxTokens:262144},"mistral-large-latest":{id:"mistral-large-latest",name:"Mistral Large (latest)",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text","image"],cost:{input:.5,output:1.5,cacheRead:.05,cacheWrite:0},contextWindow:262144,maxTokens:262144},"mistral-medium-2505":{id:"mistral-medium-2505",name:"Mistral Medium 3",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text","image"],cost:{input:.4,output:2,cacheRead:.04,cacheWrite:0},contextWindow:131072,maxTokens:131072},"mistral-medium-2508":{id:"mistral-medium-2508",name:"Mistral Medium 3.1",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text","image"],cost:{input:.4,output:2,cacheRead:.04,cacheWrite:0},contextWindow:262144,maxTokens:262144},"mistral-medium-2604":{id:"mistral-medium-2604",name:"Mistral Medium 3.5",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!0,input:["text","image"],cost:{input:1.5,output:7.5,cacheRead:.15,cacheWrite:0},contextWindow:262144,maxTokens:262144},"mistral-medium-3.5":{id:"mistral-medium-3.5",name:"Mistral Medium 3.5",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!0,input:["text","image"],cost:{input:1.5,output:7.5,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:262144},"mistral-medium-latest":{id:"mistral-medium-latest",name:"Mistral Medium (latest)",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!0,input:["text","image"],cost:{input:1.5,output:7.5,cacheRead:.15,cacheWrite:0},contextWindow:262144,maxTokens:262144},"mistral-nemo":{id:"mistral-nemo",name:"Mistral Nemo",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text"],cost:{input:.15,output:.15,cacheRead:.015,cacheWrite:0},contextWindow:128e3,maxTokens:128e3},"mistral-small-2506":{id:"mistral-small-2506",name:"Mistral Small 3.2",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text","image"],cost:{input:.1,output:.3,cacheRead:.01,cacheWrite:0},contextWindow:128e3,maxTokens:16384},"mistral-small-2603":{id:"mistral-small-2603",name:"Mistral Small 4",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!0,input:["text","image"],cost:{input:.15,output:.6,cacheRead:.015,cacheWrite:0},contextWindow:256e3,maxTokens:256e3},"mistral-small-latest":{id:"mistral-small-latest",name:"Mistral Small (latest)",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!0,input:["text","image"],cost:{input:.15,output:.6,cacheRead:.015,cacheWrite:0},contextWindow:256e3,maxTokens:256e3},"open-mistral-7b":{id:"open-mistral-7b",name:"Mistral 7B",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text"],cost:{input:.25,output:.25,cacheRead:.025,cacheWrite:0},contextWindow:8e3,maxTokens:8e3},"open-mistral-nemo":{id:"open-mistral-nemo",name:"Open Mistral Nemo",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text"],cost:{input:.15,output:.15,cacheRead:.015,cacheWrite:0},contextWindow:128e3,maxTokens:128e3},"open-mixtral-8x22b":{id:"open-mixtral-8x22b",name:"Mixtral 8x22B",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text"],cost:{input:2,output:6,cacheRead:.2,cacheWrite:0},contextWindow:64e3,maxTokens:64e3},"open-mixtral-8x7b":{id:"open-mixtral-8x7b",name:"Mixtral 8x7B",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text"],cost:{input:.7,output:.7,cacheRead:.07,cacheWrite:0},contextWindow:32e3,maxTokens:32e3},"pixtral-12b":{id:"pixtral-12b",name:"Pixtral 12B",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text","image"],cost:{input:.15,output:.15,cacheRead:.015,cacheWrite:0},contextWindow:128e3,maxTokens:128e3},"pixtral-large-latest":{id:"pixtral-large-latest",name:"Pixtral Large (latest)",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text","image"],cost:{input:2,output:6,cacheRead:.2,cacheWrite:0},contextWindow:128e3,maxTokens:128e3},"voxtral-small-latest":{id:"voxtral-small-latest",name:"Voxtral Small (latest)",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text"],cost:{input:.1,output:.3,cacheRead:.01,cacheWrite:0},contextWindow:32e3,maxTokens:32e3}}};var R1=J("mistral",C1);var M1={"openai-completions":{"kimi-k2-0711-preview":{id:"kimi-k2-0711-preview",name:"Kimi K2 0711",api:"openai-completions",provider:"moonshotai",baseUrl:"https://api.moonshot.ai/v1",reasoning:!1,input:["text"],cost:{input:.6,output:2.5,cacheRead:.15,cacheWrite:0},contextWindow:131072,maxTokens:16384,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,thinkingFormat:"deepseek"}},"kimi-k2-0905-preview":{id:"kimi-k2-0905-preview",name:"Kimi K2 0905",api:"openai-completions",provider:"moonshotai",baseUrl:"https://api.moonshot.ai/v1",reasoning:!1,input:["text"],cost:{input:.6,output:2.5,cacheRead:.15,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,thinkingFormat:"deepseek"}},"kimi-k2-thinking":{id:"kimi-k2-thinking",name:"Kimi K2 Thinking",api:"openai-completions",provider:"moonshotai",baseUrl:"https://api.moonshot.ai/v1",reasoning:!0,input:["text"],cost:{input:.6,output:2.5,cacheRead:.15,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,thinkingFormat:"deepseek"}},"kimi-k2-thinking-turbo":{id:"kimi-k2-thinking-turbo",name:"Kimi K2 Thinking Turbo",api:"openai-completions",provider:"moonshotai",baseUrl:"https://api.moonshot.ai/v1",reasoning:!0,input:["text"],cost:{input:1.15,output:8,cacheRead:.15,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,thinkingFormat:"deepseek"}},"kimi-k2-turbo-preview":{id:"kimi-k2-turbo-preview",name:"Kimi K2 Turbo",api:"openai-completions",provider:"moonshotai",baseUrl:"https://api.moonshot.ai/v1",reasoning:!1,input:["text"],cost:{input:2.4,output:10,cacheRead:.6,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,thinkingFormat:"deepseek"}},"kimi-k2.5":{id:"kimi-k2.5",name:"Kimi K2.5",api:"openai-completions",provider:"moonshotai",baseUrl:"https://api.moonshot.ai/v1",reasoning:!0,input:["text","image"],cost:{input:.6,output:3,cacheRead:.1,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,thinkingFormat:"deepseek"}},"kimi-k2.6":{id:"kimi-k2.6",name:"Kimi K2.6",api:"openai-completions",provider:"moonshotai",baseUrl:"https://api.moonshot.ai/v1",reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:.16,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,thinkingFormat:"deepseek"}},"kimi-k2.7-code":{id:"kimi-k2.7-code",name:"Kimi K2.7 Code",api:"openai-completions",provider:"moonshotai",baseUrl:"https://api.moonshot.ai/v1",reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:.19,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,thinkingFormat:"deepseek"},thinkingLevelMap:{off:null}},"kimi-k2.7-code-highspeed":{id:"kimi-k2.7-code-highspeed",name:"Kimi K2.7 Code HighSpeed",api:"openai-completions",provider:"moonshotai",baseUrl:"https://api.moonshot.ai/v1",reasoning:!0,input:["text","image"],cost:{input:1.9,output:8,cacheRead:.38,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,thinkingFormat:"deepseek"},thinkingLevelMap:{off:null}},"kimi-k3":{id:"kimi-k3",name:"Kimi K3",api:"openai-completions",provider:"moonshotai",baseUrl:"https://api.moonshot.ai/v1",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:0},contextWindow:1048576,maxTokens:131072,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!0,maxTokensField:"max_tokens",supportsStrictMode:!1,thinkingFormat:"openai",requiresReasoningContentOnAssistantMessages:!0,deferredToolsMode:"kimi"},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:null,high:"high",xhigh:null,max:"max"}}}};var P1=J("moonshotai",M1);var I1={"openai-completions":{"kimi-k2-0711-preview":{id:"kimi-k2-0711-preview",name:"Kimi K2 0711",api:"openai-completions",provider:"moonshotai-cn",baseUrl:"https://api.moonshot.cn/v1",reasoning:!1,input:["text"],cost:{input:.6,output:2.5,cacheRead:.15,cacheWrite:0},contextWindow:131072,maxTokens:16384,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,thinkingFormat:"deepseek"}},"kimi-k2-0905-preview":{id:"kimi-k2-0905-preview",name:"Kimi K2 0905",api:"openai-completions",provider:"moonshotai-cn",baseUrl:"https://api.moonshot.cn/v1",reasoning:!1,input:["text"],cost:{input:.6,output:2.5,cacheRead:.15,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,thinkingFormat:"deepseek"}},"kimi-k2-thinking":{id:"kimi-k2-thinking",name:"Kimi K2 Thinking",api:"openai-completions",provider:"moonshotai-cn",baseUrl:"https://api.moonshot.cn/v1",reasoning:!0,input:["text"],cost:{input:.6,output:2.5,cacheRead:.15,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,thinkingFormat:"deepseek"}},"kimi-k2-thinking-turbo":{id:"kimi-k2-thinking-turbo",name:"Kimi K2 Thinking Turbo",api:"openai-completions",provider:"moonshotai-cn",baseUrl:"https://api.moonshot.cn/v1",reasoning:!0,input:["text"],cost:{input:1.15,output:8,cacheRead:.15,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,thinkingFormat:"deepseek"}},"kimi-k2-turbo-preview":{id:"kimi-k2-turbo-preview",name:"Kimi K2 Turbo",api:"openai-completions",provider:"moonshotai-cn",baseUrl:"https://api.moonshot.cn/v1",reasoning:!1,input:["text"],cost:{input:2.4,output:10,cacheRead:.6,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,thinkingFormat:"deepseek"}},"kimi-k2.5":{id:"kimi-k2.5",name:"Kimi K2.5",api:"openai-completions",provider:"moonshotai-cn",baseUrl:"https://api.moonshot.cn/v1",reasoning:!0,input:["text","image"],cost:{input:.6,output:3,cacheRead:.1,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,thinkingFormat:"deepseek"}},"kimi-k2.6":{id:"kimi-k2.6",name:"Kimi K2.6",api:"openai-completions",provider:"moonshotai-cn",baseUrl:"https://api.moonshot.cn/v1",reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:.16,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,thinkingFormat:"deepseek"}},"kimi-k2.7-code":{id:"kimi-k2.7-code",name:"Kimi K2.7 Code",api:"openai-completions",provider:"moonshotai-cn",baseUrl:"https://api.moonshot.cn/v1",reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:.19,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,thinkingFormat:"deepseek"},thinkingLevelMap:{off:null}},"kimi-k2.7-code-highspeed":{id:"kimi-k2.7-code-highspeed",name:"Kimi K2.7 Code HighSpeed",api:"openai-completions",provider:"moonshotai-cn",baseUrl:"https://api.moonshot.cn/v1",reasoning:!0,input:["text","image"],cost:{input:1.9,output:8,cacheRead:.38,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,thinkingFormat:"deepseek"},thinkingLevelMap:{off:null}},"kimi-k3":{id:"kimi-k3",name:"Kimi K3",api:"openai-completions",provider:"moonshotai-cn",baseUrl:"https://api.moonshot.cn/v1",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:0},contextWindow:1048576,maxTokens:131072,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!0,maxTokensField:"max_tokens",supportsStrictMode:!1,thinkingFormat:"openai",requiresReasoningContentOnAssistantMessages:!0,deferredToolsMode:"kimi"},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:null,high:"high",xhigh:null,max:"max"}}}};var A1=J("moonshotai-cn",I1);var E1={"openai-completions":{"google/gemma-3-12b-it":{id:"google/gemma-3-12b-it",name:"Gemma 3 12B IT",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!1,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:131072,maxTokens:16384},"google/gemma-3-4b-it":{id:"google/gemma-3-4b-it",name:"Gemma 3 4B IT",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!1,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:131072,maxTokens:16384},"meta/llama-3.1-70b-instruct":{id:"meta/llama-3.1-70b-instruct",name:"Llama 3.1 70b Instruct",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!1,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:128e3,maxTokens:4096},"meta/llama-3.1-8b-instruct":{id:"meta/llama-3.1-8b-instruct",name:"Llama 3.1 8B Instruct",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!1,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:16e3,maxTokens:4096},"meta/llama-3.2-11b-vision-instruct":{id:"meta/llama-3.2-11b-vision-instruct",name:"Llama 3.2 11b Vision Instruct",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!1,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:128e3,maxTokens:4096},"meta/llama-3.2-90b-vision-instruct":{id:"meta/llama-3.2-90b-vision-instruct",name:"Llama-3.2-90B-Vision-Instruct",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!1,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:128e3,maxTokens:8192},"meta/llama-3.3-70b-instruct":{id:"meta/llama-3.3-70b-instruct",name:"Llama 3.3 70b Instruct",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!1,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:128e3,maxTokens:4096},"minimaxai/minimax-m3":{id:"minimaxai/minimax-m3",name:"MiniMax-M3",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:1e6,maxTokens:16384},"mistralai/mistral-7b-instruct-v0.3":{id:"mistralai/mistral-7b-instruct-v0.3",name:"Mistral-7B-Instruct-v0.3",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!1,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:65536,maxTokens:65536},"moonshotai/kimi-k2.6":{id:"moonshotai/kimi-k2.6",name:"Kimi K2.6",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:262144,maxTokens:262144},"nvidia/cosmos-reason2-8b":{id:"nvidia/cosmos-reason2-8b",name:"Cosmos Reason2 8B",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:131072,maxTokens:16384},"nvidia/llama-3.1-nemotron-70b-instruct":{id:"nvidia/llama-3.1-nemotron-70b-instruct",name:"Llama 3.1 Nemotron 70B Instruct",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!1,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:128e3,maxTokens:8192},"nvidia/llama-3.1-nemotron-nano-8b-v1":{id:"nvidia/llama-3.1-nemotron-nano-8b-v1",name:"Llama 3.1 Nemotron Nano 8B v1",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:131072,maxTokens:16384},"nvidia/llama-3.1-nemotron-nano-vl-8b-v1":{id:"nvidia/llama-3.1-nemotron-nano-vl-8b-v1",name:"Llama 3.1 Nemotron Nano VL 8B v1",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:32768,maxTokens:16384},"nvidia/llama-3.1-nemotron-ultra-253b-v1":{id:"nvidia/llama-3.1-nemotron-ultra-253b-v1",name:"Llama 3.1 Nemotron Ultra 253B",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:128e3,maxTokens:16384},"nvidia/llama-3.3-nemotron-super-49b-v1":{id:"nvidia/llama-3.3-nemotron-super-49b-v1",name:"Llama 3.3 Nemotron Super 49B v1",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:131072,maxTokens:65536},"nvidia/llama-3.3-nemotron-super-49b-v1.5":{id:"nvidia/llama-3.3-nemotron-super-49b-v1.5",name:"Llama 3.3 Nemotron Super 49B v1.5",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:131072,maxTokens:65536},"nvidia/nemotron-3-nano-30b-a3b":{id:"nvidia/nemotron-3-nano-30b-a3b",name:"nemotron-3-nano-30b-a3b",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:131072,maxTokens:131072},"nvidia/nemotron-3-nano-omni-30b-a3b-reasoning":{id:"nvidia/nemotron-3-nano-omni-30b-a3b-reasoning",name:"Nemotron 3 Nano Omni",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:256e3,maxTokens:65536},"nvidia/nemotron-3-super-120b-a12b":{id:"nvidia/nemotron-3-super-120b-a12b",name:"Nemotron 3 Super",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!0,input:["text"],cost:{input:.2,output:.8,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:262144,maxTokens:262144},"nvidia/nemotron-3-ultra-550b-a55b":{id:"nvidia/nemotron-3-ultra-550b-a55b",name:"Nemotron 3 Ultra 550B A55B",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!0,input:["text"],cost:{input:.5,output:2.5,cacheRead:.15,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:1e6,maxTokens:65536},"nvidia/nemotron-nano-12b-v2-vl":{id:"nvidia/nemotron-nano-12b-v2-vl",name:"Nemotron Nano 12B v2 VL",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:128e3,maxTokens:128e3},"nvidia/nvidia-nemotron-nano-9b-v2":{id:"nvidia/nvidia-nemotron-nano-9b-v2",name:"nvidia-nemotron-nano-9b-v2",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:131072,maxTokens:131072},"openai/gpt-oss-120b":{id:"openai/gpt-oss-120b",name:"GPT-OSS-120B",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:128e3,maxTokens:8192},"openai/gpt-oss-20b":{id:"openai/gpt-oss-20b",name:"GPT OSS 20B",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:131072,maxTokens:32768},"poolside/laguna-xs-2.1":{id:"poolside/laguna-xs-2.1",name:"Laguna XS 2.1",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:262144,maxTokens:16384},"stepfun-ai/step-3.7-flash":{id:"stepfun-ai/step-3.7-flash",name:"Step 3.7 Flash",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:256e3,maxTokens:16384},"thinkingmachines/inkling":{id:"thinkingmachines/inkling",name:"Inkling",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:1048576,maxTokens:16384},"z-ai/glm-5.2":{id:"z-ai/glm-5.2",name:"GLM-5.2",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:1e6,maxTokens:131072}}};var _1=J("nvidia",E1);var O1={"openai-responses":{"gpt-4":{id:"gpt-4",name:"GPT-4",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text"],cost:{input:30,output:60,cacheRead:0,cacheWrite:0},contextWindow:8192,maxTokens:8192,compat:{supportsStrictMode:!0}},"gpt-4-turbo":{id:"gpt-4-turbo",name:"GPT-4 Turbo",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text","image"],cost:{input:10,output:30,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096,compat:{supportsStrictMode:!0}},"gpt-4.1":{id:"gpt-4.1",name:"GPT-4.1",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text","image"],cost:{input:2,output:8,cacheRead:.5,cacheWrite:0},contextWindow:1047576,maxTokens:32768,compat:{supportsStrictMode:!0}},"gpt-4.1-mini":{id:"gpt-4.1-mini",name:"GPT-4.1 mini",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text","image"],cost:{input:.4,output:1.6,cacheRead:.1,cacheWrite:0},contextWindow:1047576,maxTokens:32768,compat:{supportsStrictMode:!0}},"gpt-4.1-nano":{id:"gpt-4.1-nano",name:"GPT-4.1 nano",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text","image"],cost:{input:.1,output:.4,cacheRead:.025,cacheWrite:0},contextWindow:1047576,maxTokens:32768,compat:{supportsStrictMode:!0}},"gpt-4o":{id:"gpt-4o",name:"GPT-4o",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text","image"],cost:{input:2.5,output:10,cacheRead:1.25,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{supportsStrictMode:!0}},"gpt-4o-2024-05-13":{id:"gpt-4o-2024-05-13",name:"GPT-4o (2024-05-13)",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text","image"],cost:{input:5,output:15,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096,compat:{supportsStrictMode:!0}},"gpt-4o-2024-08-06":{id:"gpt-4o-2024-08-06",name:"GPT-4o (2024-08-06)",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text","image"],cost:{input:2.5,output:10,cacheRead:1.25,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{supportsStrictMode:!0}},"gpt-4o-2024-11-20":{id:"gpt-4o-2024-11-20",name:"GPT-4o (2024-11-20)",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text","image"],cost:{input:2.5,output:10,cacheRead:1.25,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{supportsStrictMode:!0}},"gpt-4o-mini":{id:"gpt-4o-mini",name:"GPT-4o mini",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text","image"],cost:{input:.15,output:.6,cacheRead:.075,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{supportsStrictMode:!0}},"gpt-5":{id:"gpt-5",name:"GPT-5",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:"minimal",low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0}},"gpt-5-chat-latest":{id:"gpt-5-chat-latest",name:"GPT-5 Chat Latest",api:"openai-responses",baseUrl:"https://api.openai.com/v1",provider:"openai",reasoning:!1,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:0},contextWindow:128e3,maxTokens:16384,thinkingLevelMap:{off:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0}},"gpt-5-mini":{id:"gpt-5-mini",name:"GPT-5 Mini",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:.25,output:2,cacheRead:.025,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:"minimal",low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0}},"gpt-5-nano":{id:"gpt-5-nano",name:"GPT-5 Nano",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:.05,output:.4,cacheRead:.005,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:"minimal",low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0}},"gpt-5-pro":{id:"gpt-5-pro",name:"GPT-5 Pro",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:15,output:120,cacheRead:0,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:null,medium:null,high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0}},"gpt-5.1":{id:"gpt-5.1",name:"GPT-5.1",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0}},"gpt-5.2":{id:"gpt-5.2",name:"GPT-5.2",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0}},"gpt-5.2-chat-latest":{id:"gpt-5.2-chat-latest",name:"GPT-5.2 Chat",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:128e3,maxTokens:16384,thinkingLevelMap:{off:null,minimal:null,low:null,medium:"medium",high:null,xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0}},"gpt-5.2-pro":{id:"gpt-5.2-pro",name:"GPT-5.2 Pro",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:21,output:168,cacheRead:0,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:null,medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0}},"gpt-5.3-chat-latest":{id:"gpt-5.3-chat-latest",name:"GPT-5.3 Chat (latest)",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:128e3,maxTokens:16384,thinkingLevelMap:{off:null,xhigh:"xhigh"},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0}},"gpt-5.3-codex":{id:"gpt-5.3-codex",name:"GPT-5.3 Codex",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0}},"gpt-5.3-codex-spark":{id:"gpt-5.3-codex-spark",name:"GPT-5.3 Codex Spark",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:128e3,maxTokens:32e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0}},"gpt-5.4":{id:"gpt-5.4",name:"GPT-5.4",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:2.5,output:15,cacheRead:.25,cacheWrite:0,tiers:[{inputTokensAbove:272e3,input:5,output:22.5,cacheRead:.5,cacheWrite:0}]},contextWindow:272e3,maxTokens:128e3,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0}},"gpt-5.4-mini":{id:"gpt-5.4-mini",name:"GPT-5.4 mini",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:.75,output:4.5,cacheRead:.075,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0}},"gpt-5.4-nano":{id:"gpt-5.4-nano",name:"GPT-5.4 nano",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:.2,output:1.25,cacheRead:.02,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0}},"gpt-5.4-pro":{id:"gpt-5.4-pro",name:"GPT-5.4 Pro",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:30,output:180,cacheRead:0,cacheWrite:0,tiers:[{inputTokensAbove:272e3,input:60,output:270,cacheRead:0,cacheWrite:0}]},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:null,medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0}},"gpt-5.5":{id:"gpt-5.5",name:"GPT-5.5",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:0,tiers:[{inputTokensAbove:272e3,input:10,output:45,cacheRead:1,cacheWrite:0}]},contextWindow:272e3,maxTokens:128e3,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0}},"gpt-5.5-pro":{id:"gpt-5.5-pro",name:"GPT-5.5 Pro",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:30,output:180,cacheRead:0,cacheWrite:0,tiers:[{inputTokensAbove:272e3,input:60,output:270,cacheRead:0,cacheWrite:0}]},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:null,medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0}},"gpt-5.6-luna":{id:"gpt-5.6-luna",name:"GPT-5.6 Luna",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:.2,output:1.2,cacheRead:.02,cacheWrite:.25,tiers:[{inputTokensAbove:272e3,input:.4,output:1.8,cacheRead:.04,cacheWrite:.5}]},contextWindow:272e3,maxTokens:128e3,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0,supportsExplicitPromptCacheMode:!0}},"gpt-5.6-sol":{id:"gpt-5.6-sol",name:"GPT-5.6 Sol",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:6.25,tiers:[{inputTokensAbove:272e3,input:10,output:45,cacheRead:1,cacheWrite:12.5}]},contextWindow:272e3,maxTokens:128e3,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0,supportsExplicitPromptCacheMode:!0}},"gpt-5.6-terra":{id:"gpt-5.6-terra",name:"GPT-5.6 Terra",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:2,output:12,cacheRead:.2,cacheWrite:2.5,tiers:[{inputTokensAbove:272e3,input:4,output:18,cacheRead:.4,cacheWrite:5}]},contextWindow:272e3,maxTokens:128e3,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0,supportsExplicitPromptCacheMode:!0}},"gpt-realtime-2.1":{id:"gpt-realtime-2.1",name:"GPT-Realtime-2.1",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:4,output:24,cacheRead:.4,cacheWrite:0},contextWindow:128e3,maxTokens:32e3,thinkingLevelMap:{off:null,minimal:"minimal",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0}},o1:{id:"o1",name:"o1",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:15,output:60,cacheRead:7.5,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0}},"o1-pro":{id:"o1-pro",name:"o1-pro",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:150,output:600,cacheRead:0,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0}},o3:{id:"o3",name:"o3",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:2,output:8,cacheRead:.5,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0}},"o3-mini":{id:"o3-mini",name:"o3-mini",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text"],cost:{input:1.1,output:4.4,cacheRead:.55,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0}},"o3-pro":{id:"o3-pro",name:"o3-pro",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:20,output:80,cacheRead:0,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0}},"o4-mini":{id:"o4-mini",name:"o4-mini",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:1.1,output:4.4,cacheRead:.275,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0}}}};var L1=J("openai",O1);var W1={"openai-codex-responses":{"gpt-5.3-codex-spark":{id:"gpt-5.3-codex-spark",name:"GPT-5.3 Codex Spark",api:"openai-codex-responses",provider:"openai-codex",baseUrl:"https://chatgpt.com/backend-api",reasoning:!0,input:["text"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:128e3,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",minimal:"low"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.4":{id:"gpt-5.4",name:"GPT-5.4",api:"openai-codex-responses",provider:"openai-codex",baseUrl:"https://chatgpt.com/backend-api",reasoning:!0,input:["text","image"],cost:{input:2.5,output:15,cacheRead:.25,cacheWrite:0,tiers:[{inputTokensAbove:272e3,input:5,output:22.5,cacheRead:.5,cacheWrite:0}]},contextWindow:272e3,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",minimal:"low"},compat:{supportsOpenAIGrammarTools:!0,supportsToolSearch:!0}},"gpt-5.4-mini":{id:"gpt-5.4-mini",name:"GPT-5.4 mini",api:"openai-codex-responses",provider:"openai-codex",baseUrl:"https://chatgpt.com/backend-api",reasoning:!0,input:["text","image"],cost:{input:.75,output:4.5,cacheRead:.075,cacheWrite:0},contextWindow:272e3,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",minimal:"low"},compat:{supportsOpenAIGrammarTools:!0,supportsToolSearch:!0}},"gpt-5.5":{id:"gpt-5.5",name:"GPT-5.5",api:"openai-codex-responses",provider:"openai-codex",baseUrl:"https://chatgpt.com/backend-api",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:0,tiers:[{inputTokensAbove:272e3,input:10,output:45,cacheRead:1,cacheWrite:0}]},contextWindow:272e3,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",minimal:"low"},compat:{supportsOpenAIGrammarTools:!0,supportsToolSearch:!0}},"gpt-5.6-luna":{id:"gpt-5.6-luna",name:"GPT-5.6 Luna",api:"openai-codex-responses",provider:"openai-codex",baseUrl:"https://chatgpt.com/backend-api",reasoning:!0,input:["text","image"],cost:{input:.2,output:1.2,cacheRead:.02,cacheWrite:.25,tiers:[{inputTokensAbove:272e3,input:.4,output:1.8,cacheRead:.04,cacheWrite:.5}]},contextWindow:272e3,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max",minimal:"low"},compat:{supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0}},"gpt-5.6-sol":{id:"gpt-5.6-sol",name:"GPT-5.6 Sol",api:"openai-codex-responses",provider:"openai-codex",baseUrl:"https://chatgpt.com/backend-api",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:6.25,tiers:[{inputTokensAbove:272e3,input:10,output:45,cacheRead:1,cacheWrite:12.5}]},contextWindow:272e3,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max",minimal:"low"},compat:{supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0}},"gpt-5.6-terra":{id:"gpt-5.6-terra",name:"GPT-5.6 Terra",api:"openai-codex-responses",provider:"openai-codex",baseUrl:"https://chatgpt.com/backend-api",reasoning:!0,input:["text","image"],cost:{input:2,output:12,cacheRead:.2,cacheWrite:2.5,tiers:[{inputTokensAbove:272e3,input:4,output:18,cacheRead:.4,cacheWrite:5}]},contextWindow:272e3,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max",minimal:"low"},compat:{supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0}}}};var F1=J("openai-codex",W1);var D1={"anthropic-messages":{"claude-fable-5":{id:"claude-fable-5",name:"Claude Fable 5",api:"anthropic-messages",provider:"opencode",baseUrl:"https://opencode.ai/zen",reasoning:!0,input:["text","image"],cost:{input:10,output:50,cacheRead:1,cacheWrite:12.5},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{off:null,xhigh:"xhigh",max:"max"},compat:{forceAdaptiveThinking:!0}},"claude-haiku-4-5":{id:"claude-haiku-4-5",name:"Claude Haiku 4.5",api:"anthropic-messages",provider:"opencode",baseUrl:"https://opencode.ai/zen",reasoning:!0,input:["text","image"],cost:{input:1,output:5,cacheRead:.1,cacheWrite:1.25},contextWindow:2e5,maxTokens:64e3},"claude-opus-4-5":{id:"claude-opus-4-5",name:"Claude Opus 4.5",api:"anthropic-messages",provider:"opencode",baseUrl:"https://opencode.ai/zen",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:2e5,maxTokens:64e3},"claude-opus-4-6":{id:"claude-opus-4-6",name:"Claude Opus 4.6",api:"anthropic-messages",provider:"opencode",baseUrl:"https://opencode.ai/zen",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{max:"max"},compat:{forceAdaptiveThinking:!0}},"claude-opus-4-7":{id:"claude-opus-4-7",name:"Claude Opus 4.7",api:"anthropic-messages",provider:"opencode",baseUrl:"https://opencode.ai/zen",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"},compat:{forceAdaptiveThinking:!0,supportsTemperature:!1}},"claude-opus-4-8":{id:"claude-opus-4-8",name:"Claude Opus 4.8",api:"anthropic-messages",provider:"opencode",baseUrl:"https://opencode.ai/zen",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"},compat:{forceAdaptiveThinking:!0,supportsTemperature:!1}},"claude-opus-5":{id:"claude-opus-5",name:"Claude Opus 5",api:"anthropic-messages",provider:"opencode",baseUrl:"https://opencode.ai/zen",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"},compat:{forceAdaptiveThinking:!0,supportsTemperature:!1}},"claude-sonnet-4":{id:"claude-sonnet-4",name:"Claude Sonnet 4",api:"anthropic-messages",provider:"opencode",baseUrl:"https://opencode.ai/zen",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:2e5,maxTokens:64e3},"claude-sonnet-4-5":{id:"claude-sonnet-4-5",name:"Claude Sonnet 4.5",api:"anthropic-messages",provider:"opencode",baseUrl:"https://opencode.ai/zen",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:2e5,maxTokens:64e3},"claude-sonnet-4-6":{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6",api:"anthropic-messages",provider:"opencode",baseUrl:"https://opencode.ai/zen",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:1e6,maxTokens:64e3,thinkingLevelMap:{max:"max"},compat:{forceAdaptiveThinking:!0}},"claude-sonnet-5":{id:"claude-sonnet-5",name:"Claude Sonnet 5",api:"anthropic-messages",provider:"opencode",baseUrl:"https://opencode.ai/zen",reasoning:!0,input:["text","image"],cost:{input:2,output:10,cacheRead:.2,cacheWrite:2.5},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"},compat:{forceAdaptiveThinking:!0}},"qwen3.5-plus":{id:"qwen3.5-plus",name:"Qwen3.5 Plus",api:"anthropic-messages",provider:"opencode",baseUrl:"https://opencode.ai/zen",reasoning:!0,input:["text","image"],cost:{input:.2,output:1.2,cacheRead:.02,cacheWrite:.25},contextWindow:262144,maxTokens:65536},"qwen3.6-plus":{id:"qwen3.6-plus",name:"Qwen3.6 Plus",api:"anthropic-messages",provider:"opencode",baseUrl:"https://opencode.ai/zen",reasoning:!0,input:["text","image"],cost:{input:.5,output:3,cacheRead:.05,cacheWrite:.625},contextWindow:262144,maxTokens:65536}},"google-generative-ai":{"gemini-3-flash":{id:"gemini-3-flash",name:"Gemini 3 Flash",api:"google-generative-ai",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:.5,output:3,cacheRead:.05,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null}},"gemini-3.1-pro":{id:"gemini-3.1-pro",name:"Gemini 3.1 Pro Preview",api:"google-generative-ai",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:2,output:12,cacheRead:.2,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null,minimal:null,low:"LOW",medium:null,high:"HIGH"}},"gemini-3.5-flash":{id:"gemini-3.5-flash",name:"Gemini 3.5 Flash",api:"google-generative-ai",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:1.5,output:9,cacheRead:.15,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null}},"gemini-3.5-flash-lite":{id:"gemini-3.5-flash-lite",name:"Gemini 3.5 Flash Lite",api:"google-generative-ai",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:.3,output:2.5,cacheRead:.03,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null}},"gemini-3.6-flash":{id:"gemini-3.6-flash",name:"Gemini 3.6 Flash",api:"google-generative-ai",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:1.5,output:7.5,cacheRead:.15,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null}}},"openai-completions":{"big-pickle":{id:"big-pickle",name:"Big Pickle",api:"openai-completions",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:2e5,maxTokens:32e3},"deepseek-v4-flash":{id:"deepseek-v4-flash",name:"DeepSeek V4 Flash",api:"openai-completions",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text"],cost:{input:.14,output:.28,cacheRead:.028,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens",supportsLongCacheRetention:!1,requiresReasoningContentOnAssistantMessages:!0},contextWindow:1e6,maxTokens:384e3,thinkingLevelMap:{off:null,minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"}},"deepseek-v4-flash-free":{id:"deepseek-v4-flash-free",name:"DeepSeek V4 Flash Free",api:"openai-completions",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens",requiresReasoningContentOnAssistantMessages:!0},contextWindow:2e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"}},"deepseek-v4-pro":{id:"deepseek-v4-pro",name:"DeepSeek V4 Pro",api:"openai-completions",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text"],cost:{input:1.74,output:3.84,cacheRead:.145,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens",supportsLongCacheRetention:!1,requiresReasoningContentOnAssistantMessages:!0},contextWindow:1e6,maxTokens:384e3,thinkingLevelMap:{off:null,minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"}},"glm-5":{id:"glm-5",name:"GLM-5",api:"openai-completions",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text"],cost:{input:1,output:3.2,cacheRead:.2,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:204800,maxTokens:131072},"glm-5.1":{id:"glm-5.1",name:"GLM-5.1",api:"openai-completions",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text"],cost:{input:1.4,output:4.4,cacheRead:.26,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:204800,maxTokens:131072},"glm-5.2":{id:"glm-5.2",name:"GLM-5.2",api:"openai-completions",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text"],cost:{input:1.4,output:4.4,cacheRead:.26,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:1e6,maxTokens:131072,thinkingLevelMap:{off:null,minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"}},"kimi-k2.5":{id:"kimi-k2.5",name:"Kimi K2.5",api:"openai-completions",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:.6,output:3,cacheRead:.08,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens",supportsLongCacheRetention:!1},contextWindow:262144,maxTokens:65536},"kimi-k2.6":{id:"kimi-k2.6",name:"Kimi K2.6",api:"openai-completions",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:.16,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,thinkingFormat:"deepseek",supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsLongCacheRetention:!1},contextWindow:262144,maxTokens:65536},"kimi-k2.7-code":{id:"kimi-k2.7-code",name:"Kimi K2.7 Code",api:"openai-completions",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:.19,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:262144,maxTokens:262144},"kimi-k3":{id:"kimi-k3",name:"Kimi K3",api:"openai-completions",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:1048576,maxTokens:131072,thinkingLevelMap:{off:null,minimal:null,low:null,medium:null,high:null,xhigh:null,max:"max"}},"laguna-s-2.1-free":{id:"laguna-s-2.1-free",name:"Laguna S 2.1 Free",api:"openai-completions",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:256e3,maxTokens:32e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"ling-3.0-tiny-free":{id:"ling-3.0-tiny-free",name:"Ling-3.0-tiny Free",api:"openai-completions",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:262144,maxTokens:32768},"longcat-2.0-free":{id:"longcat-2.0-free",name:"LongCat-2.0 Free",api:"openai-completions",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:1e6,maxTokens:131072},"mimo-v2.5-free":{id:"mimo-v2.5-free",name:"MiMo V2.5 Free",api:"openai-completions",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:2e5,maxTokens:32e3},"minimax-m2.5":{id:"minimax-m2.5",name:"MiniMax-M2.5",api:"openai-completions",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:204800,maxTokens:131072},"minimax-m2.7":{id:"minimax-m2.7",name:"MiniMax-M2.7",api:"openai-completions",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens",supportsLongCacheRetention:!1},contextWindow:204800,maxTokens:131072},"minimax-m3":{id:"minimax-m3",name:"MiniMax-M3",api:"openai-completions",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:512e3,maxTokens:128e3},"nemotron-3-ultra-free":{id:"nemotron-3-ultra-free",name:"Nemotron 3 Ultra Free",api:"openai-completions",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:1e6,maxTokens:128e3}},"openai-responses":{"gpt-5":{id:"gpt-5",name:"GPT-5",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:1.07,output:8.5,cacheRead:.107,cacheWrite:0},compat:{sessionAffinityFormat:"openai-nosession",supportsOpenAIGrammarTools:!0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:"minimal",low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"gpt-5-codex":{id:"gpt-5-codex",name:"GPT-5 Codex",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:1.07,output:8.5,cacheRead:.107,cacheWrite:0},compat:{sessionAffinityFormat:"openai-nosession",supportsOpenAIGrammarTools:!0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"gpt-5-nano":{id:"gpt-5-nano",name:"GPT-5 Nano",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:.05,output:.4,cacheRead:.005,cacheWrite:0},compat:{sessionAffinityFormat:"openai-nosession",supportsOpenAIGrammarTools:!0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:"minimal",low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"gpt-5.1":{id:"gpt-5.1",name:"GPT-5.1",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:1.07,output:8.5,cacheRead:.107,cacheWrite:0},compat:{sessionAffinityFormat:"openai-nosession",supportsOpenAIGrammarTools:!0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"gpt-5.1-codex":{id:"gpt-5.1-codex",name:"GPT-5.1 Codex",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:1.07,output:8.5,cacheRead:.107,cacheWrite:0},compat:{sessionAffinityFormat:"openai-nosession",supportsOpenAIGrammarTools:!0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"gpt-5.1-codex-max":{id:"gpt-5.1-codex-max",name:"GPT-5.1 Codex Max",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:0},compat:{sessionAffinityFormat:"openai-nosession",supportsOpenAIGrammarTools:!0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null}},"gpt-5.1-codex-mini":{id:"gpt-5.1-codex-mini",name:"GPT-5.1 Codex Mini",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:.25,output:2,cacheRead:.025,cacheWrite:0},compat:{sessionAffinityFormat:"openai-nosession",supportsOpenAIGrammarTools:!0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"gpt-5.2":{id:"gpt-5.2",name:"GPT-5.2",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},compat:{sessionAffinityFormat:"openai-nosession",supportsOpenAIGrammarTools:!0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null}},"gpt-5.2-codex":{id:"gpt-5.2-codex",name:"GPT-5.2 Codex",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},compat:{sessionAffinityFormat:"openai-nosession",supportsOpenAIGrammarTools:!0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null}},"gpt-5.3-codex":{id:"gpt-5.3-codex",name:"GPT-5.3 Codex",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},compat:{sessionAffinityFormat:"openai-nosession",supportsOpenAIGrammarTools:!0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null}},"gpt-5.4":{id:"gpt-5.4",name:"GPT-5.4",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:2.5,output:15,cacheRead:.25,cacheWrite:0},compat:{sessionAffinityFormat:"openai-nosession",supportsOpenAIGrammarTools:!0},contextWindow:272e3,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null}},"gpt-5.4-mini":{id:"gpt-5.4-mini",name:"GPT-5.4 Mini",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:.75,output:4.5,cacheRead:.075,cacheWrite:0},compat:{sessionAffinityFormat:"openai-nosession",supportsOpenAIGrammarTools:!0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null}},"gpt-5.4-nano":{id:"gpt-5.4-nano",name:"GPT-5.4 Nano",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:.2,output:1.25,cacheRead:.02,cacheWrite:0},compat:{sessionAffinityFormat:"openai-nosession",supportsOpenAIGrammarTools:!0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null}},"gpt-5.4-pro":{id:"gpt-5.4-pro",name:"GPT-5.4 Pro",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:30,output:180,cacheRead:30,cacheWrite:0},compat:{sessionAffinityFormat:"openai-nosession",supportsOpenAIGrammarTools:!0},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:null,medium:"medium",high:"high",xhigh:"xhigh",max:null}},"gpt-5.5":{id:"gpt-5.5",name:"GPT-5.5",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:0},compat:{sessionAffinityFormat:"openai-nosession",supportsOpenAIGrammarTools:!0},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null}},"gpt-5.5-pro":{id:"gpt-5.5-pro",name:"GPT-5.5 Pro",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:30,output:180,cacheRead:30,cacheWrite:0},compat:{sessionAffinityFormat:"openai-nosession",supportsOpenAIGrammarTools:!0},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:null,medium:"medium",high:"high",xhigh:"xhigh",max:null}},"gpt-5.6-luna":{id:"gpt-5.6-luna",name:"GPT-5.6 Luna",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:.2,output:1.2,cacheRead:.02,cacheWrite:.25},compat:{sessionAffinityFormat:"openai-nosession",supportsOpenAIGrammarTools:!0},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"}},"gpt-5.6-sol":{id:"gpt-5.6-sol",name:"GPT-5.6 Sol",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:6.25},compat:{sessionAffinityFormat:"openai-nosession",supportsOpenAIGrammarTools:!0},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"}},"gpt-5.6-terra":{id:"gpt-5.6-terra",name:"GPT-5.6 Terra",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:2.5,output:15,cacheRead:.25,cacheWrite:3.125},compat:{sessionAffinityFormat:"openai-nosession",supportsOpenAIGrammarTools:!0},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"}},"grok-4.5":{id:"grok-4.5",name:"Grok 4.5",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:2,output:6,cacheRead:.5,cacheWrite:0},compat:{sessionAffinityFormat:"openai-nosession"},contextWindow:5e5,maxTokens:5e5,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"grok-build-0.1":{id:"grok-build-0.1",name:"Grok Build 0.1",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:1,output:2,cacheRead:.2,cacheWrite:0},compat:{sessionAffinityFormat:"openai-nosession",supportsReasoningEffort:!1},contextWindow:256e3,maxTokens:256e3,thinkingLevelMap:{off:null,minimal:null,low:null,medium:null}}}};var U1=J("opencode",D1);var $1={"anthropic-messages":{"minimax-m3":{id:"minimax-m3",name:"MiniMax-M3",api:"anthropic-messages",provider:"opencode-go",baseUrl:"https://opencode.ai/zen/go",reasoning:!0,input:["text","image"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:0},contextWindow:1e6,maxTokens:131072},"qwen3.7-max":{id:"qwen3.7-max",name:"Qwen3.7 Max",api:"anthropic-messages",provider:"opencode-go",baseUrl:"https://opencode.ai/zen/go",reasoning:!0,input:["text"],cost:{input:2.5,output:7.5,cacheRead:.5,cacheWrite:3.125},contextWindow:1e6,maxTokens:65536},"qwen3.7-plus":{id:"qwen3.7-plus",name:"Qwen3.7 Plus",api:"anthropic-messages",provider:"opencode-go",baseUrl:"https://opencode.ai/zen/go",reasoning:!0,input:["text","image"],cost:{input:.4,output:1.6,cacheRead:.04,cacheWrite:.5},contextWindow:1e6,maxTokens:65536},"qwen3.8-max":{id:"qwen3.8-max",name:"Qwen3.8 Max",api:"anthropic-messages",provider:"opencode-go",baseUrl:"https://opencode.ai/zen/go",reasoning:!0,input:["text","image"],cost:{input:2,output:6,cacheRead:.25,cacheWrite:2.5},contextWindow:1e6,maxTokens:131072}},"openai-completions":{"deepseek-v4-flash":{id:"deepseek-v4-flash",name:"DeepSeek V4 Flash (2x usage)",api:"openai-completions",provider:"opencode-go",baseUrl:"https://opencode.ai/zen/go/v1",reasoning:!0,input:["text"],cost:{input:.07,output:.14,cacheRead:.0014,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens",requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"deepseek"},contextWindow:1e6,maxTokens:384e3,thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",max:"max"}},"deepseek-v4-pro":{id:"deepseek-v4-pro",name:"DeepSeek V4 Pro",api:"openai-completions",provider:"opencode-go",baseUrl:"https://opencode.ai/zen/go/v1",reasoning:!0,input:["text"],cost:{input:.435,output:.87,cacheRead:.003625,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens",requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"deepseek"},contextWindow:1e6,maxTokens:384e3,thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",max:"max"}},"glm-5.1":{id:"glm-5.1",name:"GLM-5.1",api:"openai-completions",provider:"opencode-go",baseUrl:"https://opencode.ai/zen/go/v1",reasoning:!0,input:["text"],cost:{input:1.4,output:4.4,cacheRead:.26,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:202752,maxTokens:32768},"glm-5.2":{id:"glm-5.2",name:"GLM-5.2",api:"openai-completions",provider:"opencode-go",baseUrl:"https://opencode.ai/zen/go/v1",reasoning:!0,input:["text"],cost:{input:1.4,output:4.4,cacheRead:.26,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:1e6,maxTokens:131072,thinkingLevelMap:{off:null,minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"}},hy3:{id:"hy3",name:"Hy3",api:"openai-completions",provider:"opencode-go",baseUrl:"https://opencode.ai/zen/go/v1",reasoning:!0,input:["text"],cost:{input:.14,output:.58,cacheRead:.035,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:256e3,maxTokens:64e3,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:null,high:"high",xhigh:null,max:null}},"kimi-k2.6":{id:"kimi-k2.6",name:"Kimi K2.6",api:"openai-completions",provider:"opencode-go",baseUrl:"https://opencode.ai/zen/go/v1",reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:.16,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,thinkingFormat:"deepseek",supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsLongCacheRetention:!1},contextWindow:262144,maxTokens:65536,thinkingLevelMap:{minimal:null,low:null,medium:null}},"kimi-k2.7-code":{id:"kimi-k2.7-code",name:"Kimi K2.7 Code",api:"openai-completions",provider:"opencode-go",baseUrl:"https://opencode.ai/zen/go/v1",reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:.19,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:262144,maxTokens:262144},"kimi-k3":{id:"kimi-k3",name:"Kimi K3",api:"openai-completions",provider:"opencode-go",baseUrl:"https://opencode.ai/zen/go/v1",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:1048576,maxTokens:131072,thinkingLevelMap:{off:null,minimal:null,low:null,medium:null,high:null,xhigh:null,max:"max"}},"mimo-v2.5":{id:"mimo-v2.5",name:"MiMo V2.5",api:"openai-completions",provider:"opencode-go",baseUrl:"https://opencode.ai/zen/go/v1",reasoning:!0,input:["text","image"],cost:{input:.14,output:.28,cacheRead:.0028,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:1e6,maxTokens:128e3},"mimo-v2.5-pro":{id:"mimo-v2.5-pro",name:"MiMo V2.5 Pro",api:"openai-completions",provider:"opencode-go",baseUrl:"https://opencode.ai/zen/go/v1",reasoning:!0,input:["text"],cost:{input:.435,output:.87,cacheRead:.003625,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:1048576,maxTokens:128e3},"minimax-m2.7":{id:"minimax-m2.7",name:"MiniMax-M2.7",api:"openai-completions",provider:"opencode-go",baseUrl:"https://opencode.ai/zen/go/v1",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:204800,maxTokens:131072},"qwen3.6-plus":{id:"qwen3.6-plus",name:"Qwen3.6 Plus",api:"openai-completions",provider:"opencode-go",baseUrl:"https://opencode.ai/zen/go/v1",reasoning:!0,input:["text","image"],cost:{input:.5,output:3,cacheRead:.05,cacheWrite:.625},compat:{supportsStore:!1,supportsDeveloperRole:!1,thinkingFormat:"qwen",maxTokensField:"max_tokens"},contextWindow:1e6,maxTokens:65536}},"openai-responses":{"gpt-5.6-luna":{id:"gpt-5.6-luna",name:"GPT-5.6 Luna (2x usage)",api:"openai-responses",provider:"opencode-go",baseUrl:"https://opencode.ai/zen/go/v1",reasoning:!0,input:["text","image"],cost:{input:.1,output:.6,cacheRead:.01,cacheWrite:.125},compat:{sessionAffinityFormat:"openai-nosession"},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"}},"grok-4.5":{id:"grok-4.5",name:"Grok 4.5",api:"openai-responses",provider:"opencode-go",baseUrl:"https://opencode.ai/zen/go/v1",reasoning:!0,input:["text","image"],cost:{input:2,output:6,cacheRead:.5,cacheWrite:0},compat:{sessionAffinityFormat:"openai-nosession"},contextWindow:5e5,maxTokens:5e5,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}}}};var N1=J("opencode-go",$1);var B1={"openai-completions":{"ai21/jamba-large-1.7":{id:"ai21/jamba-large-1.7",name:"AI21: Jamba Large 1.7",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:2,output:8,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"aion-labs/aion-2.0":{id:"aion-labs/aion-2.0",name:"AionLabs: Aion-2.0",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.8,output:1.6,cacheRead:.2,cacheWrite:0},contextWindow:131072,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"aion-labs/aion-3.0":{id:"aion-labs/aion-3.0",name:"AionLabs: Aion-3.0",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:3,output:6,cacheRead:.75,cacheWrite:0},contextWindow:131072,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"aion-labs/aion-3.0-mini":{id:"aion-labs/aion-3.0-mini",name:"AionLabs: Aion-3.0-Mini",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.7,output:1.4,cacheRead:.18,cacheWrite:0},contextWindow:131072,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"amazon/nova-2-lite-v1":{id:"amazon/nova-2-lite-v1",name:"Amazon: Nova 2 Lite",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.3,output:2.5,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:65535,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"amazon/nova-lite-v1":{id:"amazon/nova-lite-v1",name:"Amazon: Nova Lite 1.0",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.06,output:.24,cacheRead:0,cacheWrite:0},contextWindow:3e5,maxTokens:5120,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"amazon/nova-micro-v1":{id:"amazon/nova-micro-v1",name:"Amazon: Nova Micro 1.0",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.035,output:.14,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:5120,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"amazon/nova-premier-v1":{id:"amazon/nova-premier-v1",name:"Amazon: Nova Premier 1.0",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:2.5,output:12.5,cacheRead:.625,cacheWrite:0},contextWindow:1e6,maxTokens:32e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"amazon/nova-pro-v1":{id:"amazon/nova-pro-v1",name:"Amazon: Nova Pro 1.0",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.8,output:3.2,cacheRead:0,cacheWrite:0},contextWindow:3e5,maxTokens:5120,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"anthropic/claude-3-haiku":{id:"anthropic/claude-3-haiku",name:"Anthropic: Claude 3 Haiku",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.25,output:1.25,cacheRead:.03,cacheWrite:.3},contextWindow:2e5,maxTokens:4096,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"}},"anthropic/claude-fable-5":{id:"anthropic/claude-fable-5",name:"Anthropic: Claude Fable 5",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:10,output:50,cacheRead:1,cacheWrite:12.5},contextWindow:1e6,maxTokens:128e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"},thinkingLevelMap:{off:null,xhigh:"xhigh",max:"max"}},"anthropic/claude-fable-5:batch":{id:"anthropic/claude-fable-5:batch",name:"Anthropic: Claude Fable 5 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"},thinkingLevelMap:{off:null,xhigh:"xhigh",max:"max"}},"anthropic/claude-haiku-4.5":{id:"anthropic/claude-haiku-4.5",name:"Anthropic: Claude Haiku 4.5",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1,output:5,cacheRead:.1,cacheWrite:1.25},contextWindow:2e5,maxTokens:64e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"}},"anthropic/claude-haiku-4.5:batch":{id:"anthropic/claude-haiku-4.5:batch",name:"Anthropic: Claude Haiku 4.5 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.5,output:2.5,cacheRead:.05,cacheWrite:.625},contextWindow:2e5,maxTokens:64e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"}},"anthropic/claude-opus-4":{id:"anthropic/claude-opus-4",name:"Anthropic: Claude Opus 4",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:15,output:75,cacheRead:1.5,cacheWrite:18.75},contextWindow:2e5,maxTokens:32e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"}},"anthropic/claude-opus-4.1":{id:"anthropic/claude-opus-4.1",name:"Anthropic: Claude Opus 4.1",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:15,output:75,cacheRead:1.5,cacheWrite:18.75},contextWindow:2e5,maxTokens:32e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"}},"anthropic/claude-opus-4.1:batch":{id:"anthropic/claude-opus-4.1:batch",name:"Anthropic: Claude Opus 4.1 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:7.5,output:37.5,cacheRead:.75,cacheWrite:9.375},contextWindow:2e5,maxTokens:32e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"}},"anthropic/claude-opus-4.5":{id:"anthropic/claude-opus-4.5",name:"Anthropic: Claude Opus 4.5",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:2e5,maxTokens:64e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"}},"anthropic/claude-opus-4.5:batch":{id:"anthropic/claude-opus-4.5:batch",name:"Anthropic: Claude Opus 4.5 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:2.5,output:12.5,cacheRead:.25,cacheWrite:3.125},contextWindow:2e5,maxTokens:64e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"}},"anthropic/claude-opus-4.6":{id:"anthropic/claude-opus-4.6",name:"Anthropic: Claude Opus 4.6",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"},thinkingLevelMap:{max:"max"}},"anthropic/claude-opus-4.6:batch":{id:"anthropic/claude-opus-4.6:batch",name:"Anthropic: Claude Opus 4.6 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:2.5,output:12.5,cacheRead:.25,cacheWrite:3.125},contextWindow:1e6,maxTokens:128e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"},thinkingLevelMap:{max:"max"}},"anthropic/claude-opus-4.7":{id:"anthropic/claude-opus-4.7",name:"Anthropic: Claude Opus 4.7",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"anthropic/claude-opus-4.7-fast":{id:"anthropic/claude-opus-4.7-fast",name:"Anthropic: Claude Opus 4.7 (Fast)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:30,output:150,cacheRead:3,cacheWrite:37.5},contextWindow:1e6,maxTokens:128e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"anthropic/claude-opus-4.7:batch":{id:"anthropic/claude-opus-4.7:batch",name:"Anthropic: Claude Opus 4.7 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:2.5,output:12.5,cacheRead:.25,cacheWrite:3.125},contextWindow:1e6,maxTokens:128e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"anthropic/claude-opus-4.8":{id:"anthropic/claude-opus-4.8",name:"Anthropic: Claude Opus 4.8",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"anthropic/claude-opus-4.8-fast":{id:"anthropic/claude-opus-4.8-fast",name:"Anthropic: Claude Opus 4.8 (Fast)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:10,output:50,cacheRead:1,cacheWrite:12.5},contextWindow:1e6,maxTokens:128e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"anthropic/claude-opus-4.8:batch":{id:"anthropic/claude-opus-4.8:batch",name:"Anthropic: Claude Opus 4.8 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:2.5,output:12.5,cacheRead:.25,cacheWrite:3.125},contextWindow:1e6,maxTokens:128e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"anthropic/claude-opus-5":{id:"anthropic/claude-opus-5",name:"Claude Opus 5",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"anthropic/claude-opus-5-fast":{id:"anthropic/claude-opus-5-fast",name:"Claude Opus 5 (Fast)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:10,output:50,cacheRead:1,cacheWrite:12.5},contextWindow:1e6,maxTokens:128e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"anthropic/claude-opus-5:batch":{id:"anthropic/claude-opus-5:batch",name:"Claude Opus 5 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:2.5,output:12.5,cacheRead:.25,cacheWrite:3.125},contextWindow:1e6,maxTokens:128e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"anthropic/claude-sonnet-4":{id:"anthropic/claude-sonnet-4",name:"Anthropic: Claude Sonnet 4",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:2e5,maxTokens:64e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"}},"anthropic/claude-sonnet-4.5":{id:"anthropic/claude-sonnet-4.5",name:"Anthropic: Claude Sonnet 4.5",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:1e6,maxTokens:64e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"}},"anthropic/claude-sonnet-4.5:batch":{id:"anthropic/claude-sonnet-4.5:batch",name:"Anthropic: Claude Sonnet 4.5 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.5,output:7.5,cacheRead:.15,cacheWrite:1.875},contextWindow:1e6,maxTokens:64e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"}},"anthropic/claude-sonnet-4.6":{id:"anthropic/claude-sonnet-4.6",name:"Anthropic: Claude Sonnet 4.6",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:1e6,maxTokens:128e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"},thinkingLevelMap:{max:"max"}},"anthropic/claude-sonnet-4.6:batch":{id:"anthropic/claude-sonnet-4.6:batch",name:"Anthropic: Claude Sonnet 4.6 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.5,output:7.5,cacheRead:.15,cacheWrite:1.875},contextWindow:1e6,maxTokens:128e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"},thinkingLevelMap:{max:"max"}},"anthropic/claude-sonnet-5":{id:"anthropic/claude-sonnet-5",name:"Anthropic: Claude Sonnet 5",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:2,output:10,cacheRead:.2,cacheWrite:2.5},contextWindow:1e6,maxTokens:128e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"anthropic/claude-sonnet-5:batch":{id:"anthropic/claude-sonnet-5:batch",name:"Anthropic: Claude Sonnet 5 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1,output:5,cacheRead:.1,cacheWrite:1.25},contextWindow:1e6,maxTokens:128e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"arcee-ai/trinity-large-thinking":{id:"arcee-ai/trinity-large-thinking",name:"Arcee AI: Trinity Large Thinking",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.22,output:.85,cacheRead:.06,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"arcee-ai/virtuoso-large":{id:"arcee-ai/virtuoso-large",name:"Arcee AI: Virtuoso Large",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.75,output:1.2,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:64e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},auto:{id:"auto",name:"Auto",api:"openai-completions",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:2e6,maxTokens:3e4,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"bytedance-seed/seed-1.6":{id:"bytedance-seed/seed-1.6",name:"ByteDance Seed: Seed 1.6",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.25,output:2,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"bytedance-seed/seed-1.6-flash":{id:"bytedance-seed/seed-1.6-flash",name:"ByteDance Seed: Seed 1.6 Flash",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.075,output:.3,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"bytedance-seed/seed-2.0-lite":{id:"bytedance-seed/seed-2.0-lite",name:"ByteDance Seed: Seed-2.0-Lite",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.25,output:2,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"bytedance-seed/seed-2.0-mini":{id:"bytedance-seed/seed-2.0-mini",name:"ByteDance Seed: Seed-2.0-Mini",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.1,output:.4,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"cohere/command-r-08-2024":{id:"cohere/command-r-08-2024",name:"Cohere: Command R (08-2024)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.15,output:.6,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"cohere/command-r-plus-08-2024":{id:"cohere/command-r-plus-08-2024",name:"Cohere: Command R+ (08-2024)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:2.5,output:10,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"cohere/north-mini-code:free":{id:"cohere/north-mini-code:free",name:"Cohere: North Mini Code (free)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:64e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"deepseek/deepseek-chat":{id:"deepseek/deepseek-chat",name:"DeepSeek: DeepSeek V3",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.2574,output:1.0287,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:16e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"deepseek/deepseek-chat-v3-0324":{id:"deepseek/deepseek-chat-v3-0324",name:"DeepSeek: DeepSeek V3 0324",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.27,output:1.12,cacheRead:.135,cacheWrite:0},contextWindow:163840,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"deepseek/deepseek-chat-v3.1":{id:"deepseek/deepseek-chat-v3.1",name:"DeepSeek: DeepSeek V3.1",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.25,output:.95,cacheRead:.13,cacheWrite:0},contextWindow:163840,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"deepseek/deepseek-r1":{id:"deepseek/deepseek-r1",name:"DeepSeek: R1",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.7,output:2.5,cacheRead:0,cacheWrite:0},contextWindow:64e3,maxTokens:16e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"deepseek/deepseek-r1-0528":{id:"deepseek/deepseek-r1-0528",name:"DeepSeek: R1 0528",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.5,output:2.15,cacheRead:.35,cacheWrite:0},contextWindow:163840,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"deepseek/deepseek-v3.1-terminus":{id:"deepseek/deepseek-v3.1-terminus",name:"DeepSeek: DeepSeek V3.1 Terminus",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.27,output:1,cacheRead:.135,cacheWrite:0},contextWindow:131072,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"deepseek/deepseek-v3.2":{id:"deepseek/deepseek-v3.2",name:"DeepSeek: DeepSeek V3.2",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.269,output:.4,cacheRead:.1345,cacheWrite:0},contextWindow:163840,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"deepseek/deepseek-v3.2-exp":{id:"deepseek/deepseek-v3.2-exp",name:"DeepSeek: DeepSeek V3.2 Exp",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.27,output:.41,cacheRead:0,cacheWrite:0},contextWindow:163840,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"deepseek/deepseek-v4-flash":{id:"deepseek/deepseek-v4-flash",name:"DeepSeek: DeepSeek V4 Flash 0423",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.14,output:.28,cacheRead:.028,cacheWrite:0},contextWindow:1048576,maxTokens:393216,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter",requiresReasoningContentOnAssistantMessages:!0},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",max:null,xhigh:"xhigh"}},"deepseek/deepseek-v4-flash-0731":{id:"deepseek/deepseek-v4-flash-0731",name:"DeepSeek: DeepSeek V4 Flash 0731",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.08,output:.18,cacheRead:.016,cacheWrite:0},contextWindow:1048576,maxTokens:384e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter",requiresReasoningContentOnAssistantMessages:!0},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",max:null,xhigh:"xhigh"}},"deepseek/deepseek-v4-pro":{id:"deepseek/deepseek-v4-pro",name:"DeepSeek: DeepSeek V4 Pro",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.6864,output:1.3728,cacheRead:.057915,cacheWrite:0},contextWindow:1048576,maxTokens:393216,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter",requiresReasoningContentOnAssistantMessages:!0},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",max:null,xhigh:"xhigh"}},"google/gemini-2.5-flash":{id:"google/gemini-2.5-flash",name:"Google: Gemini 2.5 Flash",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.3,output:2.5,cacheRead:.03,cacheWrite:.083333},contextWindow:1048576,maxTokens:65535,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-2.5-flash-lite":{id:"google/gemini-2.5-flash-lite",name:"Google: Gemini 2.5 Flash Lite",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.1,output:.4,cacheRead:.01,cacheWrite:.083333},contextWindow:1048576,maxTokens:65535,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-2.5-flash-lite:batch":{id:"google/gemini-2.5-flash-lite:batch",name:"Google: Gemini 2.5 Flash Lite (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.05,output:.2,cacheRead:.01,cacheWrite:0},contextWindow:1048576,maxTokens:65535,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-2.5-flash:batch":{id:"google/gemini-2.5-flash:batch",name:"Google: Gemini 2.5 Flash (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.15,output:1.25,cacheRead:.03,cacheWrite:0},contextWindow:1048576,maxTokens:65535,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-2.5-pro":{id:"google/gemini-2.5-pro",name:"Google: Gemini 2.5 Pro",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:.375},contextWindow:1048576,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-2.5-pro-preview":{id:"google/gemini-2.5-pro-preview",name:"Google: Gemini 2.5 Pro Preview 06-05",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:.375},contextWindow:1048576,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-2.5-pro-preview-05-06":{id:"google/gemini-2.5-pro-preview-05-06",name:"Google: Gemini 2.5 Pro Preview 05-06",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:.375},contextWindow:1048576,maxTokens:65535,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-2.5-pro:batch":{id:"google/gemini-2.5-pro:batch",name:"Google: Gemini 2.5 Pro (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.625,output:5,cacheRead:.125,cacheWrite:0},contextWindow:1048576,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-3-flash-preview":{id:"google/gemini-3-flash-preview",name:"Google: Gemini 3 Flash Preview",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.5,output:3,cacheRead:.05,cacheWrite:.083333},contextWindow:1048576,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-3-flash-preview:batch":{id:"google/gemini-3-flash-preview:batch",name:"Google: Gemini 3 Flash Preview (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.25,output:1.5,cacheRead:0,cacheWrite:0},contextWindow:1048576,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-3-pro-image":{id:"google/gemini-3-pro-image",name:"Google: Nano Banana Pro (Gemini 3 Pro Image)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:2,output:12,cacheRead:.2,cacheWrite:.375},contextWindow:65536,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-3.1-flash-lite":{id:"google/gemini-3.1-flash-lite",name:"Google: Gemini 3.1 Flash Lite",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.25,output:1.5,cacheRead:.025,cacheWrite:.083333},contextWindow:1048576,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-3.1-flash-lite-preview":{id:"google/gemini-3.1-flash-lite-preview",name:"Google: Gemini 3.1 Flash Lite Preview",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.25,output:1.5,cacheRead:.025,cacheWrite:.083333},contextWindow:1048576,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-3.1-flash-lite:batch":{id:"google/gemini-3.1-flash-lite:batch",name:"Google: Gemini 3.1 Flash Lite (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.125,output:.75,cacheRead:.0125,cacheWrite:0},contextWindow:1048576,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-3.1-pro-preview":{id:"google/gemini-3.1-pro-preview",name:"Google: Gemini 3.1 Pro Preview",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:2,output:12,cacheRead:.2,cacheWrite:.375},contextWindow:1048576,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-3.1-pro-preview-customtools":{id:"google/gemini-3.1-pro-preview-customtools",name:"Google: Gemini 3.1 Pro Preview Custom Tools",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:2,output:12,cacheRead:.2,cacheWrite:.375},contextWindow:1048576,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-3.1-pro-preview:batch":{id:"google/gemini-3.1-pro-preview:batch",name:"Google: Gemini 3.1 Pro Preview (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1,output:6,cacheRead:0,cacheWrite:0},contextWindow:1048576,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-3.5-flash":{id:"google/gemini-3.5-flash",name:"Google: Gemini 3.5 Flash",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.5,output:9,cacheRead:.15,cacheWrite:.083333},contextWindow:1048576,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-3.5-flash-lite":{id:"google/gemini-3.5-flash-lite",name:"Google: Gemini 3.5 Flash Lite",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.3,output:2.5,cacheRead:.03,cacheWrite:.083333},contextWindow:1048576,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-3.5-flash-lite:batch":{id:"google/gemini-3.5-flash-lite:batch",name:"Google: Gemini 3.5 Flash Lite (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.15,output:1.25,cacheRead:.015,cacheWrite:0},contextWindow:1048576,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-3.5-flash:batch":{id:"google/gemini-3.5-flash:batch",name:"Google: Gemini 3.5 Flash (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.75,output:4.5,cacheRead:.075,cacheWrite:0},contextWindow:1048576,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-3.6-flash":{id:"google/gemini-3.6-flash",name:"Google: Gemini 3.6 Flash",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.5,output:7.5,cacheRead:.15,cacheWrite:.083333},contextWindow:1048576,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-3.6-flash:batch":{id:"google/gemini-3.6-flash:batch",name:"Google: Gemini 3.6 Flash (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.75,output:3.75,cacheRead:.075,cacheWrite:.083333},contextWindow:1048576,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemma-3-12b-it":{id:"google/gemma-3-12b-it",name:"Google: Gemma 3 12B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.05,output:.15,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:16384,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemma-3-27b-it":{id:"google/gemma-3-27b-it",name:"Google: Gemma 3 27B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.08,output:.45,cacheRead:.04,cacheWrite:0},contextWindow:131072,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemma-4-26b-a4b-it":{id:"google/gemma-4-26b-a4b-it",name:"Google: Gemma 4 26B A4B ",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.12,output:.4,cacheRead:.05,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemma-4-26b-a4b-it:free":{id:"google/gemma-4-26b-a4b-it:free",name:"Google: Gemma 4 26B A4B (free)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemma-4-31b-it":{id:"google/gemma-4-31b-it",name:"Google: Gemma 4 31B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.1,output:.34,cacheRead:.1,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemma-4-31b-it:free":{id:"google/gemma-4-31b-it:free",name:"Google: Gemma 4 31B (free)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"ibm-granite/granite-4.1-8b":{id:"ibm-granite/granite-4.1-8b",name:"IBM: Granite 4.1 8B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.05,output:.1,cacheRead:.05,cacheWrite:0},contextWindow:131072,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"inception/mercury-2":{id:"inception/mercury-2",name:"Inception: Mercury 2",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.25,output:.75,cacheRead:.025,cacheWrite:0},contextWindow:128e3,maxTokens:5e4,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"},thinkingLevelMap:{off:null}},"inclusionai/ling-2.6-1t":{id:"inclusionai/ling-2.6-1t",name:"inclusionAI: Ling-2.6-1T",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.075,output:.625,cacheRead:.015,cacheWrite:0},contextWindow:262144,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"inclusionai/ling-2.6-flash":{id:"inclusionai/ling-2.6-flash",name:"inclusionAI: Ling-2.6-flash",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.01,output:.03,cacheRead:.002,cacheWrite:0},contextWindow:262144,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"inclusionai/ling-3.0-flash":{id:"inclusionai/ling-3.0-flash",name:"Ling-3.0-flash",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.021,output:.063,cacheRead:.0042,cacheWrite:0},contextWindow:262144,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"inclusionai/ling-3.0-tiny:free":{id:"inclusionai/ling-3.0-tiny:free",name:"inclusionAI: Ling 3.0 Tiny (free)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"inclusionai/ring-2.6-1t":{id:"inclusionai/ring-2.6-1t",name:"inclusionAI: Ring-2.6-1T",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.075,output:.625,cacheRead:.015,cacheWrite:0},contextWindow:262144,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"kwaipilot/kat-coder-air-v2.5":{id:"kwaipilot/kat-coder-air-v2.5",name:"Kwaipilot: KAT-Coder-Air V2.5",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.15,output:.6,cacheRead:.03,cacheWrite:0},contextWindow:256e3,maxTokens:8e4,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"kwaipilot/kat-coder-pro-v2":{id:"kwaipilot/kat-coder-pro-v2",name:"Kwaipilot: KAT-Coder-Pro V2",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:0},contextWindow:256e3,maxTokens:8e4,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"kwaipilot/kat-coder-pro-v2.5":{id:"kwaipilot/kat-coder-pro-v2.5",name:"Kwaipilot: KAT-Coder-Pro V2.5",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.74,output:2.96,cacheRead:.15,cacheWrite:0},contextWindow:256e3,maxTokens:8e4,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"meituan/longcat-2.0":{id:"meituan/longcat-2.0",name:"Meituan: LongCat 2.0",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:.006,cacheWrite:0},contextWindow:1048756,maxTokens:262144,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"meta-llama/llama-3.1-70b-instruct":{id:"meta-llama/llama-3.1-70b-instruct",name:"Meta: Llama 3.1 70B Instruct",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.4,output:.4,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:16384,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"meta-llama/llama-3.1-8b-instruct":{id:"meta-llama/llama-3.1-8b-instruct",name:"Meta: Llama 3.1 8B Instruct",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.05,output:.08,cacheRead:.025,cacheWrite:0},contextWindow:131072,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"meta-llama/llama-3.3-70b-instruct":{id:"meta-llama/llama-3.3-70b-instruct",name:"Meta: Llama 3.3 70B Instruct",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.1,output:.32,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:16384,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"meta-llama/llama-4-maverick":{id:"meta-llama/llama-4-maverick",name:"Meta: Llama 4 Maverick",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.2,output:.696,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"meta-llama/llama-4-scout":{id:"meta-llama/llama-4-scout",name:"Meta: Llama 4 Scout",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.1,output:.3,cacheRead:0,cacheWrite:0},contextWindow:327680,maxTokens:16384,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"meta/muse-glimmer-30b":{id:"meta/muse-glimmer-30b",name:"Meta: Muse Glimmer 30B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.35,output:1.5,cacheRead:.04,cacheWrite:0},contextWindow:131072,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"meta/muse-spark-1.1":{id:"meta/muse-spark-1.1",name:"Meta: Muse Spark 1.1",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.25,output:4.25,cacheRead:.15,cacheWrite:0},contextWindow:1048576,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"meta/muse-spark-1.2":{id:"meta/muse-spark-1.2",name:"Meta: Muse Spark 1.2",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.25,output:4.25,cacheRead:.15,cacheWrite:0},contextWindow:1048576,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"minimax/minimax-m1":{id:"minimax/minimax-m1",name:"MiniMax: MiniMax M1",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.55,output:2.2,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:4e4,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"minimax/minimax-m2":{id:"minimax/minimax-m2",name:"MiniMax: MiniMax M2",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.255,output:1.02,cacheRead:0,cacheWrite:0},contextWindow:204800,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"minimax/minimax-m2.1":{id:"minimax/minimax-m2.1",name:"MiniMax: MiniMax M2.1",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:.03,cacheWrite:0},contextWindow:204800,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"minimax/minimax-m2.5":{id:"minimax/minimax-m2.5",name:"MiniMax: MiniMax M2.5",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.22,output:.9,cacheRead:.05,cacheWrite:0},contextWindow:196608,maxTokens:196608,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"minimax/minimax-m2.7":{id:"minimax/minimax-m2.7",name:"MiniMax: MiniMax M2.7",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:0},contextWindow:204800,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"minimax/minimax-m3":{id:"minimax/minimax-m3",name:"MiniMax: MiniMax M3",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:0},contextWindow:524288,maxTokens:512e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"minimax/minimax-m3:batch":{id:"minimax/minimax-m3:batch",name:"MiniMax: MiniMax M3 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.15,output:.6,cacheRead:.03,cacheWrite:0},contextWindow:524288,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"mistralai/codestral-2508":{id:"mistralai/codestral-2508",name:"Mistral: Codestral 2508",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.3,output:.9,cacheRead:.03,cacheWrite:0},contextWindow:256e3,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"mistralai/ministral-14b-2512":{id:"mistralai/ministral-14b-2512",name:"Mistral: Ministral 3 14B 2512",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.2,output:.2,cacheRead:.02,cacheWrite:0},contextWindow:262144,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"mistralai/ministral-3b-2512":{id:"mistralai/ministral-3b-2512",name:"Mistral: Ministral 3 3B 2512",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.1,output:.1,cacheRead:.01,cacheWrite:0},contextWindow:131072,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"mistralai/ministral-8b-2512":{id:"mistralai/ministral-8b-2512",name:"Mistral: Ministral 3 8B 2512",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.15,output:.15,cacheRead:.015,cacheWrite:0},contextWindow:262144,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"mistralai/mistral-large":{id:"mistralai/mistral-large",name:"Mistral Large",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:2,output:6,cacheRead:.2,cacheWrite:0},contextWindow:128e3,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"mistralai/mistral-large-2407":{id:"mistralai/mistral-large-2407",name:"Mistral Large 2407",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:2,output:6,cacheRead:.2,cacheWrite:0},contextWindow:131072,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"mistralai/mistral-large-2512":{id:"mistralai/mistral-large-2512",name:"Mistral: Mistral Large 3 2512",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.5,output:1.5,cacheRead:.05,cacheWrite:0},contextWindow:262144,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"mistralai/mistral-medium-3":{id:"mistralai/mistral-medium-3",name:"Mistral: Mistral Medium 3",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.4,output:2,cacheRead:.04,cacheWrite:0},contextWindow:131072,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"mistralai/mistral-medium-3-5":{id:"mistralai/mistral-medium-3-5",name:"Mistral: Mistral Medium 3.5",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.5,output:7.5,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"mistralai/mistral-medium-3.1":{id:"mistralai/mistral-medium-3.1",name:"Mistral: Mistral Medium 3.1",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.4,output:2,cacheRead:.04,cacheWrite:0},contextWindow:131072,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"mistralai/mistral-nemo":{id:"mistralai/mistral-nemo",name:"Mistral: Mistral Nemo",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.019,output:.03,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:16384,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"mistralai/mistral-saba":{id:"mistralai/mistral-saba",name:"Mistral: Saba",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.2,output:.6,cacheRead:.02,cacheWrite:0},contextWindow:32768,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"mistralai/mistral-small-2603":{id:"mistralai/mistral-small-2603",name:"Mistral: Mistral Small 4",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.15,output:.6,cacheRead:.015,cacheWrite:0},contextWindow:262144,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"mistralai/mistral-small-3.2-24b-instruct":{id:"mistralai/mistral-small-3.2-24b-instruct",name:"Mistral: Mistral Small 3.2 24B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.09375,output:.25,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:16384,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"mistralai/mixtral-8x22b-instruct":{id:"mistralai/mixtral-8x22b-instruct",name:"Mistral: Mixtral 8x22B Instruct",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:2,output:6,cacheRead:.2,cacheWrite:0},contextWindow:65536,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"mistralai/voxtral-small-24b-2507":{id:"mistralai/voxtral-small-24b-2507",name:"Mistral: Voxtral Small 24B 2507",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.1,output:.3,cacheRead:.01,cacheWrite:0},contextWindow:32e3,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"moonshotai/kimi-k2":{id:"moonshotai/kimi-k2",name:"MoonshotAI: Kimi K2 0711",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.57,output:2.3,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:100352,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"moonshotai/kimi-k2-0905":{id:"moonshotai/kimi-k2-0905",name:"MoonshotAI: Kimi K2 0905",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.6,output:2.5,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:100352,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"moonshotai/kimi-k2-thinking":{id:"moonshotai/kimi-k2-thinking",name:"MoonshotAI: Kimi K2 Thinking",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.6,output:2.5,cacheRead:.15,cacheWrite:0},contextWindow:262144,maxTokens:100352,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"moonshotai/kimi-k2.5":{id:"moonshotai/kimi-k2.5",name:"MoonshotAI: Kimi K2.5",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.41,output:2.06,cacheRead:.07,cacheWrite:0},contextWindow:262144,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"moonshotai/kimi-k2.6":{id:"moonshotai/kimi-k2.6",name:"MoonshotAI: Kimi K2.6",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:.16,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter",requiresReasoningContentOnAssistantMessages:!0}},"moonshotai/kimi-k2.7-code":{id:"moonshotai/kimi-k2.7-code",name:"MoonshotAI: Kimi K2.7 Code",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.7,output:3.5,cacheRead:.15,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"moonshotai/kimi-k2.7-code:batch":{id:"moonshotai/kimi-k2.7-code:batch",name:"MoonshotAI: Kimi K2.7 Code (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.475,output:2,cacheRead:.095,cacheWrite:0},contextWindow:262144,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"moonshotai/kimi-k3":{id:"moonshotai/kimi-k3",name:"MoonshotAI: Kimi K3",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:0},contextWindow:1048576,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"nex-agi/nex-n2-mini":{id:"nex-agi/nex-n2-mini",name:"Nex AGI: Nex-N2-Mini",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.025,output:.1,cacheRead:.0025,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"nex-agi/nex-n2-pro":{id:"nex-agi/nex-n2-pro",name:"Nex AGI: Nex-N2-Pro",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.25,output:1,cacheRead:.025,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"nvidia/nemotron-3-nano-30b-a3b":{id:"nvidia/nemotron-3-nano-30b-a3b",name:"NVIDIA: Nemotron 3 Nano 30B A3B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.05,output:.2,cacheRead:.025,cacheWrite:0},contextWindow:262144,maxTokens:228e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"nvidia/nemotron-3-nano-30b-a3b:free":{id:"nvidia/nemotron-3-nano-30b-a3b:free",name:"NVIDIA: Nemotron 3 Nano 30B A3B (free)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free":{id:"nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free",name:"NVIDIA: Nemotron 3 Nano Omni (free)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"nvidia/nemotron-3-super-120b-a12b":{id:"nvidia/nemotron-3-super-120b-a12b",name:"NVIDIA: Nemotron 3 Super",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.085,output:.4,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:16384,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"nvidia/nemotron-3-super-120b-a12b:free":{id:"nvidia/nemotron-3-super-120b-a12b:free",name:"NVIDIA: Nemotron 3 Super (free)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"nvidia/nemotron-3-ultra-550b-a55b":{id:"nvidia/nemotron-3-ultra-550b-a55b",name:"NVIDIA: Nemotron 3 Ultra",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.6,output:3.6,cacheRead:.2,cacheWrite:0},contextWindow:512288,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"nvidia/nemotron-3-ultra-550b-a55b:batch":{id:"nvidia/nemotron-3-ultra-550b-a55b:batch",name:"NVIDIA: Nemotron 3 Ultra (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.3,output:1.8,cacheRead:.1,cacheWrite:0},contextWindow:512288,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"nvidia/nemotron-3-ultra-550b-a55b:free":{id:"nvidia/nemotron-3-ultra-550b-a55b:free",name:"NVIDIA: Nemotron 3 Ultra (free)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"nvidia/nemotron-nano-12b-v2-vl:free":{id:"nvidia/nemotron-nano-12b-v2-vl:free",name:"NVIDIA: Nemotron Nano 12B 2 VL (free)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:128e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"nvidia/nemotron-nano-9b-v2:free":{id:"nvidia/nemotron-nano-9b-v2:free",name:"NVIDIA: Nemotron Nano 9B V2 (free)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"openai/gpt-3.5-turbo":{id:"openai/gpt-3.5-turbo",name:"OpenAI: GPT-3.5 Turbo",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.5,output:1.5,cacheRead:0,cacheWrite:0},contextWindow:16385,maxTokens:4096,compat:{thinkingFormat:"openrouter"}},"openai/gpt-3.5-turbo-0613":{id:"openai/gpt-3.5-turbo-0613",name:"OpenAI: GPT-3.5 Turbo (older v0613)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:1,output:2,cacheRead:0,cacheWrite:0},contextWindow:4095,maxTokens:4096,compat:{thinkingFormat:"openrouter"}},"openai/gpt-3.5-turbo-16k":{id:"openai/gpt-3.5-turbo-16k",name:"OpenAI: GPT-3.5 Turbo 16k",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:3,output:4,cacheRead:0,cacheWrite:0},contextWindow:16385,maxTokens:4096,compat:{thinkingFormat:"openrouter"}},"openai/gpt-3.5-turbo:batch":{id:"openai/gpt-3.5-turbo:batch",name:"OpenAI: GPT-3.5 Turbo (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.25,output:.75,cacheRead:0,cacheWrite:0},contextWindow:16385,maxTokens:4096,compat:{thinkingFormat:"openrouter"}},"openai/gpt-4":{id:"openai/gpt-4",name:"OpenAI: GPT-4",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:30,output:60,cacheRead:0,cacheWrite:0},contextWindow:8191,maxTokens:4096,compat:{thinkingFormat:"openrouter"}},"openai/gpt-4-turbo":{id:"openai/gpt-4-turbo",name:"OpenAI: GPT-4 Turbo",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:10,output:30,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096,compat:{thinkingFormat:"openrouter"}},"openai/gpt-4-turbo-preview":{id:"openai/gpt-4-turbo-preview",name:"OpenAI: GPT-4 Turbo Preview",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:10,output:30,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096,compat:{thinkingFormat:"openrouter"}},"openai/gpt-4-turbo:batch":{id:"openai/gpt-4-turbo:batch",name:"OpenAI: GPT-4 Turbo (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:5,output:15,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096,compat:{thinkingFormat:"openrouter"}},"openai/gpt-4.1":{id:"openai/gpt-4.1",name:"OpenAI: GPT-4.1",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:2,output:8,cacheRead:.5,cacheWrite:0},contextWindow:1047576,maxTokens:32768,compat:{thinkingFormat:"openrouter"}},"openai/gpt-4.1-mini":{id:"openai/gpt-4.1-mini",name:"OpenAI: GPT-4.1 Mini",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.4,output:1.6,cacheRead:.1,cacheWrite:0},contextWindow:1047576,maxTokens:32768,compat:{thinkingFormat:"openrouter"}},"openai/gpt-4.1-mini:batch":{id:"openai/gpt-4.1-mini:batch",name:"OpenAI: GPT-4.1 Mini (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.2,output:.8,cacheRead:.05,cacheWrite:0},contextWindow:1047576,maxTokens:32768,compat:{thinkingFormat:"openrouter"}},"openai/gpt-4.1-nano":{id:"openai/gpt-4.1-nano",name:"OpenAI: GPT-4.1 Nano",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.1,output:.4,cacheRead:.025,cacheWrite:0},contextWindow:1047576,maxTokens:32768,compat:{thinkingFormat:"openrouter"}},"openai/gpt-4.1-nano:batch":{id:"openai/gpt-4.1-nano:batch",name:"OpenAI: GPT-4.1 Nano (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.05,output:.2,cacheRead:.0125,cacheWrite:0},contextWindow:1047576,maxTokens:32768,compat:{thinkingFormat:"openrouter"}},"openai/gpt-4.1:batch":{id:"openai/gpt-4.1:batch",name:"OpenAI: GPT-4.1 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:1,output:4,cacheRead:.25,cacheWrite:0},contextWindow:1047576,maxTokens:32768,compat:{thinkingFormat:"openrouter"}},"openai/gpt-4o":{id:"openai/gpt-4o",name:"OpenAI: GPT-4o",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:2.5,output:10,cacheRead:1.25,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{thinkingFormat:"openrouter"}},"openai/gpt-4o-2024-05-13":{id:"openai/gpt-4o-2024-05-13",name:"OpenAI: GPT-4o (2024-05-13)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:5,output:15,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096,compat:{thinkingFormat:"openrouter"}},"openai/gpt-4o-2024-08-06":{id:"openai/gpt-4o-2024-08-06",name:"OpenAI: GPT-4o (2024-08-06)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:2.5,output:10,cacheRead:1.25,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{thinkingFormat:"openrouter"}},"openai/gpt-4o-2024-11-20":{id:"openai/gpt-4o-2024-11-20",name:"OpenAI: GPT-4o (2024-11-20)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:2.5,output:10,cacheRead:1.25,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{thinkingFormat:"openrouter"}},"openai/gpt-4o-mini":{id:"openai/gpt-4o-mini",name:"OpenAI: GPT-4o-mini",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.15,output:.6,cacheRead:.075,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{thinkingFormat:"openrouter"}},"openai/gpt-4o-mini-2024-07-18":{id:"openai/gpt-4o-mini-2024-07-18",name:"OpenAI: GPT-4o-mini (2024-07-18)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.15,output:.6,cacheRead:.075,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{thinkingFormat:"openrouter"}},"openai/gpt-4o-mini:batch":{id:"openai/gpt-4o-mini:batch",name:"OpenAI: GPT-4o-mini (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.075,output:.3,cacheRead:.0375,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{thinkingFormat:"openrouter"}},"openai/gpt-4o:batch":{id:"openai/gpt-4o:batch",name:"OpenAI: GPT-4o (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:1.25,output:5,cacheRead:.625,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{thinkingFormat:"openrouter"}},"openai/gpt-5":{id:"openai/gpt-5",name:"OpenAI: GPT-5",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"}},"openai/gpt-5-codex:batch":{id:"openai/gpt-5-codex:batch",name:"OpenAI: GPT-5 Codex (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.625,output:5,cacheRead:.0625,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"}},"openai/gpt-5-mini":{id:"openai/gpt-5-mini",name:"OpenAI: GPT-5 Mini",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.25,output:2,cacheRead:.025,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"}},"openai/gpt-5-mini:batch":{id:"openai/gpt-5-mini:batch",name:"OpenAI: GPT-5 Mini (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.125,output:1,cacheRead:.0125,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"}},"openai/gpt-5-nano":{id:"openai/gpt-5-nano",name:"OpenAI: GPT-5 Nano",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.05,output:.4,cacheRead:.005,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"}},"openai/gpt-5-nano:batch":{id:"openai/gpt-5-nano:batch",name:"OpenAI: GPT-5 Nano (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.025,output:.2,cacheRead:.0025,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"}},"openai/gpt-5-pro":{id:"openai/gpt-5-pro",name:"OpenAI: GPT-5 Pro",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:15,output:120,cacheRead:0,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"}},"openai/gpt-5-pro:batch":{id:"openai/gpt-5-pro:batch",name:"OpenAI: GPT-5 Pro (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:7.5,output:60,cacheRead:0,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"}},"openai/gpt-5.1":{id:"openai/gpt-5.1",name:"OpenAI: GPT-5.1",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"}},"openai/gpt-5.1-codex":{id:"openai/gpt-5.1-codex",name:"OpenAI: GPT-5.1-Codex",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.13,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"}},"openai/gpt-5.1-codex-max":{id:"openai/gpt-5.1-codex-max",name:"OpenAI: GPT-5.1-Codex-Max",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"}},"openai/gpt-5.1-codex-mini":{id:"openai/gpt-5.1-codex-mini",name:"OpenAI: GPT-5.1-Codex-Mini",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.25,output:2,cacheRead:.03,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"}},"openai/gpt-5.1:batch":{id:"openai/gpt-5.1:batch",name:"OpenAI: GPT-5.1 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.625,output:5,cacheRead:.0625,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"}},"openai/gpt-5.2":{id:"openai/gpt-5.2",name:"OpenAI: GPT-5.2",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.2-chat":{id:"openai/gpt-5.2-chat",name:"OpenAI: GPT-5.2 Chat",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:128e3,maxTokens:32e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.2-codex":{id:"openai/gpt-5.2-codex",name:"OpenAI: GPT-5.2-Codex",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.2-pro":{id:"openai/gpt-5.2-pro",name:"OpenAI: GPT-5.2 Pro",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:21,output:168,cacheRead:0,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.2-pro:batch":{id:"openai/gpt-5.2-pro:batch",name:"OpenAI: GPT-5.2 Pro (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:10.5,output:84,cacheRead:0,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.2:batch":{id:"openai/gpt-5.2:batch",name:"OpenAI: GPT-5.2 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.875,output:7,cacheRead:.0875,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.3-codex":{id:"openai/gpt-5.3-codex",name:"OpenAI: GPT-5.3-Codex",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.4":{id:"openai/gpt-5.4",name:"OpenAI: GPT-5.4",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:2.5,output:15,cacheRead:.25,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.4-mini":{id:"openai/gpt-5.4-mini",name:"OpenAI: GPT-5.4 Mini",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.75,output:4.5,cacheRead:.075,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.4-mini:batch":{id:"openai/gpt-5.4-mini:batch",name:"OpenAI: GPT-5.4 Mini (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.375,output:2.25,cacheRead:.0375,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.4-nano":{id:"openai/gpt-5.4-nano",name:"OpenAI: GPT-5.4 Nano",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.2,output:1.25,cacheRead:.02,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.4-nano:batch":{id:"openai/gpt-5.4-nano:batch",name:"OpenAI: GPT-5.4 Nano (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.1,output:.625,cacheRead:.01,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.4-pro":{id:"openai/gpt-5.4-pro",name:"OpenAI: GPT-5.4 Pro",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:30,output:180,cacheRead:0,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.4-pro:batch":{id:"openai/gpt-5.4-pro:batch",name:"OpenAI: GPT-5.4 Pro (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:15,output:90,cacheRead:0,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.4:batch":{id:"openai/gpt-5.4:batch",name:"OpenAI: GPT-5.4 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.25,output:7.5,cacheRead:.125,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.5":{id:"openai/gpt-5.5",name:"OpenAI: GPT-5.5",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.5-pro":{id:"openai/gpt-5.5-pro",name:"OpenAI: GPT-5.5 Pro",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:30,output:180,cacheRead:0,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh",off:null,minimal:null,low:null}},"openai/gpt-5.5-pro:batch":{id:"openai/gpt-5.5-pro:batch",name:"OpenAI: GPT-5.5 Pro (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:15,output:90,cacheRead:0,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.5:batch":{id:"openai/gpt-5.5:batch",name:"OpenAI: GPT-5.5 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:2.5,output:15,cacheRead:.25,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.6-luna":{id:"openai/gpt-5.6-luna",name:"OpenAI: GPT-5.6 Luna",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.1,output:.6,cacheRead:.01,cacheWrite:.125},contextWindow:105e4,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"openai/gpt-5.6-luna-pro":{id:"openai/gpt-5.6-luna-pro",name:"OpenAI: GPT-5.6 Luna Pro",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.1,output:.6,cacheRead:.01,cacheWrite:.125},contextWindow:105e4,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"openai/gpt-5.6-luna-pro:batch":{id:"openai/gpt-5.6-luna-pro:batch",name:"OpenAI: GPT-5.6 Luna Pro (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.1,output:.6,cacheRead:.01,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"openai/gpt-5.6-luna:batch":{id:"openai/gpt-5.6-luna:batch",name:"OpenAI: GPT-5.6 Luna (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.1,output:.6,cacheRead:.01,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"openai/gpt-5.6-sol":{id:"openai/gpt-5.6-sol",name:"OpenAI: GPT-5.6 Sol",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:6.25},contextWindow:105e4,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"openai/gpt-5.6-sol-pro":{id:"openai/gpt-5.6-sol-pro",name:"OpenAI: GPT-5.6 Sol Pro",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:6.25},contextWindow:105e4,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"openai/gpt-5.6-sol-pro:batch":{id:"openai/gpt-5.6-sol-pro:batch",name:"OpenAI: GPT-5.6 Sol Pro (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:2.5,output:15,cacheRead:.25,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"openai/gpt-5.6-sol:batch":{id:"openai/gpt-5.6-sol:batch",name:"OpenAI: GPT-5.6 Sol (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:2.5,output:15,cacheRead:.25,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"openai/gpt-5.6-terra":{id:"openai/gpt-5.6-terra",name:"OpenAI: GPT-5.6 Terra",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1,output:6,cacheRead:.1,cacheWrite:1.25},contextWindow:105e4,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"openai/gpt-5.6-terra-pro":{id:"openai/gpt-5.6-terra-pro",name:"OpenAI: GPT-5.6 Terra Pro",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1,output:6,cacheRead:.1,cacheWrite:1.25},contextWindow:105e4,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"openai/gpt-5.6-terra-pro:batch":{id:"openai/gpt-5.6-terra-pro:batch",name:"OpenAI: GPT-5.6 Terra Pro (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1,output:6,cacheRead:.1,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"openai/gpt-5.6-terra:batch":{id:"openai/gpt-5.6-terra:batch",name:"OpenAI: GPT-5.6 Terra (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1,output:6,cacheRead:.1,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"openai/gpt-5:batch":{id:"openai/gpt-5:batch",name:"OpenAI: GPT-5 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.625,output:5,cacheRead:.0625,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"}},"openai/gpt-audio":{id:"openai/gpt-audio",name:"OpenAI: GPT Audio",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:2.5,output:10,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{thinkingFormat:"openrouter"}},"openai/gpt-audio-mini":{id:"openai/gpt-audio-mini",name:"OpenAI: GPT Audio Mini",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.6,output:2.4,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{thinkingFormat:"openrouter"}},"openai/gpt-chat-latest":{id:"openai/gpt-chat-latest",name:"OpenAI: GPT Chat Latest",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"}},"openai/gpt-oss-120b":{id:"openai/gpt-oss-120b",name:"OpenAI: gpt-oss-120b",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.037,output:.17,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:131072,compat:{thinkingFormat:"openrouter"}},"openai/gpt-oss-20b":{id:"openai/gpt-oss-20b",name:"OpenAI: gpt-oss-20b",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.03,output:.13,cacheRead:.03,cacheWrite:0},contextWindow:131072,maxTokens:131072,compat:{thinkingFormat:"openrouter"}},"openai/gpt-oss-20b:free":{id:"openai/gpt-oss-20b:free",name:"OpenAI: gpt-oss-20b (free)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:32768,compat:{thinkingFormat:"openrouter"}},"openai/gpt-oss-safeguard-20b":{id:"openai/gpt-oss-safeguard-20b",name:"OpenAI: gpt-oss-safeguard-20b",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.075,output:.3,cacheRead:.0375,cacheWrite:0},contextWindow:131072,maxTokens:65536,compat:{thinkingFormat:"openrouter"}},"openai/o1":{id:"openai/o1",name:"OpenAI: o1",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:15,output:60,cacheRead:7.5,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,compat:{thinkingFormat:"openrouter"}},"openai/o1:batch":{id:"openai/o1:batch",name:"OpenAI: o1 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:7.5,output:30,cacheRead:3.75,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,compat:{thinkingFormat:"openrouter"}},"openai/o3":{id:"openai/o3",name:"OpenAI: o3",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:2,output:8,cacheRead:.5,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,compat:{thinkingFormat:"openrouter"}},"openai/o3-mini":{id:"openai/o3-mini",name:"OpenAI: o3 Mini",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:1.1,output:4.4,cacheRead:.55,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,compat:{thinkingFormat:"openrouter"}},"openai/o3-mini-high":{id:"openai/o3-mini-high",name:"OpenAI: o3 Mini High",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:1.1,output:4.4,cacheRead:.55,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,compat:{thinkingFormat:"openrouter"}},"openai/o3-mini-high:batch":{id:"openai/o3-mini-high:batch",name:"OpenAI: o3 Mini High (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.55,output:2.2,cacheRead:.275,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,compat:{thinkingFormat:"openrouter"}},"openai/o3-mini:batch":{id:"openai/o3-mini:batch",name:"OpenAI: o3 Mini (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.55,output:2.2,cacheRead:.275,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,compat:{thinkingFormat:"openrouter"}},"openai/o3-pro":{id:"openai/o3-pro",name:"OpenAI: o3 Pro",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:20,output:80,cacheRead:0,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,compat:{thinkingFormat:"openrouter"}},"openai/o3-pro:batch":{id:"openai/o3-pro:batch",name:"OpenAI: o3 Pro (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:10,output:40,cacheRead:0,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,compat:{thinkingFormat:"openrouter"}},"openai/o3:batch":{id:"openai/o3:batch",name:"OpenAI: o3 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1,output:4,cacheRead:.25,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,compat:{thinkingFormat:"openrouter"}},"openai/o4-mini":{id:"openai/o4-mini",name:"OpenAI: o4 Mini",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.1,output:4.4,cacheRead:.275,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,compat:{thinkingFormat:"openrouter"}},"openai/o4-mini-high":{id:"openai/o4-mini-high",name:"OpenAI: o4 Mini High",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.1,output:4.4,cacheRead:.275,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,compat:{thinkingFormat:"openrouter"}},"openai/o4-mini-high:batch":{id:"openai/o4-mini-high:batch",name:"OpenAI: o4 Mini High (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.55,output:2.2,cacheRead:.1375,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,compat:{thinkingFormat:"openrouter"}},"openai/o4-mini:batch":{id:"openai/o4-mini:batch",name:"OpenAI: o4 Mini (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.55,output:2.2,cacheRead:.1375,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,compat:{thinkingFormat:"openrouter"}},"openrouter/auto":{id:"openrouter/auto",name:"Auto Router",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:-1e6,output:-1e6,cacheRead:0,cacheWrite:0},contextWindow:2e6,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"openrouter/auto-beta":{id:"openrouter/auto-beta",name:"Auto Router (Beta)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:-1e6,output:-1e6,cacheRead:0,cacheWrite:0},contextWindow:2e6,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"openrouter/free":{id:"openrouter/free",name:"Free Models Router",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:2e5,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"openrouter/fusion":{id:"openrouter/fusion",name:"OpenRouter: Fusion",api:"openai-completions",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:3e4,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"poolside/laguna-s-2.1":{id:"poolside/laguna-s-2.1",name:"Poolside: Laguna S 2.1",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.09,output:.18,cacheRead:.009,cacheWrite:0},contextWindow:1048576,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"poolside/laguna-s-2.1:free":{id:"poolside/laguna-s-2.1:free",name:"Poolside: Laguna S 2.1 (free)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"poolside/laguna-xs-2.1":{id:"poolside/laguna-xs-2.1",name:"Poolside: Laguna XS 2.1",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.06,output:.12,cacheRead:.03,cacheWrite:0},contextWindow:262144,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"poolside/laguna-xs-2.1:free":{id:"poolside/laguna-xs-2.1:free",name:"Poolside: Laguna XS 2.1 (free)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen-2.5-72b-instruct":{id:"qwen/qwen-2.5-72b-instruct",name:"Qwen2.5 72B Instruct",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.36,output:.4,cacheRead:0,cacheWrite:0},contextWindow:32768,maxTokens:16384,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen-2.5-7b-instruct":{id:"qwen/qwen-2.5-7b-instruct",name:"Qwen: Qwen2.5 7B Instruct",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.1,output:.2,cacheRead:0,cacheWrite:0},contextWindow:32768,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen-plus":{id:"qwen/qwen-plus",name:"Qwen: Qwen-Plus",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.26,output:.78,cacheRead:.052,cacheWrite:.325},contextWindow:1e6,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen-plus-2025-07-28":{id:"qwen/qwen-plus-2025-07-28",name:"Qwen: Qwen Plus 0728",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.26,output:.78,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen-plus-2025-07-28:thinking":{id:"qwen/qwen-plus-2025-07-28:thinking",name:"Qwen: Qwen Plus 0728 (thinking)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.4,output:1.2,cacheRead:0,cacheWrite:.5},contextWindow:1e6,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-14b":{id:"qwen/qwen3-14b",name:"Qwen: Qwen3 14B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.12,output:.24,cacheRead:0,cacheWrite:0},contextWindow:40960,maxTokens:16384,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-235b-a22b":{id:"qwen/qwen3-235b-a22b",name:"Qwen: Qwen3 235B A22B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.455,output:1.82,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:8192,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-235b-a22b-2507":{id:"qwen/qwen3-235b-a22b-2507",name:"Qwen: Qwen3 235B A22B Instruct 2507",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.09,output:.55,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:16384,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-235b-a22b-thinking-2507":{id:"qwen/qwen3-235b-a22b-thinking-2507",name:"Qwen: Qwen3 235B A22B Thinking 2507",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.23,output:2.3,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-30b-a3b":{id:"qwen/qwen3-30b-a3b",name:"Qwen: Qwen3 30B A3B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.12,output:.5,cacheRead:0,cacheWrite:0},contextWindow:40960,maxTokens:16384,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-30b-a3b-instruct-2507":{id:"qwen/qwen3-30b-a3b-instruct-2507",name:"Qwen: Qwen3 30B A3B Instruct 2507",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.04815,output:.19305,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:32e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-30b-a3b-thinking-2507":{id:"qwen/qwen3-30b-a3b-thinking-2507",name:"Qwen: Qwen3 30B A3B Thinking 2507",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.2,output:2.4,cacheRead:0,cacheWrite:0},contextWindow:81920,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-32b":{id:"qwen/qwen3-32b",name:"Qwen: Qwen3 32B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.08,output:.28,cacheRead:0,cacheWrite:0},contextWindow:40960,maxTokens:16384,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-8b":{id:"qwen/qwen3-8b",name:"Qwen: Qwen3 8B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.117,output:.455,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:8192,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-coder":{id:"qwen/qwen3-coder",name:"Qwen: Qwen3 Coder 480B A35B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.3,output:1,cacheRead:.1,cacheWrite:0},contextWindow:262144,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-coder-30b-a3b-instruct":{id:"qwen/qwen3-coder-30b-a3b-instruct",name:"Qwen: Qwen3 Coder 30B A3B Instruct",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.07,output:.28,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-coder-flash":{id:"qwen/qwen3-coder-flash",name:"Qwen: Qwen3 Coder Flash",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.195,output:.975,cacheRead:.039,cacheWrite:.24375},contextWindow:1e6,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-coder-next":{id:"qwen/qwen3-coder-next",name:"Qwen: Qwen3 Coder Next",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.12,output:.8,cacheRead:.07,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-coder-plus":{id:"qwen/qwen3-coder-plus",name:"Qwen: Qwen3 Coder Plus",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.65,output:3.25,cacheRead:.13,cacheWrite:.8125},contextWindow:1e6,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-max":{id:"qwen/qwen3-max",name:"Qwen: Qwen3 Max",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.78,output:3.9,cacheRead:.156,cacheWrite:.975},contextWindow:262144,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-max-thinking":{id:"qwen/qwen3-max-thinking",name:"Qwen: Qwen3 Max Thinking",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.78,output:3.9,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-next-80b-a3b-instruct":{id:"qwen/qwen3-next-80b-a3b-instruct",name:"Qwen: Qwen3 Next 80B A3B Instruct",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.09,output:1.1,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:16384,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-next-80b-a3b-thinking":{id:"qwen/qwen3-next-80b-a3b-thinking",name:"Qwen: Qwen3 Next 80B A3B Thinking",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.15,output:1.2,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-vl-235b-a22b-instruct":{id:"qwen/qwen3-vl-235b-a22b-instruct",name:"Qwen: Qwen3 VL 235B A22B Instruct",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.21,output:1.9,cacheRead:.1,cacheWrite:0},contextWindow:131072,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-vl-235b-a22b-thinking":{id:"qwen/qwen3-vl-235b-a22b-thinking",name:"Qwen: Qwen3 VL 235B A22B Thinking",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.4,output:4,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-vl-30b-a3b-instruct":{id:"qwen/qwen3-vl-30b-a3b-instruct",name:"Qwen: Qwen3 VL 30B A3B Instruct",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.15,output:.6,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:16384,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-vl-30b-a3b-thinking":{id:"qwen/qwen3-vl-30b-a3b-thinking",name:"Qwen: Qwen3 VL 30B A3B Thinking",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.2,output:2.4,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-vl-32b-instruct":{id:"qwen/qwen3-vl-32b-instruct",name:"Qwen: Qwen3 VL 32B Instruct",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.104,output:.416,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-vl-8b-instruct":{id:"qwen/qwen3-vl-8b-instruct",name:"Qwen: Qwen3 VL 8B Instruct",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.117,output:.455,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-vl-8b-thinking":{id:"qwen/qwen3-vl-8b-thinking",name:"Qwen: Qwen3 VL 8B Thinking",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.18,output:2.1,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3.5-122b-a10b":{id:"qwen/qwen3.5-122b-a10b",name:"Qwen: Qwen3.5-122B-A10B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.29,output:2.4,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:81920,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3.5-27b":{id:"qwen/qwen3.5-27b",name:"Qwen: Qwen3.5-27B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.195,output:1.56,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3.5-35b-a3b":{id:"qwen/qwen3.5-35b-a3b",name:"Qwen: Qwen3.5-35B-A3B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.14,output:1,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3.5-397b-a17b":{id:"qwen/qwen3.5-397b-a17b",name:"Qwen: Qwen3.5 397B A17B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.5,output:3.6,cacheRead:.3,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3.5-9b":{id:"qwen/qwen3.5-9b",name:"Qwen: Qwen3.5-9B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.1,output:.15,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3.5-flash-02-23":{id:"qwen/qwen3.5-flash-02-23",name:"Qwen: Qwen3.5-Flash",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.065,output:.26,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3.5-plus-02-15":{id:"qwen/qwen3.5-plus-02-15",name:"Qwen: Qwen3.5 Plus 2026-02-15",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.26,output:1.56,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3.5-plus-20260420":{id:"qwen/qwen3.5-plus-20260420",name:"Qwen: Qwen3.5 Plus 2026-04-20",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.3,output:1.8,cacheRead:0,cacheWrite:.375},contextWindow:1e6,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3.6-27b":{id:"qwen/qwen3.6-27b",name:"Qwen: Qwen3.6 27B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.6,output:3.6,cacheRead:.12,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3.6-35b-a3b":{id:"qwen/qwen3.6-35b-a3b",name:"Qwen: Qwen3.6 35B A3B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.15,output:1,cacheRead:.05,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3.6-flash":{id:"qwen/qwen3.6-flash",name:"Qwen: Qwen3.6 Flash",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.1875,output:1.125,cacheRead:0,cacheWrite:.234375},contextWindow:1e6,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3.6-max-preview":{id:"qwen/qwen3.6-max-preview",name:"Qwen: Qwen3.6 Max Preview",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:1.027,output:6.162,cacheRead:0,cacheWrite:1.28375},contextWindow:262144,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3.6-plus":{id:"qwen/qwen3.6-plus",name:"Qwen: Qwen3.6 Plus",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.325,output:1.95,cacheRead:0,cacheWrite:.40625},contextWindow:1e6,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3.7-flash":{id:"qwen/qwen3.7-flash",name:"Qwen: Qwen3.7 Flash",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.03,output:.13,cacheRead:.006,cacheWrite:.038},contextWindow:1e6,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3.7-max":{id:"qwen/qwen3.7-max",name:"Qwen: Qwen3.7 Max",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:1.475,output:4.425,cacheRead:.295,cacheWrite:1.84375},contextWindow:1e6,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3.7-plus":{id:"qwen/qwen3.7-plus",name:"Qwen: Qwen3.7 Plus",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.32,output:1.28,cacheRead:.064,cacheWrite:.4},contextWindow:1e6,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3.8-max":{id:"qwen/qwen3.8-max",name:"Qwen: Qwen3.8 Max",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:2,output:6,cacheRead:.25,cacheWrite:2.5},contextWindow:1e6,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"rekaai/reka-edge":{id:"rekaai/reka-edge",name:"Reka Edge",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.1,output:.1,cacheRead:0,cacheWrite:0},contextWindow:16384,maxTokens:16384,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"relace/relace-search":{id:"relace/relace-search",name:"Relace: Relace Search",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:1,output:3,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:128e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"sakana/fugu-ultra":{id:"sakana/fugu-ultra",name:"Sakana: Fugu Ultra",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:0},contextWindow:1e6,maxTokens:128e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"sakana/sakana-namazu":{id:"sakana/sakana-namazu",name:"Sakana: Sakana Namazu",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:.15,cacheWrite:0},contextWindow:262144,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"sao10k/l3.1-euryale-70b":{id:"sao10k/l3.1-euryale-70b",name:"Sao10K: Llama 3.1 Euryale 70B v2.2",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.85,output:.85,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:16384,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"stepfun/step-3.5-flash":{id:"stepfun/step-3.5-flash",name:"StepFun: Step 3.5 Flash",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.1,output:.3,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"stepfun/step-3.7-flash":{id:"stepfun/step-3.7-flash",name:"StepFun: Step 3.7 Flash",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.2,output:1.15,cacheRead:.04,cacheWrite:0},contextWindow:256e3,maxTokens:256e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"tencent/hy3":{id:"tencent/hy3",name:"Tencent: Hy3",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.132,output:.528,cacheRead:.033,cacheWrite:0},contextWindow:262144,maxTokens:128e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"tencent/hy3-preview":{id:"tencent/hy3-preview",name:"Tencent: Hy3 preview",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.063,output:.21,cacheRead:.021,cacheWrite:0},contextWindow:262144,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"thedrummer/unslopnemo-12b":{id:"thedrummer/unslopnemo-12b",name:"TheDrummer: UnslopNemo 12B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.4,output:.4,cacheRead:0,cacheWrite:0},contextWindow:1024e3,maxTokens:1024e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"thinkingmachines/inkling":{id:"thinkingmachines/inkling",name:"Thinking Machines: Inkling",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.95,output:4.05,cacheRead:.16,cacheWrite:0},contextWindow:524288,maxTokens:262144,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"thinkingmachines/inkling-small":{id:"thinkingmachines/inkling-small",name:"Thinking Machines: Inkling Small",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.45,output:1.2,cacheRead:.1,cacheWrite:0},contextWindow:524288,maxTokens:262144,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"thinkingmachines/inkling:batch":{id:"thinkingmachines/inkling:batch",name:"Thinking Machines: Inkling (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.5,output:2.025,cacheRead:.085,cacheWrite:0},contextWindow:524288,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"upstage/solar-pro-3":{id:"upstage/solar-pro-3",name:"Upstage: Solar Pro 3",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.15,output:.6,cacheRead:.015,cacheWrite:0},contextWindow:131072,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"upstage/solar-pro4":{id:"upstage/solar-pro4",name:"Upstage: Solar Pro 4",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.03,output:.12,cacheRead:.006,cacheWrite:0},contextWindow:524288,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"x-ai/grok-4.20":{id:"x-ai/grok-4.20",name:"SpaceXAI: Grok 4.20",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.25,output:2.5,cacheRead:.2,cacheWrite:0},contextWindow:2e6,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"x-ai/grok-4.3":{id:"x-ai/grok-4.3",name:"SpaceXAI: Grok 4.3",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.25,output:2.5,cacheRead:.2,cacheWrite:0},contextWindow:1e6,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"x-ai/grok-4.5":{id:"x-ai/grok-4.5",name:"SpaceXAI: Grok 4.5",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:2,output:6,cacheRead:.3,cacheWrite:0},contextWindow:5e5,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"x-ai/grok-build-0.1":{id:"x-ai/grok-build-0.1",name:"SpaceXAI: Grok Build 0.1",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1,output:2,cacheRead:.2,cacheWrite:0},contextWindow:256e3,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"xiaomi/mimo-v2.5":{id:"xiaomi/mimo-v2.5",name:"Xiaomi: MiMo-V2.5",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.14,output:.28,cacheRead:.0028,cacheWrite:0},contextWindow:1048576,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"xiaomi/mimo-v2.5-pro":{id:"xiaomi/mimo-v2.5-pro",name:"Xiaomi: MiMo-V2.5-Pro",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.435,output:.87,cacheRead:.0036,cacheWrite:0},contextWindow:1048576,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"z-ai/glm-4.5":{id:"z-ai/glm-4.5",name:"Z.ai: GLM 4.5",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.6,output:2.2,cacheRead:.11,cacheWrite:0},contextWindow:131072,maxTokens:98304,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"z-ai/glm-4.5-air":{id:"z-ai/glm-4.5-air",name:"Z.ai: GLM 4.5 Air",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.13,output:.85,cacheRead:.025,cacheWrite:0},contextWindow:131072,maxTokens:98304,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"z-ai/glm-4.5v":{id:"z-ai/glm-4.5v",name:"Z.ai: GLM 4.5V",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.6,output:1.8,cacheRead:.11,cacheWrite:0},contextWindow:65536,maxTokens:16384,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"z-ai/glm-4.6":{id:"z-ai/glm-4.6",name:"Z.ai: GLM 4.6",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.5,output:2,cacheRead:.1,cacheWrite:0},contextWindow:202752,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"z-ai/glm-4.6v":{id:"z-ai/glm-4.6v",name:"Z.ai: GLM 4.6V",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.3,output:.9,cacheRead:.055,cacheWrite:0},contextWindow:131072,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"z-ai/glm-4.7":{id:"z-ai/glm-4.7",name:"Z.ai: GLM 4.7",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.4,output:1.75,cacheRead:.08,cacheWrite:0},contextWindow:202752,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"z-ai/glm-4.7-flash":{id:"z-ai/glm-4.7-flash",name:"Z.ai: GLM 4.7 Flash",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.06,output:.4,cacheRead:.01,cacheWrite:0},contextWindow:202752,maxTokens:16384,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"z-ai/glm-5":{id:"z-ai/glm-5",name:"Z.ai: GLM 5",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.6,output:1.9,cacheRead:.119,cacheWrite:0},contextWindow:204800,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"z-ai/glm-5-turbo":{id:"z-ai/glm-5-turbo",name:"Z.ai: GLM 5 Turbo",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:1.2,output:4,cacheRead:.24,cacheWrite:0},contextWindow:202752,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"z-ai/glm-5.1":{id:"z-ai/glm-5.1",name:"Z.ai: GLM 5.1",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:1.4,output:4.4,cacheRead:.26,cacheWrite:0},contextWindow:202752,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"z-ai/glm-5.2":{id:"z-ai/glm-5.2",name:"Z.ai: GLM 5.2",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.76,output:2.42,cacheRead:.14,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh"}},"z-ai/glm-5.2:batch":{id:"z-ai/glm-5.2:batch",name:"Z.ai: GLM 5.2 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.7,output:2.2,cacheRead:.13,cacheWrite:0},contextWindow:512e3,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"z-ai/glm-5v-turbo":{id:"z-ai/glm-5v-turbo",name:"Z.ai: GLM 5V Turbo",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.2,output:4,cacheRead:.24,cacheWrite:0},contextWindow:202752,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"~anthropic/claude-fable-latest":{id:"~anthropic/claude-fable-latest",name:"Anthropic: Claude Fable Latest",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:10,output:50,cacheRead:1,cacheWrite:12.5},contextWindow:1e6,maxTokens:128e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter",cacheControlFormat:"anthropic"}},"~anthropic/claude-haiku-latest":{id:"~anthropic/claude-haiku-latest",name:"Anthropic Claude Haiku Latest",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1,output:5,cacheRead:.1,cacheWrite:1.25},contextWindow:2e5,maxTokens:64e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter",cacheControlFormat:"anthropic"}},"~anthropic/claude-opus-latest":{id:"~anthropic/claude-opus-latest",name:"Anthropic: Claude Opus Latest",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter",cacheControlFormat:"anthropic"}},"~anthropic/claude-sonnet-latest":{id:"~anthropic/claude-sonnet-latest",name:"Anthropic Claude Sonnet Latest",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:2,output:10,cacheRead:.2,cacheWrite:2.5},contextWindow:1e6,maxTokens:128e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter",cacheControlFormat:"anthropic"}},"~deepseek/deepseek-v4-flash-latest":{id:"~deepseek/deepseek-v4-flash-latest",name:"DeepSeek V4 Flash Latest",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.079996,output:.252,cacheRead:.0252,cacheWrite:0},contextWindow:1048576,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter",requiresReasoningContentOnAssistantMessages:!0},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",max:null,xhigh:"xhigh"}},"~google/gemini-flash-latest":{id:"~google/gemini-flash-latest",name:"Google Gemini Flash Latest",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.5,output:7.5,cacheRead:.15,cacheWrite:.083333},contextWindow:1048576,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"~google/gemini-pro-latest":{id:"~google/gemini-pro-latest",name:"Google Gemini Pro Latest",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:2,output:12,cacheRead:.2,cacheWrite:.375},contextWindow:1048576,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"~moonshotai/kimi-latest":{id:"~moonshotai/kimi-latest",name:"MoonshotAI Kimi Latest",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:2.8,output:14,cacheRead:.29,cacheWrite:0},contextWindow:1048576,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"~openai/gpt-latest":{id:"~openai/gpt-latest",name:"OpenAI GPT Latest",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:6.25},contextWindow:105e4,maxTokens:128e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"~openai/gpt-mini-latest":{id:"~openai/gpt-mini-latest",name:"OpenAI GPT Mini Latest",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.75,output:4.5,cacheRead:.075,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"~x-ai/grok-latest":{id:"~x-ai/grok-latest",name:"xAI: Grok Latest",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:2,output:6,cacheRead:.3,cacheWrite:0},contextWindow:5e5,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}}}};var j1=J("openrouter",B1);var q1={"openai-completions":{"MiniMax-M2.5":{id:"MiniMax-M2.5",name:"MiniMax-M2.5",api:"openai-completions",provider:"qwen-token-plan",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:196608,maxTokens:32768},"deepseek-v3.2":{id:"deepseek-v3.2",name:"DeepSeek V3.2",api:"openai-completions",provider:"qwen-token-plan",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:65536},"deepseek-v4-flash":{id:"deepseek-v4-flash",name:"DeepSeek V4 Flash",api:"openai-completions",provider:"qwen-token-plan",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!0},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:384e3},"deepseek-v4-flash-0731":{id:"deepseek-v4-flash-0731",name:"DeepSeek V4 Flash 0731",api:"openai-completions",provider:"qwen-token-plan",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!0},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:384e3},"deepseek-v4-pro":{id:"deepseek-v4-pro",name:"DeepSeek V4 Pro",api:"openai-completions",provider:"qwen-token-plan",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!0},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:384e3},"glm-5":{id:"glm-5",name:"GLM-5",api:"openai-completions",provider:"qwen-token-plan",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!0},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:202752,maxTokens:16384},"glm-5.1":{id:"glm-5.1",name:"GLM-5.1",api:"openai-completions",provider:"qwen-token-plan",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!0},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:202752,maxTokens:128e3},"glm-5.2":{id:"glm-5.2",name:"GLM-5.2",api:"openai-completions",provider:"qwen-token-plan",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!0},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:131072},"kimi-k2.5":{id:"kimi-k2.5",name:"Kimi K2.5",api:"openai-completions",provider:"qwen-token-plan",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:98304},"kimi-k2.6":{id:"kimi-k2.6",name:"Kimi K2.6",api:"openai-completions",provider:"qwen-token-plan",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:262144},"kimi-k2.7-code":{id:"kimi-k2.7-code",name:"Kimi K2.7 Code",api:"openai-completions",provider:"qwen-token-plan",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:262144},"qwen3.6-flash":{id:"qwen3.6-flash",name:"Qwen3.6 Flash",api:"openai-completions",provider:"qwen-token-plan",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:65536},"qwen3.6-plus":{id:"qwen3.6-plus",name:"Qwen3.6 Plus",api:"openai-completions",provider:"qwen-token-plan",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:65536},"qwen3.7-max":{id:"qwen3.7-max",name:"Qwen3.7 Max",api:"openai-completions",provider:"qwen-token-plan",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:131072},"qwen3.7-plus":{id:"qwen3.7-plus",name:"Qwen3.7 Plus",api:"openai-completions",provider:"qwen-token-plan",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:65536},"qwen3.8-max":{id:"qwen3.8-max",name:"Qwen3.8 Max",api:"openai-completions",provider:"qwen-token-plan",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!0},thinkingLevelMap:{minimal:null,low:"low",medium:"medium",high:null,xhigh:"xhigh",max:null},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:131072}}};var G1=J("qwen-token-plan",q1);var K1={"openai-completions":{"MiniMax-M2.5":{id:"MiniMax-M2.5",name:"MiniMax-M2.5",api:"openai-completions",provider:"qwen-token-plan-cn",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:196608,maxTokens:32768},"deepseek-v3.2":{id:"deepseek-v3.2",name:"DeepSeek V3.2",api:"openai-completions",provider:"qwen-token-plan-cn",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:65536},"deepseek-v4-flash":{id:"deepseek-v4-flash",name:"DeepSeek V4 Flash",api:"openai-completions",provider:"qwen-token-plan-cn",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!0},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:384e3},"deepseek-v4-flash-0731":{id:"deepseek-v4-flash-0731",name:"DeepSeek V4 Flash 0731",api:"openai-completions",provider:"qwen-token-plan-cn",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!0},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:384e3},"deepseek-v4-pro":{id:"deepseek-v4-pro",name:"DeepSeek V4 Pro",api:"openai-completions",provider:"qwen-token-plan-cn",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!0},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:384e3},"glm-5":{id:"glm-5",name:"GLM-5",api:"openai-completions",provider:"qwen-token-plan-cn",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!0},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:202752,maxTokens:16384},"glm-5.1":{id:"glm-5.1",name:"GLM-5.1",api:"openai-completions",provider:"qwen-token-plan-cn",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!0},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:202752,maxTokens:128e3},"glm-5.2":{id:"glm-5.2",name:"GLM-5.2",api:"openai-completions",provider:"qwen-token-plan-cn",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!0},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:131072},"kimi-k2.5":{id:"kimi-k2.5",name:"Kimi K2.5",api:"openai-completions",provider:"qwen-token-plan-cn",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:98304},"kimi-k2.6":{id:"kimi-k2.6",name:"Kimi K2.6",api:"openai-completions",provider:"qwen-token-plan-cn",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:262144},"kimi-k2.7-code":{id:"kimi-k2.7-code",name:"Kimi K2.7 Code",api:"openai-completions",provider:"qwen-token-plan-cn",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:262144},"qwen3.6-flash":{id:"qwen3.6-flash",name:"Qwen3.6 Flash",api:"openai-completions",provider:"qwen-token-plan-cn",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:65536},"qwen3.6-plus":{id:"qwen3.6-plus",name:"Qwen3.6 Plus",api:"openai-completions",provider:"qwen-token-plan-cn",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:65536},"qwen3.7-max":{id:"qwen3.7-max",name:"Qwen3.7 Max",api:"openai-completions",provider:"qwen-token-plan-cn",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:131072},"qwen3.7-plus":{id:"qwen3.7-plus",name:"Qwen3.7 Plus",api:"openai-completions",provider:"qwen-token-plan-cn",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:65536},"qwen3.8-max":{id:"qwen3.8-max",name:"Qwen3.8 Max",api:"openai-completions",provider:"qwen-token-plan-cn",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!0},thinkingLevelMap:{minimal:null,low:"low",medium:"medium",high:null,xhigh:"xhigh",max:null},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:131072}}};var H1=J("qwen-token-plan-cn",K1);var z1={"openai-completions":{"deepseek-v4-flash-0731":{id:"deepseek-v4-flash-0731",name:"DeepSeek V4 Flash 0731",api:"openai-completions",provider:"qwen-token-plan-individual",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!0},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:384e3},"deepseek-v4-pro":{id:"deepseek-v4-pro",name:"DeepSeek V4 Pro",api:"openai-completions",provider:"qwen-token-plan-individual",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!0},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:384e3},"glm-5.2":{id:"glm-5.2",name:"GLM-5.2",api:"openai-completions",provider:"qwen-token-plan-individual",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!0},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:131072},"qwen3.6-flash":{id:"qwen3.6-flash",name:"Qwen3.6 Flash",api:"openai-completions",provider:"qwen-token-plan-individual",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:65536},"qwen3.7-max":{id:"qwen3.7-max",name:"Qwen3.7 Max",api:"openai-completions",provider:"qwen-token-plan-individual",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:131072},"qwen3.7-plus":{id:"qwen3.7-plus",name:"Qwen3.7 Plus",api:"openai-completions",provider:"qwen-token-plan-individual",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:65536},"qwen3.8-max":{id:"qwen3.8-max",name:"Qwen3.8 Max",api:"openai-completions",provider:"qwen-token-plan-individual",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!0},thinkingLevelMap:{minimal:null,low:"low",medium:"medium",high:null,xhigh:"xhigh",max:null},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:131072}}};var V1=J("qwen-token-plan-individual",z1);var Q1={"openai-completions":{"MiniMaxAI/MiniMax-M2.7":{id:"MiniMaxAI/MiniMax-M2.7",name:"MiniMax-M2.7",api:"openai-completions",provider:"together",baseUrl:"https://api.together.ai/v1",reasoning:!0,thinkingLevelMap:{off:null,minimal:null,low:null,medium:null},input:["text"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:202752,maxTokens:131072},"MiniMaxAI/MiniMax-M3":{id:"MiniMaxAI/MiniMax-M3",name:"MiniMax-M3",api:"openai-completions",provider:"together",baseUrl:"https://api.together.ai/v1",reasoning:!0,thinkingLevelMap:{minimal:null,low:null,medium:null},input:["text","image"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"together",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:524288,maxTokens:25e4},"Qwen/Qwen2.5-7B-Instruct-Turbo":{id:"Qwen/Qwen2.5-7B-Instruct-Turbo",name:"Qwen 2.5 7B Instruct Turbo",api:"openai-completions",provider:"together",baseUrl:"https://api.together.ai/v1",reasoning:!1,input:["text"],cost:{input:.3,output:.3,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"together",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:32768,maxTokens:32768},"Qwen/Qwen3.5-9B":{id:"Qwen/Qwen3.5-9B",name:"Qwen3.5 9B",api:"openai-completions",provider:"together",baseUrl:"https://api.together.ai/v1",reasoning:!0,thinkingLevelMap:{minimal:null,low:null,medium:null},input:["text","image"],cost:{input:.17,output:.25,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"together",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:262144,maxTokens:65536},"Qwen/Qwen3.6-Plus":{id:"Qwen/Qwen3.6-Plus",name:"Qwen3.6 Plus",api:"openai-completions",provider:"together",baseUrl:"https://api.together.ai/v1",reasoning:!0,thinkingLevelMap:{minimal:null,low:null,medium:null},input:["text"],cost:{input:.5,output:3,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"together",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:1e6,maxTokens:5e5},"Qwen/Qwen3.7-Max":{id:"Qwen/Qwen3.7-Max",name:"Qwen3.7 Max",api:"openai-completions",provider:"together",baseUrl:"https://api.together.ai/v1",reasoning:!1,input:["text"],cost:{input:1.25,output:3.75,cacheRead:.125,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"together",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:1e6,maxTokens:5e5},"deepseek-ai/DeepSeek-V4-Flash-0731":{id:"deepseek-ai/DeepSeek-V4-Flash-0731",name:"DeepSeek V4 Flash 0731",api:"openai-completions",provider:"together",baseUrl:"https://api.together.ai/v1",reasoning:!0,thinkingLevelMap:{minimal:null,low:null,medium:null},input:["text"],cost:{input:.14,output:.28,cacheRead:.03,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"together",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:1e6,maxTokens:384e3},"deepseek-ai/DeepSeek-V4-Pro":{id:"deepseek-ai/DeepSeek-V4-Pro",name:"DeepSeek V4 Pro",api:"openai-completions",provider:"together",baseUrl:"https://api.together.ai/v1",reasoning:!0,thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",xhigh:null},input:["text"],cost:{input:1.74,output:3.48,cacheRead:.2,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!0,maxTokensField:"max_tokens",thinkingFormat:"together",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:512e3,maxTokens:384e3},"google/gemma-4-31B-it":{id:"google/gemma-4-31B-it",name:"Gemma 4 31B Instruct",api:"openai-completions",provider:"together",baseUrl:"https://api.together.ai/v1",reasoning:!0,thinkingLevelMap:{minimal:null,low:null,medium:null},input:["text","image"],cost:{input:.39,output:.97,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"together",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:262144,maxTokens:131072},"meta-llama/Llama-3.3-70B-Instruct-Turbo":{id:"meta-llama/Llama-3.3-70B-Instruct-Turbo",name:"Llama 3.3 70B",api:"openai-completions",provider:"together",baseUrl:"https://api.together.ai/v1",reasoning:!1,input:["text"],cost:{input:1.04,output:1.04,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"together",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:131072,maxTokens:131072},"moonshotai/Kimi-K2.6":{id:"moonshotai/Kimi-K2.6",name:"Kimi K2.6",api:"openai-completions",provider:"together",baseUrl:"https://api.together.ai/v1",reasoning:!0,thinkingLevelMap:{minimal:null,low:null,medium:null},input:["text","image"],cost:{input:1.2,output:4.5,cacheRead:.2,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"together",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:262144,maxTokens:131e3},"moonshotai/Kimi-K2.7-Code":{id:"moonshotai/Kimi-K2.7-Code",name:"Kimi K2.7 Code",api:"openai-completions",provider:"together",baseUrl:"https://api.together.ai/v1",reasoning:!0,thinkingLevelMap:{minimal:null,low:null,medium:null},input:["text"],cost:{input:.95,output:4,cacheRead:.19,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"together",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:262144,maxTokens:131072},"moonshotai/Kimi-K3":{id:"moonshotai/Kimi-K3",name:"Kimi K3",api:"openai-completions",provider:"together",baseUrl:"https://api.together.ai/v1",reasoning:!0,thinkingLevelMap:{minimal:null,low:null,medium:null},input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"together",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:1048576,maxTokens:131072},"nvidia/nemotron-3-ultra-550b-a55b":{id:"nvidia/nemotron-3-ultra-550b-a55b",name:"Nemotron 3 Ultra 550B A55B",api:"openai-completions",provider:"together",baseUrl:"https://api.together.ai/v1",reasoning:!0,thinkingLevelMap:{minimal:null,low:null,medium:null},input:["text"],cost:{input:.6,output:3.6,cacheRead:.2,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"together",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:512300,maxTokens:512300},"openai/gpt-oss-120b":{id:"openai/gpt-oss-120b",name:"GPT OSS 120B",api:"openai-completions",provider:"together",baseUrl:"https://api.together.ai/v1",reasoning:!0,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},input:["text"],cost:{input:.15,output:.6,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!0,maxTokensField:"max_tokens",thinkingFormat:"openai",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:131072,maxTokens:131072},"openai/gpt-oss-20b":{id:"openai/gpt-oss-20b",name:"GPT OSS 20B",api:"openai-completions",provider:"together",baseUrl:"https://api.together.ai/v1",reasoning:!0,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},input:["text"],cost:{input:.05,output:.2,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!0,maxTokensField:"max_tokens",thinkingFormat:"openai",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:131072,maxTokens:131072},"thinkingmachines/Inkling":{id:"thinkingmachines/Inkling",name:"Inkling",api:"openai-completions",provider:"together",baseUrl:"https://api.together.ai/v1",reasoning:!0,thinkingLevelMap:{minimal:null,low:null,medium:null},input:["text","image"],cost:{input:1,output:4.05,cacheRead:.17,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"together",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:524288,maxTokens:131072},"zai-org/GLM-5.2":{id:"zai-org/GLM-5.2",name:"GLM-5.2",api:"openai-completions",provider:"together",baseUrl:"https://api.together.ai/v1",reasoning:!0,thinkingLevelMap:{minimal:null,low:null,medium:null},input:["text"],cost:{input:1.4,output:4.4,cacheRead:.26,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"together",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:512e3,maxTokens:164e3}}};var J1=J("together",Q1);var Y1={"anthropic-messages":{"alibaba/qwen-3-14b":{id:"alibaba/qwen-3-14b",name:"Qwen3-14B",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.12,output:.24,cacheRead:0,cacheWrite:0},contextWindow:40960,maxTokens:16384},"alibaba/qwen-3-235b":{id:"alibaba/qwen-3-235b",name:"Qwen3 235B A22B",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.22,output:.88,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:16384},"alibaba/qwen-3-30b":{id:"alibaba/qwen-3-30b",name:"Qwen3-30B-A3B",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.12,output:.5,cacheRead:0,cacheWrite:0},contextWindow:40960,maxTokens:16384},"alibaba/qwen-3-32b":{id:"alibaba/qwen-3-32b",name:"Qwen 3 32B",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.16,output:.64,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:8192},"alibaba/qwen-3.6-max-preview":{id:"alibaba/qwen-3.6-max-preview",name:"Qwen 3.6 Max Preview",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:1.3,output:7.8,cacheRead:.26,cacheWrite:1.625},contextWindow:24e4,maxTokens:64e3},"alibaba/qwen3-235b-a22b-thinking":{id:"alibaba/qwen3-235b-a22b-thinking",name:"Qwen3 VL 235B A22B Thinking",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.4,output:4,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:32768},"alibaba/qwen3-coder":{id:"alibaba/qwen3-coder",name:"Qwen3 Coder 480B A35B Instruct",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:1.5,output:7.5,cacheRead:.3,cacheWrite:0},contextWindow:262144,maxTokens:65536},"alibaba/qwen3-coder-30b-a3b":{id:"alibaba/qwen3-coder-30b-a3b",name:"Qwen 3 Coder 30B A3B Instruct",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:.15,output:.6,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:8192},"alibaba/qwen3-coder-next":{id:"alibaba/qwen3-coder-next",name:"Qwen3 Coder Next",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:.5,output:1.2,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:256e3},"alibaba/qwen3-coder-plus":{id:"alibaba/qwen3-coder-plus",name:"Qwen3 Coder Plus",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:1,output:5,cacheRead:.2,cacheWrite:0},contextWindow:1e6,maxTokens:65536},"alibaba/qwen3-max":{id:"alibaba/qwen3-max",name:"Qwen3 Max",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:1.2,output:6,cacheRead:.24,cacheWrite:0},contextWindow:262144,maxTokens:32768},"alibaba/qwen3-max-preview":{id:"alibaba/qwen3-max-preview",name:"Qwen3 Max Preview",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:1.2,output:6,cacheRead:.24,cacheWrite:0},contextWindow:262144,maxTokens:32768},"alibaba/qwen3-max-thinking":{id:"alibaba/qwen3-max-thinking",name:"Qwen 3 Max Thinking",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:1.2,output:6,cacheRead:.24,cacheWrite:0},contextWindow:256e3,maxTokens:65536},"alibaba/qwen3-next-80b-a3b-instruct":{id:"alibaba/qwen3-next-80b-a3b-instruct",name:"Qwen3 Next 80B A3B Instruct",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:.15,output:1.2,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:32768},"alibaba/qwen3-next-80b-a3b-thinking":{id:"alibaba/qwen3-next-80b-a3b-thinking",name:"Qwen3 Next 80B A3B Thinking",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.15,output:1.2,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:32768},"alibaba/qwen3-vl-235b-a22b-instruct":{id:"alibaba/qwen3-vl-235b-a22b-instruct",name:"Qwen3 VL 235B A22B Instruct",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:.4,output:1.6,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:129024},"alibaba/qwen3-vl-instruct":{id:"alibaba/qwen3-vl-instruct",name:"Qwen3 VL 235B A22B Instruct",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:.4,output:1.6,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:129024},"alibaba/qwen3-vl-thinking":{id:"alibaba/qwen3-vl-thinking",name:"Qwen3 VL 235B A22B Thinking",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.4,output:4,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:32768},"alibaba/qwen3.5-flash":{id:"alibaba/qwen3.5-flash",name:"Qwen 3.5 Flash",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.1,output:.4,cacheRead:.001,cacheWrite:.125},contextWindow:1e6,maxTokens:64e3},"alibaba/qwen3.5-plus":{id:"alibaba/qwen3.5-plus",name:"Qwen 3.5 Plus",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.4,output:2.4,cacheRead:.04,cacheWrite:.5},contextWindow:1e6,maxTokens:64e3},"alibaba/qwen3.6-27b":{id:"alibaba/qwen3.6-27b",name:"Qwen 3.6 27B",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.6,output:3.6,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:256e3},"alibaba/qwen3.6-plus":{id:"alibaba/qwen3.6-plus",name:"Qwen 3.6 Plus",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.5,output:3,cacheRead:.1,cacheWrite:.625},contextWindow:1e6,maxTokens:64e3},"alibaba/qwen3.7-flash":{id:"alibaba/qwen3.7-flash",name:"Qwen 3.7 Flash",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.03,output:.13,cacheRead:.006,cacheWrite:.038},contextWindow:991e3,maxTokens:64e3},"alibaba/qwen3.7-max":{id:"alibaba/qwen3.7-max",name:"Qwen 3.7 Max",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:2.5,output:7.5,cacheRead:.5,cacheWrite:3.125},contextWindow:991e3,maxTokens:64e3},"alibaba/qwen3.7-plus":{id:"alibaba/qwen3.7-plus",name:"Qwen 3.7 Plus",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.4,output:1.6,cacheRead:.08,cacheWrite:.5},contextWindow:1e6,maxTokens:64e3},"alibaba/qwen3.8-max":{id:"alibaba/qwen3.8-max",name:"Qwen 3.8 Max",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:2,output:6,cacheRead:.25,cacheWrite:2.5},contextWindow:1e6,maxTokens:128e3},"amazon/nova-2-lite":{id:"amazon/nova-2-lite",name:"Nova 2 Lite",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.3,output:2.5,cacheRead:.075,cacheWrite:0},contextWindow:1e6,maxTokens:1e6},"amazon/nova-lite":{id:"amazon/nova-lite",name:"Nova Lite",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:.06,output:.24,cacheRead:0,cacheWrite:0},contextWindow:3e5,maxTokens:8192},"amazon/nova-micro":{id:"amazon/nova-micro",name:"Nova Micro",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:.035,output:.14,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:8192},"amazon/nova-pro":{id:"amazon/nova-pro",name:"Nova Pro",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:.8,output:3.2,cacheRead:0,cacheWrite:0},contextWindow:3e5,maxTokens:8192},"anthropic/claude-3-haiku":{id:"anthropic/claude-3-haiku",name:"Claude 3 Haiku",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:.25,output:1.25,cacheRead:.03,cacheWrite:.3},contextWindow:2e5,maxTokens:4096},"anthropic/claude-fable-5":{id:"anthropic/claude-fable-5",name:"Claude Fable 5",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:10,output:50,cacheRead:1,cacheWrite:12.5},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{off:null,xhigh:"xhigh",max:"max"},compat:{forceAdaptiveThinking:!0}},"anthropic/claude-haiku-4.5":{id:"anthropic/claude-haiku-4.5",name:"Claude Haiku 4.5",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1,output:5,cacheRead:.1,cacheWrite:1.25},contextWindow:2e5,maxTokens:64e3},"anthropic/claude-opus-4":{id:"anthropic/claude-opus-4",name:"Claude Opus 4",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:15,output:75,cacheRead:1.5,cacheWrite:18.75},contextWindow:2e5,maxTokens:8192},"anthropic/claude-opus-4.5":{id:"anthropic/claude-opus-4.5",name:"Claude Opus 4.5",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:2e5,maxTokens:64e3},"anthropic/claude-opus-4.6":{id:"anthropic/claude-opus-4.6",name:"Claude Opus 4.6",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{max:"max"},compat:{forceAdaptiveThinking:!0}},"anthropic/claude-opus-4.7":{id:"anthropic/claude-opus-4.7",name:"Claude Opus 4.7",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"},compat:{forceAdaptiveThinking:!0,supportsTemperature:!1}},"anthropic/claude-opus-4.8":{id:"anthropic/claude-opus-4.8",name:"Claude Opus 4.8",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"},compat:{forceAdaptiveThinking:!0,supportsTemperature:!1}},"anthropic/claude-opus-4.8-fast":{id:"anthropic/claude-opus-4.8-fast",name:"Claude Opus 4.8 (Fast)",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:10,output:50,cacheRead:1,cacheWrite:12.5},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"},compat:{forceAdaptiveThinking:!0,supportsTemperature:!1}},"anthropic/claude-opus-5":{id:"anthropic/claude-opus-5",name:"Claude Opus 5",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"},compat:{forceAdaptiveThinking:!0,supportsTemperature:!1}},"anthropic/claude-opus-5-fast":{id:"anthropic/claude-opus-5-fast",name:"Claude Opus 5 (Fast)",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:10,output:50,cacheRead:1,cacheWrite:12.5},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"},compat:{forceAdaptiveThinking:!0,supportsTemperature:!1}},"anthropic/claude-sonnet-4":{id:"anthropic/claude-sonnet-4",name:"Claude Sonnet 4",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:1e6,maxTokens:8192},"anthropic/claude-sonnet-4.5":{id:"anthropic/claude-sonnet-4.5",name:"Claude Sonnet 4.5",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:1e6,maxTokens:64e3},"anthropic/claude-sonnet-4.6":{id:"anthropic/claude-sonnet-4.6",name:"Claude Sonnet 4.6",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{max:"max"},compat:{forceAdaptiveThinking:!0}},"anthropic/claude-sonnet-5":{id:"anthropic/claude-sonnet-5",name:"Claude Sonnet 5",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:2,output:10,cacheRead:.2,cacheWrite:2.5},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"},compat:{forceAdaptiveThinking:!0}},"arcee-ai/trinity-large-thinking":{id:"arcee-ai/trinity-large-thinking",name:"Trinity Large Thinking",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.25,output:.9,cacheRead:0,cacheWrite:0},contextWindow:262100,maxTokens:8e4},"arcee-ai/trinity-mini":{id:"arcee-ai/trinity-mini",name:"Trinity Mini",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:.045,output:.15,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:131072},"bytedance/seed-1.6":{id:"bytedance/seed-1.6",name:"Seed 1.6",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.25,output:2,cacheRead:.05,cacheWrite:0},contextWindow:256e3,maxTokens:32e3},"bytedance/seed-1.8":{id:"bytedance/seed-1.8",name:"Bytedance Seed 1.8",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.25,output:2,cacheRead:.05,cacheWrite:0},contextWindow:256e3,maxTokens:64e3},"cohere/command-a":{id:"cohere/command-a",name:"Command A",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:2.5,output:10,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:8e3},"deepseek/deepseek-r1":{id:"deepseek/deepseek-r1",name:"DeepSeek-R1",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:1.35,output:5.4,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:8192},"deepseek/deepseek-v3":{id:"deepseek/deepseek-v3",name:"DeepSeek V3 0324",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:.27,output:1.12,cacheRead:.135,cacheWrite:0},contextWindow:163840,maxTokens:163840},"deepseek/deepseek-v3.1":{id:"deepseek/deepseek-v3.1",name:"DeepSeek V3.1",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.25,output:.95,cacheRead:.13,cacheWrite:0},contextWindow:163840,maxTokens:128e3},"deepseek/deepseek-v3.1-terminus":{id:"deepseek/deepseek-v3.1-terminus",name:"DeepSeek V3.1 Terminus",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.27,output:1,cacheRead:.135,cacheWrite:0},contextWindow:131072,maxTokens:65536},"deepseek/deepseek-v3.2":{id:"deepseek/deepseek-v3.2",name:"DeepSeek V3.2",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:.28,output:.42,cacheRead:.028,cacheWrite:0},contextWindow:128e3,maxTokens:8e3},"deepseek/deepseek-v3.2-thinking":{id:"deepseek/deepseek-v3.2-thinking",name:"DeepSeek V3.2 Thinking",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:.62,output:1.85,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:8e3},"deepseek/deepseek-v4-flash":{id:"deepseek/deepseek-v4-flash",name:"DeepSeek V4 Flash",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.2,output:.4,cacheRead:.04,cacheWrite:0},contextWindow:1e6,maxTokens:384e3},"deepseek/deepseek-v4-flash-0731":{id:"deepseek/deepseek-v4-flash-0731",name:"DeepSeek V4 Flash 0731",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.2,output:.4,cacheRead:.04,cacheWrite:0},contextWindow:1e6,maxTokens:384e3},"deepseek/deepseek-v4-pro":{id:"deepseek/deepseek-v4-pro",name:"DeepSeek V4 Pro",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:1.74,output:3.48,cacheRead:.14,cacheWrite:0},contextWindow:1048600,maxTokens:1048600},"google/gemini-2.5-flash":{id:"google/gemini-2.5-flash",name:"Gemini 2.5 Flash",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.3,output:2.5,cacheRead:.03,cacheWrite:0},contextWindow:1e6,maxTokens:65536},"google/gemini-2.5-flash-lite":{id:"google/gemini-2.5-flash-lite",name:"Gemini 2.5 Flash Lite",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.1,output:.4,cacheRead:.01,cacheWrite:0},contextWindow:1048576,maxTokens:65536},"google/gemini-2.5-pro":{id:"google/gemini-2.5-pro",name:"Gemini 2.5 Pro",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:0},contextWindow:1048576,maxTokens:65536},"google/gemini-3-flash":{id:"google/gemini-3-flash",name:"Gemini 3 Flash",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.5,output:3,cacheRead:.05,cacheWrite:0},contextWindow:1e6,maxTokens:65e3},"google/gemini-3.1-flash-lite":{id:"google/gemini-3.1-flash-lite",name:"Gemini 3.1 Flash Lite",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.25,output:1.5,cacheRead:.03,cacheWrite:0},contextWindow:1e6,maxTokens:65e3},"google/gemini-3.1-pro-preview":{id:"google/gemini-3.1-pro-preview",name:"Gemini 3.1 Pro Preview",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:2,output:12,cacheRead:.2,cacheWrite:0},contextWindow:1e6,maxTokens:64e3},"google/gemini-3.5-flash":{id:"google/gemini-3.5-flash",name:"Gemini 3.5 Flash",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.5,output:9,cacheRead:.15,cacheWrite:0},contextWindow:1e6,maxTokens:64e3},"google/gemini-3.5-flash-lite":{id:"google/gemini-3.5-flash-lite",name:"Gemini 3.5 Flash Lite",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.3,output:2.5,cacheRead:.03,cacheWrite:0},contextWindow:1e6,maxTokens:65e3},"google/gemini-3.6-flash":{id:"google/gemini-3.6-flash",name:"Gemini 3.6 Flash",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.5,output:7.5,cacheRead:.15,cacheWrite:0},contextWindow:1e6,maxTokens:64e3},"google/gemma-4-26b-a4b-it":{id:"google/gemma-4-26b-a4b-it",name:"Gemma 4 26B A4B IT",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.15,output:.6,cacheRead:.015,cacheWrite:0},contextWindow:262144,maxTokens:131072},"google/gemma-4-31b-it":{id:"google/gemma-4-31b-it",name:"Gemma 4 31B IT",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.14,output:.4,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:131072},"inception/mercury-2":{id:"inception/mercury-2",name:"Mercury 2",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.25,output:.75,cacheRead:.025,cacheWrite:0},contextWindow:128e3,maxTokens:128e3},"inception/mercury-coder-small":{id:"inception/mercury-coder-small",name:"Mercury Coder Small Beta",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:.25,output:1,cacheRead:0,cacheWrite:0},contextWindow:32e3,maxTokens:16384},"inclusionai/ling-3.0-flash":{id:"inclusionai/ling-3.0-flash",name:"Ling 3.0 Flash",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.06,output:.18,cacheRead:.012,cacheWrite:0},contextWindow:256e3,maxTokens:32e3},"inclusionai/ling-3.0-tiny-free":{id:"inclusionai/ling-3.0-tiny-free",name:"Ling 3.0 Tiny (Free)",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:32e3},"interfaze/interfaze-beta":{id:"interfaze/interfaze-beta",name:"Interfaze Beta",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.5,output:3.5,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:32e3},"kwaipilot/kat-coder-air-v2.5":{id:"kwaipilot/kat-coder-air-v2.5",name:"Kat Coder Air V2.5",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.15,output:.6,cacheRead:.03,cacheWrite:0},contextWindow:256e3,maxTokens:8e4},"kwaipilot/kat-coder-pro-v1":{id:"kwaipilot/kat-coder-pro-v1",name:"KAT-Coder-Pro V1",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:0},contextWindow:256e3,maxTokens:32e3},"kwaipilot/kat-coder-pro-v2":{id:"kwaipilot/kat-coder-pro-v2",name:"Kat Coder Pro V2",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:0},contextWindow:256e3,maxTokens:256e3},"kwaipilot/kat-coder-pro-v2.5":{id:"kwaipilot/kat-coder-pro-v2.5",name:"Kat Coder Pro V2.5",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.74,output:2.96,cacheRead:.15,cacheWrite:0},contextWindow:256e3,maxTokens:8e4},"meta/llama-3.1-70b":{id:"meta/llama-3.1-70b",name:"Llama 3.1 70B Instruct",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:.72,output:.72,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:8192},"meta/llama-3.1-8b":{id:"meta/llama-3.1-8b",name:"Llama 3.1 8B Instruct",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:.22,output:.22,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:8192},"meta/llama-3.3-70b":{id:"meta/llama-3.3-70b",name:"Llama 3.3 70B Instruct",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:.72,output:.72,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:8192},"meta/llama-4-maverick":{id:"meta/llama-4-maverick",name:"Llama 4 Maverick 17B Instruct",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:.24,output:.97,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:8192},"meta/llama-4-scout":{id:"meta/llama-4-scout",name:"Llama 4 Scout 17B Instruct",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:.17,output:.66,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:8192},"meta/muse-spark-1.1":{id:"meta/muse-spark-1.1",name:"Muse Spark 1.1",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.25,output:4.25,cacheRead:.15,cacheWrite:0},contextWindow:1048576,maxTokens:1048576},"meta/muse-spark-1.2":{id:"meta/muse-spark-1.2",name:"Muse Spark 1.2",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.25,output:4.25,cacheRead:.15,cacheWrite:0},contextWindow:1048576,maxTokens:1048576},"meta/muse-spark-1.2-contributor":{id:"meta/muse-spark-1.2-contributor",name:"Muse Spark 1.2 Contributor",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.1,output:.2,cacheRead:.002,cacheWrite:0},contextWindow:1048576,maxTokens:1048576},"minimax/minimax-m2":{id:"minimax/minimax-m2",name:"MiniMax M2",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:.03,cacheWrite:.375},contextWindow:205e3,maxTokens:205e3},"minimax/minimax-m2.1":{id:"minimax/minimax-m2.1",name:"MiniMax M2.1",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:.03,cacheWrite:.375},contextWindow:204800,maxTokens:131072},"minimax/minimax-m2.1-lightning":{id:"minimax/minimax-m2.1-lightning",name:"MiniMax M2.1 Lightning",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.3,output:2.4,cacheRead:.03,cacheWrite:.375},contextWindow:204800,maxTokens:131072},"minimax/minimax-m2.5":{id:"minimax/minimax-m2.5",name:"MiniMax M2.5",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:.03,cacheWrite:.375},contextWindow:204800,maxTokens:131e3},"minimax/minimax-m2.5-highspeed":{id:"minimax/minimax-m2.5-highspeed",name:"MiniMax M2.5 High Speed",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.6,output:2.4,cacheRead:.03,cacheWrite:.375},contextWindow:204800,maxTokens:131e3},"minimax/minimax-m2.7":{id:"minimax/minimax-m2.7",name:"Minimax M2.7",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:.375},contextWindow:204800,maxTokens:131e3},"minimax/minimax-m2.7-highspeed":{id:"minimax/minimax-m2.7-highspeed",name:"MiniMax M2.7 High Speed",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.6,output:2.4,cacheRead:.06,cacheWrite:.375},contextWindow:204800,maxTokens:131100},"minimax/minimax-m3":{id:"minimax/minimax-m3",name:"MiniMax M3",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:0},contextWindow:1e6,maxTokens:1e6},"mistral/codestral":{id:"mistral/codestral",name:"Mistral Codestral",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:.3,output:.9,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4e3},"mistral/devstral-2":{id:"mistral/devstral-2",name:"Devstral 2",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:.4,output:2,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:256e3},"mistral/devstral-small-2":{id:"mistral/devstral-small-2",name:"Devstral Small 2",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:.1,output:.3,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:256e3},"mistral/magistral-medium":{id:"mistral/magistral-medium",name:"Magistral Medium 2509",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:2,output:5,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:64e3},"mistral/magistral-small":{id:"mistral/magistral-small",name:"Magistral Small 2509",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.5,output:1.5,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:64e3},"mistral/ministral-14b":{id:"mistral/ministral-14b",name:"Ministral 14B",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:.2,output:.2,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:256e3},"mistral/ministral-3b":{id:"mistral/ministral-3b",name:"Ministral 3B",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:.1,output:.1,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4e3},"mistral/ministral-8b":{id:"mistral/ministral-8b",name:"Ministral 8B",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:.15,output:.15,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4e3},"mistral/mistral-large-3":{id:"mistral/mistral-large-3",name:"Mistral Large 3",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:.5,output:1.5,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:256e3},"mistral/mistral-medium":{id:"mistral/mistral-medium",name:"Mistral Medium 3.1",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:.4,output:2,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:64e3},"mistral/mistral-medium-3.5":{id:"mistral/mistral-medium-3.5",name:"Mistral Medium Latest",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.5,output:7.5,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:256e3},"mistral/mistral-nemo":{id:"mistral/mistral-nemo",name:"Mistral Nemo 12B",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:.15,output:.15,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:128e3},"mistral/mistral-small":{id:"mistral/mistral-small",name:"Mistral Small",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:.1,output:.3,cacheRead:0,cacheWrite:0},contextWindow:32e3,maxTokens:4e3},"mistral/pixtral-12b":{id:"mistral/pixtral-12b",name:"Pixtral 12B 2409",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:.15,output:.15,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4e3},"moonshotai/kimi-k2":{id:"moonshotai/kimi-k2",name:"Kimi K2 Instruct",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:.57,output:2.3,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:131072},"moonshotai/kimi-k2-thinking":{id:"moonshotai/kimi-k2-thinking",name:"Kimi K2 Thinking",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.47,output:2,cacheRead:.141,cacheWrite:0},contextWindow:216144,maxTokens:216144},"moonshotai/kimi-k2.5":{id:"moonshotai/kimi-k2.5",name:"Kimi K2.5",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.6,output:3,cacheRead:.1,cacheWrite:0},contextWindow:262114,maxTokens:262114},"moonshotai/kimi-k2.6":{id:"moonshotai/kimi-k2.6",name:"Kimi K2.6",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:.16,cacheWrite:0},contextWindow:262e3,maxTokens:262e3},"moonshotai/kimi-k2.7-code":{id:"moonshotai/kimi-k2.7-code",name:"Kimi K2.7 Code",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:.19,cacheWrite:0},contextWindow:256e3,maxTokens:32768},"moonshotai/kimi-k2.7-code-highspeed":{id:"moonshotai/kimi-k2.7-code-highspeed",name:"Kimi K2.7 Code High Speed",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.9,output:8,cacheRead:.38,cacheWrite:0},contextWindow:262144,maxTokens:32768},"moonshotai/kimi-k3":{id:"moonshotai/kimi-k3",name:"Kimi K3",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:0},contextWindow:1e6,maxTokens:131072},"moonshotai/kimi-k3-fast":{id:"moonshotai/kimi-k3-fast",name:"Kimi K3 Fast",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:4.5,output:22.5,cacheRead:.45,cacheWrite:0},contextWindow:1e6,maxTokens:131072},"nvidia/nemotron-3-nano-30b-a3b":{id:"nvidia/nemotron-3-nano-30b-a3b",name:"Nemotron 3 Nano 30B A3B",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.05,output:.24,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:262144},"nvidia/nemotron-3-super-120b-a12b":{id:"nvidia/nemotron-3-super-120b-a12b",name:"NVIDIA Nemotron 3 Super 120B A12B",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.15,output:.65,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:32e3},"nvidia/nemotron-3-ultra-550b-a55b":{id:"nvidia/nemotron-3-ultra-550b-a55b",name:"Nemotron 3 Ultra",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.6,output:2.4,cacheRead:.12,cacheWrite:0},contextWindow:1e6,maxTokens:65e3},"nvidia/nemotron-nano-12b-v2-vl":{id:"nvidia/nemotron-nano-12b-v2-vl",name:"Nvidia Nemotron Nano 12B V2 VL",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.2,output:.6,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:131072},"nvidia/nemotron-nano-9b-v2":{id:"nvidia/nemotron-nano-9b-v2",name:"Nvidia Nemotron Nano 9B V2",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.06,output:.23,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:131072},"openai/gpt-3.5-turbo":{id:"openai/gpt-3.5-turbo",name:"GPT-3.5 Turbo",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:.5,output:1.5,cacheRead:0,cacheWrite:0},contextWindow:16385,maxTokens:4096},"openai/gpt-4-turbo":{id:"openai/gpt-4-turbo",name:"GPT-4 Turbo",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:10,output:30,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096},"openai/gpt-4.1":{id:"openai/gpt-4.1",name:"GPT-4.1",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:2,output:8,cacheRead:.5,cacheWrite:0},contextWindow:1047576,maxTokens:32768},"openai/gpt-4.1-mini":{id:"openai/gpt-4.1-mini",name:"GPT-4.1 mini",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:.4,output:1.6,cacheRead:.1,cacheWrite:0},contextWindow:1047576,maxTokens:32768},"openai/gpt-4.1-nano":{id:"openai/gpt-4.1-nano",name:"GPT-4.1 nano",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:.1,output:.4,cacheRead:.025,cacheWrite:0},contextWindow:1047576,maxTokens:32768},"openai/gpt-4o":{id:"openai/gpt-4o",name:"GPT-4o",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:2.5,output:10,cacheRead:1.25,cacheWrite:0},contextWindow:128e3,maxTokens:16384},"openai/gpt-4o-mini":{id:"openai/gpt-4o-mini",name:"GPT-4o mini",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:.15,output:.6,cacheRead:.075,cacheWrite:0},contextWindow:128e3,maxTokens:16384},"openai/gpt-5":{id:"openai/gpt-5",name:"GPT-5",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:0},contextWindow:4e5,maxTokens:128e3},"openai/gpt-5-codex":{id:"openai/gpt-5-codex",name:"GPT-5-Codex",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.13,cacheWrite:0},contextWindow:4e5,maxTokens:128e3},"openai/gpt-5-mini":{id:"openai/gpt-5-mini",name:"GPT-5 mini",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.25,output:2,cacheRead:.025,cacheWrite:0},contextWindow:4e5,maxTokens:128e3},"openai/gpt-5-nano":{id:"openai/gpt-5-nano",name:"GPT-5 nano",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.05,output:.4,cacheRead:.005,cacheWrite:0},contextWindow:4e5,maxTokens:128e3},"openai/gpt-5-pro":{id:"openai/gpt-5-pro",name:"GPT-5 pro",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:15,output:120,cacheRead:0,cacheWrite:0},contextWindow:4e5,maxTokens:272e3},"openai/gpt-5.1-codex":{id:"openai/gpt-5.1-codex",name:"GPT-5.1-Codex",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.13,cacheWrite:0},contextWindow:4e5,maxTokens:128e3},"openai/gpt-5.1-codex-max":{id:"openai/gpt-5.1-codex-max",name:"GPT 5.1 Codex Max",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:0},contextWindow:4e5,maxTokens:128e3},"openai/gpt-5.1-codex-mini":{id:"openai/gpt-5.1-codex-mini",name:"GPT 5.1 Codex Mini",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.25,output:2,cacheRead:.03,cacheWrite:0},contextWindow:4e5,maxTokens:128e3},"openai/gpt-5.1-instant":{id:"openai/gpt-5.1-instant",name:"GPT-5.1 Instant",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.13,cacheWrite:0},contextWindow:128e3,maxTokens:16384},"openai/gpt-5.1-thinking":{id:"openai/gpt-5.1-thinking",name:"GPT 5.1 Thinking",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:0},contextWindow:4e5,maxTokens:128e3},"openai/gpt-5.2":{id:"openai/gpt-5.2",name:"GPT 5.2",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.2-codex":{id:"openai/gpt-5.2-codex",name:"GPT 5.2 Codex",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.2-pro":{id:"openai/gpt-5.2-pro",name:"GPT 5.2 ",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:21,output:168,cacheRead:0,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.3-chat":{id:"openai/gpt-5.3-chat",name:"GPT-5.3 Chat",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:128e3,maxTokens:16384,thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.3-codex":{id:"openai/gpt-5.3-codex",name:"GPT 5.3 Codex",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.4":{id:"openai/gpt-5.4",name:"GPT 5.4",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:2.5,output:15,cacheRead:.25,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.4-mini":{id:"openai/gpt-5.4-mini",name:"GPT 5.4 Mini",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.75,output:4.5,cacheRead:.075,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.4-nano":{id:"openai/gpt-5.4-nano",name:"GPT 5.4 Nano",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.2,output:1.25,cacheRead:.02,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.4-pro":{id:"openai/gpt-5.4-pro",name:"GPT 5.4 Pro",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:30,output:180,cacheRead:0,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.5":{id:"openai/gpt-5.5",name:"GPT 5.5",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:0},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.5-pro":{id:"openai/gpt-5.5-pro",name:"GPT 5.5 Pro",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:30,output:180,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",off:null,minimal:null,low:null}},"openai/gpt-5.6-luna":{id:"openai/gpt-5.6-luna",name:"GPT 5.6 Luna",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.2,output:1.2,cacheRead:.02,cacheWrite:.25},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.6-sol":{id:"openai/gpt-5.6-sol",name:"GPT 5.6 Sol",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:6.25},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.6-terra":{id:"openai/gpt-5.6-terra",name:"GPT 5.6 Terra",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:2,output:12,cacheRead:.2,cacheWrite:2.5},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-oss-120b":{id:"openai/gpt-oss-120b",name:"GPT OSS 120B",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.1,output:.5,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:131072},"openai/gpt-oss-20b":{id:"openai/gpt-oss-20b",name:"GPT OSS 20B",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.05,output:.2,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:8192},"openai/gpt-oss-safeguard-20b":{id:"openai/gpt-oss-safeguard-20b",name:"GPT OSS Safeguard 20B",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.075,output:.3,cacheRead:.037,cacheWrite:0},contextWindow:131072,maxTokens:65536},"openai/o1":{id:"openai/o1",name:"o1",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:15,output:60,cacheRead:7.5,cacheWrite:0},contextWindow:2e5,maxTokens:1e5},"openai/o3":{id:"openai/o3",name:"o3",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:2,output:8,cacheRead:.5,cacheWrite:0},contextWindow:2e5,maxTokens:1e5},"openai/o3-deep-research":{id:"openai/o3-deep-research",name:"o3-deep-research",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:10,output:40,cacheRead:2.5,cacheWrite:0},contextWindow:2e5,maxTokens:1e5},"openai/o3-mini":{id:"openai/o3-mini",name:"o3-mini",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:1.1,output:4.4,cacheRead:.55,cacheWrite:0},contextWindow:2e5,maxTokens:1e5},"openai/o3-pro":{id:"openai/o3-pro",name:"o3 Pro",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:20,output:80,cacheRead:0,cacheWrite:0},contextWindow:2e5,maxTokens:1e5},"openai/o4-mini":{id:"openai/o4-mini",name:"o4-mini",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.1,output:4.4,cacheRead:.275,cacheWrite:0},contextWindow:2e5,maxTokens:1e5},"poolside/laguna-s-2.1":{id:"poolside/laguna-s-2.1",name:"Laguna S 2.1",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.1,output:.2,cacheRead:.01,cacheWrite:0},contextWindow:1e6,maxTokens:131072},"poolside/laguna-s-2.1-free":{id:"poolside/laguna-s-2.1-free",name:"Laguna S 2.1 Free",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:32768},"sakana/fugu-ultra":{id:"sakana/fugu-ultra",name:"Fugu Ultra",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:0},contextWindow:1e6,maxTokens:1e6},"stepfun/step-3.5-flash":{id:"stepfun/step-3.5-flash",name:"StepFun 3.5 Flash",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.09,output:.3,cacheRead:.02,cacheWrite:0},contextWindow:262114,maxTokens:262114},"stepfun/step-3.7-flash":{id:"stepfun/step-3.7-flash",name:"Step 3.7 Flash",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.2,output:1.15,cacheRead:.04,cacheWrite:0},contextWindow:256e3,maxTokens:256e3},"tencent/hy3":{id:"tencent/hy3",name:"Hy3",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.14,output:.58,cacheRead:.035,cacheWrite:0},contextWindow:262144,maxTokens:262144},"thinkingmachines/inkling":{id:"thinkingmachines/inkling",name:"Inkling",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1,output:4.05,cacheRead:.17,cacheWrite:0},contextWindow:256e3,maxTokens:256e3},"thinkingmachines/inkling-small":{id:"thinkingmachines/inkling-small",name:"Inkling Small",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.5,output:1.2,cacheRead:.1,cacheWrite:0},contextWindow:1e6,maxTokens:1e6},"xai/grok-4.1-fast-non-reasoning":{id:"xai/grok-4.1-fast-non-reasoning",name:"Grok 4.1 Fast Non-Reasoning",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:.2,output:.5,cacheRead:.05,cacheWrite:0},contextWindow:1e6,maxTokens:1e6},"xai/grok-4.1-fast-reasoning":{id:"xai/grok-4.1-fast-reasoning",name:"Grok 4.1 Fast Reasoning",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.2,output:.5,cacheRead:.05,cacheWrite:0},contextWindow:1e6,maxTokens:1e6},"xai/grok-4.20-multi-agent":{id:"xai/grok-4.20-multi-agent",name:"Grok 4.20 Multi-Agent",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.25,output:2.5,cacheRead:.2,cacheWrite:0},contextWindow:2e6,maxTokens:2e6},"xai/grok-4.20-multi-agent-beta":{id:"xai/grok-4.20-multi-agent-beta",name:"Grok 4.20 Multi Agent Beta",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.25,output:2.5,cacheRead:.2,cacheWrite:0},contextWindow:2e6,maxTokens:2e6},"xai/grok-4.20-non-reasoning":{id:"xai/grok-4.20-non-reasoning",name:"Grok 4.20 Non-Reasoning",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:1.25,output:2.5,cacheRead:.2,cacheWrite:0},contextWindow:2e6,maxTokens:2e6},"xai/grok-4.20-non-reasoning-beta":{id:"xai/grok-4.20-non-reasoning-beta",name:"Grok 4.20 Beta Non-Reasoning",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:1.25,output:2.5,cacheRead:.2,cacheWrite:0},contextWindow:2e6,maxTokens:2e6},"xai/grok-4.20-reasoning":{id:"xai/grok-4.20-reasoning",name:"Grok 4.20 Reasoning",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.25,output:2.5,cacheRead:.2,cacheWrite:0},contextWindow:2e6,maxTokens:2e6},"xai/grok-4.20-reasoning-beta":{id:"xai/grok-4.20-reasoning-beta",name:"Grok 4.20 Beta Reasoning",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.25,output:2.5,cacheRead:.2,cacheWrite:0},contextWindow:2e6,maxTokens:2e6},"xai/grok-4.3":{id:"xai/grok-4.3",name:"Grok 4.3",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.25,output:2.5,cacheRead:.2,cacheWrite:0},contextWindow:1e6,maxTokens:1e6},"xai/grok-4.5":{id:"xai/grok-4.5",name:"Grok 4.5",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:2,output:6,cacheRead:.3,cacheWrite:0},contextWindow:5e5,maxTokens:5e5},"xai/grok-build-0.1":{id:"xai/grok-build-0.1",name:"Grok Build 0.1",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1,output:2,cacheRead:.2,cacheWrite:0},contextWindow:256e3,maxTokens:256e3},"xiaomi/mimo-v2.5":{id:"xiaomi/mimo-v2.5",name:"MiMo M2.5",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.14,output:.28,cacheRead:.0028,cacheWrite:0},contextWindow:105e4,maxTokens:131100},"xiaomi/mimo-v2.5-pro":{id:"xiaomi/mimo-v2.5-pro",name:"MiMo V2.5 Pro",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.435,output:.87,cacheRead:.0036,cacheWrite:0},contextWindow:105e4,maxTokens:131e3},"zai/glm-4.5":{id:"zai/glm-4.5",name:"GLM 4.5",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.6,output:2.2,cacheRead:.11,cacheWrite:0},contextWindow:128e3,maxTokens:96e3},"zai/glm-4.5-air":{id:"zai/glm-4.5-air",name:"GLM 4.5 Air",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.2,output:1.1,cacheRead:.03,cacheWrite:0},contextWindow:128e3,maxTokens:96e3},"zai/glm-4.5v":{id:"zai/glm-4.5v",name:"GLM 4.5V",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.6,output:1.8,cacheRead:.11,cacheWrite:0},contextWindow:66e3,maxTokens:16e3},"zai/glm-4.6":{id:"zai/glm-4.6",name:"GLM 4.6",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.6,output:2.2,cacheRead:.11,cacheWrite:0},contextWindow:2e5,maxTokens:96e3},"zai/glm-4.6v":{id:"zai/glm-4.6v",name:"GLM-4.6V",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.3,output:.9,cacheRead:.05,cacheWrite:0},contextWindow:128e3,maxTokens:24e3},"zai/glm-4.6v-flash":{id:"zai/glm-4.6v-flash",name:"GLM-4.6V-Flash",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:24e3},"zai/glm-4.7":{id:"zai/glm-4.7",name:"GLM 4.7",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.6,output:2.2,cacheRead:.12,cacheWrite:0},contextWindow:2e5,maxTokens:12e4},"zai/glm-4.7-flash":{id:"zai/glm-4.7-flash",name:"GLM 4.7 Flash",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.07,output:.4,cacheRead:0,cacheWrite:0},contextWindow:2e5,maxTokens:131e3},"zai/glm-4.7-flashx":{id:"zai/glm-4.7-flashx",name:"GLM 4.7 FlashX",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.06,output:.4,cacheRead:.01,cacheWrite:0},contextWindow:2e5,maxTokens:128e3},"zai/glm-5":{id:"zai/glm-5",name:"GLM 5",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:1,output:3.2,cacheRead:0,cacheWrite:0},contextWindow:202800,maxTokens:131100},"zai/glm-5-turbo":{id:"zai/glm-5-turbo",name:"GLM 5 Turbo",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:1.2,output:4,cacheRead:.24,cacheWrite:0},contextWindow:202800,maxTokens:131100},"zai/glm-5.1":{id:"zai/glm-5.1",name:"GLM 5.1",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:1.4,output:4.4,cacheRead:.26,cacheWrite:0},contextWindow:202800,maxTokens:64e3},"zai/glm-5.2":{id:"zai/glm-5.2",name:"GLM 5.2",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:1.1,output:3.851,cacheRead:.275,cacheWrite:0},contextWindow:1e6,maxTokens:128e3},"zai/glm-5.2-fast":{id:"zai/glm-5.2-fast",name:"GLM 5.2 Fast",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:2.1,output:6.6,cacheRead:.21,cacheWrite:0},contextWindow:1e6,maxTokens:128e3},"zai/glm-5v-turbo":{id:"zai/glm-5v-turbo",name:"GLM 5V Turbo",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.2,output:4,cacheRead:.24,cacheWrite:0},contextWindow:2e5,maxTokens:128e3}}};var X1=J("vercel-ai-gateway",Y1);var Z1={"openai-completions":{"grok-4.3":{id:"grok-4.3",name:"Grok 4.3",api:"openai-completions",provider:"xai",baseUrl:"https://api.x.ai/v1",reasoning:!0,input:["text","image"],cost:{input:1.25,output:2.5,cacheRead:.2,cacheWrite:0},contextWindow:1e6,maxTokens:3e4,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1}},"grok-build-0.1":{id:"grok-build-0.1",name:"Grok Build 0.1",api:"openai-completions",provider:"xai",baseUrl:"https://api.x.ai/v1",reasoning:!0,input:["text","image"],cost:{input:1,output:2,cacheRead:.2,cacheWrite:0},contextWindow:256e3,maxTokens:256e3,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1}}},"openai-responses":{"grok-4.5":{id:"grok-4.5",name:"Grok 4.5",api:"openai-responses",provider:"xai",baseUrl:"https://api.x.ai/v1",compat:{supportsLongCacheRetention:!1},reasoning:!0,input:["text","image"],cost:{input:2,output:6,cacheRead:.3,cacheWrite:0},contextWindow:5e5,maxTokens:5e5,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}}}};var eM=J("xai",Z1);var tM={"openai-completions":{"mimo-v2-flash":{id:"mimo-v2-flash",name:"MiMo-V2-Flash",api:"openai-completions",provider:"xiaomi",baseUrl:"https://api.xiaomimimo.com/v1",compat:{requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"deepseek"},reasoning:!0,input:["text"],cost:{input:.14,output:.28,cacheRead:.0028,cacheWrite:0},contextWindow:262144,maxTokens:65536},"mimo-v2-omni":{id:"mimo-v2-omni",name:"MiMo-V2-Omni",api:"openai-completions",provider:"xiaomi",baseUrl:"https://api.xiaomimimo.com/v1",compat:{requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"deepseek"},reasoning:!0,input:["text","image"],cost:{input:.14,output:.28,cacheRead:.0028,cacheWrite:0},contextWindow:262144,maxTokens:131072},"mimo-v2-pro":{id:"mimo-v2-pro",name:"MiMo-V2-Pro",api:"openai-completions",provider:"xiaomi",baseUrl:"https://api.xiaomimimo.com/v1",compat:{requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"deepseek"},reasoning:!0,input:["text"],cost:{input:.435,output:.87,cacheRead:.0036,cacheWrite:0},contextWindow:1048576,maxTokens:131072},"mimo-v2.5":{id:"mimo-v2.5",name:"MiMo-V2.5",api:"openai-completions",provider:"xiaomi",baseUrl:"https://api.xiaomimimo.com/v1",compat:{requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"deepseek"},reasoning:!0,input:["text","image"],cost:{input:.14,output:.28,cacheRead:.0028,cacheWrite:0},contextWindow:1048576,maxTokens:131072},"mimo-v2.5-pro":{id:"mimo-v2.5-pro",name:"MiMo-V2.5-Pro",api:"openai-completions",provider:"xiaomi",baseUrl:"https://api.xiaomimimo.com/v1",compat:{requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"deepseek"},reasoning:!0,input:["text"],cost:{input:.435,output:.87,cacheRead:.0036,cacheWrite:0},contextWindow:1048576,maxTokens:131072},"mimo-v2.5-pro-ultraspeed":{id:"mimo-v2.5-pro-ultraspeed",name:"MiMo-V2.5-Pro-UltraSpeed",api:"openai-completions",provider:"xiaomi",baseUrl:"https://api.xiaomimimo.com/v1",compat:{requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"deepseek"},reasoning:!0,input:["text"],cost:{input:1.305,output:2.61,cacheRead:.0108,cacheWrite:0},contextWindow:1048576,maxTokens:131072}}};var nM=J("xiaomi",tM);var iM={"openai-completions":{"mimo-v2-pro":{id:"mimo-v2-pro",name:"MiMo-V2-Pro",api:"openai-completions",provider:"xiaomi-token-plan-ams",baseUrl:"https://token-plan-ams.xiaomimimo.com/v1",compat:{requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"deepseek"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1048576,maxTokens:131072},"mimo-v2.5":{id:"mimo-v2.5",name:"MiMo-V2.5",api:"openai-completions",provider:"xiaomi-token-plan-ams",baseUrl:"https://token-plan-ams.xiaomimimo.com/v1",compat:{requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"deepseek"},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1048576,maxTokens:131072},"mimo-v2.5-pro":{id:"mimo-v2.5-pro",name:"MiMo-V2.5-Pro",api:"openai-completions",provider:"xiaomi-token-plan-ams",baseUrl:"https://token-plan-ams.xiaomimimo.com/v1",compat:{requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"deepseek"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1048576,maxTokens:131072}}};var rM=J("xiaomi-token-plan-ams",iM);var oM={"openai-completions":{"mimo-v2-pro":{id:"mimo-v2-pro",name:"MiMo-V2-Pro",api:"openai-completions",provider:"xiaomi-token-plan-cn",baseUrl:"https://token-plan-cn.xiaomimimo.com/v1",compat:{requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"deepseek"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1048576,maxTokens:131072},"mimo-v2.5":{id:"mimo-v2.5",name:"MiMo-V2.5",api:"openai-completions",provider:"xiaomi-token-plan-cn",baseUrl:"https://token-plan-cn.xiaomimimo.com/v1",compat:{requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"deepseek"},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1048576,maxTokens:131072},"mimo-v2.5-pro":{id:"mimo-v2.5-pro",name:"MiMo-V2.5-Pro",api:"openai-completions",provider:"xiaomi-token-plan-cn",baseUrl:"https://token-plan-cn.xiaomimimo.com/v1",compat:{requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"deepseek"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1048576,maxTokens:131072}}};var sM=J("xiaomi-token-plan-cn",oM);var aM={"openai-completions":{"mimo-v2-pro":{id:"mimo-v2-pro",name:"MiMo-V2-Pro",api:"openai-completions",provider:"xiaomi-token-plan-sgp",baseUrl:"https://token-plan-sgp.xiaomimimo.com/v1",compat:{requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"deepseek"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1048576,maxTokens:131072},"mimo-v2.5":{id:"mimo-v2.5",name:"MiMo-V2.5",api:"openai-completions",provider:"xiaomi-token-plan-sgp",baseUrl:"https://token-plan-sgp.xiaomimimo.com/v1",compat:{requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"deepseek"},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1048576,maxTokens:131072},"mimo-v2.5-pro":{id:"mimo-v2.5-pro",name:"MiMo-V2.5-Pro",api:"openai-completions",provider:"xiaomi-token-plan-sgp",baseUrl:"https://token-plan-sgp.xiaomimimo.com/v1",compat:{requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"deepseek"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1048576,maxTokens:131072}}};var lM=J("xiaomi-token-plan-sgp",aM);var cM={"openai-completions":{"glm-4.7":{id:"glm-4.7",name:"GLM-4.7",api:"openai-completions",provider:"zai",baseUrl:"https://api.z.ai/api/coding/paas/v4",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"zai",zaiToolStream:!0},contextWindow:204800,maxTokens:131072},"glm-5-turbo":{id:"glm-5-turbo",name:"GLM-5-Turbo",api:"openai-completions",provider:"zai",baseUrl:"https://api.z.ai/api/coding/paas/v4",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"zai",zaiToolStream:!0},contextWindow:2e5,maxTokens:131072},"glm-5.2":{id:"glm-5.2",name:"GLM-5.2",api:"openai-completions",provider:"zai",baseUrl:"https://api.z.ai/api/coding/paas/v4",reasoning:!0,thinkingLevelMap:{minimal:null,low:"high",medium:"high",high:"high",max:"max"},input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!0,maxTokensField:"max_tokens",thinkingFormat:"zai",zaiToolStream:!0},contextWindow:1e6,maxTokens:131072},"glm-5.2-highspeed":{id:"glm-5.2-highspeed",name:"GLM-5.2 Highspeed",api:"openai-completions",provider:"zai",baseUrl:"https://api.z.ai/api/coding/paas/v4",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"zai",zaiToolStream:!0},contextWindow:1e6,maxTokens:131072}}};var uM=J("zai",cM);var pM={"openai-completions":{"glm-4.7":{id:"glm-4.7",name:"GLM-4.7",api:"openai-completions",provider:"zai-coding-cn",baseUrl:"https://open.bigmodel.cn/api/coding/paas/v4",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"zai",zaiToolStream:!0},contextWindow:204800,maxTokens:131072},"glm-5-turbo":{id:"glm-5-turbo",name:"GLM-5-Turbo",api:"openai-completions",provider:"zai-coding-cn",baseUrl:"https://open.bigmodel.cn/api/coding/paas/v4",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"zai",zaiToolStream:!0},contextWindow:2e5,maxTokens:131072},"glm-5.2":{id:"glm-5.2",name:"GLM-5.2",api:"openai-completions",provider:"zai-coding-cn",baseUrl:"https://open.bigmodel.cn/api/coding/paas/v4",reasoning:!0,thinkingLevelMap:{minimal:null,low:"high",medium:"high",high:"high",max:"max"},input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!0,maxTokensField:"max_tokens",thinkingFormat:"zai",zaiToolStream:!0},contextWindow:1e6,maxTokens:131072},"glm-5.2-highspeed":{id:"glm-5.2-highspeed",name:"GLM-5.2 Highspeed",api:"openai-completions",provider:"zai-coding-cn",baseUrl:"https://open.bigmodel.cn/api/coding/paas/v4",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"zai",zaiToolStream:!0},contextWindow:1e6,maxTokens:131072}}};var dM=J("zai-coding-cn",pM);xe();xe();var M6={name:"AWS credentials or bearer token",login:async t=>{t.signal.throwIfAborted();let e=await t.prompt({type:"select",message:"Select Amazon Bedrock authentication method:",options:[{id:"bearer-token",label:"Bearer token"},{id:"aws-profile",label:"AWS profile"},{id:"credential-chain",label:"Existing AWS credential chain"}]});if(t.signal.throwIfAborted(),e==="bearer-token")return{type:"api_key",key:await t.prompt({type:"secret",message:"Enter Amazon Bedrock bearer token"})};if(t.notify({type:"info",message:"Amazon Bedrock supports AWS profiles, IAM credentials, and role-based credentials.",links:[{label:"AWS credential provider chain",url:"https://docs.aws.amazon.com/sdkref/latest/guide/standardized-credentials.html"}]}),e==="aws-profile")return{type:"api_key",env:{AWS_PROFILE:await t.prompt({type:"text",message:"Enter AWS profile name"})}};if(e!=="credential-chain")throw new Error(`Unknown Amazon Bedrock auth method: ${e}`);return await t.prompt({type:"text",message:"Configure AWS credentials, then press Enter to continue"}),{type:"api_key"}},resolve:async({ctx:t,credential:e,signal:n})=>{let i=async r=>{n.throwIfAborted();let o=await t.env(r);return n.throwIfAborted(),o};if(e?.key)return{auth:{apiKey:e.key},env:e.env,source:"stored credential"};if(await i("AWS_BEARER_TOKEN_BEDROCK"))return{auth:{},source:"AWS_BEARER_TOKEN_BEDROCK"};if(e?.env?.AWS_PROFILE??await i("AWS_PROFILE"))return{auth:{},env:e?.env,source:e?.env?.AWS_PROFILE?"stored credential":"AWS_PROFILE"};if(await i("AWS_ACCESS_KEY_ID")&&await i("AWS_SECRET_ACCESS_KEY"))return{auth:{},source:"AWS access keys"};if(await i("AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"))return{auth:{},source:"ECS task role"};if(await i("AWS_CONTAINER_CREDENTIALS_FULL_URI"))return{auth:{},source:"ECS task role"};if(await i("AWS_WEB_IDENTITY_TOKEN_FILE"))return{auth:{},source:"web identity token"}}};function mM(){return Q({id:"amazon-bedrock",name:"Amazon Bedrock",auth:{apiKey:M6},models:Object.values(GR),api:zd()})}xe();function hM(){return Q({id:"ant-ling",name:"Ant Ling",baseUrl:"https://api.ant-ling.com/v1",auth:{apiKey:ie("Ant Ling API key",["ANT_LING_API_KEY"])},models:Object.values(HR),api:he()})}var zo=t=>import(import.meta.url.endsWith(".js")?t.replace(/\.ts$/,".js"):t),dn;var gM=async()=>dn?dn.anthropic():(await zo("./anthropic.ts")).anthropicOAuth,fM=async()=>dn?dn.openaiCodex():(await zo("./openai-codex.ts")).openaiCodexOAuth,bM=async()=>dn?dn.githubCopilot():(await zo("./github-copilot.ts")).githubCopilotOAuth,xM=async()=>dn?dn.openrouter():(await zo("./openrouter.ts")).openRouterOAuth,vM=async()=>dn?dn.kimiCoding():(await zo("./kimi-coding.ts")).kimiCodingOAuth,yM=async()=>dn?dn.xai():(await zo("./xai.ts")).xaiOAuth,wM=async t=>dn?dn.radius(t):(await zo("./radius.ts")).createRadiusOAuth(t);xe();function P6(){return{name:"Anthropic API key",login:async t=>{t.signal.throwIfAborted();let e=await t.prompt({type:"secret",message:"Enter Anthropic API key"});return t.signal.throwIfAborted(),{type:"api_key",key:e}},resolve:async({ctx:t,credential:e,signal:n})=>{if(n.throwIfAborted(),e?.key)return{auth:{apiKey:e.key},env:e.env,source:"stored credential"};let i=await t.env(ou);if(n.throwIfAborted(),i)return{auth:{headers:{Authorization:`Bearer ${i}`}},source:ou};for(let r of[pb,db]){let o=await t.env(r);if(n.throwIfAborted(),o)return{auth:{apiKey:o},source:r}}}}}function SM(){return Q({id:"anthropic",name:"Anthropic",baseUrl:"https://api.anthropic.com",auth:{apiKey:P6(),oauth:un({name:"Anthropic (Claude Pro/Max)",isSubscription:!0,load:gM})},models:Object.values(VR),api:dt()})}xe();function TM(){return Q({id:"azure-openai-responses",name:"Azure OpenAI",auth:{apiKey:ie("Azure OpenAI API key",["AZURE_OPENAI_API_KEY"])},models:Object.values(JR),api:Hd()})}xe();function kM(){return Q({id:"baseten",name:"Baseten",baseUrl:"https://inference.baseten.co/v1",auth:{apiKey:ie("Baseten API key",["BASETEN_API_KEY"])},models:Object.values(XR),api:he()})}xe();function CM(){return Q({id:"cerebras",name:"Cerebras",baseUrl:"https://api.cerebras.ai/v1",auth:{apiKey:ie("Cerebras API key",["CEREBRAS_API_KEY"])},models:Object.values(e1),api:he()})}xe();var hb="CLOUDFLARE_API_KEY",I6="CLOUDFLARE_ACCOUNT_ID",A6="CLOUDFLARE_GATEWAY_ID";async function mb(t,e,n,i){let r=n?t===hb?n.key:n.env?.[t]:void 0;if(r!==void 0)return r;i.throwIfAborted();let o=await e.env(t);return i.throwIfAborted(),o}async function RM(t,e,n,i){let r=await mb(hb,e,n,i),o=await mb(I6,e,n,i),s=t==="ai-gateway"?await mb(A6,e,n,i):void 0;if(!(!r||!o||t==="ai-gateway"&&!s))return{apiKey:r,env:{CLOUDFLARE_ACCOUNT_ID:o,...s?{CLOUDFLARE_GATEWAY_ID:s}:{}},source:n?"stored credential":hb}}function MM(){return{name:"Cloudflare API key",login:async t=>{let e=await t.prompt({type:"secret",message:"Enter Cloudflare API key"}),n=await t.prompt({type:"text",message:"Enter Cloudflare account ID"});return{type:"api_key",key:e,env:{CLOUDFLARE_ACCOUNT_ID:n}}},resolve:async({ctx:t,credential:e,signal:n})=>{let i=await RM("workers-ai",t,e,n);if(i)return{auth:{apiKey:i.apiKey},env:i.env,source:i.source}}}}function PM(){return{name:"Cloudflare API key",login:async t=>{let e=await t.prompt({type:"secret",message:"Enter Cloudflare API key"}),n=await t.prompt({type:"text",message:"Enter Cloudflare account ID"}),i=await t.prompt({type:"text",message:"Enter Cloudflare AI Gateway ID"});return{type:"api_key",key:e,env:{CLOUDFLARE_ACCOUNT_ID:n,CLOUDFLARE_GATEWAY_ID:i}}},resolve:async({ctx:t,credential:e,signal:n})=>{let i=await RM("ai-gateway",t,e,n);if(i)return{auth:{headers:{"cf-aig-authorization":`Bearer ${i.apiKey}`,Authorization:null,"x-api-key":null}},env:i.env,source:i.source}}}}var gb="CLOUDFLARE_ACCOUNT_ID",fb="CLOUDFLARE_GATEWAY_ID";function IM(t,e){if(!e)return t;let n=t.baseUrl.replaceAll(`{${gb}}`,e[gb]??`{${gb}}`).replaceAll(`{${fb}}`,e[fb]??`{${fb}}`);return n===t.baseUrl?t:{...t,baseUrl:n}}function el(t){return{stream:(e,n,i)=>t.stream(IM(e,i?.env),n,i),streamSimple:(e,n,i)=>t.streamSimple(IM(e,i?.env),n,i)}}function AM(){return Q({id:"cloudflare-ai-gateway",name:"Cloudflare AI Gateway",auth:{apiKey:PM()},models:Object.values(n1),api:{"anthropic-messages":el(dt()),"openai-completions":el(he()),"openai-responses":el(pn())}})}xe();function EM(){return Q({id:"cloudflare-workers-ai",name:"Cloudflare Workers AI",auth:{apiKey:MM()},models:Object.values(r1),api:el(he())})}xe();function _M(){return Q({id:"deepseek",name:"DeepSeek",baseUrl:"https://api.deepseek.com",auth:{apiKey:ie("DeepSeek API key",["DEEPSEEK_API_KEY"])},models:Object.values(s1),api:he()})}xe();function OM(){return Q({id:"fireworks",name:"Fireworks",baseUrl:"https://api.fireworks.ai/inference",auth:{apiKey:ie("Fireworks API key",["FIREWORKS_API_KEY"])},models:Object.values(l1),api:{"anthropic-messages":dt(),"openai-completions":he()}})}xe();function LM(){return Q({id:"github-copilot",name:"GitHub Copilot",baseUrl:"https://api.individual.githubcopilot.com",auth:{apiKey:ie("GitHub Copilot token",["COPILOT_GITHUB_TOKEN"]),oauth:un({name:"GitHub Copilot",isSubscription:!0,load:bM})},models:Object.values(u1),filterModels:(t,e)=>{if(e?.type!=="oauth")return t;let n=e.availableModelIds;if(!Array.isArray(n)||!n.every(r=>typeof r=="string"))return t;let i=new Set(n);return t.filter(r=>i.has(r.id))},api:{"anthropic-messages":dt(),"openai-completions":he(),"openai-responses":pn()}})}xe();function WM(){return Q({id:"google",name:"Google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",auth:{apiKey:ie("Gemini API key",["GEMINI_API_KEY"])},models:Object.values(d1),api:Ya()})}xe();var E6="~/.config/gcloud/application_default_credentials.json",_6={name:"Google Cloud credentials",login:async t=>{t.signal.throwIfAborted();let e=await t.prompt({type:"select",message:"Select Google Vertex AI authentication method:",options:[{id:"api-key",label:"Google Cloud API key"},{id:"adc",label:"Application Default Credentials"},{id:"service-account",label:"Service account credentials file"}]});if(t.signal.throwIfAborted(),e==="api-key")return{type:"api_key",key:await t.prompt({type:"secret",message:"Enter Google Cloud API key"})};if(e!=="adc"&&e!=="service-account")throw new Error(`Unknown Google Vertex AI auth method: ${e}`);t.notify({type:"info",message:e==="adc"?"Run `gcloud auth application-default login`, then provide the project and location.":"Provide a service account credentials file, project, and location.",links:[{label:"Application Default Credentials",url:"https://cloud.google.com/docs/authentication/provide-credentials-adc"}]});let n=await t.prompt({type:"text",message:"Enter Google Cloud project ID"}),i=await t.prompt({type:"text",message:"Enter Google Cloud location"}),r=e==="service-account"?await t.prompt({type:"text",message:"Enter service account credentials file path"}):void 0;return{type:"api_key",env:{GOOGLE_CLOUD_PROJECT:n,GOOGLE_CLOUD_LOCATION:i,...r?{GOOGLE_APPLICATION_CREDENTIALS:r}:{}}}},resolve:async({ctx:t,credential:e,signal:n})=>{let i=async c=>{n.throwIfAborted();let u=await t.env(c);return n.throwIfAborted(),u},r=e?.key??await i("GOOGLE_CLOUD_API_KEY");if(r)return{auth:{apiKey:r},source:e?.key?"stored credential":"GOOGLE_CLOUD_API_KEY"};let o=e?.env?.GOOGLE_APPLICATION_CREDENTIALS??await i("GOOGLE_APPLICATION_CREDENTIALS");n.throwIfAborted();let s=await t.fileExists(o??E6);n.throwIfAborted();let a=e?.env?.GOOGLE_CLOUD_PROJECT??await i("GOOGLE_CLOUD_PROJECT")??await i("GCLOUD_PROJECT"),l=e?.env?.GOOGLE_CLOUD_LOCATION??await i("GOOGLE_CLOUD_LOCATION");if(s&&a&&l)return{auth:{},env:e?.env,source:e?"stored credential":"gcloud application default credentials"}}};function FM(){return Q({id:"google-vertex",name:"Google Vertex AI",auth:{apiKey:_6},models:Object.values(h1),api:im()})}xe();function DM(){return Q({id:"groq",name:"Groq",baseUrl:"https://api.groq.com/openai/v1",auth:{apiKey:ie("Groq API key",["GROQ_API_KEY"])},models:Object.values(f1),api:he()})}xe();function UM(){return Q({id:"huggingface",name:"Hugging Face",baseUrl:"https://router.huggingface.co/v1",auth:{apiKey:ie("Hugging Face token",["HF_TOKEN"])},models:Object.values(x1),api:he()})}xe();function $M(){return Q({id:"kimi-coding",name:"Kimi For Coding",baseUrl:"https://api.kimi.com/coding",auth:{apiKey:ie("Kimi API key",["KIMI_API_KEY"]),oauth:un({name:"Kimi Code (subscription)",isSubscription:!0,loginLabel:"Sign in with Kimi Code",load:vM})},models:Object.values(y1),api:dt()})}xe();function NM(){return Q({id:"minimax",name:"MiniMax",baseUrl:"https://api.minimax.io/anthropic",auth:{apiKey:ie("MiniMax API key",["MINIMAX_API_KEY"])},models:Object.values(S1),api:dt()})}xe();function BM(){return Q({id:"minimax-cn",name:"MiniMax CN",baseUrl:"https://api.minimaxi.com/anthropic",auth:{apiKey:ie("MiniMax CN API key",["MINIMAX_CN_API_KEY"])},models:Object.values(k1),api:dt()})}xe();function jM(){return Q({id:"mistral",name:"Mistral",baseUrl:"https://api.mistral.ai",auth:{apiKey:ie("Mistral API key",["MISTRAL_API_KEY"])},models:Object.values(R1),api:rm()})}xe();function qM(){return Q({id:"moonshotai",name:"Moonshot AI",baseUrl:"https://api.moonshot.ai/v1",auth:{apiKey:ie("Moonshot AI API key",["MOONSHOT_API_KEY"])},models:Object.values(P1),api:he()})}xe();function GM(){return Q({id:"moonshotai-cn",name:"Moonshot AI CN",baseUrl:"https://api.moonshot.cn/v1",auth:{apiKey:ie("Moonshot AI API key",["MOONSHOT_API_KEY"])},models:Object.values(A1),api:he()})}xe();function KM(){return Q({id:"nvidia",name:"NVIDIA",baseUrl:"https://integrate.api.nvidia.com/v1",auth:{apiKey:ie("NVIDIA API key",["NVIDIA_API_KEY"])},models:Object.values(_1),api:he()})}xe();function HM(){return Q({id:"openai",name:"OpenAI",baseUrl:"https://api.openai.com/v1",auth:{apiKey:ie("OpenAI API key",["OPENAI_API_KEY"])},models:Object.values(L1),api:pn()})}xe();function zM(){return Q({id:"openai-codex",name:"OpenAI Codex",baseUrl:"https://chatgpt.com/backend-api",auth:{oauth:un({name:"OpenAI (ChatGPT Plus/Pro)",isSubscription:!0,load:fM})},models:Object.values(F1),api:cm()})}xe();function VM(){return Q({id:"opencode",name:"OpenCode Zen",auth:{apiKey:ie("OpenCode API key",["OPENCODE_API_KEY"])},models:Object.values(U1),api:{"anthropic-messages":dt(),"google-generative-ai":Ya(),"openai-completions":he(),"openai-responses":pn()}})}xe();function QM(){return Q({id:"opencode-go",name:"OpenCode Go",auth:{apiKey:ie("OpenCode API key",["OPENCODE_API_KEY"])},models:Object.values(N1),api:{"anthropic-messages":dt(),"openai-completions":he(),"openai-responses":pn()}})}xe();function JM(){return Q({id:"openrouter",name:"OpenRouter",baseUrl:"https://openrouter.ai/api/v1",auth:{apiKey:ie("OpenRouter API key",["OPENROUTER_API_KEY"]),oauth:un({name:"OpenRouter OAuth",loginLabel:"Sign in with OpenRouter",load:xM})},models:Object.values(j1),api:he()})}xe();function YM(){return Q({id:"qwen-token-plan",name:"Qwen Token Plan",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",auth:{apiKey:ie("Qwen Token Plan API key",["QWEN_TOKEN_PLAN_API_KEY"])},models:Object.values(G1),api:he()})}xe();function XM(){return Q({id:"qwen-token-plan-cn",name:"Qwen Token Plan CN",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",auth:{apiKey:ie("Qwen Token Plan CN API key",["QWEN_TOKEN_PLAN_CN_API_KEY"])},models:Object.values(H1),api:he()})}xe();function ZM(){return Q({id:"qwen-token-plan-individual",name:"Qwen Token Plan Individual",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",auth:{apiKey:ie("Qwen Token Plan Individual API key",["QWEN_TOKEN_PLAN_API_KEY"])},models:Object.values(V1),api:he()})}var eP="https://radius.pi.dev";function O6(t){if(typeof t!="object"||t===null||Array.isArray(t))return!1;let e=t;return typeof e.id=="string"&&typeof e.name=="string"&&typeof e.reasoning=="boolean"&&Array.isArray(e.input)&&typeof e.cost=="object"&&e.cost!==null&&!Array.isArray(e.cost)&&typeof e.contextWindow=="number"&&typeof e.maxTokens=="number"}function tP(t){if(typeof t!="object"||t===null||Array.isArray(t))return;let{baseUrl:e,models:n}=t;if(!(typeof e!="string"||!Array.isArray(n)))return{baseUrl:e,models:n.filter(O6).map(i=>({...i}))}}function nP(t){return(/^https?:\/\//iu.test(t)?t:`https://${t}`).replace(/\/+$/u,"")}function L6(t){return tP(t?.gatewayConfig)}function bb(t,e){return e.models.map(n=>({...n,api:"pi-messages",provider:t,baseUrl:e.baseUrl}))}function xb(t,e){let n=L6(e);return n?bb(t,n):[]}function W6(t){let e=t.trim();return e.length>512?`${e.slice(0,512)}\u2026`:e}async function iP(t,e,n){let i={accept:"application/json"};e&&(i.authorization=`Bearer ${e}`);let r=await fetch(new URL("/v1/config",t),{headers:i,signal:n});if(!r.ok)throw new Error(`Could not load Radius config from ${t}: ${r.status}: ${W6(await r.text())}`);let o=tP(await r.json());if(!o)throw new Error(`Invalid Radius config from ${t}`);return o}function rP(t={}){let e=t.id??"radius",n=t.name??"Radius",i=nP(t.gateway??eP),r=xb(e,void 0),o=um();return{id:e,name:n,auth:{apiKey:ie("Radius API key",["RADIUS_API_KEY"]),oauth:un({name:n,load:()=>wM({name:n,gateway:i})})},getModels:()=>r,refreshModels:async s=>{let a=s.stored;if(a){let p=a.models.filter(d=>d.provider===e);if(!await s.publish({update:()=>{r=p}}))return}if(!a&&s.credential?.type==="oauth"){let p=xb(e,s.credential);if(p.length>0&&!await s.publish({persist:{models:p,checkedAt:Date.now()},update:()=>{r=p}}))return}if(!s.allowNetwork||s.signal.aborted)return;let l=s.credential?.type==="oauth"?s.credential.access:s.credential?.key,c=await iP(i,l,s.signal);if(s.signal.aborted)return;let u=bb(e,c);await s.publish({persist:{models:u,checkedAt:Date.now()},update:()=>{r=u}})},stream:(s,a,l)=>o.stream(s,a,l),streamSimple:(s,a,l)=>o.streamSimple(s,a,l)}}xe();function oP(){return Q({id:"together",name:"Together",baseUrl:"https://api.together.ai/v1",auth:{apiKey:ie("Together API key",["TOGETHER_API_KEY"])},models:Object.values(J1),api:he()})}xe();function sP(){return Q({id:"vercel-ai-gateway",name:"Vercel AI Gateway",baseUrl:"https://ai-gateway.vercel.sh",auth:{apiKey:ie("Vercel AI Gateway API key",["AI_GATEWAY_API_KEY"])},models:Object.values(X1),api:dt()})}xe();function aP(){return Q({id:"xai",name:"xAI",baseUrl:"https://api.x.ai/v1",auth:{apiKey:ie("xAI API key",["XAI_API_KEY"]),oauth:un({name:"xAI (Grok/X subscription)",isSubscription:!0,loginLabel:"Sign in with SuperGrok or X Premium",load:yM})},models:Object.values(eM),api:{"openai-completions":he(),"openai-responses":pn()}})}xe();function lP(){return Q({id:"xiaomi",name:"Xiaomi",baseUrl:"https://api.xiaomimimo.com/v1",auth:{apiKey:ie("Xiaomi API key",["XIAOMI_API_KEY"])},models:Object.values(nM),api:he()})}xe();function cP(){return Q({id:"xiaomi-token-plan-ams",name:"Xiaomi Token Plan AMS",baseUrl:"https://token-plan-ams.xiaomimimo.com/v1",auth:{apiKey:ie("Xiaomi Token Plan AMS API key",["XIAOMI_TOKEN_PLAN_AMS_API_KEY"])},models:Object.values(rM),api:he()})}xe();function uP(){return Q({id:"xiaomi-token-plan-cn",name:"Xiaomi Token Plan CN",baseUrl:"https://token-plan-cn.xiaomimimo.com/v1",auth:{apiKey:ie("Xiaomi Token Plan CN API key",["XIAOMI_TOKEN_PLAN_CN_API_KEY"])},models:Object.values(sM),api:he()})}xe();function pP(){return Q({id:"xiaomi-token-plan-sgp",name:"Xiaomi Token Plan SGP",baseUrl:"https://token-plan-sgp.xiaomimimo.com/v1",auth:{apiKey:ie("Xiaomi Token Plan SGP API key",["XIAOMI_TOKEN_PLAN_SGP_API_KEY"])},models:Object.values(lM),api:he()})}xe();function dP(){return Q({id:"zai",name:"Z.AI",baseUrl:"https://api.z.ai/api/coding/paas/v4",auth:{apiKey:ie("Z.AI API key",["ZAI_API_KEY"])},models:Object.values(uM),api:he()})}xe();function mP(){return Q({id:"zai-coding-cn",name:"Z.AI Coding CN",baseUrl:"https://open.bigmodel.cn/api/coding/paas/v4",auth:{apiKey:ie("Z.AI Coding CN API key",["ZAI_CODING_CN_API_KEY"])},models:Object.values(dM),api:he()})}function F6(){return[mM(),hM(),SM(),TM(),kM(),CM(),AM(),EM(),_M(),OM(),LM(),WM(),FM(),DM(),UM(),$M(),NM(),BM(),jM(),qM(),GM(),KM(),HM(),zM(),VM(),QM(),JM(),YM(),XM(),ZM(),rP(),oP(),sP(),aP(),lP(),cP(),uP(),pP(),dP(),mP()]}function hP(t){let e=Yk(t);for(let n of F6())e.setProvider(n);return e}var gP=new Map;function D6(t,e){return(n,i,r)=>{if(n.api!==t)throw new Error(`Mismatched api: ${n.api} expected ${t}`);return e(n,i,r)}}function U6(t,e){return(n,i,r)=>{if(n.api!==t)throw new Error(`Mismatched api: ${n.api} expected ${t}`);return e(n,i,r)}}function $6(t,e){gP.set(t.api,{provider:{api:t.api,stream:D6(t.api,t.stream),streamSimple:U6(t.api,t.streamSimple)},sourceId:e})}function pm(t){return gP.get(t)?.provider}var N6=[["anthropic-messages",dt()],["openai-completions",he()],["openai-responses",pn()],["openai-codex-responses",cm()],["azure-openai-responses",Hd()],["google-generative-ai",Ya()],["google-vertex",im()],["mistral-conversations",rm()],["bedrock-converse-stream",zd()],["pi-messages",um()]],fP=new Map;function B6(){for(let[t,e]of N6)pm(t)||$6({api:t,stream:e.stream,streamSimple:e.streamSimple}),fP.set(t,pm(t))}B6();var vb=hP(),j6="<authenticated>";function bP(t){return typeof t=="string"&&t.trim().length>0}function dm(t,e){if(bP(e?.apiKey))return e;let n=jR(t.provider,e?.env);return!n||n===j6?e:{...e,apiKey:n}}function xP(t){return bP(t?.apiKey)||typeof t?.headers?.["cf-aig-authorization"]=="string"}function vP(t){if(pm(t.api)!==fP.get(t.api))return;let e=vb.getProvider(t.provider);return e?.getModels().some(n=>n.api===t.api)?e:void 0}function yP(t){let e=pm(t);if(!e)throw new Error(`No API provider registered for api: ${t}`);return e}function q6(t,e,n){let i=vP(t);return i?t.provider.startsWith("cloudflare-")&&!xP(n)?vb.stream(t,e,n):i.stream(t,e,dm(t,n)):yP(t.api).stream(t,e,dm(t,n))}async function wP(t,e,n){return q6(t,e,n).result()}function SP(t,e,n){let i=vP(t);return i?t.provider.startsWith("cloudflare-")&&!xP(n)?vb.streamSimple(t,e,n):i.streamSimple(t,e,dm(t,n)):yP(t.api).streamSimple(t,e,dm(t,n))}import*as Wn from"node:fs";import*as as from"node:path";import{Marked as KI}from"marked";import{spawn as G6}from"child_process";import{readdirSync as K6,statSync as TP}from"fs";import{homedir as kP}from"os";import{basename as yb,dirname as hm,join as eo}from"path";function mm(t,e){let n=t.toLowerCase(),i=e.toLowerCase(),r=u=>{if(u.length===0)return{matches:!0,score:0};if(u.length>i.length)return{matches:!1,score:0};let p=0,d=0,m=-1,g=0;for(let h=0;h<i.length&&p<u.length;h++)if(i[h]===u[p]){let f=h===0||/[\s\-_./:]/.test(i[h-1]);m===h-1?(g++,d-=g*5):(g=0,m>=0&&(d+=(h-m-1)*2)),f&&(d-=10),d+=h*.1,m=h,p++}return p<u.length?{matches:!1,score:0}:(u===i&&(d-=100),{matches:!0,score:d})},o=r(n);if(o.matches)return o;let s=n.match(/^(?<letters>[a-z]+)(?<digits>[0-9]+)$/),a=n.match(/^(?<digits>[0-9]+)(?<letters>[a-z]+)$/),l=s?`${s.groups?.digits??""}${s.groups?.letters??""}`:a?`${a.groups?.letters??""}${a.groups?.digits??""}`:"";if(!l)return o;let c=r(l);return c.matches?{matches:!0,score:c.score+5}:o}function Bt(t,e,n){if(!e.trim())return t;let i=e.trim().split(/[\s/]+/).filter(o=>o.length>0);if(i.length===0)return t;let r=[];for(let o of t){let s=n(o),a=0,l=!0;for(let c of i){let u=mm(c,s);if(u.matches)a+=u.score;else{l=!1;break}}l&&r.push({item:o,totalScore:a})}return r.sort((o,s)=>o.totalScore-s.totalScore),r.map(o=>o.item)}var AP=new Set([" "," ",'"',"'","="]);function Vo(t){return t.replace(/\\/g,"/")}function H6(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function z6(t){let e=Vo(t);if(!e.includes("/"))return e;let n=e.endsWith("/"),i=e.replace(/^\/+|\/+$/g,"");if(!i)return e;let r="[\\\\/]",o=i.split("/").filter(Boolean).map(a=>H6(a));if(o.length===0)return e;let s=o.join(r);return n&&(s+=r),s}function CP(t){for(let e=t.length-1;e>=0;e-=1)if(AP.has(t[e]??""))return e;return-1}function V6(t){let e=!1,n=-1;for(let i=0;i<t.length;i+=1)t[i]==='"'&&(e=!e,e&&(n=i));return e?n:null}function RP(t,e){return e===0||AP.has(t[e-1]??"")}function MP(t){let e=V6(t);return e===null?null:e>0&&t[e-1]==="@"?RP(t,e-1)?t.slice(e-1):null:RP(t,e)?t.slice(e):null}function PP(t){return t.startsWith('@"')?{rawPrefix:t.slice(2),isAtPrefix:!0,isQuotedPrefix:!0}:t.startsWith('"')?{rawPrefix:t.slice(1),isAtPrefix:!1,isQuotedPrefix:!0}:t.startsWith("@")?{rawPrefix:t.slice(1),isAtPrefix:!0,isQuotedPrefix:!1}:{rawPrefix:t,isAtPrefix:!1,isQuotedPrefix:!1}}function IP(t,e){let n=e.isQuotedPrefix||t.includes(" "),i=e.isAtPrefix?"@":"";return n?`${`${i}"`}${t}"`:`${i}${t}`}async function Q6(t,e,n,i,r){let o=["--base-directory",t,"--max-results",String(i),"--type","f","--type","d","--follow","--hidden","--exclude",".git","--exclude",".git/*","--exclude",".git/**"];return Vo(n).includes("/")&&o.push("--full-path"),n&&o.push(z6(n)),await new Promise(s=>{if(r.aborted){s([]);return}let a=G6(e,o,{stdio:["ignore","pipe","pipe"]}),l="",c=!1,u=d=>{c||(c=!0,r.removeEventListener("abort",p),s(d))},p=()=>{a.exitCode===null&&a.kill("SIGKILL")};r.addEventListener("abort",p,{once:!0}),a.stdout.setEncoding("utf-8"),a.stdout.on("data",d=>{l+=d}),a.on("error",()=>{u([])}),a.on("close",d=>{if(r.aborted||d!==0||!l){u([]);return}let m=l.trim().split(`
36
+ `).find(n=>n.startsWith("data:"))?.slice(5).trim();return e&&e!=="[DONE]"?JSON.parse(e):void 0}function OB(t,e,n){let i=n?"aborted":"error",r={role:"assistant",content:[],api:t.api,provider:t.provider,model:t.id,usage:UR(),stopReason:i,errorMessage:e instanceof Error?e.message:String(e),timestamp:Date.now()};return!n&&e instanceof iu&&Vc(r,Od("pi_messages_response_failure",e,e.diagnosticDetails)),{type:"error",reason:i,error:r}}function LB(t,e){return t||(Fe("PI_CACHE_RETENTION",e)==="long"?"long":void 0)}var iu,$R,WB,BR=Ae(()=>{"use strict";Qc();qn();Ei();Bo();lr();iu=class extends Error{constructor(e,n,i){super(e),this.name="PiMessagesResponseError",this.code=n,this.diagnosticDetails=i}};$R=(t,e,n)=>{let i=new pt,r=EB(t);return(async()=>{try{let o=n?.apiKey;if(!o)throw new Error(`No API key provided for provider "${t.provider}"`);let s=new URL(`${t.baseUrl.replace(/\/+$/u,"")}/messages`);n?.debug&&s.searchParams.set("debug","1");let a={model:t.id,context:e,options:{temperature:n?.temperature,maxTokens:n?.maxTokens,reasoning:n?.reasoning,cacheRetention:LB(n?.cacheRetention,n?.env),sessionId:n?.sessionId,toolChoice:n?.toolChoice}},l=await n?.onPayload?.(a,t);l!==void 0&&(a=l);let c=await(n?.fetch??globalThis.fetch)(s,{method:"POST",headers:{authorization:`Bearer ${o}`,accept:"text/event-stream","content-type":"application/json",...Ka(n?.headers)},body:JSON.stringify(a),signal:n?.signal});if(await n?.onResponse?.({status:c.status,headers:Xt(c.headers)},t),!c.ok){let u=await c.text();throw AB(t,s,c,u)}if(!c.body)throw new Error(`${t.provider} response has no body`);for await(let u of _B(c.body)){let p=r(u);if(i.push(p),p.type==="done"||p.type==="error")return}throw new Error(`${t.provider} stream ended without a terminal event`)}catch(o){i.push(OB(t,o,n?.signal?.aborted??!1))}})(),i},WB=(t,e,n)=>{let i=n;return $R(t,e,{...n,reasoning:n?.reasoning,toolChoice:i?.toolChoice,debug:i?.debug})}});var nn=M(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.HasPropertyKey=_Z;Ft.IsAsyncIterator=OZ;Ft.IsArray=tw;Ft.IsBigInt=LZ;Ft.IsBoolean=WZ;Ft.IsDate=FZ;Ft.IsFunction=DZ;Ft.IsIterator=UZ;Ft.IsNull=$Z;Ft.IsNumber=NZ;Ft.IsObject=nw;Ft.IsRegExp=BZ;Ft.IsString=jZ;Ft.IsSymbol=qZ;Ft.IsUint8Array=iw;Ft.IsUndefined=GZ;function _Z(t,e){return e in t}function OZ(t){return nw(t)&&!tw(t)&&!iw(t)&&Symbol.asyncIterator in t}function tw(t){return Array.isArray(t)}function LZ(t){return typeof t=="bigint"}function WZ(t){return typeof t=="boolean"}function FZ(t){return t instanceof globalThis.Date}function DZ(t){return typeof t=="function"}function UZ(t){return nw(t)&&!tw(t)&&!iw(t)&&Symbol.iterator in t}function $Z(t){return t===null}function NZ(t){return typeof t=="number"}function nw(t){return typeof t=="object"&&t!==null}function BZ(t){return t instanceof globalThis.RegExp}function jZ(t){return typeof t=="string"}function qZ(t){return typeof t=="symbol"}function iw(t){return t instanceof globalThis.Uint8Array}function GZ(t){return t===void 0}});var bn=M(Mr=>{"use strict";var KZ=Mr&&Mr.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),HZ=Mr&&Mr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),zZ=Mr&&Mr.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;r<i.length;r++)i[r]!=="default"&&KZ(n,e,i[r]);return HZ(n,e),n}})();Object.defineProperty(Mr,"__esModule",{value:!0});Mr.Clone=ZZ;var $p=zZ(nn());function VZ(t){return t.map(e=>jg(e))}function QZ(t){return new Date(t.getTime())}function JZ(t){return new Uint8Array(t)}function YZ(t){return new RegExp(t.source,t.flags)}function XZ(t){let e={};for(let n of Object.getOwnPropertyNames(t))e[n]=jg(t[n]);for(let n of Object.getOwnPropertySymbols(t))e[n]=jg(t[n]);return e}function jg(t){return $p.IsArray(t)?VZ(t):$p.IsDate(t)?QZ(t):$p.IsUint8Array(t)?JZ(t):$p.IsRegExp(t)?YZ(t):$p.IsObject(t)?XZ(t):t}function ZZ(t){return jg(t)}});var Gg=M(qg=>{"use strict";Object.defineProperty(qg,"__esModule",{value:!0});qg.CloneRest=eee;qg.CloneType=T2;var S2=bn();function eee(t){return t.map(e=>T2(e))}function T2(t,e){return e===void 0?(0,S2.Clone)(t):(0,S2.Clone)({...e,...t})}});var rw=M(Co=>{"use strict";var tee=Co&&Co.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),k2=Co&&Co.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&tee(e,t,n)};Object.defineProperty(Co,"__esModule",{value:!0});k2(Gg(),Co);k2(bn(),Co)});var L2=M(We=>{"use strict";Object.defineProperty(We,"__esModule",{value:!0});We.IsAsyncIterator=nee;We.IsIterator=iee;We.IsStandardObject=ree;We.IsInstanceObject=oee;We.IsPromise=see;We.IsDate=aee;We.IsMap=lee;We.IsSet=cee;We.IsRegExp=uee;We.IsTypedArray=pee;We.IsInt8Array=dee;We.IsUint8Array=mee;We.IsUint8ClampedArray=hee;We.IsInt16Array=gee;We.IsUint16Array=fee;We.IsInt32Array=bee;We.IsUint32Array=xee;We.IsFloat32Array=vee;We.IsFloat64Array=yee;We.IsBigInt64Array=wee;We.IsBigUint64Array=See;We.HasPropertyKey=Tee;We.IsObject=Np;We.IsArray=C2;We.IsUndefined=R2;We.IsNull=M2;We.IsBoolean=P2;We.IsNumber=I2;We.IsInteger=kee;We.IsBigInt=A2;We.IsString=E2;We.IsFunction=_2;We.IsSymbol=O2;We.IsValueType=Cee;function nee(t){return Np(t)&&globalThis.Symbol.asyncIterator in t}function iee(t){return Np(t)&&globalThis.Symbol.iterator in t}function ree(t){return Np(t)&&(globalThis.Object.getPrototypeOf(t)===Object.prototype||globalThis.Object.getPrototypeOf(t)===null)}function oee(t){return Np(t)&&!C2(t)&&_2(t.constructor)&&t.constructor.name!=="Object"}function see(t){return t instanceof globalThis.Promise}function aee(t){return t instanceof Date&&globalThis.Number.isFinite(t.getTime())}function lee(t){return t instanceof globalThis.Map}function cee(t){return t instanceof globalThis.Set}function uee(t){return t instanceof globalThis.RegExp}function pee(t){return globalThis.ArrayBuffer.isView(t)}function dee(t){return t instanceof globalThis.Int8Array}function mee(t){return t instanceof globalThis.Uint8Array}function hee(t){return t instanceof globalThis.Uint8ClampedArray}function gee(t){return t instanceof globalThis.Int16Array}function fee(t){return t instanceof globalThis.Uint16Array}function bee(t){return t instanceof globalThis.Int32Array}function xee(t){return t instanceof globalThis.Uint32Array}function vee(t){return t instanceof globalThis.Float32Array}function yee(t){return t instanceof globalThis.Float64Array}function wee(t){return t instanceof globalThis.BigInt64Array}function See(t){return t instanceof globalThis.BigUint64Array}function Tee(t,e){return e in t}function Np(t){return t!==null&&typeof t=="object"}function C2(t){return globalThis.Array.isArray(t)&&!globalThis.ArrayBuffer.isView(t)}function R2(t){return t===void 0}function M2(t){return t===null}function P2(t){return typeof t=="boolean"}function I2(t){return typeof t=="number"}function kee(t){return globalThis.Number.isInteger(t)}function A2(t){return typeof t=="bigint"}function E2(t){return typeof t=="string"}function _2(t){return typeof t=="function"}function O2(t){return typeof t=="symbol"}function Cee(t){return A2(t)||P2(t)||M2(t)||I2(t)||E2(t)||O2(t)||R2(t)}});var W2=M(_s=>{"use strict";var Ree=_s&&_s.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Mee=_s&&_s.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Ree(e,t,n)};Object.defineProperty(_s,"__esModule",{value:!0});Mee(L2(),_s)});var D2=M(Hg=>{"use strict";Object.defineProperty(Hg,"__esModule",{value:!0});Hg.TypeSystemPolicy=void 0;var Kg=W2(),F2;(function(t){t.InstanceMode="default",t.ExactOptionalPropertyTypes=!1,t.AllowArrayObject=!1,t.AllowNaN=!1,t.AllowNullVoid=!1;function e(s,a){return t.ExactOptionalPropertyTypes?a in s:s[a]!==void 0}t.IsExactOptionalProperty=e;function n(s){let a=(0,Kg.IsObject)(s);return t.AllowArrayObject?a:a&&!(0,Kg.IsArray)(s)}t.IsObjectLike=n;function i(s){return n(s)&&!(s instanceof Date)&&!(s instanceof Uint8Array)}t.IsRecordLike=i;function r(s){return t.AllowNaN?(0,Kg.IsNumber)(s):Number.isFinite(s)}t.IsNumberLike=r;function o(s){let a=(0,Kg.IsUndefined)(s);return t.AllowNullVoid?a||s===null:a}t.IsVoidLike=o})(F2||(Hg.TypeSystemPolicy=F2={}))});var U2=M(Pr=>{"use strict";var Pee=Pr&&Pr.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Iee=Pr&&Pr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Aee=Pr&&Pr.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;r<i.length;r++)i[r]!=="default"&&Pee(n,e,i[r]);return Iee(n,e),n}})();Object.defineProperty(Pr,"__esModule",{value:!0});Pr.Immutable=zg;var Bp=Aee(nn());function Eee(t){return globalThis.Object.freeze(t).map(e=>zg(e))}function _ee(t){let e={};for(let n of Object.getOwnPropertyNames(t))e[n]=zg(t[n]);for(let n of Object.getOwnPropertySymbols(t))e[n]=zg(t[n]);return globalThis.Object.freeze(e)}function zg(t){return Bp.IsArray(t)?Eee(t):Bp.IsDate(t)?t:Bp.IsUint8Array(t)?t:Bp.IsRegExp(t)?t:Bp.IsObject(t)?_ee(t):t}});var fe=M(ow=>{"use strict";Object.defineProperty(ow,"__esModule",{value:!0});ow.CreateType=Fee;var Oee=D2(),Lee=U2(),Wee=bn();function Fee(t,e){let n=e!==void 0?{...e,...t}:t;switch(Oee.TypeSystemPolicy.InstanceMode){case"freeze":return(0,Lee.Immutable)(n);case"clone":return(0,Wee.Clone)(n);default:return n}}});var Ir=M(Os=>{"use strict";var Dee=Os&&Os.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Uee=Os&&Os.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Dee(e,t,n)};Object.defineProperty(Os,"__esModule",{value:!0});Uee(fe(),Os)});var $2=M(Vg=>{"use strict";Object.defineProperty(Vg,"__esModule",{value:!0});Vg.TypeBoxError=void 0;var sw=class extends Error{constructor(e){super(e)}};Vg.TypeBoxError=sw});var Ki=M(Ls=>{"use strict";var $ee=Ls&&Ls.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Nee=Ls&&Ls.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&$ee(e,t,n)};Object.defineProperty(Ls,"__esModule",{value:!0});Nee($2(),Ls)});var jp=M(ri=>{"use strict";Object.defineProperty(ri,"__esModule",{value:!0});ri.Kind=ri.Hint=ri.OptionalKind=ri.ReadonlyKind=ri.TransformKind=void 0;ri.TransformKind=Symbol.for("TypeBox.Transform");ri.ReadonlyKind=Symbol.for("TypeBox.Readonly");ri.OptionalKind=Symbol.for("TypeBox.Optional");ri.Hint=Symbol.for("TypeBox.Hint");ri.Kind=Symbol.for("TypeBox.Kind")});var ge=M(Ws=>{"use strict";var Bee=Ws&&Ws.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),jee=Ws&&Ws.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Bee(e,t,n)};Object.defineProperty(Ws,"__esModule",{value:!0});jee(jp(),Ws)});var Ue=M(de=>{"use strict";var qee=de&&de.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Gee=de&&de.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Kee=de&&de.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;r<i.length;r++)i[r]!=="default"&&qee(n,e,i[r]);return Gee(n,e),n}})();Object.defineProperty(de,"__esModule",{value:!0});de.IsReadonly=Hee;de.IsOptional=zee;de.IsAny=N2;de.IsArgument=B2;de.IsArray=j2;de.IsAsyncIterator=q2;de.IsBigInt=G2;de.IsBoolean=K2;de.IsComputed=H2;de.IsConstructor=z2;de.IsDate=V2;de.IsFunction=Q2;de.IsImport=Vee;de.IsInteger=J2;de.IsProperties=Qee;de.IsIntersect=Y2;de.IsIterator=X2;de.IsKindOf=Oe;de.IsLiteralString=Jee;de.IsLiteralNumber=Yee;de.IsLiteralBoolean=Xee;de.IsLiteralValue=Zee;de.IsLiteral=qp;de.IsMappedKey=Z2;de.IsMappedResult=e5;de.IsNever=t5;de.IsNot=n5;de.IsNull=i5;de.IsNumber=r5;de.IsObject=o5;de.IsPromise=s5;de.IsRecord=a5;de.IsRecursive=ete;de.IsRef=l5;de.IsRegExp=c5;de.IsString=u5;de.IsSymbol=p5;de.IsTemplateLiteral=d5;de.IsThis=m5;de.IsTransform=tte;de.IsTuple=h5;de.IsUndefined=g5;de.IsUnion=f5;de.IsUint8Array=b5;de.IsUnknown=x5;de.IsUnsafe=v5;de.IsVoid=y5;de.IsKind=w5;de.IsSchema=nte;var xn=Kee(nn()),Ar=ge();function Hee(t){return xn.IsObject(t)&&t[Ar.ReadonlyKind]==="Readonly"}function zee(t){return xn.IsObject(t)&&t[Ar.OptionalKind]==="Optional"}function N2(t){return Oe(t,"Any")}function B2(t){return Oe(t,"Argument")}function j2(t){return Oe(t,"Array")}function q2(t){return Oe(t,"AsyncIterator")}function G2(t){return Oe(t,"BigInt")}function K2(t){return Oe(t,"Boolean")}function H2(t){return Oe(t,"Computed")}function z2(t){return Oe(t,"Constructor")}function V2(t){return Oe(t,"Date")}function Q2(t){return Oe(t,"Function")}function Vee(t){return Oe(t,"Import")}function J2(t){return Oe(t,"Integer")}function Qee(t){return xn.IsObject(t)}function Y2(t){return Oe(t,"Intersect")}function X2(t){return Oe(t,"Iterator")}function Oe(t,e){return xn.IsObject(t)&&Ar.Kind in t&&t[Ar.Kind]===e}function Jee(t){return qp(t)&&xn.IsString(t.const)}function Yee(t){return qp(t)&&xn.IsNumber(t.const)}function Xee(t){return qp(t)&&xn.IsBoolean(t.const)}function Zee(t){return xn.IsBoolean(t)||xn.IsNumber(t)||xn.IsString(t)}function qp(t){return Oe(t,"Literal")}function Z2(t){return Oe(t,"MappedKey")}function e5(t){return Oe(t,"MappedResult")}function t5(t){return Oe(t,"Never")}function n5(t){return Oe(t,"Not")}function i5(t){return Oe(t,"Null")}function r5(t){return Oe(t,"Number")}function o5(t){return Oe(t,"Object")}function s5(t){return Oe(t,"Promise")}function a5(t){return Oe(t,"Record")}function ete(t){return xn.IsObject(t)&&Ar.Hint in t&&t[Ar.Hint]==="Recursive"}function l5(t){return Oe(t,"Ref")}function c5(t){return Oe(t,"RegExp")}function u5(t){return Oe(t,"String")}function p5(t){return Oe(t,"Symbol")}function d5(t){return Oe(t,"TemplateLiteral")}function m5(t){return Oe(t,"This")}function tte(t){return xn.IsObject(t)&&Ar.TransformKind in t}function h5(t){return Oe(t,"Tuple")}function g5(t){return Oe(t,"Undefined")}function f5(t){return Oe(t,"Union")}function b5(t){return Oe(t,"Uint8Array")}function x5(t){return Oe(t,"Unknown")}function v5(t){return Oe(t,"Unsafe")}function y5(t){return Oe(t,"Void")}function w5(t){return xn.IsObject(t)&&Ar.Kind in t&&xn.IsString(t[Ar.Kind])}function nte(t){return N2(t)||B2(t)||j2(t)||K2(t)||G2(t)||q2(t)||H2(t)||z2(t)||V2(t)||Q2(t)||J2(t)||Y2(t)||X2(t)||qp(t)||Z2(t)||e5(t)||t5(t)||n5(t)||i5(t)||r5(t)||o5(t)||s5(t)||a5(t)||l5(t)||c5(t)||u5(t)||p5(t)||d5(t)||m5(t)||h5(t)||g5(t)||f5(t)||b5(t)||x5(t)||v5(t)||y5(t)||w5(t)}});var uW=M(le=>{"use strict";var ite=le&&le.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),rte=le&&le.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),ote=le&&le.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;r<i.length;r++)i[r]!=="default"&&ite(n,e,i[r]);return rte(n,e),n}})();Object.defineProperty(le,"__esModule",{value:!0});le.TypeGuardUnknownTypeError=void 0;le.IsReadonly=ute;le.IsOptional=pte;le.IsAny=C5;le.IsArgument=R5;le.IsArray=M5;le.IsAsyncIterator=P5;le.IsBigInt=I5;le.IsBoolean=A5;le.IsComputed=E5;le.IsConstructor=_5;le.IsDate=O5;le.IsFunction=L5;le.IsImport=dte;le.IsInteger=W5;le.IsProperties=Qg;le.IsIntersect=F5;le.IsIterator=D5;le.IsKindOf=Le;le.IsLiteralString=U5;le.IsLiteralNumber=$5;le.IsLiteralBoolean=mte;le.IsLiteral=Kp;le.IsLiteralValue=N5;le.IsMappedKey=B5;le.IsMappedResult=j5;le.IsNever=q5;le.IsNot=G5;le.IsNull=K5;le.IsNumber=H5;le.IsObject=z5;le.IsPromise=V5;le.IsRecord=Q5;le.IsRecursive=hte;le.IsRef=J5;le.IsRegExp=Y5;le.IsString=X5;le.IsSymbol=Z5;le.IsTemplateLiteral=eW;le.IsThis=tW;le.IsTransform=nW;le.IsTuple=iW;le.IsUndefined=rW;le.IsUnionLiteral=gte;le.IsUnion=uw;le.IsUint8Array=oW;le.IsUnknown=sW;le.IsUnsafe=aW;le.IsVoid=lW;le.IsKind=cW;le.IsSchema=Dt;var ue=ote(nn()),Hi=ge(),ste=Ki(),aw=class extends ste.TypeBoxError{};le.TypeGuardUnknownTypeError=aw;var ate=["Argument","Any","Array","AsyncIterator","BigInt","Boolean","Computed","Constructor","Date","Enum","Function","Integer","Intersect","Iterator","Literal","MappedKey","MappedResult","Not","Null","Number","Object","Promise","Record","Ref","RegExp","String","Symbol","TemplateLiteral","This","Tuple","Undefined","Union","Uint8Array","Unknown","Void"];function S5(t){try{return new RegExp(t),!0}catch{return!1}}function lw(t){if(!ue.IsString(t))return!1;for(let e=0;e<t.length;e++){let n=t.charCodeAt(e);if(n>=7&&n<=13||n===27||n===127)return!1}return!0}function T5(t){return cw(t)||Dt(t)}function Gp(t){return ue.IsUndefined(t)||ue.IsBigInt(t)}function Je(t){return ue.IsUndefined(t)||ue.IsNumber(t)}function cw(t){return ue.IsUndefined(t)||ue.IsBoolean(t)}function Ke(t){return ue.IsUndefined(t)||ue.IsString(t)}function lte(t){return ue.IsUndefined(t)||ue.IsString(t)&&lw(t)&&S5(t)}function cte(t){return ue.IsUndefined(t)||ue.IsString(t)&&lw(t)}function k5(t){return ue.IsUndefined(t)||Dt(t)}function ute(t){return ue.IsObject(t)&&t[Hi.ReadonlyKind]==="Readonly"}function pte(t){return ue.IsObject(t)&&t[Hi.OptionalKind]==="Optional"}function C5(t){return Le(t,"Any")&&Ke(t.$id)}function R5(t){return Le(t,"Argument")&&ue.IsNumber(t.index)}function M5(t){return Le(t,"Array")&&t.type==="array"&&Ke(t.$id)&&Dt(t.items)&&Je(t.minItems)&&Je(t.maxItems)&&cw(t.uniqueItems)&&k5(t.contains)&&Je(t.minContains)&&Je(t.maxContains)}function P5(t){return Le(t,"AsyncIterator")&&t.type==="AsyncIterator"&&Ke(t.$id)&&Dt(t.items)}function I5(t){return Le(t,"BigInt")&&t.type==="bigint"&&Ke(t.$id)&&Gp(t.exclusiveMaximum)&&Gp(t.exclusiveMinimum)&&Gp(t.maximum)&&Gp(t.minimum)&&Gp(t.multipleOf)}function A5(t){return Le(t,"Boolean")&&t.type==="boolean"&&Ke(t.$id)}function E5(t){return Le(t,"Computed")&&ue.IsString(t.target)&&ue.IsArray(t.parameters)&&t.parameters.every(e=>Dt(e))}function _5(t){return Le(t,"Constructor")&&t.type==="Constructor"&&Ke(t.$id)&&ue.IsArray(t.parameters)&&t.parameters.every(e=>Dt(e))&&Dt(t.returns)}function O5(t){return Le(t,"Date")&&t.type==="Date"&&Ke(t.$id)&&Je(t.exclusiveMaximumTimestamp)&&Je(t.exclusiveMinimumTimestamp)&&Je(t.maximumTimestamp)&&Je(t.minimumTimestamp)&&Je(t.multipleOfTimestamp)}function L5(t){return Le(t,"Function")&&t.type==="Function"&&Ke(t.$id)&&ue.IsArray(t.parameters)&&t.parameters.every(e=>Dt(e))&&Dt(t.returns)}function dte(t){return Le(t,"Import")&&ue.HasPropertyKey(t,"$defs")&&ue.IsObject(t.$defs)&&Qg(t.$defs)&&ue.HasPropertyKey(t,"$ref")&&ue.IsString(t.$ref)&&t.$ref in t.$defs}function W5(t){return Le(t,"Integer")&&t.type==="integer"&&Ke(t.$id)&&Je(t.exclusiveMaximum)&&Je(t.exclusiveMinimum)&&Je(t.maximum)&&Je(t.minimum)&&Je(t.multipleOf)}function Qg(t){return ue.IsObject(t)&&Object.entries(t).every(([e,n])=>lw(e)&&Dt(n))}function F5(t){return Le(t,"Intersect")&&!(ue.IsString(t.type)&&t.type!=="object")&&ue.IsArray(t.allOf)&&t.allOf.every(e=>Dt(e)&&!nW(e))&&Ke(t.type)&&(cw(t.unevaluatedProperties)||k5(t.unevaluatedProperties))&&Ke(t.$id)}function D5(t){return Le(t,"Iterator")&&t.type==="Iterator"&&Ke(t.$id)&&Dt(t.items)}function Le(t,e){return ue.IsObject(t)&&Hi.Kind in t&&t[Hi.Kind]===e}function U5(t){return Kp(t)&&ue.IsString(t.const)}function $5(t){return Kp(t)&&ue.IsNumber(t.const)}function mte(t){return Kp(t)&&ue.IsBoolean(t.const)}function Kp(t){return Le(t,"Literal")&&Ke(t.$id)&&N5(t.const)}function N5(t){return ue.IsBoolean(t)||ue.IsNumber(t)||ue.IsString(t)}function B5(t){return Le(t,"MappedKey")&&ue.IsArray(t.keys)&&t.keys.every(e=>ue.IsNumber(e)||ue.IsString(e))}function j5(t){return Le(t,"MappedResult")&&Qg(t.properties)}function q5(t){return Le(t,"Never")&&ue.IsObject(t.not)&&Object.getOwnPropertyNames(t.not).length===0}function G5(t){return Le(t,"Not")&&Dt(t.not)}function K5(t){return Le(t,"Null")&&t.type==="null"&&Ke(t.$id)}function H5(t){return Le(t,"Number")&&t.type==="number"&&Ke(t.$id)&&Je(t.exclusiveMaximum)&&Je(t.exclusiveMinimum)&&Je(t.maximum)&&Je(t.minimum)&&Je(t.multipleOf)}function z5(t){return Le(t,"Object")&&t.type==="object"&&Ke(t.$id)&&Qg(t.properties)&&T5(t.additionalProperties)&&Je(t.minProperties)&&Je(t.maxProperties)}function V5(t){return Le(t,"Promise")&&t.type==="Promise"&&Ke(t.$id)&&Dt(t.item)}function Q5(t){return Le(t,"Record")&&t.type==="object"&&Ke(t.$id)&&T5(t.additionalProperties)&&ue.IsObject(t.patternProperties)&&(e=>{let n=Object.getOwnPropertyNames(e.patternProperties);return n.length===1&&S5(n[0])&&ue.IsObject(e.patternProperties)&&Dt(e.patternProperties[n[0]])})(t)}function hte(t){return ue.IsObject(t)&&Hi.Hint in t&&t[Hi.Hint]==="Recursive"}function J5(t){return Le(t,"Ref")&&Ke(t.$id)&&ue.IsString(t.$ref)}function Y5(t){return Le(t,"RegExp")&&Ke(t.$id)&&ue.IsString(t.source)&&ue.IsString(t.flags)&&Je(t.maxLength)&&Je(t.minLength)}function X5(t){return Le(t,"String")&&t.type==="string"&&Ke(t.$id)&&Je(t.minLength)&&Je(t.maxLength)&&lte(t.pattern)&&cte(t.format)}function Z5(t){return Le(t,"Symbol")&&t.type==="symbol"&&Ke(t.$id)}function eW(t){return Le(t,"TemplateLiteral")&&t.type==="string"&&ue.IsString(t.pattern)&&t.pattern[0]==="^"&&t.pattern[t.pattern.length-1]==="$"}function tW(t){return Le(t,"This")&&Ke(t.$id)&&ue.IsString(t.$ref)}function nW(t){return ue.IsObject(t)&&Hi.TransformKind in t}function iW(t){return Le(t,"Tuple")&&t.type==="array"&&Ke(t.$id)&&ue.IsNumber(t.minItems)&&ue.IsNumber(t.maxItems)&&t.minItems===t.maxItems&&(ue.IsUndefined(t.items)&&ue.IsUndefined(t.additionalItems)&&t.minItems===0||ue.IsArray(t.items)&&t.items.every(e=>Dt(e)))}function rW(t){return Le(t,"Undefined")&&t.type==="undefined"&&Ke(t.$id)}function gte(t){return uw(t)&&t.anyOf.every(e=>U5(e)||$5(e))}function uw(t){return Le(t,"Union")&&Ke(t.$id)&&ue.IsObject(t)&&ue.IsArray(t.anyOf)&&t.anyOf.every(e=>Dt(e))}function oW(t){return Le(t,"Uint8Array")&&t.type==="Uint8Array"&&Ke(t.$id)&&Je(t.minByteLength)&&Je(t.maxByteLength)}function sW(t){return Le(t,"Unknown")&&Ke(t.$id)}function aW(t){return Le(t,"Unsafe")}function lW(t){return Le(t,"Void")&&t.type==="void"&&Ke(t.$id)}function cW(t){return ue.IsObject(t)&&Hi.Kind in t&&ue.IsString(t[Hi.Kind])&&!ate.includes(t[Hi.Kind])}function Dt(t){return ue.IsObject(t)&&(C5(t)||R5(t)||M5(t)||A5(t)||I5(t)||P5(t)||E5(t)||_5(t)||O5(t)||L5(t)||W5(t)||F5(t)||D5(t)||Kp(t)||B5(t)||j5(t)||q5(t)||G5(t)||K5(t)||H5(t)||z5(t)||V5(t)||Q5(t)||J5(t)||Y5(t)||X5(t)||Z5(t)||eW(t)||tW(t)||iW(t)||rW(t)||uw(t)||oW(t)||sW(t)||aW(t)||lW(t)||cW(t))}});var dw=M(vn=>{"use strict";var fte=vn&&vn.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),bte=vn&&vn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),pw=vn&&vn.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;r<i.length;r++)i[r]!=="default"&&fte(n,e,i[r]);return bte(n,e),n}})();Object.defineProperty(vn,"__esModule",{value:!0});vn.ValueGuard=vn.TypeGuard=vn.KindGuard=void 0;vn.KindGuard=pw(Ue());vn.TypeGuard=pw(uW());vn.ValueGuard=pw(nn())});var pW=M(mw=>{"use strict";Object.defineProperty(mw,"__esModule",{value:!0});mw.Increment=xte;function xte(t){return(parseInt(t)+1).toString()}});var dW=M(Fs=>{"use strict";var vte=Fs&&Fs.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),yte=Fs&&Fs.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&vte(e,t,n)};Object.defineProperty(Fs,"__esModule",{value:!0});yte(pW(),Fs)});var mW=M(ft=>{"use strict";Object.defineProperty(ft,"__esModule",{value:!0});ft.PatternNeverExact=ft.PatternStringExact=ft.PatternNumberExact=ft.PatternBooleanExact=ft.PatternNever=ft.PatternString=ft.PatternNumber=ft.PatternBoolean=void 0;ft.PatternBoolean="(true|false)";ft.PatternNumber="(0|[1-9][0-9]*)";ft.PatternString="(.*)";ft.PatternNever="(?!.*)";ft.PatternBooleanExact=`^${ft.PatternBoolean}$`;ft.PatternNumberExact=`^${ft.PatternNumber}$`;ft.PatternStringExact=`^${ft.PatternString}$`;ft.PatternNeverExact=`^${ft.PatternNever}$`});var Hp=M(Ds=>{"use strict";var wte=Ds&&Ds.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Ste=Ds&&Ds.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&wte(e,t,n)};Object.defineProperty(Ds,"__esModule",{value:!0});Ste(mW(),Ds)});var hW=M(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});Ro.Entries=Tte;Ro.Clear=kte;Ro.Delete=Cte;Ro.Has=Rte;Ro.Set=Mte;Ro.Get=Pte;var bc=new Map;function Tte(){return new Map(bc)}function kte(){return bc.clear()}function Cte(t){return bc.delete(t)}function Rte(t){return bc.has(t)}function Mte(t,e){bc.set(t,e)}function Pte(t){return bc.get(t)}});var gW=M(Mo=>{"use strict";Object.defineProperty(Mo,"__esModule",{value:!0});Mo.Entries=Ite;Mo.Clear=Ate;Mo.Delete=Ete;Mo.Has=_te;Mo.Set=Ote;Mo.Get=Lte;var xc=new Map;function Ite(){return new Map(xc)}function Ate(){return xc.clear()}function Ete(t){return xc.delete(t)}function _te(t){return xc.has(t)}function Ote(t,e){xc.set(t,e)}function Lte(t){return xc.get(t)}});var bW=M(oi=>{"use strict";var Wte=oi&&oi.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Fte=oi&&oi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),fW=oi&&oi.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;r<i.length;r++)i[r]!=="default"&&Wte(n,e,i[r]);return Fte(n,e),n}})();Object.defineProperty(oi,"__esModule",{value:!0});oi.TypeRegistry=oi.FormatRegistry=void 0;oi.FormatRegistry=fW(hW());oi.TypeRegistry=fW(gW())});var yW=M(zi=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});zi.SetIncludes=xW;zi.SetIsSubset=Dte;zi.SetDistinct=Ute;zi.SetIntersect=vW;zi.SetUnion=$te;zi.SetComplement=Nte;zi.SetIntersectMany=jte;zi.SetUnionMany=qte;function xW(t,e){return t.includes(e)}function Dte(t,e){return t.every(n=>xW(e,n))}function Ute(t){return[...new Set(t)]}function vW(t,e){return t.filter(n=>e.includes(n))}function $te(t,e){return[...t,...e]}function Nte(t,e){return t.filter(n=>!e.includes(n))}function Bte(t,e){return t.reduce((n,i)=>vW(n,i),e)}function jte(t){return t.length===1?t[0]:t.length>1?Bte(t.slice(1),t[0]):[]}function qte(t){let e=[];for(let n of t)e.push(...n);return e}});var zp=M(Us=>{"use strict";var Gte=Us&&Us.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Kte=Us&&Us.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Gte(e,t,n)};Object.defineProperty(Us,"__esModule",{value:!0});Kte(yW(),Us)});var wW=M(hw=>{"use strict";Object.defineProperty(hw,"__esModule",{value:!0});hw.Any=Vte;var Hte=Ir(),zte=ge();function Vte(t){return(0,Hte.CreateType)({[zte.Kind]:"Any"},t)}});var vc=M($s=>{"use strict";var Qte=$s&&$s.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Jte=$s&&$s.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Qte(e,t,n)};Object.defineProperty($s,"__esModule",{value:!0});Jte(wW(),$s)});var SW=M(gw=>{"use strict";Object.defineProperty(gw,"__esModule",{value:!0});gw.Array=Zte;var Yte=fe(),Xte=ge();function Zte(t,e){return(0,Yte.CreateType)({[Xte.Kind]:"Array",type:"array",items:t},e)}});var yc=M(Ns=>{"use strict";var ene=Ns&&Ns.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),tne=Ns&&Ns.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&ene(e,t,n)};Object.defineProperty(Ns,"__esModule",{value:!0});tne(SW(),Ns)});var TW=M(fw=>{"use strict";Object.defineProperty(fw,"__esModule",{value:!0});fw.Argument=rne;var nne=fe(),ine=ge();function rne(t){return(0,nne.CreateType)({[ine.Kind]:"Argument",index:t})}});var Jg=M(Bs=>{"use strict";var one=Bs&&Bs.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),sne=Bs&&Bs.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&one(e,t,n)};Object.defineProperty(Bs,"__esModule",{value:!0});sne(TW(),Bs)});var kW=M(bw=>{"use strict";Object.defineProperty(bw,"__esModule",{value:!0});bw.AsyncIterator=cne;var ane=ge(),lne=fe();function cne(t,e){return(0,lne.CreateType)({[ane.Kind]:"AsyncIterator",type:"AsyncIterator",items:t},e)}});var wc=M(js=>{"use strict";var une=js&&js.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),pne=js&&js.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&une(e,t,n)};Object.defineProperty(js,"__esModule",{value:!0});pne(kW(),js)});var CW=M(xw=>{"use strict";Object.defineProperty(xw,"__esModule",{value:!0});xw.Computed=hne;var dne=Ir(),mne=jp();function hne(t,e,n){return(0,dne.CreateType)({[mne.Kind]:"Computed",target:t,parameters:e},n)}});var Po=M(qs=>{"use strict";var gne=qs&&qs.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),fne=qs&&qs.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&gne(e,t,n)};Object.defineProperty(qs,"__esModule",{value:!0});fne(CW(),qs)});var Yg=M(vw=>{"use strict";Object.defineProperty(vw,"__esModule",{value:!0});vw.Discard=xne;function bne(t,e){let{[e]:n,...i}=t;return i}function xne(t,e){return e.reduce((n,i)=>bne(n,i),t)}});var Er=M(Gs=>{"use strict";var vne=Gs&&Gs.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),yne=Gs&&Gs.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&vne(e,t,n)};Object.defineProperty(Gs,"__esModule",{value:!0});yne(Yg(),Gs)});var RW=M(yw=>{"use strict";Object.defineProperty(yw,"__esModule",{value:!0});yw.Never=Tne;var wne=fe(),Sne=ge();function Tne(t){return(0,wne.CreateType)({[Sne.Kind]:"Never",not:{}},t)}});var Ut=M(Ks=>{"use strict";var kne=Ks&&Ks.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Cne=Ks&&Ks.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&kne(e,t,n)};Object.defineProperty(Ks,"__esModule",{value:!0});Cne(RW(),Ks)});var MW=M(ww=>{"use strict";Object.defineProperty(ww,"__esModule",{value:!0});ww.MappedKey=Pne;var Rne=fe(),Mne=ge();function Pne(t){return(0,Rne.CreateType)({[Mne.Kind]:"MappedKey",keys:t})}});var Tw=M(Sw=>{"use strict";Object.defineProperty(Sw,"__esModule",{value:!0});Sw.MappedResult=Ene;var Ine=fe(),Ane=ge();function Ene(t){return(0,Ine.CreateType)({[Ane.Kind]:"MappedResult",properties:t})}});var PW=M(kw=>{"use strict";Object.defineProperty(kw,"__esModule",{value:!0});kw.Constructor=Lne;var _ne=fe(),One=ge();function Lne(t,e,n){return(0,_ne.CreateType)({[One.Kind]:"Constructor",type:"Constructor",parameters:t,returns:e},n)}});var Sc=M(Hs=>{"use strict";var Wne=Hs&&Hs.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Fne=Hs&&Hs.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Wne(e,t,n)};Object.defineProperty(Hs,"__esModule",{value:!0});Fne(PW(),Hs)});var IW=M(Cw=>{"use strict";Object.defineProperty(Cw,"__esModule",{value:!0});Cw.Function=$ne;var Dne=fe(),Une=ge();function $ne(t,e,n){return(0,Dne.CreateType)({[Une.Kind]:"Function",type:"Function",parameters:t,returns:e},n)}});var Io=M(zs=>{"use strict";var Nne=zs&&zs.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Bne=zs&&zs.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Nne(e,t,n)};Object.defineProperty(zs,"__esModule",{value:!0});Bne(IW(),zs)});var Mw=M(Rw=>{"use strict";Object.defineProperty(Rw,"__esModule",{value:!0});Rw.UnionCreate=Gne;var jne=fe(),qne=ge();function Gne(t,e){return(0,jne.CreateType)({[qne.Kind]:"Union",anyOf:t},e)}});var OW=M(Pw=>{"use strict";Object.defineProperty(Pw,"__esModule",{value:!0});Pw.UnionEvaluated=Zne;var Kne=fe(),Hne=ge(),zne=Er(),Vne=Ut(),Qne=Vi(),AW=Mw(),_W=Ue();function Jne(t){return t.some(e=>(0,_W.IsOptional)(e))}function EW(t){return t.map(e=>(0,_W.IsOptional)(e)?Yne(e):e)}function Yne(t){return(0,zne.Discard)(t,[Hne.OptionalKind])}function Xne(t,e){return Jne(t)?(0,Qne.Optional)((0,AW.UnionCreate)(EW(t),e)):(0,AW.UnionCreate)(EW(t),e)}function Zne(t,e){return t.length===1?(0,Kne.CreateType)(t[0],e):t.length===0?(0,Vne.Never)(e):Xne(t,e)}});var WW=M(LW=>{"use strict";Object.defineProperty(LW,"__esModule",{value:!0});var S9e=ge()});var FW=M(Iw=>{"use strict";Object.defineProperty(Iw,"__esModule",{value:!0});Iw.Union=iie;var eie=Ut(),tie=fe(),nie=Mw();function iie(t,e){return t.length===0?(0,eie.Never)(e):t.length===1?(0,tie.CreateType)(t[0],e):(0,nie.UnionCreate)(t,e)}});var vt=M(_r=>{"use strict";var rie=_r&&_r.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Aw=_r&&_r.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&rie(e,t,n)};Object.defineProperty(_r,"__esModule",{value:!0});Aw(OW(),_r);Aw(WW(),_r);Aw(FW(),_r)});var Xg=M(Tc=>{"use strict";Object.defineProperty(Tc,"__esModule",{value:!0});Tc.TemplateLiteralParserError=void 0;Tc.TemplateLiteralParse=Vs;Tc.TemplateLiteralParseExact=mie;var oie=Ki(),Vp=class extends oie.TypeBoxError{};Tc.TemplateLiteralParserError=Vp;function sie(t){return t.replace(/\\\$/g,"$").replace(/\\\*/g,"*").replace(/\\\^/g,"^").replace(/\\\|/g,"|").replace(/\\\(/g,"(").replace(/\\\)/g,")")}function Ew(t,e,n){return t[e]===n&&t.charCodeAt(e-1)!==92}function Or(t,e){return Ew(t,e,"(")}function Qp(t,e){return Ew(t,e,")")}function DW(t,e){return Ew(t,e,"|")}function aie(t){if(!(Or(t,0)&&Qp(t,t.length-1)))return!1;let e=0;for(let n=0;n<t.length;n++)if(Or(t,n)&&(e+=1),Qp(t,n)&&(e-=1),e===0&&n!==t.length-1)return!1;return!0}function lie(t){return t.slice(1,t.length-1)}function cie(t){let e=0;for(let n=0;n<t.length;n++)if(Or(t,n)&&(e+=1),Qp(t,n)&&(e-=1),DW(t,n)&&e===0)return!0;return!1}function uie(t){for(let e=0;e<t.length;e++)if(Or(t,e))return!0;return!1}function pie(t){let[e,n]=[0,0],i=[];for(let o=0;o<t.length;o++)if(Or(t,o)&&(e+=1),Qp(t,o)&&(e-=1),DW(t,o)&&e===0){let s=t.slice(n,o);s.length>0&&i.push(Vs(s)),n=o+1}let r=t.slice(n);return r.length>0&&i.push(Vs(r)),i.length===0?{type:"const",const:""}:i.length===1?i[0]:{type:"or",expr:i}}function die(t){function e(r,o){if(!Or(r,o))throw new Vp("TemplateLiteralParser: Index must point to open parens");let s=0;for(let a=o;a<r.length;a++)if(Or(r,a)&&(s+=1),Qp(r,a)&&(s-=1),s===0)return[o,a];throw new Vp("TemplateLiteralParser: Unclosed group parens in expression")}function n(r,o){for(let s=o;s<r.length;s++)if(Or(r,s))return[o,s];return[o,r.length]}let i=[];for(let r=0;r<t.length;r++)if(Or(t,r)){let[o,s]=e(t,r),a=t.slice(o,s+1);i.push(Vs(a)),r=s}else{let[o,s]=n(t,r),a=t.slice(o,s);a.length>0&&i.push(Vs(a)),r=s-1}return i.length===0?{type:"const",const:""}:i.length===1?i[0]:{type:"and",expr:i}}function Vs(t){return aie(t)?Vs(lie(t)):cie(t)?pie(t):uie(t)?die(t):{type:"const",const:sie(t)}}function mie(t){return Vs(t.slice(1,t.length-1))}});var _w=M(kc=>{"use strict";Object.defineProperty(kc,"__esModule",{value:!0});kc.TemplateLiteralFiniteError=void 0;kc.IsTemplateLiteralExpressionFinite=ef;kc.IsTemplateLiteralFinite=vie;var hie=Xg(),gie=Ki(),Zg=class extends gie.TypeBoxError{};kc.TemplateLiteralFiniteError=Zg;function fie(t){return t.type==="or"&&t.expr.length===2&&t.expr[0].type==="const"&&t.expr[0].const==="0"&&t.expr[1].type==="const"&&t.expr[1].const==="[1-9][0-9]*"}function bie(t){return t.type==="or"&&t.expr.length===2&&t.expr[0].type==="const"&&t.expr[0].const==="true"&&t.expr[1].type==="const"&&t.expr[1].const==="false"}function xie(t){return t.type==="const"&&t.const===".*"}function ef(t){return fie(t)||xie(t)?!1:bie(t)?!0:t.type==="and"?t.expr.every(e=>ef(e)):t.type==="or"?t.expr.every(e=>ef(e)):t.type==="const"?!0:(()=>{throw new Zg("Unknown expression type")})()}function vie(t){let e=(0,hie.TemplateLiteralParseExact)(t.pattern);return ef(e)}});var Ow=M(Cc=>{"use strict";Object.defineProperty(Cc,"__esModule",{value:!0});Cc.TemplateLiteralGenerateError=void 0;Cc.TemplateLiteralExpressionGenerate=nf;Cc.TemplateLiteralGenerate=Rie;var yie=_w(),wie=Xg(),Sie=Ki(),tf=class extends Sie.TypeBoxError{};Cc.TemplateLiteralGenerateError=tf;function*UW(t){if(t.length===1)return yield*t[0];for(let e of t[0])for(let n of UW(t.slice(1)))yield`${e}${n}`}function*Tie(t){return yield*UW(t.expr.map(e=>[...nf(e)]))}function*kie(t){for(let e of t.expr)yield*nf(e)}function*Cie(t){return yield t.const}function*nf(t){return t.type==="and"?yield*Tie(t):t.type==="or"?yield*kie(t):t.type==="const"?yield*Cie(t):(()=>{throw new tf("Unknown expression")})()}function Rie(t){let e=(0,wie.TemplateLiteralParseExact)(t.pattern);return(0,yie.IsTemplateLiteralExpressionFinite)(e)?[...nf(e)]:[]}});var $W=M(Lw=>{"use strict";Object.defineProperty(Lw,"__esModule",{value:!0});Lw.Literal=Iie;var Mie=fe(),Pie=ge();function Iie(t,e){return(0,Mie.CreateType)({[Pie.Kind]:"Literal",const:t,type:typeof t},e)}});var rn=M(Qs=>{"use strict";var Aie=Qs&&Qs.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Eie=Qs&&Qs.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Aie(e,t,n)};Object.defineProperty(Qs,"__esModule",{value:!0});Eie($W(),Qs)});var NW=M(Ww=>{"use strict";Object.defineProperty(Ww,"__esModule",{value:!0});Ww.Boolean=Lie;var _ie=ge(),Oie=Ir();function Lie(t){return(0,Oie.CreateType)({[_ie.Kind]:"Boolean",type:"boolean"},t)}});var Jp=M(Js=>{"use strict";var Wie=Js&&Js.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Fie=Js&&Js.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Wie(e,t,n)};Object.defineProperty(Js,"__esModule",{value:!0});Fie(NW(),Js)});var BW=M(Fw=>{"use strict";Object.defineProperty(Fw,"__esModule",{value:!0});Fw.BigInt=$ie;var Die=ge(),Uie=Ir();function $ie(t){return(0,Uie.CreateType)({[Die.Kind]:"BigInt",type:"bigint"},t)}});var Rc=M(Ys=>{"use strict";var Nie=Ys&&Ys.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Bie=Ys&&Ys.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Nie(e,t,n)};Object.defineProperty(Ys,"__esModule",{value:!0});Bie(BW(),Ys)});var jW=M(Dw=>{"use strict";Object.defineProperty(Dw,"__esModule",{value:!0});Dw.Number=Gie;var jie=fe(),qie=ge();function Gie(t){return(0,jie.CreateType)({[qie.Kind]:"Number",type:"number"},t)}});var Ao=M(Xs=>{"use strict";var Kie=Xs&&Xs.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Hie=Xs&&Xs.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Kie(e,t,n)};Object.defineProperty(Xs,"__esModule",{value:!0});Hie(jW(),Xs)});var qW=M(Uw=>{"use strict";Object.defineProperty(Uw,"__esModule",{value:!0});Uw.String=Qie;var zie=fe(),Vie=ge();function Qie(t){return(0,zie.CreateType)({[Vie.Kind]:"String",type:"string"},t)}});var ea=M(Zs=>{"use strict";var Jie=Zs&&Zs.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Yie=Zs&&Zs.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Jie(e,t,n)};Object.defineProperty(Zs,"__esModule",{value:!0});Yie(qW(),Zs)});var Bw=M(Nw=>{"use strict";Object.defineProperty(Nw,"__esModule",{value:!0});Nw.TemplateLiteralSyntax=sre;var Yp=rn(),Xie=Jp(),Zie=Rc(),ere=Ao(),tre=ea(),nre=vt(),ire=Ut();function*rre(t){let e=t.trim().replace(/"|'/g,"");return e==="boolean"?yield(0,Xie.Boolean)():e==="number"?yield(0,ere.Number)():e==="bigint"?yield(0,Zie.BigInt)():e==="string"?yield(0,tre.String)():yield(()=>{let n=e.split("|").map(i=>(0,Yp.Literal)(i.trim()));return n.length===0?(0,ire.Never)():n.length===1?n[0]:(0,nre.UnionEvaluated)(n)})()}function*ore(t){if(t[1]!=="{"){let e=(0,Yp.Literal)("$"),n=$w(t.slice(1));return yield*[e,...n]}for(let e=2;e<t.length;e++)if(t[e]==="}"){let n=rre(t.slice(2,e)),i=$w(t.slice(e+1));return yield*[...n,...i]}yield(0,Yp.Literal)(t)}function*$w(t){for(let e=0;e<t.length;e++)if(t[e]==="$"){let n=(0,Yp.Literal)(t.slice(0,e)),i=ore(t.slice(e));return yield*[n,...i]}yield(0,Yp.Literal)(t)}function sre(t){return[...$w(t)]}});var jw=M(Zp=>{"use strict";Object.defineProperty(Zp,"__esModule",{value:!0});Zp.TemplateLiteralPatternError=void 0;Zp.TemplateLiteralPattern=ure;var Xp=Hp(),are=ge(),lre=Ki(),Eo=Ue(),rf=class extends lre.TypeBoxError{};Zp.TemplateLiteralPatternError=rf;function cre(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function GW(t,e){return(0,Eo.IsTemplateLiteral)(t)?t.pattern.slice(1,t.pattern.length-1):(0,Eo.IsUnion)(t)?`(${t.anyOf.map(n=>GW(n,e)).join("|")})`:(0,Eo.IsNumber)(t)?`${e}${Xp.PatternNumber}`:(0,Eo.IsInteger)(t)?`${e}${Xp.PatternNumber}`:(0,Eo.IsBigInt)(t)?`${e}${Xp.PatternNumber}`:(0,Eo.IsString)(t)?`${e}${Xp.PatternString}`:(0,Eo.IsLiteral)(t)?`${e}${cre(t.const.toString())}`:(0,Eo.IsBoolean)(t)?`${e}${Xp.PatternBoolean}`:(()=>{throw new rf(`Unexpected Kind '${t[are.Kind]}'`)})()}function ure(t){return`^${t.map(e=>GW(e,"")).join("")}$`}});var KW=M(qw=>{"use strict";Object.defineProperty(qw,"__esModule",{value:!0});qw.TemplateLiteralToUnion=hre;var pre=vt(),dre=rn(),mre=Ow();function hre(t){let n=(0,mre.TemplateLiteralGenerate)(t).map(i=>(0,dre.Literal)(i));return(0,pre.UnionEvaluated)(n)}});var zW=M(Gw=>{"use strict";Object.defineProperty(Gw,"__esModule",{value:!0});Gw.TemplateLiteral=vre;var gre=fe(),fre=Bw(),HW=jw(),bre=nn(),xre=ge();function vre(t,e){let n=(0,bre.IsString)(t)?(0,HW.TemplateLiteralPattern)((0,fre.TemplateLiteralSyntax)(t)):(0,HW.TemplateLiteralPattern)(t);return(0,gre.CreateType)({[xre.Kind]:"TemplateLiteral",type:"string",pattern:n},e)}});var Qi=M($n=>{"use strict";var yre=$n&&$n.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),ta=$n&&$n.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&yre(e,t,n)};Object.defineProperty($n,"__esModule",{value:!0});ta(_w(),$n);ta(Ow(),$n);ta(Bw(),$n);ta(Xg(),$n);ta(jw(),$n);ta(KW(),$n);ta(zW(),$n)});var of=M(Kw=>{"use strict";Object.defineProperty(Kw,"__esModule",{value:!0});Kw.IndexPropertyKeys=VW;var wre=Qi(),ed=Ue();function Sre(t){return(0,wre.TemplateLiteralGenerate)(t).map(n=>n.toString())}function Tre(t){let e=[];for(let n of t)e.push(...VW(n));return e}function kre(t){return[t.toString()]}function VW(t){return[...new Set((0,ed.IsTemplateLiteral)(t)?Sre(t):(0,ed.IsUnion)(t)?Tre(t.anyOf):(0,ed.IsLiteral)(t)?kre(t.const):(0,ed.IsNumber)(t)?["[number]"]:(0,ed.IsInteger)(t)?["[number]"]:[])]}});var zw=M(Hw=>{"use strict";Object.defineProperty(Hw,"__esModule",{value:!0});Hw.IndexFromMappedResult=Are;var Cre=Tt(),Rre=of(),Mre=ki();function Pre(t,e,n){let i={};for(let r of Object.getOwnPropertyNames(e))i[r]=(0,Mre.Index)(t,(0,Rre.IndexPropertyKeys)(e[r]),n);return i}function Ire(t,e,n){return Pre(t,e.properties,n)}function Are(t,e,n){let i=Ire(t,e,n);return(0,Cre.MappedResult)(i)}});var af=M(Mc=>{"use strict";Object.defineProperty(Mc,"__esModule",{value:!0});Mc.IndexFromPropertyKey=Qw;Mc.IndexFromPropertyKeys=XW;Mc.IndexFromComputed=Gre;Mc.Index=Kre;var Ere=fe(),_re=Ki(),JW=Po(),sf=Ut(),Ore=Nn(),Vw=vt(),Lre=of(),Wre=Jw(),Fre=zw(),yn=Ue();function YW(t,e){return t.map(n=>Qw(n,e))}function Dre(t){return t.filter(e=>!(0,yn.IsNever)(e))}function Ure(t,e){return(0,Ore.IntersectEvaluated)(Dre(YW(t,e)))}function $re(t){return t.some(e=>(0,yn.IsNever)(e))?[]:t}function Nre(t,e){return(0,Vw.UnionEvaluated)($re(YW(t,e)))}function Bre(t,e){return e in t?t[e]:e==="[number]"?(0,Vw.UnionEvaluated)(t):(0,sf.Never)()}function jre(t,e){return e==="[number]"?t:(0,sf.Never)()}function qre(t,e){return e in t?t[e]:(0,sf.Never)()}function Qw(t,e){return(0,yn.IsIntersect)(t)?Ure(t.allOf,e):(0,yn.IsUnion)(t)?Nre(t.anyOf,e):(0,yn.IsTuple)(t)?Bre(t.items??[],e):(0,yn.IsArray)(t)?jre(t.items,e):(0,yn.IsObject)(t)?qre(t.properties,e):(0,sf.Never)()}function XW(t,e){return e.map(n=>Qw(t,n))}function QW(t,e){return(0,Vw.UnionEvaluated)(XW(t,e))}function Gre(t,e){return(0,JW.Computed)("Index",[t,e])}function Kre(t,e,n){if((0,yn.IsRef)(t)||(0,yn.IsRef)(e)){let i="Index types using Ref parameters require both Type and Key to be of TSchema";if(!(0,yn.IsSchema)(t)||!(0,yn.IsSchema)(e))throw new _re.TypeBoxError(i);return(0,JW.Computed)("Index",[t,e])}return(0,yn.IsMappedResult)(e)?(0,Fre.IndexFromMappedResult)(t,e,n):(0,yn.IsMappedKey)(e)?(0,Wre.IndexFromMappedKey)(t,e,n):(0,Ere.CreateType)((0,yn.IsSchema)(e)?QW(t,(0,Lre.IndexPropertyKeys)(e)):QW(t,e),n)}});var Jw=M(Yw=>{"use strict";Object.defineProperty(Yw,"__esModule",{value:!0});Yw.IndexFromMappedKey=Xre;var Hre=af(),zre=Tt(),Vre=bn();function Qre(t,e,n){return{[e]:(0,Hre.Index)(t,[e],(0,Vre.Clone)(n))}}function Jre(t,e,n){return e.reduce((i,r)=>({...i,...Qre(t,r,n)}),{})}function Yre(t,e,n){return Jre(t,e.keys,n)}function Xre(t,e,n){let i=Yre(t,e,n);return(0,zre.MappedResult)(i)}});var ki=M(Ji=>{"use strict";var Zre=Ji&&Ji.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),lf=Ji&&Ji.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Zre(e,t,n)};Object.defineProperty(Ji,"__esModule",{value:!0});lf(Jw(),Ji);lf(zw(),Ji);lf(of(),Ji);lf(af(),Ji)});var ZW=M(Xw=>{"use strict";Object.defineProperty(Xw,"__esModule",{value:!0});Xw.Iterator=noe;var eoe=fe(),toe=ge();function noe(t,e){return(0,eoe.CreateType)({[toe.Kind]:"Iterator",type:"Iterator",items:t},e)}});var Pc=M(na=>{"use strict";var ioe=na&&na.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),roe=na&&na.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&ioe(e,t,n)};Object.defineProperty(na,"__esModule",{value:!0});roe(ZW(),na)});var tF=M(cf=>{"use strict";Object.defineProperty(cf,"__esModule",{value:!0});cf.Object=void 0;var ooe=fe(),eF=ge(),soe=Ue();function aoe(t){return globalThis.Object.keys(t).filter(e=>!(0,soe.IsOptional)(t[e]))}function loe(t,e){let n=aoe(t),i=n.length>0?{[eF.Kind]:"Object",type:"object",required:n,properties:t}:{[eF.Kind]:"Object",type:"object",properties:t};return(0,ooe.CreateType)(i,e)}cf.Object=loe});var wn=M(ia=>{"use strict";var coe=ia&&ia.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),uoe=ia&&ia.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&coe(e,t,n)};Object.defineProperty(ia,"__esModule",{value:!0});uoe(tF(),ia)});var nF=M(Zw=>{"use strict";Object.defineProperty(Zw,"__esModule",{value:!0});Zw.Promise=moe;var poe=fe(),doe=ge();function moe(t,e){return(0,poe.CreateType)({[doe.Kind]:"Promise",type:"Promise",item:t},e)}});var td=M(ra=>{"use strict";var hoe=ra&&ra.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),goe=ra&&ra.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&hoe(e,t,n)};Object.defineProperty(ra,"__esModule",{value:!0});goe(nF(),ra)});var tS=M(eS=>{"use strict";Object.defineProperty(eS,"__esModule",{value:!0});eS.Readonly=Soe;var iF=fe(),rF=ge(),foe=Er(),boe=nS(),xoe=Ue();function voe(t){return(0,iF.CreateType)((0,foe.Discard)(t,[rF.ReadonlyKind]))}function yoe(t){return(0,iF.CreateType)({...t,[rF.ReadonlyKind]:"Readonly"})}function woe(t,e){return e===!1?voe(t):yoe(t)}function Soe(t,e){let n=e??!0;return(0,xoe.IsMappedResult)(t)?(0,boe.ReadonlyFromMappedResult)(t,n):woe(t,n)}});var nS=M(iS=>{"use strict";Object.defineProperty(iS,"__esModule",{value:!0});iS.ReadonlyFromMappedResult=Moe;var Toe=Tt(),koe=tS();function Coe(t,e){let n={};for(let i of globalThis.Object.getOwnPropertyNames(t))n[i]=(0,koe.Readonly)(t[i],e);return n}function Roe(t,e){return Coe(t.properties,e)}function Moe(t,e){let n=Roe(t,e);return(0,Toe.MappedResult)(n)}});var Oo=M(_o=>{"use strict";var Poe=_o&&_o.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),oF=_o&&_o.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Poe(e,t,n)};Object.defineProperty(_o,"__esModule",{value:!0});oF(nS(),_o);oF(tS(),_o)});var aF=M(rS=>{"use strict";Object.defineProperty(rS,"__esModule",{value:!0});rS.Tuple=Aoe;var Ioe=fe(),sF=ge();function Aoe(t,e){return(0,Ioe.CreateType)(t.length>0?{[sF.Kind]:"Tuple",type:"array",items:t,additionalItems:!1,minItems:t.length,maxItems:t.length}:{[sF.Kind]:"Tuple",type:"array",minItems:t.length,maxItems:t.length},e)}});var Lr=M(oa=>{"use strict";var Eoe=oa&&oa.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),_oe=oa&&oa.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Eoe(e,t,n)};Object.defineProperty(oa,"__esModule",{value:!0});_oe(aF(),oa)});var mF=M(uf=>{"use strict";Object.defineProperty(uf,"__esModule",{value:!0});uf.MappedFunctionReturnType=dF;uf.Mapped=Xoe;var oS=ge(),lF=Er(),Ooe=yc(),Loe=wc(),Woe=Sc(),Foe=Io(),Doe=ki(),Uoe=Nn(),$oe=Pc(),cF=rn(),uF=wn(),Noe=Vi(),Boe=td(),joe=Oo(),qoe=Lr(),Goe=vt(),Koe=zp(),Hoe=Tw(),on=Ue();function pF(t,e){return t in e?si(t,e[t]):(0,Hoe.MappedResult)(e)}function zoe(t){return{[t]:(0,cF.Literal)(t)}}function Voe(t){let e={};for(let n of t)e[n]=(0,cF.Literal)(n);return e}function Qoe(t,e){return(0,Koe.SetIncludes)(e,t)?zoe(t):Voe(e)}function Joe(t,e){let n=Qoe(t,e);return pF(t,n)}function nd(t,e){return e.map(n=>si(t,n))}function Yoe(t,e){let n={};for(let i of globalThis.Object.getOwnPropertyNames(e))n[i]=si(t,e[i]);return n}function si(t,e){let n={...e};return(0,on.IsOptional)(e)?(0,Noe.Optional)(si(t,(0,lF.Discard)(e,[oS.OptionalKind]))):(0,on.IsReadonly)(e)?(0,joe.Readonly)(si(t,(0,lF.Discard)(e,[oS.ReadonlyKind]))):(0,on.IsMappedResult)(e)?pF(t,e.properties):(0,on.IsMappedKey)(e)?Joe(t,e.keys):(0,on.IsConstructor)(e)?(0,Woe.Constructor)(nd(t,e.parameters),si(t,e.returns),n):(0,on.IsFunction)(e)?(0,Foe.Function)(nd(t,e.parameters),si(t,e.returns),n):(0,on.IsAsyncIterator)(e)?(0,Loe.AsyncIterator)(si(t,e.items),n):(0,on.IsIterator)(e)?(0,$oe.Iterator)(si(t,e.items),n):(0,on.IsIntersect)(e)?(0,Uoe.Intersect)(nd(t,e.allOf),n):(0,on.IsUnion)(e)?(0,Goe.Union)(nd(t,e.anyOf),n):(0,on.IsTuple)(e)?(0,qoe.Tuple)(nd(t,e.items??[]),n):(0,on.IsObject)(e)?(0,uF.Object)(Yoe(t,e.properties),n):(0,on.IsArray)(e)?(0,Ooe.Array)(si(t,e.items),n):(0,on.IsPromise)(e)?(0,Boe.Promise)(si(t,e.item),n):e}function dF(t,e){let n={};for(let i of t)n[i]=si(i,e);return n}function Xoe(t,e,n){let i=(0,on.IsSchema)(t)?(0,Doe.IndexPropertyKeys)(t):t,r=e({[oS.Kind]:"MappedKey",keys:i}),o=dF(i,r);return(0,uF.Object)(o,n)}});var Tt=M(Wr=>{"use strict";var Zoe=Wr&&Wr.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),sS=Wr&&Wr.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Zoe(e,t,n)};Object.defineProperty(Wr,"__esModule",{value:!0});sS(MW(),Wr);sS(Tw(),Wr);sS(mF(),Wr)});var lS=M(aS=>{"use strict";Object.defineProperty(aS,"__esModule",{value:!0});aS.Optional=sse;var hF=fe(),gF=ge(),ese=Er(),tse=cS(),nse=Ue();function ise(t){return(0,hF.CreateType)((0,ese.Discard)(t,[gF.OptionalKind]))}function rse(t){return(0,hF.CreateType)({...t,[gF.OptionalKind]:"Optional"})}function ose(t,e){return e===!1?ise(t):rse(t)}function sse(t,e){let n=e??!0;return(0,nse.IsMappedResult)(t)?(0,tse.OptionalFromMappedResult)(t,n):ose(t,n)}});var cS=M(uS=>{"use strict";Object.defineProperty(uS,"__esModule",{value:!0});uS.OptionalFromMappedResult=pse;var ase=Tt(),lse=lS();function cse(t,e){let n={};for(let i of globalThis.Object.getOwnPropertyNames(t))n[i]=(0,lse.Optional)(t[i],e);return n}function use(t,e){return cse(t.properties,e)}function pse(t,e){let n=use(t,e);return(0,ase.MappedResult)(n)}});var Vi=M(Lo=>{"use strict";var dse=Lo&&Lo.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),fF=Lo&&Lo.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&dse(e,t,n)};Object.defineProperty(Lo,"__esModule",{value:!0});fF(cS(),Lo);fF(lS(),Lo)});var mS=M(dS=>{"use strict";Object.defineProperty(dS,"__esModule",{value:!0});dS.IntersectCreate=hse;var mse=fe(),bF=ge(),pS=Ue();function hse(t,e={}){let n=t.every(r=>(0,pS.IsObject)(r)),i=(0,pS.IsSchema)(e.unevaluatedProperties)?{unevaluatedProperties:e.unevaluatedProperties}:{};return(0,mse.CreateType)(e.unevaluatedProperties===!1||(0,pS.IsSchema)(e.unevaluatedProperties)||n?{...i,[bF.Kind]:"Intersect",type:"object",allOf:t}:{...i,[bF.Kind]:"Intersect",allOf:t},e)}});var yF=M(gS=>{"use strict";Object.defineProperty(gS,"__esModule",{value:!0});gS.IntersectEvaluated=Tse;var gse=ge(),fse=fe(),bse=Er(),xse=Ut(),vse=Vi(),xF=mS(),hS=Ue();function yse(t){return t.every(e=>(0,hS.IsOptional)(e))}function wse(t){return(0,bse.Discard)(t,[gse.OptionalKind])}function vF(t){return t.map(e=>(0,hS.IsOptional)(e)?wse(e):e)}function Sse(t,e){return yse(t)?(0,vse.Optional)((0,xF.IntersectCreate)(vF(t),e)):(0,xF.IntersectCreate)(vF(t),e)}function Tse(t,e={}){if(t.length===1)return(0,fse.CreateType)(t[0],e);if(t.length===0)return(0,xse.Never)(e);if(t.some(n=>(0,hS.IsTransform)(n)))throw new Error("Cannot intersect transform types");return Sse(t,e)}});var SF=M(wF=>{"use strict";Object.defineProperty(wF,"__esModule",{value:!0});var mQe=ge()});var TF=M(fS=>{"use strict";Object.defineProperty(fS,"__esModule",{value:!0});fS.Intersect=Pse;var kse=fe(),Cse=Ut(),Rse=mS(),Mse=Ue();function Pse(t,e){if(t.length===1)return(0,kse.CreateType)(t[0],e);if(t.length===0)return(0,Cse.Never)(e);if(t.some(n=>(0,Mse.IsTransform)(n)))throw new Error("Cannot intersect transform types");return(0,Rse.IntersectCreate)(t,e)}});var Nn=M(Fr=>{"use strict";var Ise=Fr&&Fr.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),bS=Fr&&Fr.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Ise(e,t,n)};Object.defineProperty(Fr,"__esModule",{value:!0});bS(yF(),Fr);bS(SF(),Fr);bS(TF(),Fr)});var kF=M(xS=>{"use strict";Object.defineProperty(xS,"__esModule",{value:!0});xS.Ref=Ose;var Ase=Ki(),Ese=fe(),_se=ge();function Ose(...t){let[e,n]=typeof t[0]=="string"?[t[0],t[1]]:[t[0].$id,t[1]];if(typeof e!="string")throw new Ase.TypeBoxError("Ref: $ref must be a string");return(0,Ese.CreateType)({[_se.Kind]:"Ref",$ref:e},n)}});var Wo=M(sa=>{"use strict";var Lse=sa&&sa.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Wse=sa&&sa.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Lse(e,t,n)};Object.defineProperty(sa,"__esModule",{value:!0});Wse(kF(),sa)});var RF=M(wS=>{"use strict";Object.defineProperty(wS,"__esModule",{value:!0});wS.Awaited=yS;var Fse=fe(),vS=Po(),Dse=Nn(),Use=vt(),$se=Wo(),id=Ue();function Nse(t,e){return(0,vS.Computed)("Awaited",[(0,vS.Computed)(t,e)])}function Bse(t){return(0,vS.Computed)("Awaited",[(0,$se.Ref)(t)])}function jse(t){return(0,Dse.Intersect)(CF(t))}function qse(t){return(0,Use.Union)(CF(t))}function Gse(t){return yS(t)}function CF(t){return t.map(e=>yS(e))}function yS(t,e){return(0,Fse.CreateType)((0,id.IsComputed)(t)?Nse(t.target,t.parameters):(0,id.IsIntersect)(t)?jse(t.allOf):(0,id.IsUnion)(t)?qse(t.anyOf):(0,id.IsPromise)(t)?Gse(t.item):(0,id.IsRef)(t)?Bse(t.$ref):t,e)}});var rd=M(aa=>{"use strict";var Kse=aa&&aa.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Hse=aa&&aa.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Kse(e,t,n)};Object.defineProperty(aa,"__esModule",{value:!0});Hse(RF(),aa)});var df=M(pf=>{"use strict";Object.defineProperty(pf,"__esModule",{value:!0});pf.KeyOfPropertyKeys=TS;pf.KeyOfPattern=Zse;var MF=zp(),Ic=Ue();function PF(t){let e=[];for(let n of t)e.push(TS(n));return e}function zse(t){let e=PF(t);return(0,MF.SetUnionMany)(e)}function Vse(t){let e=PF(t);return(0,MF.SetIntersectMany)(e)}function Qse(t){return t.map((e,n)=>n.toString())}function Jse(t){return["[number]"]}function Yse(t){return globalThis.Object.getOwnPropertyNames(t)}function Xse(t){return SS?globalThis.Object.getOwnPropertyNames(t).map(n=>n[0]==="^"&&n[n.length-1]==="$"?n.slice(1,n.length-1):n):[]}function TS(t){return(0,Ic.IsIntersect)(t)?zse(t.allOf):(0,Ic.IsUnion)(t)?Vse(t.anyOf):(0,Ic.IsTuple)(t)?Qse(t.items??[]):(0,Ic.IsArray)(t)?Jse(t.items):(0,Ic.IsObject)(t)?Yse(t.properties):(0,Ic.IsRecord)(t)?Xse(t.patternProperties):[]}var SS=!1;function Zse(t){SS=!0;let e=TS(t);return SS=!1,`^(${e.map(i=>`(${i})`).join("|")})$`}});var RS=M(mf=>{"use strict";Object.defineProperty(mf,"__esModule",{value:!0});mf.KeyOfPropertyKeysToRest=IF;mf.KeyOf=uae;var eae=fe(),tae=rn(),nae=Ao(),CS=Po(),iae=Wo(),rae=df(),oae=vt(),sae=MS(),kS=Ue();function aae(t,e){return(0,CS.Computed)("KeyOf",[(0,CS.Computed)(t,e)])}function lae(t){return(0,CS.Computed)("KeyOf",[(0,iae.Ref)(t)])}function cae(t,e){let n=(0,rae.KeyOfPropertyKeys)(t),i=IF(n),r=(0,oae.UnionEvaluated)(i);return(0,eae.CreateType)(r,e)}function IF(t){return t.map(e=>e==="[number]"?(0,nae.Number)():(0,tae.Literal)(e))}function uae(t,e){return(0,kS.IsComputed)(t)?aae(t.target,t.parameters):(0,kS.IsRef)(t)?lae(t.$ref):(0,kS.IsMappedResult)(t)?(0,sae.KeyOfFromMappedResult)(t,e):cae(t,e)}});var MS=M(PS=>{"use strict";Object.defineProperty(PS,"__esModule",{value:!0});PS.KeyOfFromMappedResult=fae;var pae=Tt(),dae=RS(),mae=bn();function hae(t,e){let n={};for(let i of globalThis.Object.getOwnPropertyNames(t))n[i]=(0,dae.KeyOf)(t[i],(0,mae.Clone)(e));return n}function gae(t,e){return hae(t.properties,e)}function fae(t,e){let n=gae(t,e);return(0,pae.MappedResult)(n)}});var AF=M(IS=>{"use strict";Object.defineProperty(IS,"__esModule",{value:!0});IS.KeyOfPropertyEntries=vae;var bae=af(),xae=df();function vae(t){let e=(0,xae.KeyOfPropertyKeys)(t),n=(0,bae.IndexFromPropertyKeys)(t,e);return e.map((i,r)=>[e[r],n[r]])}});var Ac=M(Yi=>{"use strict";var yae=Yi&&Yi.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),hf=Yi&&Yi.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&yae(e,t,n)};Object.defineProperty(Yi,"__esModule",{value:!0});hf(MS(),Yi);hf(AF(),Yi);hf(df(),Yi);hf(RS(),Yi)});var EF=M(AS=>{"use strict";Object.defineProperty(AS,"__esModule",{value:!0});AS.Composite=Eae;var wae=Nn(),Sae=ki(),Tae=Ac(),kae=wn(),Cae=zp(),Rae=Ue();function Mae(t){let e=[];for(let n of t)e.push(...(0,Tae.KeyOfPropertyKeys)(n));return(0,Cae.SetDistinct)(e)}function Pae(t){return t.filter(e=>!(0,Rae.IsNever)(e))}function Iae(t,e){let n=[];for(let i of t)n.push(...(0,Sae.IndexFromPropertyKeys)(i,[e]));return Pae(n)}function Aae(t,e){let n={};for(let i of e)n[i]=(0,wae.IntersectEvaluated)(Iae(t,i));return n}function Eae(t,e){let n=Mae(t),i=Aae(t,n);return(0,kae.Object)(i,e)}});var gf=M(la=>{"use strict";var _ae=la&&la.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Oae=la&&la.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&_ae(e,t,n)};Object.defineProperty(la,"__esModule",{value:!0});Oae(EF(),la)});var _F=M(ES=>{"use strict";Object.defineProperty(ES,"__esModule",{value:!0});ES.Date=Fae;var Lae=ge(),Wae=fe();function Fae(t){return(0,Wae.CreateType)({[Lae.Kind]:"Date",type:"Date"},t)}});var od=M(ca=>{"use strict";var Dae=ca&&ca.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Uae=ca&&ca.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Dae(e,t,n)};Object.defineProperty(ca,"__esModule",{value:!0});Uae(_F(),ca)});var OF=M(_S=>{"use strict";Object.defineProperty(_S,"__esModule",{value:!0});_S.Null=Bae;var $ae=fe(),Nae=ge();function Bae(t){return(0,$ae.CreateType)({[Nae.Kind]:"Null",type:"null"},t)}});var sd=M(ua=>{"use strict";var jae=ua&&ua.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),qae=ua&&ua.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&jae(e,t,n)};Object.defineProperty(ua,"__esModule",{value:!0});qae(OF(),ua)});var LF=M(OS=>{"use strict";Object.defineProperty(OS,"__esModule",{value:!0});OS.Symbol=Hae;var Gae=fe(),Kae=ge();function Hae(t){return(0,Gae.CreateType)({[Kae.Kind]:"Symbol",type:"symbol"},t)}});var ad=M(pa=>{"use strict";var zae=pa&&pa.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Vae=pa&&pa.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&zae(e,t,n)};Object.defineProperty(pa,"__esModule",{value:!0});Vae(LF(),pa)});var WF=M(LS=>{"use strict";Object.defineProperty(LS,"__esModule",{value:!0});LS.Undefined=Yae;var Qae=fe(),Jae=ge();function Yae(t){return(0,Qae.CreateType)({[Jae.Kind]:"Undefined",type:"undefined"},t)}});var ld=M(da=>{"use strict";var Xae=da&&da.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Zae=da&&da.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Xae(e,t,n)};Object.defineProperty(da,"__esModule",{value:!0});Zae(WF(),da)});var FF=M(WS=>{"use strict";Object.defineProperty(WS,"__esModule",{value:!0});WS.Uint8Array=nle;var ele=fe(),tle=ge();function nle(t){return(0,ele.CreateType)({[tle.Kind]:"Uint8Array",type:"Uint8Array"},t)}});var cd=M(ma=>{"use strict";var ile=ma&&ma.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),rle=ma&&ma.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&ile(e,t,n)};Object.defineProperty(ma,"__esModule",{value:!0});rle(FF(),ma)});var DF=M(FS=>{"use strict";Object.defineProperty(FS,"__esModule",{value:!0});FS.Unknown=ale;var ole=fe(),sle=ge();function ale(t){return(0,ole.CreateType)({[sle.Kind]:"Unknown"},t)}});var ga=M(ha=>{"use strict";var lle=ha&&ha.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),cle=ha&&ha.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&lle(e,t,n)};Object.defineProperty(ha,"__esModule",{value:!0});cle(DF(),ha)});var NF=M(NS=>{"use strict";Object.defineProperty(NS,"__esModule",{value:!0});NS.Const=Sle;var UF=vc(),ule=Rc(),ple=od(),dle=Io(),DS=rn(),mle=sd(),$F=wn(),hle=ad(),gle=Lr(),US=Oo(),fle=ld(),ble=cd(),xle=ga(),vle=Ir(),Sn=nn();function yle(t){return t.map(e=>$S(e,!1))}function wle(t){let e={};for(let n of globalThis.Object.getOwnPropertyNames(t))e[n]=(0,US.Readonly)($S(t[n],!1));return e}function ff(t,e){return e===!0?t:(0,US.Readonly)(t)}function $S(t,e){return(0,Sn.IsAsyncIterator)(t)||(0,Sn.IsIterator)(t)?ff((0,UF.Any)(),e):(0,Sn.IsArray)(t)?(0,US.Readonly)((0,gle.Tuple)(yle(t))):(0,Sn.IsUint8Array)(t)?(0,ble.Uint8Array)():(0,Sn.IsDate)(t)?(0,ple.Date)():(0,Sn.IsObject)(t)?ff((0,$F.Object)(wle(t)),e):(0,Sn.IsFunction)(t)?ff((0,dle.Function)([],(0,xle.Unknown)()),e):(0,Sn.IsUndefined)(t)?(0,fle.Undefined)():(0,Sn.IsNull)(t)?(0,mle.Null)():(0,Sn.IsSymbol)(t)?(0,hle.Symbol)():(0,Sn.IsBigInt)(t)?(0,ule.BigInt)():(0,Sn.IsNumber)(t)||(0,Sn.IsBoolean)(t)||(0,Sn.IsString)(t)?(0,DS.Literal)(t):(0,$F.Object)({})}function Sle(t,e){return(0,vle.CreateType)($S(t,!0),e)}});var bf=M(fa=>{"use strict";var Tle=fa&&fa.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),kle=fa&&fa.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Tle(e,t,n)};Object.defineProperty(fa,"__esModule",{value:!0});kle(NF(),fa)});var BF=M(Dr=>{"use strict";var Cle=Dr&&Dr.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Rle=Dr&&Dr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Mle=Dr&&Dr.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;r<i.length;r++)i[r]!=="default"&&Cle(n,e,i[r]);return Rle(n,e),n}})();Object.defineProperty(Dr,"__esModule",{value:!0});Dr.ConstructorParameters=Ele;var Ple=Lr(),Ile=Ut(),Ale=Mle(Ue());function Ele(t,e){return Ale.IsConstructor(t)?(0,Ple.Tuple)(t.parameters,e):(0,Ile.Never)(e)}});var xf=M(ba=>{"use strict";var _le=ba&&ba.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Ole=ba&&ba.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&_le(e,t,n)};Object.defineProperty(ba,"__esModule",{value:!0});Ole(BF(),ba)});var jF=M(BS=>{"use strict";Object.defineProperty(BS,"__esModule",{value:!0});BS.Enum=Ule;var Lle=rn(),Wle=ge(),Fle=vt(),Dle=nn();function Ule(t,e){if((0,Dle.IsUndefined)(t))throw new Error("Enum undefined or empty");let n=globalThis.Object.getOwnPropertyNames(t).filter(o=>isNaN(o)).map(o=>t[o]),r=[...new Set(n)].map(o=>(0,Lle.Literal)(o));return(0,Fle.Union)(r,{...e,[Wle.Hint]:"Enum"})}});var vf=M(xa=>{"use strict";var $le=xa&&xa.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Nle=xa&&xa.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&$le(e,t,n)};Object.defineProperty(xa,"__esModule",{value:!0});Nle(jF(),xa)});var QS=M(va=>{"use strict";Object.defineProperty(va,"__esModule",{value:!0});va.ExtendsResult=va.ExtendsResolverError=void 0;va.ExtendsCheck=Ice;var qF=vc(),Ble=Io(),HS=Ao(),qS=ea(),jle=ga(),GF=Qi(),Ec=Hp(),QF=ge(),qle=Ki(),P=dw(),yf=class extends qle.TypeBoxError{};va.ExtendsResolverError=yf;var G;(function(t){t[t.Union=0]="Union",t[t.True=1]="True",t[t.False=2]="False"})(G||(va.ExtendsResult=G={}));function ai(t){return t===G.False?t:G.True}function _c(t){throw new yf(t)}function kt(t){return P.TypeGuard.IsNever(t)||P.TypeGuard.IsIntersect(t)||P.TypeGuard.IsUnion(t)||P.TypeGuard.IsUnknown(t)||P.TypeGuard.IsAny(t)}function Ct(t,e){return P.TypeGuard.IsNever(e)?XF(t,e):P.TypeGuard.IsIntersect(e)?wf(t,e):P.TypeGuard.IsUnion(e)?VS(t,e):P.TypeGuard.IsUnknown(e)?nD(t,e):P.TypeGuard.IsAny(e)?zS(t,e):_c("StructuralRight")}function zS(t,e){return G.True}function Gle(t,e){return P.TypeGuard.IsIntersect(e)?wf(t,e):P.TypeGuard.IsUnion(e)&&e.anyOf.some(n=>P.TypeGuard.IsAny(n)||P.TypeGuard.IsUnknown(n))?G.True:P.TypeGuard.IsUnion(e)?G.Union:P.TypeGuard.IsUnknown(e)||P.TypeGuard.IsAny(e)?G.True:G.Union}function Kle(t,e){return P.TypeGuard.IsUnknown(t)?G.False:P.TypeGuard.IsAny(t)?G.Union:P.TypeGuard.IsNever(t)?G.True:G.False}function Hle(t,e){return P.TypeGuard.IsObject(e)&&Sf(e)?G.True:kt(e)?Ct(t,e):P.TypeGuard.IsArray(e)?ai(He(t.items,e.items)):G.False}function zle(t,e){return kt(e)?Ct(t,e):P.TypeGuard.IsAsyncIterator(e)?ai(He(t.items,e.items)):G.False}function Vle(t,e){return kt(e)?Ct(t,e):P.TypeGuard.IsObject(e)?Ht(t,e):P.TypeGuard.IsRecord(e)?li(t,e):P.TypeGuard.IsBigInt(e)?G.True:G.False}function JF(t,e){return P.TypeGuard.IsLiteralBoolean(t)||P.TypeGuard.IsBoolean(t)?G.True:G.False}function Qle(t,e){return kt(e)?Ct(t,e):P.TypeGuard.IsObject(e)?Ht(t,e):P.TypeGuard.IsRecord(e)?li(t,e):P.TypeGuard.IsBoolean(e)?G.True:G.False}function Jle(t,e){return kt(e)?Ct(t,e):P.TypeGuard.IsObject(e)?Ht(t,e):P.TypeGuard.IsConstructor(e)?t.parameters.length>e.parameters.length?G.False:t.parameters.every((n,i)=>ai(He(e.parameters[i],n))===G.True)?ai(He(t.returns,e.returns)):G.False:G.False}function Yle(t,e){return kt(e)?Ct(t,e):P.TypeGuard.IsObject(e)?Ht(t,e):P.TypeGuard.IsRecord(e)?li(t,e):P.TypeGuard.IsDate(e)?G.True:G.False}function Xle(t,e){return kt(e)?Ct(t,e):P.TypeGuard.IsObject(e)?Ht(t,e):P.TypeGuard.IsFunction(e)?t.parameters.length>e.parameters.length?G.False:t.parameters.every((n,i)=>ai(He(e.parameters[i],n))===G.True)?ai(He(t.returns,e.returns)):G.False:G.False}function YF(t,e){return P.TypeGuard.IsLiteral(t)&&P.ValueGuard.IsNumber(t.const)||P.TypeGuard.IsNumber(t)||P.TypeGuard.IsInteger(t)?G.True:G.False}function Zle(t,e){return P.TypeGuard.IsInteger(e)||P.TypeGuard.IsNumber(e)?G.True:kt(e)?Ct(t,e):P.TypeGuard.IsObject(e)?Ht(t,e):P.TypeGuard.IsRecord(e)?li(t,e):G.False}function wf(t,e){return e.allOf.every(n=>He(t,n)===G.True)?G.True:G.False}function ece(t,e){return t.allOf.some(n=>He(n,e)===G.True)?G.True:G.False}function tce(t,e){return kt(e)?Ct(t,e):P.TypeGuard.IsIterator(e)?ai(He(t.items,e.items)):G.False}function nce(t,e){return P.TypeGuard.IsLiteral(e)&&e.const===t.const?G.True:kt(e)?Ct(t,e):P.TypeGuard.IsObject(e)?Ht(t,e):P.TypeGuard.IsRecord(e)?li(t,e):P.TypeGuard.IsString(e)?tD(t,e):P.TypeGuard.IsNumber(e)?ZF(t,e):P.TypeGuard.IsInteger(e)?YF(t,e):P.TypeGuard.IsBoolean(e)?JF(t,e):G.False}function XF(t,e){return G.False}function ice(t,e){return G.True}function KF(t){let[e,n]=[t,0];for(;P.TypeGuard.IsNot(e);)e=e.not,n+=1;return n%2===0?e:(0,jle.Unknown)()}function rce(t,e){return P.TypeGuard.IsNot(t)?He(KF(t),e):P.TypeGuard.IsNot(e)?He(t,KF(e)):_c("Invalid fallthrough for Not")}function oce(t,e){return kt(e)?Ct(t,e):P.TypeGuard.IsObject(e)?Ht(t,e):P.TypeGuard.IsRecord(e)?li(t,e):P.TypeGuard.IsNull(e)?G.True:G.False}function ZF(t,e){return P.TypeGuard.IsLiteralNumber(t)||P.TypeGuard.IsNumber(t)||P.TypeGuard.IsInteger(t)?G.True:G.False}function sce(t,e){return kt(e)?Ct(t,e):P.TypeGuard.IsObject(e)?Ht(t,e):P.TypeGuard.IsRecord(e)?li(t,e):P.TypeGuard.IsInteger(e)||P.TypeGuard.IsNumber(e)?G.True:G.False}function Tn(t,e){return Object.getOwnPropertyNames(t.properties).length===e}function HF(t){return Sf(t)}function zF(t){return Tn(t,0)||Tn(t,1)&&"description"in t.properties&&P.TypeGuard.IsUnion(t.properties.description)&&t.properties.description.anyOf.length===2&&(P.TypeGuard.IsString(t.properties.description.anyOf[0])&&P.TypeGuard.IsUndefined(t.properties.description.anyOf[1])||P.TypeGuard.IsString(t.properties.description.anyOf[1])&&P.TypeGuard.IsUndefined(t.properties.description.anyOf[0]))}function jS(t){return Tn(t,0)}function VF(t){return Tn(t,0)}function ace(t){return Tn(t,0)}function lce(t){return Tn(t,0)}function cce(t){return Sf(t)}function uce(t){let e=(0,HS.Number)();return Tn(t,0)||Tn(t,1)&&"length"in t.properties&&ai(He(t.properties.length,e))===G.True}function pce(t){return Tn(t,0)}function Sf(t){let e=(0,HS.Number)();return Tn(t,0)||Tn(t,1)&&"length"in t.properties&&ai(He(t.properties.length,e))===G.True}function dce(t){let e=(0,Ble.Function)([(0,qF.Any)()],(0,qF.Any)());return Tn(t,0)||Tn(t,1)&&"then"in t.properties&&ai(He(t.properties.then,e))===G.True}function eD(t,e){return He(t,e)===G.False||P.TypeGuard.IsOptional(t)&&!P.TypeGuard.IsOptional(e)?G.False:G.True}function Ht(t,e){return P.TypeGuard.IsUnknown(t)?G.False:P.TypeGuard.IsAny(t)?G.Union:P.TypeGuard.IsNever(t)||P.TypeGuard.IsLiteralString(t)&&HF(e)||P.TypeGuard.IsLiteralNumber(t)&&jS(e)||P.TypeGuard.IsLiteralBoolean(t)&&VF(e)||P.TypeGuard.IsSymbol(t)&&zF(e)||P.TypeGuard.IsBigInt(t)&&ace(e)||P.TypeGuard.IsString(t)&&HF(e)||P.TypeGuard.IsSymbol(t)&&zF(e)||P.TypeGuard.IsNumber(t)&&jS(e)||P.TypeGuard.IsInteger(t)&&jS(e)||P.TypeGuard.IsBoolean(t)&&VF(e)||P.TypeGuard.IsUint8Array(t)&&cce(e)||P.TypeGuard.IsDate(t)&&lce(e)||P.TypeGuard.IsConstructor(t)&&pce(e)||P.TypeGuard.IsFunction(t)&&uce(e)?G.True:P.TypeGuard.IsRecord(t)&&P.TypeGuard.IsString(GS(t))?e[QF.Hint]==="Record"?G.True:G.False:P.TypeGuard.IsRecord(t)&&P.TypeGuard.IsNumber(GS(t))&&Tn(e,0)?G.True:G.False}function mce(t,e){return kt(e)?Ct(t,e):P.TypeGuard.IsRecord(e)?li(t,e):P.TypeGuard.IsObject(e)?(()=>{for(let n of Object.getOwnPropertyNames(e.properties)){if(!(n in t.properties)&&!P.TypeGuard.IsOptional(e.properties[n]))return G.False;if(P.TypeGuard.IsOptional(e.properties[n]))return G.True;if(eD(t.properties[n],e.properties[n])===G.False)return G.False}return G.True})():G.False}function hce(t,e){return kt(e)?Ct(t,e):P.TypeGuard.IsObject(e)&&dce(e)?G.True:P.TypeGuard.IsPromise(e)?ai(He(t.item,e.item)):G.False}function GS(t){return Ec.PatternNumberExact in t.patternProperties?(0,HS.Number)():Ec.PatternStringExact in t.patternProperties?(0,qS.String)():_c("Unknown record key pattern")}function KS(t){return Ec.PatternNumberExact in t.patternProperties?t.patternProperties[Ec.PatternNumberExact]:Ec.PatternStringExact in t.patternProperties?t.patternProperties[Ec.PatternStringExact]:_c("Unable to get record value schema")}function li(t,e){let[n,i]=[GS(e),KS(e)];return P.TypeGuard.IsLiteralString(t)&&P.TypeGuard.IsNumber(n)&&ai(He(t,i))===G.True?G.True:P.TypeGuard.IsUint8Array(t)&&P.TypeGuard.IsNumber(n)||P.TypeGuard.IsString(t)&&P.TypeGuard.IsNumber(n)||P.TypeGuard.IsArray(t)&&P.TypeGuard.IsNumber(n)?He(t,i):P.TypeGuard.IsObject(t)?(()=>{for(let r of Object.getOwnPropertyNames(t.properties))if(eD(i,t.properties[r])===G.False)return G.False;return G.True})():G.False}function gce(t,e){return kt(e)?Ct(t,e):P.TypeGuard.IsObject(e)?Ht(t,e):P.TypeGuard.IsRecord(e)?He(KS(t),KS(e)):G.False}function fce(t,e){let n=P.TypeGuard.IsRegExp(t)?(0,qS.String)():t,i=P.TypeGuard.IsRegExp(e)?(0,qS.String)():e;return He(n,i)}function tD(t,e){return P.TypeGuard.IsLiteral(t)&&P.ValueGuard.IsString(t.const)||P.TypeGuard.IsString(t)?G.True:G.False}function bce(t,e){return kt(e)?Ct(t,e):P.TypeGuard.IsObject(e)?Ht(t,e):P.TypeGuard.IsRecord(e)?li(t,e):P.TypeGuard.IsString(e)?G.True:G.False}function xce(t,e){return kt(e)?Ct(t,e):P.TypeGuard.IsObject(e)?Ht(t,e):P.TypeGuard.IsRecord(e)?li(t,e):P.TypeGuard.IsSymbol(e)?G.True:G.False}function vce(t,e){return P.TypeGuard.IsTemplateLiteral(t)?He((0,GF.TemplateLiteralToUnion)(t),e):P.TypeGuard.IsTemplateLiteral(e)?He(t,(0,GF.TemplateLiteralToUnion)(e)):_c("Invalid fallthrough for TemplateLiteral")}function yce(t,e){return P.TypeGuard.IsArray(e)&&t.items!==void 0&&t.items.every(n=>He(n,e.items)===G.True)}function wce(t,e){return P.TypeGuard.IsNever(t)?G.True:P.TypeGuard.IsUnknown(t)?G.False:P.TypeGuard.IsAny(t)?G.Union:G.False}function Sce(t,e){return kt(e)?Ct(t,e):P.TypeGuard.IsObject(e)&&Sf(e)||P.TypeGuard.IsArray(e)&&yce(t,e)?G.True:P.TypeGuard.IsTuple(e)?P.ValueGuard.IsUndefined(t.items)&&!P.ValueGuard.IsUndefined(e.items)||!P.ValueGuard.IsUndefined(t.items)&&P.ValueGuard.IsUndefined(e.items)?G.False:P.ValueGuard.IsUndefined(t.items)&&!P.ValueGuard.IsUndefined(e.items)||t.items.every((n,i)=>He(n,e.items[i])===G.True)?G.True:G.False:G.False}function Tce(t,e){return kt(e)?Ct(t,e):P.TypeGuard.IsObject(e)?Ht(t,e):P.TypeGuard.IsRecord(e)?li(t,e):P.TypeGuard.IsUint8Array(e)?G.True:G.False}function kce(t,e){return kt(e)?Ct(t,e):P.TypeGuard.IsObject(e)?Ht(t,e):P.TypeGuard.IsRecord(e)?li(t,e):P.TypeGuard.IsVoid(e)?Mce(t,e):P.TypeGuard.IsUndefined(e)?G.True:G.False}function VS(t,e){return e.anyOf.some(n=>He(t,n)===G.True)?G.True:G.False}function Cce(t,e){return t.anyOf.every(n=>He(n,e)===G.True)?G.True:G.False}function nD(t,e){return G.True}function Rce(t,e){return P.TypeGuard.IsNever(e)?XF(t,e):P.TypeGuard.IsIntersect(e)?wf(t,e):P.TypeGuard.IsUnion(e)?VS(t,e):P.TypeGuard.IsAny(e)?zS(t,e):P.TypeGuard.IsString(e)?tD(t,e):P.TypeGuard.IsNumber(e)?ZF(t,e):P.TypeGuard.IsInteger(e)?YF(t,e):P.TypeGuard.IsBoolean(e)?JF(t,e):P.TypeGuard.IsArray(e)?Kle(t,e):P.TypeGuard.IsTuple(e)?wce(t,e):P.TypeGuard.IsObject(e)?Ht(t,e):P.TypeGuard.IsUnknown(e)?G.True:G.False}function Mce(t,e){return P.TypeGuard.IsUndefined(t)||P.TypeGuard.IsUndefined(t)?G.True:G.False}function Pce(t,e){return P.TypeGuard.IsIntersect(e)?wf(t,e):P.TypeGuard.IsUnion(e)?VS(t,e):P.TypeGuard.IsUnknown(e)?nD(t,e):P.TypeGuard.IsAny(e)?zS(t,e):P.TypeGuard.IsObject(e)?Ht(t,e):P.TypeGuard.IsVoid(e)?G.True:G.False}function He(t,e){return P.TypeGuard.IsTemplateLiteral(t)||P.TypeGuard.IsTemplateLiteral(e)?vce(t,e):P.TypeGuard.IsRegExp(t)||P.TypeGuard.IsRegExp(e)?fce(t,e):P.TypeGuard.IsNot(t)||P.TypeGuard.IsNot(e)?rce(t,e):P.TypeGuard.IsAny(t)?Gle(t,e):P.TypeGuard.IsArray(t)?Hle(t,e):P.TypeGuard.IsBigInt(t)?Vle(t,e):P.TypeGuard.IsBoolean(t)?Qle(t,e):P.TypeGuard.IsAsyncIterator(t)?zle(t,e):P.TypeGuard.IsConstructor(t)?Jle(t,e):P.TypeGuard.IsDate(t)?Yle(t,e):P.TypeGuard.IsFunction(t)?Xle(t,e):P.TypeGuard.IsInteger(t)?Zle(t,e):P.TypeGuard.IsIntersect(t)?ece(t,e):P.TypeGuard.IsIterator(t)?tce(t,e):P.TypeGuard.IsLiteral(t)?nce(t,e):P.TypeGuard.IsNever(t)?ice(t,e):P.TypeGuard.IsNull(t)?oce(t,e):P.TypeGuard.IsNumber(t)?sce(t,e):P.TypeGuard.IsObject(t)?mce(t,e):P.TypeGuard.IsRecord(t)?gce(t,e):P.TypeGuard.IsString(t)?bce(t,e):P.TypeGuard.IsSymbol(t)?xce(t,e):P.TypeGuard.IsTuple(t)?Sce(t,e):P.TypeGuard.IsPromise(t)?hce(t,e):P.TypeGuard.IsUint8Array(t)?Tce(t,e):P.TypeGuard.IsUndefined(t)?kce(t,e):P.TypeGuard.IsUnion(t)?Cce(t,e):P.TypeGuard.IsUnknown(t)?Rce(t,e):P.TypeGuard.IsVoid(t)?Pce(t,e):_c(`Unknown left type operand '${t[QF.Kind]}'`)}function Ice(t,e){return He(t,e)}});var YS=M(JS=>{"use strict";Object.defineProperty(JS,"__esModule",{value:!0});JS.ExtendsFromMappedResult=Wce;var Ace=Tt(),Ece=Tf(),_ce=bn();function Oce(t,e,n,i,r){let o={};for(let s of globalThis.Object.getOwnPropertyNames(t))o[s]=(0,Ece.Extends)(t[s],e,n,i,(0,_ce.Clone)(r));return o}function Lce(t,e,n,i,r){return Oce(t.properties,e,n,i,r)}function Wce(t,e,n,i,r){let o=Lce(t,e,n,i,r);return(0,Ace.MappedResult)(o)}});var Tf=M(ZS=>{"use strict";Object.defineProperty(ZS,"__esModule",{value:!0});ZS.Extends=Nce;var iD=fe(),Fce=vt(),XS=QS(),Dce=eT(),Uce=YS(),rD=Ue();function $ce(t,e,n,i){let r=(0,XS.ExtendsCheck)(t,e);return r===XS.ExtendsResult.Union?(0,Fce.Union)([n,i]):r===XS.ExtendsResult.True?n:i}function Nce(t,e,n,i,r){return(0,rD.IsMappedResult)(t)?(0,Uce.ExtendsFromMappedResult)(t,e,n,i,r):(0,rD.IsMappedKey)(t)?(0,iD.CreateType)((0,Dce.ExtendsFromMappedKey)(t,e,n,i,r)):(0,iD.CreateType)($ce(t,e,n,i),r)}});var eT=M(tT=>{"use strict";Object.defineProperty(tT,"__esModule",{value:!0});tT.ExtendsFromMappedKey=Vce;var Bce=Tt(),jce=rn(),qce=Tf(),Gce=bn();function Kce(t,e,n,i,r){return{[t]:(0,qce.Extends)((0,jce.Literal)(t),e,n,i,(0,Gce.Clone)(r))}}function Hce(t,e,n,i,r){return t.reduce((o,s)=>({...o,...Kce(s,e,n,i,r)}),{})}function zce(t,e,n,i,r){return Hce(t.keys,e,n,i,r)}function Vce(t,e,n,i,r){let o=zce(t,e,n,i,r);return(0,Bce.MappedResult)(o)}});var oD=M(nT=>{"use strict";Object.defineProperty(nT,"__esModule",{value:!0});nT.ExtendsUndefinedCheck=Cf;var kf=ge();function Qce(t){return t.allOf.every(e=>Cf(e))}function Jce(t){return t.anyOf.some(e=>Cf(e))}function Yce(t){return!Cf(t.not)}function Cf(t){return t[kf.Kind]==="Intersect"?Qce(t):t[kf.Kind]==="Union"?Jce(t):t[kf.Kind]==="Not"?Yce(t):t[kf.Kind]==="Undefined"}});var Oc=M(Ci=>{"use strict";var Xce=Ci&&Ci.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),ud=Ci&&Ci.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Xce(e,t,n)};Object.defineProperty(Ci,"__esModule",{value:!0});ud(QS(),Ci);ud(eT(),Ci);ud(YS(),Ci);ud(oD(),Ci);ud(Tf(),Ci)});var rT=M(iT=>{"use strict";Object.defineProperty(iT,"__esModule",{value:!0});iT.ExcludeFromTemplateLiteral=tue;var Zce=Rf(),eue=Qi();function tue(t,e){return(0,Zce.Exclude)((0,eue.TemplateLiteralToUnion)(t),e)}});var Rf=M(aT=>{"use strict";Object.defineProperty(aT,"__esModule",{value:!0});aT.Exclude=aue;var oT=fe(),nue=vt(),iue=Ut(),Mf=Oc(),rue=lT(),oue=rT(),sT=Ue();function sue(t,e){let n=t.filter(i=>(0,Mf.ExtendsCheck)(i,e)===Mf.ExtendsResult.False);return n.length===1?n[0]:(0,nue.Union)(n)}function aue(t,e,n={}){return(0,sT.IsTemplateLiteral)(t)?(0,oT.CreateType)((0,oue.ExcludeFromTemplateLiteral)(t,e),n):(0,sT.IsMappedResult)(t)?(0,oT.CreateType)((0,rue.ExcludeFromMappedResult)(t,e),n):(0,oT.CreateType)((0,sT.IsUnion)(t)?sue(t.anyOf,e):(0,Mf.ExtendsCheck)(t,e)!==Mf.ExtendsResult.False?(0,iue.Never)():t,n)}});var lT=M(cT=>{"use strict";Object.defineProperty(cT,"__esModule",{value:!0});cT.ExcludeFromMappedResult=due;var lue=Tt(),cue=Rf();function uue(t,e){let n={};for(let i of globalThis.Object.getOwnPropertyNames(t))n[i]=(0,cue.Exclude)(t[i],e);return n}function pue(t,e){return uue(t.properties,e)}function due(t,e){let n=pue(t,e);return(0,lue.MappedResult)(n)}});var Pf=M(Ur=>{"use strict";var mue=Ur&&Ur.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),uT=Ur&&Ur.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&mue(e,t,n)};Object.defineProperty(Ur,"__esModule",{value:!0});uT(lT(),Ur);uT(rT(),Ur);uT(Rf(),Ur)});var dT=M(pT=>{"use strict";Object.defineProperty(pT,"__esModule",{value:!0});pT.ExtractFromTemplateLiteral=fue;var hue=If(),gue=Qi();function fue(t,e){return(0,hue.Extract)((0,gue.TemplateLiteralToUnion)(t),e)}});var If=M(gT=>{"use strict";Object.defineProperty(gT,"__esModule",{value:!0});gT.Extract=Sue;var mT=fe(),bue=vt(),xue=Ut(),Af=Oc(),vue=fT(),yue=dT(),hT=Ue();function wue(t,e){let n=t.filter(i=>(0,Af.ExtendsCheck)(i,e)!==Af.ExtendsResult.False);return n.length===1?n[0]:(0,bue.Union)(n)}function Sue(t,e,n){return(0,hT.IsTemplateLiteral)(t)?(0,mT.CreateType)((0,yue.ExtractFromTemplateLiteral)(t,e),n):(0,hT.IsMappedResult)(t)?(0,mT.CreateType)((0,vue.ExtractFromMappedResult)(t,e),n):(0,mT.CreateType)((0,hT.IsUnion)(t)?wue(t.anyOf,e):(0,Af.ExtendsCheck)(t,e)!==Af.ExtendsResult.False?t:(0,xue.Never)(),n)}});var fT=M(bT=>{"use strict";Object.defineProperty(bT,"__esModule",{value:!0});bT.ExtractFromMappedResult=Mue;var Tue=Tt(),kue=If();function Cue(t,e){let n={};for(let i of globalThis.Object.getOwnPropertyNames(t))n[i]=(0,kue.Extract)(t[i],e);return n}function Rue(t,e){return Cue(t.properties,e)}function Mue(t,e){let n=Rue(t,e);return(0,Tue.MappedResult)(n)}});var Ef=M($r=>{"use strict";var Pue=$r&&$r.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),xT=$r&&$r.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Pue(e,t,n)};Object.defineProperty($r,"__esModule",{value:!0});xT(fT(),$r);xT(dT(),$r);xT(If(),$r)});var sD=M(Nr=>{"use strict";var Iue=Nr&&Nr.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Aue=Nr&&Nr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Eue=Nr&&Nr.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;r<i.length;r++)i[r]!=="default"&&Iue(n,e,i[r]);return Aue(n,e),n}})();Object.defineProperty(Nr,"__esModule",{value:!0});Nr.InstanceType=Wue;var _ue=fe(),Oue=Ut(),Lue=Eue(Ue());function Wue(t,e){return Lue.IsConstructor(t)?(0,_ue.CreateType)(t.returns,e):(0,Oue.Never)(e)}});var _f=M(ya=>{"use strict";var Fue=ya&&ya.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Due=ya&&ya.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Fue(e,t,n)};Object.defineProperty(ya,"__esModule",{value:!0});Due(sD(),ya)});var aD=M(vT=>{"use strict";Object.defineProperty(vT,"__esModule",{value:!0});vT.ReadonlyOptional=Nue;var Uue=Oo(),$ue=Vi();function Nue(t){return(0,Uue.Readonly)((0,$ue.Optional)(t))}});var pd=M(wa=>{"use strict";var Bue=wa&&wa.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),jue=wa&&wa.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Bue(e,t,n)};Object.defineProperty(wa,"__esModule",{value:!0});jue(aD(),wa)});var dD=M(Lc=>{"use strict";Object.defineProperty(Lc,"__esModule",{value:!0});Lc.Record=ope;Lc.RecordPattern=wT;Lc.RecordKey=spe;Lc.RecordValue=ape;var que=fe(),cD=ge(),Gue=Ut(),Kue=Ao(),uD=wn(),lD=ea(),Hue=vt(),zue=Qi(),Sa=Hp(),pD=ki(),Vue=nn(),Xi=Ue();function Ta(t,e,n){return(0,que.CreateType)({[cD.Kind]:"Record",type:"object",patternProperties:{[t]:e}},n)}function yT(t,e,n){let i={};for(let r of t)i[r]=e;return(0,uD.Object)(i,{...n,[cD.Hint]:"Record"})}function Que(t,e,n){return(0,zue.IsTemplateLiteralFinite)(t)?yT((0,pD.IndexPropertyKeys)(t),e,n):Ta(t.pattern,e,n)}function Jue(t,e,n){return yT((0,pD.IndexPropertyKeys)((0,Hue.Union)(t)),e,n)}function Yue(t,e,n){return yT([t.toString()],e,n)}function Xue(t,e,n){return Ta(t.source,e,n)}function Zue(t,e,n){let i=(0,Vue.IsUndefined)(t.pattern)?Sa.PatternStringExact:t.pattern;return Ta(i,e,n)}function epe(t,e,n){return Ta(Sa.PatternStringExact,e,n)}function tpe(t,e,n){return Ta(Sa.PatternNeverExact,e,n)}function npe(t,e,n){return(0,uD.Object)({true:e,false:e},n)}function ipe(t,e,n){return Ta(Sa.PatternNumberExact,e,n)}function rpe(t,e,n){return Ta(Sa.PatternNumberExact,e,n)}function ope(t,e,n={}){return(0,Xi.IsUnion)(t)?Jue(t.anyOf,e,n):(0,Xi.IsTemplateLiteral)(t)?Que(t,e,n):(0,Xi.IsLiteral)(t)?Yue(t.const,e,n):(0,Xi.IsBoolean)(t)?npe(t,e,n):(0,Xi.IsInteger)(t)?ipe(t,e,n):(0,Xi.IsNumber)(t)?rpe(t,e,n):(0,Xi.IsRegExp)(t)?Xue(t,e,n):(0,Xi.IsString)(t)?Zue(t,e,n):(0,Xi.IsAny)(t)?epe(t,e,n):(0,Xi.IsNever)(t)?tpe(t,e,n):(0,Gue.Never)(n)}function wT(t){return globalThis.Object.getOwnPropertyNames(t.patternProperties)[0]}function spe(t){let e=wT(t);return e===Sa.PatternStringExact?(0,lD.String)():e===Sa.PatternNumberExact?(0,Kue.Number)():(0,lD.String)({pattern:e})}function ape(t){return t.patternProperties[wT(t)]}});var Wc=M(ka=>{"use strict";var lpe=ka&&ka.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),cpe=ka&&ka.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&lpe(e,t,n)};Object.defineProperty(ka,"__esModule",{value:!0});cpe(dD(),ka)});var hD=M(Zi=>{"use strict";var upe=Zi&&Zi.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),ppe=Zi&&Zi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),mD=Zi&&Zi.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;r<i.length;r++)i[r]!=="default"&&upe(n,e,i[r]);return ppe(n,e),n}})();Object.defineProperty(Zi,"__esModule",{value:!0});Zi.FromTypes=Fc;Zi.Instantiate=Ope;var dpe=Gg(),mpe=ga(),hpe=pd(),gpe=Oo(),fpe=Vi(),bpe=wn(),ST=Wc(),xpe=mD(nn()),kn=mD(Ue());function vpe(t,e){return e.parameters=Fc(t,e.parameters),e.returns=Ri(t,e.returns),e}function ype(t,e){return e.parameters=Fc(t,e.parameters),e.returns=Ri(t,e.returns),e}function wpe(t,e){return e.allOf=Fc(t,e.allOf),e}function Spe(t,e){return e.anyOf=Fc(t,e.anyOf),e}function Tpe(t,e){return xpe.IsUndefined(e.items)||(e.items=Fc(t,e.items)),e}function kpe(t,e){return e.items=Ri(t,e.items),e}function Cpe(t,e){return e.items=Ri(t,e.items),e}function Rpe(t,e){return e.items=Ri(t,e.items),e}function Mpe(t,e){return e.item=Ri(t,e.item),e}function Ppe(t,e){let n=_pe(t,e.properties);return{...e,...(0,bpe.Object)(n)}}function Ipe(t,e){let n=Ri(t,(0,ST.RecordKey)(e)),i=Ri(t,(0,ST.RecordValue)(e)),r=(0,ST.Record)(n,i);return{...e,...r}}function Ape(t,e){return e.index in t?t[e.index]:(0,mpe.Unknown)()}function Epe(t,e){let n=kn.IsReadonly(e),i=kn.IsOptional(e),r=Ri(t,e);return n&&i?(0,hpe.ReadonlyOptional)(r):n&&!i?(0,gpe.Readonly)(r):!n&&i?(0,fpe.Optional)(r):r}function _pe(t,e){return globalThis.Object.getOwnPropertyNames(e).reduce((n,i)=>({...n,[i]:Epe(t,e[i])}),{})}function Fc(t,e){return e.map(n=>Ri(t,n))}function Ri(t,e){return kn.IsConstructor(e)?vpe(t,e):kn.IsFunction(e)?ype(t,e):kn.IsIntersect(e)?wpe(t,e):kn.IsUnion(e)?Spe(t,e):kn.IsTuple(e)?Tpe(t,e):kn.IsArray(e)?kpe(t,e):kn.IsAsyncIterator(e)?Cpe(t,e):kn.IsIterator(e)?Rpe(t,e):kn.IsPromise(e)?Mpe(t,e):kn.IsObject(e)?Ppe(t,e):kn.IsRecord(e)?Ipe(t,e):kn.IsArgument(e)?Ape(t,e):e}function Ope(t,e){return Ri(e,(0,dpe.CloneType)(t))}});var Of=M(Ca=>{"use strict";var Lpe=Ca&&Ca.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Wpe=Ca&&Ca.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Lpe(e,t,n)};Object.defineProperty(Ca,"__esModule",{value:!0});Wpe(hD(),Ca)});var gD=M(TT=>{"use strict";Object.defineProperty(TT,"__esModule",{value:!0});TT.Integer=Upe;var Fpe=fe(),Dpe=ge();function Upe(t){return(0,Fpe.CreateType)({[Dpe.Kind]:"Integer",type:"integer"},t)}});var Lf=M(Ra=>{"use strict";var $pe=Ra&&Ra.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Npe=Ra&&Ra.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&$pe(e,t,n)};Object.defineProperty(Ra,"__esModule",{value:!0});Npe(gD(),Ra)});var CT=M(kT=>{"use strict";Object.defineProperty(kT,"__esModule",{value:!0});kT.IntrinsicFromMappedKey=Vpe;var Bpe=Tt(),jpe=Ma(),qpe=rn(),Gpe=bn();function Kpe(t,e,n){return{[t]:(0,jpe.Intrinsic)((0,qpe.Literal)(t),e,(0,Gpe.Clone)(n))}}function Hpe(t,e,n){return t.reduce((r,o)=>({...r,...Kpe(o,e,n)}),{})}function zpe(t,e,n){return Hpe(t.keys,e,n)}function Vpe(t,e,n){let i=zpe(t,e,n);return(0,Bpe.MappedResult)(i)}});var Ma=M(RT=>{"use strict";Object.defineProperty(RT,"__esModule",{value:!0});RT.Intrinsic=yD;var Qpe=fe(),Wf=Qi(),Jpe=CT(),fD=rn(),bD=vt(),Ff=Ue();function Ype(t){let[e,n]=[t.slice(0,1),t.slice(1)];return[e.toLowerCase(),n].join("")}function Xpe(t){let[e,n]=[t.slice(0,1),t.slice(1)];return[e.toUpperCase(),n].join("")}function Zpe(t){return t.toUpperCase()}function ede(t){return t.toLowerCase()}function tde(t,e,n){let i=(0,Wf.TemplateLiteralParseExact)(t.pattern);if(!(0,Wf.IsTemplateLiteralExpressionFinite)(i))return{...t,pattern:xD(t.pattern,e)};let s=[...(0,Wf.TemplateLiteralExpressionGenerate)(i)].map(c=>(0,fD.Literal)(c)),a=vD(s,e),l=(0,bD.Union)(a);return(0,Wf.TemplateLiteral)([l],n)}function xD(t,e){return typeof t=="string"?e==="Uncapitalize"?Ype(t):e==="Capitalize"?Xpe(t):e==="Uppercase"?Zpe(t):e==="Lowercase"?ede(t):t:t.toString()}function vD(t,e){return t.map(n=>yD(n,e))}function yD(t,e,n={}){return(0,Ff.IsMappedKey)(t)?(0,Jpe.IntrinsicFromMappedKey)(t,e,n):(0,Ff.IsTemplateLiteral)(t)?tde(t,e,n):(0,Ff.IsUnion)(t)?(0,bD.Union)(vD(t.anyOf,e),n):(0,Ff.IsLiteral)(t)?(0,fD.Literal)(xD(t.const,e),n):(0,Qpe.CreateType)(t,n)}});var wD=M(MT=>{"use strict";Object.defineProperty(MT,"__esModule",{value:!0});MT.Capitalize=ide;var nde=Ma();function ide(t,e={}){return(0,nde.Intrinsic)(t,"Capitalize",e)}});var SD=M(PT=>{"use strict";Object.defineProperty(PT,"__esModule",{value:!0});PT.Lowercase=ode;var rde=Ma();function ode(t,e={}){return(0,rde.Intrinsic)(t,"Lowercase",e)}});var TD=M(IT=>{"use strict";Object.defineProperty(IT,"__esModule",{value:!0});IT.Uncapitalize=ade;var sde=Ma();function ade(t,e={}){return(0,sde.Intrinsic)(t,"Uncapitalize",e)}});var kD=M(AT=>{"use strict";Object.defineProperty(AT,"__esModule",{value:!0});AT.Uppercase=cde;var lde=Ma();function cde(t,e={}){return(0,lde.Intrinsic)(t,"Uppercase",e)}});var Df=M(ci=>{"use strict";var ude=ci&&ci.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Dc=ci&&ci.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&ude(e,t,n)};Object.defineProperty(ci,"__esModule",{value:!0});Dc(wD(),ci);Dc(CT(),ci);Dc(Ma(),ci);Dc(SD(),ci);Dc(TD(),ci);Dc(kD(),ci)});var _T=M(ET=>{"use strict";Object.defineProperty(ET,"__esModule",{value:!0});ET.OmitFromMappedResult=fde;var pde=Tt(),dde=Uf(),mde=bn();function hde(t,e,n){let i={};for(let r of globalThis.Object.getOwnPropertyNames(t))i[r]=(0,dde.Omit)(t[r],e,(0,mde.Clone)(n));return i}function gde(t,e,n){return hde(t.properties,e,n)}function fde(t,e,n){let i=gde(t,e,n);return(0,pde.MappedResult)(i)}});var Uf=M(WT=>{"use strict";Object.defineProperty(WT,"__esModule",{value:!0});WT.Omit=_de;var bde=fe(),xde=Yg(),vde=jp(),OT=Po(),yde=rn(),wde=ki(),Sde=Nn(),CD=vt(),RD=wn(),Tde=FT(),kde=_T(),Br=Ue(),Cde=nn();function Rde(t,e){return t.map(n=>LT(n,e))}function Mde(t,e){return t.map(n=>LT(n,e))}function Pde(t,e){let{[e]:n,...i}=t;return i}function Ide(t,e){return e.reduce((n,i)=>Pde(n,i),t)}function Ade(t,e,n){let i=(0,xde.Discard)(t,[vde.TransformKind,"$id","required","properties"]),r=Ide(n,e);return(0,RD.Object)(r,i)}function Ede(t){let e=t.reduce((n,i)=>(0,Br.IsLiteralValue)(i)?[...n,(0,yde.Literal)(i)]:n,[]);return(0,CD.Union)(e)}function LT(t,e){return(0,Br.IsIntersect)(t)?(0,Sde.Intersect)(Rde(t.allOf,e)):(0,Br.IsUnion)(t)?(0,CD.Union)(Mde(t.anyOf,e)):(0,Br.IsObject)(t)?Ade(t,e,t.properties):(0,RD.Object)({})}function _de(t,e,n){let i=(0,Cde.IsArray)(e)?Ede(e):e,r=(0,Br.IsSchema)(e)?(0,wde.IndexPropertyKeys)(e):e,o=(0,Br.IsRef)(t),s=(0,Br.IsRef)(e);return(0,Br.IsMappedResult)(t)?(0,kde.OmitFromMappedResult)(t,r,n):(0,Br.IsMappedKey)(e)?(0,Tde.OmitFromMappedKey)(t,e,n):o&&s?(0,OT.Computed)("Omit",[t,i],n):!o&&s?(0,OT.Computed)("Omit",[t,i],n):o&&!s?(0,OT.Computed)("Omit",[t,i],n):(0,bde.CreateType)({...LT(t,r),...n})}});var FT=M(DT=>{"use strict";Object.defineProperty(DT,"__esModule",{value:!0});DT.OmitFromMappedKey=$de;var Ode=Tt(),Lde=Uf(),Wde=bn();function Fde(t,e,n){return{[e]:(0,Lde.Omit)(t,[e],(0,Wde.Clone)(n))}}function Dde(t,e,n){return e.reduce((i,r)=>({...i,...Fde(t,r,n)}),{})}function Ude(t,e,n){return Dde(t,e.keys,n)}function $de(t,e,n){let i=Ude(t,e,n);return(0,Ode.MappedResult)(i)}});var dd=M(jr=>{"use strict";var Nde=jr&&jr.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),UT=jr&&jr.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Nde(e,t,n)};Object.defineProperty(jr,"__esModule",{value:!0});UT(FT(),jr);UT(_T(),jr);UT(Uf(),jr)});var NT=M($T=>{"use strict";Object.defineProperty($T,"__esModule",{value:!0});$T.PickFromMappedResult=Hde;var Bde=Tt(),jde=$f(),qde=bn();function Gde(t,e,n){let i={};for(let r of globalThis.Object.getOwnPropertyNames(t))i[r]=(0,jde.Pick)(t[r],e,(0,qde.Clone)(n));return i}function Kde(t,e,n){return Gde(t.properties,e,n)}function Hde(t,e,n){let i=Kde(t,e,n);return(0,Bde.MappedResult)(i)}});var $f=M(qT=>{"use strict";Object.defineProperty(qT,"__esModule",{value:!0});qT.Pick=ame;var zde=fe(),Vde=Yg(),BT=Po(),Qde=Nn(),Jde=rn(),MD=wn(),PD=vt(),Yde=ki(),Xde=jp(),qr=Ue(),Zde=nn(),eme=GT(),tme=NT();function nme(t,e){return t.map(n=>jT(n,e))}function ime(t,e){return t.map(n=>jT(n,e))}function rme(t,e){let n={};for(let i of e)i in t&&(n[i]=t[i]);return n}function ome(t,e,n){let i=(0,Vde.Discard)(t,[Xde.TransformKind,"$id","required","properties"]),r=rme(n,e);return(0,MD.Object)(r,i)}function sme(t){let e=t.reduce((n,i)=>(0,qr.IsLiteralValue)(i)?[...n,(0,Jde.Literal)(i)]:n,[]);return(0,PD.Union)(e)}function jT(t,e){return(0,qr.IsIntersect)(t)?(0,Qde.Intersect)(nme(t.allOf,e)):(0,qr.IsUnion)(t)?(0,PD.Union)(ime(t.anyOf,e)):(0,qr.IsObject)(t)?ome(t,e,t.properties):(0,MD.Object)({})}function ame(t,e,n){let i=(0,Zde.IsArray)(e)?sme(e):e,r=(0,qr.IsSchema)(e)?(0,Yde.IndexPropertyKeys)(e):e,o=(0,qr.IsRef)(t),s=(0,qr.IsRef)(e);return(0,qr.IsMappedResult)(t)?(0,tme.PickFromMappedResult)(t,r,n):(0,qr.IsMappedKey)(e)?(0,eme.PickFromMappedKey)(t,e,n):o&&s?(0,BT.Computed)("Pick",[t,i],n):!o&&s?(0,BT.Computed)("Pick",[t,i],n):o&&!s?(0,BT.Computed)("Pick",[t,i],n):(0,zde.CreateType)({...jT(t,r),...n})}});var GT=M(KT=>{"use strict";Object.defineProperty(KT,"__esModule",{value:!0});KT.PickFromMappedKey=hme;var lme=Tt(),cme=$f(),ume=bn();function pme(t,e,n){return{[e]:(0,cme.Pick)(t,[e],(0,ume.Clone)(n))}}function dme(t,e,n){return e.reduce((i,r)=>({...i,...pme(t,r,n)}),{})}function mme(t,e,n){return dme(t,e.keys,n)}function hme(t,e,n){let i=mme(t,e,n);return(0,lme.MappedResult)(i)}});var md=M(Gr=>{"use strict";var gme=Gr&&Gr.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),HT=Gr&&Gr.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&gme(e,t,n)};Object.defineProperty(Gr,"__esModule",{value:!0});HT(GT(),Gr);HT(NT(),Gr);HT($f(),Gr)});var VT=M(Kr=>{"use strict";var fme=Kr&&Kr.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),bme=Kr&&Kr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),xme=Kr&&Kr.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;r<i.length;r++)i[r]!=="default"&&fme(n,e,i[r]);return bme(n,e),n}})();Object.defineProperty(Kr,"__esModule",{value:!0});Kr.Partial=Eme;var vme=fe(),zT=Po(),yme=Vi(),AD=wn(),wme=Nn(),Sme=vt(),Tme=Wo(),kme=Er(),Cme=ge(),Rme=QT(),sn=xme(Ue());function Mme(t,e){return(0,zT.Computed)("Partial",[(0,zT.Computed)(t,e)])}function Pme(t){return(0,zT.Computed)("Partial",[(0,Tme.Ref)(t)])}function Ime(t){let e={};for(let n of globalThis.Object.getOwnPropertyNames(t))e[n]=(0,yme.Optional)(t[n]);return e}function Ame(t,e){let n=(0,kme.Discard)(t,[Cme.TransformKind,"$id","required","properties"]),i=Ime(e);return(0,AD.Object)(i,n)}function ID(t){return t.map(e=>ED(e))}function ED(t){return sn.IsComputed(t)?Mme(t.target,t.parameters):sn.IsRef(t)?Pme(t.$ref):sn.IsIntersect(t)?(0,wme.Intersect)(ID(t.allOf)):sn.IsUnion(t)?(0,Sme.Union)(ID(t.anyOf)):sn.IsObject(t)?Ame(t,t.properties):sn.IsBigInt(t)||sn.IsBoolean(t)||sn.IsInteger(t)||sn.IsLiteral(t)||sn.IsNull(t)||sn.IsNumber(t)||sn.IsString(t)||sn.IsSymbol(t)||sn.IsUndefined(t)?t:(0,AD.Object)({})}function Eme(t,e){return sn.IsMappedResult(t)?(0,Rme.PartialFromMappedResult)(t,e):(0,vme.CreateType)({...ED(t),...e})}});var QT=M(JT=>{"use strict";Object.defineProperty(JT,"__esModule",{value:!0});JT.PartialFromMappedResult=Dme;var _me=Tt(),Ome=VT(),Lme=bn();function Wme(t,e){let n={};for(let i of globalThis.Object.getOwnPropertyNames(t))n[i]=(0,Ome.Partial)(t[i],(0,Lme.Clone)(e));return n}function Fme(t,e){return Wme(t.properties,e)}function Dme(t,e){let n=Fme(t,e);return(0,_me.MappedResult)(n)}});var hd=M(Fo=>{"use strict";var Ume=Fo&&Fo.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),_D=Fo&&Fo.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Ume(e,t,n)};Object.defineProperty(Fo,"__esModule",{value:!0});_D(QT(),Fo);_D(VT(),Fo)});var XT=M(Hr=>{"use strict";var $me=Hr&&Hr.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Nme=Hr&&Hr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Bme=Hr&&Hr.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;r<i.length;r++)i[r]!=="default"&&$me(n,e,i[r]);return Nme(n,e),n}})();Object.defineProperty(Hr,"__esModule",{value:!0});Hr.Required=Yme;var jme=fe(),YT=Po(),LD=wn(),qme=Nn(),Gme=vt(),Kme=Wo(),WD=ge(),FD=Er(),Hme=ZT(),an=Bme(Ue());function zme(t,e){return(0,YT.Computed)("Required",[(0,YT.Computed)(t,e)])}function Vme(t){return(0,YT.Computed)("Required",[(0,Kme.Ref)(t)])}function Qme(t){let e={};for(let n of globalThis.Object.getOwnPropertyNames(t))e[n]=(0,FD.Discard)(t[n],[WD.OptionalKind]);return e}function Jme(t,e){let n=(0,FD.Discard)(t,[WD.TransformKind,"$id","required","properties"]),i=Qme(e);return(0,LD.Object)(i,n)}function OD(t){return t.map(e=>DD(e))}function DD(t){return an.IsComputed(t)?zme(t.target,t.parameters):an.IsRef(t)?Vme(t.$ref):an.IsIntersect(t)?(0,qme.Intersect)(OD(t.allOf)):an.IsUnion(t)?(0,Gme.Union)(OD(t.anyOf)):an.IsObject(t)?Jme(t,t.properties):an.IsBigInt(t)||an.IsBoolean(t)||an.IsInteger(t)||an.IsLiteral(t)||an.IsNull(t)||an.IsNumber(t)||an.IsString(t)||an.IsSymbol(t)||an.IsUndefined(t)?t:(0,LD.Object)({})}function Yme(t,e){return an.IsMappedResult(t)?(0,Hme.RequiredFromMappedResult)(t,e):(0,jme.CreateType)({...DD(t),...e})}});var ZT=M(ek=>{"use strict";Object.defineProperty(ek,"__esModule",{value:!0});ek.RequiredFromMappedResult=nhe;var Xme=Tt(),Zme=XT();function ehe(t,e){let n={};for(let i of globalThis.Object.getOwnPropertyNames(t))n[i]=(0,Zme.Required)(t[i],e);return n}function the(t,e){return ehe(t.properties,e)}function nhe(t,e){let n=the(t,e);return(0,Xme.MappedResult)(n)}});var gd=M(Do=>{"use strict";var ihe=Do&&Do.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),UD=Do&&Do.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&ihe(e,t,n)};Object.defineProperty(Do,"__esModule",{value:!0});UD(ZT(),Do);UD(XT(),Do)});var jD=M(Mi=>{"use strict";var rhe=Mi&&Mi.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),ohe=Mi&&Mi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),she=Mi&&Mi.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;r<i.length;r++)i[r]!=="default"&&rhe(n,e,i[r]);return ohe(n,e),n}})();Object.defineProperty(Mi,"__esModule",{value:!0});Mi.FromType=Rn;Mi.ComputeType=BD;Mi.ComputeModuleProperties=Ghe;var Cn=Ir(),ahe=rw(),$D=Er(),lhe=yc(),che=rd(),uhe=wc(),phe=Sc(),dhe=ki(),mhe=Io(),hhe=Nn(),ghe=Pc(),fhe=Ac(),bhe=wn(),xhe=dd(),vhe=md(),tk=Ut(),yhe=hd(),ND=Wc(),whe=gd(),She=Lr(),The=vt(),Nf=ge(),qt=she(Ue());function khe(t,e){return e.map(n=>qt.IsRef(n)?nk(t,n.$ref):Rn(t,n))}function nk(t,e){return e in t?qt.IsRef(t[e])?nk(t,t[e].$ref):Rn(t,t[e]):(0,tk.Never)()}function Che(t){return(0,che.Awaited)(t[0])}function Rhe(t){return(0,dhe.Index)(t[0],t[1])}function Mhe(t){return(0,fhe.KeyOf)(t[0])}function Phe(t){return(0,yhe.Partial)(t[0])}function Ihe(t){return(0,xhe.Omit)(t[0],t[1])}function Ahe(t){return(0,vhe.Pick)(t[0],t[1])}function Ehe(t){return(0,whe.Required)(t[0])}function _he(t,e,n){let i=khe(t,n);return e==="Awaited"?Che(i):e==="Index"?Rhe(i):e==="KeyOf"?Mhe(i):e==="Partial"?Phe(i):e==="Omit"?Ihe(i):e==="Pick"?Ahe(i):e==="Required"?Ehe(i):(0,tk.Never)()}function Ohe(t,e){return(0,lhe.Array)(Rn(t,e))}function Lhe(t,e){return(0,uhe.AsyncIterator)(Rn(t,e))}function Whe(t,e,n){return(0,phe.Constructor)(fd(t,e),Rn(t,n))}function Fhe(t,e,n){return(0,mhe.Function)(fd(t,e),Rn(t,n))}function Dhe(t,e){return(0,hhe.Intersect)(fd(t,e))}function Uhe(t,e){return(0,ghe.Iterator)(Rn(t,e))}function $he(t,e){return(0,bhe.Object)(globalThis.Object.keys(e).reduce((n,i)=>({...n,[i]:Rn(t,e[i])}),{}))}function Nhe(t,e){let[n,i]=[Rn(t,(0,ND.RecordValue)(e)),(0,ND.RecordPattern)(e)],r=(0,ahe.CloneType)(e);return r.patternProperties[i]=n,r}function Bhe(t,e){return qt.IsRef(e)?{...nk(t,e.$ref),[Nf.TransformKind]:e[Nf.TransformKind]}:e}function jhe(t,e){return(0,She.Tuple)(fd(t,e))}function qhe(t,e){return(0,The.Union)(fd(t,e))}function fd(t,e){return e.map(n=>Rn(t,n))}function Rn(t,e){return qt.IsOptional(e)?(0,Cn.CreateType)(Rn(t,(0,$D.Discard)(e,[Nf.OptionalKind])),e):qt.IsReadonly(e)?(0,Cn.CreateType)(Rn(t,(0,$D.Discard)(e,[Nf.ReadonlyKind])),e):qt.IsTransform(e)?(0,Cn.CreateType)(Bhe(t,e),e):qt.IsArray(e)?(0,Cn.CreateType)(Ohe(t,e.items),e):qt.IsAsyncIterator(e)?(0,Cn.CreateType)(Lhe(t,e.items),e):qt.IsComputed(e)?(0,Cn.CreateType)(_he(t,e.target,e.parameters)):qt.IsConstructor(e)?(0,Cn.CreateType)(Whe(t,e.parameters,e.returns),e):qt.IsFunction(e)?(0,Cn.CreateType)(Fhe(t,e.parameters,e.returns),e):qt.IsIntersect(e)?(0,Cn.CreateType)(Dhe(t,e.allOf),e):qt.IsIterator(e)?(0,Cn.CreateType)(Uhe(t,e.items),e):qt.IsObject(e)?(0,Cn.CreateType)($he(t,e.properties),e):qt.IsRecord(e)?(0,Cn.CreateType)(Nhe(t,e)):qt.IsTuple(e)?(0,Cn.CreateType)(jhe(t,e.items||[]),e):qt.IsUnion(e)?(0,Cn.CreateType)(qhe(t,e.anyOf),e):e}function BD(t,e){return e in t?Rn(t,t[e]):(0,tk.Never)()}function Ghe(t){return globalThis.Object.getOwnPropertyNames(t).reduce((e,n)=>({...e,[n]:BD(t,n)}),{})}});var GD=M(bd=>{"use strict";Object.defineProperty(bd,"__esModule",{value:!0});bd.TModule=void 0;bd.Module=zhe;var qD=Ir(),Khe=ge(),Hhe=jD(),Bf=class{constructor(e){let n=(0,Hhe.ComputeModuleProperties)(e),i=this.WithIdentifiers(n);this.$defs=i}Import(e,n){let i={...this.$defs,[e]:(0,qD.CreateType)(this.$defs[e],n)};return(0,qD.CreateType)({[Khe.Kind]:"Import",$defs:i,$ref:e})}WithIdentifiers(e){return globalThis.Object.getOwnPropertyNames(e).reduce((n,i)=>({...n,[i]:{...e[i],$id:i}}),{})}};bd.TModule=Bf;function zhe(t){return new Bf(t)}});var jf=M(Pa=>{"use strict";var Vhe=Pa&&Pa.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Qhe=Pa&&Pa.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Vhe(e,t,n)};Object.defineProperty(Pa,"__esModule",{value:!0});Qhe(GD(),Pa)});var KD=M(ik=>{"use strict";Object.defineProperty(ik,"__esModule",{value:!0});ik.Not=Xhe;var Jhe=fe(),Yhe=ge();function Xhe(t,e){return(0,Jhe.CreateType)({[Yhe.Kind]:"Not",not:t},e)}});var qf=M(Ia=>{"use strict";var Zhe=Ia&&Ia.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),ege=Ia&&Ia.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Zhe(e,t,n)};Object.defineProperty(Ia,"__esModule",{value:!0});ege(KD(),Ia)});var HD=M(zr=>{"use strict";var tge=zr&&zr.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),nge=zr&&zr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),ige=zr&&zr.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;r<i.length;r++)i[r]!=="default"&&tge(n,e,i[r]);return nge(n,e),n}})();Object.defineProperty(zr,"__esModule",{value:!0});zr.Parameters=age;var rge=Lr(),oge=Ut(),sge=ige(Ue());function age(t,e){return sge.IsFunction(t)?(0,rge.Tuple)(t.parameters,e):(0,oge.Never)()}});var Gf=M(Aa=>{"use strict";var lge=Aa&&Aa.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),cge=Aa&&Aa.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&lge(e,t,n)};Object.defineProperty(Aa,"__esModule",{value:!0});cge(HD(),Aa)});var VD=M(rk=>{"use strict";Object.defineProperty(rk,"__esModule",{value:!0});rk.Recursive=hge;var uge=Gg(),pge=fe(),dge=nn(),zD=ge(),mge=0;function hge(t,e={}){(0,dge.IsUndefined)(e.$id)&&(e.$id=`T${mge++}`);let n=(0,uge.CloneType)(t({[zD.Kind]:"This",$ref:`${e.$id}`}));return n.$id=e.$id,(0,pge.CreateType)({[zD.Hint]:"Recursive",...n},e)}});var Kf=M(Ea=>{"use strict";var gge=Ea&&Ea.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),fge=Ea&&Ea.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&gge(e,t,n)};Object.defineProperty(Ea,"__esModule",{value:!0});fge(VD(),Ea)});var QD=M(ok=>{"use strict";Object.defineProperty(ok,"__esModule",{value:!0});ok.RegExp=yge;var bge=fe(),xge=nn(),vge=ge();function yge(t,e){let n=(0,xge.IsString)(t)?new globalThis.RegExp(t):t;return(0,bge.CreateType)({[vge.Kind]:"RegExp",type:"RegExp",source:n.source,flags:n.flags},e)}});var Hf=M(_a=>{"use strict";var wge=_a&&_a.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Sge=_a&&_a.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&wge(e,t,n)};Object.defineProperty(_a,"__esModule",{value:!0});Sge(QD(),_a)});var JD=M(ak=>{"use strict";Object.defineProperty(ak,"__esModule",{value:!0});ak.Rest=kge;var sk=Ue();function Tge(t){return(0,sk.IsIntersect)(t)?t.allOf:(0,sk.IsUnion)(t)?t.anyOf:(0,sk.IsTuple)(t)?t.items??[]:[]}function kge(t){return Tge(t)}});var zf=M(Oa=>{"use strict";var Cge=Oa&&Oa.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Rge=Oa&&Oa.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Cge(e,t,n)};Object.defineProperty(Oa,"__esModule",{value:!0});Rge(JD(),Oa)});var YD=M(Vr=>{"use strict";var Mge=Vr&&Vr.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Pge=Vr&&Vr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Ige=Vr&&Vr.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;r<i.length;r++)i[r]!=="default"&&Mge(n,e,i[r]);return Pge(n,e),n}})();Object.defineProperty(Vr,"__esModule",{value:!0});Vr.ReturnType=Oge;var Age=fe(),Ege=Ut(),_ge=Ige(Ue());function Oge(t,e){return _ge.IsFunction(t)?(0,Age.CreateType)(t.returns,e):(0,Ege.Never)(e)}});var Vf=M(La=>{"use strict";var Lge=La&&La.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Wge=La&&La.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Lge(e,t,n)};Object.defineProperty(La,"__esModule",{value:!0});Wge(YD(),La)});var ZD=M(XD=>{"use strict";Object.defineProperty(XD,"__esModule",{value:!0})});var tU=M(eU=>{"use strict";Object.defineProperty(eU,"__esModule",{value:!0});var ZJe=ge()});var iU=M(Uo=>{"use strict";var Fge=Uo&&Uo.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),nU=Uo&&Uo.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Fge(e,t,n)};Object.defineProperty(Uo,"__esModule",{value:!0});nU(ZD(),Uo);nU(tU(),Uo)});var oU=M(rU=>{"use strict";Object.defineProperty(rU,"__esModule",{value:!0})});var sU=M(Wa=>{"use strict";var Dge=Wa&&Wa.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Uge=Wa&&Wa.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Dge(e,t,n)};Object.defineProperty(Wa,"__esModule",{value:!0});Uge(oU(),Wa)});var aU=M(Fa=>{"use strict";Object.defineProperty(Fa,"__esModule",{value:!0});Fa.TransformEncodeBuilder=Fa.TransformDecodeBuilder=void 0;Fa.Transform=Nge;var Qf=ge(),$ge=Ue(),Jf=class{constructor(e){this.schema=e}Decode(e){return new Yf(this.schema,e)}};Fa.TransformDecodeBuilder=Jf;var Yf=class{constructor(e,n){this.schema=e,this.decode=n}EncodeTransform(e,n){let o={Encode:s=>n[Qf.TransformKind].Encode(e(s)),Decode:s=>this.decode(n[Qf.TransformKind].Decode(s))};return{...n,[Qf.TransformKind]:o}}EncodeSchema(e,n){let i={Decode:this.decode,Encode:e};return{...n,[Qf.TransformKind]:i}}Encode(e){return(0,$ge.IsTransform)(this.schema)?this.EncodeTransform(e,this.schema):this.EncodeSchema(e,this.schema)}};Fa.TransformEncodeBuilder=Yf;function Nge(t){return new Jf(t)}});var Xf=M(Da=>{"use strict";var Bge=Da&&Da.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),jge=Da&&Da.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Bge(e,t,n)};Object.defineProperty(Da,"__esModule",{value:!0});jge(aU(),Da)});var cU=M(lk=>{"use strict";Object.defineProperty(lk,"__esModule",{value:!0});lk.Unsafe=Gge;var qge=fe(),lU=ge();function Gge(t={}){return(0,qge.CreateType)({[lU.Kind]:t[lU.Kind]??"Unsafe"},t)}});var Zf=M(Ua=>{"use strict";var Kge=Ua&&Ua.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Hge=Ua&&Ua.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Kge(e,t,n)};Object.defineProperty(Ua,"__esModule",{value:!0});Hge(cU(),Ua)});var uU=M(ck=>{"use strict";Object.defineProperty(ck,"__esModule",{value:!0});ck.Void=Qge;var zge=fe(),Vge=ge();function Qge(t){return(0,zge.CreateType)({[Vge.Kind]:"Void",type:"void"},t)}});var e0=M($a=>{"use strict";var Jge=$a&&$a.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),Yge=$a&&$a.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&Jge(e,t,n)};Object.defineProperty($a,"__esModule",{value:!0});Yge(uU(),$a)});var pk=M(n0=>{"use strict";Object.defineProperty(n0,"__esModule",{value:!0});n0.JsonTypeBuilder=void 0;var Xge=vc(),Zge=yc(),efe=Jp(),tfe=gf(),nfe=bf(),ife=vf(),rfe=Pf(),ofe=Oc(),sfe=Ef(),afe=ki(),lfe=Lf(),cfe=Nn(),t0=Df(),ufe=Ac(),pfe=rn(),dfe=Tt(),mfe=Ut(),hfe=qf(),gfe=sd(),ffe=jf(),bfe=Ao(),xfe=wn(),vfe=dd(),yfe=Vi(),wfe=hd(),Sfe=md(),Tfe=Oo(),kfe=pd(),Cfe=Wc(),Rfe=Kf(),Mfe=Wo(),Pfe=gd(),Ife=zf(),Afe=ea(),Efe=Qi(),_fe=Xf(),Ofe=Lr(),Lfe=vt(),Wfe=ga(),Ffe=Zf(),uk=class{ReadonlyOptional(e){return(0,kfe.ReadonlyOptional)(e)}Readonly(e,n){return(0,Tfe.Readonly)(e,n??!0)}Optional(e,n){return(0,yfe.Optional)(e,n??!0)}Any(e){return(0,Xge.Any)(e)}Array(e,n){return(0,Zge.Array)(e,n)}Boolean(e){return(0,efe.Boolean)(e)}Capitalize(e,n){return(0,t0.Capitalize)(e,n)}Composite(e,n){return(0,tfe.Composite)(e,n)}Const(e,n){return(0,nfe.Const)(e,n)}Enum(e,n){return(0,ife.Enum)(e,n)}Exclude(e,n,i){return(0,rfe.Exclude)(e,n,i)}Extends(e,n,i,r,o){return(0,ofe.Extends)(e,n,i,r,o)}Extract(e,n,i){return(0,sfe.Extract)(e,n,i)}Index(e,n,i){return(0,afe.Index)(e,n,i)}Integer(e){return(0,lfe.Integer)(e)}Intersect(e,n){return(0,cfe.Intersect)(e,n)}KeyOf(e,n){return(0,ufe.KeyOf)(e,n)}Literal(e,n){return(0,pfe.Literal)(e,n)}Lowercase(e,n){return(0,t0.Lowercase)(e,n)}Mapped(e,n,i){return(0,dfe.Mapped)(e,n,i)}Module(e){return(0,ffe.Module)(e)}Never(e){return(0,mfe.Never)(e)}Not(e,n){return(0,hfe.Not)(e,n)}Null(e){return(0,gfe.Null)(e)}Number(e){return(0,bfe.Number)(e)}Object(e,n){return(0,xfe.Object)(e,n)}Omit(e,n,i){return(0,vfe.Omit)(e,n,i)}Partial(e,n){return(0,wfe.Partial)(e,n)}Pick(e,n,i){return(0,Sfe.Pick)(e,n,i)}Record(e,n,i){return(0,Cfe.Record)(e,n,i)}Recursive(e,n){return(0,Rfe.Recursive)(e,n)}Ref(...e){return(0,Mfe.Ref)(e[0],e[1])}Required(e,n){return(0,Pfe.Required)(e,n)}Rest(e){return(0,Ife.Rest)(e)}String(e){return(0,Afe.String)(e)}TemplateLiteral(e,n){return(0,Efe.TemplateLiteral)(e,n)}Transform(e){return(0,_fe.Transform)(e)}Tuple(e,n){return(0,Ofe.Tuple)(e,n)}Uncapitalize(e,n){return(0,t0.Uncapitalize)(e,n)}Union(e,n){return(0,Lfe.Union)(e,n)}Unknown(e){return(0,Wfe.Unknown)(e)}Unsafe(e){return(0,Ffe.Unsafe)(e)}Uppercase(e,n){return(0,t0.Uppercase)(e,n)}};n0.JsonTypeBuilder=uk});var pU=M(q=>{"use strict";Object.defineProperty(q,"__esModule",{value:!0});q.Rest=q.Required=q.RegExp=q.Ref=q.Recursive=q.Record=q.ReadonlyOptional=q.Readonly=q.Promise=q.Pick=q.Partial=q.Parameters=q.Optional=q.Omit=q.Object=q.Number=q.Null=q.Not=q.Never=q.Module=q.Mapped=q.Literal=q.KeyOf=q.Iterator=q.Uppercase=q.Lowercase=q.Uncapitalize=q.Capitalize=q.Intersect=q.Integer=q.Instantiate=q.InstanceType=q.Index=q.Function=q.Extract=q.Extends=q.Exclude=q.Enum=q.Date=q.ConstructorParameters=q.Constructor=q.Const=q.Composite=q.Boolean=q.BigInt=q.Awaited=q.AsyncIterator=q.Array=q.Argument=q.Any=void 0;q.Void=q.Unsafe=q.Unknown=q.Union=q.Undefined=q.Uint8Array=q.Tuple=q.Transform=q.TemplateLiteral=q.Symbol=q.String=q.ReturnType=void 0;var Dfe=vc();Object.defineProperty(q,"Any",{enumerable:!0,get:function(){return Dfe.Any}});var Ufe=Jg();Object.defineProperty(q,"Argument",{enumerable:!0,get:function(){return Ufe.Argument}});var $fe=yc();Object.defineProperty(q,"Array",{enumerable:!0,get:function(){return $fe.Array}});var Nfe=wc();Object.defineProperty(q,"AsyncIterator",{enumerable:!0,get:function(){return Nfe.AsyncIterator}});var Bfe=rd();Object.defineProperty(q,"Awaited",{enumerable:!0,get:function(){return Bfe.Awaited}});var jfe=Rc();Object.defineProperty(q,"BigInt",{enumerable:!0,get:function(){return jfe.BigInt}});var qfe=Jp();Object.defineProperty(q,"Boolean",{enumerable:!0,get:function(){return qfe.Boolean}});var Gfe=gf();Object.defineProperty(q,"Composite",{enumerable:!0,get:function(){return Gfe.Composite}});var Kfe=bf();Object.defineProperty(q,"Const",{enumerable:!0,get:function(){return Kfe.Const}});var Hfe=Sc();Object.defineProperty(q,"Constructor",{enumerable:!0,get:function(){return Hfe.Constructor}});var zfe=xf();Object.defineProperty(q,"ConstructorParameters",{enumerable:!0,get:function(){return zfe.ConstructorParameters}});var Vfe=od();Object.defineProperty(q,"Date",{enumerable:!0,get:function(){return Vfe.Date}});var Qfe=vf();Object.defineProperty(q,"Enum",{enumerable:!0,get:function(){return Qfe.Enum}});var Jfe=Pf();Object.defineProperty(q,"Exclude",{enumerable:!0,get:function(){return Jfe.Exclude}});var Yfe=Oc();Object.defineProperty(q,"Extends",{enumerable:!0,get:function(){return Yfe.Extends}});var Xfe=Ef();Object.defineProperty(q,"Extract",{enumerable:!0,get:function(){return Xfe.Extract}});var Zfe=Io();Object.defineProperty(q,"Function",{enumerable:!0,get:function(){return Zfe.Function}});var e0e=ki();Object.defineProperty(q,"Index",{enumerable:!0,get:function(){return e0e.Index}});var t0e=_f();Object.defineProperty(q,"InstanceType",{enumerable:!0,get:function(){return t0e.InstanceType}});var n0e=Of();Object.defineProperty(q,"Instantiate",{enumerable:!0,get:function(){return n0e.Instantiate}});var i0e=Lf();Object.defineProperty(q,"Integer",{enumerable:!0,get:function(){return i0e.Integer}});var r0e=Nn();Object.defineProperty(q,"Intersect",{enumerable:!0,get:function(){return r0e.Intersect}});var i0=Df();Object.defineProperty(q,"Capitalize",{enumerable:!0,get:function(){return i0.Capitalize}});Object.defineProperty(q,"Uncapitalize",{enumerable:!0,get:function(){return i0.Uncapitalize}});Object.defineProperty(q,"Lowercase",{enumerable:!0,get:function(){return i0.Lowercase}});Object.defineProperty(q,"Uppercase",{enumerable:!0,get:function(){return i0.Uppercase}});var o0e=Pc();Object.defineProperty(q,"Iterator",{enumerable:!0,get:function(){return o0e.Iterator}});var s0e=Ac();Object.defineProperty(q,"KeyOf",{enumerable:!0,get:function(){return s0e.KeyOf}});var a0e=rn();Object.defineProperty(q,"Literal",{enumerable:!0,get:function(){return a0e.Literal}});var l0e=Tt();Object.defineProperty(q,"Mapped",{enumerable:!0,get:function(){return l0e.Mapped}});var c0e=jf();Object.defineProperty(q,"Module",{enumerable:!0,get:function(){return c0e.Module}});var u0e=Ut();Object.defineProperty(q,"Never",{enumerable:!0,get:function(){return u0e.Never}});var p0e=qf();Object.defineProperty(q,"Not",{enumerable:!0,get:function(){return p0e.Not}});var d0e=sd();Object.defineProperty(q,"Null",{enumerable:!0,get:function(){return d0e.Null}});var m0e=Ao();Object.defineProperty(q,"Number",{enumerable:!0,get:function(){return m0e.Number}});var h0e=wn();Object.defineProperty(q,"Object",{enumerable:!0,get:function(){return h0e.Object}});var g0e=dd();Object.defineProperty(q,"Omit",{enumerable:!0,get:function(){return g0e.Omit}});var f0e=Vi();Object.defineProperty(q,"Optional",{enumerable:!0,get:function(){return f0e.Optional}});var b0e=Gf();Object.defineProperty(q,"Parameters",{enumerable:!0,get:function(){return b0e.Parameters}});var x0e=hd();Object.defineProperty(q,"Partial",{enumerable:!0,get:function(){return x0e.Partial}});var v0e=md();Object.defineProperty(q,"Pick",{enumerable:!0,get:function(){return v0e.Pick}});var y0e=td();Object.defineProperty(q,"Promise",{enumerable:!0,get:function(){return y0e.Promise}});var w0e=Oo();Object.defineProperty(q,"Readonly",{enumerable:!0,get:function(){return w0e.Readonly}});var S0e=pd();Object.defineProperty(q,"ReadonlyOptional",{enumerable:!0,get:function(){return S0e.ReadonlyOptional}});var T0e=Wc();Object.defineProperty(q,"Record",{enumerable:!0,get:function(){return T0e.Record}});var k0e=Kf();Object.defineProperty(q,"Recursive",{enumerable:!0,get:function(){return k0e.Recursive}});var C0e=Wo();Object.defineProperty(q,"Ref",{enumerable:!0,get:function(){return C0e.Ref}});var R0e=Hf();Object.defineProperty(q,"RegExp",{enumerable:!0,get:function(){return R0e.RegExp}});var M0e=gd();Object.defineProperty(q,"Required",{enumerable:!0,get:function(){return M0e.Required}});var P0e=zf();Object.defineProperty(q,"Rest",{enumerable:!0,get:function(){return P0e.Rest}});var I0e=Vf();Object.defineProperty(q,"ReturnType",{enumerable:!0,get:function(){return I0e.ReturnType}});var A0e=ea();Object.defineProperty(q,"String",{enumerable:!0,get:function(){return A0e.String}});var E0e=ad();Object.defineProperty(q,"Symbol",{enumerable:!0,get:function(){return E0e.Symbol}});var _0e=Qi();Object.defineProperty(q,"TemplateLiteral",{enumerable:!0,get:function(){return _0e.TemplateLiteral}});var O0e=Xf();Object.defineProperty(q,"Transform",{enumerable:!0,get:function(){return O0e.Transform}});var L0e=Lr();Object.defineProperty(q,"Tuple",{enumerable:!0,get:function(){return L0e.Tuple}});var W0e=cd();Object.defineProperty(q,"Uint8Array",{enumerable:!0,get:function(){return W0e.Uint8Array}});var F0e=ld();Object.defineProperty(q,"Undefined",{enumerable:!0,get:function(){return F0e.Undefined}});var D0e=vt();Object.defineProperty(q,"Union",{enumerable:!0,get:function(){return D0e.Union}});var U0e=ga();Object.defineProperty(q,"Unknown",{enumerable:!0,get:function(){return U0e.Unknown}});var $0e=Zf();Object.defineProperty(q,"Unsafe",{enumerable:!0,get:function(){return $0e.Unsafe}});var N0e=e0();Object.defineProperty(q,"Void",{enumerable:!0,get:function(){return N0e.Void}})});var dU=M(r0=>{"use strict";Object.defineProperty(r0,"__esModule",{value:!0});r0.JavaScriptTypeBuilder=void 0;var B0e=pk(),j0e=Jg(),q0e=wc(),G0e=rd(),K0e=Rc(),H0e=Sc(),z0e=xf(),V0e=od(),Q0e=Io(),J0e=_f(),Y0e=Of(),X0e=Pc(),Z0e=Gf(),ebe=td(),tbe=Hf(),nbe=Vf(),ibe=ad(),rbe=cd(),obe=ld(),sbe=e0(),dk=class extends B0e.JsonTypeBuilder{Argument(e){return(0,j0e.Argument)(e)}AsyncIterator(e,n){return(0,q0e.AsyncIterator)(e,n)}Awaited(e,n){return(0,G0e.Awaited)(e,n)}BigInt(e){return(0,K0e.BigInt)(e)}ConstructorParameters(e,n){return(0,z0e.ConstructorParameters)(e,n)}Constructor(e,n,i){return(0,H0e.Constructor)(e,n,i)}Date(e={}){return(0,V0e.Date)(e)}Function(e,n,i){return(0,Q0e.Function)(e,n,i)}InstanceType(e,n){return(0,J0e.InstanceType)(e,n)}Instantiate(e,n){return(0,Y0e.Instantiate)(e,n)}Iterator(e,n){return(0,X0e.Iterator)(e,n)}Parameters(e,n){return(0,Z0e.Parameters)(e,n)}Promise(e,n){return(0,ebe.Promise)(e,n)}RegExp(e,n){return(0,tbe.RegExp)(e,n)}ReturnType(e,n){return(0,nbe.ReturnType)(e,n)}Symbol(e){return(0,ibe.Symbol)(e)}Undefined(e){return(0,obe.Undefined)(e)}Uint8Array(e){return(0,rbe.Uint8Array)(e)}Void(e){return(0,sbe.Void)(e)}};r0.JavaScriptTypeBuilder=dk});var mU=M(Mn=>{"use strict";var abe=Mn&&Mn.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),lbe=Mn&&Mn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),cbe=Mn&&Mn.__importStar||(function(){var t=function(e){return t=Object.getOwnPropertyNames||function(n){var i=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(i[i.length]=r);return i},t(e)};return function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i=t(e),r=0;r<i.length;r++)i[r]!=="default"&&abe(n,e,i[r]);return lbe(n,e),n}})();Object.defineProperty(Mn,"__esModule",{value:!0});Mn.Type=Mn.JavaScriptTypeBuilder=Mn.JsonTypeBuilder=void 0;var ube=pk();Object.defineProperty(Mn,"JsonTypeBuilder",{enumerable:!0,get:function(){return ube.JsonTypeBuilder}});var pbe=cbe(pU()),dbe=dU();Object.defineProperty(Mn,"JavaScriptTypeBuilder",{enumerable:!0,get:function(){return dbe.JavaScriptTypeBuilder}});var mbe=pbe;Mn.Type=mbe});var hU=M(Y=>{"use strict";var hbe=Y&&Y.__createBinding||(Object.create?(function(t,e,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(e,n);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,r)}):(function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]})),te=Y&&Y.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&hbe(e,t,n)};Object.defineProperty(Y,"__esModule",{value:!0});te(rw(),Y);te(Ir(),Y);te(Ki(),Y);te(dw(),Y);te(dW(),Y);te(Hp(),Y);te(bW(),Y);te(zp(),Y);te(ge(),Y);te(vc(),Y);te(yc(),Y);te(Jg(),Y);te(wc(),Y);te(rd(),Y);te(Rc(),Y);te(Jp(),Y);te(gf(),Y);te(bf(),Y);te(Sc(),Y);te(xf(),Y);te(od(),Y);te(vf(),Y);te(Pf(),Y);te(Oc(),Y);te(Ef(),Y);te(Io(),Y);te(ki(),Y);te(_f(),Y);te(Of(),Y);te(Lf(),Y);te(Nn(),Y);te(Pc(),Y);te(Df(),Y);te(Ac(),Y);te(rn(),Y);te(jf(),Y);te(Tt(),Y);te(Ut(),Y);te(qf(),Y);te(sd(),Y);te(Ao(),Y);te(wn(),Y);te(dd(),Y);te(Vi(),Y);te(Gf(),Y);te(hd(),Y);te(md(),Y);te(td(),Y);te(Oo(),Y);te(pd(),Y);te(Wc(),Y);te(Kf(),Y);te(Wo(),Y);te(Hf(),Y);te(gd(),Y);te(zf(),Y);te(Vf(),Y);te(iU(),Y);te(sU(),Y);te(ea(),Y);te(ad(),Y);te(Qi(),Y);te(Xf(),Y);te(Lr(),Y);te(cd(),Y);te(ld(),Y);te(vt(),Y);te(ga(),Y);te(Zf(),Y);te(e0(),Y);te(mU(),Y)});import _xe from"chalk";import{accessSync as xxe,constants as vxe,existsSync as x0,readFileSync as g3,realpathSync as yxe}from"fs";import{homedir as f3}from"os";import{basename as Txe,dirname as Md,join as Et,resolve as v0,sep as kxe,win32 as Cxe}from"path";import{fileURLToPath as b3}from"url";import{spawn as o3,spawnSync as s3}from"node:child_process";import _k from"cross-spawn";var a3=100;function Cd(t,e,n){return process.platform==="win32"?_k(t,e,n):o3(t,e,n)}function qa(t,e,n){return process.platform==="win32"?_k.sync(t,e,n):s3(t,e,n)}function b0(t){return new Promise((e,n)=>{let i=!1,r=!1,o=null,s,a=t.stdout===null,l=t.stderr===null,c=()=>{s&&(clearTimeout(s),s=void 0),t.removeListener("error",f),t.removeListener("exit",b),t.removeListener("close",v),t.stdout?.removeListener("end",g),t.stderr?.removeListener("end",h),t.stdout?.removeListener("data",m),t.stderr?.removeListener("data",m)},u=y=>{i||(i=!0,c(),t.stdout?.destroy(),t.stderr?.destroy(),e(y))},p=()=>{!r||i||a&&l&&u(o)},d=()=>{s&&clearTimeout(s),s=setTimeout(()=>u(o),a3)},m=()=>{r&&!i&&d()},g=()=>{a=!0,p()},h=()=>{l=!0,p()},f=y=>{i||(i=!0,c(),n(y))},b=y=>{r=!0,o=y,p(),i||d()},v=y=>{u(y)};t.stdout?.once("end",g),t.stderr?.once("end",h),t.stdout?.on("data",m),t.stderr?.on("data",m),t.once("error",f),t.once("exit",b),t.once("close",v)})}import{realpathSync as l3,statSync as pxe}from"node:fs";import{homedir as c3}from"node:os";import{isAbsolute as Lk,join as u3,resolve as Ok,relative as p3,sep as Wk}from"node:path";import{fileURLToPath as d3}from"node:url";var m3=/[\u00A0\u2000-\u200A\u202F\u205F\u3000]/g;function di(t){try{return l3(t)}catch{return t}}function qc(t){let e=t.trim();return!(e.startsWith("npm:")||e.startsWith("git:")||e.startsWith("github:")||e.startsWith("http:")||e.startsWith("https:")||e.startsWith("ssh:"))}function h3(t){if(!t.startsWith("/")||t.startsWith("//")||t.includes("\\"))return t;let e=t.match(/^\/(?:mnt\/|cygdrive\/)?([a-z])(?:\/(.*))?$/i);if(!e)return t;let n=e[2]?.replaceAll("/","\\");return`${e[1].toUpperCase()}:\\${n??""}`}function it(t,e={}){let n=e.trim?t.trim():t;if(e.normalizeUnicodeSpaces&&(n=n.replace(m3," ")),e.stripAtPrefix&&n.startsWith("@")&&(n=n.slice(1)),process.platform==="win32"&&(n=h3(n)),e.expandTilde??!0){let i=e.homeDir??c3();if(n==="~")return i;if(n.startsWith("~/")||process.platform==="win32"&&n.startsWith("~\\"))return u3(i,n.slice(2))}return/^file:\/\//.test(n)?d3(n):n}function Ce(t,e=process.cwd(),n={}){let i=it(t,n),r=it(e);return Lk(i)?Ok(i):Ok(r,i)}function Rd(t,e){let n=Ce(e),i=Ce(t,n),r=p3(n,i);return r===""||r!==".."&&!r.startsWith(`..${Wk}`)&&!Lk(r)?r||".":void 0}function Fk(t,e){let n=Ce(t,e);return(Rd(n,e)??n).split(Wk).join("/")}function Dk(t){let e=process.platform==="darwin"?["com.dropbox.ignored","com.apple.fileprovider.ignore#P"]:process.platform==="linux"?["user.com.dropbox.ignored"]:[];for(let n of e)process.platform==="darwin"?qa("xattr",["-w",n,"1",t],{encoding:"utf-8",stdio:"ignore"}):qa("setfattr",["-n",n,"-v","1",t],{encoding:"utf-8",stdio:"ignore"})}var x3=b3(import.meta.url),Uk=Md(x3),Gc=import.meta.url.includes("$bunfs")||import.meta.url.includes("~BUN")||import.meta.url.includes("%7EBUN"),Ixe=!!process.versions.bun;function mi(){let t=process.env.PI_PACKAGE_DIR;if(t)return it(t);if(Gc)return Md(process.execPath);let e=Uk;for(;e!==Md(e);){if(x0(Et(e,"package.json")))return e;e=Md(e)}return Uk}function y0(){if(Gc)return Et(mi(),"theme");let t=mi(),e=x0(Et(t,"src"))?"src":"dist";return Et(t,e,"modes","interactive","theme")}function v3(){return Et(mi(),"package.json")}function Pd(){return v0(Et(mi(),"README.md"))}function Kc(){return v0(Et(mi(),"docs"))}function Id(){return v0(Et(mi(),"CHANGELOG.md"))}function y3(){if(Gc)return Et(mi(),"assets");let t=mi(),e=x0(Et(t,"src"))?"src":"dist";return Et(t,e,"modes","interactive","assets")}function $k(t){return Et(y3(),t)}var Hc={};try{Hc=JSON.parse(g3(v3(),"utf-8"))}catch(t){if(t.code!=="ENOENT")throw t}var w3=Hc.piConfig?.name,Nk=Hc.name||"@earendil-works/pi-coding-agent",Mt=w3||"pi";var rt=Hc.piConfig?.configDir||".pi",Ii=Hc.version||"0.0.0",w0=`${Mt.toUpperCase()}_CODING_AGENT_DIR`,Bk=`${Mt.toUpperCase()}_CODING_AGENT_SESSION_DIR`;function jk(t){return it(t)}var S3="https://pi.dev/session/";function qk(t){return`${process.env.PI_SHARE_VIEWER_URL||S3}#${t}`}function Ee(){let t=process.env[w0];return t?jk(t):Et(f3(),rt,"agent")}function Ad(){return Et(Ee(),"themes")}function S0(){return Et(Ee(),"auth.json")}function zc(){return Et(Ee(),"bin")}function Gk(){return Et(Ee(),"sessions")}function Kk(){return Et(Ee(),`${Mt}-debug.log`)}var T3=["off","minimal","low","medium","high","xhigh","max"];function T0(t){return T3.includes(t)}An();C0();R0();import{Type as ave}from"typebox";function ie(t,e){return{name:t,login:async n=>{n.signal.throwIfAborted();let i=await n.prompt({type:"secret",message:`Enter ${t}`});return n.signal.throwIfAborted(),{type:"api_key",key:i}},resolve:async({ctx:n,credential:i,signal:r})=>{if(r.throwIfAborted(),i?.key)return{auth:{apiKey:i.key},env:i.env,source:"stored credential"};for(let o of e){let s=await n.env(o);if(r.throwIfAborted(),s)return{auth:{apiKey:s},source:o}}}}}function un(t){let e,n=()=>(e??=t.load(),e);return{name:t.name,isSubscription:t.isSubscription,loginLabel:t.loginLabel,login:async i=>(await n()).login(i),refresh:async(i,r)=>(await n()).refresh(i,r),toAuth:async i=>(await n()).toAuth(i)}}xe();I0();E0();Qc();qn();Bo();O0();An();var dt=()=>wt(()=>Promise.resolve().then(()=>(yC(),vC)));An();var Hd=()=>wt(()=>Promise.resolve().then(()=>(CC(),kC)));An();var z$=t=>import(import.meta.url.endsWith(".js")?t.replace(/\.ts$/,".js"):t),V$;var zd=()=>wt(async()=>V$??await z$("./bedrock-converse-stream.ts"));An();var Ya=()=>wt(()=>Promise.resolve().then(()=>(AC(),IC)));An();var im=()=>wt(()=>Promise.resolve().then(()=>(FC(),WC)));An();var rm=()=>wt(()=>Promise.resolve().then(()=>(zC(),HC)));An();var cm=()=>wt(()=>Promise.resolve().then(()=>(bR(),fR)));An();var he=()=>wt(()=>Promise.resolve().then(()=>(IR(),PR)));An();var pn=()=>wt(()=>Promise.resolve().then(()=>(WR(),LR)));An();var um=()=>wt(()=>Promise.resolve().then(()=>(BR(),NR)));lr();var Za=null,cb=null,ub=null,lb=t=>import(t),FB="node:fs",DB="node:os",UB="node:path";typeof process<"u"&&(process.versions?.node||process.versions?.bun)&&(lb(FB).then(t=>{Za=t.existsSync}),lb(DB).then(t=>{cb=t.homedir}),lb(UB).then(t=>{ub=t.join}));var ou="ANTHROPIC_AUTH_TOKEN",pb="ANTHROPIC_OAUTH_TOKEN",db="ANTHROPIC_API_KEY",ru=null;function $B(t){let e=t?.GOOGLE_APPLICATION_CREDENTIALS;if(e)return Za?Za(e):!1;if(ru===null){if(!Za||!cb||!ub)return typeof process<"u"&&(process.versions?.node||process.versions?.bun)||(ru=!1),!1;let n=Fe("GOOGLE_APPLICATION_CREDENTIALS",t);n?ru=Za(n):ru=Za(ub(cb(),".config","gcloud","application_default_credentials.json"))}return ru}function NB(t){if(t==="github-copilot")return["COPILOT_GITHUB_TOKEN"];if(t==="anthropic")return[ou,pb,db];let n={"ant-ling":"ANT_LING_API_KEY","qwen-token-plan":"QWEN_TOKEN_PLAN_API_KEY","qwen-token-plan-cn":"QWEN_TOKEN_PLAN_CN_API_KEY","qwen-token-plan-individual":"QWEN_TOKEN_PLAN_API_KEY",openai:"OPENAI_API_KEY","azure-openai-responses":"AZURE_OPENAI_API_KEY",nvidia:"NVIDIA_API_KEY",deepseek:"DEEPSEEK_API_KEY",google:"GEMINI_API_KEY","google-vertex":"GOOGLE_CLOUD_API_KEY",groq:"GROQ_API_KEY",cerebras:"CEREBRAS_API_KEY",xai:"XAI_API_KEY",radius:"RADIUS_API_KEY",openrouter:"OPENROUTER_API_KEY","vercel-ai-gateway":"AI_GATEWAY_API_KEY",zai:"ZAI_API_KEY","zai-coding-cn":"ZAI_CODING_CN_API_KEY",mistral:"MISTRAL_API_KEY",minimax:"MINIMAX_API_KEY","minimax-cn":"MINIMAX_CN_API_KEY",moonshotai:"MOONSHOT_API_KEY","moonshotai-cn":"MOONSHOT_API_KEY",huggingface:"HF_TOKEN",fireworks:"FIREWORKS_API_KEY",together:"TOGETHER_API_KEY",baseten:"BASETEN_API_KEY",opencode:"OPENCODE_API_KEY","opencode-go":"OPENCODE_API_KEY","kimi-coding":"KIMI_API_KEY","cloudflare-workers-ai":"CLOUDFLARE_API_KEY","cloudflare-ai-gateway":"CLOUDFLARE_API_KEY",xiaomi:"XIAOMI_API_KEY","xiaomi-token-plan-cn":"XIAOMI_TOKEN_PLAN_CN_API_KEY","xiaomi-token-plan-ams":"XIAOMI_TOKEN_PLAN_AMS_API_KEY","xiaomi-token-plan-sgp":"XIAOMI_TOKEN_PLAN_SGP_API_KEY"}[t];return n?[n]:void 0}function BB(t,e){let n=NB(t);if(!n)return;let i=n.filter(r=>!!Fe(r,e));return i.length>0?i:void 0}function jR(t,e){let n=BB(t,e);if(n?.[0]){let i=t==="anthropic"?n.find(r=>r!==ou):n[0];if(i)return Fe(i,e)}if(t==="google-vertex"){let i=$B(e),r=!!(Fe("GOOGLE_CLOUD_PROJECT",e)||Fe("GCLOUD_PROJECT",e)),o=!!Fe("GOOGLE_CLOUD_LOCATION",e);if(i&&r&&o)return"<authenticated>"}if(t==="amazon-bedrock"&&(Fe("AWS_PROFILE",e)||Fe("AWS_ACCESS_KEY_ID",e)&&Fe("AWS_SECRET_ACCESS_KEY",e)||Fe("AWS_BEARER_TOKEN_BEDROCK",e)||Fe("AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",e)||Fe("AWS_CONTAINER_CREDENTIALS_FULL_URI",e)||Fe("AWS_WEB_IDENTITY_TOKEN_FILE",e)))return"<authenticated>"}var qR={"bedrock-converse-stream":{"amazon.nova-2-lite-v1:0":{id:"amazon.nova-2-lite-v1:0",name:"Nova 2 Lite",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:.33,output:2.75,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096},"amazon.nova-lite-v1:0":{id:"amazon.nova-lite-v1:0",name:"Nova Lite",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text","image"],cost:{input:.06,output:.24,cacheRead:.015,cacheWrite:0},contextWindow:3e5,maxTokens:8192},"amazon.nova-micro-v1:0":{id:"amazon.nova-micro-v1:0",name:"Nova Micro",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text"],cost:{input:.035,output:.14,cacheRead:.00875,cacheWrite:0},contextWindow:128e3,maxTokens:8192},"amazon.nova-pro-v1:0":{id:"amazon.nova-pro-v1:0",name:"Nova Pro",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text","image"],cost:{input:.8,output:3.2,cacheRead:.2,cacheWrite:0},contextWindow:3e5,maxTokens:8192},"anthropic.claude-fable-5":{id:"anthropic.claude-fable-5",name:"Claude Fable 5",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:10,output:50,cacheRead:1,cacheWrite:12.5},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{off:null,xhigh:"xhigh",max:"max"}},"anthropic.claude-haiku-4-5-20251001-v1:0":{id:"anthropic.claude-haiku-4-5-20251001-v1:0",name:"Claude Haiku 4.5",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:1,output:5,cacheRead:.1,cacheWrite:1.25},contextWindow:2e5,maxTokens:64e3,compat:{supportsStrictMode:!0}},"anthropic.claude-opus-4-1-20250805-v1:0":{id:"anthropic.claude-opus-4-1-20250805-v1:0",name:"Claude Opus 4.1",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:15,output:75,cacheRead:1.5,cacheWrite:18.75},contextWindow:2e5,maxTokens:32e3},"anthropic.claude-opus-4-5-20251101-v1:0":{id:"anthropic.claude-opus-4-5-20251101-v1:0",name:"Claude Opus 4.5",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:2e5,maxTokens:64e3,compat:{supportsStrictMode:!0}},"anthropic.claude-opus-4-6-v1":{id:"anthropic.claude-opus-4-6-v1",name:"Claude Opus 4.6",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{max:"max"}},"anthropic.claude-opus-4-7":{id:"anthropic.claude-opus-4-7",name:"Claude Opus 4.7",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"anthropic.claude-opus-4-8":{id:"anthropic.claude-opus-4-8",name:"Claude Opus 4.8",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"anthropic.claude-sonnet-4-5-20250929-v1:0":{id:"anthropic.claude-sonnet-4-5-20250929-v1:0",name:"Claude Sonnet 4.5",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:2e5,maxTokens:64e3,compat:{supportsStrictMode:!0}},"anthropic.claude-sonnet-4-6":{id:"anthropic.claude-sonnet-4-6",name:"Claude Sonnet 4.6",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:1e6,maxTokens:64e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{max:"max"}},"anthropic.claude-sonnet-5":{id:"anthropic.claude-sonnet-5",name:"Claude Sonnet 5",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:2,output:10,cacheRead:.2,cacheWrite:2.5},contextWindow:1e6,maxTokens:128e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"au.anthropic.claude-haiku-4-5-20251001-v1:0":{id:"au.anthropic.claude-haiku-4-5-20251001-v1:0",name:"Claude Haiku 4.5 (AU)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:1,output:5,cacheRead:.1,cacheWrite:1.25},contextWindow:2e5,maxTokens:64e3,compat:{supportsStrictMode:!0}},"au.anthropic.claude-opus-4-6-v1":{id:"au.anthropic.claude-opus-4-6-v1",name:"AU Anthropic Claude Opus 4.6",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:16.5,output:82.5,cacheRead:1.65,cacheWrite:20.625},contextWindow:1e6,maxTokens:128e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{max:"max"}},"au.anthropic.claude-opus-4-8":{id:"au.anthropic.claude-opus-4-8",name:"Claude Opus 4.8 (AU)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"au.anthropic.claude-opus-5":{id:"au.anthropic.claude-opus-5",name:"Claude Opus 5 (AU)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"au.anthropic.claude-sonnet-4-5-20250929-v1:0":{id:"au.anthropic.claude-sonnet-4-5-20250929-v1:0",name:"Claude Sonnet 4.5 (AU)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:2e5,maxTokens:64e3,compat:{supportsStrictMode:!0}},"au.anthropic.claude-sonnet-4-6":{id:"au.anthropic.claude-sonnet-4-6",name:"AU Anthropic Claude Sonnet 4.6",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:3.3,output:16.5,cacheRead:.33,cacheWrite:4.125},contextWindow:1e6,maxTokens:128e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{max:"max"}},"au.anthropic.claude-sonnet-5":{id:"au.anthropic.claude-sonnet-5",name:"Claude Sonnet 5 (AU)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:2,output:10,cacheRead:.2,cacheWrite:2.5},contextWindow:1e6,maxTokens:128e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"deepseek.r1-v1:0":{id:"deepseek.r1-v1:0",name:"DeepSeek-R1",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:1.35,output:5.4,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:32768},"deepseek.v3-v1:0":{id:"deepseek.v3-v1:0",name:"DeepSeek-V3.1",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:.58,output:1.68,cacheRead:0,cacheWrite:0},contextWindow:163840,maxTokens:81920,compat:{supportsStrictMode:!0}},"deepseek.v3.2":{id:"deepseek.v3.2",name:"DeepSeek-V3.2",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:.62,output:1.85,cacheRead:0,cacheWrite:0},contextWindow:163840,maxTokens:81920,compat:{supportsStrictMode:!0}},"eu.anthropic.claude-fable-5":{id:"eu.anthropic.claude-fable-5",name:"Claude Fable 5 (EU)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.eu-central-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:11,output:55,cacheRead:1.1,cacheWrite:13.75},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{off:null,xhigh:"xhigh",max:"max"}},"eu.anthropic.claude-haiku-4-5-20251001-v1:0":{id:"eu.anthropic.claude-haiku-4-5-20251001-v1:0",name:"Claude Haiku 4.5 (EU)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.eu-central-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:1.1,output:5.5,cacheRead:.11,cacheWrite:1.375},contextWindow:2e5,maxTokens:64e3,compat:{supportsStrictMode:!0}},"eu.anthropic.claude-opus-4-5-20251101-v1:0":{id:"eu.anthropic.claude-opus-4-5-20251101-v1:0",name:"Claude Opus 4.5 (EU)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.eu-central-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5.5,output:27.5,cacheRead:.55,cacheWrite:6.875},contextWindow:2e5,maxTokens:64e3,compat:{supportsStrictMode:!0}},"eu.anthropic.claude-opus-4-6-v1":{id:"eu.anthropic.claude-opus-4-6-v1",name:"Claude Opus 4.6 (EU)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.eu-central-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5.5,output:27.5,cacheRead:.55,cacheWrite:6.875},contextWindow:1e6,maxTokens:128e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{max:"max"}},"eu.anthropic.claude-opus-4-7":{id:"eu.anthropic.claude-opus-4-7",name:"Claude Opus 4.7 (EU)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.eu-central-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5.5,output:27.5,cacheRead:.55,cacheWrite:6.875},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"eu.anthropic.claude-opus-4-8":{id:"eu.anthropic.claude-opus-4-8",name:"Claude Opus 4.8 (EU)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.eu-central-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5.5,output:27.5,cacheRead:.55,cacheWrite:6.875},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"eu.anthropic.claude-opus-5":{id:"eu.anthropic.claude-opus-5",name:"Claude Opus 5 (EU)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.eu-central-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5.5,output:27.5,cacheRead:.55,cacheWrite:6.875},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"eu.anthropic.claude-sonnet-4-5-20250929-v1:0":{id:"eu.anthropic.claude-sonnet-4-5-20250929-v1:0",name:"Claude Sonnet 4.5 (EU)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.eu-central-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:3.3,output:16.5,cacheRead:.33,cacheWrite:4.125},contextWindow:2e5,maxTokens:64e3,compat:{supportsStrictMode:!0}},"eu.anthropic.claude-sonnet-4-6":{id:"eu.anthropic.claude-sonnet-4-6",name:"Claude Sonnet 4.6 (EU)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.eu-central-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:3.3,output:16.5,cacheRead:.33,cacheWrite:4.125},contextWindow:1e6,maxTokens:64e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{max:"max"}},"eu.anthropic.claude-sonnet-5":{id:"eu.anthropic.claude-sonnet-5",name:"Claude Sonnet 5 (EU)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.eu-central-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:2.2,output:11,cacheRead:.22,cacheWrite:2.75},contextWindow:1e6,maxTokens:128e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"global.anthropic.claude-fable-5":{id:"global.anthropic.claude-fable-5",name:"Claude Fable 5 (Global)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:10,output:50,cacheRead:1,cacheWrite:12.5},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{off:null,xhigh:"xhigh",max:"max"}},"global.anthropic.claude-haiku-4-5-20251001-v1:0":{id:"global.anthropic.claude-haiku-4-5-20251001-v1:0",name:"Claude Haiku 4.5 (Global)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:1,output:5,cacheRead:.1,cacheWrite:1.25},contextWindow:2e5,maxTokens:64e3,compat:{supportsStrictMode:!0}},"global.anthropic.claude-opus-4-5-20251101-v1:0":{id:"global.anthropic.claude-opus-4-5-20251101-v1:0",name:"Claude Opus 4.5 (Global)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:2e5,maxTokens:64e3,compat:{supportsStrictMode:!0}},"global.anthropic.claude-opus-4-6-v1":{id:"global.anthropic.claude-opus-4-6-v1",name:"Claude Opus 4.6 (Global)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{max:"max"}},"global.anthropic.claude-opus-4-7":{id:"global.anthropic.claude-opus-4-7",name:"Claude Opus 4.7 (Global)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"global.anthropic.claude-opus-4-8":{id:"global.anthropic.claude-opus-4-8",name:"Claude Opus 4.8 (Global)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"global.anthropic.claude-opus-5":{id:"global.anthropic.claude-opus-5",name:"Claude Opus 5 (Global)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"global.anthropic.claude-sonnet-4-5-20250929-v1:0":{id:"global.anthropic.claude-sonnet-4-5-20250929-v1:0",name:"Claude Sonnet 4.5 (Global)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:2e5,maxTokens:64e3,compat:{supportsStrictMode:!0}},"global.anthropic.claude-sonnet-4-6":{id:"global.anthropic.claude-sonnet-4-6",name:"Claude Sonnet 4.6 (Global)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:1e6,maxTokens:64e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{max:"max"}},"global.anthropic.claude-sonnet-5":{id:"global.anthropic.claude-sonnet-5",name:"Claude Sonnet 5 (Global)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:2,output:10,cacheRead:.2,cacheWrite:2.5},contextWindow:1e6,maxTokens:128e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"google.gemma-3-27b-it":{id:"google.gemma-3-27b-it",name:"Google Gemma 3 27B Instruct",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text","image"],cost:{input:.12,output:.2,cacheRead:0,cacheWrite:0},contextWindow:202752,maxTokens:8192,compat:{supportsStrictMode:!0}},"google.gemma-3-4b-it":{id:"google.gemma-3-4b-it",name:"Gemma 3 4B IT",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text","image"],cost:{input:.04,output:.08,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096},"jp.anthropic.claude-haiku-4-5-20251001-v1:0":{id:"jp.anthropic.claude-haiku-4-5-20251001-v1:0",name:"Claude Haiku 4.5 (JP)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:1,output:5,cacheRead:.1,cacheWrite:1.25},contextWindow:2e5,maxTokens:64e3,compat:{supportsStrictMode:!0}},"jp.anthropic.claude-opus-4-7":{id:"jp.anthropic.claude-opus-4-7",name:"Claude Opus 4.7 (JP)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"jp.anthropic.claude-opus-4-8":{id:"jp.anthropic.claude-opus-4-8",name:"Claude Opus 4.8 (JP)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"jp.anthropic.claude-opus-5":{id:"jp.anthropic.claude-opus-5",name:"Claude Opus 5 (JP)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"jp.anthropic.claude-sonnet-4-5-20250929-v1:0":{id:"jp.anthropic.claude-sonnet-4-5-20250929-v1:0",name:"Claude Sonnet 4.5 (JP)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:2e5,maxTokens:64e3,compat:{supportsStrictMode:!0}},"jp.anthropic.claude-sonnet-4-6":{id:"jp.anthropic.claude-sonnet-4-6",name:"Claude Sonnet 4.6 (JP)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:1e6,maxTokens:64e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{max:"max"}},"jp.anthropic.claude-sonnet-5":{id:"jp.anthropic.claude-sonnet-5",name:"Claude Sonnet 5 (JP)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:2,output:10,cacheRead:.2,cacheWrite:2.5},contextWindow:1e6,maxTokens:128e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"meta.llama3-1-70b-instruct-v1:0":{id:"meta.llama3-1-70b-instruct-v1:0",name:"Llama 3.1 70B Instruct",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text"],cost:{input:.72,output:.72,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096},"meta.llama3-1-8b-instruct-v1:0":{id:"meta.llama3-1-8b-instruct-v1:0",name:"Llama 3.1 8B Instruct",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text"],cost:{input:.22,output:.22,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096},"meta.llama3-3-70b-instruct-v1:0":{id:"meta.llama3-3-70b-instruct-v1:0",name:"Llama 3.3 70B Instruct",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text"],cost:{input:.72,output:.72,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096},"meta.llama4-maverick-17b-instruct-v1:0":{id:"meta.llama4-maverick-17b-instruct-v1:0",name:"Llama 4 Maverick 17B Instruct",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text","image"],cost:{input:.24,output:.97,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:16384},"meta.llama4-scout-17b-instruct-v1:0":{id:"meta.llama4-scout-17b-instruct-v1:0",name:"Llama 4 Scout 17B Instruct",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text","image"],cost:{input:.17,output:.66,cacheRead:0,cacheWrite:0},contextWindow:35e5,maxTokens:16384},"minimax.minimax-m2":{id:"minimax.minimax-m2",name:"MiniMax M2",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:0,cacheWrite:0},contextWindow:204608,maxTokens:128e3},"minimax.minimax-m2.1":{id:"minimax.minimax-m2.1",name:"MiniMax M2.1",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:0,cacheWrite:0},contextWindow:204800,maxTokens:131072},"minimax.minimax-m2.5":{id:"minimax.minimax-m2.5",name:"MiniMax M2.5",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:0,cacheWrite:0},contextWindow:196608,maxTokens:98304},"mistral.devstral-2-123b":{id:"mistral.devstral-2-123b",name:"Devstral 2 123B",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text"],cost:{input:.4,output:2,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:8192,compat:{supportsStrictMode:!0}},"mistral.magistral-small-2509":{id:"mistral.magistral-small-2509",name:"Magistral Small 1.2",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:.5,output:1.5,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4e4,compat:{supportsStrictMode:!0}},"mistral.ministral-3-14b-instruct":{id:"mistral.ministral-3-14b-instruct",name:"Ministral 14B 3.0",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text"],cost:{input:.2,output:.2,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096,compat:{supportsStrictMode:!0}},"mistral.ministral-3-3b-instruct":{id:"mistral.ministral-3-3b-instruct",name:"Ministral 3 3B",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text","image"],cost:{input:.1,output:.1,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:8192,compat:{supportsStrictMode:!0}},"mistral.ministral-3-8b-instruct":{id:"mistral.ministral-3-8b-instruct",name:"Ministral 3 8B",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text"],cost:{input:.15,output:.15,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096,compat:{supportsStrictMode:!0}},"mistral.mistral-large-3-675b-instruct":{id:"mistral.mistral-large-3-675b-instruct",name:"Mistral Large 3",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text","image"],cost:{input:.5,output:1.5,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:8192,compat:{supportsStrictMode:!0}},"mistral.pixtral-large-2502-v1:0":{id:"mistral.pixtral-large-2502-v1:0",name:"Pixtral Large (25.02)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text","image"],cost:{input:2,output:6,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:8192},"mistral.voxtral-mini-3b-2507":{id:"mistral.voxtral-mini-3b-2507",name:"Voxtral Mini 3B 2507",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text"],cost:{input:.04,output:.04,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096,compat:{supportsStrictMode:!0}},"mistral.voxtral-small-24b-2507":{id:"mistral.voxtral-small-24b-2507",name:"Voxtral Small 24B 2507",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text"],cost:{input:.15,output:.35,cacheRead:0,cacheWrite:0},contextWindow:32e3,maxTokens:8192,compat:{supportsStrictMode:!0}},"moonshot.kimi-k2-thinking":{id:"moonshot.kimi-k2-thinking",name:"Kimi K2 Thinking",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:.6,output:2.5,cacheRead:0,cacheWrite:0},contextWindow:262143,maxTokens:16e3,compat:{supportsStrictMode:!0}},"moonshotai.kimi-k2.5":{id:"moonshotai.kimi-k2.5",name:"Kimi K2.5",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:.6,output:3,cacheRead:0,cacheWrite:0},contextWindow:262143,maxTokens:16e3,compat:{supportsStrictMode:!0}},"nvidia.nemotron-nano-12b-v2":{id:"nvidia.nemotron-nano-12b-v2",name:"NVIDIA Nemotron Nano 12B v2 VL BF16",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text","image"],cost:{input:.2,output:.6,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096,compat:{supportsStrictMode:!0}},"nvidia.nemotron-nano-3-30b":{id:"nvidia.nemotron-nano-3-30b",name:"NVIDIA Nemotron Nano 3 30B",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:.06,output:.24,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096,compat:{supportsStrictMode:!0}},"nvidia.nemotron-nano-9b-v2":{id:"nvidia.nemotron-nano-9b-v2",name:"NVIDIA Nemotron Nano 9B v2",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text"],cost:{input:.06,output:.23,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096,compat:{supportsStrictMode:!0}},"nvidia.nemotron-super-3-120b":{id:"nvidia.nemotron-super-3-120b",name:"NVIDIA Nemotron 3 Super 120B A12B",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:.15,output:.65,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:131072,compat:{supportsStrictMode:!0}},"openai.gpt-5.4":{id:"openai.gpt-5.4",name:"GPT-5.4",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:2.75,output:16.5,cacheRead:.275,cacheWrite:0},contextWindow:272e3,maxTokens:128e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{xhigh:"xhigh"}},"openai.gpt-5.5":{id:"openai.gpt-5.5",name:"GPT-5.5",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5.5,output:33,cacheRead:.55,cacheWrite:0},contextWindow:272e3,maxTokens:128e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{xhigh:"xhigh"}},"openai.gpt-5.6-luna":{id:"openai.gpt-5.6-luna",name:"GPT-5.6 Luna",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:.22,output:1.32,cacheRead:.022,cacheWrite:.275},contextWindow:105e4,maxTokens:128e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{xhigh:"xhigh"}},"openai.gpt-5.6-sol":{id:"openai.gpt-5.6-sol",name:"GPT-5.6 Sol",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5.5,output:33,cacheRead:.55,cacheWrite:6.875},contextWindow:105e4,maxTokens:128e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{xhigh:"xhigh"}},"openai.gpt-5.6-terra":{id:"openai.gpt-5.6-terra",name:"GPT-5.6 Terra",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:2.2,output:13.2,cacheRead:.22,cacheWrite:2.75},contextWindow:105e4,maxTokens:128e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{xhigh:"xhigh"}},"openai.gpt-oss-120b":{id:"openai.gpt-oss-120b",name:"gpt-oss-120b",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:.15,output:.6,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{supportsStrictMode:!0}},"openai.gpt-oss-120b-1:0":{id:"openai.gpt-oss-120b-1:0",name:"gpt-oss-120b",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:.15,output:.6,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{supportsStrictMode:!0}},"openai.gpt-oss-20b":{id:"openai.gpt-oss-20b",name:"gpt-oss-20b",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:.07,output:.3,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{supportsStrictMode:!0}},"openai.gpt-oss-20b-1:0":{id:"openai.gpt-oss-20b-1:0",name:"gpt-oss-20b",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:.07,output:.3,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{supportsStrictMode:!0}},"openai.gpt-oss-safeguard-120b":{id:"openai.gpt-oss-safeguard-120b",name:"GPT OSS Safeguard 120B",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text"],cost:{input:.15,output:.6,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{supportsStrictMode:!0}},"openai.gpt-oss-safeguard-20b":{id:"openai.gpt-oss-safeguard-20b",name:"GPT OSS Safeguard 20B",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text"],cost:{input:.07,output:.2,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{supportsStrictMode:!0}},"qwen.qwen3-235b-a22b-2507-v1:0":{id:"qwen.qwen3-235b-a22b-2507-v1:0",name:"Qwen3 235B A22B 2507",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text"],cost:{input:.22,output:.88,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:131072,compat:{supportsStrictMode:!0}},"qwen.qwen3-32b-v1:0":{id:"qwen.qwen3-32b-v1:0",name:"Qwen3 32B (dense)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:.15,output:.6,cacheRead:0,cacheWrite:0},contextWindow:16384,maxTokens:16384,compat:{supportsStrictMode:!0}},"qwen.qwen3-coder-30b-a3b-v1:0":{id:"qwen.qwen3-coder-30b-a3b-v1:0",name:"Qwen3 Coder 30B A3B Instruct",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text"],cost:{input:.15,output:.6,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:131072,compat:{supportsStrictMode:!0}},"qwen.qwen3-coder-480b-a35b-v1:0":{id:"qwen.qwen3-coder-480b-a35b-v1:0",name:"Qwen3 Coder 480B A35B Instruct",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text"],cost:{input:.22,output:1.8,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:65536,compat:{supportsStrictMode:!0}},"qwen.qwen3-coder-next":{id:"qwen.qwen3-coder-next",name:"Qwen3 Coder Next",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:.22,output:1.8,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:65536,compat:{supportsStrictMode:!0}},"qwen.qwen3-next-80b-a3b":{id:"qwen.qwen3-next-80b-a3b",name:"Qwen/Qwen3-Next-80B-A3B-Instruct",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text"],cost:{input:.14,output:1.4,cacheRead:0,cacheWrite:0},contextWindow:262e3,maxTokens:262e3,compat:{supportsStrictMode:!0}},"qwen.qwen3-vl-235b-a22b":{id:"qwen.qwen3-vl-235b-a22b",name:"Qwen/Qwen3-VL-235B-A22B-Instruct",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text","image"],cost:{input:.3,output:1.5,cacheRead:0,cacheWrite:0},contextWindow:262e3,maxTokens:262e3,compat:{supportsStrictMode:!0}},"us.anthropic.claude-fable-5":{id:"us.anthropic.claude-fable-5",name:"Claude Fable 5 (US)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:10,output:50,cacheRead:1,cacheWrite:12.5},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{off:null,xhigh:"xhigh",max:"max"}},"us.anthropic.claude-haiku-4-5-20251001-v1:0":{id:"us.anthropic.claude-haiku-4-5-20251001-v1:0",name:"Claude Haiku 4.5 (US)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:1,output:5,cacheRead:.1,cacheWrite:1.25},contextWindow:2e5,maxTokens:64e3,compat:{supportsStrictMode:!0}},"us.anthropic.claude-opus-4-1-20250805-v1:0":{id:"us.anthropic.claude-opus-4-1-20250805-v1:0",name:"Claude Opus 4.1 (US)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:15,output:75,cacheRead:1.5,cacheWrite:18.75},contextWindow:2e5,maxTokens:32e3},"us.anthropic.claude-opus-4-5-20251101-v1:0":{id:"us.anthropic.claude-opus-4-5-20251101-v1:0",name:"Claude Opus 4.5 (US)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:2e5,maxTokens:64e3,compat:{supportsStrictMode:!0}},"us.anthropic.claude-opus-4-6-v1":{id:"us.anthropic.claude-opus-4-6-v1",name:"Claude Opus 4.6 (US)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{max:"max"}},"us.anthropic.claude-opus-4-7":{id:"us.anthropic.claude-opus-4-7",name:"Claude Opus 4.7 (US)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"us.anthropic.claude-opus-4-8":{id:"us.anthropic.claude-opus-4-8",name:"Claude Opus 4.8 (US)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"us.anthropic.claude-opus-5":{id:"us.anthropic.claude-opus-5",name:"Claude Opus 5 (US)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"us.anthropic.claude-sonnet-4-5-20250929-v1:0":{id:"us.anthropic.claude-sonnet-4-5-20250929-v1:0",name:"Claude Sonnet 4.5 (US)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:2e5,maxTokens:64e3,compat:{supportsStrictMode:!0}},"us.anthropic.claude-sonnet-4-6":{id:"us.anthropic.claude-sonnet-4-6",name:"Claude Sonnet 4.6 (US)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:1e6,maxTokens:64e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{max:"max"}},"us.anthropic.claude-sonnet-5":{id:"us.anthropic.claude-sonnet-5",name:"Claude Sonnet 5 (US)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:2,output:10,cacheRead:.2,cacheWrite:2.5},contextWindow:1e6,maxTokens:128e3,compat:{supportsStrictMode:!0},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"us.deepseek.r1-v1:0":{id:"us.deepseek.r1-v1:0",name:"DeepSeek-R1 (US)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:1.35,output:5.4,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:32768},"us.meta.llama4-maverick-17b-instruct-v1:0":{id:"us.meta.llama4-maverick-17b-instruct-v1:0",name:"Llama 4 Maverick 17B Instruct (US)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text","image"],cost:{input:.24,output:.97,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:16384},"us.meta.llama4-scout-17b-instruct-v1:0":{id:"us.meta.llama4-scout-17b-instruct-v1:0",name:"Llama 4 Scout 17B Instruct (US)",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!1,input:["text","image"],cost:{input:.17,output:.66,cacheRead:0,cacheWrite:0},contextWindow:35e5,maxTokens:16384},"writer.palmyra-x4-v1:0":{id:"writer.palmyra-x4-v1:0",name:"Palmyra X4",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:2.5,output:10,cacheRead:0,cacheWrite:0},contextWindow:122880,maxTokens:8192},"writer.palmyra-x5-v1:0":{id:"writer.palmyra-x5-v1:0",name:"Palmyra X5",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:.6,output:6,cacheRead:0,cacheWrite:0},contextWindow:104e4,maxTokens:8192},"xai.grok-4.3":{id:"xai.grok-4.3",name:"Grok 4.3",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text","image"],cost:{input:1.25,output:2.5,cacheRead:.2,cacheWrite:0},contextWindow:1e6,maxTokens:131072,compat:{supportsStrictMode:!0}},"zai.glm-4.7":{id:"zai.glm-4.7",name:"GLM-4.7",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:.6,output:2.2,cacheRead:0,cacheWrite:0},contextWindow:204800,maxTokens:131072,compat:{supportsStrictMode:!0}},"zai.glm-4.7-flash":{id:"zai.glm-4.7-flash",name:"GLM-4.7-Flash",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:.07,output:.4,cacheRead:0,cacheWrite:0},contextWindow:2e5,maxTokens:131072,compat:{supportsStrictMode:!0}},"zai.glm-5":{id:"zai.glm-5",name:"GLM-5",api:"bedrock-converse-stream",provider:"amazon-bedrock",baseUrl:"https://bedrock-runtime.us-east-1.amazonaws.com",reasoning:!0,input:["text"],cost:{input:1,output:3.2,cacheRead:0,cacheWrite:0},contextWindow:202752,maxTokens:101376,compat:{supportsStrictMode:!0}}}};function J(t,e){return Object.assign({},...Object.values(e))}var GR=J("amazon-bedrock",qR);var KR={"openai-completions":{"Ling-2.6-1T":{id:"Ling-2.6-1T",name:"Ling 2.6 1T",api:"openai-completions",baseUrl:"https://api.ant-ling.com/v1",provider:"ant-ling",reasoning:!1,input:["text"],cost:{input:.06,output:.25,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:65536,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"ant-ling",supportsLongCacheRetention:!1}},"Ling-2.6-flash":{id:"Ling-2.6-flash",name:"Ling 2.6 Flash",api:"openai-completions",baseUrl:"https://api.ant-ling.com/v1",provider:"ant-ling",reasoning:!1,input:["text"],cost:{input:.01,output:.02,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:65536,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"ant-ling",supportsLongCacheRetention:!1}},"Ring-2.6-1T":{id:"Ring-2.6-1T",name:"Ring 2.6 1T",api:"openai-completions",baseUrl:"https://api.ant-ling.com/v1",provider:"ant-ling",reasoning:!0,input:["text"],cost:{input:.06,output:.25,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:65536,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"ant-ling",supportsLongCacheRetention:!1},thinkingLevelMap:{off:null,minimal:null,low:null,medium:null,high:"high",xhigh:"xhigh"}}}};var HR=J("ant-ling",KR);var zR={"anthropic-messages":{"claude-fable-5":{id:"claude-fable-5",name:"Claude Fable 5",api:"anthropic-messages",provider:"anthropic",baseUrl:"https://api.anthropic.com",reasoning:!0,input:["text","image"],cost:{input:10,output:50,cacheRead:1,cacheWrite:12.5},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{off:null,xhigh:"xhigh",max:"max"},compat:{forceAdaptiveThinking:!0,supportsStrictTools:!0}},"claude-haiku-4-5":{id:"claude-haiku-4-5",name:"Claude Haiku 4.5 (latest)",api:"anthropic-messages",provider:"anthropic",baseUrl:"https://api.anthropic.com",reasoning:!0,input:["text","image"],cost:{input:1,output:5,cacheRead:.1,cacheWrite:1.25},contextWindow:2e5,maxTokens:64e3,compat:{supportsStrictTools:!0}},"claude-haiku-4-5-20251001":{id:"claude-haiku-4-5-20251001",name:"Claude Haiku 4.5",api:"anthropic-messages",provider:"anthropic",baseUrl:"https://api.anthropic.com",reasoning:!0,input:["text","image"],cost:{input:1,output:5,cacheRead:.1,cacheWrite:1.25},contextWindow:2e5,maxTokens:64e3,compat:{supportsStrictTools:!0}},"claude-opus-4-5":{id:"claude-opus-4-5",name:"Claude Opus 4.5 (latest)",api:"anthropic-messages",provider:"anthropic",baseUrl:"https://api.anthropic.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:2e5,maxTokens:64e3,compat:{supportsStrictTools:!0}},"claude-opus-4-5-20251101":{id:"claude-opus-4-5-20251101",name:"Claude Opus 4.5",api:"anthropic-messages",provider:"anthropic",baseUrl:"https://api.anthropic.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:2e5,maxTokens:64e3,compat:{supportsStrictTools:!0}},"claude-opus-4-6":{id:"claude-opus-4-6",name:"Claude Opus 4.6",api:"anthropic-messages",provider:"anthropic",baseUrl:"https://api.anthropic.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{max:"max"},compat:{forceAdaptiveThinking:!0,supportsStrictTools:!0}},"claude-opus-4-7":{id:"claude-opus-4-7",name:"Claude Opus 4.7",api:"anthropic-messages",provider:"anthropic",baseUrl:"https://api.anthropic.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"},compat:{forceAdaptiveThinking:!0,supportsTemperature:!1,supportsStrictTools:!0}},"claude-opus-4-8":{id:"claude-opus-4-8",name:"Claude Opus 4.8",api:"anthropic-messages",provider:"anthropic",baseUrl:"https://api.anthropic.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"},compat:{forceAdaptiveThinking:!0,supportsTemperature:!1,supportsStrictTools:!0}},"claude-opus-5":{id:"claude-opus-5",name:"Claude Opus 5",api:"anthropic-messages",provider:"anthropic",baseUrl:"https://api.anthropic.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"},compat:{forceAdaptiveThinking:!0,supportsTemperature:!1,supportsStrictTools:!0}},"claude-sonnet-4-5":{id:"claude-sonnet-4-5",name:"Claude Sonnet 4.5 (latest)",api:"anthropic-messages",provider:"anthropic",baseUrl:"https://api.anthropic.com",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:1e6,maxTokens:64e3,compat:{supportsStrictTools:!0}},"claude-sonnet-4-5-20250929":{id:"claude-sonnet-4-5-20250929",name:"Claude Sonnet 4.5",api:"anthropic-messages",provider:"anthropic",baseUrl:"https://api.anthropic.com",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:1e6,maxTokens:64e3,compat:{supportsStrictTools:!0}},"claude-sonnet-4-6":{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6",api:"anthropic-messages",provider:"anthropic",baseUrl:"https://api.anthropic.com",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{max:"max"},compat:{forceAdaptiveThinking:!0,supportsStrictTools:!0}},"claude-sonnet-5":{id:"claude-sonnet-5",name:"Claude Sonnet 5",api:"anthropic-messages",provider:"anthropic",baseUrl:"https://api.anthropic.com",reasoning:!0,input:["text","image"],cost:{input:2,output:10,cacheRead:.2,cacheWrite:2.5},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"},compat:{forceAdaptiveThinking:!0,supportsStrictTools:!0}}}};var VR=J("anthropic",zR);var QR={"azure-openai-responses":{"gpt-4":{id:"gpt-4",name:"GPT-4",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!1,input:["text"],cost:{input:30,output:60,cacheRead:0,cacheWrite:0},contextWindow:8192,maxTokens:8192},"gpt-4-turbo":{id:"gpt-4-turbo",name:"GPT-4 Turbo",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!1,input:["text","image"],cost:{input:10,output:30,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096},"gpt-4.1":{id:"gpt-4.1",name:"GPT-4.1",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!1,input:["text","image"],cost:{input:2,output:8,cacheRead:.5,cacheWrite:0},contextWindow:1047576,maxTokens:32768},"gpt-4.1-mini":{id:"gpt-4.1-mini",name:"GPT-4.1 mini",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!1,input:["text","image"],cost:{input:.4,output:1.6,cacheRead:.1,cacheWrite:0},contextWindow:1047576,maxTokens:32768},"gpt-4.1-nano":{id:"gpt-4.1-nano",name:"GPT-4.1 nano",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!1,input:["text","image"],cost:{input:.1,output:.4,cacheRead:.025,cacheWrite:0},contextWindow:1047576,maxTokens:32768},"gpt-4o":{id:"gpt-4o",name:"GPT-4o",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!1,input:["text","image"],cost:{input:2.5,output:10,cacheRead:1.25,cacheWrite:0},contextWindow:128e3,maxTokens:16384},"gpt-4o-2024-05-13":{id:"gpt-4o-2024-05-13",name:"GPT-4o (2024-05-13)",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!1,input:["text","image"],cost:{input:5,output:15,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096},"gpt-4o-2024-08-06":{id:"gpt-4o-2024-08-06",name:"GPT-4o (2024-08-06)",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!1,input:["text","image"],cost:{input:2.5,output:10,cacheRead:1.25,cacheWrite:0},contextWindow:128e3,maxTokens:16384},"gpt-4o-2024-11-20":{id:"gpt-4o-2024-11-20",name:"GPT-4o (2024-11-20)",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!1,input:["text","image"],cost:{input:2.5,output:10,cacheRead:1.25,cacheWrite:0},contextWindow:128e3,maxTokens:16384},"gpt-4o-mini":{id:"gpt-4o-mini",name:"GPT-4o mini",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!1,input:["text","image"],cost:{input:.15,output:.6,cacheRead:.075,cacheWrite:0},contextWindow:128e3,maxTokens:16384},"gpt-5":{id:"gpt-5",name:"GPT-5",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5-chat-latest":{id:"gpt-5-chat-latest",name:"GPT-5 Chat Latest",api:"azure-openai-responses",baseUrl:"",provider:"azure-openai-responses",reasoning:!1,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:0},contextWindow:128e3,maxTokens:16384,thinkingLevelMap:{off:null},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5-mini":{id:"gpt-5-mini",name:"GPT-5 Mini",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:.25,output:2,cacheRead:.025,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5-nano":{id:"gpt-5-nano",name:"GPT-5 Nano",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:.05,output:.4,cacheRead:.005,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5-pro":{id:"gpt-5-pro",name:"GPT-5 Pro",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:15,output:120,cacheRead:0,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.1":{id:"gpt-5.1",name:"GPT-5.1",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.2":{id:"gpt-5.2",name:"GPT-5.2",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,xhigh:"xhigh"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.2-chat-latest":{id:"gpt-5.2-chat-latest",name:"GPT-5.2 Chat",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:128e3,maxTokens:16384,thinkingLevelMap:{off:null,xhigh:"xhigh"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.2-pro":{id:"gpt-5.2-pro",name:"GPT-5.2 Pro",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:21,output:168,cacheRead:0,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,xhigh:"xhigh"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.3-chat-latest":{id:"gpt-5.3-chat-latest",name:"GPT-5.3 Chat (latest)",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!1,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:128e3,maxTokens:16384,thinkingLevelMap:{off:null,xhigh:"xhigh"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.3-codex":{id:"gpt-5.3-codex",name:"GPT-5.3 Codex",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,xhigh:"xhigh"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.3-codex-spark":{id:"gpt-5.3-codex-spark",name:"GPT-5.3 Codex Spark",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:128e3,maxTokens:32e3,thinkingLevelMap:{off:null,xhigh:"xhigh"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.4":{id:"gpt-5.4",name:"GPT-5.4",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:2.5,output:15,cacheRead:.25,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,xhigh:"xhigh"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.4-mini":{id:"gpt-5.4-mini",name:"GPT-5.4 mini",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:.75,output:4.5,cacheRead:.075,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,xhigh:"xhigh"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.4-nano":{id:"gpt-5.4-nano",name:"GPT-5.4 nano",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:.2,output:1.25,cacheRead:.02,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,xhigh:"xhigh"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.4-pro":{id:"gpt-5.4-pro",name:"GPT-5.4 Pro",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:30,output:180,cacheRead:0,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,xhigh:"xhigh"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.5":{id:"gpt-5.5",name:"GPT-5.5",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,xhigh:"xhigh"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.5-pro":{id:"gpt-5.5-pro",name:"GPT-5.5 Pro",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:30,output:180,cacheRead:0,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,xhigh:"xhigh",minimal:null,low:null},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.6-luna":{id:"gpt-5.6-luna",name:"GPT-5.6 Luna",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:.2,output:1.2,cacheRead:.02,cacheWrite:.25},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,xhigh:"xhigh",max:"max"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.6-sol":{id:"gpt-5.6-sol",name:"GPT-5.6 Sol",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:6.25},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,xhigh:"xhigh",max:"max"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.6-terra":{id:"gpt-5.6-terra",name:"GPT-5.6 Terra",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:2,output:12,cacheRead:.2,cacheWrite:2.5},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,xhigh:"xhigh",max:"max"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-realtime-2.1":{id:"gpt-realtime-2.1",name:"GPT-Realtime-2.1",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:4,output:24,cacheRead:.4,cacheWrite:0},contextWindow:128e3,maxTokens:32e3},o1:{id:"o1",name:"o1",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:15,output:60,cacheRead:7.5,cacheWrite:0},contextWindow:2e5,maxTokens:1e5},"o1-pro":{id:"o1-pro",name:"o1-pro",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:150,output:600,cacheRead:0,cacheWrite:0},contextWindow:2e5,maxTokens:1e5},o3:{id:"o3",name:"o3",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:2,output:8,cacheRead:.5,cacheWrite:0},contextWindow:2e5,maxTokens:1e5},"o3-mini":{id:"o3-mini",name:"o3-mini",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text"],cost:{input:1.1,output:4.4,cacheRead:.55,cacheWrite:0},contextWindow:2e5,maxTokens:1e5},"o3-pro":{id:"o3-pro",name:"o3-pro",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:20,output:80,cacheRead:0,cacheWrite:0},contextWindow:2e5,maxTokens:1e5},"o4-mini":{id:"o4-mini",name:"o4-mini",api:"azure-openai-responses",provider:"azure-openai-responses",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:1.1,output:4.4,cacheRead:.275,cacheWrite:0},contextWindow:2e5,maxTokens:1e5}}};var JR=J("azure-openai-responses",QR);var YR={"openai-completions":{"deepseek-ai/DeepSeek-V4-Flash-0731":{id:"deepseek-ai/DeepSeek-V4-Flash-0731",name:"Deepseek V4 Flash 0731",api:"openai-completions",provider:"baseten",baseUrl:"https://inference.baseten.co/v1",reasoning:!0,input:["text"],cost:{input:.13,output:.26,cacheRead:.028,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,supportsUsageInStreaming:!0,maxTokensField:"max_tokens",supportsStrictMode:!0,supportsLongCacheRetention:!1},contextWindow:1048576,maxTokens:1048576},"deepseek-ai/DeepSeek-V4-Pro":{id:"deepseek-ai/DeepSeek-V4-Pro",name:"Deepseek V4 Pro",api:"openai-completions",provider:"baseten",baseUrl:"https://inference.baseten.co/v1",reasoning:!0,thinkingLevelMap:{off:"none",minimal:"minimal",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},input:["text"],cost:{input:1.74,output:3.48,cacheRead:.145,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!0,supportsUsageInStreaming:!0,maxTokensField:"max_tokens",supportsStrictMode:!0,supportsLongCacheRetention:!1,thinkingFormat:"openai"},contextWindow:262144,maxTokens:262144},"moonshotai/Kimi-K2.5":{id:"moonshotai/Kimi-K2.5",name:"Kimi K2.5",api:"openai-completions",provider:"baseten",baseUrl:"https://inference.baseten.co/v1",reasoning:!0,thinkingLevelMap:{off:"off",minimal:null,low:null,medium:null,high:"high",xhigh:null,max:null},input:["text","image"],cost:{input:.6,output:3,cacheRead:.12,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,supportsUsageInStreaming:!0,maxTokensField:"max_tokens",supportsStrictMode:!0,supportsLongCacheRetention:!1,thinkingFormat:"baseten",chatTemplateArgs:{enable_thinking:{$var:"thinking.enabled"}}},contextWindow:262e3,maxTokens:262e3},"moonshotai/Kimi-K2.6":{id:"moonshotai/Kimi-K2.6",name:"Kimi K2.6",api:"openai-completions",provider:"baseten",baseUrl:"https://inference.baseten.co/v1",reasoning:!0,thinkingLevelMap:{off:"off",minimal:null,low:null,medium:null,high:"high",xhigh:null,max:null},input:["text","image"],cost:{input:.95,output:4,cacheRead:.16,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,supportsUsageInStreaming:!0,maxTokensField:"max_tokens",supportsStrictMode:!0,supportsLongCacheRetention:!1,thinkingFormat:"baseten",chatTemplateArgs:{enable_thinking:{$var:"thinking.enabled"}}},contextWindow:262e3,maxTokens:262e3},"moonshotai/Kimi-K2.7-Code":{id:"moonshotai/Kimi-K2.7-Code",name:"Kimi K2.7 Code",api:"openai-completions",provider:"baseten",baseUrl:"https://inference.baseten.co/v1",reasoning:!0,thinkingLevelMap:{off:"off",minimal:null,low:null,medium:null,high:"high",xhigh:null,max:null},input:["text","image"],cost:{input:.95,output:4,cacheRead:.16,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,supportsUsageInStreaming:!0,maxTokensField:"max_tokens",supportsStrictMode:!0,supportsLongCacheRetention:!1,thinkingFormat:"baseten",chatTemplateArgs:{enable_thinking:{$var:"thinking.enabled"}}},contextWindow:262e3,maxTokens:262e3},"moonshotai/Kimi-K3":{id:"moonshotai/Kimi-K3",name:"Kimi K3",api:"openai-completions",provider:"baseten",baseUrl:"https://inference.baseten.co/v1",reasoning:!0,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:null,high:"high",xhigh:null,max:"max"},input:["text","image"],cost:{input:3,output:15,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!0,supportsUsageInStreaming:!0,maxTokensField:"max_tokens",supportsStrictMode:!0,supportsLongCacheRetention:!1,thinkingFormat:"openai"},contextWindow:1048576,maxTokens:262144},"nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B":{id:"nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B",name:"Nemotron Ultra",api:"openai-completions",provider:"baseten",baseUrl:"https://inference.baseten.co/v1",reasoning:!0,thinkingLevelMap:{off:"off",minimal:null,low:null,medium:null,high:"high",xhigh:null,max:null},input:["text"],cost:{input:.6,output:2.4,cacheRead:.12,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,supportsUsageInStreaming:!0,maxTokensField:"max_tokens",supportsStrictMode:!0,supportsLongCacheRetention:!1,thinkingFormat:"baseten",chatTemplateArgs:{enable_thinking:{$var:"thinking.enabled"}}},contextWindow:202800,maxTokens:202800},"nvidia/Nemotron-120B-A12B":{id:"nvidia/Nemotron-120B-A12B",name:"Nemotron Super",api:"openai-completions",provider:"baseten",baseUrl:"https://inference.baseten.co/v1",reasoning:!0,thinkingLevelMap:{off:"off",minimal:null,low:null,medium:null,high:"high",xhigh:null,max:null},input:["text"],cost:{input:.3,output:.75,cacheRead:.06,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,supportsUsageInStreaming:!0,maxTokensField:"max_tokens",supportsStrictMode:!0,supportsLongCacheRetention:!1,thinkingFormat:"baseten",chatTemplateArgs:{enable_thinking:{$var:"thinking.enabled"}}},contextWindow:202800,maxTokens:202800},"openai/gpt-oss-120b":{id:"openai/gpt-oss-120b",name:"OpenAI GPT 120B",api:"openai-completions",provider:"baseten",baseUrl:"https://inference.baseten.co/v1",reasoning:!0,thinkingLevelMap:{off:"none",minimal:"minimal",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},input:["text"],cost:{input:.1,output:.5,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!0,supportsUsageInStreaming:!0,maxTokensField:"max_tokens",supportsStrictMode:!0,supportsLongCacheRetention:!1,thinkingFormat:"openai"},contextWindow:128072,maxTokens:128072},"thinkingmachines/inkling":{id:"thinkingmachines/inkling",name:"Inkling",api:"openai-completions",provider:"baseten",baseUrl:"https://inference.baseten.co/v1",reasoning:!0,thinkingLevelMap:{off:"none",minimal:"minimal",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},input:["text","image"],cost:{input:1,output:4.05,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!0,supportsUsageInStreaming:!0,maxTokensField:"max_tokens",supportsStrictMode:!0,supportsLongCacheRetention:!1,thinkingFormat:"openai"},contextWindow:1048576,maxTokens:32768},"thinkingmachines/inkling-small":{id:"thinkingmachines/inkling-small",name:"Inkling Small",api:"openai-completions",provider:"baseten",baseUrl:"https://inference.baseten.co/v1",reasoning:!0,thinkingLevelMap:{off:"none",minimal:"minimal",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},input:["text","image"],cost:{input:.5,output:1.2,cacheRead:.1,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!0,supportsUsageInStreaming:!0,maxTokensField:"max_tokens",supportsStrictMode:!0,supportsLongCacheRetention:!1,thinkingFormat:"openai"},contextWindow:1048576,maxTokens:32768},"zai-org/GLM-4.7":{id:"zai-org/GLM-4.7",name:"GLM 4.7",api:"openai-completions",provider:"baseten",baseUrl:"https://inference.baseten.co/v1",reasoning:!0,thinkingLevelMap:{off:"off",minimal:null,low:null,medium:null,high:"high",xhigh:null,max:null},input:["text"],cost:{input:.6,output:2.2,cacheRead:.12,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,supportsUsageInStreaming:!0,maxTokensField:"max_tokens",supportsStrictMode:!0,supportsLongCacheRetention:!1,thinkingFormat:"baseten",chatTemplateArgs:{enable_thinking:{$var:"thinking.enabled"}}},contextWindow:2e5,maxTokens:2e5},"zai-org/GLM-5":{id:"zai-org/GLM-5",name:"GLM 5",api:"openai-completions",provider:"baseten",baseUrl:"https://inference.baseten.co/v1",reasoning:!0,thinkingLevelMap:{off:"off",minimal:null,low:null,medium:null,high:"high",xhigh:null,max:null},input:["text"],cost:{input:.95,output:3.15,cacheRead:.2,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,supportsUsageInStreaming:!0,maxTokensField:"max_tokens",supportsStrictMode:!0,supportsLongCacheRetention:!1,thinkingFormat:"baseten",chatTemplateArgs:{enable_thinking:{$var:"thinking.enabled"}}},contextWindow:202800,maxTokens:202800},"zai-org/GLM-5.1":{id:"zai-org/GLM-5.1",name:"GLM 5.1",api:"openai-completions",provider:"baseten",baseUrl:"https://inference.baseten.co/v1",reasoning:!0,thinkingLevelMap:{off:"off",minimal:null,low:null,medium:null,high:"high",xhigh:null,max:null},input:["text"],cost:{input:1.3,output:4.3,cacheRead:.26,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,supportsUsageInStreaming:!0,maxTokensField:"max_tokens",supportsStrictMode:!0,supportsLongCacheRetention:!1,thinkingFormat:"baseten",chatTemplateArgs:{enable_thinking:{$var:"thinking.enabled"}}},contextWindow:202800,maxTokens:202800},"zai-org/GLM-5.2":{id:"zai-org/GLM-5.2",name:"GLM 5.2",api:"openai-completions",provider:"baseten",baseUrl:"https://inference.baseten.co/v1",reasoning:!0,thinkingLevelMap:{off:"none",minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"},input:["text"],cost:{input:1.4,output:4.4,cacheRead:.3,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!0,supportsUsageInStreaming:!0,maxTokensField:"max_tokens",supportsStrictMode:!0,supportsLongCacheRetention:!1,thinkingFormat:"baseten",chatTemplateArgs:{enable_thinking:{$var:"thinking.enabled"}}},contextWindow:1048576,maxTokens:262144},"zai-org/GLM-5.2-Fast":{id:"zai-org/GLM-5.2-Fast",name:"GLM 5.2 Fast",api:"openai-completions",provider:"baseten",baseUrl:"https://inference.baseten.co/v1",reasoning:!0,thinkingLevelMap:{off:"none",minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"},input:["text"],cost:{input:2.1,output:6.6,cacheRead:.21,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!0,supportsUsageInStreaming:!0,maxTokensField:"max_tokens",supportsStrictMode:!0,supportsLongCacheRetention:!1,thinkingFormat:"baseten",chatTemplateArgs:{enable_thinking:{$var:"thinking.enabled"}}},contextWindow:1048576,maxTokens:262144}}};var XR=J("baseten",YR);var ZR={"openai-completions":{"gemma-4-31b":{id:"gemma-4-31b",name:"Gemma 4 31B IT",api:"openai-completions",provider:"cerebras",baseUrl:"https://api.cerebras.ai/v1",reasoning:!0,input:["text","image"],cost:{input:.99,output:1.49,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:40960,compat:{supportsStore:!1,supportsDeveloperRole:!1},thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"gpt-oss-120b":{id:"gpt-oss-120b",name:"GPT OSS 120B",api:"openai-completions",provider:"cerebras",baseUrl:"https://api.cerebras.ai/v1",reasoning:!0,input:["text"],cost:{input:.35,output:.75,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:40960,compat:{supportsStore:!1,supportsDeveloperRole:!1},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"zai-glm-4.7":{id:"zai-glm-4.7",name:"Z.AI GLM-4.7",api:"openai-completions",provider:"cerebras",baseUrl:"https://api.cerebras.ai/v1",reasoning:!0,input:["text"],cost:{input:2.25,output:2.75,cacheRead:2.25,cacheWrite:0},contextWindow:131072,maxTokens:40960,compat:{supportsStore:!1,supportsDeveloperRole:!1},thinkingLevelMap:{off:"none",minimal:null,low:null,medium:null,high:null,xhigh:null,max:null}}}};var e1=J("cerebras",ZR);var t1={"anthropic-messages":{"claude-3-5-haiku":{id:"claude-3-5-haiku",name:"Claude Haiku 3.5 (latest)",api:"anthropic-messages",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",reasoning:!1,input:["text","image"],cost:{input:.8,output:4,cacheRead:.08,cacheWrite:1},contextWindow:2e5,maxTokens:8192,compat:{sendSessionAffinityHeaders:!0}},"claude-3-haiku":{id:"claude-3-haiku",name:"Claude Haiku 3",api:"anthropic-messages",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",reasoning:!1,input:["text","image"],cost:{input:.25,output:1.25,cacheRead:.03,cacheWrite:.3},contextWindow:2e5,maxTokens:4096,compat:{sendSessionAffinityHeaders:!0}},"claude-3-opus":{id:"claude-3-opus",name:"Claude Opus 3",api:"anthropic-messages",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",reasoning:!1,input:["text","image"],cost:{input:15,output:75,cacheRead:1.5,cacheWrite:18.75},contextWindow:2e5,maxTokens:4096,compat:{sendSessionAffinityHeaders:!0}},"claude-3-sonnet":{id:"claude-3-sonnet",name:"Claude Sonnet 3",api:"anthropic-messages",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",reasoning:!1,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:.3},contextWindow:2e5,maxTokens:4096,compat:{sendSessionAffinityHeaders:!0}},"claude-3.5-haiku":{id:"claude-3.5-haiku",name:"Claude Haiku 3.5 (latest)",api:"anthropic-messages",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",reasoning:!1,input:["text","image"],cost:{input:.8,output:4,cacheRead:.08,cacheWrite:1},contextWindow:2e5,maxTokens:8192,compat:{sendSessionAffinityHeaders:!0}},"claude-3.5-sonnet":{id:"claude-3.5-sonnet",name:"Claude Sonnet 3.5 v2",api:"anthropic-messages",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",reasoning:!1,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:2e5,maxTokens:8192,compat:{sendSessionAffinityHeaders:!0}},"claude-fable-5":{id:"claude-fable-5",name:"Claude Fable 5",api:"anthropic-messages",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",reasoning:!0,input:["text","image"],cost:{input:10,output:50,cacheRead:1,cacheWrite:12.5},contextWindow:1e6,maxTokens:128e3,compat:{sendSessionAffinityHeaders:!0,forceAdaptiveThinking:!0},thinkingLevelMap:{off:null,xhigh:"xhigh",max:"max"}},"claude-haiku-4-5":{id:"claude-haiku-4-5",name:"Claude Haiku 4.5 (latest)",api:"anthropic-messages",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",reasoning:!0,input:["text","image"],cost:{input:1,output:5,cacheRead:.1,cacheWrite:1.25},contextWindow:2e5,maxTokens:64e3,compat:{sendSessionAffinityHeaders:!0}},"claude-opus-4":{id:"claude-opus-4",name:"Claude Opus 4 (latest)",api:"anthropic-messages",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",reasoning:!0,input:["text","image"],cost:{input:15,output:75,cacheRead:1.5,cacheWrite:18.75},contextWindow:2e5,maxTokens:32e3,compat:{sendSessionAffinityHeaders:!0}},"claude-opus-4-1":{id:"claude-opus-4-1",name:"Claude Opus 4.1 (latest)",api:"anthropic-messages",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",reasoning:!0,input:["text","image"],cost:{input:15,output:75,cacheRead:1.5,cacheWrite:18.75},contextWindow:2e5,maxTokens:32e3,compat:{sendSessionAffinityHeaders:!0}},"claude-opus-4-5":{id:"claude-opus-4-5",name:"Claude Opus 4.5 (latest)",api:"anthropic-messages",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:2e5,maxTokens:64e3,compat:{sendSessionAffinityHeaders:!0}},"claude-opus-4-6":{id:"claude-opus-4-6",name:"Claude Opus 4.6 (latest)",api:"anthropic-messages",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,compat:{sendSessionAffinityHeaders:!0,forceAdaptiveThinking:!0},thinkingLevelMap:{max:"max"}},"claude-opus-4-7":{id:"claude-opus-4-7",name:"Claude Opus 4.7",api:"anthropic-messages",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,compat:{sendSessionAffinityHeaders:!0,forceAdaptiveThinking:!0,supportsTemperature:!1},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"claude-opus-4-8":{id:"claude-opus-4-8",name:"Claude Opus 4.8",api:"anthropic-messages",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,compat:{sendSessionAffinityHeaders:!0,forceAdaptiveThinking:!0,supportsTemperature:!1},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"claude-opus-5":{id:"claude-opus-5",name:"Claude Opus 5",api:"anthropic-messages",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,compat:{sendSessionAffinityHeaders:!0,forceAdaptiveThinking:!0,supportsTemperature:!1},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"claude-sonnet-4":{id:"claude-sonnet-4",name:"Claude Sonnet 4 (latest)",api:"anthropic-messages",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:2e5,maxTokens:64e3,compat:{sendSessionAffinityHeaders:!0}},"claude-sonnet-4-5":{id:"claude-sonnet-4-5",name:"Claude Sonnet 4.5 (latest)",api:"anthropic-messages",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:2e5,maxTokens:64e3,compat:{sendSessionAffinityHeaders:!0}},"claude-sonnet-4-6":{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6",api:"anthropic-messages",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:1e6,maxTokens:64e3,compat:{sendSessionAffinityHeaders:!0,forceAdaptiveThinking:!0},thinkingLevelMap:{max:"max"}},"claude-sonnet-5":{id:"claude-sonnet-5",name:"Claude Sonnet 5",api:"anthropic-messages",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/anthropic",reasoning:!0,input:["text","image"],cost:{input:2,output:10,cacheRead:.2,cacheWrite:2.5},contextWindow:1e6,maxTokens:128e3,compat:{sendSessionAffinityHeaders:!0,forceAdaptiveThinking:!0},thinkingLevelMap:{xhigh:"xhigh",max:"max"}}},"openai-completions":{"workers-ai/@cf/moonshotai/kimi-k2.5":{id:"workers-ai/@cf/moonshotai/kimi-k2.5",name:"Kimi K2.5",api:"openai-completions",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/compat",reasoning:!0,input:["text","image"],cost:{input:.6,output:3,cacheRead:.1,cacheWrite:0},contextWindow:256e3,maxTokens:256e3,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1,sendSessionAffinityHeaders:!0}},"workers-ai/@cf/moonshotai/kimi-k2.6":{id:"workers-ai/@cf/moonshotai/kimi-k2.6",name:"Kimi K2.6",api:"openai-completions",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/compat",reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:.16,cacheWrite:0},contextWindow:256e3,maxTokens:256e3,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1,sendSessionAffinityHeaders:!0}},"workers-ai/@cf/nvidia/nemotron-3-120b-a12b":{id:"workers-ai/@cf/nvidia/nemotron-3-120b-a12b",name:"Nemotron 3 Super 120B",api:"openai-completions",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/compat",reasoning:!0,input:["text"],cost:{input:.5,output:1.5,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:256e3,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1,sendSessionAffinityHeaders:!0}},"workers-ai/@cf/zai-org/glm-4.7-flash":{id:"workers-ai/@cf/zai-org/glm-4.7-flash",name:"GLM-4.7-Flash",api:"openai-completions",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/compat",reasoning:!0,input:["text"],cost:{input:.06,output:.4,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:131072,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1,sendSessionAffinityHeaders:!0}},"workers-ai/@cf/zai-org/glm-5.2":{id:"workers-ai/@cf/zai-org/glm-5.2",name:"Glm 5.2",api:"openai-completions",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/compat",reasoning:!0,input:["text"],cost:{input:1.4,output:4.4,cacheRead:.26,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1,sendSessionAffinityHeaders:!0}}},"openai-responses":{"gpt-4":{id:"gpt-4",name:"GPT-4",api:"openai-responses",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/openai",reasoning:!1,input:["text"],cost:{input:30,output:60,cacheRead:0,cacheWrite:0},contextWindow:8192,maxTokens:8192},"gpt-4-turbo":{id:"gpt-4-turbo",name:"GPT-4 Turbo",api:"openai-responses",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/openai",reasoning:!1,input:["text","image"],cost:{input:10,output:30,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096},"gpt-4o":{id:"gpt-4o",name:"GPT-4o",api:"openai-responses",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/openai",reasoning:!1,input:["text","image"],cost:{input:2.5,output:10,cacheRead:1.25,cacheWrite:0},contextWindow:128e3,maxTokens:16384},"gpt-4o-mini":{id:"gpt-4o-mini",name:"GPT-4o mini",api:"openai-responses",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/openai",reasoning:!1,input:["text","image"],cost:{input:.15,output:.6,cacheRead:.08,cacheWrite:0},contextWindow:128e3,maxTokens:16384},"gpt-5.1":{id:"gpt-5.1",name:"GPT-5.1",api:"openai-responses",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/openai",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.13,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.1-codex":{id:"gpt-5.1-codex",name:"GPT-5.1 Codex",api:"openai-responses",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/openai",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.2":{id:"gpt-5.2",name:"GPT-5.2",api:"openai-responses",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/openai",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.2-codex":{id:"gpt-5.2-codex",name:"GPT-5.2 Codex",api:"openai-responses",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/openai",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.3-codex":{id:"gpt-5.3-codex",name:"GPT-5.3 Codex",api:"openai-responses",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/openai",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.4":{id:"gpt-5.4",name:"GPT-5.4",api:"openai-responses",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/openai",reasoning:!0,input:["text","image"],cost:{input:2.5,output:15,cacheRead:.25,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.5":{id:"gpt-5.5",name:"GPT-5.5",api:"openai-responses",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/openai",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.6-luna":{id:"gpt-5.6-luna",name:"GPT-5.6 Luna",api:"openai-responses",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/openai",reasoning:!0,input:["text","image"],cost:{input:.2,output:1.2,cacheRead:.02,cacheWrite:.25,tiers:[{inputTokensAbove:272e3,input:.4,output:1.8,cacheRead:.04,cacheWrite:.5}]},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.6-sol":{id:"gpt-5.6-sol",name:"GPT-5.6 Sol",api:"openai-responses",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/openai",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.6-terra":{id:"gpt-5.6-terra",name:"GPT-5.6 Terra",api:"openai-responses",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/openai",reasoning:!0,input:["text","image"],cost:{input:2,output:12,cacheRead:.2,cacheWrite:2.5,tiers:[{inputTokensAbove:272e3,input:4,output:18,cacheRead:.4,cacheWrite:5}]},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsOpenAIGrammarTools:!0}},o1:{id:"o1",name:"o1",api:"openai-responses",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/openai",reasoning:!0,input:["text","image"],cost:{input:15,output:60,cacheRead:7.5,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},o3:{id:"o3",name:"o3",api:"openai-responses",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/openai",reasoning:!0,input:["text","image"],cost:{input:2,output:8,cacheRead:.5,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"o3-mini":{id:"o3-mini",name:"o3-mini",api:"openai-responses",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/openai",reasoning:!0,input:["text"],cost:{input:1.1,output:4.4,cacheRead:.55,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"o3-pro":{id:"o3-pro",name:"o3-pro",api:"openai-responses",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/openai",reasoning:!0,input:["text","image"],cost:{input:20,output:80,cacheRead:0,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"o4-mini":{id:"o4-mini",name:"o4-mini",api:"openai-responses",provider:"cloudflare-ai-gateway",baseUrl:"https://gateway.ai.cloudflare.com/v1/{CLOUDFLARE_ACCOUNT_ID}/{CLOUDFLARE_GATEWAY_ID}/openai",reasoning:!0,input:["text","image"],cost:{input:1.1,output:4.4,cacheRead:.28,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}}}};var n1=J("cloudflare-ai-gateway",t1);var i1={"openai-completions":{"@cf/google/gemma-4-26b-a4b-it":{id:"@cf/google/gemma-4-26b-a4b-it",name:"Gemma 4 26B A4B IT",api:"openai-completions",provider:"cloudflare-workers-ai",baseUrl:"https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",reasoning:!0,input:["text","image"],cost:{input:.1,output:.3,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:16384,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsLongCacheRetention:!1,sendSessionAffinityHeaders:!0},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"@cf/ibm-granite/granite-4.0-h-micro":{id:"@cf/ibm-granite/granite-4.0-h-micro",name:"Granite 4.0 H Micro",api:"openai-completions",provider:"cloudflare-workers-ai",baseUrl:"https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",reasoning:!1,input:["text"],cost:{input:.017,output:.112,cacheRead:0,cacheWrite:0},contextWindow:131e3,maxTokens:131e3,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsLongCacheRetention:!1,sendSessionAffinityHeaders:!0}},"@cf/meta/llama-3.3-70b-instruct-fp8-fast":{id:"@cf/meta/llama-3.3-70b-instruct-fp8-fast",name:"Llama 3.3 70B Instruct fp8 Fast",api:"openai-completions",provider:"cloudflare-workers-ai",baseUrl:"https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",reasoning:!1,input:["text"],cost:{input:.293,output:2.253,cacheRead:0,cacheWrite:0},contextWindow:24e3,maxTokens:24e3,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsLongCacheRetention:!1,sendSessionAffinityHeaders:!0}},"@cf/meta/llama-4-scout-17b-16e-instruct":{id:"@cf/meta/llama-4-scout-17b-16e-instruct",name:"Llama 4 Scout 17B 16E Instruct",api:"openai-completions",provider:"cloudflare-workers-ai",baseUrl:"https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",reasoning:!1,input:["text","image"],cost:{input:.27,output:.85,cacheRead:0,cacheWrite:0},contextWindow:131e3,maxTokens:16384,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsLongCacheRetention:!1,sendSessionAffinityHeaders:!0}},"@cf/mistralai/mistral-small-3.1-24b-instruct":{id:"@cf/mistralai/mistral-small-3.1-24b-instruct",name:"Mistral Small 3.1 24B Instruct",api:"openai-completions",provider:"cloudflare-workers-ai",baseUrl:"https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",reasoning:!1,input:["text"],cost:{input:.351,output:.555,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:128e3,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsLongCacheRetention:!1,sendSessionAffinityHeaders:!0}},"@cf/moonshotai/kimi-k2.6":{id:"@cf/moonshotai/kimi-k2.6",name:"Kimi K2.6",api:"openai-completions",provider:"cloudflare-workers-ai",baseUrl:"https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:.16,cacheWrite:0},contextWindow:262144,maxTokens:256e3,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsLongCacheRetention:!1,sendSessionAffinityHeaders:!0},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"@cf/moonshotai/kimi-k2.7-code":{id:"@cf/moonshotai/kimi-k2.7-code",name:"Kimi K2.7 Code",api:"openai-completions",provider:"cloudflare-workers-ai",baseUrl:"https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:.19,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsLongCacheRetention:!1,sendSessionAffinityHeaders:!0},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"@cf/nvidia/nemotron-3-120b-a12b":{id:"@cf/nvidia/nemotron-3-120b-a12b",name:"Nemotron 3 Super 120B",api:"openai-completions",provider:"cloudflare-workers-ai",baseUrl:"https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",reasoning:!0,input:["text"],cost:{input:.5,output:1.5,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:256e3,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsLongCacheRetention:!1,sendSessionAffinityHeaders:!0},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"@cf/openai/gpt-oss-120b":{id:"@cf/openai/gpt-oss-120b",name:"GPT OSS 120B",api:"openai-completions",provider:"cloudflare-workers-ai",baseUrl:"https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",reasoning:!0,input:["text"],cost:{input:.35,output:.75,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsLongCacheRetention:!1,sendSessionAffinityHeaders:!0},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"@cf/openai/gpt-oss-20b":{id:"@cf/openai/gpt-oss-20b",name:"GPT OSS 20B",api:"openai-completions",provider:"cloudflare-workers-ai",baseUrl:"https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",reasoning:!0,input:["text"],cost:{input:.2,output:.3,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsLongCacheRetention:!1,sendSessionAffinityHeaders:!0}},"@cf/qwen/qwen3-30b-a3b-fp8":{id:"@cf/qwen/qwen3-30b-a3b-fp8",name:"Qwen3 30B A3b fp8",api:"openai-completions",provider:"cloudflare-workers-ai",baseUrl:"https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",reasoning:!0,input:["text"],cost:{input:.0509,output:.335,cacheRead:0,cacheWrite:0},contextWindow:32768,maxTokens:32768,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsLongCacheRetention:!1,sendSessionAffinityHeaders:!0}},"@cf/zai-org/glm-4.7-flash":{id:"@cf/zai-org/glm-4.7-flash",name:"GLM-4.7-Flash",api:"openai-completions",provider:"cloudflare-workers-ai",baseUrl:"https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",reasoning:!0,input:["text"],cost:{input:.0605,output:.4,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:131072,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsLongCacheRetention:!1,sendSessionAffinityHeaders:!0},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"@cf/zai-org/glm-5.2":{id:"@cf/zai-org/glm-5.2",name:"Glm 5.2",api:"openai-completions",provider:"cloudflare-workers-ai",baseUrl:"https://api.cloudflare.com/client/v4/accounts/{CLOUDFLARE_ACCOUNT_ID}/ai/v1",reasoning:!0,input:["text"],cost:{input:1.4,output:4.4,cacheRead:.26,cacheWrite:0},contextWindow:262144,maxTokens:256e3,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsLongCacheRetention:!1,sendSessionAffinityHeaders:!0},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}}}};var r1=J("cloudflare-workers-ai",i1);var o1={"openai-completions":{"deepseek-v4-flash":{id:"deepseek-v4-flash",name:"DeepSeek V4 Flash",api:"openai-completions",baseUrl:"https://api.deepseek.com",provider:"deepseek",reasoning:!0,input:["text"],cost:{input:.14,output:.28,cacheRead:.0028,cacheWrite:0},contextWindow:1e6,maxTokens:384e3,compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens",requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"deepseek"},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",max:"max"}},"deepseek-v4-pro":{id:"deepseek-v4-pro",name:"DeepSeek V4 Pro",api:"openai-completions",baseUrl:"https://api.deepseek.com",provider:"deepseek",reasoning:!0,input:["text"],cost:{input:.435,output:.87,cacheRead:.003625,cacheWrite:0},contextWindow:1e6,maxTokens:384e3,compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens",requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"deepseek"},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",max:"max"}}}};var s1=J("deepseek",o1);var a1={"anthropic-messages":{"accounts/fireworks/models/deepseek-v4-flash":{id:"accounts/fireworks/models/deepseek-v4-flash",name:"DeepSeek V4 Flash",provider:"fireworks",reasoning:!0,input:["text"],cost:{input:.14,output:.28,cacheRead:.028,cacheWrite:0},contextWindow:1e6,maxTokens:384e3,api:"anthropic-messages",baseUrl:"https://api.fireworks.ai/inference",compat:{sendSessionAffinityHeaders:!0,supportsEagerToolInputStreaming:!1,supportsCacheControlOnTools:!1,supportsLongCacheRetention:!1}},"accounts/fireworks/models/deepseek-v4-flash-0731":{id:"accounts/fireworks/models/deepseek-v4-flash-0731",name:"DeepSeek V4 Flash 0731",provider:"fireworks",reasoning:!0,input:["text"],cost:{input:.14,output:.28,cacheRead:.028,cacheWrite:0},contextWindow:1e6,maxTokens:384e3,api:"anthropic-messages",baseUrl:"https://api.fireworks.ai/inference",compat:{sendSessionAffinityHeaders:!0,supportsEagerToolInputStreaming:!1,supportsCacheControlOnTools:!1,supportsLongCacheRetention:!1}},"accounts/fireworks/models/deepseek-v4-pro":{id:"accounts/fireworks/models/deepseek-v4-pro",name:"DeepSeek V4 Pro",provider:"fireworks",reasoning:!0,input:["text"],cost:{input:1.74,output:3.48,cacheRead:.145,cacheWrite:0},contextWindow:1e6,maxTokens:384e3,api:"anthropic-messages",baseUrl:"https://api.fireworks.ai/inference",compat:{sendSessionAffinityHeaders:!0,supportsEagerToolInputStreaming:!1,supportsCacheControlOnTools:!1,supportsLongCacheRetention:!1}},"accounts/fireworks/models/gpt-oss-120b":{id:"accounts/fireworks/models/gpt-oss-120b",name:"GPT OSS 120B",provider:"fireworks",reasoning:!0,input:["text"],cost:{input:.15,output:.6,cacheRead:.015,cacheWrite:0},contextWindow:131072,maxTokens:32768,api:"anthropic-messages",baseUrl:"https://api.fireworks.ai/inference",compat:{sendSessionAffinityHeaders:!0,supportsEagerToolInputStreaming:!1,supportsCacheControlOnTools:!1,supportsLongCacheRetention:!1}},"accounts/fireworks/models/gpt-oss-20b":{id:"accounts/fireworks/models/gpt-oss-20b",name:"GPT OSS 20B",provider:"fireworks",reasoning:!0,input:["text"],cost:{input:.07,output:.3,cacheRead:.035,cacheWrite:0},contextWindow:131072,maxTokens:32768,api:"anthropic-messages",baseUrl:"https://api.fireworks.ai/inference",compat:{sendSessionAffinityHeaders:!0,supportsEagerToolInputStreaming:!1,supportsCacheControlOnTools:!1,supportsLongCacheRetention:!1}},"accounts/fireworks/models/kimi-k2p6":{id:"accounts/fireworks/models/kimi-k2p6",name:"Kimi K2.6",provider:"fireworks",reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:.16,cacheWrite:0},contextWindow:262e3,maxTokens:262e3,api:"anthropic-messages",baseUrl:"https://api.fireworks.ai/inference",compat:{sendSessionAffinityHeaders:!0,supportsEagerToolInputStreaming:!1,supportsCacheControlOnTools:!1,supportsLongCacheRetention:!1}},"accounts/fireworks/models/kimi-k2p7-code":{id:"accounts/fireworks/models/kimi-k2p7-code",name:"Kimi K2.7 Code",provider:"fireworks",reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:.19,cacheWrite:0},contextWindow:262e3,maxTokens:262e3,api:"anthropic-messages",baseUrl:"https://api.fireworks.ai/inference",compat:{sendSessionAffinityHeaders:!0,supportsEagerToolInputStreaming:!1,supportsCacheControlOnTools:!1,supportsLongCacheRetention:!1}},"accounts/fireworks/models/minimax-m2p7":{id:"accounts/fireworks/models/minimax-m2p7",name:"MiniMax-M2.7",provider:"fireworks",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:0},contextWindow:196608,maxTokens:196608,api:"anthropic-messages",baseUrl:"https://api.fireworks.ai/inference",compat:{sendSessionAffinityHeaders:!0,supportsEagerToolInputStreaming:!1,supportsCacheControlOnTools:!1,supportsLongCacheRetention:!1}},"accounts/fireworks/models/minimax-m3":{id:"accounts/fireworks/models/minimax-m3",name:"MiniMax-M3",provider:"fireworks",reasoning:!0,input:["text","image"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:0},contextWindow:512e3,maxTokens:512e3,api:"anthropic-messages",baseUrl:"https://api.fireworks.ai/inference",compat:{sendSessionAffinityHeaders:!0,supportsEagerToolInputStreaming:!1,supportsCacheControlOnTools:!1,supportsLongCacheRetention:!1}},"accounts/fireworks/models/qwen3p7-plus":{id:"accounts/fireworks/models/qwen3p7-plus",name:"Qwen 3.7 Plus",provider:"fireworks",reasoning:!0,input:["text","image"],cost:{input:.4,output:1.6,cacheRead:.08,cacheWrite:0},contextWindow:262144,maxTokens:65536,api:"anthropic-messages",baseUrl:"https://api.fireworks.ai/inference",compat:{sendSessionAffinityHeaders:!0,supportsEagerToolInputStreaming:!1,supportsCacheControlOnTools:!1,supportsLongCacheRetention:!1}},"accounts/fireworks/routers/kimi-k2p6-fast":{id:"accounts/fireworks/routers/kimi-k2p6-fast",name:"Kimi K2.6 Fast",provider:"fireworks",reasoning:!0,input:["text","image"],cost:{input:2,output:8,cacheRead:.3,cacheWrite:0},contextWindow:262e3,maxTokens:262e3,api:"anthropic-messages",baseUrl:"https://api.fireworks.ai/inference",compat:{sendSessionAffinityHeaders:!0,supportsEagerToolInputStreaming:!1,supportsCacheControlOnTools:!1,supportsLongCacheRetention:!1}},"accounts/fireworks/routers/kimi-k2p6-turbo":{id:"accounts/fireworks/routers/kimi-k2p6-turbo",name:"Kimi K2.6 Turbo",provider:"fireworks",reasoning:!0,input:["text","image"],cost:{input:2,output:8,cacheRead:.3,cacheWrite:0},contextWindow:262e3,maxTokens:262e3,api:"anthropic-messages",baseUrl:"https://api.fireworks.ai/inference",compat:{sendSessionAffinityHeaders:!0,supportsEagerToolInputStreaming:!1,supportsCacheControlOnTools:!1,supportsLongCacheRetention:!1}},"accounts/fireworks/routers/kimi-k2p7-code-fast":{id:"accounts/fireworks/routers/kimi-k2p7-code-fast",name:"Kimi K2.7 Code Fast",provider:"fireworks",reasoning:!0,input:["text","image"],cost:{input:1.9,output:8,cacheRead:.38,cacheWrite:0},contextWindow:262e3,maxTokens:262e3,api:"anthropic-messages",baseUrl:"https://api.fireworks.ai/inference",compat:{sendSessionAffinityHeaders:!0,supportsEagerToolInputStreaming:!1,supportsCacheControlOnTools:!1,supportsLongCacheRetention:!1}}},"openai-completions":{"accounts/fireworks/models/glm-5p2":{id:"accounts/fireworks/models/glm-5p2",name:"GLM 5.2",provider:"fireworks",reasoning:!0,input:["text"],cost:{input:1.4,output:4.4,cacheRead:.14,cacheWrite:0},contextWindow:1048575,maxTokens:131072,api:"openai-completions",baseUrl:"https://api.fireworks.ai/inference/v1",compat:{supportsStore:!1,supportsDeveloperRole:!1,sendSessionAffinityHeaders:!0,supportsLongCacheRetention:!1},thinkingLevelMap:{off:"none",minimal:null,low:"high",medium:"high",high:"high",xhigh:null,max:"max"}},"accounts/fireworks/models/kimi-k3":{id:"accounts/fireworks/models/kimi-k3",name:"Kimi K3",provider:"fireworks",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:0},contextWindow:1048576,maxTokens:131072,api:"openai-completions",baseUrl:"https://api.fireworks.ai/inference/v1",compat:{supportsStore:!1,supportsDeveloperRole:!1,sendSessionAffinityHeaders:!0,supportsLongCacheRetention:!1,requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"openai",deferredToolsMode:"kimi"},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:"max"}},"accounts/fireworks/routers/glm-5p2-fast":{id:"accounts/fireworks/routers/glm-5p2-fast",name:"GLM 5.2 Fast",provider:"fireworks",reasoning:!0,input:["text"],cost:{input:2.1,output:6.6,cacheRead:.21,cacheWrite:0},contextWindow:1048575,maxTokens:131072,api:"openai-completions",baseUrl:"https://api.fireworks.ai/inference/v1",compat:{supportsStore:!1,supportsDeveloperRole:!1,sendSessionAffinityHeaders:!0,supportsLongCacheRetention:!1},thinkingLevelMap:{off:"none",minimal:null,low:"high",medium:"high",high:"high",xhigh:null,max:"max"}},"accounts/fireworks/routers/kimi-k3-fast":{id:"accounts/fireworks/routers/kimi-k3-fast",name:"Kimi K3 Fast",provider:"fireworks",reasoning:!0,input:["text","image"],cost:{input:4.5,output:22.5,cacheRead:.45,cacheWrite:0},contextWindow:1048576,maxTokens:131072,api:"openai-completions",baseUrl:"https://api.fireworks.ai/inference/v1",compat:{supportsStore:!1,supportsDeveloperRole:!1,sendSessionAffinityHeaders:!0,supportsLongCacheRetention:!1,requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"openai",deferredToolsMode:"kimi"},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:"max"}}}};var l1=J("fireworks",a1);var c1={"anthropic-messages":{"claude-haiku-4.5":{id:"claude-haiku-4.5",name:"Claude Haiku 4.5 (latest)",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:1,output:5,cacheRead:.1,cacheWrite:1.25},contextWindow:2e5,maxTokens:64e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsEagerToolInputStreaming:!1}},"claude-opus-4.5":{id:"claude-opus-4.5",name:"Claude Opus 4.5 (latest)",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:2e5,maxTokens:32e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"}},"claude-opus-4.6":{id:"claude-opus-4.6",name:"Claude Opus 4.6",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:32e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{max:"max"},compat:{forceAdaptiveThinking:!0}},"claude-opus-4.7":{id:"claude-opus-4.7",name:"Claude Opus 4.7",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:32e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{xhigh:"xhigh",max:"max",minimal:"low"},compat:{forceAdaptiveThinking:!0,supportsTemperature:!1}},"claude-opus-4.8":{id:"claude-opus-4.8",name:"Claude Opus 4.8",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:64e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{xhigh:"xhigh",max:"max",minimal:"low"},compat:{forceAdaptiveThinking:!0,supportsTemperature:!1}},"claude-opus-5":{id:"claude-opus-5",name:"Claude Opus 5",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:64e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{xhigh:"xhigh",max:"max",minimal:"low"},compat:{forceAdaptiveThinking:!0,supportsTemperature:!1}},"claude-sonnet-4":{id:"claude-sonnet-4",name:"Claude Sonnet 4 (latest)",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:216e3,maxTokens:16e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsEagerToolInputStreaming:!1}},"claude-sonnet-4.5":{id:"claude-sonnet-4.5",name:"Claude Sonnet 4.5 (latest)",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:2e5,maxTokens:32e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsEagerToolInputStreaming:!1}},"claude-sonnet-4.6":{id:"claude-sonnet-4.6",name:"Claude Sonnet 4.6",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:1e6,maxTokens:32e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{max:"max",minimal:"low"},compat:{forceAdaptiveThinking:!0}},"claude-sonnet-5":{id:"claude-sonnet-5",name:"Claude Sonnet 5",api:"anthropic-messages",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:2,output:10,cacheRead:.2,cacheWrite:2.5},contextWindow:1e6,maxTokens:128e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{xhigh:"xhigh",max:"max"},compat:{forceAdaptiveThinking:!0}}},"openai-completions":{"claude-fable-5":{id:"claude-fable-5",name:"Claude Fable 5",api:"openai-completions",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:10,output:50,cacheRead:1,cacheWrite:12.5},contextWindow:1e6,maxTokens:128e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1},thinkingLevelMap:{off:null,xhigh:"xhigh",max:"max"}},"gemini-3.1-pro-preview":{id:"gemini-3.1-pro-preview",name:"Gemini 3.1 Pro Preview",api:"openai-completions",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:2,output:12,cacheRead:.2,cacheWrite:0,tiers:[{inputTokensAbove:2e5,input:4,output:18,cacheRead:.4,cacheWrite:0}]},contextWindow:1e6,maxTokens:64e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1}},"gemini-3.5-flash":{id:"gemini-3.5-flash",name:"Gemini 3.5 Flash",api:"openai-completions",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:1.5,output:9,cacheRead:.15,cacheWrite:0},contextWindow:2e5,maxTokens:64e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1}},"gemini-3.6-flash":{id:"gemini-3.6-flash",name:"Gemini 3.6 Flash",api:"openai-completions",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:1.5,output:7.5,cacheRead:.15,cacheWrite:0},contextWindow:1e6,maxTokens:64e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1}},"gpt-4.1":{id:"gpt-4.1",name:"GPT-4.1",api:"openai-completions",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!1,input:["text","image"],cost:{input:2,output:8,cacheRead:.5,cacheWrite:0},contextWindow:128e3,maxTokens:16384,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1}},"kimi-k2.7-code":{id:"kimi-k2.7-code",name:"Kimi K2.7 Code",api:"openai-completions",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:.19,cacheWrite:0},contextWindow:256e3,maxTokens:32e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1}},"kimi-k3":{id:"kimi-k3",name:"Kimi K3",api:"openai-completions",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:0},contextWindow:1048576,maxTokens:131072,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1}}},"openai-responses":{"gpt-5-mini":{id:"gpt-5-mini",name:"GPT-5 Mini",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:.25,output:2,cacheRead:.025,cacheWrite:0},contextWindow:264e3,maxTokens:64e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.2":{id:"gpt-5.2",name:"GPT-5.2",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",xhigh:"xhigh"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.2-codex":{id:"gpt-5.2-codex",name:"GPT-5.2 Codex",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",xhigh:"xhigh"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.3-codex":{id:"gpt-5.3-codex",name:"GPT-5.3 Codex",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:1e6,maxTokens:128e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.4":{id:"gpt-5.4",name:"GPT-5.4",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:2.5,output:15,cacheRead:.25,cacheWrite:0,tiers:[{inputTokensAbove:272e3,input:5,output:22.5,cacheRead:.5,cacheWrite:0}]},contextWindow:1e6,maxTokens:128e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.4-mini":{id:"gpt-5.4-mini",name:"GPT-5.4 mini",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:.75,output:4.5,cacheRead:.075,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.4-nano":{id:"gpt-5.4-nano",name:"GPT-5.4 nano",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:.2,output:1.25,cacheRead:.02,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",xhigh:"xhigh"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.5":{id:"gpt-5.5",name:"GPT-5.5",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:0,tiers:[{inputTokensAbove:272e3,input:10,output:45,cacheRead:1,cacheWrite:0}]},contextWindow:1e6,maxTokens:128e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.6-luna":{id:"gpt-5.6-luna",name:"GPT-5.6 Luna",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:.2,output:1.2,cacheRead:.02,cacheWrite:0,tiers:[{inputTokensAbove:2e5,input:.4,output:1.8,cacheRead:.04,cacheWrite:0}]},contextWindow:105e4,maxTokens:128e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.6-sol":{id:"gpt-5.6-sol",name:"GPT-5.6 Sol",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:6.25,tiers:[{inputTokensAbove:272e3,input:10,output:45,cacheRead:1,cacheWrite:12.5}]},contextWindow:105e4,maxTokens:128e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.6-terra":{id:"gpt-5.6-terra",name:"GPT-5.6 Terra",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:2,output:12,cacheRead:.2,cacheWrite:0,tiers:[{inputTokensAbove:272e3,input:4,output:18,cacheRead:.4,cacheWrite:0}]},contextWindow:105e4,maxTokens:128e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:"low",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsOpenAIGrammarTools:!0}},"grok-4.5":{id:"grok-4.5",name:"Grok 4.5",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text","image"],cost:{input:2,output:6,cacheRead:.5,cacheWrite:0,tiers:[{inputTokensAbove:2e5,input:4,output:12,cacheRead:1,cacheWrite:0}]},contextWindow:5e5,maxTokens:128e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"mai-code-1-flash-picker":{id:"mai-code-1-flash-picker",name:"MAI-Code-1-Flash",api:"openai-responses",provider:"github-copilot",baseUrl:"https://api.individual.githubcopilot.com",reasoning:!0,input:["text"],cost:{input:.75,output:4.5,cacheRead:.075,cacheWrite:0},contextWindow:256e3,maxTokens:128e3,headers:{"User-Agent":"GitHubCopilotChat/0.35.0","Editor-Version":"vscode/1.107.0","Editor-Plugin-Version":"copilot-chat/0.35.0","Copilot-Integration-Id":"vscode-chat"},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}}}};var u1=J("github-copilot",c1);var p1={"google-generative-ai":{"deep-research-max-preview-04-2026":{id:"deep-research-max-preview-04-2026",name:"Deep Research Max Preview (Apr-21-2026)",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:2,output:12,cacheRead:.2,cacheWrite:0},contextWindow:131072,maxTokens:65536},"deep-research-preview-04-2026":{id:"deep-research-preview-04-2026",name:"Deep Research Preview (Apr-21-2026)",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:2,output:12,cacheRead:.2,cacheWrite:0},contextWindow:131072,maxTokens:65536},"gemini-2.5-computer-use-preview-10-2025":{id:"gemini-2.5-computer-use-preview-10-2025",name:"Gemini 2.5 Computer Use Preview 10-2025",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:65536},"gemini-2.5-flash":{id:"gemini-2.5-flash",name:"Gemini 2.5 Flash",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:.3,output:2.5,cacheRead:.03,cacheWrite:0},contextWindow:1048576,maxTokens:65536},"gemini-2.5-flash-lite":{id:"gemini-2.5-flash-lite",name:"Gemini 2.5 Flash-Lite",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:.1,output:.4,cacheRead:.01,cacheWrite:0},contextWindow:1048576,maxTokens:65536},"gemini-2.5-pro":{id:"gemini-2.5-pro",name:"Gemini 2.5 Pro",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:0},contextWindow:1048576,maxTokens:65536},"gemini-3-flash-preview":{id:"gemini-3-flash-preview",name:"Gemini 3 Flash Preview",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:.5,output:3,cacheRead:.05,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null}},"gemini-3.1-flash-lite":{id:"gemini-3.1-flash-lite",name:"Gemini 3.1 Flash Lite",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:.25,output:1.5,cacheRead:.025,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null}},"gemini-3.1-flash-lite-image":{id:"gemini-3.1-flash-lite-image",name:"Nano Banana 2 Lite",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:.25,output:30,cacheRead:0,cacheWrite:0},contextWindow:65536,maxTokens:65536,thinkingLevelMap:{off:null}},"gemini-3.1-flash-lite-preview":{id:"gemini-3.1-flash-lite-preview",name:"Gemini 3.1 Flash Lite Preview",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:.25,output:1.5,cacheRead:.025,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null}},"gemini-3.1-flash-live-preview":{id:"gemini-3.1-flash-live-preview",name:"Gemini 3.1 Flash Live Preview",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:.75,output:4.5,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:65536,thinkingLevelMap:{off:null}},"gemini-3.1-pro-preview":{id:"gemini-3.1-pro-preview",name:"Gemini 3.1 Pro Preview",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:2,output:12,cacheRead:.2,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null,minimal:null,low:"LOW",medium:null,high:"HIGH"}},"gemini-3.1-pro-preview-customtools":{id:"gemini-3.1-pro-preview-customtools",name:"Gemini 3.1 Pro Preview Custom Tools",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:2,output:12,cacheRead:.2,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null,minimal:null,low:"LOW",medium:null,high:"HIGH"}},"gemini-3.5-flash":{id:"gemini-3.5-flash",name:"Gemini 3.5 Flash",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:1.5,output:9,cacheRead:.15,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null}},"gemini-3.5-flash-lite":{id:"gemini-3.5-flash-lite",name:"Gemini 3.5 Flash Lite",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:.3,output:2.5,cacheRead:.03,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null}},"gemini-3.6-flash":{id:"gemini-3.6-flash",name:"Gemini 3.6 Flash",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:1.5,output:7.5,cacheRead:.15,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null}},"gemini-flash-latest":{id:"gemini-flash-latest",name:"Gemini Flash Latest",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:1.5,output:9,cacheRead:.15,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null}},"gemini-flash-lite-latest":{id:"gemini-flash-lite-latest",name:"Gemini Flash-Lite Latest",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:.25,output:1.5,cacheRead:.025,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null}},"gemini-robotics-er-1.6-preview":{id:"gemini-robotics-er-1.6-preview",name:"Gemini Robotics-ER 1.6 Preview",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:1,output:5,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:65536},"gemma-4-26b-a4b-it":{id:"gemma-4-26b-a4b-it",name:"Gemma 4 26B A4B IT",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:32768,thinkingLevelMap:{off:null,minimal:"MINIMAL",low:null,medium:null,high:"HIGH"}},"gemma-4-31b-it":{id:"gemma-4-31b-it",name:"Gemma 4 31B IT",api:"google-generative-ai",provider:"google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:32768,thinkingLevelMap:{off:null,minimal:"MINIMAL",low:null,medium:null,high:"HIGH"}}}};var d1=J("google",p1);var m1={"google-vertex":{"gemini-2.5-flash":{id:"gemini-2.5-flash",name:"Gemini 2.5 Flash",api:"google-vertex",provider:"google-vertex",baseUrl:"https://{location}-aiplatform.googleapis.com",reasoning:!0,input:["text","image"],cost:{input:.3,output:2.5,cacheRead:.03,cacheWrite:0},contextWindow:1048576,maxTokens:65536},"gemini-2.5-flash-lite":{id:"gemini-2.5-flash-lite",name:"Gemini 2.5 Flash-Lite",api:"google-vertex",provider:"google-vertex",baseUrl:"https://{location}-aiplatform.googleapis.com",reasoning:!0,input:["text","image"],cost:{input:.1,output:.4,cacheRead:.01,cacheWrite:0},contextWindow:1048576,maxTokens:65536},"gemini-2.5-pro":{id:"gemini-2.5-pro",name:"Gemini 2.5 Pro",api:"google-vertex",provider:"google-vertex",baseUrl:"https://{location}-aiplatform.googleapis.com",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:0},contextWindow:1048576,maxTokens:65536},"gemini-3-flash-preview":{id:"gemini-3-flash-preview",name:"Gemini 3 Flash Preview",api:"google-vertex",provider:"google-vertex",baseUrl:"https://{location}-aiplatform.googleapis.com",reasoning:!0,input:["text","image"],cost:{input:.5,output:3,cacheRead:.05,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null}},"gemini-3.1-flash-lite":{id:"gemini-3.1-flash-lite",name:"Gemini 3.1 Flash Lite",api:"google-vertex",provider:"google-vertex",baseUrl:"https://{location}-aiplatform.googleapis.com",reasoning:!0,input:["text","image"],cost:{input:.25,output:1.5,cacheRead:.025,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null}},"gemini-3.1-pro-preview":{id:"gemini-3.1-pro-preview",name:"Gemini 3.1 Pro Preview",api:"google-vertex",provider:"google-vertex",baseUrl:"https://{location}-aiplatform.googleapis.com",reasoning:!0,input:["text","image"],cost:{input:2,output:12,cacheRead:.2,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null,minimal:null,low:"LOW",medium:null,high:"HIGH"}},"gemini-3.1-pro-preview-customtools":{id:"gemini-3.1-pro-preview-customtools",name:"Gemini 3.1 Pro Preview Custom Tools",api:"google-vertex",provider:"google-vertex",baseUrl:"https://{location}-aiplatform.googleapis.com",reasoning:!0,input:["text","image"],cost:{input:2,output:12,cacheRead:.2,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null,minimal:null,low:"LOW",medium:null,high:"HIGH"}},"gemini-3.5-flash":{id:"gemini-3.5-flash",name:"Gemini 3.5 Flash",api:"google-vertex",provider:"google-vertex",baseUrl:"https://{location}-aiplatform.googleapis.com",reasoning:!0,input:["text","image"],cost:{input:1.5,output:9,cacheRead:.15,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null}},"gemini-3.5-flash-lite":{id:"gemini-3.5-flash-lite",name:"Gemini 3.5 Flash Lite",api:"google-vertex",provider:"google-vertex",baseUrl:"https://{location}-aiplatform.googleapis.com",reasoning:!0,input:["text","image"],cost:{input:.3,output:2.5,cacheRead:.03,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null}},"gemini-3.6-flash":{id:"gemini-3.6-flash",name:"Gemini 3.6 Flash",api:"google-vertex",provider:"google-vertex",baseUrl:"https://{location}-aiplatform.googleapis.com",reasoning:!0,input:["text","image"],cost:{input:1.5,output:7.5,cacheRead:.15,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null}},"gemini-flash-latest":{id:"gemini-flash-latest",name:"Gemini Flash Latest",api:"google-vertex",provider:"google-vertex",baseUrl:"https://{location}-aiplatform.googleapis.com",reasoning:!0,input:["text","image"],cost:{input:1.5,output:9,cacheRead:.15,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null}},"gemini-flash-lite-latest":{id:"gemini-flash-lite-latest",name:"Gemini Flash-Lite Latest",api:"google-vertex",provider:"google-vertex",baseUrl:"https://{location}-aiplatform.googleapis.com",reasoning:!0,input:["text","image"],cost:{input:.25,output:1.5,cacheRead:.025,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null}}}};var h1=J("google-vertex",m1);var g1={"openai-completions":{"llama-3.1-8b-instant":{id:"llama-3.1-8b-instant",name:"Llama 3.1 8B",api:"openai-completions",provider:"groq",baseUrl:"https://api.groq.com/openai/v1",reasoning:!1,input:["text"],cost:{input:.05,output:.08,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:131072},"llama-3.3-70b-versatile":{id:"llama-3.3-70b-versatile",name:"Llama 3.3 70B",api:"openai-completions",provider:"groq",baseUrl:"https://api.groq.com/openai/v1",reasoning:!1,input:["text"],cost:{input:.59,output:.79,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:32768},"openai/gpt-oss-120b":{id:"openai/gpt-oss-120b",name:"GPT OSS 120B",api:"openai-completions",provider:"groq",baseUrl:"https://api.groq.com/openai/v1",reasoning:!0,input:["text"],cost:{input:.15,output:.6,cacheRead:.075,cacheWrite:0},contextWindow:131072,maxTokens:65536,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"openai/gpt-oss-20b":{id:"openai/gpt-oss-20b",name:"GPT OSS 20B",api:"openai-completions",provider:"groq",baseUrl:"https://api.groq.com/openai/v1",reasoning:!0,input:["text"],cost:{input:.075,output:.3,cacheRead:.0375,cacheWrite:0},contextWindow:131072,maxTokens:65536,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"openai/gpt-oss-safeguard-20b":{id:"openai/gpt-oss-safeguard-20b",name:"Safety GPT OSS 20B",api:"openai-completions",provider:"groq",baseUrl:"https://api.groq.com/openai/v1",reasoning:!0,input:["text"],cost:{input:.075,output:.3,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:65536,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"qwen/qwen3.6-27b":{id:"qwen/qwen3.6-27b",name:"Qwen3.6 27B",api:"openai-completions",provider:"groq",baseUrl:"https://api.groq.com/openai/v1",reasoning:!0,input:["text","image"],cost:{input:.6,output:3,cacheRead:.3,cacheWrite:0},contextWindow:131072,maxTokens:16384,thinkingLevelMap:{off:"none",minimal:null,low:null,medium:null,high:"default",xhigh:null,max:null}}}};var f1=J("groq",g1);var b1={"openai-completions":{"MiniMaxAI/MiniMax-M2":{id:"MiniMaxAI/MiniMax-M2",name:"MiniMax-M2",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:204800,maxTokens:128e3},"MiniMaxAI/MiniMax-M2.1":{id:"MiniMaxAI/MiniMax-M2.1",name:"MiniMax-M2.1",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:204800,maxTokens:131072},"MiniMaxAI/MiniMax-M2.5":{id:"MiniMaxAI/MiniMax-M2.5",name:"MiniMax-M2.5",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:.03,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:204800,maxTokens:131072},"MiniMaxAI/MiniMax-M2.7":{id:"MiniMaxAI/MiniMax-M2.7",name:"MiniMax-M2.7",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:204800,maxTokens:131072},"MiniMaxAI/MiniMax-M3":{id:"MiniMaxAI/MiniMax-M3",name:"MiniMax-M3",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text","image"],cost:{input:.3,output:1.2,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:524288,maxTokens:128e3},"Qwen/Qwen3-235B-A22B":{id:"Qwen/Qwen3-235B-A22B",name:"Qwen3 235B-A22B",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.2,output:.8,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:40960,maxTokens:16384},"Qwen/Qwen3-235B-A22B-Instruct-2507":{id:"Qwen/Qwen3-235B-A22B-Instruct-2507",name:"Qwen3 235B-A22B Instruct 2507",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!1,input:["text"],cost:{input:.855,output:2.565,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:16384},"Qwen/Qwen3-235B-A22B-Thinking-2507":{id:"Qwen/Qwen3-235B-A22B-Thinking-2507",name:"Qwen3-235B-A22B-Thinking-2507",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.3,output:3,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:131072},"Qwen/Qwen3-32B":{id:"Qwen/Qwen3-32B",name:"Qwen3 32B",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.29,output:.59,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:131072,maxTokens:16384},"Qwen/Qwen3-Coder-30B-A3B-Instruct":{id:"Qwen/Qwen3-Coder-30B-A3B-Instruct",name:"Qwen3-Coder 30B-A3B Instruct",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!1,input:["text"],cost:{input:.07,output:.26,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:65536},"Qwen/Qwen3-Coder-480B-A35B-Instruct":{id:"Qwen/Qwen3-Coder-480B-A35B-Instruct",name:"Qwen3-Coder-480B-A35B-Instruct",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!1,input:["text"],cost:{input:2,output:2,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:66536},"Qwen/Qwen3-Coder-Next":{id:"Qwen/Qwen3-Coder-Next",name:"Qwen3-Coder-Next",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!1,input:["text"],cost:{input:.2,output:1.5,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:65536},"Qwen/Qwen3-Next-80B-A3B-Instruct":{id:"Qwen/Qwen3-Next-80B-A3B-Instruct",name:"Qwen3-Next-80B-A3B-Instruct",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!1,input:["text"],cost:{input:.25,output:1,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:66536},"Qwen/Qwen3-Next-80B-A3B-Thinking":{id:"Qwen/Qwen3-Next-80B-A3B-Thinking",name:"Qwen3-Next-80B-A3B-Thinking",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!1,input:["text"],cost:{input:.3,output:2,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:131072},"Qwen/Qwen3.5-122B-A10B":{id:"Qwen/Qwen3.5-122B-A10B",name:"Qwen3.5 122B-A10B",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text","image"],cost:{input:.4,output:3.2,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:65536},"Qwen/Qwen3.5-27B":{id:"Qwen/Qwen3.5-27B",name:"Qwen3.5 27B",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text","image"],cost:{input:.3,output:2.4,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:65536},"Qwen/Qwen3.5-35B-A3B":{id:"Qwen/Qwen3.5-35B-A3B",name:"Qwen3.5 35B-A3B",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text","image"],cost:{input:.25,output:2,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:65536},"Qwen/Qwen3.5-397B-A17B":{id:"Qwen/Qwen3.5-397B-A17B",name:"Qwen3.5-397B-A17B",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text","image"],cost:{input:.6,output:3.6,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:32768,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"Qwen/Qwen3.5-9B":{id:"Qwen/Qwen3.5-9B",name:"Qwen3.5 9B",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text","image"],cost:{input:.17,output:.25,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:65536},"Qwen/Qwen3.6-27B":{id:"Qwen/Qwen3.6-27B",name:"Qwen3.6 27B",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text","image"],cost:{input:.47,output:3.19,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:65536},"Qwen/Qwen3.6-35B-A3B":{id:"Qwen/Qwen3.6-35B-A3B",name:"Qwen3.6 35B-A3B",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text","image"],cost:{input:.15,output:.95,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:65536},"XiaomiMiMo/MiMo-V2-Flash":{id:"XiaomiMiMo/MiMo-V2-Flash",name:"MiMo-V2-Flash",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.1,output:.3,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:4096},"XiaomiMiMo/MiMo-V2.5":{id:"XiaomiMiMo/MiMo-V2.5",name:"MiMo-V2.5",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.4,output:2,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:131072,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null}},"XiaomiMiMo/MiMo-V2.5-Pro":{id:"XiaomiMiMo/MiMo-V2.5-Pro",name:"MiMo-V2.5-Pro",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:1,output:3,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:1048576,maxTokens:131072,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null}},"deepseek-ai/DeepSeek-R1":{id:"deepseek-ai/DeepSeek-R1",name:"DeepSeek-R1",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.7,output:2.5,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:64e3,maxTokens:32768},"deepseek-ai/DeepSeek-R1-0528":{id:"deepseek-ai/DeepSeek-R1-0528",name:"DeepSeek-R1-0528",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:3,output:5,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:163840,maxTokens:163840},"deepseek-ai/DeepSeek-V3":{id:"deepseek-ai/DeepSeek-V3",name:"DeepSeek-V3",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!1,input:["text"],cost:{input:.4,output:1.3,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:64e3,maxTokens:8192},"deepseek-ai/DeepSeek-V3.1":{id:"deepseek-ai/DeepSeek-V3.1",name:"DeepSeek-V3.1",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.27,output:1,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:131072,maxTokens:8192},"deepseek-ai/DeepSeek-V3.2":{id:"deepseek-ai/DeepSeek-V3.2",name:"DeepSeek-V3.2",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.28,output:.4,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:163840,maxTokens:65536},"deepseek-ai/DeepSeek-V4-Flash":{id:"deepseek-ai/DeepSeek-V4-Flash",name:"DeepSeek V4 Flash",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.14,output:.28,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:1048576,maxTokens:384e3},"deepseek-ai/DeepSeek-V4-Flash-0731":{id:"deepseek-ai/DeepSeek-V4-Flash-0731",name:"DeepSeek V4 Flash 0731",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.14,output:.28,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:1048576,maxTokens:384e3,thinkingLevelMap:{off:null,minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"}},"deepseek-ai/DeepSeek-V4-Pro":{id:"deepseek-ai/DeepSeek-V4-Pro",name:"DeepSeek V4 Pro",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.435,output:.87,cacheRead:.003625,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:1048576,maxTokens:393216,thinkingLevelMap:{off:null,minimal:null,low:null,medium:null,high:"high",xhigh:null,max:null}},"google/gemma-4-26B-A4B-it":{id:"google/gemma-4-26B-A4B-it",name:"Gemma 4 26B A4B IT",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text","image"],cost:{input:.13,output:.4,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:32768},"google/gemma-4-31B-it":{id:"google/gemma-4-31B-it",name:"Gemma 4 31B IT",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text","image"],cost:{input:.14,output:.4,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:32768},"meta-llama/Llama-3.3-70B-Instruct":{id:"meta-llama/Llama-3.3-70B-Instruct",name:"Llama-3.3-70B-Instruct",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!1,input:["text"],cost:{input:.59,output:.79,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:131072,maxTokens:4096},"moonshotai/Kimi-K2-Instruct":{id:"moonshotai/Kimi-K2-Instruct",name:"Kimi-K2-Instruct",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!1,input:["text"],cost:{input:1,output:3,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:131072,maxTokens:16384},"moonshotai/Kimi-K2-Instruct-0905":{id:"moonshotai/Kimi-K2-Instruct-0905",name:"Kimi-K2-Instruct-0905",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!1,input:["text"],cost:{input:1,output:3,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:16384},"moonshotai/Kimi-K2-Thinking":{id:"moonshotai/Kimi-K2-Thinking",name:"Kimi-K2-Thinking",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.6,output:2.5,cacheRead:.15,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:262144},"moonshotai/Kimi-K2.5":{id:"moonshotai/Kimi-K2.5",name:"Kimi-K2.5",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text","image"],cost:{input:.6,output:3,cacheRead:.1,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:262144},"moonshotai/Kimi-K2.6":{id:"moonshotai/Kimi-K2.6",name:"Kimi-K2.6",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:.16,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:262144},"moonshotai/Kimi-K2.7-Code":{id:"moonshotai/Kimi-K2.7-Code",name:"Kimi K2.7 Code",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:262144},"moonshotai/Kimi-K3":{id:"moonshotai/Kimi-K3",name:"Kimi K3",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:1e6,maxTokens:131072,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:null,high:"high",xhigh:null,max:"max"}},"openai/gpt-oss-120b":{id:"openai/gpt-oss-120b",name:"GPT OSS 120B",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.25,output:.69,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:131072,maxTokens:32768,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"openai/gpt-oss-20b":{id:"openai/gpt-oss-20b",name:"GPT OSS 20B",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.1,output:.5,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:131072,maxTokens:32768,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"stepfun-ai/Step-3.5-Flash":{id:"stepfun-ai/Step-3.5-Flash",name:"Step 3.5 Flash",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.1,output:.3,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:256e3},"stepfun-ai/Step-3.7-Flash":{id:"stepfun-ai/Step-3.7-Flash",name:"Step 3.7 Flash",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text","image"],cost:{input:.2,output:1.15,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:256e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"tencent/Hy3":{id:"tencent/Hy3",name:"Hy3",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.14,output:.58,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:64e3,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:null,high:"high",xhigh:null,max:null}},"thinkingmachines/Inkling":{id:"thinkingmachines/Inkling",name:"Inkling",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text","image"],cost:{input:1,output:4.05,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:1048576,maxTokens:1048576,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"thinkingmachines/Inkling-Small":{id:"thinkingmachines/Inkling-Small",name:"Inkling Small",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text","image"],cost:{input:.5,output:1.2,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:524288,maxTokens:1048576},"zai-org/GLM-4.5":{id:"zai-org/GLM-4.5",name:"GLM-4.5",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.6,output:2.2,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:131072,maxTokens:98304},"zai-org/GLM-4.5-Air":{id:"zai-org/GLM-4.5-Air",name:"GLM-4.5-Air",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.13,output:.85,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:131072,maxTokens:98304},"zai-org/GLM-4.5V":{id:"zai-org/GLM-4.5V",name:"GLM-4.5V",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text","image"],cost:{input:.6,output:1.8,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:65536,maxTokens:16384},"zai-org/GLM-4.6":{id:"zai-org/GLM-4.6",name:"GLM-4.6",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.55,output:2.2,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:204800,maxTokens:131072},"zai-org/GLM-4.7":{id:"zai-org/GLM-4.7",name:"GLM-4.7",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:.6,output:2.2,cacheRead:.11,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:204800,maxTokens:131072},"zai-org/GLM-4.7-Flash":{id:"zai-org/GLM-4.7-Flash",name:"GLM-4.7-Flash",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:2e5,maxTokens:128e3},"zai-org/GLM-5":{id:"zai-org/GLM-5",name:"GLM-5",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:1,output:3.2,cacheRead:.2,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:202752,maxTokens:131072},"zai-org/GLM-5.1":{id:"zai-org/GLM-5.1",name:"GLM-5.1",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:1,output:3.2,cacheRead:.2,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:202752,maxTokens:131072},"zai-org/GLM-5.2":{id:"zai-org/GLM-5.2",name:"GLM-5.2",api:"openai-completions",provider:"huggingface",baseUrl:"https://router.huggingface.co/v1",reasoning:!0,input:["text"],cost:{input:1.4,output:4.4,cacheRead:0,cacheWrite:0},compat:{supportsDeveloperRole:!1},contextWindow:262144,maxTokens:131072}}};var x1=J("huggingface",b1);var v1={"anthropic-messages":{k3:{id:"k3",name:"Kimi K3",api:"anthropic-messages",provider:"kimi-coding",baseUrl:"https://api.kimi.com/coding",headers:{"User-Agent":"KimiCLI/1.5"},compat:{allowEmptySignature:!0,forceAdaptiveThinking:!0},reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:0},contextWindow:1048576,maxTokens:131072,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:null,high:"high",xhigh:null,max:"max"}},"k3-256k":{id:"k3-256k",name:"Kimi K3-256K",api:"anthropic-messages",provider:"kimi-coding",baseUrl:"https://api.kimi.com/coding",headers:{"User-Agent":"KimiCLI/1.5"},compat:{forceAdaptiveThinking:!0},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:131072,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:null,high:"high",xhigh:null,max:"max"}},"kimi-for-coding":{id:"kimi-for-coding",name:"Kimi K2.7 Code",api:"anthropic-messages",provider:"kimi-coding",baseUrl:"https://api.kimi.com/coding",headers:{"User-Agent":"KimiCLI/1.5"},compat:{allowEmptySignature:!0,forceAdaptiveThinking:!0},reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:.19,cacheWrite:0},contextWindow:262144,maxTokens:32768},"kimi-for-coding-highspeed":{id:"kimi-for-coding-highspeed",name:"Kimi For Coding HighSpeed",api:"anthropic-messages",provider:"kimi-coding",baseUrl:"https://api.kimi.com/coding",headers:{"User-Agent":"KimiCLI/1.5"},compat:{forceAdaptiveThinking:!0},reasoning:!0,input:["text","image"],cost:{input:1.9,output:8,cacheRead:.38,cacheWrite:0},contextWindow:262144,maxTokens:32768}}};var y1=J("kimi-coding",v1);var w1={"anthropic-messages":{"MiniMax-M2.7":{id:"MiniMax-M2.7",name:"MiniMax-M2.7",api:"anthropic-messages",provider:"minimax",baseUrl:"https://api.minimax.io/anthropic",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:.375},contextWindow:204800,maxTokens:131072},"MiniMax-M2.7-highspeed":{id:"MiniMax-M2.7-highspeed",name:"MiniMax-M2.7-highspeed",api:"anthropic-messages",provider:"minimax",baseUrl:"https://api.minimax.io/anthropic",reasoning:!0,input:["text"],cost:{input:.6,output:2.4,cacheRead:.06,cacheWrite:.375},contextWindow:204800,maxTokens:131072},"MiniMax-M3":{id:"MiniMax-M3",name:"MiniMax-M3",api:"anthropic-messages",provider:"minimax",baseUrl:"https://api.minimax.io/anthropic",reasoning:!0,input:["text","image"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:0},contextWindow:1e6,maxTokens:128e3}}};var S1=J("minimax",w1);var T1={"anthropic-messages":{"MiniMax-M2.7":{id:"MiniMax-M2.7",name:"MiniMax-M2.7",api:"anthropic-messages",provider:"minimax-cn",baseUrl:"https://api.minimaxi.com/anthropic",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:.375},contextWindow:204800,maxTokens:131072},"MiniMax-M2.7-highspeed":{id:"MiniMax-M2.7-highspeed",name:"MiniMax-M2.7-highspeed",api:"anthropic-messages",provider:"minimax-cn",baseUrl:"https://api.minimaxi.com/anthropic",reasoning:!0,input:["text"],cost:{input:.6,output:2.4,cacheRead:.06,cacheWrite:.375},contextWindow:204800,maxTokens:131072},"MiniMax-M3":{id:"MiniMax-M3",name:"MiniMax-M3",api:"anthropic-messages",provider:"minimax-cn",baseUrl:"https://api.minimaxi.com/anthropic",reasoning:!0,input:["text","image"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:0},contextWindow:1e6,maxTokens:128e3}}};var k1=J("minimax-cn",T1);var C1={"mistral-conversations":{"codestral-latest":{id:"codestral-latest",name:"Codestral (latest)",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text"],cost:{input:.3,output:.9,cacheRead:.03,cacheWrite:0},contextWindow:256e3,maxTokens:4096},"devstral-2512":{id:"devstral-2512",name:"Devstral 2",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text"],cost:{input:.4,output:2,cacheRead:.04,cacheWrite:0},contextWindow:262144,maxTokens:262144},"devstral-latest":{id:"devstral-latest",name:"Devstral 2",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text"],cost:{input:.4,output:2,cacheRead:.04,cacheWrite:0},contextWindow:262144,maxTokens:262144},"devstral-medium-2507":{id:"devstral-medium-2507",name:"Devstral Medium",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text"],cost:{input:.4,output:2,cacheRead:.04,cacheWrite:0},contextWindow:128e3,maxTokens:128e3},"devstral-medium-latest":{id:"devstral-medium-latest",name:"Devstral 2 (latest)",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text"],cost:{input:.4,output:2,cacheRead:.04,cacheWrite:0},contextWindow:262144,maxTokens:262144},"devstral-small-2505":{id:"devstral-small-2505",name:"Devstral Small 2505",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text"],cost:{input:.1,output:.3,cacheRead:.01,cacheWrite:0},contextWindow:128e3,maxTokens:128e3},"devstral-small-2507":{id:"devstral-small-2507",name:"Devstral Small",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text"],cost:{input:.1,output:.3,cacheRead:.01,cacheWrite:0},contextWindow:128e3,maxTokens:128e3},"labs-devstral-small-2512":{id:"labs-devstral-small-2512",name:"Devstral Small 2",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:256e3},"magistral-medium-latest":{id:"magistral-medium-latest",name:"Magistral Medium (latest)",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!0,input:["text"],cost:{input:2,output:5,cacheRead:.2,cacheWrite:0},contextWindow:128e3,maxTokens:16384},"magistral-small":{id:"magistral-small",name:"Magistral Small",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!0,input:["text"],cost:{input:.5,output:1.5,cacheRead:.05,cacheWrite:0},contextWindow:128e3,maxTokens:128e3},"ministral-3b-latest":{id:"ministral-3b-latest",name:"Ministral 3B (latest)",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text"],cost:{input:.04,output:.04,cacheRead:.004,cacheWrite:0},contextWindow:128e3,maxTokens:128e3},"ministral-8b-latest":{id:"ministral-8b-latest",name:"Ministral 8B (latest)",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text"],cost:{input:.1,output:.1,cacheRead:.01,cacheWrite:0},contextWindow:128e3,maxTokens:128e3},"mistral-large-2411":{id:"mistral-large-2411",name:"Mistral Large 2.1",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text"],cost:{input:2,output:6,cacheRead:.2,cacheWrite:0},contextWindow:131072,maxTokens:16384},"mistral-large-2512":{id:"mistral-large-2512",name:"Mistral Large 3",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text","image"],cost:{input:.5,output:1.5,cacheRead:.05,cacheWrite:0},contextWindow:262144,maxTokens:262144},"mistral-large-latest":{id:"mistral-large-latest",name:"Mistral Large (latest)",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text","image"],cost:{input:.5,output:1.5,cacheRead:.05,cacheWrite:0},contextWindow:262144,maxTokens:262144},"mistral-medium-2505":{id:"mistral-medium-2505",name:"Mistral Medium 3",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text","image"],cost:{input:.4,output:2,cacheRead:.04,cacheWrite:0},contextWindow:131072,maxTokens:131072},"mistral-medium-2508":{id:"mistral-medium-2508",name:"Mistral Medium 3.1",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text","image"],cost:{input:.4,output:2,cacheRead:.04,cacheWrite:0},contextWindow:262144,maxTokens:262144},"mistral-medium-2604":{id:"mistral-medium-2604",name:"Mistral Medium 3.5",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!0,input:["text","image"],cost:{input:1.5,output:7.5,cacheRead:.15,cacheWrite:0},contextWindow:262144,maxTokens:262144},"mistral-medium-3.5":{id:"mistral-medium-3.5",name:"Mistral Medium 3.5",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!0,input:["text","image"],cost:{input:1.5,output:7.5,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:262144},"mistral-medium-latest":{id:"mistral-medium-latest",name:"Mistral Medium (latest)",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!0,input:["text","image"],cost:{input:1.5,output:7.5,cacheRead:.15,cacheWrite:0},contextWindow:262144,maxTokens:262144},"mistral-nemo":{id:"mistral-nemo",name:"Mistral Nemo",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text"],cost:{input:.15,output:.15,cacheRead:.015,cacheWrite:0},contextWindow:128e3,maxTokens:128e3},"mistral-small-2506":{id:"mistral-small-2506",name:"Mistral Small 3.2",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text","image"],cost:{input:.1,output:.3,cacheRead:.01,cacheWrite:0},contextWindow:128e3,maxTokens:16384},"mistral-small-2603":{id:"mistral-small-2603",name:"Mistral Small 4",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!0,input:["text","image"],cost:{input:.15,output:.6,cacheRead:.015,cacheWrite:0},contextWindow:256e3,maxTokens:256e3},"mistral-small-latest":{id:"mistral-small-latest",name:"Mistral Small (latest)",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!0,input:["text","image"],cost:{input:.15,output:.6,cacheRead:.015,cacheWrite:0},contextWindow:256e3,maxTokens:256e3},"open-mistral-7b":{id:"open-mistral-7b",name:"Mistral 7B",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text"],cost:{input:.25,output:.25,cacheRead:.025,cacheWrite:0},contextWindow:8e3,maxTokens:8e3},"open-mistral-nemo":{id:"open-mistral-nemo",name:"Open Mistral Nemo",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text"],cost:{input:.15,output:.15,cacheRead:.015,cacheWrite:0},contextWindow:128e3,maxTokens:128e3},"open-mixtral-8x22b":{id:"open-mixtral-8x22b",name:"Mixtral 8x22B",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text"],cost:{input:2,output:6,cacheRead:.2,cacheWrite:0},contextWindow:64e3,maxTokens:64e3},"open-mixtral-8x7b":{id:"open-mixtral-8x7b",name:"Mixtral 8x7B",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text"],cost:{input:.7,output:.7,cacheRead:.07,cacheWrite:0},contextWindow:32e3,maxTokens:32e3},"pixtral-12b":{id:"pixtral-12b",name:"Pixtral 12B",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text","image"],cost:{input:.15,output:.15,cacheRead:.015,cacheWrite:0},contextWindow:128e3,maxTokens:128e3},"pixtral-large-latest":{id:"pixtral-large-latest",name:"Pixtral Large (latest)",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text","image"],cost:{input:2,output:6,cacheRead:.2,cacheWrite:0},contextWindow:128e3,maxTokens:128e3},"voxtral-small-latest":{id:"voxtral-small-latest",name:"Voxtral Small (latest)",api:"mistral-conversations",provider:"mistral",baseUrl:"https://api.mistral.ai",reasoning:!1,input:["text"],cost:{input:.1,output:.3,cacheRead:.01,cacheWrite:0},contextWindow:32e3,maxTokens:32e3}}};var R1=J("mistral",C1);var M1={"openai-completions":{"kimi-k2-0711-preview":{id:"kimi-k2-0711-preview",name:"Kimi K2 0711",api:"openai-completions",provider:"moonshotai",baseUrl:"https://api.moonshot.ai/v1",reasoning:!1,input:["text"],cost:{input:.6,output:2.5,cacheRead:.15,cacheWrite:0},contextWindow:131072,maxTokens:16384,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,thinkingFormat:"deepseek"}},"kimi-k2-0905-preview":{id:"kimi-k2-0905-preview",name:"Kimi K2 0905",api:"openai-completions",provider:"moonshotai",baseUrl:"https://api.moonshot.ai/v1",reasoning:!1,input:["text"],cost:{input:.6,output:2.5,cacheRead:.15,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,thinkingFormat:"deepseek"}},"kimi-k2-thinking":{id:"kimi-k2-thinking",name:"Kimi K2 Thinking",api:"openai-completions",provider:"moonshotai",baseUrl:"https://api.moonshot.ai/v1",reasoning:!0,input:["text"],cost:{input:.6,output:2.5,cacheRead:.15,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,thinkingFormat:"deepseek"}},"kimi-k2-thinking-turbo":{id:"kimi-k2-thinking-turbo",name:"Kimi K2 Thinking Turbo",api:"openai-completions",provider:"moonshotai",baseUrl:"https://api.moonshot.ai/v1",reasoning:!0,input:["text"],cost:{input:1.15,output:8,cacheRead:.15,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,thinkingFormat:"deepseek"}},"kimi-k2-turbo-preview":{id:"kimi-k2-turbo-preview",name:"Kimi K2 Turbo",api:"openai-completions",provider:"moonshotai",baseUrl:"https://api.moonshot.ai/v1",reasoning:!1,input:["text"],cost:{input:2.4,output:10,cacheRead:.6,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,thinkingFormat:"deepseek"}},"kimi-k2.5":{id:"kimi-k2.5",name:"Kimi K2.5",api:"openai-completions",provider:"moonshotai",baseUrl:"https://api.moonshot.ai/v1",reasoning:!0,input:["text","image"],cost:{input:.6,output:3,cacheRead:.1,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,thinkingFormat:"deepseek"}},"kimi-k2.6":{id:"kimi-k2.6",name:"Kimi K2.6",api:"openai-completions",provider:"moonshotai",baseUrl:"https://api.moonshot.ai/v1",reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:.16,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,thinkingFormat:"deepseek"}},"kimi-k2.7-code":{id:"kimi-k2.7-code",name:"Kimi K2.7 Code",api:"openai-completions",provider:"moonshotai",baseUrl:"https://api.moonshot.ai/v1",reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:.19,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,thinkingFormat:"deepseek"},thinkingLevelMap:{off:null}},"kimi-k2.7-code-highspeed":{id:"kimi-k2.7-code-highspeed",name:"Kimi K2.7 Code HighSpeed",api:"openai-completions",provider:"moonshotai",baseUrl:"https://api.moonshot.ai/v1",reasoning:!0,input:["text","image"],cost:{input:1.9,output:8,cacheRead:.38,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,thinkingFormat:"deepseek"},thinkingLevelMap:{off:null}},"kimi-k3":{id:"kimi-k3",name:"Kimi K3",api:"openai-completions",provider:"moonshotai",baseUrl:"https://api.moonshot.ai/v1",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:0},contextWindow:1048576,maxTokens:131072,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!0,maxTokensField:"max_tokens",supportsStrictMode:!1,thinkingFormat:"openai",requiresReasoningContentOnAssistantMessages:!0,deferredToolsMode:"kimi"},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:null,high:"high",xhigh:null,max:"max"}}}};var P1=J("moonshotai",M1);var I1={"openai-completions":{"kimi-k2-0711-preview":{id:"kimi-k2-0711-preview",name:"Kimi K2 0711",api:"openai-completions",provider:"moonshotai-cn",baseUrl:"https://api.moonshot.cn/v1",reasoning:!1,input:["text"],cost:{input:.6,output:2.5,cacheRead:.15,cacheWrite:0},contextWindow:131072,maxTokens:16384,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,thinkingFormat:"deepseek"}},"kimi-k2-0905-preview":{id:"kimi-k2-0905-preview",name:"Kimi K2 0905",api:"openai-completions",provider:"moonshotai-cn",baseUrl:"https://api.moonshot.cn/v1",reasoning:!1,input:["text"],cost:{input:.6,output:2.5,cacheRead:.15,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,thinkingFormat:"deepseek"}},"kimi-k2-thinking":{id:"kimi-k2-thinking",name:"Kimi K2 Thinking",api:"openai-completions",provider:"moonshotai-cn",baseUrl:"https://api.moonshot.cn/v1",reasoning:!0,input:["text"],cost:{input:.6,output:2.5,cacheRead:.15,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,thinkingFormat:"deepseek"}},"kimi-k2-thinking-turbo":{id:"kimi-k2-thinking-turbo",name:"Kimi K2 Thinking Turbo",api:"openai-completions",provider:"moonshotai-cn",baseUrl:"https://api.moonshot.cn/v1",reasoning:!0,input:["text"],cost:{input:1.15,output:8,cacheRead:.15,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,thinkingFormat:"deepseek"}},"kimi-k2-turbo-preview":{id:"kimi-k2-turbo-preview",name:"Kimi K2 Turbo",api:"openai-completions",provider:"moonshotai-cn",baseUrl:"https://api.moonshot.cn/v1",reasoning:!1,input:["text"],cost:{input:2.4,output:10,cacheRead:.6,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,thinkingFormat:"deepseek"}},"kimi-k2.5":{id:"kimi-k2.5",name:"Kimi K2.5",api:"openai-completions",provider:"moonshotai-cn",baseUrl:"https://api.moonshot.cn/v1",reasoning:!0,input:["text","image"],cost:{input:.6,output:3,cacheRead:.1,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,thinkingFormat:"deepseek"}},"kimi-k2.6":{id:"kimi-k2.6",name:"Kimi K2.6",api:"openai-completions",provider:"moonshotai-cn",baseUrl:"https://api.moonshot.cn/v1",reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:.16,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,thinkingFormat:"deepseek"}},"kimi-k2.7-code":{id:"kimi-k2.7-code",name:"Kimi K2.7 Code",api:"openai-completions",provider:"moonshotai-cn",baseUrl:"https://api.moonshot.cn/v1",reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:.19,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,thinkingFormat:"deepseek"},thinkingLevelMap:{off:null}},"kimi-k2.7-code-highspeed":{id:"kimi-k2.7-code-highspeed",name:"Kimi K2.7 Code HighSpeed",api:"openai-completions",provider:"moonshotai-cn",baseUrl:"https://api.moonshot.cn/v1",reasoning:!0,input:["text","image"],cost:{input:1.9,output:8,cacheRead:.38,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,thinkingFormat:"deepseek"},thinkingLevelMap:{off:null}},"kimi-k3":{id:"kimi-k3",name:"Kimi K3",api:"openai-completions",provider:"moonshotai-cn",baseUrl:"https://api.moonshot.cn/v1",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:0},contextWindow:1048576,maxTokens:131072,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!0,maxTokensField:"max_tokens",supportsStrictMode:!1,thinkingFormat:"openai",requiresReasoningContentOnAssistantMessages:!0,deferredToolsMode:"kimi"},thinkingLevelMap:{off:null,minimal:null,low:"low",medium:null,high:"high",xhigh:null,max:"max"}}}};var A1=J("moonshotai-cn",I1);var E1={"openai-completions":{"google/gemma-3-12b-it":{id:"google/gemma-3-12b-it",name:"Gemma 3 12B IT",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!1,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:131072,maxTokens:16384},"google/gemma-3-4b-it":{id:"google/gemma-3-4b-it",name:"Gemma 3 4B IT",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!1,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:131072,maxTokens:16384},"meta/llama-3.1-70b-instruct":{id:"meta/llama-3.1-70b-instruct",name:"Llama 3.1 70b Instruct",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!1,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:128e3,maxTokens:4096},"meta/llama-3.1-8b-instruct":{id:"meta/llama-3.1-8b-instruct",name:"Llama 3.1 8B Instruct",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!1,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:16e3,maxTokens:4096},"meta/llama-3.2-11b-vision-instruct":{id:"meta/llama-3.2-11b-vision-instruct",name:"Llama 3.2 11b Vision Instruct",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!1,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:128e3,maxTokens:4096},"meta/llama-3.2-90b-vision-instruct":{id:"meta/llama-3.2-90b-vision-instruct",name:"Llama-3.2-90B-Vision-Instruct",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!1,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:128e3,maxTokens:8192},"meta/llama-3.3-70b-instruct":{id:"meta/llama-3.3-70b-instruct",name:"Llama 3.3 70b Instruct",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!1,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:128e3,maxTokens:4096},"minimaxai/minimax-m3":{id:"minimaxai/minimax-m3",name:"MiniMax-M3",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:1e6,maxTokens:16384},"mistralai/mistral-7b-instruct-v0.3":{id:"mistralai/mistral-7b-instruct-v0.3",name:"Mistral-7B-Instruct-v0.3",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!1,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:65536,maxTokens:65536},"moonshotai/kimi-k2.6":{id:"moonshotai/kimi-k2.6",name:"Kimi K2.6",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:262144,maxTokens:262144},"nvidia/cosmos-reason2-8b":{id:"nvidia/cosmos-reason2-8b",name:"Cosmos Reason2 8B",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:131072,maxTokens:16384},"nvidia/llama-3.1-nemotron-70b-instruct":{id:"nvidia/llama-3.1-nemotron-70b-instruct",name:"Llama 3.1 Nemotron 70B Instruct",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!1,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:128e3,maxTokens:8192},"nvidia/llama-3.1-nemotron-nano-8b-v1":{id:"nvidia/llama-3.1-nemotron-nano-8b-v1",name:"Llama 3.1 Nemotron Nano 8B v1",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:131072,maxTokens:16384},"nvidia/llama-3.1-nemotron-nano-vl-8b-v1":{id:"nvidia/llama-3.1-nemotron-nano-vl-8b-v1",name:"Llama 3.1 Nemotron Nano VL 8B v1",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:32768,maxTokens:16384},"nvidia/llama-3.1-nemotron-ultra-253b-v1":{id:"nvidia/llama-3.1-nemotron-ultra-253b-v1",name:"Llama 3.1 Nemotron Ultra 253B",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:128e3,maxTokens:16384},"nvidia/llama-3.3-nemotron-super-49b-v1":{id:"nvidia/llama-3.3-nemotron-super-49b-v1",name:"Llama 3.3 Nemotron Super 49B v1",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:131072,maxTokens:65536},"nvidia/llama-3.3-nemotron-super-49b-v1.5":{id:"nvidia/llama-3.3-nemotron-super-49b-v1.5",name:"Llama 3.3 Nemotron Super 49B v1.5",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:131072,maxTokens:65536},"nvidia/nemotron-3-nano-30b-a3b":{id:"nvidia/nemotron-3-nano-30b-a3b",name:"nemotron-3-nano-30b-a3b",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:131072,maxTokens:131072},"nvidia/nemotron-3-nano-omni-30b-a3b-reasoning":{id:"nvidia/nemotron-3-nano-omni-30b-a3b-reasoning",name:"Nemotron 3 Nano Omni",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:256e3,maxTokens:65536},"nvidia/nemotron-3-super-120b-a12b":{id:"nvidia/nemotron-3-super-120b-a12b",name:"Nemotron 3 Super",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!0,input:["text"],cost:{input:.2,output:.8,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:262144,maxTokens:262144},"nvidia/nemotron-3-ultra-550b-a55b":{id:"nvidia/nemotron-3-ultra-550b-a55b",name:"Nemotron 3 Ultra 550B A55B",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!0,input:["text"],cost:{input:.5,output:2.5,cacheRead:.15,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:1e6,maxTokens:65536},"nvidia/nemotron-nano-12b-v2-vl":{id:"nvidia/nemotron-nano-12b-v2-vl",name:"Nemotron Nano 12B v2 VL",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:128e3,maxTokens:128e3},"nvidia/nvidia-nemotron-nano-9b-v2":{id:"nvidia/nvidia-nemotron-nano-9b-v2",name:"nvidia-nemotron-nano-9b-v2",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:131072,maxTokens:131072},"openai/gpt-oss-120b":{id:"openai/gpt-oss-120b",name:"GPT-OSS-120B",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:128e3,maxTokens:8192},"openai/gpt-oss-20b":{id:"openai/gpt-oss-20b",name:"GPT OSS 20B",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:131072,maxTokens:32768},"poolside/laguna-xs-2.1":{id:"poolside/laguna-xs-2.1",name:"Laguna XS 2.1",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:262144,maxTokens:16384},"stepfun-ai/step-3.7-flash":{id:"stepfun-ai/step-3.7-flash",name:"Step 3.7 Flash",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:256e3,maxTokens:16384},"thinkingmachines/inkling":{id:"thinkingmachines/inkling",name:"Inkling",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:1048576,maxTokens:16384},"z-ai/glm-5.2":{id:"z-ai/glm-5.2",name:"GLM-5.2",api:"openai-completions",provider:"nvidia",baseUrl:"https://integrate.api.nvidia.com/v1",headers:{"NVCF-POLL-SECONDS":"3600"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:1e6,maxTokens:131072}}};var _1=J("nvidia",E1);var O1={"openai-responses":{"gpt-4":{id:"gpt-4",name:"GPT-4",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text"],cost:{input:30,output:60,cacheRead:0,cacheWrite:0},contextWindow:8192,maxTokens:8192,compat:{supportsStrictMode:!0}},"gpt-4-turbo":{id:"gpt-4-turbo",name:"GPT-4 Turbo",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text","image"],cost:{input:10,output:30,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096,compat:{supportsStrictMode:!0}},"gpt-4.1":{id:"gpt-4.1",name:"GPT-4.1",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text","image"],cost:{input:2,output:8,cacheRead:.5,cacheWrite:0},contextWindow:1047576,maxTokens:32768,compat:{supportsStrictMode:!0}},"gpt-4.1-mini":{id:"gpt-4.1-mini",name:"GPT-4.1 mini",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text","image"],cost:{input:.4,output:1.6,cacheRead:.1,cacheWrite:0},contextWindow:1047576,maxTokens:32768,compat:{supportsStrictMode:!0}},"gpt-4.1-nano":{id:"gpt-4.1-nano",name:"GPT-4.1 nano",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text","image"],cost:{input:.1,output:.4,cacheRead:.025,cacheWrite:0},contextWindow:1047576,maxTokens:32768,compat:{supportsStrictMode:!0}},"gpt-4o":{id:"gpt-4o",name:"GPT-4o",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text","image"],cost:{input:2.5,output:10,cacheRead:1.25,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{supportsStrictMode:!0}},"gpt-4o-2024-05-13":{id:"gpt-4o-2024-05-13",name:"GPT-4o (2024-05-13)",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text","image"],cost:{input:5,output:15,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096,compat:{supportsStrictMode:!0}},"gpt-4o-2024-08-06":{id:"gpt-4o-2024-08-06",name:"GPT-4o (2024-08-06)",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text","image"],cost:{input:2.5,output:10,cacheRead:1.25,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{supportsStrictMode:!0}},"gpt-4o-2024-11-20":{id:"gpt-4o-2024-11-20",name:"GPT-4o (2024-11-20)",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text","image"],cost:{input:2.5,output:10,cacheRead:1.25,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{supportsStrictMode:!0}},"gpt-4o-mini":{id:"gpt-4o-mini",name:"GPT-4o mini",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text","image"],cost:{input:.15,output:.6,cacheRead:.075,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{supportsStrictMode:!0}},"gpt-5":{id:"gpt-5",name:"GPT-5",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:"minimal",low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0}},"gpt-5-chat-latest":{id:"gpt-5-chat-latest",name:"GPT-5 Chat Latest",api:"openai-responses",baseUrl:"https://api.openai.com/v1",provider:"openai",reasoning:!1,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:0},contextWindow:128e3,maxTokens:16384,thinkingLevelMap:{off:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0}},"gpt-5-mini":{id:"gpt-5-mini",name:"GPT-5 Mini",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:.25,output:2,cacheRead:.025,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:"minimal",low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0}},"gpt-5-nano":{id:"gpt-5-nano",name:"GPT-5 Nano",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:.05,output:.4,cacheRead:.005,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:"minimal",low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0}},"gpt-5-pro":{id:"gpt-5-pro",name:"GPT-5 Pro",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:15,output:120,cacheRead:0,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:null,medium:null,high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0}},"gpt-5.1":{id:"gpt-5.1",name:"GPT-5.1",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0}},"gpt-5.2":{id:"gpt-5.2",name:"GPT-5.2",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0}},"gpt-5.2-chat-latest":{id:"gpt-5.2-chat-latest",name:"GPT-5.2 Chat",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:128e3,maxTokens:16384,thinkingLevelMap:{off:null,minimal:null,low:null,medium:"medium",high:null,xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0}},"gpt-5.2-pro":{id:"gpt-5.2-pro",name:"GPT-5.2 Pro",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:21,output:168,cacheRead:0,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:null,medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0}},"gpt-5.3-chat-latest":{id:"gpt-5.3-chat-latest",name:"GPT-5.3 Chat (latest)",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!1,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:128e3,maxTokens:16384,thinkingLevelMap:{off:null,xhigh:"xhigh"},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0}},"gpt-5.3-codex":{id:"gpt-5.3-codex",name:"GPT-5.3 Codex",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0}},"gpt-5.3-codex-spark":{id:"gpt-5.3-codex-spark",name:"GPT-5.3 Codex Spark",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:128e3,maxTokens:32e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0}},"gpt-5.4":{id:"gpt-5.4",name:"GPT-5.4",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:2.5,output:15,cacheRead:.25,cacheWrite:0,tiers:[{inputTokensAbove:272e3,input:5,output:22.5,cacheRead:.5,cacheWrite:0}]},contextWindow:272e3,maxTokens:128e3,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0}},"gpt-5.4-mini":{id:"gpt-5.4-mini",name:"GPT-5.4 mini",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:.75,output:4.5,cacheRead:.075,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0}},"gpt-5.4-nano":{id:"gpt-5.4-nano",name:"GPT-5.4 nano",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:.2,output:1.25,cacheRead:.02,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0}},"gpt-5.4-pro":{id:"gpt-5.4-pro",name:"GPT-5.4 Pro",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:30,output:180,cacheRead:0,cacheWrite:0,tiers:[{inputTokensAbove:272e3,input:60,output:270,cacheRead:0,cacheWrite:0}]},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:null,medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0}},"gpt-5.5":{id:"gpt-5.5",name:"GPT-5.5",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:0,tiers:[{inputTokensAbove:272e3,input:10,output:45,cacheRead:1,cacheWrite:0}]},contextWindow:272e3,maxTokens:128e3,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0}},"gpt-5.5-pro":{id:"gpt-5.5-pro",name:"GPT-5.5 Pro",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:30,output:180,cacheRead:0,cacheWrite:0,tiers:[{inputTokensAbove:272e3,input:60,output:270,cacheRead:0,cacheWrite:0}]},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:null,medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0}},"gpt-5.6-luna":{id:"gpt-5.6-luna",name:"GPT-5.6 Luna",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:.2,output:1.2,cacheRead:.02,cacheWrite:.25,tiers:[{inputTokensAbove:272e3,input:.4,output:1.8,cacheRead:.04,cacheWrite:.5}]},contextWindow:272e3,maxTokens:128e3,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0,supportsExplicitPromptCacheMode:!0}},"gpt-5.6-sol":{id:"gpt-5.6-sol",name:"GPT-5.6 Sol",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:6.25,tiers:[{inputTokensAbove:272e3,input:10,output:45,cacheRead:1,cacheWrite:12.5}]},contextWindow:272e3,maxTokens:128e3,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0,supportsExplicitPromptCacheMode:!0}},"gpt-5.6-terra":{id:"gpt-5.6-terra",name:"GPT-5.6 Terra",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:2,output:12,cacheRead:.2,cacheWrite:2.5,tiers:[{inputTokensAbove:272e3,input:4,output:18,cacheRead:.4,cacheWrite:5}]},contextWindow:272e3,maxTokens:128e3,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"},compat:{supportsStrictMode:!0,supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0,supportsExplicitPromptCacheMode:!0}},"gpt-realtime-2.1":{id:"gpt-realtime-2.1",name:"GPT-Realtime-2.1",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:4,output:24,cacheRead:.4,cacheWrite:0},contextWindow:128e3,maxTokens:32e3,thinkingLevelMap:{off:null,minimal:"minimal",low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null},compat:{supportsStrictMode:!0}},o1:{id:"o1",name:"o1",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:15,output:60,cacheRead:7.5,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0}},"o1-pro":{id:"o1-pro",name:"o1-pro",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:150,output:600,cacheRead:0,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0}},o3:{id:"o3",name:"o3",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:2,output:8,cacheRead:.5,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0}},"o3-mini":{id:"o3-mini",name:"o3-mini",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text"],cost:{input:1.1,output:4.4,cacheRead:.55,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0}},"o3-pro":{id:"o3-pro",name:"o3-pro",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:20,output:80,cacheRead:0,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0}},"o4-mini":{id:"o4-mini",name:"o4-mini",api:"openai-responses",provider:"openai",baseUrl:"https://api.openai.com/v1",reasoning:!0,input:["text","image"],cost:{input:1.1,output:4.4,cacheRead:.275,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},compat:{supportsStrictMode:!0}}}};var L1=J("openai",O1);var W1={"openai-codex-responses":{"gpt-5.3-codex-spark":{id:"gpt-5.3-codex-spark",name:"GPT-5.3 Codex Spark",api:"openai-codex-responses",provider:"openai-codex",baseUrl:"https://chatgpt.com/backend-api",reasoning:!0,input:["text"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:128e3,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",minimal:"low"},compat:{supportsOpenAIGrammarTools:!0}},"gpt-5.4":{id:"gpt-5.4",name:"GPT-5.4",api:"openai-codex-responses",provider:"openai-codex",baseUrl:"https://chatgpt.com/backend-api",reasoning:!0,input:["text","image"],cost:{input:2.5,output:15,cacheRead:.25,cacheWrite:0,tiers:[{inputTokensAbove:272e3,input:5,output:22.5,cacheRead:.5,cacheWrite:0}]},contextWindow:272e3,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",minimal:"low"},compat:{supportsOpenAIGrammarTools:!0,supportsToolSearch:!0}},"gpt-5.4-mini":{id:"gpt-5.4-mini",name:"GPT-5.4 mini",api:"openai-codex-responses",provider:"openai-codex",baseUrl:"https://chatgpt.com/backend-api",reasoning:!0,input:["text","image"],cost:{input:.75,output:4.5,cacheRead:.075,cacheWrite:0},contextWindow:272e3,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",minimal:"low"},compat:{supportsOpenAIGrammarTools:!0,supportsToolSearch:!0}},"gpt-5.5":{id:"gpt-5.5",name:"GPT-5.5",api:"openai-codex-responses",provider:"openai-codex",baseUrl:"https://chatgpt.com/backend-api",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:0,tiers:[{inputTokensAbove:272e3,input:10,output:45,cacheRead:1,cacheWrite:0}]},contextWindow:272e3,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",minimal:"low"},compat:{supportsOpenAIGrammarTools:!0,supportsToolSearch:!0}},"gpt-5.6-luna":{id:"gpt-5.6-luna",name:"GPT-5.6 Luna",api:"openai-codex-responses",provider:"openai-codex",baseUrl:"https://chatgpt.com/backend-api",reasoning:!0,input:["text","image"],cost:{input:.2,output:1.2,cacheRead:.02,cacheWrite:.25,tiers:[{inputTokensAbove:272e3,input:.4,output:1.8,cacheRead:.04,cacheWrite:.5}]},contextWindow:272e3,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max",minimal:"low"},compat:{supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0}},"gpt-5.6-sol":{id:"gpt-5.6-sol",name:"GPT-5.6 Sol",api:"openai-codex-responses",provider:"openai-codex",baseUrl:"https://chatgpt.com/backend-api",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:6.25,tiers:[{inputTokensAbove:272e3,input:10,output:45,cacheRead:1,cacheWrite:12.5}]},contextWindow:272e3,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max",minimal:"low"},compat:{supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0}},"gpt-5.6-terra":{id:"gpt-5.6-terra",name:"GPT-5.6 Terra",api:"openai-codex-responses",provider:"openai-codex",baseUrl:"https://chatgpt.com/backend-api",reasoning:!0,input:["text","image"],cost:{input:2,output:12,cacheRead:.2,cacheWrite:2.5,tiers:[{inputTokensAbove:272e3,input:4,output:18,cacheRead:.4,cacheWrite:5}]},contextWindow:272e3,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max",minimal:"low"},compat:{supportsOpenAIGrammarTools:!0,supportsAdditionalTools:!0,supportsToolSearch:!0}}}};var F1=J("openai-codex",W1);var D1={"anthropic-messages":{"claude-fable-5":{id:"claude-fable-5",name:"Claude Fable 5",api:"anthropic-messages",provider:"opencode",baseUrl:"https://opencode.ai/zen",reasoning:!0,input:["text","image"],cost:{input:10,output:50,cacheRead:1,cacheWrite:12.5},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{off:null,xhigh:"xhigh",max:"max"},compat:{forceAdaptiveThinking:!0}},"claude-haiku-4-5":{id:"claude-haiku-4-5",name:"Claude Haiku 4.5",api:"anthropic-messages",provider:"opencode",baseUrl:"https://opencode.ai/zen",reasoning:!0,input:["text","image"],cost:{input:1,output:5,cacheRead:.1,cacheWrite:1.25},contextWindow:2e5,maxTokens:64e3},"claude-opus-4-5":{id:"claude-opus-4-5",name:"Claude Opus 4.5",api:"anthropic-messages",provider:"opencode",baseUrl:"https://opencode.ai/zen",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:2e5,maxTokens:64e3},"claude-opus-4-6":{id:"claude-opus-4-6",name:"Claude Opus 4.6",api:"anthropic-messages",provider:"opencode",baseUrl:"https://opencode.ai/zen",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{max:"max"},compat:{forceAdaptiveThinking:!0}},"claude-opus-4-7":{id:"claude-opus-4-7",name:"Claude Opus 4.7",api:"anthropic-messages",provider:"opencode",baseUrl:"https://opencode.ai/zen",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"},compat:{forceAdaptiveThinking:!0,supportsTemperature:!1}},"claude-opus-4-8":{id:"claude-opus-4-8",name:"Claude Opus 4.8",api:"anthropic-messages",provider:"opencode",baseUrl:"https://opencode.ai/zen",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"},compat:{forceAdaptiveThinking:!0,supportsTemperature:!1}},"claude-opus-5":{id:"claude-opus-5",name:"Claude Opus 5",api:"anthropic-messages",provider:"opencode",baseUrl:"https://opencode.ai/zen",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"},compat:{forceAdaptiveThinking:!0,supportsTemperature:!1}},"claude-sonnet-4":{id:"claude-sonnet-4",name:"Claude Sonnet 4",api:"anthropic-messages",provider:"opencode",baseUrl:"https://opencode.ai/zen",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:2e5,maxTokens:64e3},"claude-sonnet-4-5":{id:"claude-sonnet-4-5",name:"Claude Sonnet 4.5",api:"anthropic-messages",provider:"opencode",baseUrl:"https://opencode.ai/zen",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:2e5,maxTokens:64e3},"claude-sonnet-4-6":{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6",api:"anthropic-messages",provider:"opencode",baseUrl:"https://opencode.ai/zen",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:1e6,maxTokens:64e3,thinkingLevelMap:{max:"max"},compat:{forceAdaptiveThinking:!0}},"claude-sonnet-5":{id:"claude-sonnet-5",name:"Claude Sonnet 5",api:"anthropic-messages",provider:"opencode",baseUrl:"https://opencode.ai/zen",reasoning:!0,input:["text","image"],cost:{input:2,output:10,cacheRead:.2,cacheWrite:2.5},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"},compat:{forceAdaptiveThinking:!0}},"qwen3.5-plus":{id:"qwen3.5-plus",name:"Qwen3.5 Plus",api:"anthropic-messages",provider:"opencode",baseUrl:"https://opencode.ai/zen",reasoning:!0,input:["text","image"],cost:{input:.2,output:1.2,cacheRead:.02,cacheWrite:.25},contextWindow:262144,maxTokens:65536},"qwen3.6-plus":{id:"qwen3.6-plus",name:"Qwen3.6 Plus",api:"anthropic-messages",provider:"opencode",baseUrl:"https://opencode.ai/zen",reasoning:!0,input:["text","image"],cost:{input:.5,output:3,cacheRead:.05,cacheWrite:.625},contextWindow:262144,maxTokens:65536}},"google-generative-ai":{"gemini-3-flash":{id:"gemini-3-flash",name:"Gemini 3 Flash",api:"google-generative-ai",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:.5,output:3,cacheRead:.05,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null}},"gemini-3.1-pro":{id:"gemini-3.1-pro",name:"Gemini 3.1 Pro Preview",api:"google-generative-ai",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:2,output:12,cacheRead:.2,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null,minimal:null,low:"LOW",medium:null,high:"HIGH"}},"gemini-3.5-flash":{id:"gemini-3.5-flash",name:"Gemini 3.5 Flash",api:"google-generative-ai",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:1.5,output:9,cacheRead:.15,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null}},"gemini-3.5-flash-lite":{id:"gemini-3.5-flash-lite",name:"Gemini 3.5 Flash Lite",api:"google-generative-ai",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:.3,output:2.5,cacheRead:.03,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null}},"gemini-3.6-flash":{id:"gemini-3.6-flash",name:"Gemini 3.6 Flash",api:"google-generative-ai",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:1.5,output:7.5,cacheRead:.15,cacheWrite:0},contextWindow:1048576,maxTokens:65536,thinkingLevelMap:{off:null}}},"openai-completions":{"big-pickle":{id:"big-pickle",name:"Big Pickle",api:"openai-completions",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:2e5,maxTokens:32e3},"deepseek-v4-flash":{id:"deepseek-v4-flash",name:"DeepSeek V4 Flash",api:"openai-completions",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text"],cost:{input:.14,output:.28,cacheRead:.028,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens",supportsLongCacheRetention:!1,requiresReasoningContentOnAssistantMessages:!0},contextWindow:1e6,maxTokens:384e3,thinkingLevelMap:{off:null,minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"}},"deepseek-v4-flash-free":{id:"deepseek-v4-flash-free",name:"DeepSeek V4 Flash Free",api:"openai-completions",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens",requiresReasoningContentOnAssistantMessages:!0},contextWindow:2e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"}},"deepseek-v4-pro":{id:"deepseek-v4-pro",name:"DeepSeek V4 Pro",api:"openai-completions",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text"],cost:{input:1.74,output:3.84,cacheRead:.145,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens",supportsLongCacheRetention:!1,requiresReasoningContentOnAssistantMessages:!0},contextWindow:1e6,maxTokens:384e3,thinkingLevelMap:{off:null,minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"}},"glm-5":{id:"glm-5",name:"GLM-5",api:"openai-completions",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text"],cost:{input:1,output:3.2,cacheRead:.2,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:204800,maxTokens:131072},"glm-5.1":{id:"glm-5.1",name:"GLM-5.1",api:"openai-completions",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text"],cost:{input:1.4,output:4.4,cacheRead:.26,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:204800,maxTokens:131072},"glm-5.2":{id:"glm-5.2",name:"GLM-5.2",api:"openai-completions",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text"],cost:{input:1.4,output:4.4,cacheRead:.26,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:1e6,maxTokens:131072,thinkingLevelMap:{off:null,minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"}},"kimi-k2.5":{id:"kimi-k2.5",name:"Kimi K2.5",api:"openai-completions",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:.6,output:3,cacheRead:.08,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens",supportsLongCacheRetention:!1},contextWindow:262144,maxTokens:65536},"kimi-k2.6":{id:"kimi-k2.6",name:"Kimi K2.6",api:"openai-completions",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:.16,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,thinkingFormat:"deepseek",supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsLongCacheRetention:!1},contextWindow:262144,maxTokens:65536},"kimi-k2.7-code":{id:"kimi-k2.7-code",name:"Kimi K2.7 Code",api:"openai-completions",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:.19,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:262144,maxTokens:262144},"kimi-k3":{id:"kimi-k3",name:"Kimi K3",api:"openai-completions",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:1048576,maxTokens:131072,thinkingLevelMap:{off:null,minimal:null,low:null,medium:null,high:null,xhigh:null,max:"max"}},"laguna-s-2.1-free":{id:"laguna-s-2.1-free",name:"Laguna S 2.1 Free",api:"openai-completions",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:256e3,maxTokens:32e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"ling-3.0-tiny-free":{id:"ling-3.0-tiny-free",name:"Ling-3.0-tiny Free",api:"openai-completions",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:262144,maxTokens:32768},"longcat-2.0-free":{id:"longcat-2.0-free",name:"LongCat-2.0 Free",api:"openai-completions",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:1e6,maxTokens:131072},"mimo-v2.5-free":{id:"mimo-v2.5-free",name:"MiMo V2.5 Free",api:"openai-completions",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:2e5,maxTokens:32e3},"minimax-m2.5":{id:"minimax-m2.5",name:"MiniMax-M2.5",api:"openai-completions",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:204800,maxTokens:131072},"minimax-m2.7":{id:"minimax-m2.7",name:"MiniMax-M2.7",api:"openai-completions",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens",supportsLongCacheRetention:!1},contextWindow:204800,maxTokens:131072},"minimax-m3":{id:"minimax-m3",name:"MiniMax-M3",api:"openai-completions",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:512e3,maxTokens:128e3},"nemotron-3-ultra-free":{id:"nemotron-3-ultra-free",name:"Nemotron 3 Ultra Free",api:"openai-completions",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:1e6,maxTokens:128e3}},"openai-responses":{"gpt-5":{id:"gpt-5",name:"GPT-5",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:1.07,output:8.5,cacheRead:.107,cacheWrite:0},compat:{sessionAffinityFormat:"openai-nosession",supportsOpenAIGrammarTools:!0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:"minimal",low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"gpt-5-codex":{id:"gpt-5-codex",name:"GPT-5 Codex",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:1.07,output:8.5,cacheRead:.107,cacheWrite:0},compat:{sessionAffinityFormat:"openai-nosession",supportsOpenAIGrammarTools:!0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"gpt-5-nano":{id:"gpt-5-nano",name:"GPT-5 Nano",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:.05,output:.4,cacheRead:.005,cacheWrite:0},compat:{sessionAffinityFormat:"openai-nosession",supportsOpenAIGrammarTools:!0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:"minimal",low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"gpt-5.1":{id:"gpt-5.1",name:"GPT-5.1",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:1.07,output:8.5,cacheRead:.107,cacheWrite:0},compat:{sessionAffinityFormat:"openai-nosession",supportsOpenAIGrammarTools:!0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"gpt-5.1-codex":{id:"gpt-5.1-codex",name:"GPT-5.1 Codex",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:1.07,output:8.5,cacheRead:.107,cacheWrite:0},compat:{sessionAffinityFormat:"openai-nosession",supportsOpenAIGrammarTools:!0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"gpt-5.1-codex-max":{id:"gpt-5.1-codex-max",name:"GPT-5.1 Codex Max",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:0},compat:{sessionAffinityFormat:"openai-nosession",supportsOpenAIGrammarTools:!0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null}},"gpt-5.1-codex-mini":{id:"gpt-5.1-codex-mini",name:"GPT-5.1 Codex Mini",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:.25,output:2,cacheRead:.025,cacheWrite:0},compat:{sessionAffinityFormat:"openai-nosession",supportsOpenAIGrammarTools:!0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"gpt-5.2":{id:"gpt-5.2",name:"GPT-5.2",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},compat:{sessionAffinityFormat:"openai-nosession",supportsOpenAIGrammarTools:!0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null}},"gpt-5.2-codex":{id:"gpt-5.2-codex",name:"GPT-5.2 Codex",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},compat:{sessionAffinityFormat:"openai-nosession",supportsOpenAIGrammarTools:!0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null}},"gpt-5.3-codex":{id:"gpt-5.3-codex",name:"GPT-5.3 Codex",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},compat:{sessionAffinityFormat:"openai-nosession",supportsOpenAIGrammarTools:!0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null}},"gpt-5.4":{id:"gpt-5.4",name:"GPT-5.4",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:2.5,output:15,cacheRead:.25,cacheWrite:0},compat:{sessionAffinityFormat:"openai-nosession",supportsOpenAIGrammarTools:!0},contextWindow:272e3,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null}},"gpt-5.4-mini":{id:"gpt-5.4-mini",name:"GPT-5.4 Mini",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:.75,output:4.5,cacheRead:.075,cacheWrite:0},compat:{sessionAffinityFormat:"openai-nosession",supportsOpenAIGrammarTools:!0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null}},"gpt-5.4-nano":{id:"gpt-5.4-nano",name:"GPT-5.4 Nano",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:.2,output:1.25,cacheRead:.02,cacheWrite:0},compat:{sessionAffinityFormat:"openai-nosession",supportsOpenAIGrammarTools:!0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null}},"gpt-5.4-pro":{id:"gpt-5.4-pro",name:"GPT-5.4 Pro",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:30,output:180,cacheRead:30,cacheWrite:0},compat:{sessionAffinityFormat:"openai-nosession",supportsOpenAIGrammarTools:!0},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:null,medium:"medium",high:"high",xhigh:"xhigh",max:null}},"gpt-5.5":{id:"gpt-5.5",name:"GPT-5.5",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:0},compat:{sessionAffinityFormat:"openai-nosession",supportsOpenAIGrammarTools:!0},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:null}},"gpt-5.5-pro":{id:"gpt-5.5-pro",name:"GPT-5.5 Pro",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:30,output:180,cacheRead:30,cacheWrite:0},compat:{sessionAffinityFormat:"openai-nosession",supportsOpenAIGrammarTools:!0},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:null,medium:"medium",high:"high",xhigh:"xhigh",max:null}},"gpt-5.6-luna":{id:"gpt-5.6-luna",name:"GPT-5.6 Luna",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:.2,output:1.2,cacheRead:.02,cacheWrite:.25},compat:{sessionAffinityFormat:"openai-nosession",supportsOpenAIGrammarTools:!0},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"}},"gpt-5.6-sol":{id:"gpt-5.6-sol",name:"GPT-5.6 Sol",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:6.25},compat:{sessionAffinityFormat:"openai-nosession",supportsOpenAIGrammarTools:!0},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"}},"gpt-5.6-terra":{id:"gpt-5.6-terra",name:"GPT-5.6 Terra",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:2.5,output:15,cacheRead:.25,cacheWrite:3.125},compat:{sessionAffinityFormat:"openai-nosession",supportsOpenAIGrammarTools:!0},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"}},"grok-4.5":{id:"grok-4.5",name:"Grok 4.5",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:2,output:6,cacheRead:.5,cacheWrite:0},compat:{sessionAffinityFormat:"openai-nosession"},contextWindow:5e5,maxTokens:5e5,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}},"grok-build-0.1":{id:"grok-build-0.1",name:"Grok Build 0.1",api:"openai-responses",provider:"opencode",baseUrl:"https://opencode.ai/zen/v1",reasoning:!0,input:["text","image"],cost:{input:1,output:2,cacheRead:.2,cacheWrite:0},compat:{sessionAffinityFormat:"openai-nosession",supportsReasoningEffort:!1},contextWindow:256e3,maxTokens:256e3,thinkingLevelMap:{off:null,minimal:null,low:null,medium:null}}}};var U1=J("opencode",D1);var $1={"anthropic-messages":{"minimax-m3":{id:"minimax-m3",name:"MiniMax-M3",api:"anthropic-messages",provider:"opencode-go",baseUrl:"https://opencode.ai/zen/go",reasoning:!0,input:["text","image"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:0},contextWindow:1e6,maxTokens:131072},"qwen3.7-max":{id:"qwen3.7-max",name:"Qwen3.7 Max",api:"anthropic-messages",provider:"opencode-go",baseUrl:"https://opencode.ai/zen/go",reasoning:!0,input:["text"],cost:{input:2.5,output:7.5,cacheRead:.5,cacheWrite:3.125},contextWindow:1e6,maxTokens:65536},"qwen3.7-plus":{id:"qwen3.7-plus",name:"Qwen3.7 Plus",api:"anthropic-messages",provider:"opencode-go",baseUrl:"https://opencode.ai/zen/go",reasoning:!0,input:["text","image"],cost:{input:.4,output:1.6,cacheRead:.04,cacheWrite:.5},contextWindow:1e6,maxTokens:65536},"qwen3.8-max":{id:"qwen3.8-max",name:"Qwen3.8 Max",api:"anthropic-messages",provider:"opencode-go",baseUrl:"https://opencode.ai/zen/go",reasoning:!0,input:["text","image"],cost:{input:2,output:6,cacheRead:.25,cacheWrite:2.5},contextWindow:1e6,maxTokens:131072}},"openai-completions":{"deepseek-v4-flash":{id:"deepseek-v4-flash",name:"DeepSeek V4 Flash (2x usage)",api:"openai-completions",provider:"opencode-go",baseUrl:"https://opencode.ai/zen/go/v1",reasoning:!0,input:["text"],cost:{input:.07,output:.14,cacheRead:.0014,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens",requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"deepseek"},contextWindow:1e6,maxTokens:384e3,thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",max:"max"}},"deepseek-v4-pro":{id:"deepseek-v4-pro",name:"DeepSeek V4 Pro",api:"openai-completions",provider:"opencode-go",baseUrl:"https://opencode.ai/zen/go/v1",reasoning:!0,input:["text"],cost:{input:.435,output:.87,cacheRead:.003625,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens",requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"deepseek"},contextWindow:1e6,maxTokens:384e3,thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",max:"max"}},"glm-5.1":{id:"glm-5.1",name:"GLM-5.1",api:"openai-completions",provider:"opencode-go",baseUrl:"https://opencode.ai/zen/go/v1",reasoning:!0,input:["text"],cost:{input:1.4,output:4.4,cacheRead:.26,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:202752,maxTokens:32768},"glm-5.2":{id:"glm-5.2",name:"GLM-5.2",api:"openai-completions",provider:"opencode-go",baseUrl:"https://opencode.ai/zen/go/v1",reasoning:!0,input:["text"],cost:{input:1.4,output:4.4,cacheRead:.26,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:1e6,maxTokens:131072,thinkingLevelMap:{off:null,minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"}},hy3:{id:"hy3",name:"Hy3",api:"openai-completions",provider:"opencode-go",baseUrl:"https://opencode.ai/zen/go/v1",reasoning:!0,input:["text"],cost:{input:.14,output:.58,cacheRead:.035,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:256e3,maxTokens:64e3,thinkingLevelMap:{off:"none",minimal:null,low:"low",medium:null,high:"high",xhigh:null,max:null}},"kimi-k2.6":{id:"kimi-k2.6",name:"Kimi K2.6",api:"openai-completions",provider:"opencode-go",baseUrl:"https://opencode.ai/zen/go/v1",reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:.16,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,thinkingFormat:"deepseek",supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsLongCacheRetention:!1},contextWindow:262144,maxTokens:65536,thinkingLevelMap:{minimal:null,low:null,medium:null}},"kimi-k2.7-code":{id:"kimi-k2.7-code",name:"Kimi K2.7 Code",api:"openai-completions",provider:"opencode-go",baseUrl:"https://opencode.ai/zen/go/v1",reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:.19,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:262144,maxTokens:262144},"kimi-k3":{id:"kimi-k3",name:"Kimi K3",api:"openai-completions",provider:"opencode-go",baseUrl:"https://opencode.ai/zen/go/v1",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:1048576,maxTokens:131072,thinkingLevelMap:{off:null,minimal:null,low:null,medium:null,high:null,xhigh:null,max:"max"}},"mimo-v2.5":{id:"mimo-v2.5",name:"MiMo V2.5",api:"openai-completions",provider:"opencode-go",baseUrl:"https://opencode.ai/zen/go/v1",reasoning:!0,input:["text","image"],cost:{input:.14,output:.28,cacheRead:.0028,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:1e6,maxTokens:128e3},"mimo-v2.5-pro":{id:"mimo-v2.5-pro",name:"MiMo V2.5 Pro",api:"openai-completions",provider:"opencode-go",baseUrl:"https://opencode.ai/zen/go/v1",reasoning:!0,input:["text"],cost:{input:.435,output:.87,cacheRead:.003625,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:1048576,maxTokens:128e3},"minimax-m2.7":{id:"minimax-m2.7",name:"MiniMax-M2.7",api:"openai-completions",provider:"opencode-go",baseUrl:"https://opencode.ai/zen/go/v1",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,maxTokensField:"max_tokens"},contextWindow:204800,maxTokens:131072},"qwen3.6-plus":{id:"qwen3.6-plus",name:"Qwen3.6 Plus",api:"openai-completions",provider:"opencode-go",baseUrl:"https://opencode.ai/zen/go/v1",reasoning:!0,input:["text","image"],cost:{input:.5,output:3,cacheRead:.05,cacheWrite:.625},compat:{supportsStore:!1,supportsDeveloperRole:!1,thinkingFormat:"qwen",maxTokensField:"max_tokens"},contextWindow:1e6,maxTokens:65536}},"openai-responses":{"gpt-5.6-luna":{id:"gpt-5.6-luna",name:"GPT-5.6 Luna (2x usage)",api:"openai-responses",provider:"opencode-go",baseUrl:"https://opencode.ai/zen/go/v1",reasoning:!0,input:["text","image"],cost:{input:.1,output:.6,cacheRead:.01,cacheWrite:.125},compat:{sessionAffinityFormat:"openai-nosession"},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:"xhigh",max:"max"}},"grok-4.5":{id:"grok-4.5",name:"Grok 4.5",api:"openai-responses",provider:"opencode-go",baseUrl:"https://opencode.ai/zen/go/v1",reasoning:!0,input:["text","image"],cost:{input:2,output:6,cacheRead:.5,cacheWrite:0},compat:{sessionAffinityFormat:"openai-nosession"},contextWindow:5e5,maxTokens:5e5,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}}}};var N1=J("opencode-go",$1);var B1={"openai-completions":{"ai21/jamba-large-1.7":{id:"ai21/jamba-large-1.7",name:"AI21: Jamba Large 1.7",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:2,output:8,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"aion-labs/aion-2.0":{id:"aion-labs/aion-2.0",name:"AionLabs: Aion-2.0",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.8,output:1.6,cacheRead:.2,cacheWrite:0},contextWindow:131072,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"aion-labs/aion-3.0":{id:"aion-labs/aion-3.0",name:"AionLabs: Aion-3.0",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:3,output:6,cacheRead:.75,cacheWrite:0},contextWindow:131072,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"aion-labs/aion-3.0-mini":{id:"aion-labs/aion-3.0-mini",name:"AionLabs: Aion-3.0-Mini",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.7,output:1.4,cacheRead:.18,cacheWrite:0},contextWindow:131072,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"amazon/nova-2-lite-v1":{id:"amazon/nova-2-lite-v1",name:"Amazon: Nova 2 Lite",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.3,output:2.5,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:65535,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"amazon/nova-lite-v1":{id:"amazon/nova-lite-v1",name:"Amazon: Nova Lite 1.0",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.06,output:.24,cacheRead:0,cacheWrite:0},contextWindow:3e5,maxTokens:5120,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"amazon/nova-micro-v1":{id:"amazon/nova-micro-v1",name:"Amazon: Nova Micro 1.0",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.035,output:.14,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:5120,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"amazon/nova-premier-v1":{id:"amazon/nova-premier-v1",name:"Amazon: Nova Premier 1.0",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:2.5,output:12.5,cacheRead:.625,cacheWrite:0},contextWindow:1e6,maxTokens:32e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"amazon/nova-pro-v1":{id:"amazon/nova-pro-v1",name:"Amazon: Nova Pro 1.0",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.8,output:3.2,cacheRead:0,cacheWrite:0},contextWindow:3e5,maxTokens:5120,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"anthropic/claude-3-haiku":{id:"anthropic/claude-3-haiku",name:"Anthropic: Claude 3 Haiku",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.25,output:1.25,cacheRead:.03,cacheWrite:.3},contextWindow:2e5,maxTokens:4096,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"}},"anthropic/claude-fable-5":{id:"anthropic/claude-fable-5",name:"Anthropic: Claude Fable 5",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:10,output:50,cacheRead:1,cacheWrite:12.5},contextWindow:1e6,maxTokens:128e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"},thinkingLevelMap:{off:null,xhigh:"xhigh",max:"max"}},"anthropic/claude-fable-5:batch":{id:"anthropic/claude-fable-5:batch",name:"Anthropic: Claude Fable 5 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"},thinkingLevelMap:{off:null,xhigh:"xhigh",max:"max"}},"anthropic/claude-haiku-4.5":{id:"anthropic/claude-haiku-4.5",name:"Anthropic: Claude Haiku 4.5",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1,output:5,cacheRead:.1,cacheWrite:1.25},contextWindow:2e5,maxTokens:64e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"}},"anthropic/claude-haiku-4.5:batch":{id:"anthropic/claude-haiku-4.5:batch",name:"Anthropic: Claude Haiku 4.5 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.5,output:2.5,cacheRead:.05,cacheWrite:.625},contextWindow:2e5,maxTokens:64e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"}},"anthropic/claude-opus-4":{id:"anthropic/claude-opus-4",name:"Anthropic: Claude Opus 4",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:15,output:75,cacheRead:1.5,cacheWrite:18.75},contextWindow:2e5,maxTokens:32e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"}},"anthropic/claude-opus-4.1":{id:"anthropic/claude-opus-4.1",name:"Anthropic: Claude Opus 4.1",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:15,output:75,cacheRead:1.5,cacheWrite:18.75},contextWindow:2e5,maxTokens:32e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"}},"anthropic/claude-opus-4.1:batch":{id:"anthropic/claude-opus-4.1:batch",name:"Anthropic: Claude Opus 4.1 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:7.5,output:37.5,cacheRead:.75,cacheWrite:9.375},contextWindow:2e5,maxTokens:32e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"}},"anthropic/claude-opus-4.5":{id:"anthropic/claude-opus-4.5",name:"Anthropic: Claude Opus 4.5",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:2e5,maxTokens:64e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"}},"anthropic/claude-opus-4.5:batch":{id:"anthropic/claude-opus-4.5:batch",name:"Anthropic: Claude Opus 4.5 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:2.5,output:12.5,cacheRead:.25,cacheWrite:3.125},contextWindow:2e5,maxTokens:64e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"}},"anthropic/claude-opus-4.6":{id:"anthropic/claude-opus-4.6",name:"Anthropic: Claude Opus 4.6",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"},thinkingLevelMap:{max:"max"}},"anthropic/claude-opus-4.6:batch":{id:"anthropic/claude-opus-4.6:batch",name:"Anthropic: Claude Opus 4.6 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:2.5,output:12.5,cacheRead:.25,cacheWrite:3.125},contextWindow:1e6,maxTokens:128e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"},thinkingLevelMap:{max:"max"}},"anthropic/claude-opus-4.7":{id:"anthropic/claude-opus-4.7",name:"Anthropic: Claude Opus 4.7",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"anthropic/claude-opus-4.7-fast":{id:"anthropic/claude-opus-4.7-fast",name:"Anthropic: Claude Opus 4.7 (Fast)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:30,output:150,cacheRead:3,cacheWrite:37.5},contextWindow:1e6,maxTokens:128e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"anthropic/claude-opus-4.7:batch":{id:"anthropic/claude-opus-4.7:batch",name:"Anthropic: Claude Opus 4.7 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:2.5,output:12.5,cacheRead:.25,cacheWrite:3.125},contextWindow:1e6,maxTokens:128e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"anthropic/claude-opus-4.8":{id:"anthropic/claude-opus-4.8",name:"Anthropic: Claude Opus 4.8",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"anthropic/claude-opus-4.8-fast":{id:"anthropic/claude-opus-4.8-fast",name:"Anthropic: Claude Opus 4.8 (Fast)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:10,output:50,cacheRead:1,cacheWrite:12.5},contextWindow:1e6,maxTokens:128e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"anthropic/claude-opus-4.8:batch":{id:"anthropic/claude-opus-4.8:batch",name:"Anthropic: Claude Opus 4.8 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:2.5,output:12.5,cacheRead:.25,cacheWrite:3.125},contextWindow:1e6,maxTokens:128e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"anthropic/claude-opus-5":{id:"anthropic/claude-opus-5",name:"Claude Opus 5",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"anthropic/claude-opus-5-fast":{id:"anthropic/claude-opus-5-fast",name:"Claude Opus 5 (Fast)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:10,output:50,cacheRead:1,cacheWrite:12.5},contextWindow:1e6,maxTokens:128e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"anthropic/claude-opus-5:batch":{id:"anthropic/claude-opus-5:batch",name:"Claude Opus 5 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:2.5,output:12.5,cacheRead:.25,cacheWrite:3.125},contextWindow:1e6,maxTokens:128e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"anthropic/claude-sonnet-4":{id:"anthropic/claude-sonnet-4",name:"Anthropic: Claude Sonnet 4",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:2e5,maxTokens:64e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"}},"anthropic/claude-sonnet-4.5":{id:"anthropic/claude-sonnet-4.5",name:"Anthropic: Claude Sonnet 4.5",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:1e6,maxTokens:64e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"}},"anthropic/claude-sonnet-4.5:batch":{id:"anthropic/claude-sonnet-4.5:batch",name:"Anthropic: Claude Sonnet 4.5 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.5,output:7.5,cacheRead:.15,cacheWrite:1.875},contextWindow:1e6,maxTokens:64e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"}},"anthropic/claude-sonnet-4.6":{id:"anthropic/claude-sonnet-4.6",name:"Anthropic: Claude Sonnet 4.6",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:1e6,maxTokens:128e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"},thinkingLevelMap:{max:"max"}},"anthropic/claude-sonnet-4.6:batch":{id:"anthropic/claude-sonnet-4.6:batch",name:"Anthropic: Claude Sonnet 4.6 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.5,output:7.5,cacheRead:.15,cacheWrite:1.875},contextWindow:1e6,maxTokens:128e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"},thinkingLevelMap:{max:"max"}},"anthropic/claude-sonnet-5":{id:"anthropic/claude-sonnet-5",name:"Anthropic: Claude Sonnet 5",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:2,output:10,cacheRead:.2,cacheWrite:2.5},contextWindow:1e6,maxTokens:128e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"anthropic/claude-sonnet-5:batch":{id:"anthropic/claude-sonnet-5:batch",name:"Anthropic: Claude Sonnet 5 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1,output:5,cacheRead:.1,cacheWrite:1.25},contextWindow:1e6,maxTokens:128e3,compat:{thinkingFormat:"openrouter",cacheControlFormat:"anthropic"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"arcee-ai/trinity-large-thinking":{id:"arcee-ai/trinity-large-thinking",name:"Arcee AI: Trinity Large Thinking",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.22,output:.85,cacheRead:.06,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"arcee-ai/virtuoso-large":{id:"arcee-ai/virtuoso-large",name:"Arcee AI: Virtuoso Large",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.75,output:1.2,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:64e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},auto:{id:"auto",name:"Auto",api:"openai-completions",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:2e6,maxTokens:3e4,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"bytedance-seed/seed-1.6":{id:"bytedance-seed/seed-1.6",name:"ByteDance Seed: Seed 1.6",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.25,output:2,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"bytedance-seed/seed-1.6-flash":{id:"bytedance-seed/seed-1.6-flash",name:"ByteDance Seed: Seed 1.6 Flash",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.075,output:.3,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"bytedance-seed/seed-2.0-lite":{id:"bytedance-seed/seed-2.0-lite",name:"ByteDance Seed: Seed-2.0-Lite",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.25,output:2,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"bytedance-seed/seed-2.0-mini":{id:"bytedance-seed/seed-2.0-mini",name:"ByteDance Seed: Seed-2.0-Mini",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.1,output:.4,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"cohere/command-r-08-2024":{id:"cohere/command-r-08-2024",name:"Cohere: Command R (08-2024)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.15,output:.6,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"cohere/command-r-plus-08-2024":{id:"cohere/command-r-plus-08-2024",name:"Cohere: Command R+ (08-2024)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:2.5,output:10,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"cohere/north-mini-code:free":{id:"cohere/north-mini-code:free",name:"Cohere: North Mini Code (free)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:64e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"deepseek/deepseek-chat":{id:"deepseek/deepseek-chat",name:"DeepSeek: DeepSeek V3",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.2574,output:1.0287,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:16e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"deepseek/deepseek-chat-v3-0324":{id:"deepseek/deepseek-chat-v3-0324",name:"DeepSeek: DeepSeek V3 0324",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.27,output:1.12,cacheRead:.135,cacheWrite:0},contextWindow:163840,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"deepseek/deepseek-chat-v3.1":{id:"deepseek/deepseek-chat-v3.1",name:"DeepSeek: DeepSeek V3.1",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.25,output:.95,cacheRead:.13,cacheWrite:0},contextWindow:163840,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"deepseek/deepseek-r1":{id:"deepseek/deepseek-r1",name:"DeepSeek: R1",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.7,output:2.5,cacheRead:0,cacheWrite:0},contextWindow:64e3,maxTokens:16e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"deepseek/deepseek-r1-0528":{id:"deepseek/deepseek-r1-0528",name:"DeepSeek: R1 0528",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.5,output:2.15,cacheRead:.35,cacheWrite:0},contextWindow:163840,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"deepseek/deepseek-v3.1-terminus":{id:"deepseek/deepseek-v3.1-terminus",name:"DeepSeek: DeepSeek V3.1 Terminus",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.27,output:1,cacheRead:.135,cacheWrite:0},contextWindow:131072,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"deepseek/deepseek-v3.2":{id:"deepseek/deepseek-v3.2",name:"DeepSeek: DeepSeek V3.2",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.269,output:.4,cacheRead:.1345,cacheWrite:0},contextWindow:163840,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"deepseek/deepseek-v3.2-exp":{id:"deepseek/deepseek-v3.2-exp",name:"DeepSeek: DeepSeek V3.2 Exp",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.27,output:.41,cacheRead:0,cacheWrite:0},contextWindow:163840,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"deepseek/deepseek-v4-flash":{id:"deepseek/deepseek-v4-flash",name:"DeepSeek: DeepSeek V4 Flash 0423",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.14,output:.28,cacheRead:.028,cacheWrite:0},contextWindow:1048576,maxTokens:393216,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter",requiresReasoningContentOnAssistantMessages:!0},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",max:null,xhigh:"xhigh"}},"deepseek/deepseek-v4-flash-0731":{id:"deepseek/deepseek-v4-flash-0731",name:"DeepSeek: DeepSeek V4 Flash 0731",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.08,output:.18,cacheRead:.016,cacheWrite:0},contextWindow:1048576,maxTokens:384e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter",requiresReasoningContentOnAssistantMessages:!0},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",max:null,xhigh:"xhigh"}},"deepseek/deepseek-v4-pro":{id:"deepseek/deepseek-v4-pro",name:"DeepSeek: DeepSeek V4 Pro",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.6864,output:1.3728,cacheRead:.057915,cacheWrite:0},contextWindow:1048576,maxTokens:393216,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter",requiresReasoningContentOnAssistantMessages:!0},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",max:null,xhigh:"xhigh"}},"google/gemini-2.5-flash":{id:"google/gemini-2.5-flash",name:"Google: Gemini 2.5 Flash",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.3,output:2.5,cacheRead:.03,cacheWrite:.083333},contextWindow:1048576,maxTokens:65535,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-2.5-flash-lite":{id:"google/gemini-2.5-flash-lite",name:"Google: Gemini 2.5 Flash Lite",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.1,output:.4,cacheRead:.01,cacheWrite:.083333},contextWindow:1048576,maxTokens:65535,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-2.5-flash-lite:batch":{id:"google/gemini-2.5-flash-lite:batch",name:"Google: Gemini 2.5 Flash Lite (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.05,output:.2,cacheRead:.01,cacheWrite:0},contextWindow:1048576,maxTokens:65535,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-2.5-flash:batch":{id:"google/gemini-2.5-flash:batch",name:"Google: Gemini 2.5 Flash (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.15,output:1.25,cacheRead:.03,cacheWrite:0},contextWindow:1048576,maxTokens:65535,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-2.5-pro":{id:"google/gemini-2.5-pro",name:"Google: Gemini 2.5 Pro",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:.375},contextWindow:1048576,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-2.5-pro-preview":{id:"google/gemini-2.5-pro-preview",name:"Google: Gemini 2.5 Pro Preview 06-05",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:.375},contextWindow:1048576,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-2.5-pro-preview-05-06":{id:"google/gemini-2.5-pro-preview-05-06",name:"Google: Gemini 2.5 Pro Preview 05-06",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:.375},contextWindow:1048576,maxTokens:65535,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-2.5-pro:batch":{id:"google/gemini-2.5-pro:batch",name:"Google: Gemini 2.5 Pro (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.625,output:5,cacheRead:.125,cacheWrite:0},contextWindow:1048576,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-3-flash-preview":{id:"google/gemini-3-flash-preview",name:"Google: Gemini 3 Flash Preview",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.5,output:3,cacheRead:.05,cacheWrite:.083333},contextWindow:1048576,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-3-flash-preview:batch":{id:"google/gemini-3-flash-preview:batch",name:"Google: Gemini 3 Flash Preview (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.25,output:1.5,cacheRead:0,cacheWrite:0},contextWindow:1048576,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-3-pro-image":{id:"google/gemini-3-pro-image",name:"Google: Nano Banana Pro (Gemini 3 Pro Image)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:2,output:12,cacheRead:.2,cacheWrite:.375},contextWindow:65536,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-3.1-flash-lite":{id:"google/gemini-3.1-flash-lite",name:"Google: Gemini 3.1 Flash Lite",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.25,output:1.5,cacheRead:.025,cacheWrite:.083333},contextWindow:1048576,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-3.1-flash-lite-preview":{id:"google/gemini-3.1-flash-lite-preview",name:"Google: Gemini 3.1 Flash Lite Preview",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.25,output:1.5,cacheRead:.025,cacheWrite:.083333},contextWindow:1048576,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-3.1-flash-lite:batch":{id:"google/gemini-3.1-flash-lite:batch",name:"Google: Gemini 3.1 Flash Lite (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.125,output:.75,cacheRead:.0125,cacheWrite:0},contextWindow:1048576,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-3.1-pro-preview":{id:"google/gemini-3.1-pro-preview",name:"Google: Gemini 3.1 Pro Preview",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:2,output:12,cacheRead:.2,cacheWrite:.375},contextWindow:1048576,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-3.1-pro-preview-customtools":{id:"google/gemini-3.1-pro-preview-customtools",name:"Google: Gemini 3.1 Pro Preview Custom Tools",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:2,output:12,cacheRead:.2,cacheWrite:.375},contextWindow:1048576,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-3.1-pro-preview:batch":{id:"google/gemini-3.1-pro-preview:batch",name:"Google: Gemini 3.1 Pro Preview (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1,output:6,cacheRead:0,cacheWrite:0},contextWindow:1048576,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-3.5-flash":{id:"google/gemini-3.5-flash",name:"Google: Gemini 3.5 Flash",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.5,output:9,cacheRead:.15,cacheWrite:.083333},contextWindow:1048576,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-3.5-flash-lite":{id:"google/gemini-3.5-flash-lite",name:"Google: Gemini 3.5 Flash Lite",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.3,output:2.5,cacheRead:.03,cacheWrite:.083333},contextWindow:1048576,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-3.5-flash-lite:batch":{id:"google/gemini-3.5-flash-lite:batch",name:"Google: Gemini 3.5 Flash Lite (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.15,output:1.25,cacheRead:.015,cacheWrite:0},contextWindow:1048576,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-3.5-flash:batch":{id:"google/gemini-3.5-flash:batch",name:"Google: Gemini 3.5 Flash (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.75,output:4.5,cacheRead:.075,cacheWrite:0},contextWindow:1048576,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-3.6-flash":{id:"google/gemini-3.6-flash",name:"Google: Gemini 3.6 Flash",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.5,output:7.5,cacheRead:.15,cacheWrite:.083333},contextWindow:1048576,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemini-3.6-flash:batch":{id:"google/gemini-3.6-flash:batch",name:"Google: Gemini 3.6 Flash (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.75,output:3.75,cacheRead:.075,cacheWrite:.083333},contextWindow:1048576,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemma-3-12b-it":{id:"google/gemma-3-12b-it",name:"Google: Gemma 3 12B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.05,output:.15,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:16384,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemma-3-27b-it":{id:"google/gemma-3-27b-it",name:"Google: Gemma 3 27B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.08,output:.45,cacheRead:.04,cacheWrite:0},contextWindow:131072,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemma-4-26b-a4b-it":{id:"google/gemma-4-26b-a4b-it",name:"Google: Gemma 4 26B A4B ",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.12,output:.4,cacheRead:.05,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemma-4-26b-a4b-it:free":{id:"google/gemma-4-26b-a4b-it:free",name:"Google: Gemma 4 26B A4B (free)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemma-4-31b-it":{id:"google/gemma-4-31b-it",name:"Google: Gemma 4 31B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.1,output:.34,cacheRead:.1,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"google/gemma-4-31b-it:free":{id:"google/gemma-4-31b-it:free",name:"Google: Gemma 4 31B (free)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"ibm-granite/granite-4.1-8b":{id:"ibm-granite/granite-4.1-8b",name:"IBM: Granite 4.1 8B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.05,output:.1,cacheRead:.05,cacheWrite:0},contextWindow:131072,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"inception/mercury-2":{id:"inception/mercury-2",name:"Inception: Mercury 2",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.25,output:.75,cacheRead:.025,cacheWrite:0},contextWindow:128e3,maxTokens:5e4,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"},thinkingLevelMap:{off:null}},"inclusionai/ling-2.6-1t":{id:"inclusionai/ling-2.6-1t",name:"inclusionAI: Ling-2.6-1T",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.075,output:.625,cacheRead:.015,cacheWrite:0},contextWindow:262144,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"inclusionai/ling-2.6-flash":{id:"inclusionai/ling-2.6-flash",name:"inclusionAI: Ling-2.6-flash",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.01,output:.03,cacheRead:.002,cacheWrite:0},contextWindow:262144,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"inclusionai/ling-3.0-flash":{id:"inclusionai/ling-3.0-flash",name:"Ling-3.0-flash",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.021,output:.063,cacheRead:.0042,cacheWrite:0},contextWindow:262144,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"inclusionai/ling-3.0-tiny:free":{id:"inclusionai/ling-3.0-tiny:free",name:"inclusionAI: Ling 3.0 Tiny (free)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"inclusionai/ring-2.6-1t":{id:"inclusionai/ring-2.6-1t",name:"inclusionAI: Ring-2.6-1T",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.075,output:.625,cacheRead:.015,cacheWrite:0},contextWindow:262144,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"kwaipilot/kat-coder-air-v2.5":{id:"kwaipilot/kat-coder-air-v2.5",name:"Kwaipilot: KAT-Coder-Air V2.5",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.15,output:.6,cacheRead:.03,cacheWrite:0},contextWindow:256e3,maxTokens:8e4,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"kwaipilot/kat-coder-pro-v2":{id:"kwaipilot/kat-coder-pro-v2",name:"Kwaipilot: KAT-Coder-Pro V2",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:0},contextWindow:256e3,maxTokens:8e4,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"kwaipilot/kat-coder-pro-v2.5":{id:"kwaipilot/kat-coder-pro-v2.5",name:"Kwaipilot: KAT-Coder-Pro V2.5",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.74,output:2.96,cacheRead:.15,cacheWrite:0},contextWindow:256e3,maxTokens:8e4,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"meituan/longcat-2.0":{id:"meituan/longcat-2.0",name:"Meituan: LongCat 2.0",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:.006,cacheWrite:0},contextWindow:1048756,maxTokens:262144,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"meta-llama/llama-3.1-70b-instruct":{id:"meta-llama/llama-3.1-70b-instruct",name:"Meta: Llama 3.1 70B Instruct",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.4,output:.4,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:16384,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"meta-llama/llama-3.1-8b-instruct":{id:"meta-llama/llama-3.1-8b-instruct",name:"Meta: Llama 3.1 8B Instruct",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.05,output:.08,cacheRead:.025,cacheWrite:0},contextWindow:131072,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"meta-llama/llama-3.3-70b-instruct":{id:"meta-llama/llama-3.3-70b-instruct",name:"Meta: Llama 3.3 70B Instruct",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.1,output:.32,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:16384,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"meta-llama/llama-4-maverick":{id:"meta-llama/llama-4-maverick",name:"Meta: Llama 4 Maverick",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.2,output:.696,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"meta-llama/llama-4-scout":{id:"meta-llama/llama-4-scout",name:"Meta: Llama 4 Scout",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.1,output:.3,cacheRead:0,cacheWrite:0},contextWindow:327680,maxTokens:16384,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"meta/muse-glimmer-30b":{id:"meta/muse-glimmer-30b",name:"Meta: Muse Glimmer 30B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.35,output:1.5,cacheRead:.04,cacheWrite:0},contextWindow:131072,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"meta/muse-spark-1.1":{id:"meta/muse-spark-1.1",name:"Meta: Muse Spark 1.1",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.25,output:4.25,cacheRead:.15,cacheWrite:0},contextWindow:1048576,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"meta/muse-spark-1.2":{id:"meta/muse-spark-1.2",name:"Meta: Muse Spark 1.2",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.25,output:4.25,cacheRead:.15,cacheWrite:0},contextWindow:1048576,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"minimax/minimax-m1":{id:"minimax/minimax-m1",name:"MiniMax: MiniMax M1",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.55,output:2.2,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:4e4,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"minimax/minimax-m2":{id:"minimax/minimax-m2",name:"MiniMax: MiniMax M2",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.255,output:1.02,cacheRead:0,cacheWrite:0},contextWindow:204800,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"minimax/minimax-m2.1":{id:"minimax/minimax-m2.1",name:"MiniMax: MiniMax M2.1",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:.03,cacheWrite:0},contextWindow:204800,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"minimax/minimax-m2.5":{id:"minimax/minimax-m2.5",name:"MiniMax: MiniMax M2.5",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.22,output:.9,cacheRead:.05,cacheWrite:0},contextWindow:196608,maxTokens:196608,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"minimax/minimax-m2.7":{id:"minimax/minimax-m2.7",name:"MiniMax: MiniMax M2.7",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:0},contextWindow:204800,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"minimax/minimax-m3":{id:"minimax/minimax-m3",name:"MiniMax: MiniMax M3",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:0},contextWindow:524288,maxTokens:512e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"minimax/minimax-m3:batch":{id:"minimax/minimax-m3:batch",name:"MiniMax: MiniMax M3 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.15,output:.6,cacheRead:.03,cacheWrite:0},contextWindow:524288,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"mistralai/codestral-2508":{id:"mistralai/codestral-2508",name:"Mistral: Codestral 2508",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.3,output:.9,cacheRead:.03,cacheWrite:0},contextWindow:256e3,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"mistralai/ministral-14b-2512":{id:"mistralai/ministral-14b-2512",name:"Mistral: Ministral 3 14B 2512",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.2,output:.2,cacheRead:.02,cacheWrite:0},contextWindow:262144,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"mistralai/ministral-3b-2512":{id:"mistralai/ministral-3b-2512",name:"Mistral: Ministral 3 3B 2512",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.1,output:.1,cacheRead:.01,cacheWrite:0},contextWindow:131072,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"mistralai/ministral-8b-2512":{id:"mistralai/ministral-8b-2512",name:"Mistral: Ministral 3 8B 2512",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.15,output:.15,cacheRead:.015,cacheWrite:0},contextWindow:262144,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"mistralai/mistral-large":{id:"mistralai/mistral-large",name:"Mistral Large",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:2,output:6,cacheRead:.2,cacheWrite:0},contextWindow:128e3,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"mistralai/mistral-large-2407":{id:"mistralai/mistral-large-2407",name:"Mistral Large 2407",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:2,output:6,cacheRead:.2,cacheWrite:0},contextWindow:131072,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"mistralai/mistral-large-2512":{id:"mistralai/mistral-large-2512",name:"Mistral: Mistral Large 3 2512",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.5,output:1.5,cacheRead:.05,cacheWrite:0},contextWindow:262144,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"mistralai/mistral-medium-3":{id:"mistralai/mistral-medium-3",name:"Mistral: Mistral Medium 3",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.4,output:2,cacheRead:.04,cacheWrite:0},contextWindow:131072,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"mistralai/mistral-medium-3-5":{id:"mistralai/mistral-medium-3-5",name:"Mistral: Mistral Medium 3.5",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.5,output:7.5,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"mistralai/mistral-medium-3.1":{id:"mistralai/mistral-medium-3.1",name:"Mistral: Mistral Medium 3.1",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.4,output:2,cacheRead:.04,cacheWrite:0},contextWindow:131072,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"mistralai/mistral-nemo":{id:"mistralai/mistral-nemo",name:"Mistral: Mistral Nemo",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.019,output:.03,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:16384,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"mistralai/mistral-saba":{id:"mistralai/mistral-saba",name:"Mistral: Saba",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.2,output:.6,cacheRead:.02,cacheWrite:0},contextWindow:32768,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"mistralai/mistral-small-2603":{id:"mistralai/mistral-small-2603",name:"Mistral: Mistral Small 4",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.15,output:.6,cacheRead:.015,cacheWrite:0},contextWindow:262144,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"mistralai/mistral-small-3.2-24b-instruct":{id:"mistralai/mistral-small-3.2-24b-instruct",name:"Mistral: Mistral Small 3.2 24B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.09375,output:.25,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:16384,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"mistralai/mixtral-8x22b-instruct":{id:"mistralai/mixtral-8x22b-instruct",name:"Mistral: Mixtral 8x22B Instruct",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:2,output:6,cacheRead:.2,cacheWrite:0},contextWindow:65536,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"mistralai/voxtral-small-24b-2507":{id:"mistralai/voxtral-small-24b-2507",name:"Mistral: Voxtral Small 24B 2507",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.1,output:.3,cacheRead:.01,cacheWrite:0},contextWindow:32e3,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"moonshotai/kimi-k2":{id:"moonshotai/kimi-k2",name:"MoonshotAI: Kimi K2 0711",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.57,output:2.3,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:100352,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"moonshotai/kimi-k2-0905":{id:"moonshotai/kimi-k2-0905",name:"MoonshotAI: Kimi K2 0905",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.6,output:2.5,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:100352,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"moonshotai/kimi-k2-thinking":{id:"moonshotai/kimi-k2-thinking",name:"MoonshotAI: Kimi K2 Thinking",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.6,output:2.5,cacheRead:.15,cacheWrite:0},contextWindow:262144,maxTokens:100352,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"moonshotai/kimi-k2.5":{id:"moonshotai/kimi-k2.5",name:"MoonshotAI: Kimi K2.5",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.41,output:2.06,cacheRead:.07,cacheWrite:0},contextWindow:262144,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"moonshotai/kimi-k2.6":{id:"moonshotai/kimi-k2.6",name:"MoonshotAI: Kimi K2.6",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:.16,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter",requiresReasoningContentOnAssistantMessages:!0}},"moonshotai/kimi-k2.7-code":{id:"moonshotai/kimi-k2.7-code",name:"MoonshotAI: Kimi K2.7 Code",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.7,output:3.5,cacheRead:.15,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"moonshotai/kimi-k2.7-code:batch":{id:"moonshotai/kimi-k2.7-code:batch",name:"MoonshotAI: Kimi K2.7 Code (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.475,output:2,cacheRead:.095,cacheWrite:0},contextWindow:262144,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"moonshotai/kimi-k3":{id:"moonshotai/kimi-k3",name:"MoonshotAI: Kimi K3",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:0},contextWindow:1048576,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"nex-agi/nex-n2-mini":{id:"nex-agi/nex-n2-mini",name:"Nex AGI: Nex-N2-Mini",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.025,output:.1,cacheRead:.0025,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"nex-agi/nex-n2-pro":{id:"nex-agi/nex-n2-pro",name:"Nex AGI: Nex-N2-Pro",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.25,output:1,cacheRead:.025,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"nvidia/nemotron-3-nano-30b-a3b":{id:"nvidia/nemotron-3-nano-30b-a3b",name:"NVIDIA: Nemotron 3 Nano 30B A3B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.05,output:.2,cacheRead:.025,cacheWrite:0},contextWindow:262144,maxTokens:228e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"nvidia/nemotron-3-nano-30b-a3b:free":{id:"nvidia/nemotron-3-nano-30b-a3b:free",name:"NVIDIA: Nemotron 3 Nano 30B A3B (free)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free":{id:"nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free",name:"NVIDIA: Nemotron 3 Nano Omni (free)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"nvidia/nemotron-3-super-120b-a12b":{id:"nvidia/nemotron-3-super-120b-a12b",name:"NVIDIA: Nemotron 3 Super",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.085,output:.4,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:16384,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"nvidia/nemotron-3-super-120b-a12b:free":{id:"nvidia/nemotron-3-super-120b-a12b:free",name:"NVIDIA: Nemotron 3 Super (free)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"nvidia/nemotron-3-ultra-550b-a55b":{id:"nvidia/nemotron-3-ultra-550b-a55b",name:"NVIDIA: Nemotron 3 Ultra",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.6,output:3.6,cacheRead:.2,cacheWrite:0},contextWindow:512288,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"nvidia/nemotron-3-ultra-550b-a55b:batch":{id:"nvidia/nemotron-3-ultra-550b-a55b:batch",name:"NVIDIA: Nemotron 3 Ultra (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.3,output:1.8,cacheRead:.1,cacheWrite:0},contextWindow:512288,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"nvidia/nemotron-3-ultra-550b-a55b:free":{id:"nvidia/nemotron-3-ultra-550b-a55b:free",name:"NVIDIA: Nemotron 3 Ultra (free)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"nvidia/nemotron-nano-12b-v2-vl:free":{id:"nvidia/nemotron-nano-12b-v2-vl:free",name:"NVIDIA: Nemotron Nano 12B 2 VL (free)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:128e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"nvidia/nemotron-nano-9b-v2:free":{id:"nvidia/nemotron-nano-9b-v2:free",name:"NVIDIA: Nemotron Nano 9B V2 (free)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"openai/gpt-3.5-turbo":{id:"openai/gpt-3.5-turbo",name:"OpenAI: GPT-3.5 Turbo",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.5,output:1.5,cacheRead:0,cacheWrite:0},contextWindow:16385,maxTokens:4096,compat:{thinkingFormat:"openrouter"}},"openai/gpt-3.5-turbo-0613":{id:"openai/gpt-3.5-turbo-0613",name:"OpenAI: GPT-3.5 Turbo (older v0613)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:1,output:2,cacheRead:0,cacheWrite:0},contextWindow:4095,maxTokens:4096,compat:{thinkingFormat:"openrouter"}},"openai/gpt-3.5-turbo-16k":{id:"openai/gpt-3.5-turbo-16k",name:"OpenAI: GPT-3.5 Turbo 16k",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:3,output:4,cacheRead:0,cacheWrite:0},contextWindow:16385,maxTokens:4096,compat:{thinkingFormat:"openrouter"}},"openai/gpt-3.5-turbo:batch":{id:"openai/gpt-3.5-turbo:batch",name:"OpenAI: GPT-3.5 Turbo (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.25,output:.75,cacheRead:0,cacheWrite:0},contextWindow:16385,maxTokens:4096,compat:{thinkingFormat:"openrouter"}},"openai/gpt-4":{id:"openai/gpt-4",name:"OpenAI: GPT-4",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:30,output:60,cacheRead:0,cacheWrite:0},contextWindow:8191,maxTokens:4096,compat:{thinkingFormat:"openrouter"}},"openai/gpt-4-turbo":{id:"openai/gpt-4-turbo",name:"OpenAI: GPT-4 Turbo",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:10,output:30,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096,compat:{thinkingFormat:"openrouter"}},"openai/gpt-4-turbo-preview":{id:"openai/gpt-4-turbo-preview",name:"OpenAI: GPT-4 Turbo Preview",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:10,output:30,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096,compat:{thinkingFormat:"openrouter"}},"openai/gpt-4-turbo:batch":{id:"openai/gpt-4-turbo:batch",name:"OpenAI: GPT-4 Turbo (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:5,output:15,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096,compat:{thinkingFormat:"openrouter"}},"openai/gpt-4.1":{id:"openai/gpt-4.1",name:"OpenAI: GPT-4.1",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:2,output:8,cacheRead:.5,cacheWrite:0},contextWindow:1047576,maxTokens:32768,compat:{thinkingFormat:"openrouter"}},"openai/gpt-4.1-mini":{id:"openai/gpt-4.1-mini",name:"OpenAI: GPT-4.1 Mini",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.4,output:1.6,cacheRead:.1,cacheWrite:0},contextWindow:1047576,maxTokens:32768,compat:{thinkingFormat:"openrouter"}},"openai/gpt-4.1-mini:batch":{id:"openai/gpt-4.1-mini:batch",name:"OpenAI: GPT-4.1 Mini (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.2,output:.8,cacheRead:.05,cacheWrite:0},contextWindow:1047576,maxTokens:32768,compat:{thinkingFormat:"openrouter"}},"openai/gpt-4.1-nano":{id:"openai/gpt-4.1-nano",name:"OpenAI: GPT-4.1 Nano",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.1,output:.4,cacheRead:.025,cacheWrite:0},contextWindow:1047576,maxTokens:32768,compat:{thinkingFormat:"openrouter"}},"openai/gpt-4.1-nano:batch":{id:"openai/gpt-4.1-nano:batch",name:"OpenAI: GPT-4.1 Nano (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.05,output:.2,cacheRead:.0125,cacheWrite:0},contextWindow:1047576,maxTokens:32768,compat:{thinkingFormat:"openrouter"}},"openai/gpt-4.1:batch":{id:"openai/gpt-4.1:batch",name:"OpenAI: GPT-4.1 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:1,output:4,cacheRead:.25,cacheWrite:0},contextWindow:1047576,maxTokens:32768,compat:{thinkingFormat:"openrouter"}},"openai/gpt-4o":{id:"openai/gpt-4o",name:"OpenAI: GPT-4o",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:2.5,output:10,cacheRead:1.25,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{thinkingFormat:"openrouter"}},"openai/gpt-4o-2024-05-13":{id:"openai/gpt-4o-2024-05-13",name:"OpenAI: GPT-4o (2024-05-13)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:5,output:15,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096,compat:{thinkingFormat:"openrouter"}},"openai/gpt-4o-2024-08-06":{id:"openai/gpt-4o-2024-08-06",name:"OpenAI: GPT-4o (2024-08-06)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:2.5,output:10,cacheRead:1.25,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{thinkingFormat:"openrouter"}},"openai/gpt-4o-2024-11-20":{id:"openai/gpt-4o-2024-11-20",name:"OpenAI: GPT-4o (2024-11-20)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:2.5,output:10,cacheRead:1.25,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{thinkingFormat:"openrouter"}},"openai/gpt-4o-mini":{id:"openai/gpt-4o-mini",name:"OpenAI: GPT-4o-mini",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.15,output:.6,cacheRead:.075,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{thinkingFormat:"openrouter"}},"openai/gpt-4o-mini-2024-07-18":{id:"openai/gpt-4o-mini-2024-07-18",name:"OpenAI: GPT-4o-mini (2024-07-18)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.15,output:.6,cacheRead:.075,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{thinkingFormat:"openrouter"}},"openai/gpt-4o-mini:batch":{id:"openai/gpt-4o-mini:batch",name:"OpenAI: GPT-4o-mini (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.075,output:.3,cacheRead:.0375,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{thinkingFormat:"openrouter"}},"openai/gpt-4o:batch":{id:"openai/gpt-4o:batch",name:"OpenAI: GPT-4o (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:1.25,output:5,cacheRead:.625,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{thinkingFormat:"openrouter"}},"openai/gpt-5":{id:"openai/gpt-5",name:"OpenAI: GPT-5",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"}},"openai/gpt-5-codex:batch":{id:"openai/gpt-5-codex:batch",name:"OpenAI: GPT-5 Codex (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.625,output:5,cacheRead:.0625,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"}},"openai/gpt-5-mini":{id:"openai/gpt-5-mini",name:"OpenAI: GPT-5 Mini",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.25,output:2,cacheRead:.025,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"}},"openai/gpt-5-mini:batch":{id:"openai/gpt-5-mini:batch",name:"OpenAI: GPT-5 Mini (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.125,output:1,cacheRead:.0125,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"}},"openai/gpt-5-nano":{id:"openai/gpt-5-nano",name:"OpenAI: GPT-5 Nano",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.05,output:.4,cacheRead:.005,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"}},"openai/gpt-5-nano:batch":{id:"openai/gpt-5-nano:batch",name:"OpenAI: GPT-5 Nano (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.025,output:.2,cacheRead:.0025,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"}},"openai/gpt-5-pro":{id:"openai/gpt-5-pro",name:"OpenAI: GPT-5 Pro",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:15,output:120,cacheRead:0,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"}},"openai/gpt-5-pro:batch":{id:"openai/gpt-5-pro:batch",name:"OpenAI: GPT-5 Pro (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:7.5,output:60,cacheRead:0,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"}},"openai/gpt-5.1":{id:"openai/gpt-5.1",name:"OpenAI: GPT-5.1",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"}},"openai/gpt-5.1-codex":{id:"openai/gpt-5.1-codex",name:"OpenAI: GPT-5.1-Codex",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.13,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"}},"openai/gpt-5.1-codex-max":{id:"openai/gpt-5.1-codex-max",name:"OpenAI: GPT-5.1-Codex-Max",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"}},"openai/gpt-5.1-codex-mini":{id:"openai/gpt-5.1-codex-mini",name:"OpenAI: GPT-5.1-Codex-Mini",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.25,output:2,cacheRead:.03,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"}},"openai/gpt-5.1:batch":{id:"openai/gpt-5.1:batch",name:"OpenAI: GPT-5.1 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.625,output:5,cacheRead:.0625,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"}},"openai/gpt-5.2":{id:"openai/gpt-5.2",name:"OpenAI: GPT-5.2",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.2-chat":{id:"openai/gpt-5.2-chat",name:"OpenAI: GPT-5.2 Chat",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:128e3,maxTokens:32e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.2-codex":{id:"openai/gpt-5.2-codex",name:"OpenAI: GPT-5.2-Codex",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.2-pro":{id:"openai/gpt-5.2-pro",name:"OpenAI: GPT-5.2 Pro",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:21,output:168,cacheRead:0,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.2-pro:batch":{id:"openai/gpt-5.2-pro:batch",name:"OpenAI: GPT-5.2 Pro (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:10.5,output:84,cacheRead:0,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.2:batch":{id:"openai/gpt-5.2:batch",name:"OpenAI: GPT-5.2 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.875,output:7,cacheRead:.0875,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.3-codex":{id:"openai/gpt-5.3-codex",name:"OpenAI: GPT-5.3-Codex",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.4":{id:"openai/gpt-5.4",name:"OpenAI: GPT-5.4",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:2.5,output:15,cacheRead:.25,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.4-mini":{id:"openai/gpt-5.4-mini",name:"OpenAI: GPT-5.4 Mini",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.75,output:4.5,cacheRead:.075,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.4-mini:batch":{id:"openai/gpt-5.4-mini:batch",name:"OpenAI: GPT-5.4 Mini (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.375,output:2.25,cacheRead:.0375,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.4-nano":{id:"openai/gpt-5.4-nano",name:"OpenAI: GPT-5.4 Nano",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.2,output:1.25,cacheRead:.02,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.4-nano:batch":{id:"openai/gpt-5.4-nano:batch",name:"OpenAI: GPT-5.4 Nano (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.1,output:.625,cacheRead:.01,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.4-pro":{id:"openai/gpt-5.4-pro",name:"OpenAI: GPT-5.4 Pro",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:30,output:180,cacheRead:0,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.4-pro:batch":{id:"openai/gpt-5.4-pro:batch",name:"OpenAI: GPT-5.4 Pro (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:15,output:90,cacheRead:0,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.4:batch":{id:"openai/gpt-5.4:batch",name:"OpenAI: GPT-5.4 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.25,output:7.5,cacheRead:.125,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.5":{id:"openai/gpt-5.5",name:"OpenAI: GPT-5.5",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.5-pro":{id:"openai/gpt-5.5-pro",name:"OpenAI: GPT-5.5 Pro",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:30,output:180,cacheRead:0,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh",off:null,minimal:null,low:null}},"openai/gpt-5.5-pro:batch":{id:"openai/gpt-5.5-pro:batch",name:"OpenAI: GPT-5.5 Pro (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:15,output:90,cacheRead:0,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.5:batch":{id:"openai/gpt-5.5:batch",name:"OpenAI: GPT-5.5 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:2.5,output:15,cacheRead:.25,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.6-luna":{id:"openai/gpt-5.6-luna",name:"OpenAI: GPT-5.6 Luna",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.1,output:.6,cacheRead:.01,cacheWrite:.125},contextWindow:105e4,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"openai/gpt-5.6-luna-pro":{id:"openai/gpt-5.6-luna-pro",name:"OpenAI: GPT-5.6 Luna Pro",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.1,output:.6,cacheRead:.01,cacheWrite:.125},contextWindow:105e4,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"openai/gpt-5.6-luna-pro:batch":{id:"openai/gpt-5.6-luna-pro:batch",name:"OpenAI: GPT-5.6 Luna Pro (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.1,output:.6,cacheRead:.01,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"openai/gpt-5.6-luna:batch":{id:"openai/gpt-5.6-luna:batch",name:"OpenAI: GPT-5.6 Luna (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.1,output:.6,cacheRead:.01,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"openai/gpt-5.6-sol":{id:"openai/gpt-5.6-sol",name:"OpenAI: GPT-5.6 Sol",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:6.25},contextWindow:105e4,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"openai/gpt-5.6-sol-pro":{id:"openai/gpt-5.6-sol-pro",name:"OpenAI: GPT-5.6 Sol Pro",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:6.25},contextWindow:105e4,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"openai/gpt-5.6-sol-pro:batch":{id:"openai/gpt-5.6-sol-pro:batch",name:"OpenAI: GPT-5.6 Sol Pro (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:2.5,output:15,cacheRead:.25,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"openai/gpt-5.6-sol:batch":{id:"openai/gpt-5.6-sol:batch",name:"OpenAI: GPT-5.6 Sol (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:2.5,output:15,cacheRead:.25,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"openai/gpt-5.6-terra":{id:"openai/gpt-5.6-terra",name:"OpenAI: GPT-5.6 Terra",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1,output:6,cacheRead:.1,cacheWrite:1.25},contextWindow:105e4,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"openai/gpt-5.6-terra-pro":{id:"openai/gpt-5.6-terra-pro",name:"OpenAI: GPT-5.6 Terra Pro",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1,output:6,cacheRead:.1,cacheWrite:1.25},contextWindow:105e4,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"openai/gpt-5.6-terra-pro:batch":{id:"openai/gpt-5.6-terra-pro:batch",name:"OpenAI: GPT-5.6 Terra Pro (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1,output:6,cacheRead:.1,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"openai/gpt-5.6-terra:batch":{id:"openai/gpt-5.6-terra:batch",name:"OpenAI: GPT-5.6 Terra (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1,output:6,cacheRead:.1,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,compat:{thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh",max:"max"}},"openai/gpt-5:batch":{id:"openai/gpt-5:batch",name:"OpenAI: GPT-5 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.625,output:5,cacheRead:.0625,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"}},"openai/gpt-audio":{id:"openai/gpt-audio",name:"OpenAI: GPT Audio",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:2.5,output:10,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{thinkingFormat:"openrouter"}},"openai/gpt-audio-mini":{id:"openai/gpt-audio-mini",name:"OpenAI: GPT Audio Mini",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.6,output:2.4,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:16384,compat:{thinkingFormat:"openrouter"}},"openai/gpt-chat-latest":{id:"openai/gpt-chat-latest",name:"OpenAI: GPT Chat Latest",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{thinkingFormat:"openrouter"}},"openai/gpt-oss-120b":{id:"openai/gpt-oss-120b",name:"OpenAI: gpt-oss-120b",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.037,output:.17,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:131072,compat:{thinkingFormat:"openrouter"}},"openai/gpt-oss-20b":{id:"openai/gpt-oss-20b",name:"OpenAI: gpt-oss-20b",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.03,output:.13,cacheRead:.03,cacheWrite:0},contextWindow:131072,maxTokens:131072,compat:{thinkingFormat:"openrouter"}},"openai/gpt-oss-20b:free":{id:"openai/gpt-oss-20b:free",name:"OpenAI: gpt-oss-20b (free)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:32768,compat:{thinkingFormat:"openrouter"}},"openai/gpt-oss-safeguard-20b":{id:"openai/gpt-oss-safeguard-20b",name:"OpenAI: gpt-oss-safeguard-20b",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.075,output:.3,cacheRead:.0375,cacheWrite:0},contextWindow:131072,maxTokens:65536,compat:{thinkingFormat:"openrouter"}},"openai/o1":{id:"openai/o1",name:"OpenAI: o1",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:15,output:60,cacheRead:7.5,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,compat:{thinkingFormat:"openrouter"}},"openai/o1:batch":{id:"openai/o1:batch",name:"OpenAI: o1 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:7.5,output:30,cacheRead:3.75,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,compat:{thinkingFormat:"openrouter"}},"openai/o3":{id:"openai/o3",name:"OpenAI: o3",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:2,output:8,cacheRead:.5,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,compat:{thinkingFormat:"openrouter"}},"openai/o3-mini":{id:"openai/o3-mini",name:"OpenAI: o3 Mini",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:1.1,output:4.4,cacheRead:.55,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,compat:{thinkingFormat:"openrouter"}},"openai/o3-mini-high":{id:"openai/o3-mini-high",name:"OpenAI: o3 Mini High",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:1.1,output:4.4,cacheRead:.55,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,compat:{thinkingFormat:"openrouter"}},"openai/o3-mini-high:batch":{id:"openai/o3-mini-high:batch",name:"OpenAI: o3 Mini High (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.55,output:2.2,cacheRead:.275,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,compat:{thinkingFormat:"openrouter"}},"openai/o3-mini:batch":{id:"openai/o3-mini:batch",name:"OpenAI: o3 Mini (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.55,output:2.2,cacheRead:.275,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,compat:{thinkingFormat:"openrouter"}},"openai/o3-pro":{id:"openai/o3-pro",name:"OpenAI: o3 Pro",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:20,output:80,cacheRead:0,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,compat:{thinkingFormat:"openrouter"}},"openai/o3-pro:batch":{id:"openai/o3-pro:batch",name:"OpenAI: o3 Pro (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:10,output:40,cacheRead:0,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,compat:{thinkingFormat:"openrouter"}},"openai/o3:batch":{id:"openai/o3:batch",name:"OpenAI: o3 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1,output:4,cacheRead:.25,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,compat:{thinkingFormat:"openrouter"}},"openai/o4-mini":{id:"openai/o4-mini",name:"OpenAI: o4 Mini",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.1,output:4.4,cacheRead:.275,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,compat:{thinkingFormat:"openrouter"}},"openai/o4-mini-high":{id:"openai/o4-mini-high",name:"OpenAI: o4 Mini High",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.1,output:4.4,cacheRead:.275,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,compat:{thinkingFormat:"openrouter"}},"openai/o4-mini-high:batch":{id:"openai/o4-mini-high:batch",name:"OpenAI: o4 Mini High (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.55,output:2.2,cacheRead:.1375,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,compat:{thinkingFormat:"openrouter"}},"openai/o4-mini:batch":{id:"openai/o4-mini:batch",name:"OpenAI: o4 Mini (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.55,output:2.2,cacheRead:.1375,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,compat:{thinkingFormat:"openrouter"}},"openrouter/auto":{id:"openrouter/auto",name:"Auto Router",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:-1e6,output:-1e6,cacheRead:0,cacheWrite:0},contextWindow:2e6,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"openrouter/auto-beta":{id:"openrouter/auto-beta",name:"Auto Router (Beta)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:-1e6,output:-1e6,cacheRead:0,cacheWrite:0},contextWindow:2e6,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"openrouter/free":{id:"openrouter/free",name:"Free Models Router",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:2e5,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"openrouter/fusion":{id:"openrouter/fusion",name:"OpenRouter: Fusion",api:"openai-completions",provider:"openrouter",baseUrl:"https://openrouter.ai/api/v1",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:3e4,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"poolside/laguna-s-2.1":{id:"poolside/laguna-s-2.1",name:"Poolside: Laguna S 2.1",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.09,output:.18,cacheRead:.009,cacheWrite:0},contextWindow:1048576,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"poolside/laguna-s-2.1:free":{id:"poolside/laguna-s-2.1:free",name:"Poolside: Laguna S 2.1 (free)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"poolside/laguna-xs-2.1":{id:"poolside/laguna-xs-2.1",name:"Poolside: Laguna XS 2.1",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.06,output:.12,cacheRead:.03,cacheWrite:0},contextWindow:262144,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"poolside/laguna-xs-2.1:free":{id:"poolside/laguna-xs-2.1:free",name:"Poolside: Laguna XS 2.1 (free)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen-2.5-72b-instruct":{id:"qwen/qwen-2.5-72b-instruct",name:"Qwen2.5 72B Instruct",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.36,output:.4,cacheRead:0,cacheWrite:0},contextWindow:32768,maxTokens:16384,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen-2.5-7b-instruct":{id:"qwen/qwen-2.5-7b-instruct",name:"Qwen: Qwen2.5 7B Instruct",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.1,output:.2,cacheRead:0,cacheWrite:0},contextWindow:32768,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen-plus":{id:"qwen/qwen-plus",name:"Qwen: Qwen-Plus",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.26,output:.78,cacheRead:.052,cacheWrite:.325},contextWindow:1e6,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen-plus-2025-07-28":{id:"qwen/qwen-plus-2025-07-28",name:"Qwen: Qwen Plus 0728",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.26,output:.78,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen-plus-2025-07-28:thinking":{id:"qwen/qwen-plus-2025-07-28:thinking",name:"Qwen: Qwen Plus 0728 (thinking)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.4,output:1.2,cacheRead:0,cacheWrite:.5},contextWindow:1e6,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-14b":{id:"qwen/qwen3-14b",name:"Qwen: Qwen3 14B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.12,output:.24,cacheRead:0,cacheWrite:0},contextWindow:40960,maxTokens:16384,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-235b-a22b":{id:"qwen/qwen3-235b-a22b",name:"Qwen: Qwen3 235B A22B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.455,output:1.82,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:8192,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-235b-a22b-2507":{id:"qwen/qwen3-235b-a22b-2507",name:"Qwen: Qwen3 235B A22B Instruct 2507",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.09,output:.55,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:16384,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-235b-a22b-thinking-2507":{id:"qwen/qwen3-235b-a22b-thinking-2507",name:"Qwen: Qwen3 235B A22B Thinking 2507",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.23,output:2.3,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-30b-a3b":{id:"qwen/qwen3-30b-a3b",name:"Qwen: Qwen3 30B A3B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.12,output:.5,cacheRead:0,cacheWrite:0},contextWindow:40960,maxTokens:16384,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-30b-a3b-instruct-2507":{id:"qwen/qwen3-30b-a3b-instruct-2507",name:"Qwen: Qwen3 30B A3B Instruct 2507",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.04815,output:.19305,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:32e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-30b-a3b-thinking-2507":{id:"qwen/qwen3-30b-a3b-thinking-2507",name:"Qwen: Qwen3 30B A3B Thinking 2507",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.2,output:2.4,cacheRead:0,cacheWrite:0},contextWindow:81920,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-32b":{id:"qwen/qwen3-32b",name:"Qwen: Qwen3 32B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.08,output:.28,cacheRead:0,cacheWrite:0},contextWindow:40960,maxTokens:16384,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-8b":{id:"qwen/qwen3-8b",name:"Qwen: Qwen3 8B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.117,output:.455,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:8192,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-coder":{id:"qwen/qwen3-coder",name:"Qwen: Qwen3 Coder 480B A35B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.3,output:1,cacheRead:.1,cacheWrite:0},contextWindow:262144,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-coder-30b-a3b-instruct":{id:"qwen/qwen3-coder-30b-a3b-instruct",name:"Qwen: Qwen3 Coder 30B A3B Instruct",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.07,output:.28,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-coder-flash":{id:"qwen/qwen3-coder-flash",name:"Qwen: Qwen3 Coder Flash",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.195,output:.975,cacheRead:.039,cacheWrite:.24375},contextWindow:1e6,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-coder-next":{id:"qwen/qwen3-coder-next",name:"Qwen: Qwen3 Coder Next",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.12,output:.8,cacheRead:.07,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-coder-plus":{id:"qwen/qwen3-coder-plus",name:"Qwen: Qwen3 Coder Plus",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.65,output:3.25,cacheRead:.13,cacheWrite:.8125},contextWindow:1e6,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-max":{id:"qwen/qwen3-max",name:"Qwen: Qwen3 Max",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.78,output:3.9,cacheRead:.156,cacheWrite:.975},contextWindow:262144,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-max-thinking":{id:"qwen/qwen3-max-thinking",name:"Qwen: Qwen3 Max Thinking",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.78,output:3.9,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-next-80b-a3b-instruct":{id:"qwen/qwen3-next-80b-a3b-instruct",name:"Qwen: Qwen3 Next 80B A3B Instruct",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.09,output:1.1,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:16384,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-next-80b-a3b-thinking":{id:"qwen/qwen3-next-80b-a3b-thinking",name:"Qwen: Qwen3 Next 80B A3B Thinking",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.15,output:1.2,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-vl-235b-a22b-instruct":{id:"qwen/qwen3-vl-235b-a22b-instruct",name:"Qwen: Qwen3 VL 235B A22B Instruct",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.21,output:1.9,cacheRead:.1,cacheWrite:0},contextWindow:131072,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-vl-235b-a22b-thinking":{id:"qwen/qwen3-vl-235b-a22b-thinking",name:"Qwen: Qwen3 VL 235B A22B Thinking",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.4,output:4,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-vl-30b-a3b-instruct":{id:"qwen/qwen3-vl-30b-a3b-instruct",name:"Qwen: Qwen3 VL 30B A3B Instruct",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.15,output:.6,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:16384,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-vl-30b-a3b-thinking":{id:"qwen/qwen3-vl-30b-a3b-thinking",name:"Qwen: Qwen3 VL 30B A3B Thinking",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.2,output:2.4,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-vl-32b-instruct":{id:"qwen/qwen3-vl-32b-instruct",name:"Qwen: Qwen3 VL 32B Instruct",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.104,output:.416,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-vl-8b-instruct":{id:"qwen/qwen3-vl-8b-instruct",name:"Qwen: Qwen3 VL 8B Instruct",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.117,output:.455,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3-vl-8b-thinking":{id:"qwen/qwen3-vl-8b-thinking",name:"Qwen: Qwen3 VL 8B Thinking",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.18,output:2.1,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3.5-122b-a10b":{id:"qwen/qwen3.5-122b-a10b",name:"Qwen: Qwen3.5-122B-A10B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.29,output:2.4,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:81920,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3.5-27b":{id:"qwen/qwen3.5-27b",name:"Qwen: Qwen3.5-27B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.195,output:1.56,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3.5-35b-a3b":{id:"qwen/qwen3.5-35b-a3b",name:"Qwen: Qwen3.5-35B-A3B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.14,output:1,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3.5-397b-a17b":{id:"qwen/qwen3.5-397b-a17b",name:"Qwen: Qwen3.5 397B A17B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.5,output:3.6,cacheRead:.3,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3.5-9b":{id:"qwen/qwen3.5-9b",name:"Qwen: Qwen3.5-9B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.1,output:.15,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3.5-flash-02-23":{id:"qwen/qwen3.5-flash-02-23",name:"Qwen: Qwen3.5-Flash",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.065,output:.26,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3.5-plus-02-15":{id:"qwen/qwen3.5-plus-02-15",name:"Qwen: Qwen3.5 Plus 2026-02-15",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.26,output:1.56,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3.5-plus-20260420":{id:"qwen/qwen3.5-plus-20260420",name:"Qwen: Qwen3.5 Plus 2026-04-20",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.3,output:1.8,cacheRead:0,cacheWrite:.375},contextWindow:1e6,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3.6-27b":{id:"qwen/qwen3.6-27b",name:"Qwen: Qwen3.6 27B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.6,output:3.6,cacheRead:.12,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3.6-35b-a3b":{id:"qwen/qwen3.6-35b-a3b",name:"Qwen: Qwen3.6 35B A3B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.15,output:1,cacheRead:.05,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3.6-flash":{id:"qwen/qwen3.6-flash",name:"Qwen: Qwen3.6 Flash",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.1875,output:1.125,cacheRead:0,cacheWrite:.234375},contextWindow:1e6,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3.6-max-preview":{id:"qwen/qwen3.6-max-preview",name:"Qwen: Qwen3.6 Max Preview",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:1.027,output:6.162,cacheRead:0,cacheWrite:1.28375},contextWindow:262144,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3.6-plus":{id:"qwen/qwen3.6-plus",name:"Qwen: Qwen3.6 Plus",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.325,output:1.95,cacheRead:0,cacheWrite:.40625},contextWindow:1e6,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3.7-flash":{id:"qwen/qwen3.7-flash",name:"Qwen: Qwen3.7 Flash",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.03,output:.13,cacheRead:.006,cacheWrite:.038},contextWindow:1e6,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3.7-max":{id:"qwen/qwen3.7-max",name:"Qwen: Qwen3.7 Max",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:1.475,output:4.425,cacheRead:.295,cacheWrite:1.84375},contextWindow:1e6,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3.7-plus":{id:"qwen/qwen3.7-plus",name:"Qwen: Qwen3.7 Plus",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.32,output:1.28,cacheRead:.064,cacheWrite:.4},contextWindow:1e6,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"qwen/qwen3.8-max":{id:"qwen/qwen3.8-max",name:"Qwen: Qwen3.8 Max",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:2,output:6,cacheRead:.25,cacheWrite:2.5},contextWindow:1e6,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"rekaai/reka-edge":{id:"rekaai/reka-edge",name:"Reka Edge",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text","image"],cost:{input:.1,output:.1,cacheRead:0,cacheWrite:0},contextWindow:16384,maxTokens:16384,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"relace/relace-search":{id:"relace/relace-search",name:"Relace: Relace Search",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:1,output:3,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:128e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"sakana/fugu-ultra":{id:"sakana/fugu-ultra",name:"Sakana: Fugu Ultra",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:0},contextWindow:1e6,maxTokens:128e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"sakana/sakana-namazu":{id:"sakana/sakana-namazu",name:"Sakana: Sakana Namazu",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:.15,cacheWrite:0},contextWindow:262144,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"sao10k/l3.1-euryale-70b":{id:"sao10k/l3.1-euryale-70b",name:"Sao10K: Llama 3.1 Euryale 70B v2.2",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.85,output:.85,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:16384,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"stepfun/step-3.5-flash":{id:"stepfun/step-3.5-flash",name:"StepFun: Step 3.5 Flash",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.1,output:.3,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"stepfun/step-3.7-flash":{id:"stepfun/step-3.7-flash",name:"StepFun: Step 3.7 Flash",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.2,output:1.15,cacheRead:.04,cacheWrite:0},contextWindow:256e3,maxTokens:256e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"tencent/hy3":{id:"tencent/hy3",name:"Tencent: Hy3",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.132,output:.528,cacheRead:.033,cacheWrite:0},contextWindow:262144,maxTokens:128e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"tencent/hy3-preview":{id:"tencent/hy3-preview",name:"Tencent: Hy3 preview",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.063,output:.21,cacheRead:.021,cacheWrite:0},contextWindow:262144,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"thedrummer/unslopnemo-12b":{id:"thedrummer/unslopnemo-12b",name:"TheDrummer: UnslopNemo 12B",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!1,input:["text"],cost:{input:.4,output:.4,cacheRead:0,cacheWrite:0},contextWindow:1024e3,maxTokens:1024e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"thinkingmachines/inkling":{id:"thinkingmachines/inkling",name:"Thinking Machines: Inkling",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.95,output:4.05,cacheRead:.16,cacheWrite:0},contextWindow:524288,maxTokens:262144,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"thinkingmachines/inkling-small":{id:"thinkingmachines/inkling-small",name:"Thinking Machines: Inkling Small",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.45,output:1.2,cacheRead:.1,cacheWrite:0},contextWindow:524288,maxTokens:262144,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"thinkingmachines/inkling:batch":{id:"thinkingmachines/inkling:batch",name:"Thinking Machines: Inkling (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.5,output:2.025,cacheRead:.085,cacheWrite:0},contextWindow:524288,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"upstage/solar-pro-3":{id:"upstage/solar-pro-3",name:"Upstage: Solar Pro 3",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.15,output:.6,cacheRead:.015,cacheWrite:0},contextWindow:131072,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"upstage/solar-pro4":{id:"upstage/solar-pro4",name:"Upstage: Solar Pro 4",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.03,output:.12,cacheRead:.006,cacheWrite:0},contextWindow:524288,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"x-ai/grok-4.20":{id:"x-ai/grok-4.20",name:"SpaceXAI: Grok 4.20",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.25,output:2.5,cacheRead:.2,cacheWrite:0},contextWindow:2e6,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"x-ai/grok-4.3":{id:"x-ai/grok-4.3",name:"SpaceXAI: Grok 4.3",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.25,output:2.5,cacheRead:.2,cacheWrite:0},contextWindow:1e6,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"x-ai/grok-4.5":{id:"x-ai/grok-4.5",name:"SpaceXAI: Grok 4.5",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:2,output:6,cacheRead:.3,cacheWrite:0},contextWindow:5e5,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"x-ai/grok-build-0.1":{id:"x-ai/grok-build-0.1",name:"SpaceXAI: Grok Build 0.1",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1,output:2,cacheRead:.2,cacheWrite:0},contextWindow:256e3,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"xiaomi/mimo-v2.5":{id:"xiaomi/mimo-v2.5",name:"Xiaomi: MiMo-V2.5",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.14,output:.28,cacheRead:.0028,cacheWrite:0},contextWindow:1048576,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"xiaomi/mimo-v2.5-pro":{id:"xiaomi/mimo-v2.5-pro",name:"Xiaomi: MiMo-V2.5-Pro",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.435,output:.87,cacheRead:.0036,cacheWrite:0},contextWindow:1048576,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"z-ai/glm-4.5":{id:"z-ai/glm-4.5",name:"Z.ai: GLM 4.5",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.6,output:2.2,cacheRead:.11,cacheWrite:0},contextWindow:131072,maxTokens:98304,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"z-ai/glm-4.5-air":{id:"z-ai/glm-4.5-air",name:"Z.ai: GLM 4.5 Air",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.13,output:.85,cacheRead:.025,cacheWrite:0},contextWindow:131072,maxTokens:98304,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"z-ai/glm-4.5v":{id:"z-ai/glm-4.5v",name:"Z.ai: GLM 4.5V",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.6,output:1.8,cacheRead:.11,cacheWrite:0},contextWindow:65536,maxTokens:16384,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"z-ai/glm-4.6":{id:"z-ai/glm-4.6",name:"Z.ai: GLM 4.6",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.5,output:2,cacheRead:.1,cacheWrite:0},contextWindow:202752,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"z-ai/glm-4.6v":{id:"z-ai/glm-4.6v",name:"Z.ai: GLM 4.6V",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.3,output:.9,cacheRead:.055,cacheWrite:0},contextWindow:131072,maxTokens:32768,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"z-ai/glm-4.7":{id:"z-ai/glm-4.7",name:"Z.ai: GLM 4.7",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.4,output:1.75,cacheRead:.08,cacheWrite:0},contextWindow:202752,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"z-ai/glm-4.7-flash":{id:"z-ai/glm-4.7-flash",name:"Z.ai: GLM 4.7 Flash",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.06,output:.4,cacheRead:.01,cacheWrite:0},contextWindow:202752,maxTokens:16384,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"z-ai/glm-5":{id:"z-ai/glm-5",name:"Z.ai: GLM 5",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.6,output:1.9,cacheRead:.119,cacheWrite:0},contextWindow:204800,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"z-ai/glm-5-turbo":{id:"z-ai/glm-5-turbo",name:"Z.ai: GLM 5 Turbo",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:1.2,output:4,cacheRead:.24,cacheWrite:0},contextWindow:202752,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"z-ai/glm-5.1":{id:"z-ai/glm-5.1",name:"Z.ai: GLM 5.1",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:1.4,output:4.4,cacheRead:.26,cacheWrite:0},contextWindow:202752,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"z-ai/glm-5.2":{id:"z-ai/glm-5.2",name:"Z.ai: GLM 5.2",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.76,output:2.42,cacheRead:.14,cacheWrite:0},contextWindow:262144,maxTokens:262144,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"},thinkingLevelMap:{xhigh:"xhigh"}},"z-ai/glm-5.2:batch":{id:"z-ai/glm-5.2:batch",name:"Z.ai: GLM 5.2 (batch)",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.7,output:2.2,cacheRead:.13,cacheWrite:0},contextWindow:512e3,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"z-ai/glm-5v-turbo":{id:"z-ai/glm-5v-turbo",name:"Z.ai: GLM 5V Turbo",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.2,output:4,cacheRead:.24,cacheWrite:0},contextWindow:202752,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"~anthropic/claude-fable-latest":{id:"~anthropic/claude-fable-latest",name:"Anthropic: Claude Fable Latest",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:10,output:50,cacheRead:1,cacheWrite:12.5},contextWindow:1e6,maxTokens:128e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter",cacheControlFormat:"anthropic"}},"~anthropic/claude-haiku-latest":{id:"~anthropic/claude-haiku-latest",name:"Anthropic Claude Haiku Latest",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1,output:5,cacheRead:.1,cacheWrite:1.25},contextWindow:2e5,maxTokens:64e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter",cacheControlFormat:"anthropic"}},"~anthropic/claude-opus-latest":{id:"~anthropic/claude-opus-latest",name:"Anthropic: Claude Opus Latest",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter",cacheControlFormat:"anthropic"}},"~anthropic/claude-sonnet-latest":{id:"~anthropic/claude-sonnet-latest",name:"Anthropic Claude Sonnet Latest",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:2,output:10,cacheRead:.2,cacheWrite:2.5},contextWindow:1e6,maxTokens:128e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter",cacheControlFormat:"anthropic"}},"~deepseek/deepseek-v4-flash-latest":{id:"~deepseek/deepseek-v4-flash-latest",name:"DeepSeek V4 Flash Latest",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text"],cost:{input:.079996,output:.252,cacheRead:.0252,cacheWrite:0},contextWindow:1048576,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter",requiresReasoningContentOnAssistantMessages:!0},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",max:null,xhigh:"xhigh"}},"~google/gemini-flash-latest":{id:"~google/gemini-flash-latest",name:"Google Gemini Flash Latest",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:1.5,output:7.5,cacheRead:.15,cacheWrite:.083333},contextWindow:1048576,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"~google/gemini-pro-latest":{id:"~google/gemini-pro-latest",name:"Google Gemini Pro Latest",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:2,output:12,cacheRead:.2,cacheWrite:.375},contextWindow:1048576,maxTokens:65536,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"~moonshotai/kimi-latest":{id:"~moonshotai/kimi-latest",name:"MoonshotAI Kimi Latest",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:2.8,output:14,cacheRead:.29,cacheWrite:0},contextWindow:1048576,maxTokens:131072,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"~openai/gpt-latest":{id:"~openai/gpt-latest",name:"OpenAI GPT Latest",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:6.25},contextWindow:105e4,maxTokens:128e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"~openai/gpt-mini-latest":{id:"~openai/gpt-mini-latest",name:"OpenAI GPT Mini Latest",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:.75,output:4.5,cacheRead:.075,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}},"~x-ai/grok-latest":{id:"~x-ai/grok-latest",name:"xAI: Grok Latest",api:"openai-completions",baseUrl:"https://openrouter.ai/api/v1",provider:"openrouter",reasoning:!0,input:["text","image"],cost:{input:2,output:6,cacheRead:.3,cacheWrite:0},contextWindow:5e5,maxTokens:4096,compat:{supportsDeveloperRole:!1,thinkingFormat:"openrouter"}}}};var j1=J("openrouter",B1);var q1={"openai-completions":{"MiniMax-M2.5":{id:"MiniMax-M2.5",name:"MiniMax-M2.5",api:"openai-completions",provider:"qwen-token-plan",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:196608,maxTokens:32768},"deepseek-v3.2":{id:"deepseek-v3.2",name:"DeepSeek V3.2",api:"openai-completions",provider:"qwen-token-plan",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:65536},"deepseek-v4-flash":{id:"deepseek-v4-flash",name:"DeepSeek V4 Flash",api:"openai-completions",provider:"qwen-token-plan",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!0},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:384e3},"deepseek-v4-flash-0731":{id:"deepseek-v4-flash-0731",name:"DeepSeek V4 Flash 0731",api:"openai-completions",provider:"qwen-token-plan",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!0},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:384e3},"deepseek-v4-pro":{id:"deepseek-v4-pro",name:"DeepSeek V4 Pro",api:"openai-completions",provider:"qwen-token-plan",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!0},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:384e3},"glm-5":{id:"glm-5",name:"GLM-5",api:"openai-completions",provider:"qwen-token-plan",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!0},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:202752,maxTokens:16384},"glm-5.1":{id:"glm-5.1",name:"GLM-5.1",api:"openai-completions",provider:"qwen-token-plan",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!0},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:202752,maxTokens:128e3},"glm-5.2":{id:"glm-5.2",name:"GLM-5.2",api:"openai-completions",provider:"qwen-token-plan",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!0},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:131072},"kimi-k2.5":{id:"kimi-k2.5",name:"Kimi K2.5",api:"openai-completions",provider:"qwen-token-plan",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:98304},"kimi-k2.6":{id:"kimi-k2.6",name:"Kimi K2.6",api:"openai-completions",provider:"qwen-token-plan",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:262144},"kimi-k2.7-code":{id:"kimi-k2.7-code",name:"Kimi K2.7 Code",api:"openai-completions",provider:"qwen-token-plan",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:262144},"qwen3.6-flash":{id:"qwen3.6-flash",name:"Qwen3.6 Flash",api:"openai-completions",provider:"qwen-token-plan",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:65536},"qwen3.6-plus":{id:"qwen3.6-plus",name:"Qwen3.6 Plus",api:"openai-completions",provider:"qwen-token-plan",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:65536},"qwen3.7-max":{id:"qwen3.7-max",name:"Qwen3.7 Max",api:"openai-completions",provider:"qwen-token-plan",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:131072},"qwen3.7-plus":{id:"qwen3.7-plus",name:"Qwen3.7 Plus",api:"openai-completions",provider:"qwen-token-plan",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:65536},"qwen3.8-max":{id:"qwen3.8-max",name:"Qwen3.8 Max",api:"openai-completions",provider:"qwen-token-plan",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!0},thinkingLevelMap:{minimal:null,low:"low",medium:"medium",high:null,xhigh:"xhigh",max:null},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:131072}}};var G1=J("qwen-token-plan",q1);var K1={"openai-completions":{"MiniMax-M2.5":{id:"MiniMax-M2.5",name:"MiniMax-M2.5",api:"openai-completions",provider:"qwen-token-plan-cn",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:196608,maxTokens:32768},"deepseek-v3.2":{id:"deepseek-v3.2",name:"DeepSeek V3.2",api:"openai-completions",provider:"qwen-token-plan-cn",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:65536},"deepseek-v4-flash":{id:"deepseek-v4-flash",name:"DeepSeek V4 Flash",api:"openai-completions",provider:"qwen-token-plan-cn",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!0},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:384e3},"deepseek-v4-flash-0731":{id:"deepseek-v4-flash-0731",name:"DeepSeek V4 Flash 0731",api:"openai-completions",provider:"qwen-token-plan-cn",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!0},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:384e3},"deepseek-v4-pro":{id:"deepseek-v4-pro",name:"DeepSeek V4 Pro",api:"openai-completions",provider:"qwen-token-plan-cn",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!0},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:384e3},"glm-5":{id:"glm-5",name:"GLM-5",api:"openai-completions",provider:"qwen-token-plan-cn",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!0},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:202752,maxTokens:16384},"glm-5.1":{id:"glm-5.1",name:"GLM-5.1",api:"openai-completions",provider:"qwen-token-plan-cn",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!0},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:202752,maxTokens:128e3},"glm-5.2":{id:"glm-5.2",name:"GLM-5.2",api:"openai-completions",provider:"qwen-token-plan-cn",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!0},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:131072},"kimi-k2.5":{id:"kimi-k2.5",name:"Kimi K2.5",api:"openai-completions",provider:"qwen-token-plan-cn",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:98304},"kimi-k2.6":{id:"kimi-k2.6",name:"Kimi K2.6",api:"openai-completions",provider:"qwen-token-plan-cn",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:262144},"kimi-k2.7-code":{id:"kimi-k2.7-code",name:"Kimi K2.7 Code",api:"openai-completions",provider:"qwen-token-plan-cn",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:262144},"qwen3.6-flash":{id:"qwen3.6-flash",name:"Qwen3.6 Flash",api:"openai-completions",provider:"qwen-token-plan-cn",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:65536},"qwen3.6-plus":{id:"qwen3.6-plus",name:"Qwen3.6 Plus",api:"openai-completions",provider:"qwen-token-plan-cn",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:65536},"qwen3.7-max":{id:"qwen3.7-max",name:"Qwen3.7 Max",api:"openai-completions",provider:"qwen-token-plan-cn",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:131072},"qwen3.7-plus":{id:"qwen3.7-plus",name:"Qwen3.7 Plus",api:"openai-completions",provider:"qwen-token-plan-cn",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:65536},"qwen3.8-max":{id:"qwen3.8-max",name:"Qwen3.8 Max",api:"openai-completions",provider:"qwen-token-plan-cn",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!0},thinkingLevelMap:{minimal:null,low:"low",medium:"medium",high:null,xhigh:"xhigh",max:null},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:131072}}};var H1=J("qwen-token-plan-cn",K1);var z1={"openai-completions":{"deepseek-v4-flash-0731":{id:"deepseek-v4-flash-0731",name:"DeepSeek V4 Flash 0731",api:"openai-completions",provider:"qwen-token-plan-individual",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!0},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:384e3},"deepseek-v4-pro":{id:"deepseek-v4-pro",name:"DeepSeek V4 Pro",api:"openai-completions",provider:"qwen-token-plan-individual",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!0},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:384e3},"glm-5.2":{id:"glm-5.2",name:"GLM-5.2",api:"openai-completions",provider:"qwen-token-plan-individual",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!0},thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",xhigh:null,max:"max"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:131072},"qwen3.6-flash":{id:"qwen3.6-flash",name:"Qwen3.6 Flash",api:"openai-completions",provider:"qwen-token-plan-individual",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:65536},"qwen3.7-max":{id:"qwen3.7-max",name:"Qwen3.7 Max",api:"openai-completions",provider:"qwen-token-plan-individual",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:131072},"qwen3.7-plus":{id:"qwen3.7-plus",name:"Qwen3.7 Plus",api:"openai-completions",provider:"qwen-token-plan-individual",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!1},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:65536},"qwen3.8-max":{id:"qwen3.8-max",name:"Qwen3.8 Max",api:"openai-completions",provider:"qwen-token-plan-individual",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",compat:{thinkingFormat:"qwen",supportsDeveloperRole:!1,supportsStore:!1,supportsReasoningEffort:!0},thinkingLevelMap:{minimal:null,low:"low",medium:"medium",high:null,xhigh:"xhigh",max:null},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:131072}}};var V1=J("qwen-token-plan-individual",z1);var Q1={"openai-completions":{"MiniMaxAI/MiniMax-M2.7":{id:"MiniMaxAI/MiniMax-M2.7",name:"MiniMax-M2.7",api:"openai-completions",provider:"together",baseUrl:"https://api.together.ai/v1",reasoning:!0,thinkingLevelMap:{off:null,minimal:null,low:null,medium:null},input:["text"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:202752,maxTokens:131072},"MiniMaxAI/MiniMax-M3":{id:"MiniMaxAI/MiniMax-M3",name:"MiniMax-M3",api:"openai-completions",provider:"together",baseUrl:"https://api.together.ai/v1",reasoning:!0,thinkingLevelMap:{minimal:null,low:null,medium:null},input:["text","image"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"together",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:524288,maxTokens:25e4},"Qwen/Qwen2.5-7B-Instruct-Turbo":{id:"Qwen/Qwen2.5-7B-Instruct-Turbo",name:"Qwen 2.5 7B Instruct Turbo",api:"openai-completions",provider:"together",baseUrl:"https://api.together.ai/v1",reasoning:!1,input:["text"],cost:{input:.3,output:.3,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"together",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:32768,maxTokens:32768},"Qwen/Qwen3.5-9B":{id:"Qwen/Qwen3.5-9B",name:"Qwen3.5 9B",api:"openai-completions",provider:"together",baseUrl:"https://api.together.ai/v1",reasoning:!0,thinkingLevelMap:{minimal:null,low:null,medium:null},input:["text","image"],cost:{input:.17,output:.25,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"together",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:262144,maxTokens:65536},"Qwen/Qwen3.6-Plus":{id:"Qwen/Qwen3.6-Plus",name:"Qwen3.6 Plus",api:"openai-completions",provider:"together",baseUrl:"https://api.together.ai/v1",reasoning:!0,thinkingLevelMap:{minimal:null,low:null,medium:null},input:["text"],cost:{input:.5,output:3,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"together",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:1e6,maxTokens:5e5},"Qwen/Qwen3.7-Max":{id:"Qwen/Qwen3.7-Max",name:"Qwen3.7 Max",api:"openai-completions",provider:"together",baseUrl:"https://api.together.ai/v1",reasoning:!1,input:["text"],cost:{input:1.25,output:3.75,cacheRead:.125,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"together",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:1e6,maxTokens:5e5},"deepseek-ai/DeepSeek-V4-Flash-0731":{id:"deepseek-ai/DeepSeek-V4-Flash-0731",name:"DeepSeek V4 Flash 0731",api:"openai-completions",provider:"together",baseUrl:"https://api.together.ai/v1",reasoning:!0,thinkingLevelMap:{minimal:null,low:null,medium:null},input:["text"],cost:{input:.14,output:.28,cacheRead:.03,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"together",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:1e6,maxTokens:384e3},"deepseek-ai/DeepSeek-V4-Pro":{id:"deepseek-ai/DeepSeek-V4-Pro",name:"DeepSeek V4 Pro",api:"openai-completions",provider:"together",baseUrl:"https://api.together.ai/v1",reasoning:!0,thinkingLevelMap:{minimal:null,low:null,medium:null,high:"high",xhigh:null},input:["text"],cost:{input:1.74,output:3.48,cacheRead:.2,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!0,maxTokensField:"max_tokens",thinkingFormat:"together",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:512e3,maxTokens:384e3},"google/gemma-4-31B-it":{id:"google/gemma-4-31B-it",name:"Gemma 4 31B Instruct",api:"openai-completions",provider:"together",baseUrl:"https://api.together.ai/v1",reasoning:!0,thinkingLevelMap:{minimal:null,low:null,medium:null},input:["text","image"],cost:{input:.39,output:.97,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"together",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:262144,maxTokens:131072},"meta-llama/Llama-3.3-70B-Instruct-Turbo":{id:"meta-llama/Llama-3.3-70B-Instruct-Turbo",name:"Llama 3.3 70B",api:"openai-completions",provider:"together",baseUrl:"https://api.together.ai/v1",reasoning:!1,input:["text"],cost:{input:1.04,output:1.04,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"together",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:131072,maxTokens:131072},"moonshotai/Kimi-K2.6":{id:"moonshotai/Kimi-K2.6",name:"Kimi K2.6",api:"openai-completions",provider:"together",baseUrl:"https://api.together.ai/v1",reasoning:!0,thinkingLevelMap:{minimal:null,low:null,medium:null},input:["text","image"],cost:{input:1.2,output:4.5,cacheRead:.2,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"together",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:262144,maxTokens:131e3},"moonshotai/Kimi-K2.7-Code":{id:"moonshotai/Kimi-K2.7-Code",name:"Kimi K2.7 Code",api:"openai-completions",provider:"together",baseUrl:"https://api.together.ai/v1",reasoning:!0,thinkingLevelMap:{minimal:null,low:null,medium:null},input:["text"],cost:{input:.95,output:4,cacheRead:.19,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"together",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:262144,maxTokens:131072},"moonshotai/Kimi-K3":{id:"moonshotai/Kimi-K3",name:"Kimi K3",api:"openai-completions",provider:"together",baseUrl:"https://api.together.ai/v1",reasoning:!0,thinkingLevelMap:{minimal:null,low:null,medium:null},input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"together",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:1048576,maxTokens:131072},"nvidia/nemotron-3-ultra-550b-a55b":{id:"nvidia/nemotron-3-ultra-550b-a55b",name:"Nemotron 3 Ultra 550B A55B",api:"openai-completions",provider:"together",baseUrl:"https://api.together.ai/v1",reasoning:!0,thinkingLevelMap:{minimal:null,low:null,medium:null},input:["text"],cost:{input:.6,output:3.6,cacheRead:.2,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"together",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:512300,maxTokens:512300},"openai/gpt-oss-120b":{id:"openai/gpt-oss-120b",name:"GPT OSS 120B",api:"openai-completions",provider:"together",baseUrl:"https://api.together.ai/v1",reasoning:!0,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},input:["text"],cost:{input:.15,output:.6,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!0,maxTokensField:"max_tokens",thinkingFormat:"openai",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:131072,maxTokens:131072},"openai/gpt-oss-20b":{id:"openai/gpt-oss-20b",name:"GPT OSS 20B",api:"openai-completions",provider:"together",baseUrl:"https://api.together.ai/v1",reasoning:!0,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null},input:["text"],cost:{input:.05,output:.2,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!0,maxTokensField:"max_tokens",thinkingFormat:"openai",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:131072,maxTokens:131072},"thinkingmachines/Inkling":{id:"thinkingmachines/Inkling",name:"Inkling",api:"openai-completions",provider:"together",baseUrl:"https://api.together.ai/v1",reasoning:!0,thinkingLevelMap:{minimal:null,low:null,medium:null},input:["text","image"],cost:{input:1,output:4.05,cacheRead:.17,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"together",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:524288,maxTokens:131072},"zai-org/GLM-5.2":{id:"zai-org/GLM-5.2",name:"GLM-5.2",api:"openai-completions",provider:"together",baseUrl:"https://api.together.ai/v1",reasoning:!0,thinkingLevelMap:{minimal:null,low:null,medium:null},input:["text"],cost:{input:1.4,output:4.4,cacheRead:.26,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"together",supportsStrictMode:!1,supportsLongCacheRetention:!1},contextWindow:512e3,maxTokens:164e3}}};var J1=J("together",Q1);var Y1={"anthropic-messages":{"alibaba/qwen-3-14b":{id:"alibaba/qwen-3-14b",name:"Qwen3-14B",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.12,output:.24,cacheRead:0,cacheWrite:0},contextWindow:40960,maxTokens:16384},"alibaba/qwen-3-235b":{id:"alibaba/qwen-3-235b",name:"Qwen3 235B A22B",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.22,output:.88,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:16384},"alibaba/qwen-3-30b":{id:"alibaba/qwen-3-30b",name:"Qwen3-30B-A3B",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.12,output:.5,cacheRead:0,cacheWrite:0},contextWindow:40960,maxTokens:16384},"alibaba/qwen-3-32b":{id:"alibaba/qwen-3-32b",name:"Qwen 3 32B",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.16,output:.64,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:8192},"alibaba/qwen-3.6-max-preview":{id:"alibaba/qwen-3.6-max-preview",name:"Qwen 3.6 Max Preview",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:1.3,output:7.8,cacheRead:.26,cacheWrite:1.625},contextWindow:24e4,maxTokens:64e3},"alibaba/qwen3-235b-a22b-thinking":{id:"alibaba/qwen3-235b-a22b-thinking",name:"Qwen3 VL 235B A22B Thinking",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.4,output:4,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:32768},"alibaba/qwen3-coder":{id:"alibaba/qwen3-coder",name:"Qwen3 Coder 480B A35B Instruct",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:1.5,output:7.5,cacheRead:.3,cacheWrite:0},contextWindow:262144,maxTokens:65536},"alibaba/qwen3-coder-30b-a3b":{id:"alibaba/qwen3-coder-30b-a3b",name:"Qwen 3 Coder 30B A3B Instruct",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:.15,output:.6,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:8192},"alibaba/qwen3-coder-next":{id:"alibaba/qwen3-coder-next",name:"Qwen3 Coder Next",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:.5,output:1.2,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:256e3},"alibaba/qwen3-coder-plus":{id:"alibaba/qwen3-coder-plus",name:"Qwen3 Coder Plus",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:1,output:5,cacheRead:.2,cacheWrite:0},contextWindow:1e6,maxTokens:65536},"alibaba/qwen3-max":{id:"alibaba/qwen3-max",name:"Qwen3 Max",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:1.2,output:6,cacheRead:.24,cacheWrite:0},contextWindow:262144,maxTokens:32768},"alibaba/qwen3-max-preview":{id:"alibaba/qwen3-max-preview",name:"Qwen3 Max Preview",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:1.2,output:6,cacheRead:.24,cacheWrite:0},contextWindow:262144,maxTokens:32768},"alibaba/qwen3-max-thinking":{id:"alibaba/qwen3-max-thinking",name:"Qwen 3 Max Thinking",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:1.2,output:6,cacheRead:.24,cacheWrite:0},contextWindow:256e3,maxTokens:65536},"alibaba/qwen3-next-80b-a3b-instruct":{id:"alibaba/qwen3-next-80b-a3b-instruct",name:"Qwen3 Next 80B A3B Instruct",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:.15,output:1.2,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:32768},"alibaba/qwen3-next-80b-a3b-thinking":{id:"alibaba/qwen3-next-80b-a3b-thinking",name:"Qwen3 Next 80B A3B Thinking",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.15,output:1.2,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:32768},"alibaba/qwen3-vl-235b-a22b-instruct":{id:"alibaba/qwen3-vl-235b-a22b-instruct",name:"Qwen3 VL 235B A22B Instruct",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:.4,output:1.6,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:129024},"alibaba/qwen3-vl-instruct":{id:"alibaba/qwen3-vl-instruct",name:"Qwen3 VL 235B A22B Instruct",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:.4,output:1.6,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:129024},"alibaba/qwen3-vl-thinking":{id:"alibaba/qwen3-vl-thinking",name:"Qwen3 VL 235B A22B Thinking",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.4,output:4,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:32768},"alibaba/qwen3.5-flash":{id:"alibaba/qwen3.5-flash",name:"Qwen 3.5 Flash",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.1,output:.4,cacheRead:.001,cacheWrite:.125},contextWindow:1e6,maxTokens:64e3},"alibaba/qwen3.5-plus":{id:"alibaba/qwen3.5-plus",name:"Qwen 3.5 Plus",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.4,output:2.4,cacheRead:.04,cacheWrite:.5},contextWindow:1e6,maxTokens:64e3},"alibaba/qwen3.6-27b":{id:"alibaba/qwen3.6-27b",name:"Qwen 3.6 27B",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.6,output:3.6,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:256e3},"alibaba/qwen3.6-plus":{id:"alibaba/qwen3.6-plus",name:"Qwen 3.6 Plus",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.5,output:3,cacheRead:.1,cacheWrite:.625},contextWindow:1e6,maxTokens:64e3},"alibaba/qwen3.7-flash":{id:"alibaba/qwen3.7-flash",name:"Qwen 3.7 Flash",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.03,output:.13,cacheRead:.006,cacheWrite:.038},contextWindow:991e3,maxTokens:64e3},"alibaba/qwen3.7-max":{id:"alibaba/qwen3.7-max",name:"Qwen 3.7 Max",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:2.5,output:7.5,cacheRead:.5,cacheWrite:3.125},contextWindow:991e3,maxTokens:64e3},"alibaba/qwen3.7-plus":{id:"alibaba/qwen3.7-plus",name:"Qwen 3.7 Plus",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.4,output:1.6,cacheRead:.08,cacheWrite:.5},contextWindow:1e6,maxTokens:64e3},"alibaba/qwen3.8-max":{id:"alibaba/qwen3.8-max",name:"Qwen 3.8 Max",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:2,output:6,cacheRead:.25,cacheWrite:2.5},contextWindow:1e6,maxTokens:128e3},"amazon/nova-2-lite":{id:"amazon/nova-2-lite",name:"Nova 2 Lite",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.3,output:2.5,cacheRead:.075,cacheWrite:0},contextWindow:1e6,maxTokens:1e6},"amazon/nova-lite":{id:"amazon/nova-lite",name:"Nova Lite",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:.06,output:.24,cacheRead:0,cacheWrite:0},contextWindow:3e5,maxTokens:8192},"amazon/nova-micro":{id:"amazon/nova-micro",name:"Nova Micro",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:.035,output:.14,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:8192},"amazon/nova-pro":{id:"amazon/nova-pro",name:"Nova Pro",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:.8,output:3.2,cacheRead:0,cacheWrite:0},contextWindow:3e5,maxTokens:8192},"anthropic/claude-3-haiku":{id:"anthropic/claude-3-haiku",name:"Claude 3 Haiku",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:.25,output:1.25,cacheRead:.03,cacheWrite:.3},contextWindow:2e5,maxTokens:4096},"anthropic/claude-fable-5":{id:"anthropic/claude-fable-5",name:"Claude Fable 5",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:10,output:50,cacheRead:1,cacheWrite:12.5},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{off:null,xhigh:"xhigh",max:"max"},compat:{forceAdaptiveThinking:!0}},"anthropic/claude-haiku-4.5":{id:"anthropic/claude-haiku-4.5",name:"Claude Haiku 4.5",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1,output:5,cacheRead:.1,cacheWrite:1.25},contextWindow:2e5,maxTokens:64e3},"anthropic/claude-opus-4":{id:"anthropic/claude-opus-4",name:"Claude Opus 4",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:15,output:75,cacheRead:1.5,cacheWrite:18.75},contextWindow:2e5,maxTokens:8192},"anthropic/claude-opus-4.5":{id:"anthropic/claude-opus-4.5",name:"Claude Opus 4.5",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:2e5,maxTokens:64e3},"anthropic/claude-opus-4.6":{id:"anthropic/claude-opus-4.6",name:"Claude Opus 4.6",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{max:"max"},compat:{forceAdaptiveThinking:!0}},"anthropic/claude-opus-4.7":{id:"anthropic/claude-opus-4.7",name:"Claude Opus 4.7",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"},compat:{forceAdaptiveThinking:!0,supportsTemperature:!1}},"anthropic/claude-opus-4.8":{id:"anthropic/claude-opus-4.8",name:"Claude Opus 4.8",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"},compat:{forceAdaptiveThinking:!0,supportsTemperature:!1}},"anthropic/claude-opus-4.8-fast":{id:"anthropic/claude-opus-4.8-fast",name:"Claude Opus 4.8 (Fast)",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:10,output:50,cacheRead:1,cacheWrite:12.5},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"},compat:{forceAdaptiveThinking:!0,supportsTemperature:!1}},"anthropic/claude-opus-5":{id:"anthropic/claude-opus-5",name:"Claude Opus 5",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"},compat:{forceAdaptiveThinking:!0,supportsTemperature:!1}},"anthropic/claude-opus-5-fast":{id:"anthropic/claude-opus-5-fast",name:"Claude Opus 5 (Fast)",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:10,output:50,cacheRead:1,cacheWrite:12.5},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"},compat:{forceAdaptiveThinking:!0,supportsTemperature:!1}},"anthropic/claude-sonnet-4":{id:"anthropic/claude-sonnet-4",name:"Claude Sonnet 4",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:1e6,maxTokens:8192},"anthropic/claude-sonnet-4.5":{id:"anthropic/claude-sonnet-4.5",name:"Claude Sonnet 4.5",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:1e6,maxTokens:64e3},"anthropic/claude-sonnet-4.6":{id:"anthropic/claude-sonnet-4.6",name:"Claude Sonnet 4.6",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{max:"max"},compat:{forceAdaptiveThinking:!0}},"anthropic/claude-sonnet-5":{id:"anthropic/claude-sonnet-5",name:"Claude Sonnet 5",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:2,output:10,cacheRead:.2,cacheWrite:2.5},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",max:"max"},compat:{forceAdaptiveThinking:!0}},"arcee-ai/trinity-large-thinking":{id:"arcee-ai/trinity-large-thinking",name:"Trinity Large Thinking",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.25,output:.9,cacheRead:0,cacheWrite:0},contextWindow:262100,maxTokens:8e4},"arcee-ai/trinity-mini":{id:"arcee-ai/trinity-mini",name:"Trinity Mini",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:.045,output:.15,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:131072},"bytedance/seed-1.6":{id:"bytedance/seed-1.6",name:"Seed 1.6",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.25,output:2,cacheRead:.05,cacheWrite:0},contextWindow:256e3,maxTokens:32e3},"bytedance/seed-1.8":{id:"bytedance/seed-1.8",name:"Bytedance Seed 1.8",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.25,output:2,cacheRead:.05,cacheWrite:0},contextWindow:256e3,maxTokens:64e3},"cohere/command-a":{id:"cohere/command-a",name:"Command A",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:2.5,output:10,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:8e3},"deepseek/deepseek-r1":{id:"deepseek/deepseek-r1",name:"DeepSeek-R1",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:1.35,output:5.4,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:8192},"deepseek/deepseek-v3":{id:"deepseek/deepseek-v3",name:"DeepSeek V3 0324",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:.27,output:1.12,cacheRead:.135,cacheWrite:0},contextWindow:163840,maxTokens:163840},"deepseek/deepseek-v3.1":{id:"deepseek/deepseek-v3.1",name:"DeepSeek V3.1",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.25,output:.95,cacheRead:.13,cacheWrite:0},contextWindow:163840,maxTokens:128e3},"deepseek/deepseek-v3.1-terminus":{id:"deepseek/deepseek-v3.1-terminus",name:"DeepSeek V3.1 Terminus",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.27,output:1,cacheRead:.135,cacheWrite:0},contextWindow:131072,maxTokens:65536},"deepseek/deepseek-v3.2":{id:"deepseek/deepseek-v3.2",name:"DeepSeek V3.2",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:.28,output:.42,cacheRead:.028,cacheWrite:0},contextWindow:128e3,maxTokens:8e3},"deepseek/deepseek-v3.2-thinking":{id:"deepseek/deepseek-v3.2-thinking",name:"DeepSeek V3.2 Thinking",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:.62,output:1.85,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:8e3},"deepseek/deepseek-v4-flash":{id:"deepseek/deepseek-v4-flash",name:"DeepSeek V4 Flash",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.2,output:.4,cacheRead:.04,cacheWrite:0},contextWindow:1e6,maxTokens:384e3},"deepseek/deepseek-v4-flash-0731":{id:"deepseek/deepseek-v4-flash-0731",name:"DeepSeek V4 Flash 0731",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.2,output:.4,cacheRead:.04,cacheWrite:0},contextWindow:1e6,maxTokens:384e3},"deepseek/deepseek-v4-pro":{id:"deepseek/deepseek-v4-pro",name:"DeepSeek V4 Pro",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:1.74,output:3.48,cacheRead:.14,cacheWrite:0},contextWindow:1048600,maxTokens:1048600},"google/gemini-2.5-flash":{id:"google/gemini-2.5-flash",name:"Gemini 2.5 Flash",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.3,output:2.5,cacheRead:.03,cacheWrite:0},contextWindow:1e6,maxTokens:65536},"google/gemini-2.5-flash-lite":{id:"google/gemini-2.5-flash-lite",name:"Gemini 2.5 Flash Lite",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.1,output:.4,cacheRead:.01,cacheWrite:0},contextWindow:1048576,maxTokens:65536},"google/gemini-2.5-pro":{id:"google/gemini-2.5-pro",name:"Gemini 2.5 Pro",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:0},contextWindow:1048576,maxTokens:65536},"google/gemini-3-flash":{id:"google/gemini-3-flash",name:"Gemini 3 Flash",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.5,output:3,cacheRead:.05,cacheWrite:0},contextWindow:1e6,maxTokens:65e3},"google/gemini-3.1-flash-lite":{id:"google/gemini-3.1-flash-lite",name:"Gemini 3.1 Flash Lite",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.25,output:1.5,cacheRead:.03,cacheWrite:0},contextWindow:1e6,maxTokens:65e3},"google/gemini-3.1-pro-preview":{id:"google/gemini-3.1-pro-preview",name:"Gemini 3.1 Pro Preview",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:2,output:12,cacheRead:.2,cacheWrite:0},contextWindow:1e6,maxTokens:64e3},"google/gemini-3.5-flash":{id:"google/gemini-3.5-flash",name:"Gemini 3.5 Flash",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.5,output:9,cacheRead:.15,cacheWrite:0},contextWindow:1e6,maxTokens:64e3},"google/gemini-3.5-flash-lite":{id:"google/gemini-3.5-flash-lite",name:"Gemini 3.5 Flash Lite",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.3,output:2.5,cacheRead:.03,cacheWrite:0},contextWindow:1e6,maxTokens:65e3},"google/gemini-3.6-flash":{id:"google/gemini-3.6-flash",name:"Gemini 3.6 Flash",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.5,output:7.5,cacheRead:.15,cacheWrite:0},contextWindow:1e6,maxTokens:64e3},"google/gemma-4-26b-a4b-it":{id:"google/gemma-4-26b-a4b-it",name:"Gemma 4 26B A4B IT",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.15,output:.6,cacheRead:.015,cacheWrite:0},contextWindow:262144,maxTokens:131072},"google/gemma-4-31b-it":{id:"google/gemma-4-31b-it",name:"Gemma 4 31B IT",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.14,output:.4,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:131072},"inception/mercury-2":{id:"inception/mercury-2",name:"Mercury 2",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.25,output:.75,cacheRead:.025,cacheWrite:0},contextWindow:128e3,maxTokens:128e3},"inception/mercury-coder-small":{id:"inception/mercury-coder-small",name:"Mercury Coder Small Beta",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:.25,output:1,cacheRead:0,cacheWrite:0},contextWindow:32e3,maxTokens:16384},"inclusionai/ling-3.0-flash":{id:"inclusionai/ling-3.0-flash",name:"Ling 3.0 Flash",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.06,output:.18,cacheRead:.012,cacheWrite:0},contextWindow:256e3,maxTokens:32e3},"inclusionai/ling-3.0-tiny-free":{id:"inclusionai/ling-3.0-tiny-free",name:"Ling 3.0 Tiny (Free)",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:32e3},"interfaze/interfaze-beta":{id:"interfaze/interfaze-beta",name:"Interfaze Beta",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.5,output:3.5,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:32e3},"kwaipilot/kat-coder-air-v2.5":{id:"kwaipilot/kat-coder-air-v2.5",name:"Kat Coder Air V2.5",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.15,output:.6,cacheRead:.03,cacheWrite:0},contextWindow:256e3,maxTokens:8e4},"kwaipilot/kat-coder-pro-v1":{id:"kwaipilot/kat-coder-pro-v1",name:"KAT-Coder-Pro V1",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:0},contextWindow:256e3,maxTokens:32e3},"kwaipilot/kat-coder-pro-v2":{id:"kwaipilot/kat-coder-pro-v2",name:"Kat Coder Pro V2",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:0},contextWindow:256e3,maxTokens:256e3},"kwaipilot/kat-coder-pro-v2.5":{id:"kwaipilot/kat-coder-pro-v2.5",name:"Kat Coder Pro V2.5",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.74,output:2.96,cacheRead:.15,cacheWrite:0},contextWindow:256e3,maxTokens:8e4},"meta/llama-3.1-70b":{id:"meta/llama-3.1-70b",name:"Llama 3.1 70B Instruct",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:.72,output:.72,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:8192},"meta/llama-3.1-8b":{id:"meta/llama-3.1-8b",name:"Llama 3.1 8B Instruct",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:.22,output:.22,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:8192},"meta/llama-3.3-70b":{id:"meta/llama-3.3-70b",name:"Llama 3.3 70B Instruct",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:.72,output:.72,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:8192},"meta/llama-4-maverick":{id:"meta/llama-4-maverick",name:"Llama 4 Maverick 17B Instruct",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:.24,output:.97,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:8192},"meta/llama-4-scout":{id:"meta/llama-4-scout",name:"Llama 4 Scout 17B Instruct",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:.17,output:.66,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:8192},"meta/muse-spark-1.1":{id:"meta/muse-spark-1.1",name:"Muse Spark 1.1",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.25,output:4.25,cacheRead:.15,cacheWrite:0},contextWindow:1048576,maxTokens:1048576},"meta/muse-spark-1.2":{id:"meta/muse-spark-1.2",name:"Muse Spark 1.2",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.25,output:4.25,cacheRead:.15,cacheWrite:0},contextWindow:1048576,maxTokens:1048576},"meta/muse-spark-1.2-contributor":{id:"meta/muse-spark-1.2-contributor",name:"Muse Spark 1.2 Contributor",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.1,output:.2,cacheRead:.002,cacheWrite:0},contextWindow:1048576,maxTokens:1048576},"minimax/minimax-m2":{id:"minimax/minimax-m2",name:"MiniMax M2",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:.03,cacheWrite:.375},contextWindow:205e3,maxTokens:205e3},"minimax/minimax-m2.1":{id:"minimax/minimax-m2.1",name:"MiniMax M2.1",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:.03,cacheWrite:.375},contextWindow:204800,maxTokens:131072},"minimax/minimax-m2.1-lightning":{id:"minimax/minimax-m2.1-lightning",name:"MiniMax M2.1 Lightning",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.3,output:2.4,cacheRead:.03,cacheWrite:.375},contextWindow:204800,maxTokens:131072},"minimax/minimax-m2.5":{id:"minimax/minimax-m2.5",name:"MiniMax M2.5",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:.03,cacheWrite:.375},contextWindow:204800,maxTokens:131e3},"minimax/minimax-m2.5-highspeed":{id:"minimax/minimax-m2.5-highspeed",name:"MiniMax M2.5 High Speed",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.6,output:2.4,cacheRead:.03,cacheWrite:.375},contextWindow:204800,maxTokens:131e3},"minimax/minimax-m2.7":{id:"minimax/minimax-m2.7",name:"Minimax M2.7",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:.375},contextWindow:204800,maxTokens:131e3},"minimax/minimax-m2.7-highspeed":{id:"minimax/minimax-m2.7-highspeed",name:"MiniMax M2.7 High Speed",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.6,output:2.4,cacheRead:.06,cacheWrite:.375},contextWindow:204800,maxTokens:131100},"minimax/minimax-m3":{id:"minimax/minimax-m3",name:"MiniMax M3",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.3,output:1.2,cacheRead:.06,cacheWrite:0},contextWindow:1e6,maxTokens:1e6},"mistral/codestral":{id:"mistral/codestral",name:"Mistral Codestral",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:.3,output:.9,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4e3},"mistral/devstral-2":{id:"mistral/devstral-2",name:"Devstral 2",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:.4,output:2,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:256e3},"mistral/devstral-small-2":{id:"mistral/devstral-small-2",name:"Devstral Small 2",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:.1,output:.3,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:256e3},"mistral/magistral-medium":{id:"mistral/magistral-medium",name:"Magistral Medium 2509",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:2,output:5,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:64e3},"mistral/magistral-small":{id:"mistral/magistral-small",name:"Magistral Small 2509",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.5,output:1.5,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:64e3},"mistral/ministral-14b":{id:"mistral/ministral-14b",name:"Ministral 14B",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:.2,output:.2,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:256e3},"mistral/ministral-3b":{id:"mistral/ministral-3b",name:"Ministral 3B",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:.1,output:.1,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4e3},"mistral/ministral-8b":{id:"mistral/ministral-8b",name:"Ministral 8B",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:.15,output:.15,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4e3},"mistral/mistral-large-3":{id:"mistral/mistral-large-3",name:"Mistral Large 3",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:.5,output:1.5,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:256e3},"mistral/mistral-medium":{id:"mistral/mistral-medium",name:"Mistral Medium 3.1",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:.4,output:2,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:64e3},"mistral/mistral-medium-3.5":{id:"mistral/mistral-medium-3.5",name:"Mistral Medium Latest",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.5,output:7.5,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:256e3},"mistral/mistral-nemo":{id:"mistral/mistral-nemo",name:"Mistral Nemo 12B",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:.15,output:.15,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:128e3},"mistral/mistral-small":{id:"mistral/mistral-small",name:"Mistral Small",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:.1,output:.3,cacheRead:0,cacheWrite:0},contextWindow:32e3,maxTokens:4e3},"mistral/pixtral-12b":{id:"mistral/pixtral-12b",name:"Pixtral 12B 2409",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:.15,output:.15,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4e3},"moonshotai/kimi-k2":{id:"moonshotai/kimi-k2",name:"Kimi K2 Instruct",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:.57,output:2.3,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:131072},"moonshotai/kimi-k2-thinking":{id:"moonshotai/kimi-k2-thinking",name:"Kimi K2 Thinking",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.47,output:2,cacheRead:.141,cacheWrite:0},contextWindow:216144,maxTokens:216144},"moonshotai/kimi-k2.5":{id:"moonshotai/kimi-k2.5",name:"Kimi K2.5",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.6,output:3,cacheRead:.1,cacheWrite:0},contextWindow:262114,maxTokens:262114},"moonshotai/kimi-k2.6":{id:"moonshotai/kimi-k2.6",name:"Kimi K2.6",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:.16,cacheWrite:0},contextWindow:262e3,maxTokens:262e3},"moonshotai/kimi-k2.7-code":{id:"moonshotai/kimi-k2.7-code",name:"Kimi K2.7 Code",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.95,output:4,cacheRead:.19,cacheWrite:0},contextWindow:256e3,maxTokens:32768},"moonshotai/kimi-k2.7-code-highspeed":{id:"moonshotai/kimi-k2.7-code-highspeed",name:"Kimi K2.7 Code High Speed",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.9,output:8,cacheRead:.38,cacheWrite:0},contextWindow:262144,maxTokens:32768},"moonshotai/kimi-k3":{id:"moonshotai/kimi-k3",name:"Kimi K3",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:0},contextWindow:1e6,maxTokens:131072},"moonshotai/kimi-k3-fast":{id:"moonshotai/kimi-k3-fast",name:"Kimi K3 Fast",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:4.5,output:22.5,cacheRead:.45,cacheWrite:0},contextWindow:1e6,maxTokens:131072},"nvidia/nemotron-3-nano-30b-a3b":{id:"nvidia/nemotron-3-nano-30b-a3b",name:"Nemotron 3 Nano 30B A3B",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.05,output:.24,cacheRead:0,cacheWrite:0},contextWindow:262144,maxTokens:262144},"nvidia/nemotron-3-super-120b-a12b":{id:"nvidia/nemotron-3-super-120b-a12b",name:"NVIDIA Nemotron 3 Super 120B A12B",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.15,output:.65,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:32e3},"nvidia/nemotron-3-ultra-550b-a55b":{id:"nvidia/nemotron-3-ultra-550b-a55b",name:"Nemotron 3 Ultra",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.6,output:2.4,cacheRead:.12,cacheWrite:0},contextWindow:1e6,maxTokens:65e3},"nvidia/nemotron-nano-12b-v2-vl":{id:"nvidia/nemotron-nano-12b-v2-vl",name:"Nvidia Nemotron Nano 12B V2 VL",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.2,output:.6,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:131072},"nvidia/nemotron-nano-9b-v2":{id:"nvidia/nemotron-nano-9b-v2",name:"Nvidia Nemotron Nano 9B V2",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.06,output:.23,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:131072},"openai/gpt-3.5-turbo":{id:"openai/gpt-3.5-turbo",name:"GPT-3.5 Turbo",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text"],cost:{input:.5,output:1.5,cacheRead:0,cacheWrite:0},contextWindow:16385,maxTokens:4096},"openai/gpt-4-turbo":{id:"openai/gpt-4-turbo",name:"GPT-4 Turbo",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:10,output:30,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:4096},"openai/gpt-4.1":{id:"openai/gpt-4.1",name:"GPT-4.1",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:2,output:8,cacheRead:.5,cacheWrite:0},contextWindow:1047576,maxTokens:32768},"openai/gpt-4.1-mini":{id:"openai/gpt-4.1-mini",name:"GPT-4.1 mini",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:.4,output:1.6,cacheRead:.1,cacheWrite:0},contextWindow:1047576,maxTokens:32768},"openai/gpt-4.1-nano":{id:"openai/gpt-4.1-nano",name:"GPT-4.1 nano",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:.1,output:.4,cacheRead:.025,cacheWrite:0},contextWindow:1047576,maxTokens:32768},"openai/gpt-4o":{id:"openai/gpt-4o",name:"GPT-4o",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:2.5,output:10,cacheRead:1.25,cacheWrite:0},contextWindow:128e3,maxTokens:16384},"openai/gpt-4o-mini":{id:"openai/gpt-4o-mini",name:"GPT-4o mini",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:.15,output:.6,cacheRead:.075,cacheWrite:0},contextWindow:128e3,maxTokens:16384},"openai/gpt-5":{id:"openai/gpt-5",name:"GPT-5",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:0},contextWindow:4e5,maxTokens:128e3},"openai/gpt-5-codex":{id:"openai/gpt-5-codex",name:"GPT-5-Codex",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.13,cacheWrite:0},contextWindow:4e5,maxTokens:128e3},"openai/gpt-5-mini":{id:"openai/gpt-5-mini",name:"GPT-5 mini",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.25,output:2,cacheRead:.025,cacheWrite:0},contextWindow:4e5,maxTokens:128e3},"openai/gpt-5-nano":{id:"openai/gpt-5-nano",name:"GPT-5 nano",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.05,output:.4,cacheRead:.005,cacheWrite:0},contextWindow:4e5,maxTokens:128e3},"openai/gpt-5-pro":{id:"openai/gpt-5-pro",name:"GPT-5 pro",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:15,output:120,cacheRead:0,cacheWrite:0},contextWindow:4e5,maxTokens:272e3},"openai/gpt-5.1-codex":{id:"openai/gpt-5.1-codex",name:"GPT-5.1-Codex",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.13,cacheWrite:0},contextWindow:4e5,maxTokens:128e3},"openai/gpt-5.1-codex-max":{id:"openai/gpt-5.1-codex-max",name:"GPT 5.1 Codex Max",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:0},contextWindow:4e5,maxTokens:128e3},"openai/gpt-5.1-codex-mini":{id:"openai/gpt-5.1-codex-mini",name:"GPT 5.1 Codex Mini",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.25,output:2,cacheRead:.03,cacheWrite:0},contextWindow:4e5,maxTokens:128e3},"openai/gpt-5.1-instant":{id:"openai/gpt-5.1-instant",name:"GPT-5.1 Instant",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.13,cacheWrite:0},contextWindow:128e3,maxTokens:16384},"openai/gpt-5.1-thinking":{id:"openai/gpt-5.1-thinking",name:"GPT 5.1 Thinking",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:0},contextWindow:4e5,maxTokens:128e3},"openai/gpt-5.2":{id:"openai/gpt-5.2",name:"GPT 5.2",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.2-codex":{id:"openai/gpt-5.2-codex",name:"GPT 5.2 Codex",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.2-pro":{id:"openai/gpt-5.2-pro",name:"GPT 5.2 ",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:21,output:168,cacheRead:0,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.3-chat":{id:"openai/gpt-5.3-chat",name:"GPT-5.3 Chat",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:128e3,maxTokens:16384,thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.3-codex":{id:"openai/gpt-5.3-codex",name:"GPT 5.3 Codex",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.4":{id:"openai/gpt-5.4",name:"GPT 5.4",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:2.5,output:15,cacheRead:.25,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.4-mini":{id:"openai/gpt-5.4-mini",name:"GPT 5.4 Mini",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.75,output:4.5,cacheRead:.075,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.4-nano":{id:"openai/gpt-5.4-nano",name:"GPT 5.4 Nano",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.2,output:1.25,cacheRead:.02,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.4-pro":{id:"openai/gpt-5.4-pro",name:"GPT 5.4 Pro",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:30,output:180,cacheRead:0,cacheWrite:0},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.5":{id:"openai/gpt-5.5",name:"GPT 5.5",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:0},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.5-pro":{id:"openai/gpt-5.5-pro",name:"GPT 5.5 Pro",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:30,output:180,cacheRead:0,cacheWrite:0},contextWindow:1e6,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh",off:null,minimal:null,low:null}},"openai/gpt-5.6-luna":{id:"openai/gpt-5.6-luna",name:"GPT 5.6 Luna",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.2,output:1.2,cacheRead:.02,cacheWrite:.25},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.6-sol":{id:"openai/gpt-5.6-sol",name:"GPT 5.6 Sol",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:6.25},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-5.6-terra":{id:"openai/gpt-5.6-terra",name:"GPT 5.6 Terra",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:2,output:12,cacheRead:.2,cacheWrite:2.5},contextWindow:105e4,maxTokens:128e3,thinkingLevelMap:{xhigh:"xhigh"}},"openai/gpt-oss-120b":{id:"openai/gpt-oss-120b",name:"GPT OSS 120B",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.1,output:.5,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:131072},"openai/gpt-oss-20b":{id:"openai/gpt-oss-20b",name:"GPT OSS 20B",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.05,output:.2,cacheRead:0,cacheWrite:0},contextWindow:131072,maxTokens:8192},"openai/gpt-oss-safeguard-20b":{id:"openai/gpt-oss-safeguard-20b",name:"GPT OSS Safeguard 20B",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.075,output:.3,cacheRead:.037,cacheWrite:0},contextWindow:131072,maxTokens:65536},"openai/o1":{id:"openai/o1",name:"o1",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:15,output:60,cacheRead:7.5,cacheWrite:0},contextWindow:2e5,maxTokens:1e5},"openai/o3":{id:"openai/o3",name:"o3",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:2,output:8,cacheRead:.5,cacheWrite:0},contextWindow:2e5,maxTokens:1e5},"openai/o3-deep-research":{id:"openai/o3-deep-research",name:"o3-deep-research",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:10,output:40,cacheRead:2.5,cacheWrite:0},contextWindow:2e5,maxTokens:1e5},"openai/o3-mini":{id:"openai/o3-mini",name:"o3-mini",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:1.1,output:4.4,cacheRead:.55,cacheWrite:0},contextWindow:2e5,maxTokens:1e5},"openai/o3-pro":{id:"openai/o3-pro",name:"o3 Pro",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:20,output:80,cacheRead:0,cacheWrite:0},contextWindow:2e5,maxTokens:1e5},"openai/o4-mini":{id:"openai/o4-mini",name:"o4-mini",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.1,output:4.4,cacheRead:.275,cacheWrite:0},contextWindow:2e5,maxTokens:1e5},"poolside/laguna-s-2.1":{id:"poolside/laguna-s-2.1",name:"Laguna S 2.1",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.1,output:.2,cacheRead:.01,cacheWrite:0},contextWindow:1e6,maxTokens:131072},"poolside/laguna-s-2.1-free":{id:"poolside/laguna-s-2.1-free",name:"Laguna S 2.1 Free",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:256e3,maxTokens:32768},"sakana/fugu-ultra":{id:"sakana/fugu-ultra",name:"Fugu Ultra",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:0},contextWindow:1e6,maxTokens:1e6},"stepfun/step-3.5-flash":{id:"stepfun/step-3.5-flash",name:"StepFun 3.5 Flash",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.09,output:.3,cacheRead:.02,cacheWrite:0},contextWindow:262114,maxTokens:262114},"stepfun/step-3.7-flash":{id:"stepfun/step-3.7-flash",name:"Step 3.7 Flash",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.2,output:1.15,cacheRead:.04,cacheWrite:0},contextWindow:256e3,maxTokens:256e3},"tencent/hy3":{id:"tencent/hy3",name:"Hy3",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.14,output:.58,cacheRead:.035,cacheWrite:0},contextWindow:262144,maxTokens:262144},"thinkingmachines/inkling":{id:"thinkingmachines/inkling",name:"Inkling",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1,output:4.05,cacheRead:.17,cacheWrite:0},contextWindow:256e3,maxTokens:256e3},"thinkingmachines/inkling-small":{id:"thinkingmachines/inkling-small",name:"Inkling Small",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.5,output:1.2,cacheRead:.1,cacheWrite:0},contextWindow:1e6,maxTokens:1e6},"xai/grok-4.1-fast-non-reasoning":{id:"xai/grok-4.1-fast-non-reasoning",name:"Grok 4.1 Fast Non-Reasoning",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:.2,output:.5,cacheRead:.05,cacheWrite:0},contextWindow:1e6,maxTokens:1e6},"xai/grok-4.1-fast-reasoning":{id:"xai/grok-4.1-fast-reasoning",name:"Grok 4.1 Fast Reasoning",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.2,output:.5,cacheRead:.05,cacheWrite:0},contextWindow:1e6,maxTokens:1e6},"xai/grok-4.20-multi-agent":{id:"xai/grok-4.20-multi-agent",name:"Grok 4.20 Multi-Agent",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.25,output:2.5,cacheRead:.2,cacheWrite:0},contextWindow:2e6,maxTokens:2e6},"xai/grok-4.20-multi-agent-beta":{id:"xai/grok-4.20-multi-agent-beta",name:"Grok 4.20 Multi Agent Beta",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.25,output:2.5,cacheRead:.2,cacheWrite:0},contextWindow:2e6,maxTokens:2e6},"xai/grok-4.20-non-reasoning":{id:"xai/grok-4.20-non-reasoning",name:"Grok 4.20 Non-Reasoning",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:1.25,output:2.5,cacheRead:.2,cacheWrite:0},contextWindow:2e6,maxTokens:2e6},"xai/grok-4.20-non-reasoning-beta":{id:"xai/grok-4.20-non-reasoning-beta",name:"Grok 4.20 Beta Non-Reasoning",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!1,input:["text","image"],cost:{input:1.25,output:2.5,cacheRead:.2,cacheWrite:0},contextWindow:2e6,maxTokens:2e6},"xai/grok-4.20-reasoning":{id:"xai/grok-4.20-reasoning",name:"Grok 4.20 Reasoning",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.25,output:2.5,cacheRead:.2,cacheWrite:0},contextWindow:2e6,maxTokens:2e6},"xai/grok-4.20-reasoning-beta":{id:"xai/grok-4.20-reasoning-beta",name:"Grok 4.20 Beta Reasoning",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.25,output:2.5,cacheRead:.2,cacheWrite:0},contextWindow:2e6,maxTokens:2e6},"xai/grok-4.3":{id:"xai/grok-4.3",name:"Grok 4.3",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.25,output:2.5,cacheRead:.2,cacheWrite:0},contextWindow:1e6,maxTokens:1e6},"xai/grok-4.5":{id:"xai/grok-4.5",name:"Grok 4.5",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:2,output:6,cacheRead:.3,cacheWrite:0},contextWindow:5e5,maxTokens:5e5},"xai/grok-build-0.1":{id:"xai/grok-build-0.1",name:"Grok Build 0.1",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1,output:2,cacheRead:.2,cacheWrite:0},contextWindow:256e3,maxTokens:256e3},"xiaomi/mimo-v2.5":{id:"xiaomi/mimo-v2.5",name:"MiMo M2.5",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.14,output:.28,cacheRead:.0028,cacheWrite:0},contextWindow:105e4,maxTokens:131100},"xiaomi/mimo-v2.5-pro":{id:"xiaomi/mimo-v2.5-pro",name:"MiMo V2.5 Pro",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.435,output:.87,cacheRead:.0036,cacheWrite:0},contextWindow:105e4,maxTokens:131e3},"zai/glm-4.5":{id:"zai/glm-4.5",name:"GLM 4.5",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.6,output:2.2,cacheRead:.11,cacheWrite:0},contextWindow:128e3,maxTokens:96e3},"zai/glm-4.5-air":{id:"zai/glm-4.5-air",name:"GLM 4.5 Air",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.2,output:1.1,cacheRead:.03,cacheWrite:0},contextWindow:128e3,maxTokens:96e3},"zai/glm-4.5v":{id:"zai/glm-4.5v",name:"GLM 4.5V",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.6,output:1.8,cacheRead:.11,cacheWrite:0},contextWindow:66e3,maxTokens:16e3},"zai/glm-4.6":{id:"zai/glm-4.6",name:"GLM 4.6",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.6,output:2.2,cacheRead:.11,cacheWrite:0},contextWindow:2e5,maxTokens:96e3},"zai/glm-4.6v":{id:"zai/glm-4.6v",name:"GLM-4.6V",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:.3,output:.9,cacheRead:.05,cacheWrite:0},contextWindow:128e3,maxTokens:24e3},"zai/glm-4.6v-flash":{id:"zai/glm-4.6v-flash",name:"GLM-4.6V-Flash",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:128e3,maxTokens:24e3},"zai/glm-4.7":{id:"zai/glm-4.7",name:"GLM 4.7",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.6,output:2.2,cacheRead:.12,cacheWrite:0},contextWindow:2e5,maxTokens:12e4},"zai/glm-4.7-flash":{id:"zai/glm-4.7-flash",name:"GLM 4.7 Flash",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.07,output:.4,cacheRead:0,cacheWrite:0},contextWindow:2e5,maxTokens:131e3},"zai/glm-4.7-flashx":{id:"zai/glm-4.7-flashx",name:"GLM 4.7 FlashX",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:.06,output:.4,cacheRead:.01,cacheWrite:0},contextWindow:2e5,maxTokens:128e3},"zai/glm-5":{id:"zai/glm-5",name:"GLM 5",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:1,output:3.2,cacheRead:0,cacheWrite:0},contextWindow:202800,maxTokens:131100},"zai/glm-5-turbo":{id:"zai/glm-5-turbo",name:"GLM 5 Turbo",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:1.2,output:4,cacheRead:.24,cacheWrite:0},contextWindow:202800,maxTokens:131100},"zai/glm-5.1":{id:"zai/glm-5.1",name:"GLM 5.1",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:1.4,output:4.4,cacheRead:.26,cacheWrite:0},contextWindow:202800,maxTokens:64e3},"zai/glm-5.2":{id:"zai/glm-5.2",name:"GLM 5.2",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:1.1,output:3.851,cacheRead:.275,cacheWrite:0},contextWindow:1e6,maxTokens:128e3},"zai/glm-5.2-fast":{id:"zai/glm-5.2-fast",name:"GLM 5.2 Fast",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text"],cost:{input:2.1,output:6.6,cacheRead:.21,cacheWrite:0},contextWindow:1e6,maxTokens:128e3},"zai/glm-5v-turbo":{id:"zai/glm-5v-turbo",name:"GLM 5V Turbo",api:"anthropic-messages",baseUrl:"https://ai-gateway.vercel.sh",provider:"vercel-ai-gateway",reasoning:!0,input:["text","image"],cost:{input:1.2,output:4,cacheRead:.24,cacheWrite:0},contextWindow:2e5,maxTokens:128e3}}};var X1=J("vercel-ai-gateway",Y1);var Z1={"openai-completions":{"grok-4.3":{id:"grok-4.3",name:"Grok 4.3",api:"openai-completions",provider:"xai",baseUrl:"https://api.x.ai/v1",reasoning:!0,input:["text","image"],cost:{input:1.25,output:2.5,cacheRead:.2,cacheWrite:0},contextWindow:1e6,maxTokens:3e4,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1}},"grok-build-0.1":{id:"grok-build-0.1",name:"Grok Build 0.1",api:"openai-completions",provider:"xai",baseUrl:"https://api.x.ai/v1",reasoning:!0,input:["text","image"],cost:{input:1,output:2,cacheRead:.2,cacheWrite:0},contextWindow:256e3,maxTokens:256e3,compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1}}},"openai-responses":{"grok-4.5":{id:"grok-4.5",name:"Grok 4.5",api:"openai-responses",provider:"xai",baseUrl:"https://api.x.ai/v1",compat:{supportsLongCacheRetention:!1},reasoning:!0,input:["text","image"],cost:{input:2,output:6,cacheRead:.3,cacheWrite:0},contextWindow:5e5,maxTokens:5e5,thinkingLevelMap:{off:null,minimal:null,low:"low",medium:"medium",high:"high",xhigh:null,max:null}}}};var eM=J("xai",Z1);var tM={"openai-completions":{"mimo-v2-flash":{id:"mimo-v2-flash",name:"MiMo-V2-Flash",api:"openai-completions",provider:"xiaomi",baseUrl:"https://api.xiaomimimo.com/v1",compat:{requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"deepseek"},reasoning:!0,input:["text"],cost:{input:.14,output:.28,cacheRead:.0028,cacheWrite:0},contextWindow:262144,maxTokens:65536},"mimo-v2-omni":{id:"mimo-v2-omni",name:"MiMo-V2-Omni",api:"openai-completions",provider:"xiaomi",baseUrl:"https://api.xiaomimimo.com/v1",compat:{requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"deepseek"},reasoning:!0,input:["text","image"],cost:{input:.14,output:.28,cacheRead:.0028,cacheWrite:0},contextWindow:262144,maxTokens:131072},"mimo-v2-pro":{id:"mimo-v2-pro",name:"MiMo-V2-Pro",api:"openai-completions",provider:"xiaomi",baseUrl:"https://api.xiaomimimo.com/v1",compat:{requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"deepseek"},reasoning:!0,input:["text"],cost:{input:.435,output:.87,cacheRead:.0036,cacheWrite:0},contextWindow:1048576,maxTokens:131072},"mimo-v2.5":{id:"mimo-v2.5",name:"MiMo-V2.5",api:"openai-completions",provider:"xiaomi",baseUrl:"https://api.xiaomimimo.com/v1",compat:{requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"deepseek"},reasoning:!0,input:["text","image"],cost:{input:.14,output:.28,cacheRead:.0028,cacheWrite:0},contextWindow:1048576,maxTokens:131072},"mimo-v2.5-pro":{id:"mimo-v2.5-pro",name:"MiMo-V2.5-Pro",api:"openai-completions",provider:"xiaomi",baseUrl:"https://api.xiaomimimo.com/v1",compat:{requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"deepseek"},reasoning:!0,input:["text"],cost:{input:.435,output:.87,cacheRead:.0036,cacheWrite:0},contextWindow:1048576,maxTokens:131072},"mimo-v2.5-pro-ultraspeed":{id:"mimo-v2.5-pro-ultraspeed",name:"MiMo-V2.5-Pro-UltraSpeed",api:"openai-completions",provider:"xiaomi",baseUrl:"https://api.xiaomimimo.com/v1",compat:{requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"deepseek"},reasoning:!0,input:["text"],cost:{input:1.305,output:2.61,cacheRead:.0108,cacheWrite:0},contextWindow:1048576,maxTokens:131072}}};var nM=J("xiaomi",tM);var iM={"openai-completions":{"mimo-v2-pro":{id:"mimo-v2-pro",name:"MiMo-V2-Pro",api:"openai-completions",provider:"xiaomi-token-plan-ams",baseUrl:"https://token-plan-ams.xiaomimimo.com/v1",compat:{requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"deepseek"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1048576,maxTokens:131072},"mimo-v2.5":{id:"mimo-v2.5",name:"MiMo-V2.5",api:"openai-completions",provider:"xiaomi-token-plan-ams",baseUrl:"https://token-plan-ams.xiaomimimo.com/v1",compat:{requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"deepseek"},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1048576,maxTokens:131072},"mimo-v2.5-pro":{id:"mimo-v2.5-pro",name:"MiMo-V2.5-Pro",api:"openai-completions",provider:"xiaomi-token-plan-ams",baseUrl:"https://token-plan-ams.xiaomimimo.com/v1",compat:{requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"deepseek"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1048576,maxTokens:131072}}};var rM=J("xiaomi-token-plan-ams",iM);var oM={"openai-completions":{"mimo-v2-pro":{id:"mimo-v2-pro",name:"MiMo-V2-Pro",api:"openai-completions",provider:"xiaomi-token-plan-cn",baseUrl:"https://token-plan-cn.xiaomimimo.com/v1",compat:{requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"deepseek"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1048576,maxTokens:131072},"mimo-v2.5":{id:"mimo-v2.5",name:"MiMo-V2.5",api:"openai-completions",provider:"xiaomi-token-plan-cn",baseUrl:"https://token-plan-cn.xiaomimimo.com/v1",compat:{requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"deepseek"},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1048576,maxTokens:131072},"mimo-v2.5-pro":{id:"mimo-v2.5-pro",name:"MiMo-V2.5-Pro",api:"openai-completions",provider:"xiaomi-token-plan-cn",baseUrl:"https://token-plan-cn.xiaomimimo.com/v1",compat:{requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"deepseek"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1048576,maxTokens:131072}}};var sM=J("xiaomi-token-plan-cn",oM);var aM={"openai-completions":{"mimo-v2-pro":{id:"mimo-v2-pro",name:"MiMo-V2-Pro",api:"openai-completions",provider:"xiaomi-token-plan-sgp",baseUrl:"https://token-plan-sgp.xiaomimimo.com/v1",compat:{requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"deepseek"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1048576,maxTokens:131072},"mimo-v2.5":{id:"mimo-v2.5",name:"MiMo-V2.5",api:"openai-completions",provider:"xiaomi-token-plan-sgp",baseUrl:"https://token-plan-sgp.xiaomimimo.com/v1",compat:{requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"deepseek"},reasoning:!0,input:["text","image"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1048576,maxTokens:131072},"mimo-v2.5-pro":{id:"mimo-v2.5-pro",name:"MiMo-V2.5-Pro",api:"openai-completions",provider:"xiaomi-token-plan-sgp",baseUrl:"https://token-plan-sgp.xiaomimimo.com/v1",compat:{requiresReasoningContentOnAssistantMessages:!0,thinkingFormat:"deepseek"},reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:1048576,maxTokens:131072}}};var lM=J("xiaomi-token-plan-sgp",aM);var cM={"openai-completions":{"glm-4.7":{id:"glm-4.7",name:"GLM-4.7",api:"openai-completions",provider:"zai",baseUrl:"https://api.z.ai/api/coding/paas/v4",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"zai",zaiToolStream:!0},contextWindow:204800,maxTokens:131072},"glm-5-turbo":{id:"glm-5-turbo",name:"GLM-5-Turbo",api:"openai-completions",provider:"zai",baseUrl:"https://api.z.ai/api/coding/paas/v4",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"zai",zaiToolStream:!0},contextWindow:2e5,maxTokens:131072},"glm-5.2":{id:"glm-5.2",name:"GLM-5.2",api:"openai-completions",provider:"zai",baseUrl:"https://api.z.ai/api/coding/paas/v4",reasoning:!0,thinkingLevelMap:{minimal:null,low:"high",medium:"high",high:"high",max:"max"},input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!0,maxTokensField:"max_tokens",thinkingFormat:"zai",zaiToolStream:!0},contextWindow:1e6,maxTokens:131072},"glm-5.2-highspeed":{id:"glm-5.2-highspeed",name:"GLM-5.2 Highspeed",api:"openai-completions",provider:"zai",baseUrl:"https://api.z.ai/api/coding/paas/v4",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"zai",zaiToolStream:!0},contextWindow:1e6,maxTokens:131072}}};var uM=J("zai",cM);var pM={"openai-completions":{"glm-4.7":{id:"glm-4.7",name:"GLM-4.7",api:"openai-completions",provider:"zai-coding-cn",baseUrl:"https://open.bigmodel.cn/api/coding/paas/v4",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"zai",zaiToolStream:!0},contextWindow:204800,maxTokens:131072},"glm-5-turbo":{id:"glm-5-turbo",name:"GLM-5-Turbo",api:"openai-completions",provider:"zai-coding-cn",baseUrl:"https://open.bigmodel.cn/api/coding/paas/v4",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"zai",zaiToolStream:!0},contextWindow:2e5,maxTokens:131072},"glm-5.2":{id:"glm-5.2",name:"GLM-5.2",api:"openai-completions",provider:"zai-coding-cn",baseUrl:"https://open.bigmodel.cn/api/coding/paas/v4",reasoning:!0,thinkingLevelMap:{minimal:null,low:"high",medium:"high",high:"high",max:"max"},input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!0,maxTokensField:"max_tokens",thinkingFormat:"zai",zaiToolStream:!0},contextWindow:1e6,maxTokens:131072},"glm-5.2-highspeed":{id:"glm-5.2-highspeed",name:"GLM-5.2 Highspeed",api:"openai-completions",provider:"zai-coding-cn",baseUrl:"https://open.bigmodel.cn/api/coding/paas/v4",reasoning:!0,input:["text"],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},compat:{supportsStore:!1,supportsDeveloperRole:!1,supportsReasoningEffort:!1,maxTokensField:"max_tokens",thinkingFormat:"zai",zaiToolStream:!0},contextWindow:1e6,maxTokens:131072}}};var dM=J("zai-coding-cn",pM);xe();xe();var M6={name:"AWS credentials or bearer token",login:async t=>{t.signal.throwIfAborted();let e=await t.prompt({type:"select",message:"Select Amazon Bedrock authentication method:",options:[{id:"bearer-token",label:"Bearer token"},{id:"aws-profile",label:"AWS profile"},{id:"credential-chain",label:"Existing AWS credential chain"}]});if(t.signal.throwIfAborted(),e==="bearer-token")return{type:"api_key",key:await t.prompt({type:"secret",message:"Enter Amazon Bedrock bearer token"})};if(t.notify({type:"info",message:"Amazon Bedrock supports AWS profiles, IAM credentials, and role-based credentials.",links:[{label:"AWS credential provider chain",url:"https://docs.aws.amazon.com/sdkref/latest/guide/standardized-credentials.html"}]}),e==="aws-profile")return{type:"api_key",env:{AWS_PROFILE:await t.prompt({type:"text",message:"Enter AWS profile name"})}};if(e!=="credential-chain")throw new Error(`Unknown Amazon Bedrock auth method: ${e}`);return await t.prompt({type:"text",message:"Configure AWS credentials, then press Enter to continue"}),{type:"api_key"}},resolve:async({ctx:t,credential:e,signal:n})=>{let i=async r=>{n.throwIfAborted();let o=await t.env(r);return n.throwIfAborted(),o};if(e?.key)return{auth:{apiKey:e.key},env:e.env,source:"stored credential"};if(await i("AWS_BEARER_TOKEN_BEDROCK"))return{auth:{},source:"AWS_BEARER_TOKEN_BEDROCK"};if(e?.env?.AWS_PROFILE??await i("AWS_PROFILE"))return{auth:{},env:e?.env,source:e?.env?.AWS_PROFILE?"stored credential":"AWS_PROFILE"};if(await i("AWS_ACCESS_KEY_ID")&&await i("AWS_SECRET_ACCESS_KEY"))return{auth:{},source:"AWS access keys"};if(await i("AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"))return{auth:{},source:"ECS task role"};if(await i("AWS_CONTAINER_CREDENTIALS_FULL_URI"))return{auth:{},source:"ECS task role"};if(await i("AWS_WEB_IDENTITY_TOKEN_FILE"))return{auth:{},source:"web identity token"}}};function mM(){return Q({id:"amazon-bedrock",name:"Amazon Bedrock",auth:{apiKey:M6},models:Object.values(GR),api:zd()})}xe();function hM(){return Q({id:"ant-ling",name:"Ant Ling",baseUrl:"https://api.ant-ling.com/v1",auth:{apiKey:ie("Ant Ling API key",["ANT_LING_API_KEY"])},models:Object.values(HR),api:he()})}var zo=t=>import(import.meta.url.endsWith(".js")?t.replace(/\.ts$/,".js"):t),dn;var gM=async()=>dn?dn.anthropic():(await zo("./anthropic.ts")).anthropicOAuth,fM=async()=>dn?dn.openaiCodex():(await zo("./openai-codex.ts")).openaiCodexOAuth,bM=async()=>dn?dn.githubCopilot():(await zo("./github-copilot.ts")).githubCopilotOAuth,xM=async()=>dn?dn.openrouter():(await zo("./openrouter.ts")).openRouterOAuth,vM=async()=>dn?dn.kimiCoding():(await zo("./kimi-coding.ts")).kimiCodingOAuth,yM=async()=>dn?dn.xai():(await zo("./xai.ts")).xaiOAuth,wM=async t=>dn?dn.radius(t):(await zo("./radius.ts")).createRadiusOAuth(t);xe();function P6(){return{name:"Anthropic API key",login:async t=>{t.signal.throwIfAborted();let e=await t.prompt({type:"secret",message:"Enter Anthropic API key"});return t.signal.throwIfAborted(),{type:"api_key",key:e}},resolve:async({ctx:t,credential:e,signal:n})=>{if(n.throwIfAborted(),e?.key)return{auth:{apiKey:e.key},env:e.env,source:"stored credential"};let i=await t.env(ou);if(n.throwIfAborted(),i)return{auth:{headers:{Authorization:`Bearer ${i}`}},source:ou};for(let r of[pb,db]){let o=await t.env(r);if(n.throwIfAborted(),o)return{auth:{apiKey:o},source:r}}}}}function SM(){return Q({id:"anthropic",name:"Anthropic",baseUrl:"https://api.anthropic.com",auth:{apiKey:P6(),oauth:un({name:"Anthropic (Claude Pro/Max)",isSubscription:!0,load:gM})},models:Object.values(VR),api:dt()})}xe();function TM(){return Q({id:"azure-openai-responses",name:"Azure OpenAI",auth:{apiKey:ie("Azure OpenAI API key",["AZURE_OPENAI_API_KEY"])},models:Object.values(JR),api:Hd()})}xe();function kM(){return Q({id:"baseten",name:"Baseten",baseUrl:"https://inference.baseten.co/v1",auth:{apiKey:ie("Baseten API key",["BASETEN_API_KEY"])},models:Object.values(XR),api:he()})}xe();function CM(){return Q({id:"cerebras",name:"Cerebras",baseUrl:"https://api.cerebras.ai/v1",auth:{apiKey:ie("Cerebras API key",["CEREBRAS_API_KEY"])},models:Object.values(e1),api:he()})}xe();var hb="CLOUDFLARE_API_KEY",I6="CLOUDFLARE_ACCOUNT_ID",A6="CLOUDFLARE_GATEWAY_ID";async function mb(t,e,n,i){let r=n?t===hb?n.key:n.env?.[t]:void 0;if(r!==void 0)return r;i.throwIfAborted();let o=await e.env(t);return i.throwIfAborted(),o}async function RM(t,e,n,i){let r=await mb(hb,e,n,i),o=await mb(I6,e,n,i),s=t==="ai-gateway"?await mb(A6,e,n,i):void 0;if(!(!r||!o||t==="ai-gateway"&&!s))return{apiKey:r,env:{CLOUDFLARE_ACCOUNT_ID:o,...s?{CLOUDFLARE_GATEWAY_ID:s}:{}},source:n?"stored credential":hb}}function MM(){return{name:"Cloudflare API key",login:async t=>{let e=await t.prompt({type:"secret",message:"Enter Cloudflare API key"}),n=await t.prompt({type:"text",message:"Enter Cloudflare account ID"});return{type:"api_key",key:e,env:{CLOUDFLARE_ACCOUNT_ID:n}}},resolve:async({ctx:t,credential:e,signal:n})=>{let i=await RM("workers-ai",t,e,n);if(i)return{auth:{apiKey:i.apiKey},env:i.env,source:i.source}}}}function PM(){return{name:"Cloudflare API key",login:async t=>{let e=await t.prompt({type:"secret",message:"Enter Cloudflare API key"}),n=await t.prompt({type:"text",message:"Enter Cloudflare account ID"}),i=await t.prompt({type:"text",message:"Enter Cloudflare AI Gateway ID"});return{type:"api_key",key:e,env:{CLOUDFLARE_ACCOUNT_ID:n,CLOUDFLARE_GATEWAY_ID:i}}},resolve:async({ctx:t,credential:e,signal:n})=>{let i=await RM("ai-gateway",t,e,n);if(i)return{auth:{headers:{"cf-aig-authorization":`Bearer ${i.apiKey}`,Authorization:null,"x-api-key":null}},env:i.env,source:i.source}}}}var gb="CLOUDFLARE_ACCOUNT_ID",fb="CLOUDFLARE_GATEWAY_ID";function IM(t,e){if(!e)return t;let n=t.baseUrl.replaceAll(`{${gb}}`,e[gb]??`{${gb}}`).replaceAll(`{${fb}}`,e[fb]??`{${fb}}`);return n===t.baseUrl?t:{...t,baseUrl:n}}function el(t){return{stream:(e,n,i)=>t.stream(IM(e,i?.env),n,i),streamSimple:(e,n,i)=>t.streamSimple(IM(e,i?.env),n,i)}}function AM(){return Q({id:"cloudflare-ai-gateway",name:"Cloudflare AI Gateway",auth:{apiKey:PM()},models:Object.values(n1),api:{"anthropic-messages":el(dt()),"openai-completions":el(he()),"openai-responses":el(pn())}})}xe();function EM(){return Q({id:"cloudflare-workers-ai",name:"Cloudflare Workers AI",auth:{apiKey:MM()},models:Object.values(r1),api:el(he())})}xe();function _M(){return Q({id:"deepseek",name:"DeepSeek",baseUrl:"https://api.deepseek.com",auth:{apiKey:ie("DeepSeek API key",["DEEPSEEK_API_KEY"])},models:Object.values(s1),api:he()})}xe();function OM(){return Q({id:"fireworks",name:"Fireworks",baseUrl:"https://api.fireworks.ai/inference",auth:{apiKey:ie("Fireworks API key",["FIREWORKS_API_KEY"])},models:Object.values(l1),api:{"anthropic-messages":dt(),"openai-completions":he()}})}xe();function LM(){return Q({id:"github-copilot",name:"GitHub Copilot",baseUrl:"https://api.individual.githubcopilot.com",auth:{apiKey:ie("GitHub Copilot token",["COPILOT_GITHUB_TOKEN"]),oauth:un({name:"GitHub Copilot",isSubscription:!0,load:bM})},models:Object.values(u1),filterModels:(t,e)=>{if(e?.type!=="oauth")return t;let n=e.availableModelIds;if(!Array.isArray(n)||!n.every(r=>typeof r=="string"))return t;let i=new Set(n);return t.filter(r=>i.has(r.id))},api:{"anthropic-messages":dt(),"openai-completions":he(),"openai-responses":pn()}})}xe();function WM(){return Q({id:"google",name:"Google",baseUrl:"https://generativelanguage.googleapis.com/v1beta",auth:{apiKey:ie("Gemini API key",["GEMINI_API_KEY"])},models:Object.values(d1),api:Ya()})}xe();var E6="~/.config/gcloud/application_default_credentials.json",_6={name:"Google Cloud credentials",login:async t=>{t.signal.throwIfAborted();let e=await t.prompt({type:"select",message:"Select Google Vertex AI authentication method:",options:[{id:"api-key",label:"Google Cloud API key"},{id:"adc",label:"Application Default Credentials"},{id:"service-account",label:"Service account credentials file"}]});if(t.signal.throwIfAborted(),e==="api-key")return{type:"api_key",key:await t.prompt({type:"secret",message:"Enter Google Cloud API key"})};if(e!=="adc"&&e!=="service-account")throw new Error(`Unknown Google Vertex AI auth method: ${e}`);t.notify({type:"info",message:e==="adc"?"Run `gcloud auth application-default login`, then provide the project and location.":"Provide a service account credentials file, project, and location.",links:[{label:"Application Default Credentials",url:"https://cloud.google.com/docs/authentication/provide-credentials-adc"}]});let n=await t.prompt({type:"text",message:"Enter Google Cloud project ID"}),i=await t.prompt({type:"text",message:"Enter Google Cloud location"}),r=e==="service-account"?await t.prompt({type:"text",message:"Enter service account credentials file path"}):void 0;return{type:"api_key",env:{GOOGLE_CLOUD_PROJECT:n,GOOGLE_CLOUD_LOCATION:i,...r?{GOOGLE_APPLICATION_CREDENTIALS:r}:{}}}},resolve:async({ctx:t,credential:e,signal:n})=>{let i=async c=>{n.throwIfAborted();let u=await t.env(c);return n.throwIfAborted(),u},r=e?.key??await i("GOOGLE_CLOUD_API_KEY");if(r)return{auth:{apiKey:r},source:e?.key?"stored credential":"GOOGLE_CLOUD_API_KEY"};let o=e?.env?.GOOGLE_APPLICATION_CREDENTIALS??await i("GOOGLE_APPLICATION_CREDENTIALS");n.throwIfAborted();let s=await t.fileExists(o??E6);n.throwIfAborted();let a=e?.env?.GOOGLE_CLOUD_PROJECT??await i("GOOGLE_CLOUD_PROJECT")??await i("GCLOUD_PROJECT"),l=e?.env?.GOOGLE_CLOUD_LOCATION??await i("GOOGLE_CLOUD_LOCATION");if(s&&a&&l)return{auth:{},env:e?.env,source:e?"stored credential":"gcloud application default credentials"}}};function FM(){return Q({id:"google-vertex",name:"Google Vertex AI",auth:{apiKey:_6},models:Object.values(h1),api:im()})}xe();function DM(){return Q({id:"groq",name:"Groq",baseUrl:"https://api.groq.com/openai/v1",auth:{apiKey:ie("Groq API key",["GROQ_API_KEY"])},models:Object.values(f1),api:he()})}xe();function UM(){return Q({id:"huggingface",name:"Hugging Face",baseUrl:"https://router.huggingface.co/v1",auth:{apiKey:ie("Hugging Face token",["HF_TOKEN"])},models:Object.values(x1),api:he()})}xe();function $M(){return Q({id:"kimi-coding",name:"Kimi For Coding",baseUrl:"https://api.kimi.com/coding",auth:{apiKey:ie("Kimi API key",["KIMI_API_KEY"]),oauth:un({name:"Kimi Code (subscription)",isSubscription:!0,loginLabel:"Sign in with Kimi Code",load:vM})},models:Object.values(y1),api:dt()})}xe();function NM(){return Q({id:"minimax",name:"MiniMax",baseUrl:"https://api.minimax.io/anthropic",auth:{apiKey:ie("MiniMax API key",["MINIMAX_API_KEY"])},models:Object.values(S1),api:dt()})}xe();function BM(){return Q({id:"minimax-cn",name:"MiniMax CN",baseUrl:"https://api.minimaxi.com/anthropic",auth:{apiKey:ie("MiniMax CN API key",["MINIMAX_CN_API_KEY"])},models:Object.values(k1),api:dt()})}xe();function jM(){return Q({id:"mistral",name:"Mistral",baseUrl:"https://api.mistral.ai",auth:{apiKey:ie("Mistral API key",["MISTRAL_API_KEY"])},models:Object.values(R1),api:rm()})}xe();function qM(){return Q({id:"moonshotai",name:"Moonshot AI",baseUrl:"https://api.moonshot.ai/v1",auth:{apiKey:ie("Moonshot AI API key",["MOONSHOT_API_KEY"])},models:Object.values(P1),api:he()})}xe();function GM(){return Q({id:"moonshotai-cn",name:"Moonshot AI CN",baseUrl:"https://api.moonshot.cn/v1",auth:{apiKey:ie("Moonshot AI API key",["MOONSHOT_API_KEY"])},models:Object.values(A1),api:he()})}xe();function KM(){return Q({id:"nvidia",name:"NVIDIA",baseUrl:"https://integrate.api.nvidia.com/v1",auth:{apiKey:ie("NVIDIA API key",["NVIDIA_API_KEY"])},models:Object.values(_1),api:he()})}xe();function HM(){return Q({id:"openai",name:"OpenAI",baseUrl:"https://api.openai.com/v1",auth:{apiKey:ie("OpenAI API key",["OPENAI_API_KEY"])},models:Object.values(L1),api:pn()})}xe();function zM(){return Q({id:"openai-codex",name:"OpenAI Codex",baseUrl:"https://chatgpt.com/backend-api",auth:{oauth:un({name:"OpenAI (ChatGPT Plus/Pro)",isSubscription:!0,load:fM})},models:Object.values(F1),api:cm()})}xe();function VM(){return Q({id:"opencode",name:"OpenCode Zen",auth:{apiKey:ie("OpenCode API key",["OPENCODE_API_KEY"])},models:Object.values(U1),api:{"anthropic-messages":dt(),"google-generative-ai":Ya(),"openai-completions":he(),"openai-responses":pn()}})}xe();function QM(){return Q({id:"opencode-go",name:"OpenCode Go",auth:{apiKey:ie("OpenCode API key",["OPENCODE_API_KEY"])},models:Object.values(N1),api:{"anthropic-messages":dt(),"openai-completions":he(),"openai-responses":pn()}})}xe();function JM(){return Q({id:"openrouter",name:"OpenRouter",baseUrl:"https://openrouter.ai/api/v1",auth:{apiKey:ie("OpenRouter API key",["OPENROUTER_API_KEY"]),oauth:un({name:"OpenRouter OAuth",loginLabel:"Sign in with OpenRouter",load:xM})},models:Object.values(j1),api:he()})}xe();function YM(){return Q({id:"qwen-token-plan",name:"Qwen Token Plan",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",auth:{apiKey:ie("Qwen Token Plan API key",["QWEN_TOKEN_PLAN_API_KEY"])},models:Object.values(G1),api:he()})}xe();function XM(){return Q({id:"qwen-token-plan-cn",name:"Qwen Token Plan CN",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",auth:{apiKey:ie("Qwen Token Plan CN API key",["QWEN_TOKEN_PLAN_CN_API_KEY"])},models:Object.values(H1),api:he()})}xe();function ZM(){return Q({id:"qwen-token-plan-individual",name:"Qwen Token Plan Individual",baseUrl:"https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",auth:{apiKey:ie("Qwen Token Plan Individual API key",["QWEN_TOKEN_PLAN_API_KEY"])},models:Object.values(V1),api:he()})}var eP="https://radius.pi.dev";function O6(t){if(typeof t!="object"||t===null||Array.isArray(t))return!1;let e=t;return typeof e.id=="string"&&typeof e.name=="string"&&typeof e.reasoning=="boolean"&&Array.isArray(e.input)&&typeof e.cost=="object"&&e.cost!==null&&!Array.isArray(e.cost)&&typeof e.contextWindow=="number"&&typeof e.maxTokens=="number"}function tP(t){if(typeof t!="object"||t===null||Array.isArray(t))return;let{baseUrl:e,models:n}=t;if(!(typeof e!="string"||!Array.isArray(n)))return{baseUrl:e,models:n.filter(O6).map(i=>({...i}))}}function nP(t){return(/^https?:\/\//iu.test(t)?t:`https://${t}`).replace(/\/+$/u,"")}function L6(t){return tP(t?.gatewayConfig)}function bb(t,e){return e.models.map(n=>({...n,api:"pi-messages",provider:t,baseUrl:e.baseUrl}))}function xb(t,e){let n=L6(e);return n?bb(t,n):[]}function W6(t){let e=t.trim();return e.length>512?`${e.slice(0,512)}\u2026`:e}async function iP(t,e,n){let i={accept:"application/json"};e&&(i.authorization=`Bearer ${e}`);let r=await fetch(new URL("/v1/config",t),{headers:i,signal:n});if(!r.ok)throw new Error(`Could not load Radius config from ${t}: ${r.status}: ${W6(await r.text())}`);let o=tP(await r.json());if(!o)throw new Error(`Invalid Radius config from ${t}`);return o}function rP(t={}){let e=t.id??"radius",n=t.name??"Radius",i=nP(t.gateway??eP),r=xb(e,void 0),o=um();return{id:e,name:n,auth:{apiKey:ie("Radius API key",["RADIUS_API_KEY"]),oauth:un({name:n,load:()=>wM({name:n,gateway:i})})},getModels:()=>r,refreshModels:async s=>{let a=s.stored;if(a){let p=a.models.filter(d=>d.provider===e);if(!await s.publish({update:()=>{r=p}}))return}if(!a&&s.credential?.type==="oauth"){let p=xb(e,s.credential);if(p.length>0&&!await s.publish({persist:{models:p,checkedAt:Date.now()},update:()=>{r=p}}))return}if(!s.allowNetwork||s.signal.aborted)return;let l=s.credential?.type==="oauth"?s.credential.access:s.credential?.key,c=await iP(i,l,s.signal);if(s.signal.aborted)return;let u=bb(e,c);await s.publish({persist:{models:u,checkedAt:Date.now()},update:()=>{r=u}})},stream:(s,a,l)=>o.stream(s,a,l),streamSimple:(s,a,l)=>o.streamSimple(s,a,l)}}xe();function oP(){return Q({id:"together",name:"Together",baseUrl:"https://api.together.ai/v1",auth:{apiKey:ie("Together API key",["TOGETHER_API_KEY"])},models:Object.values(J1),api:he()})}xe();function sP(){return Q({id:"vercel-ai-gateway",name:"Vercel AI Gateway",baseUrl:"https://ai-gateway.vercel.sh",auth:{apiKey:ie("Vercel AI Gateway API key",["AI_GATEWAY_API_KEY"])},models:Object.values(X1),api:dt()})}xe();function aP(){return Q({id:"xai",name:"xAI",baseUrl:"https://api.x.ai/v1",auth:{apiKey:ie("xAI API key",["XAI_API_KEY"]),oauth:un({name:"xAI (Grok/X subscription)",isSubscription:!0,loginLabel:"Sign in with SuperGrok or X Premium",load:yM})},models:Object.values(eM),api:{"openai-completions":he(),"openai-responses":pn()}})}xe();function lP(){return Q({id:"xiaomi",name:"Xiaomi",baseUrl:"https://api.xiaomimimo.com/v1",auth:{apiKey:ie("Xiaomi API key",["XIAOMI_API_KEY"])},models:Object.values(nM),api:he()})}xe();function cP(){return Q({id:"xiaomi-token-plan-ams",name:"Xiaomi Token Plan AMS",baseUrl:"https://token-plan-ams.xiaomimimo.com/v1",auth:{apiKey:ie("Xiaomi Token Plan AMS API key",["XIAOMI_TOKEN_PLAN_AMS_API_KEY"])},models:Object.values(rM),api:he()})}xe();function uP(){return Q({id:"xiaomi-token-plan-cn",name:"Xiaomi Token Plan CN",baseUrl:"https://token-plan-cn.xiaomimimo.com/v1",auth:{apiKey:ie("Xiaomi Token Plan CN API key",["XIAOMI_TOKEN_PLAN_CN_API_KEY"])},models:Object.values(sM),api:he()})}xe();function pP(){return Q({id:"xiaomi-token-plan-sgp",name:"Xiaomi Token Plan SGP",baseUrl:"https://token-plan-sgp.xiaomimimo.com/v1",auth:{apiKey:ie("Xiaomi Token Plan SGP API key",["XIAOMI_TOKEN_PLAN_SGP_API_KEY"])},models:Object.values(lM),api:he()})}xe();function dP(){return Q({id:"zai",name:"Z.AI",baseUrl:"https://api.z.ai/api/coding/paas/v4",auth:{apiKey:ie("Z.AI API key",["ZAI_API_KEY"])},models:Object.values(uM),api:he()})}xe();function mP(){return Q({id:"zai-coding-cn",name:"Z.AI Coding CN",baseUrl:"https://open.bigmodel.cn/api/coding/paas/v4",auth:{apiKey:ie("Z.AI Coding CN API key",["ZAI_CODING_CN_API_KEY"])},models:Object.values(dM),api:he()})}function F6(){return[mM(),hM(),SM(),TM(),kM(),CM(),AM(),EM(),_M(),OM(),LM(),WM(),FM(),DM(),UM(),$M(),NM(),BM(),jM(),qM(),GM(),KM(),HM(),zM(),VM(),QM(),JM(),YM(),XM(),ZM(),rP(),oP(),sP(),aP(),lP(),cP(),uP(),pP(),dP(),mP()]}function hP(t){let e=Yk(t);for(let n of F6())e.setProvider(n);return e}var gP=new Map;function D6(t,e){return(n,i,r)=>{if(n.api!==t)throw new Error(`Mismatched api: ${n.api} expected ${t}`);return e(n,i,r)}}function U6(t,e){return(n,i,r)=>{if(n.api!==t)throw new Error(`Mismatched api: ${n.api} expected ${t}`);return e(n,i,r)}}function $6(t,e){gP.set(t.api,{provider:{api:t.api,stream:D6(t.api,t.stream),streamSimple:U6(t.api,t.streamSimple)},sourceId:e})}function pm(t){return gP.get(t)?.provider}var N6=[["anthropic-messages",dt()],["openai-completions",he()],["openai-responses",pn()],["openai-codex-responses",cm()],["azure-openai-responses",Hd()],["google-generative-ai",Ya()],["google-vertex",im()],["mistral-conversations",rm()],["bedrock-converse-stream",zd()],["pi-messages",um()]],fP=new Map;function B6(){for(let[t,e]of N6)pm(t)||$6({api:t,stream:e.stream,streamSimple:e.streamSimple}),fP.set(t,pm(t))}B6();var vb=hP(),j6="<authenticated>";function bP(t){return typeof t=="string"&&t.trim().length>0}function dm(t,e){if(bP(e?.apiKey))return e;let n=jR(t.provider,e?.env);return!n||n===j6?e:{...e,apiKey:n}}function xP(t){return bP(t?.apiKey)||typeof t?.headers?.["cf-aig-authorization"]=="string"}function vP(t){if(pm(t.api)!==fP.get(t.api))return;let e=vb.getProvider(t.provider);return e?.getModels().some(n=>n.api===t.api)?e:void 0}function yP(t){let e=pm(t);if(!e)throw new Error(`No API provider registered for api: ${t}`);return e}function q6(t,e,n){let i=vP(t);return i?t.provider.startsWith("cloudflare-")&&!xP(n)?vb.stream(t,e,n):i.stream(t,e,dm(t,n)):yP(t.api).stream(t,e,dm(t,n))}async function wP(t,e,n){return q6(t,e,n).result()}function SP(t,e,n){let i=vP(t);return i?t.provider.startsWith("cloudflare-")&&!xP(n)?vb.streamSimple(t,e,n):i.streamSimple(t,e,dm(t,n)):yP(t.api).streamSimple(t,e,dm(t,n))}import*as Wn from"node:fs";import*as as from"node:path";import{Marked as KI}from"marked";import{spawn as G6}from"child_process";import{readdirSync as K6,statSync as TP}from"fs";import{homedir as kP}from"os";import{basename as yb,dirname as hm,join as eo}from"path";function mm(t,e){let n=t.toLowerCase(),i=e.toLowerCase(),r=u=>{if(u.length===0)return{matches:!0,score:0};if(u.length>i.length)return{matches:!1,score:0};let p=0,d=0,m=-1,g=0;for(let h=0;h<i.length&&p<u.length;h++)if(i[h]===u[p]){let f=h===0||/[\s\-_./:]/.test(i[h-1]);m===h-1?(g++,d-=g*5):(g=0,m>=0&&(d+=(h-m-1)*2)),f&&(d-=10),d+=h*.1,m=h,p++}return p<u.length?{matches:!1,score:0}:(u===i&&(d-=100),{matches:!0,score:d})},o=r(n);if(o.matches)return o;let s=n.match(/^(?<letters>[a-z]+)(?<digits>[0-9]+)$/),a=n.match(/^(?<digits>[0-9]+)(?<letters>[a-z]+)$/),l=s?`${s.groups?.digits??""}${s.groups?.letters??""}`:a?`${a.groups?.letters??""}${a.groups?.digits??""}`:"";if(!l)return o;let c=r(l);return c.matches?{matches:!0,score:c.score+5}:o}function Bt(t,e,n){if(!e.trim())return t;let i=e.trim().split(/[\s/]+/).filter(o=>o.length>0);if(i.length===0)return t;let r=[];for(let o of t){let s=n(o),a=0,l=!0;for(let c of i){let u=mm(c,s);if(u.matches)a+=u.score;else{l=!1;break}}l&&r.push({item:o,totalScore:a})}return r.sort((o,s)=>o.totalScore-s.totalScore),r.map(o=>o.item)}var AP=new Set([" "," ",'"',"'","="]);function Vo(t){return t.replace(/\\/g,"/")}function H6(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function z6(t){let e=Vo(t);if(!e.includes("/"))return e;let n=e.endsWith("/"),i=e.replace(/^\/+|\/+$/g,"");if(!i)return e;let r="[\\\\/]",o=i.split("/").filter(Boolean).map(a=>H6(a));if(o.length===0)return e;let s=o.join(r);return n&&(s+=r),s}function CP(t){for(let e=t.length-1;e>=0;e-=1)if(AP.has(t[e]??""))return e;return-1}function V6(t){let e=!1,n=-1;for(let i=0;i<t.length;i+=1)t[i]==='"'&&(e=!e,e&&(n=i));return e?n:null}function RP(t,e){return e===0||AP.has(t[e-1]??"")}function MP(t){let e=V6(t);return e===null?null:e>0&&t[e-1]==="@"?RP(t,e-1)?t.slice(e-1):null:RP(t,e)?t.slice(e):null}function PP(t){return t.startsWith('@"')?{rawPrefix:t.slice(2),isAtPrefix:!0,isQuotedPrefix:!0}:t.startsWith('"')?{rawPrefix:t.slice(1),isAtPrefix:!1,isQuotedPrefix:!0}:t.startsWith("@")?{rawPrefix:t.slice(1),isAtPrefix:!0,isQuotedPrefix:!1}:{rawPrefix:t,isAtPrefix:!1,isQuotedPrefix:!1}}function IP(t,e){let n=e.isQuotedPrefix||t.includes(" "),i=e.isAtPrefix?"@":"";return n?`${`${i}"`}${t}"`:`${i}${t}`}async function Q6(t,e,n,i,r){let o=["--base-directory",t,"--max-results",String(i),"--type","f","--type","d","--follow","--hidden","--exclude",".git","--exclude",".git/*","--exclude",".git/**"];return Vo(n).includes("/")&&o.push("--full-path"),n&&o.push(z6(n)),await new Promise(s=>{if(r.aborted){s([]);return}let a=G6(e,o,{stdio:["ignore","pipe","pipe"]}),l="",c=!1,u=d=>{c||(c=!0,r.removeEventListener("abort",p),s(d))},p=()=>{a.exitCode===null&&a.kill("SIGKILL")};r.addEventListener("abort",p,{once:!0}),a.stdout.setEncoding("utf-8"),a.stdout.on("data",d=>{l+=d}),a.on("error",()=>{u([])}),a.on("close",d=>{if(r.aborted||d!==0||!l){u([]);return}let m=l.trim().split(`
37
37
  `).filter(Boolean),g=[];for(let h of m){let f=Vo(h),b=f.endsWith("/"),v=b?f.slice(0,-1):f;v===".git"||v.startsWith(".git/")||v.includes("/.git/")||g.push({path:f,isDirectory:b})}u(g)})})}var su=class{constructor(e=[],n,i=null){this.commands=e,this.basePath=n,this.fdPath=i}async getSuggestions(e,n,i,r){let s=(e[n]||"").slice(0,i),a=this.extractAtPrefix(s);if(a){let{rawPrefix:u,isQuotedPrefix:p}=PP(a),d=await this.getFuzzyFileSuggestions(u,{isQuotedPrefix:p,signal:r.signal});return d.length===0?null:{items:d,prefix:a}}if(!r.force&&s.startsWith("/")){let u=s.indexOf(" ");if(u===-1){let h=s.slice(1),f=this.commands.map(v=>{let y="name"in v?v.name:v.value,R="argumentHint"in v&&v.argumentHint?v.argumentHint:void 0,T=v.description??"",k=R?T?`${R} \u2014 ${T}`:R:T;return{name:y,label:y,description:k||void 0}}),b=Bt(f,h,v=>v.name).map(v=>({value:v.name,label:v.label,...v.description&&{description:v.description}}));return b.length===0?null:{items:b,prefix:s}}let p=s.slice(1,u),d=s.slice(u+1),m=this.commands.find(h=>("name"in h?h.name:h.value)===p);if(!m||!("getArgumentCompletions"in m)||!m.getArgumentCompletions)return null;let g=await m.getArgumentCompletions(d);return!Array.isArray(g)||g.length===0?null:{items:g,prefix:d}}let l=this.extractPathPrefix(s,r.force??!1);if(l===null)return null;let c=this.getFileSuggestions(l);return c.length===0?null:{items:c,prefix:l}}applyCompletion(e,n,i,r,o){let s=e[n]||"",a=s.slice(0,i-o.length),l=s.slice(i),c=o.startsWith('"')||o.startsWith('@"'),u=l.startsWith('"'),p=r.value.endsWith('"'),d=c&&p&&u?l.slice(1):l;if(o.startsWith("/")&&a.trim()===""&&!o.slice(1).includes("/")){let R=`${a}/${r.value} ${d}`,T=[...e];return T[n]=R,{lines:T,cursorLine:n,cursorCol:a.length+r.value.length+2}}if(o.startsWith("@")){let R=r.label.endsWith("/"),T=R?"":" ",k=`${a+r.value}${T}${d}`,I=[...e];I[n]=k;let $=r.value.endsWith('"'),O=R&&$?r.value.length-1:r.value.length;return{lines:I,cursorLine:n,cursorCol:a.length+O+T.length}}let g=s.slice(0,i);if(g.includes("/")&&g.includes(" ")){let R=a+r.value+d,T=[...e];T[n]=R;let k=r.label.endsWith("/"),I=r.value.endsWith('"'),$=k&&I?r.value.length-1:r.value.length;return{lines:T,cursorLine:n,cursorCol:a.length+$}}let h=a+r.value+d,f=[...e];f[n]=h;let b=r.label.endsWith("/"),v=r.value.endsWith('"'),y=b&&v?r.value.length-1:r.value.length;return{lines:f,cursorLine:n,cursorCol:a.length+y}}extractAtPrefix(e){let n=MP(e);if(n?.startsWith('@"'))return n;let i=CP(e),r=i===-1?0:i+1;return e[r]==="@"?e.slice(r):null}extractPathPrefix(e,n=!1){let i=MP(e);if(i)return i;let r=CP(e),o=r===-1?e:e.slice(r+1);return n||o.includes("/")||o.startsWith(".")||o.startsWith("~/")||o===""&&e.endsWith(" ")?o:null}expandHomePath(e){if(e.startsWith("~/")){let n=eo(kP(),e.slice(2));return e.endsWith("/")&&!n.endsWith("/")?`${n}/`:n}else if(e==="~")return kP();return e}resolveScopedFuzzyQuery(e){let n=Vo(e),i=n.lastIndexOf("/");if(i===-1)return null;let r=n.slice(0,i+1),o=n.slice(i+1),s;r.startsWith("~/")?s=this.expandHomePath(r):r.startsWith("/")?s=r:s=eo(this.basePath,r);try{if(!TP(s).isDirectory())return null}catch{return null}return{baseDir:s,query:o,displayBase:r}}scopedPathForDisplay(e,n){let i=Vo(n);return e==="/"?`/${i}`:`${Vo(e)}${i}`}getFileSuggestions(e){try{let n,i,{rawPrefix:r,isAtPrefix:o,isQuotedPrefix:s}=PP(e),a=r;if(a.startsWith("~")&&(a=this.expandHomePath(a)),r===""||r==="./"||r==="../"||r==="~"||r==="~/"||r==="/"||o&&r==="")r.startsWith("~")||a.startsWith("/")?n=a:n=eo(this.basePath,a),i="";else if(r.endsWith("/"))r.startsWith("~")||a.startsWith("/")?n=a:n=eo(this.basePath,a),i="";else{let p=hm(a),d=yb(a);r.startsWith("~")||a.startsWith("/")?n=p:n=eo(this.basePath,p),i=d}let c=K6(n,{withFileTypes:!0}),u=[];for(let p of c){if(!p.name.toLowerCase().startsWith(i.toLowerCase()))continue;let d=p.isDirectory();if(!d&&p.isSymbolicLink())try{let v=eo(n,p.name);d=TP(v).isDirectory()}catch{}let m,g=p.name,h=r;if(h.endsWith("/"))m=h+g;else if(h.includes("/")||h.includes("\\"))if(h.startsWith("~/")){let v=h.slice(2),y=hm(v);m=`~/${y==="."?g:eo(y,g)}`}else if(h.startsWith("/")){let v=hm(h);v==="/"?m=`/${g}`:m=`${v}/${g}`}else m=eo(hm(h),g),h.startsWith("./")&&!m.startsWith("./")&&(m=`./${m}`);else h.startsWith("~")?m=`~/${g}`:m=g;m=Vo(m);let f=d?`${m}/`:m,b=IP(f,{isDirectory:d,isAtPrefix:o,isQuotedPrefix:s});u.push({value:b,label:g+(d?"/":"")})}return u.sort((p,d)=>{let m=p.value.endsWith("/"),g=d.value.endsWith("/");return m&&!g?-1:!m&&g?1:p.label.localeCompare(d.label)}),u}catch{return[]}}scoreEntry(e,n,i){let o=yb(e).toLowerCase(),s=n.toLowerCase(),a=0;return o===s?a=100:o.startsWith(s)?a=80:o.includes(s)?a=50:e.toLowerCase().includes(s)&&(a=30),i&&a>0&&(a+=10),a}async getFuzzyFileSuggestions(e,n){if(!this.fdPath||n.signal.aborted)return[];try{let i=this.resolveScopedFuzzyQuery(e),r=i?.baseDir??this.basePath,o=i?.query??e,s=await Q6(r,this.fdPath,o,100,n.signal);if(n.signal.aborted)return[];let a=s.map(u=>({...u,score:o?this.scoreEntry(u.path,o,u.isDirectory):1})).filter(u=>u.score>0);a.sort((u,p)=>p.score-u.score);let l=a.slice(0,20),c=[];for(let{path:u,isDirectory:p}of l){let d=p?u.slice(0,-1):u,m=i?this.scopedPathForDisplay(i.displayBase,d):d,g=yb(d),h=p?`${m}/`:m,f=IP(h,{isDirectory:p,isAtPrefix:!0,isQuotedPrefix:n.isQuotedPrefix});c.push({value:f,label:g+(p?"/":""),description:m})}return c}catch{return[]}}shouldTriggerFileCompletion(e,n,i){let o=(e[n]||"").slice(0,i);return!(o.trim().startsWith("/")&&!o.trim().includes(" "))}};import{eastAsianWidth as EP}from"get-east-asian-width";var zn=new Intl.Segmenter(void 0,{granularity:"grapheme"}),J6=new Intl.Segmenter(void 0,{granularity:"word"});function gm(){return zn}function tl(){return J6}function Y6(t){let e=t.codePointAt(0);return e>=126976&&e<=130047||e>=8960&&e<=9215||e>=9728&&e<=10175||e>=11088&&e<=11093||t.includes("\uFE0F")||t.length>2}var X6=new RegExp("^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Mark}|\\p{Surrogate})+$","v"),Z6=new RegExp("^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Mark}\\p{Surrogate}]+","v"),ej=new RegExp("^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Format}|\\p{Mark}|\\p{Surrogate})$","v"),tj=new RegExp("^\\p{Mark}$","v"),_P=new RegExp("^(?:[\\p{Spacing_Mark}--[\\u1734\\u302E\\u302F]]|[\\u065F\\u0F7F\\u102B\\u102C\\u1031\\u1033-\\u1035\\u1038\\u103A-\\u103E])+$","v"),nj=new RegExp("^\\p{RGI_Emoji}$","v"),ij=512,au=new Map,fm=/[\p{Script_Extensions=Han}\p{Script_Extensions=Hiragana}\p{Script_Extensions=Katakana}\p{Script_Extensions=Hangul}\p{Script_Extensions=Bopomofo}]/u;function Tb(t){for(let e=0;e<t.length;e++){let n=t.charCodeAt(e);if(n<32||n>126)return!1}return!0}function rj(t,e){if(e<=0||t.length===0)return{text:"",width:0};if(Tb(t)){let l=t.slice(0,e);return{text:l,width:l.length}}let n=t.includes("\x1B"),i=t.includes(" ");if(!n&&!i){let l="",c=0;for(let{segment:u}of zn.segment(t)){let p=pr(u);if(c+p>e)break;l+=u,c+=p}return{text:l,width:c}}let r="",o=0,s=0,a="";for(;s<t.length;){let l=et(t,s);if(l){a+=l.code,s+=l.length;continue}if(t[s]===" "){if(o+3>e)break;a&&(r+=a,a=""),r+=" ",o+=3,s++;continue}let c=s;for(;c<t.length&&t[c]!==" "&&!et(t,c);)c++;for(let{segment:u}of zn.segment(t.slice(s,c))){let p=pr(u);if(o+p>e)return{text:r,width:o};a&&(r+=a,a=""),r+=u,o+=p}s=c}return{text:r,width:o}}function wb(t,e,n,i,r,o){let s="\x1B[0m",a=lj(t),l=e+i,c;return n.length>0?c=`${t}${a}${s}${n}${s}`:c=`${t}${a}${s}`,o?c+" ".repeat(Math.max(0,r-l)):c}function pr(t){if(t===" ")return 3;if(_P.test(t))return[...t].length;if(X6.test(t))return 0;if(Y6(t)&&nj.test(t))return 2;let e=t.replace(Z6,""),n=e.codePointAt(0);if(n===void 0)return 0;if(n>=127462&&n<=127487)return 2;let i=EP(n),r=!1,o=[...e];for(let s of o.slice(1))if(_P.test(s))i+=1,r=!1;else if(tj.test(s))r=!0;else if(!ej.test(s)){let a=s.codePointAt(0);r||a>=65280&&a<=65519?i+=EP(a):(a===3635||a===3763)&&(i+=1),r=!1}return i}function N(t){if(t.length===0)return 0;if(Tb(t))return t.length;let e=au.get(t);if(e!==void 0)return e;let n=t;if(t.includes(" ")&&(n=n.replace(/\t/g," ")),n.includes("\x1B")){let r="",o=0;for(;o<n.length;){let s=et(n,o);if(s){o+=s.length;continue}r+=n[o],o++}n=r}let i=0;for(let{segment:r}of zn.segment(n))i+=pr(r);if(au.size>=ij){let r=au.keys().next().value;r!==void 0&&au.delete(r)}return au.set(t,i),i}function bm(t){if(!t.includes("\x1B"))return t;let e="",n=0;for(;n<t.length;){let i=et(t,n);if(i){n+=i.length;continue}e+=t[n],n++}return e}function cu(t,e){let n=0,i=0;for(;i<t.length;){let r=et(t,i);if(r){i+=r.length;continue}let o=i;for(;o<t.length&&!et(t,o);)o++;for(let{segment:s}of zn.segment(t.slice(i,o))){let a=pr(s);if(a>0&&e>=n&&e<n+a)return{start:n,end:n+a};n+=a}i=o}}function kb(t,e){let n,i=0,r=0;for(;r<t.length;){let o=et(t,r);if(o){let a=/^\x1b\]8;[^;]*;([^\x07\x1b]*)(?:\x07|\x1b\\)$/.exec(o.code);a&&(n=a[1]||void 0),r+=o.length;continue}let s=r;for(;s<t.length&&!et(t,s);)s++;for(let{segment:a}of zn.segment(t.slice(r,s))){let l=a===" "?3:pr(a);if(e>=i&&e<i+l)return n;i+=l}r=s}}var oj=/[\u0e33\u0eb3]/,sj=/[\u0e33\u0eb3]/g;function OP(t){let e=t;if(oj.test(e)&&(e=e.replace(sj,r=>r==="\u0E33"?"\u0E4D\u0E32":"\u0ECD\u0EB2")),!e.includes(" "))return e;let n="",i=0;for(;i<e.length;){let r=et(e,i);if(r){n+=r.code,i+=r.length;continue}n+=e[i]===" "?" ":e[i],i++}return n}function et(t,e){if(e>=t.length||t[e]!=="\x1B")return null;let n=t[e+1];if(n==="["){let i=e+2;for(;i<t.length&&!/[mGKHJ]/.test(t[i]);)i++;return i<t.length?{code:t.substring(e,i+1),length:i+1-e}:null}if(n==="]"){let i=e+2;for(;i<t.length;){if(t[i]==="\x07")return{code:t.substring(e,i+1),length:i+1-e};if(t[i]==="\x1B"&&t[i+1]==="\\")return{code:t.substring(e,i+2),length:i+2-e};i++}return null}if(n==="_"){let i=e+2;for(;i<t.length;){if(t[i]==="\x07")return{code:t.substring(e,i+1),length:i+1-e};if(t[i]==="\x1B"&&t[i+1]==="\\")return{code:t.substring(e,i+2),length:i+2-e};i++}return null}return null}function LP(t){if(!t.startsWith("\x1B]8;"))return;let e=t.endsWith("\x07")?"\x07":"\x1B\\",n=t.slice(4,e==="\x07"?-1:-2),i=n.indexOf(";");if(i===-1)return;let r=n.slice(0,i),o=n.slice(i+1);return o?{params:r,url:o,terminator:e}:null}function aj(t){return`\x1B]8;${t.params};${t.url}${t.terminator}`}function WP(t){return`\x1B]8;;${t}`}function lj(t){if(!t.includes("\x1B]8;"))return"";let e=null,n=0;for(;n<t.length;){let i=et(t,n);if(i){let r=LP(i.code);r!==void 0&&(e=r),n+=i.length}else n++}return e?WP(e.terminator):""}var lu=class{constructor(){this.bold=!1;this.dim=!1;this.italic=!1;this.underline=!1;this.blink=!1;this.inverse=!1;this.hidden=!1;this.strikethrough=!1;this.fgColor=null;this.bgColor=null;this.activeHyperlink=null}process(e){let n=LP(e);if(n!==void 0){this.activeHyperlink=n;return}if(!e.endsWith("m"))return;let i=e.match(/\x1b\[([\d;]*)m/);if(!i)return;let r=i[1];if(r===""||r==="0"){this.reset();return}let o=r.split(";"),s=0;for(;s<o.length;){let a=Number.parseInt(o[s],10);if(a===38||a===48){if(o[s+1]==="5"&&o[s+2]!==void 0){let l=`${o[s]};${o[s+1]};${o[s+2]}`;a===38?this.fgColor=l:this.bgColor=l,s+=3;continue}else if(o[s+1]==="2"&&o[s+4]!==void 0){let l=`${o[s]};${o[s+1]};${o[s+2]};${o[s+3]};${o[s+4]}`;a===38?this.fgColor=l:this.bgColor=l,s+=5;continue}}switch(a){case 0:this.reset();break;case 1:this.bold=!0;break;case 2:this.dim=!0;break;case 3:this.italic=!0;break;case 4:this.underline=!0;break;case 5:this.blink=!0;break;case 7:this.inverse=!0;break;case 8:this.hidden=!0;break;case 9:this.strikethrough=!0;break;case 21:this.bold=!1;break;case 22:this.bold=!1,this.dim=!1;break;case 23:this.italic=!1;break;case 24:this.underline=!1;break;case 25:this.blink=!1;break;case 27:this.inverse=!1;break;case 28:this.hidden=!1;break;case 29:this.strikethrough=!1;break;case 39:this.fgColor=null;break;case 49:this.bgColor=null;break;default:a>=30&&a<=37||a>=90&&a<=97?this.fgColor=String(a):(a>=40&&a<=47||a>=100&&a<=107)&&(this.bgColor=String(a));break}s++}}reset(){this.bold=!1,this.dim=!1,this.italic=!1,this.underline=!1,this.blink=!1,this.inverse=!1,this.hidden=!1,this.strikethrough=!1,this.fgColor=null,this.bgColor=null}clear(){this.reset(),this.activeHyperlink=null}getActiveCodes(){let e=[];this.bold&&e.push("1"),this.dim&&e.push("2"),this.italic&&e.push("3"),this.underline&&e.push("4"),this.blink&&e.push("5"),this.inverse&&e.push("7"),this.hidden&&e.push("8"),this.strikethrough&&e.push("9"),this.fgColor&&e.push(this.fgColor),this.bgColor&&e.push(this.bgColor);let n=e.length>0?`\x1B[${e.join(";")}m`:"";return this.activeHyperlink&&(n+=aj(this.activeHyperlink)),n}hasActiveCodes(){return this.bold||this.dim||this.italic||this.underline||this.blink||this.inverse||this.hidden||this.strikethrough||this.fgColor!==null||this.bgColor!==null||this.activeHyperlink!==null}getLineEndReset(){let e="";return this.underline&&(e+="\x1B[24m"),this.activeHyperlink&&(e+=WP(this.activeHyperlink.terminator)),e}};function FP(t,e){let n=0;for(;n<t.length;){let i=et(t,n);i?(e.process(i.code),n+=i.length):n++}}function cj(t){let e=[],n="",i="",r=null,o=0,s=()=>{n&&(e.push(n),n="",r=null)};for(;o<t.length;){let a=et(t,o);if(a){i+=a.code,o+=a.length;continue}let l=o;for(;l<t.length&&!et(t,l);)l++;for(let{segment:c}of zn.segment(t.slice(o,l))){let u=c===" ";if(!u&&fm.test(c)){s();let d=i+c;i="",e.push(d);continue}let p=u?"space":"word";n&&r!==p&&s(),i&&(n+=i,i=""),r=p,n+=c}o=l}return i&&(n?n+=i:e.length>0?e[e.length-1]+=i:n=i),n&&e.push(n),e}function mn(t,e){if(!t)return[""];let n=t.split(/\r\n|\r|\n/),i=[],r=new lu;for(let o of n){let s=i.length>0?r.getActiveCodes():"",a=uj(s+o,e);for(let l of a)i.push(l);FP(o,r)}return i.length>0?i:[""]}function uj(t,e){if(!t)return[""];if(N(t)<=e)return[t];let i=[],r=new lu,o=cj(t),s="",a=0;for(let l of o){let c=N(l),u=l.trim()==="";if(c>e&&!u){if(s){let m=r.getLineEndReset();m&&(s+=m),i.push(s),s="",a=0}let d=pj(l,e,r);for(let m=0;m<d.length-1;m++)i.push(d[m]);s=d[d.length-1],a=N(s);continue}if(a+c>e&&a>0){let d=s.trimEnd(),m=r.getLineEndReset();m&&(d+=m),i.push(d),u?(s=r.getActiveCodes(),a=0):(s=r.getActiveCodes()+l,a=c)}else s+=l,a+=c;FP(l,r)}return s&&i.push(s),i.length>0?i.map(l=>l.trimEnd()):[""]}var Cb=/[(){}[\]<>.,;:'"!?+\-=*/\\|&%^$#@~`]/;function _n(t){return/\s/.test(t)}function pj(t,e,n){let i=[],r=n.getActiveCodes(),o=0,s=0,a=[];for(;s<t.length;){let l=et(t,s);if(l)a.push({type:"ansi",value:l.code}),s+=l.length;else{let c=s;for(;c<t.length&&!et(t,c);)c++;let u=t.slice(s,c);for(let p of zn.segment(u))a.push({type:"grapheme",value:p.segment});s=c}}for(let l of a){if(l.type==="ansi"){r+=l.value,n.process(l.value);continue}let c=l.value;if(!c)continue;let u=N(c);if(o+u>e){let p=n.getLineEndReset();p&&(r+=p),i.push(r),r=n.getActiveCodes(),o=0}r+=c,o+=u}return r&&i.push(r),i.length>0?i:[""]}function to(t,e,n){let i=N(t),r=Math.max(0,e-i),o=" ".repeat(r),s=t+o;return n(s)}function ee(t,e,n="...",i=!1){if(e<=0)return"";if(t.length===0)return i?" ".repeat(e):"";let r=N(n);if(r>=e){let h=N(t);if(h<=e)return i?t+" ".repeat(e-h):t;let f=rj(n,e);return f.width===0?i?" ".repeat(e):"":wb("",0,f.text,f.width,e,i)}if(Tb(t)){if(t.length<=e)return i?t+" ".repeat(e-t.length):t;let h=e-r;return wb(t.slice(0,h),h,n,r,e,i)}let o=e-r,s="",a="",l=0,c=0,u=!0,p=!1,d=!1,m=t.includes("\x1B"),g=t.includes(" ");if(!m&&!g){for(let{segment:h}of zn.segment(t)){let f=pr(h);if(u&&c+f<=o?(s+=h,c+=f):u=!1,l+=f,l>e){p=!0;break}}d=!p}else{let h=0;for(;h<t.length;){let f=et(t,h);if(f){a+=f.code,h+=f.length;continue}if(t[h]===" "){if(u&&c+3<=o?(a&&(s+=a,a=""),s+=" ",c+=3):(u=!1,a=""),l+=3,l>e){p=!0;break}h++;continue}let b=h;for(;b<t.length&&t[b]!==" "&&!et(t,b);)b++;for(let{segment:v}of zn.segment(t.slice(h,b))){let y=pr(v);if(u&&c+y<=o?(a&&(s+=a,a=""),s+=v,c+=y):(u=!1,a=""),l+=y,l>e){p=!0;break}}if(p)break;h=b}d=h>=t.length}return!p&&d?i?t+" ".repeat(Math.max(0,e-l)):t:wb(s,c,n,r,e,i)}function mt(t,e,n,i=!1){return Rb(t,e,n,i).text}function Rb(t,e,n,i=!1){if(n<=0)return{text:"",width:0};let r=e+n,o="",s=0,a=0,l=0,c="";for(;l<t.length;){let u=et(t,l);if(u){a>=e&&a<r?o+=u.code:a<e&&(c+=u.code),l+=u.length;continue}let p=l;for(;p<t.length&&!et(t,p);)p++;for(let{segment:d}of zn.segment(t.slice(l,p))){let m=pr(d),g=a>=e&&a<r,h=!i||a+m<=r;if(g&&h&&(c&&(o+=c,c=""),o+=d,s+=m),a+=m,a>=r)break}if(l=p,a>=r)break}return{text:o,width:s}}var Sb=new lu;function DP(t,e,n,i,r=!1){let o="",s=0,a="",l=0,c=0,u=0,p="",d=!1,m=n+i;for(Sb.clear();u<t.length;){let g=et(t,u);if(g){Sb.process(g.code),c<e?p+=g.code:c>=n&&c<m&&d&&(a+=g.code),u+=g.length;continue}let h=u;for(;h<t.length&&!et(t,h);)h++;for(let{segment:f}of zn.segment(t.slice(u,h))){let b=pr(f);if(c<e&&c+b<=e?(p&&(o+=p,p=""),o+=f,s+=b):c>=n&&c<m&&(!r||c+b<=m)&&(d||(a+=Sb.getActiveCodes(),d=!0),a+=f,l+=b),c+=b,i<=0?c>=e:c>=m)break}if(u=h,i<=0?c>=e:c>=m)break}return{before:o,beforeWidth:s,after:a,afterWidth:l}}var xt=class{constructor(e=1,n=1,i){this.children=[];this.paddingX=e,this.paddingY=n,this.bgFn=i}addChild(e){this.children.push(e),this.invalidateCache()}removeChild(e){let n=this.children.indexOf(e);n!==-1&&(this.children.splice(n,1),this.invalidateCache())}clear(){this.children=[],this.invalidateCache()}setBgFn(e){this.bgFn=e}invalidateCache(){this.cache=void 0}matchCache(e,n,i){let r=this.cache;return!!r&&r.width===e&&r.bgSample===i&&r.childLines.length===n.length&&r.childLines.every((o,s)=>o===n[s])}invalidate(){this.invalidateCache();for(let e of this.children)e.invalidate?.()}render(e){if(this.children.length===0)return[];let n=Math.max(1,e-this.paddingX*2),i=" ".repeat(this.paddingX),r=[];for(let a of this.children){let l=a.render(n);for(let c of l)r.push(i+c)}if(r.length===0)return[];let o=this.bgFn?this.bgFn("test"):void 0;if(this.matchCache(e,r,o))return this.cache.lines;let s=[];for(let a=0;a<this.paddingY;a++)s.push(this.applyBg("",e));for(let a of r)s.push(this.applyBg(a,e));for(let a=0;a<this.paddingY;a++)s.push(this.applyBg("",e));return this.cache={childLines:r,width:e,bgSample:o,lines:s},s}applyBg(e,n){let i=N(e),r=Math.max(0,n-i),o=e+" ".repeat(r);return this.bgFn?to(o,n,this.bgFn):o}};var dr=!1;function pu(t){dr=t}var Qo={escape:"escape",esc:"esc",enter:"enter",return:"return",tab:"tab",space:"space",backspace:"backspace",delete:"delete",insert:"insert",clear:"clear",home:"home",end:"end",pageUp:"pageUp",pageDown:"pageDown",up:"up",down:"down",left:"left",right:"right",f1:"f1",f2:"f2",f3:"f3",f4:"f4",f5:"f5",f6:"f6",f7:"f7",f8:"f8",f9:"f9",f10:"f10",f11:"f11",f12:"f12",backtick:"`",hyphen:"-",equals:"=",leftbracket:"[",rightbracket:"]",backslash:"\\",semicolon:";",quote:"'",comma:",",period:".",slash:"/",exclamation:"!",at:"@",hash:"#",dollar:"$",percent:"%",caret:"^",ampersand:"&",asterisk:"*",leftparen:"(",rightparen:")",underscore:"_",plus:"+",pipe:"|",tilde:"~",leftbrace:"{",rightbrace:"}",colon:":",lessthan:"<",greaterthan:">",question:"?",ctrl:t=>`ctrl+${t}`,shift:t=>`shift+${t}`,alt:t=>`alt+${t}`,super:t=>`super+${t}`,ctrlShift:t=>`ctrl+shift+${t}`,shiftCtrl:t=>`shift+ctrl+${t}`,ctrlAlt:t=>`ctrl+alt+${t}`,altCtrl:t=>`alt+ctrl+${t}`,shiftAlt:t=>`shift+alt+${t}`,altShift:t=>`alt+shift+${t}`,ctrlSuper:t=>`ctrl+super+${t}`,superCtrl:t=>`super+ctrl+${t}`,shiftSuper:t=>`shift+super+${t}`,superShift:t=>`super+shift+${t}`,altSuper:t=>`alt+super+${t}`,superAlt:t=>`super+alt+${t}`,ctrlShiftAlt:t=>`ctrl+shift+alt+${t}`,ctrlShiftSuper:t=>`ctrl+shift+super+${t}`},Mb=new Set(["`","-","=","[","]","\\",";","'",",",".","/","!","@","#","$","%","^","&","*","(",")","_","+","|","~","{","}",":","<",">","?"]),re={shift:1,alt:2,ctrl:4,super:8},uu=192,je={escape:27,tab:9,enter:13,space:32,backspace:127,kpEnter:57414},_t={up:-1,down:-2,right:-3,left:-4},Ye={delete:-10,insert:-11,pageUp:-12,pageDown:-13,home:-14,end:-15},dj=new Map([[57399,48],[57400,49],[57401,50],[57402,51],[57403,52],[57404,53],[57405,54],[57406,55],[57407,56],[57408,57],[57409,46],[57410,47],[57411,42],[57412,45],[57413,43],[57415,61],[57416,44],[57417,_t.left],[57418,_t.right],[57419,_t.up],[57420,_t.down],[57421,Ye.pageUp],[57422,Ye.pageDown],[57423,Ye.home],[57424,Ye.end],[57425,Ye.insert],[57426,Ye.delete]]);function Pb(t){return dj.get(t)??t}function wm(t,e){return(e&~uu&re.shift)!==0&&t>=65&&t<=90?t+32:t}var Vn={up:["\x1B[A","\x1BOA"],down:["\x1B[B","\x1BOB"],right:["\x1B[C","\x1BOC"],left:["\x1B[D","\x1BOD"],home:["\x1B[H","\x1BOH","\x1B[1~","\x1B[7~"],end:["\x1B[F","\x1BOF","\x1B[4~","\x1B[8~"],insert:["\x1B[2~"],delete:["\x1B[3~"],pageUp:["\x1B[5~","\x1B[[5~"],pageDown:["\x1B[6~","\x1B[[6~"],clear:["\x1B[E","\x1BOE"],f1:["\x1BOP","\x1B[11~","\x1B[[A"],f2:["\x1BOQ","\x1B[12~","\x1B[[B"],f3:["\x1BOR","\x1B[13~","\x1B[[C"],f4:["\x1BOS","\x1B[14~","\x1B[[D"],f5:["\x1B[15~","\x1B[[E"],f6:["\x1B[17~"],f7:["\x1B[18~"],f8:["\x1B[19~"],f9:["\x1B[20~"],f10:["\x1B[21~"],f11:["\x1B[23~"],f12:["\x1B[24~"]},mj={up:["\x1B[a"],down:["\x1B[b"],right:["\x1B[c"],left:["\x1B[d"],clear:["\x1B[e"],insert:["\x1B[2$"],delete:["\x1B[3$"],pageUp:["\x1B[5$"],pageDown:["\x1B[6$"],home:["\x1B[7$"],end:["\x1B[8$"]},hj={up:["\x1BOa"],down:["\x1BOb"],right:["\x1BOc"],left:["\x1BOd"],clear:["\x1BOe"],insert:["\x1B[2^"],delete:["\x1B[3^"],pageUp:["\x1B[5^"],pageDown:["\x1B[6^"],home:["\x1B[7^"],end:["\x1B[8^"]};var hn=(t,e)=>e.includes(t),On=(t,e,n)=>n===re.shift?hn(t,mj[e]):n===re.ctrl?hn(t,hj[e]):!1,xm="press";function Ln(t){return t.includes("\x1B[200~")?!1:!!(t.includes(":3u")||t.includes(":3~")||t.includes(":3A")||t.includes(":3B")||t.includes(":3C")||t.includes(":3D")||t.includes(":3H")||t.includes(":3F"))}function vm(t){if(!t)return"press";let e=parseInt(t,10);return e===2?"repeat":e===3?"release":"press"}function gj(t){let e=t.match(/^\x1b\[(\d+)(?::(\d*))?(?::(\d+))?(?:;(\d+))?(?::(\d+))?u$/);if(e){let o=parseInt(e[1],10),s=e[2]&&e[2].length>0?parseInt(e[2],10):void 0,a=e[3]?parseInt(e[3],10):void 0,l=e[4]?parseInt(e[4],10):1,c=vm(e[5]);return xm=c,{codepoint:o,shiftedKey:s,baseLayoutKey:a,modifier:l-1,eventType:c}}let n=t.match(/^\x1b\[1;(\d+)(?::(\d+))?([ABCD])$/);if(n){let o=parseInt(n[1],10),s=vm(n[2]),a={A:-1,B:-2,C:-3,D:-4};return xm=s,{codepoint:a[n[3]],modifier:o-1,eventType:s}}let i=t.match(/^\x1b\[(\d+)(?:;(\d+))?(?::(\d+))?~$/);if(i){let o=parseInt(i[1],10),s=i[2]?parseInt(i[2],10):1,a=vm(i[3]),c={2:Ye.insert,3:Ye.delete,5:Ye.pageUp,6:Ye.pageDown,7:Ye.home,8:Ye.end}[o];if(c!==void 0)return xm=a,{codepoint:c,modifier:s-1,eventType:a}}let r=t.match(/^\x1b\[1;(\d+)(?::(\d+))?([HF])$/);if(r){let o=parseInt(r[1],10),s=vm(r[2]),a=r[3]==="H"?Ye.home:Ye.end;return xm=s,{codepoint:a,modifier:o-1,eventType:s}}return null}function ye(t,e,n){let i=gj(t);if(!i)return!1;let r=i.modifier&~uu,o=n&~uu;if(r!==o)return!1;let s=wm(Pb(i.codepoint),i.modifier),a=wm(Pb(e),n);if(s===a)return!0;if(i.baseLayoutKey!==void 0&&i.baseLayoutKey===e){let l=s,c=l>=97&&l<=122,u=Mb.has(String.fromCharCode(l));if(!c&&!u)return!0}return!1}function Ib(t){let e=t.match(/^\x1b\[27;(\d+);(\d+)~$/);if(!e)return null;let n=parseInt(e[1],10);return{codepoint:parseInt(e[2],10),modifier:n-1}}function Qn(t,e,n){let i=Ib(t);return i?i.codepoint===e&&i.modifier===n:!1}function fj(){return!!process.env.WT_SESSION&&!process.env.SSH_CONNECTION&&!process.env.SSH_CLIENT&&!process.env.SSH_TTY}function UP(t,e){return t==="\x7F"?e===0:t!=="\b"?!1:fj()?e===re.ctrl:e===0}function bj(t){let e=t.toLowerCase(),n=e.charCodeAt(0);return n>=97&&n<=122||e==="["||e==="\\"||e==="]"||e==="_"?String.fromCharCode(n&31):e==="-"?"":null}function $P(t){return t>="0"&&t<="9"}function ym(t,e,n){if(n===0)return!1;let i=Ib(t);return!i||i.modifier!==n?!1:wm(i.codepoint,i.modifier)===wm(e,n)}function xj(t){let e=t.toLowerCase().split("+"),n=e[e.length-1];return n?{key:n,ctrl:e.includes("ctrl"),shift:e.includes("shift"),alt:e.includes("alt"),super:e.includes("super")}:null}function De(t,e){let n=xj(e);if(!n)return!1;let{key:i,ctrl:r,shift:o,alt:s,super:a}=n,l=0;switch(o&&(l|=re.shift),s&&(l|=re.alt),r&&(l|=re.ctrl),a&&(l|=re.super),i){case"escape":case"esc":return l!==0?!1:t==="\x1B"||ye(t,je.escape,0)||Qn(t,je.escape,0);case"space":return!dr&&(l===re.ctrl&&t==="\0"||l===re.alt&&t==="\x1B ")?!0:l===0?t===" "||ye(t,je.space,0)||Qn(t,je.space,0):ye(t,je.space,l)||Qn(t,je.space,l);case"tab":return l===re.shift?t==="\x1B[Z"||ye(t,je.tab,re.shift)||Qn(t,je.tab,re.shift):l===0?t===" "||ye(t,je.tab,0):ye(t,je.tab,l)||Qn(t,je.tab,l);case"enter":case"return":return l===re.shift?ye(t,je.enter,re.shift)||ye(t,je.kpEnter,re.shift)||Qn(t,je.enter,re.shift)?!0:dr?t==="\x1B\r"||t===`
38
38
  `:!1:l===re.alt?ye(t,je.enter,re.alt)||ye(t,je.kpEnter,re.alt)||Qn(t,je.enter,re.alt)?!0:dr?!1:t==="\x1B\r":l===0?t==="\r"||!dr&&t===`
39
39
  `||t==="\x1BOM"||ye(t,je.enter,0)||ye(t,je.kpEnter,0):ye(t,je.enter,l)||ye(t,je.kpEnter,l)||Qn(t,je.enter,l);case"backspace":return l===re.alt?t==="\x1B\x7F"||t==="\x1B\b"?!0:ye(t,je.backspace,re.alt)||Qn(t,je.backspace,re.alt):l===re.ctrl?UP(t,re.ctrl)?!0:ye(t,je.backspace,re.ctrl)||Qn(t,je.backspace,re.ctrl):l===0?UP(t,0)||ye(t,je.backspace,0)||Qn(t,je.backspace,0):ye(t,je.backspace,l)||Qn(t,je.backspace,l);case"insert":return l===0?hn(t,Vn.insert)||ye(t,Ye.insert,0):On(t,"insert",l)?!0:ye(t,Ye.insert,l);case"delete":return l===0?hn(t,Vn.delete)||ye(t,Ye.delete,0):On(t,"delete",l)?!0:ye(t,Ye.delete,l);case"clear":return l===0?hn(t,Vn.clear):On(t,"clear",l);case"home":return l===0?hn(t,Vn.home)||ye(t,Ye.home,0):On(t,"home",l)?!0:ye(t,Ye.home,l);case"end":return l===0?hn(t,Vn.end)||ye(t,Ye.end,0):On(t,"end",l)?!0:ye(t,Ye.end,l);case"pageup":return l===0?hn(t,Vn.pageUp)||ye(t,Ye.pageUp,0):On(t,"pageUp",l)?!0:ye(t,Ye.pageUp,l);case"pagedown":return l===0?hn(t,Vn.pageDown)||ye(t,Ye.pageDown,0):On(t,"pageDown",l)?!0:ye(t,Ye.pageDown,l);case"up":return l===re.alt?t==="\x1Bp"||ye(t,_t.up,re.alt):l===0?hn(t,Vn.up)||ye(t,_t.up,0):On(t,"up",l)?!0:ye(t,_t.up,l);case"down":return l===re.alt?t==="\x1Bn"||ye(t,_t.down,re.alt):l===0?hn(t,Vn.down)||ye(t,_t.down,0):On(t,"down",l)?!0:ye(t,_t.down,l);case"left":return l===re.alt?t==="\x1B[1;3D"||!dr&&t==="\x1BB"||t==="\x1Bb"||ye(t,_t.left,re.alt):l===re.ctrl?t==="\x1B[1;5D"||On(t,"left",re.ctrl)||ye(t,_t.left,re.ctrl):l===0?hn(t,Vn.left)||ye(t,_t.left,0):On(t,"left",l)?!0:ye(t,_t.left,l);case"right":return l===re.alt?t==="\x1B[1;3C"||!dr&&t==="\x1BF"||t==="\x1Bf"||ye(t,_t.right,re.alt):l===re.ctrl?t==="\x1B[1;5C"||On(t,"right",re.ctrl)||ye(t,_t.right,re.ctrl):l===0?hn(t,Vn.right)||ye(t,_t.right,0):On(t,"right",l)?!0:ye(t,_t.right,l);case"f1":case"f2":case"f3":case"f4":case"f5":case"f6":case"f7":case"f8":case"f9":case"f10":case"f11":case"f12":return l!==0?!1:hn(t,Vn[i])}if(i.length===1&&(i>="a"&&i<="z"||$P(i)||Mb.has(i))){let c=i.charCodeAt(0),u=bj(i),p=i>="a"&&i<="z",d=$P(i);return l===re.ctrl+re.alt&&!dr&&u&&t===`\x1B${u}`||l===re.alt&&!dr&&(p||d||Mb.has(i))&&t===`\x1B${i}`?!0:l===re.ctrl?u&&t===u?!0:ye(t,c,re.ctrl)||ym(t,c,re.ctrl):l===re.shift+re.ctrl?ye(t,c,re.shift+re.ctrl)||ym(t,c,re.shift+re.ctrl):l===re.shift?p&&t===i.toUpperCase()?!0:ye(t,c,re.shift)||ym(t,c,re.shift):l!==0?ye(t,c,l)||ym(t,c,l):t===i||ye(t,c,0)}return!1}var vj=/^\x1b\[(\d+)(?::(\d*))?(?::(\d+))?(?:;(\d+))?(?::(\d+))?u$/,yj=re.shift|uu;function Sm(t){let e=t.match(vj);if(!e)return;let n=Number.parseInt(e[1]??"",10);if(!Number.isFinite(n))return;let i=e[2]&&e[2].length>0?Number.parseInt(e[2],10):void 0,r=e[4]?Number.parseInt(e[4],10):1,o=Number.isFinite(r)?r-1:0;if((o&~yj)!==0||o&(re.alt|re.ctrl))return;let s=n;if(o&re.shift&&typeof i=="number"&&(s=i),s=Pb(s),!(!Number.isFinite(s)||s<32))try{return String.fromCodePoint(s)}catch{return}}function wj(t){let e=Ib(t);if(!(!e||(e.modifier&~uu&~re.shift)!==0)&&!(!Number.isFinite(e.codepoint)||e.codepoint<32))try{return String.fromCodePoint(e.codepoint)}catch{return}}function Ab(t){return Sm(t)??wj(t)}var il={"tui.editor.cursorUp":{defaultKeys:"up",description:"Move cursor up"},"tui.editor.cursorDown":{defaultKeys:"down",description:"Move cursor down"},"tui.editor.historyPrevious":{defaultKeys:[],description:"Select previous prompt history entry"},"tui.editor.historyNext":{defaultKeys:[],description:"Select next prompt history entry"},"tui.editor.cursorLeft":{defaultKeys:["left","ctrl+b"],description:"Move cursor left"},"tui.editor.cursorRight":{defaultKeys:["right","ctrl+f"],description:"Move cursor right"},"tui.editor.cursorWordLeft":{defaultKeys:["alt+left","ctrl+left","alt+b"],description:"Move cursor word left"},"tui.editor.cursorWordRight":{defaultKeys:["alt+right","ctrl+right","alt+f"],description:"Move cursor word right"},"tui.editor.cursorLineStart":{defaultKeys:["home","ctrl+home","ctrl+a"],description:"Move to line start"},"tui.editor.cursorLineEnd":{defaultKeys:["end","ctrl+end","ctrl+e"],description:"Move to line end"},"tui.editor.jumpForward":{defaultKeys:"ctrl+]",description:"Jump forward to character"},"tui.editor.jumpBackward":{defaultKeys:"ctrl+alt+]",description:"Jump backward to character"},"tui.editor.pageUp":{defaultKeys:["pageUp","ctrl+pageUp"],description:"Page up"},"tui.editor.pageDown":{defaultKeys:["pageDown","ctrl+pageDown"],description:"Page down"},"tui.editor.deleteCharBackward":{defaultKeys:"backspace",description:"Delete character backward"},"tui.editor.deleteCharForward":{defaultKeys:["delete","ctrl+d"],description:"Delete character forward"},"tui.editor.deleteWordBackward":{defaultKeys:["ctrl+w","alt+backspace"],description:"Delete word backward"},"tui.editor.deleteWordForward":{defaultKeys:["alt+d","alt+delete"],description:"Delete word forward"},"tui.editor.deleteToLineStart":{defaultKeys:"ctrl+u",description:"Delete to line start"},"tui.editor.deleteToLineEnd":{defaultKeys:"ctrl+k",description:"Delete to line end"},"tui.editor.yank":{defaultKeys:"ctrl+y",description:"Yank"},"tui.editor.yankPop":{defaultKeys:"alt+y",description:"Yank pop"},"tui.editor.undo":{defaultKeys:"ctrl+-",description:"Undo"},"tui.input.newLine":{defaultKeys:["shift+enter","ctrl+j"],description:"Insert newline"},"tui.input.submit":{defaultKeys:"enter",description:"Submit input"},"tui.input.tab":{defaultKeys:"tab",description:"Tab / autocomplete"},"tui.input.copy":{defaultKeys:"ctrl+c",description:"Copy selection"},"tui.select.up":{defaultKeys:"up",description:"Move selection up"},"tui.select.down":{defaultKeys:"down",description:"Move selection down"},"tui.select.pageUp":{defaultKeys:"pageUp",description:"Selection page up"},"tui.select.pageDown":{defaultKeys:"pageDown",description:"Selection page down"},"tui.select.confirm":{defaultKeys:"enter",description:"Confirm selection"},"tui.select.cancel":{defaultKeys:["escape","ctrl+c"],description:"Cancel selection"},"tui.altScreen.pageUp":{defaultKeys:"pageUp",description:"Scroll viewport up one page"},"tui.altScreen.pageDown":{defaultKeys:"pageDown",description:"Scroll viewport down one page"},"tui.altScreen.halfPageUp":{defaultKeys:[],description:"Scroll viewport up half a page"},"tui.altScreen.halfPageDown":{defaultKeys:[],description:"Scroll viewport down half a page"},"tui.altScreen.previousPrompt":{defaultKeys:"ctrl+shift+up",description:"Jump to previous semantic prompt"},"tui.altScreen.nextPrompt":{defaultKeys:"ctrl+shift+down",description:"Jump to next semantic prompt"},"tui.altScreen.top":{defaultKeys:"home",description:"Scroll viewport to top"},"tui.altScreen.bottom":{defaultKeys:"end",description:"Scroll viewport to bottom"}};function Eb(t){if(t===void 0)return[];let e=Array.isArray(t)?t:[t],n=new Set,i=[];for(let r of e)n.has(r)||(n.add(r),i.push(r));return i}var nl=class{constructor(e,n={}){this.keysById=new Map;this.conflicts=[];this.definitions=e,this.userBindings=n,this.rebuild()}rebuild(){this.keysById.clear(),this.conflicts=[];let e=new Map;for(let[n,i]of Object.entries(this.userBindings))if(n in this.definitions)for(let r of Eb(i)){let o=e.get(r)??new Set;o.add(n),e.set(r,o)}for(let[n,i]of e)i.size>1&&this.conflicts.push({key:n,keybindings:[...i]});for(let[n,i]of Object.entries(this.definitions)){let r=this.userBindings[n],o=Eb(r===void 0?i.defaultKeys:r);this.keysById.set(n,o)}}matches(e,n){let i=this.keysById.get(n)??[];for(let r of i)if(De(e,r))return!0;return!1}getKeys(e){return[...this.keysById.get(e)??[]]}getDefinition(e){return this.definitions[e]}getConflicts(){return this.conflicts.map(e=>({...e,keybindings:[...e.keybindings]}))}setUserBindings(e){this.userBindings=e,this.rebuild()}getUserBindings(){return{...this.userBindings}}getResolvedBindings(){let e={};for(let n of Object.keys(this.definitions)){let i=this.keysById.get(n)??[];e[n]=i.length===1?i[0]:[...i]}return e}},Tm=null;function du(t){Tm=t}function we(){return Tm||(Tm=new nl(il)),Tm}var E=class{constructor(e="",n=1,i=1,r){this.text=e,this.paddingX=n,this.paddingY=i,this.customBgFn=r}setText(e){this.text=e,this.cachedText=void 0,this.cachedWidth=void 0,this.cachedLines=void 0}setCustomBgFn(e){this.customBgFn=e,this.cachedText=void 0,this.cachedWidth=void 0,this.cachedLines=void 0}invalidate(){this.cachedText=void 0,this.cachedWidth=void 0,this.cachedLines=void 0}render(e){if(this.cachedLines&&this.cachedText===this.text&&this.cachedWidth===e)return this.cachedLines;if(!this.text||this.text.trim()===""){let p=[];return this.cachedText=this.text,this.cachedWidth=e,this.cachedLines=p,p}let n=this.text.replace(/\t/g," "),i=Math.max(1,e-this.paddingX*2),r=mn(n,i),o=" ".repeat(this.paddingX),s=" ".repeat(this.paddingX),a=[];for(let p of r){let d=o+p+s;if(this.customBgFn)a.push(to(d,e,this.customBgFn));else{let m=N(d),g=Math.max(0,e-m);a.push(d+" ".repeat(g))}}let l=" ".repeat(e),c=[];for(let p=0;p<this.paddingY;p++){let d=this.customBgFn?to(l,e,this.customBgFn):l;c.push(d)}let u=[...c,...a,...c];return this.cachedText=this.text,this.cachedWidth=e,this.cachedLines=u,u.length>0?u:[""]}};var NP=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],BP=80,fi=class extends E{constructor(n,i,r,o="Loading...",s){super("",1,0);this.frames=[...NP];this.intervalMs=BP;this.currentFrame=0;this.intervalId=null;this.ui=null;this.renderIndicatorVerbatim=!1;this.message="Loading...";this.ui=n,this.spinnerColorFn=i,this.messageColorFn=r,this.message=o,this.setIndicator(s)}render(n){return["",...super.render(n)]}start(){this.updateDisplay(),this.restartAnimation()}stop(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null)}setMessage(n){this.message=n,this.updateDisplay()}setIndicator(n){this.renderIndicatorVerbatim=n!==void 0,this.frames=n?.frames!==void 0?[...n.frames]:[...NP],this.intervalMs=n?.intervalMs&&n.intervalMs>0?n.intervalMs:BP,this.currentFrame=0,this.start()}restartAnimation(){this.stop(),!(this.frames.length<=1)&&(this.intervalId=setInterval(()=>{this.currentFrame=(this.currentFrame+1)%this.frames.length,this.updateDisplay()},this.intervalMs))}updateDisplay(){let n=this.frames[this.currentFrame]??"",i=this.renderIndicatorVerbatim?n:this.spinnerColorFn(n),r=n.length>0?`${i} `:"";this.setText(`${r}${this.messageColorFn(this.message)}`),this.ui&&this.ui.requestRender()}};var mu=class extends fi{constructor(){super(...arguments);this.abortController=new AbortController}get signal(){return this.abortController.signal}get aborted(){return this.abortController.signal.aborted}handleInput(n){we().matches(n,"tui.select.cancel")&&(this.abortController.abort(),this.onAbort?.())}dispose(){this.stop()}};var rl=class{constructor(){this.ring=[]}push(e,n){if(e)if(n.accumulate&&this.ring.length>0){let i=this.ring.pop();this.ring.push(n.prepend?e+i:i+e)}else this.ring.push(e)}peek(){return this.ring.length>0?this.ring[this.ring.length-1]:void 0}rotate(){if(this.ring.length>1){let e=this.ring.pop();this.ring.unshift(e)}}get length(){return this.ring.length}};import*as iI from"node:os";import*as rI from"node:path";import{performance as Pm}from"node:perf_hooks";function Sj(t){let e=t.startsWith("#")?t.slice(1):t,n=parseInt(e.slice(0,2),16),i=parseInt(e.slice(2,4),16),r=parseInt(e.slice(4,6),16);return{r:n,g:i,b:r}}function ol(t){if(!/^[0-9a-f]+$/i.test(t))return;let e=16**t.length-1;if(!(e<=0))return Math.round(parseInt(t,16)/e*255)}var jP=/^\x1b\]11;([^\x07\x1b]*)(?:\x07|\x1b\\)$/i,Tj=/^(?:\x1b\[\?997;(1|2)n)+$/;function qP(t){return jP.test(t)}function _b(t){let e=t.match(jP);if(!e)return;let n=e[1].trim();if(n.startsWith("#")){let u=n.slice(1);if(/^[0-9a-f]{6}$/i.test(u))return Sj(n);if(/^[0-9a-f]{12}$/i.test(u)){let p=ol(u.slice(0,4)),d=ol(u.slice(4,8)),m=ol(u.slice(8,12));return p!==void 0&&d!==void 0&&m!==void 0?{r:p,g:d,b:m}:void 0}return}let i=n.replace(/^rgba?:/i,""),[r,o,s]=i.split("/");if(r===void 0||o===void 0||s===void 0)return;let a=ol(r),l=ol(o),c=ol(s);return a!==void 0&&l!==void 0&&c!==void 0?{r:a,g:l,b:c}:void 0}function Ob(t){let e=t.match(Tj);if(e)return e[1]==="2"?"light":"dark"}import{execSync as kj}from"node:child_process";import{homedir as Cj}from"node:os";import{isAbsolute as Rj}from"node:path";import{pathToFileURL as Mj}from"node:url";var km=null,HP={widthPx:9,heightPx:18};function Cm(){return HP}function Lb(t){HP=t}function Pj(){try{return kj("tmux display-message -p '#{client_termfeatures}'",{encoding:"utf8",timeout:250,stdio:["ignore","pipe","ignore"]}).split(",").map(e=>e.trim()).includes("hyperlinks")}catch{return!1}}function zP(t=Pj){let e=process.env.TERM_PROGRAM?.toLowerCase()||"",n=process.env.TERMINAL_EMULATOR?.toLowerCase()||"",i=process.env.TERM?.toLowerCase()||"",r=process.env.COLORTERM?.toLowerCase()||"",o=r==="truecolor"||r==="24bit",s=process.platform==="win32";return process.env.TMUX||i.startsWith("tmux")?{images:null,trueColor:o,hyperlinks:t()}:i.startsWith("screen")?{images:null,trueColor:o,hyperlinks:!1}:process.env.KITTY_WINDOW_ID||e==="kitty"?{images:"kitty",trueColor:!0,hyperlinks:!0}:e==="ghostty"||i.includes("ghostty")||process.env.GHOSTTY_RESOURCES_DIR?{images:"kitty",trueColor:!0,hyperlinks:!0}:process.env.WEZTERM_PANE||e==="wezterm"?{images:"kitty",trueColor:!0,hyperlinks:!0}:e==="warpterminal"||process.env.WARP_SESSION_ID||process.env.WARP_TERMINAL_SESSION_UUID?{images:"kitty",trueColor:!0,hyperlinks:!0}:process.env.ITERM_SESSION_ID||e==="iterm.app"?{images:"iterm2",trueColor:!0,hyperlinks:!0}:process.env.WT_SESSION?{images:null,trueColor:!0,hyperlinks:!0}:e==="vscode"?{images:null,trueColor:!0,hyperlinks:!0}:e==="alacritty"?{images:null,trueColor:!0,hyperlinks:!0}:n==="jetbrains-jediterm"?{images:null,trueColor:!0,hyperlinks:!1}:s?{images:null,trueColor:!0,hyperlinks:!1}:{images:null,trueColor:o,hyperlinks:!1}}function at(){return km||(km=zP()),km}function Rm(t){km=t}var al="\x1B_G",GP="\x1B]1337;File=";function St(t){return t.startsWith(al)||t.startsWith(GP)?!0:t.includes(al)||t.includes(GP)}function Wb(){return Math.floor(Math.random()*4294967294)+1}function VP(t,e={}){let i=["a=T","f=100","q=2"];if(e.moveCursor===!1&&i.push("C=1"),e.columns&&i.push(`c=${e.columns}`),e.rows&&i.push(`r=${e.rows}`),e.imageId&&i.push(`i=${e.imageId}`),t.length<=4096)return`\x1B_G${i.join(",")};${t}\x1B\\`;let r=[],o=0,s=!0;for(;o<t.length;){let a=t.slice(o,o+4096),l=o+4096>=t.length;s?(r.push(`\x1B_G${i.join(",")},m=1;${a}\x1B\\`),s=!1):l?r.push(`\x1B_Gm=0;${a}\x1B\\`):r.push(`\x1B_Gm=1;${a}\x1B\\`),o+=4096}return r.join("")}function hu(t){return`\x1B_Ga=d,d=I,i=${t},q=2\x1B\\`}function Fb(){return"\x1B_Ga=d,d=A,q=2\x1B\\"}function Db(){return"\x1B_Ga=d,d=a,q=2\x1B\\"}function QP(t,e={}){let n=[`inline=${e.inline!==!1?1:0}`,`size=${Buffer.byteLength(t,"base64")}`];if(e.width!==void 0&&n.push(`width=${e.width}`),e.height!==void 0&&n.push(`height=${e.height}`),e.name){let i=Buffer.from(e.name).toString("base64");n.push(`name=${i}`)}return e.preserveAspectRatio===!1&&n.push("preserveAspectRatio=0"),`\x1B]1337;File=${n.join(";")}:${t}\x07`}var sl=new Map,KP=0;function Ij(t){if(KP+=1,sl.delete(t.imageId),sl.set(t.imageId,{...t,transmissionGeneration:KP}),sl.size>1e3){let e=sl.keys().next().value;e!==void 0&&sl.delete(e)}}function JP(t){let e=/\x1b_G([^;]*);/.exec(t)?.[1];if(!e)return;let n=/(?:^|,)i=(\d+)(?:,|$)/.exec(e)?.[1];return n===void 0?void 0:sl.get(Number.parseInt(n,10))}function Mm(t){let e=JP(t);if(e)return{imageId:e.imageId,columns:e.columns,rows:e.rows,widthPx:e.widthPx,heightPx:e.heightPx}}var Aj=new Set(["i","p","x","y","w","h","X","Y","c","r","C","U","z","P","Q","H","V"]);function YP(t){let e=/\x1b_G([^;]*);/.exec(t),n=JP(t);if(!e||!n)return;let i=e.index,r=e[1],o;for(;;){let l=t.indexOf("\x1B\\",i+al.length);if(l===-1)return;if(o=l+2,!/(?:^|,)m=1(?:,|$)/.test(r))break;if(i=o,!t.startsWith(al,i))return;let c=t.indexOf(";",i+al.length);if(c===-1)return;r=t.slice(i+al.length,c)}let a=`\x1B_Ga=p,q=2,${e[1].split(",").filter(l=>Aj.has(l.split("=",1)[0]??"")).join(",")}\x1B\\`;return{imageId:n.imageId,transmissionGeneration:n.transmissionGeneration,transmissionBytes:o-e.index,estimatedDecodedBytes:n.widthPx*n.heightPx*4,sequence:a,replacementLine:`${t.slice(0,e.index)}${a}${t.slice(o)}`}}function Ub(t,e,n){let i=Mm(t),r=/\x1b_G([^;]*);/.exec(t);if(!i||!r||e<0||e>=i.rows||n<=0)return t;let o=Math.min(n,i.rows-e);if(e===0&&o===i.rows)return t;let s=Math.floor(i.heightPx*e/i.rows),a=Math.ceil(i.heightPx*(e+o)/i.rows),l=Math.max(1,Math.min(i.heightPx,a)-s),c=r[1].split(",").filter(u=>!/^[yhr]=/.test(u));return c.push(`y=${s}`,`h=${l}`,`r=${o}`),`${t.slice(0,r.index)}\x1B_G${c.join(",")};${t.slice(r.index+r[0].length)}`}function Ej(t,e,n,i={widthPx:9,heightPx:18}){let r=Math.max(1,Math.floor(e)),o=n===void 0?void 0:Math.max(1,Math.floor(n)),s=Math.max(1,t.widthPx),a=Math.max(1,t.heightPx),l=r*i.widthPx/s,c=o===void 0?l:o*i.heightPx/a,u=Math.min(l,c),p=s*u,d=a*u,m=Math.ceil(p/i.widthPx),g=Math.ceil(d/i.heightPx);return{columns:Math.max(1,Math.min(r,m)),rows:Math.max(1,o===void 0?g:Math.min(o,g))}}function XP(t){try{let e=Buffer.from(t,"base64");if(e.length<24||e[0]!==137||e[1]!==80||e[2]!==78||e[3]!==71)return null;let n=e.readUInt32BE(16),i=e.readUInt32BE(20);return{widthPx:n,heightPx:i}}catch{return null}}function ZP(t){try{let e=Buffer.from(t,"base64");if(e.length<2||e[0]!==255||e[1]!==216)return null;let n=2;for(;n<e.length-9;){if(e[n]!==255){n++;continue}let i=e[n+1];if(i>=192&&i<=194){let o=e.readUInt16BE(n+5);return{widthPx:e.readUInt16BE(n+7),heightPx:o}}if(n+3>=e.length)return null;let r=e.readUInt16BE(n+2);if(r<2)return null;n+=2+r}return null}catch{return null}}function eI(t){try{let e=Buffer.from(t,"base64");if(e.length<10)return null;let n=e.slice(0,6).toString("ascii");if(n!=="GIF87a"&&n!=="GIF89a")return null;let i=e.readUInt16LE(6),r=e.readUInt16LE(8);return{widthPx:i,heightPx:r}}catch{return null}}function tI(t){try{let e=Buffer.from(t,"base64");if(e.length<30)return null;let n=e.slice(0,4).toString("ascii"),i=e.slice(8,12).toString("ascii");if(n!=="RIFF"||i!=="WEBP")return null;let r=e.slice(12,16).toString("ascii");if(r==="VP8 "){if(e.length<30)return null;let o=e.readUInt16LE(26)&16383,s=e.readUInt16LE(28)&16383;return{widthPx:o,heightPx:s}}else if(r==="VP8L"){if(e.length<25)return null;let o=e.readUInt32LE(21),s=(o&16383)+1,a=(o>>14&16383)+1;return{widthPx:s,heightPx:a}}else if(r==="VP8X"){if(e.length<30)return null;let o=(e[24]|e[25]<<8|e[26]<<16)+1,s=(e[27]|e[28]<<8|e[29]<<16)+1;return{widthPx:o,heightPx:s}}return null}catch{return null}}function gu(t,e){return e==="image/png"?XP(t):e==="image/jpeg"?ZP(t):e==="image/gif"?eI(t):e==="image/webp"?tI(t):null}function $b(t,e,n={}){let i=at();if(!i.images)return null;let r=n.maxWidthCells??80,o=Ej(e,r,n.maxHeightCells,Cm());return i.images==="kitty"?(n.imageId!==void 0&&Ij({imageId:n.imageId,columns:o.columns,rows:o.rows,widthPx:e.widthPx,heightPx:e.heightPx}),{sequence:VP(t,{columns:o.columns,rows:o.rows,imageId:n.imageId,moveCursor:n.moveCursor}),columns:o.columns,rows:o.rows,imageId:n.imageId}):i.images==="iterm2"?{sequence:QP(t,{width:o.columns,height:"auto",preserveAspectRatio:n.preserveAspectRatio??!0}),columns:o.columns,rows:o.rows}:null}function no(t,e){return`\x1B]8;;${e}\x1B\\${t}\x1B]8;;\x1B\\`}function _j(t){let e=Cj();return e&&(t===e||t.startsWith(`${e}/`)||t.startsWith(`${e}\\`))?`~${t.slice(e.length)}`:t}function ll(t,e,n){let i=[];if(n){let r=_j(n);at().hyperlinks&&Rj(n)?i.push(no(r,Mj(n).href)):i.push(r)}return i.push(`[${t}]`),e&&i.push(`${e.widthPx}x${e.heightPx}`),`[Image: ${i.join(" ")}]`}function Nb(t){return t!==null&&"focused"in t}var bi="\x1B_pi:c\x07";function nI(t,e){if(t===void 0)return;if(typeof t=="number")return t;let n=t.match(/^(\d+(?:\.\d+)?)%$/);if(n)return Math.floor(e*parseFloat(n[1])/100)}var K=class{constructor(){this.children=[]}addChild(e){this.children.push(e)}removeChild(e){let n=this.children.indexOf(e);n!==-1&&this.children.splice(n,1)}clear(){this.children=[]}invalidate(){for(let e of this.children)e.invalidate?.()}render(e){let n=[];for(let i of this.children){let r=i.render(e);for(let o of r)n.push(o)}return n}},Bb="\x1B[0m\x1B]8;;\x07";function Jo(t,e,n,i,r){if(St(t))return t;let o=n+i,s=DP(t,n,o,r-o,!0),a=Rb(e,0,i,!0),l=Math.max(0,n-s.beforeWidth),c=Math.max(0,i-a.width),u=Math.max(n,s.beforeWidth),p=Math.max(i,a.width),d=Math.max(0,r-u-p),m=Math.max(0,d-s.afterWidth),g=s.before+" ".repeat(l)+Bb+a.text+" ".repeat(c)+Bb+s.after+" ".repeat(m);return N(g)<=r?g:mt(g,0,r,!0)}var jb=Symbol.for("@earendil-works/pi-tui/viewport");function Im(t){return t[jb]===!0}var cl=class t extends K{constructor(n,i,r){super();this.focusedComponent=null;this.inputListeners=new Set;this.renderRequested=!1;this.immediateRenderScheduled=!1;this.lastRenderAt=0;this.showHardwareCursor=process.env.PI_HARDWARE_CURSOR==="1";this.clearOnShrink=process.env.PI_CLEAR_ON_SHRINK==="1";this.fullRedrawCount=0;this.stopped=!1;this.pendingOsc11BackgroundReplies=0;this.pendingOsc11BackgroundQueries=[];this.terminalColorSchemeListeners=new Set;this.terminalColorSchemeNotificationsEnabled=!1;this.focusOrderCounter=0;this.overlayStack=[];this.overlayFocusRestore={status:"inactive"};this.terminal=n,this.logDirectory=r??process.env.PI_CODING_AGENT_DIR??rI.join(iI.homedir(),".pi","agent"),i!==void 0&&(this.showHardwareCursor=i)}static{this.MIN_RENDER_INTERVAL_MS=16}get hasOverlayEntries(){return this.overlayStack.length>0}resetRenderState(){}beforeTerminalStart(){}afterTerminalStart(){}beforeTerminalStop(n){}afterTerminalStop(n){}get fullRedraws(){return this.fullRedrawCount}getShowHardwareCursor(){return this.showHardwareCursor}setShowHardwareCursor(n){this.showHardwareCursor!==n&&(this.showHardwareCursor=n,n||this.terminal.hideCursor(),this.requestRender())}getClearOnShrink(){return this.clearOnShrink}setClearOnShrink(n){this.clearOnShrink=n}getFocusedComponent(){return this.focusedComponent}setFocus(n){this.setFocusInternal({component:n,overlayFocusRestore:"clear"})}setFocusInternal({component:n,overlayFocusRestore:i}){let r=this.focusedComponent,o=n,s=r?this.overlayStack.find(u=>u.component===r&&this.isOverlayVisible(u)):void 0,a=o?this.overlayStack.some(u=>u.component===o):!1,l=this.getVisibleOverlayFocusRestore();o&&!a?l.status==="blocked"&&l.blockedBy===r?l.resume.status==="focus-target"||!this.isComponentMounted(l.blockedBy)?o=this.resolveBlockedOverlayFocusResume(l):this.overlayFocusRestore={status:"blocked",overlay:l.overlay,blockedBy:o,resume:l.resume}:s&&l.status!=="inactive"&&l.overlay===s&&!this.isOverlayFocusAncestor(s,o)&&(this.overlayFocusRestore={status:"blocked",overlay:s,blockedBy:o,resume:{status:"restore-overlay"}}):o===null&&(l.status==="blocked"&&l.blockedBy===r?o=this.resolveBlockedOverlayFocusResume(l):i==="clear"&&this.clearOverlayFocusRestore()),Nb(this.focusedComponent)&&(this.focusedComponent.focused=!1),this.focusedComponent=o,Nb(o)&&(o.focused=!0);let c=o?this.overlayStack.find(u=>u.component===o&&this.isOverlayVisible(u)):void 0;c&&(this.overlayFocusRestore={status:"eligible",overlay:c})}clearOverlayFocusRestore(){this.overlayFocusRestore={status:"inactive"}}clearOverlayFocusRestoreFor(n){this.overlayFocusRestore.status!=="inactive"&&this.overlayFocusRestore.overlay===n&&this.clearOverlayFocusRestore()}resolveBlockedOverlayFocusResume(n){return n.resume.status==="restore-overlay"?n.overlay.component:(this.clearOverlayFocusRestore(),n.resume.target)}getVisibleOverlayFocusRestore(){let n=this.overlayFocusRestore;return n.status==="inactive"?n:!this.overlayStack.includes(n.overlay)||!this.isOverlayVisible(n.overlay)?{status:"inactive"}:n}isOverlayFocusAncestor(n,i){let r=new Set,o=n.preFocus;for(;o&&!r.has(o);){if(r.add(o),o===i)return!0;o=this.overlayStack.find(s=>s.component===o)?.preFocus??null}return!1}retargetOverlayPreFocus(n){for(let i of this.overlayStack)i!==n&&i.preFocus===n.component&&(i.preFocus=n.preFocus)}getMountedRoots(){return this.children}isComponentMounted(n){return this.getMountedRoots().some(i=>this.containsComponent(i,n))}containsComponent(n,i){return n===i?!0:n instanceof K?n.children.some(r=>this.containsComponent(r,i)):!1}showOverlay(n,i){let r={component:n,...i===void 0?{}:{options:i},preFocus:this.focusedComponent,hidden:!1,focusOrder:++this.focusOrderCounter};return this.overlayStack.push(r),!i?.nonCapturing&&this.isOverlayVisible(r)&&this.setFocus(n),this.terminal.hideCursor(),this.requestRender(),{hide:()=>{let o=this.overlayStack.indexOf(r);if(o!==-1){if(this.clearOverlayFocusRestoreFor(r),this.retargetOverlayPreFocus(r),this.overlayStack.splice(o,1),this.focusedComponent===n){let s=this.getTopmostVisibleOverlay();this.setFocus(s?.component??r.preFocus)}this.overlayStack.length===0&&this.terminal.hideCursor(),this.requestRender()}},setHidden:o=>{if(r.hidden!==o){if(r.hidden=o,o){if(this.clearOverlayFocusRestoreFor(r),this.focusedComponent===n){let s=this.getTopmostVisibleOverlay();this.setFocus(s?.component??r.preFocus)}}else!i?.nonCapturing&&this.isOverlayVisible(r)&&(r.focusOrder=++this.focusOrderCounter,this.setFocus(n));this.requestRender()}},isHidden:()=>r.hidden,focus:()=>{!this.overlayStack.includes(r)||!this.isOverlayVisible(r)||(r.focusOrder=++this.focusOrderCounter,this.setFocus(n),this.requestRender())},unfocus:o=>{let s=this.focusedComponent===n,a=this.overlayFocusRestore,l=a.status!=="inactive"&&a.overlay===r;if(!(!s&&!l)){if(a.status==="blocked"&&a.overlay===r&&this.focusedComponent===a.blockedBy){o?this.overlayFocusRestore={status:"blocked",overlay:r,blockedBy:a.blockedBy,resume:{status:"focus-target",target:o.target}}:this.clearOverlayFocusRestore(),this.requestRender();return}if(this.clearOverlayFocusRestoreFor(r),s||o){let c=this.getTopmostVisibleOverlay(),u=c&&c!==r?c.component:r.preFocus;this.setFocus(o?o.target:u)}this.requestRender()}},isFocused:()=>this.focusedComponent===n}}hideOverlay(){let n=this.overlayStack[this.overlayStack.length-1];if(n){if(this.clearOverlayFocusRestoreFor(n),this.retargetOverlayPreFocus(n),this.overlayStack.pop(),this.focusedComponent===n.component){let i=this.getTopmostVisibleOverlay();this.setFocus(i?.component??n.preFocus)}this.overlayStack.length===0&&this.terminal.hideCursor(),this.requestRender()}}hasOverlay(){return this.overlayStack.some(n=>this.isOverlayVisible(n))}isOverlayVisible(n){return n.hidden?!1:n.options?.visible?n.options.visible(this.terminal.columns,this.terminal.rows):!0}getTopmostVisibleOverlay(){let n;for(let i of this.overlayStack)i.options?.nonCapturing||!this.isOverlayVisible(i)||(!n||i.focusOrder>n.focusOrder)&&(n=i);return n}invalidate(){for(let n of this.getMountedRoots())n.invalidate();for(let n of this.overlayStack)n.component.invalidate()}start(){this.stopped=!1,this.beforeTerminalStart(),this.terminal.start(n=>this.handleTerminalInput(n),()=>this.requestRender()),this.afterTerminalStart(),this.terminal.hideCursor(),this.terminalColorSchemeNotificationsEnabled&&this.terminal.write("\x1B[?2031h"),this.queryCellSize(),this.requestRender()}addInputListener(n){return this.inputListeners.add(n),()=>{this.inputListeners.delete(n)}}removeInputListener(n){this.inputListeners.delete(n)}onTerminalColorSchemeChange(n){return this.terminalColorSchemeListeners.add(n),()=>{this.terminalColorSchemeListeners.delete(n)}}setTerminalColorSchemeNotifications(n){this.terminalColorSchemeNotificationsEnabled!==n&&(this.terminalColorSchemeNotificationsEnabled=n,this.stopped||this.terminal.write(n?"\x1B[?2031h":"\x1B[?2031l"))}queryCellSize(){at().images&&this.terminal.write("\x1B[16t")}stop(n={}){this.stopped=!0,this.cancelRenderTimer(),this.terminalColorSchemeNotificationsEnabled&&this.terminal.write("\x1B[?2031l"),this.beforeTerminalStop(n),this.terminal.showCursor(),this.terminal.stop(),this.afterTerminalStop(n)}renderNow(n=!1){n&&this.resetRenderState(),this.renderRequested=!1,this.cancelRenderTimer(),this.lastRenderAt=Pm.now(),this.doRender()}requestRender(n=!1){if(n){this.resetRenderState(),this.requestImmediateRender();return}this.renderRequested||(this.renderRequested=!0,process.nextTick(()=>this.scheduleRender()))}requestImmediateRender(){this.cancelRenderTimer(),this.renderRequested=!0,!this.immediateRenderScheduled&&(this.immediateRenderScheduled=!0,process.nextTick(()=>{this.immediateRenderScheduled=!1,!(this.stopped||!this.renderRequested)&&(this.cancelRenderTimer(),this.renderRequested=!1,this.lastRenderAt=Pm.now(),this.doRender())}))}cancelRenderTimer(){this.renderTimer&&(clearTimeout(this.renderTimer),this.renderTimer=void 0)}scheduleRender(){if(this.stopped||this.renderTimer||!this.renderRequested)return;let n=Pm.now()-this.lastRenderAt,i=Math.max(0,t.MIN_RENDER_INTERVAL_MS-n);this.renderTimer=setTimeout(()=>{this.renderTimer=void 0,!(this.stopped||!this.renderRequested)&&(this.renderRequested=!1,this.lastRenderAt=Pm.now(),this.doRender(),this.renderRequested&&this.scheduleRender())},i)}handleTerminalInput(n){if(this.consumeOsc11BackgroundResponse(n)||this.consumeTerminalColorSchemeReport(n))return;if(this.inputListeners.size>0){let o=n;for(let s of this.inputListeners){let a=s(o);if(a?.consume)return;a?.data!==void 0&&(o=a.data)}if(o.length===0)return;n=o}if(this.consumeCellSizeResponse(n))return;if(De(n,"shift+ctrl+d")&&this.onDebug){this.onDebug();return}let i=this.overlayStack.find(o=>o.component===this.focusedComponent);if(i&&!this.isOverlayVisible(i)){let o=this.getTopmostVisibleOverlay();o?this.setFocus(o.component):this.setFocusInternal({component:i.preFocus,overlayFocusRestore:"preserve"})}if(!this.overlayStack.some(o=>o.component===this.focusedComponent)){let o=this.getVisibleOverlayFocusRestore();o.status==="eligible"?this.setFocus(o.overlay.component):o.status==="blocked"&&o.blockedBy!==this.focusedComponent&&(o.resume.status==="restore-overlay"?this.setFocus(o.overlay.component):(this.clearOverlayFocusRestore(),this.setFocus(o.resume.target)))}if(this.focusedComponent?.handleInput){if(Ln(n)&&!this.focusedComponent.wantsKeyRelease)return;this.focusedComponent.handleInput(n),this.requestImmediateRender()}}consumeOsc11BackgroundResponse(n){if(this.pendingOsc11BackgroundReplies<=0||!qP(n))return!1;let i=_b(n);this.pendingOsc11BackgroundReplies-=1;let r=this.pendingOsc11BackgroundQueries.shift();return r&&!r.settled&&(r.settled=!0,r.timer&&(clearTimeout(r.timer),r.timer=void 0),r.resolve?.(i),r.resolve=void 0),!0}consumeTerminalColorSchemeReport(n){let i=Ob(n);if(!i)return!1;for(let r of this.terminalColorSchemeListeners)r(i);return!0}consumeCellSizeResponse(n){let i=n.match(/^\x1b\[6;(\d+);(\d+)t$/);if(!i)return!1;let r=parseInt(i[1],10),o=parseInt(i[2],10);return r<=0||o<=0||(Lb({widthPx:o,heightPx:r}),this.invalidate(),this.requestRender()),!0}resolveOverlayLayout(n,i,r,o){let s=n??{},a=typeof s.margin=="number"?{top:s.margin,right:s.margin,bottom:s.margin,left:s.margin}:s.margin??{},l=Math.max(0,a.top??0),c=Math.max(0,a.right??0),u=Math.max(0,a.bottom??0),p=Math.max(0,a.left??0),d=Math.max(1,r-p-c),m=Math.max(1,o-l-u),g=nI(s.width,r)??Math.min(80,d);s.minWidth!==void 0&&(g=Math.max(g,s.minWidth)),g=Math.max(1,Math.min(g,d));let h=nI(s.maxHeight,o);h!==void 0&&(h=Math.max(1,Math.min(h,m)));let f=h!==void 0?Math.min(i,h):i,b,v;if(s.row!==void 0)if(typeof s.row=="string"){let y=s.row.match(/^(\d+(?:\.\d+)?)%$/);if(y){let R=Math.max(0,m-f),T=parseFloat(y[1])/100;b=l+Math.floor(R*T)}else b=this.resolveAnchorRow("center",f,m,l)}else b=s.row;else{let y=s.anchor??"center";b=this.resolveAnchorRow(y,f,m,l)}if(s.col!==void 0)if(typeof s.col=="string"){let y=s.col.match(/^(\d+(?:\.\d+)?)%$/);if(y){let R=Math.max(0,d-g),T=parseFloat(y[1])/100;v=p+Math.floor(R*T)}else v=this.resolveAnchorCol("center",g,d,p)}else v=s.col;else{let y=s.anchor??"center";v=this.resolveAnchorCol(y,g,d,p)}return s.offsetY!==void 0&&(b+=s.offsetY),s.offsetX!==void 0&&(v+=s.offsetX),b=Math.max(l,Math.min(b,o-u-f)),v=Math.max(p,Math.min(v,r-c-g)),{width:g,row:b,col:v,maxHeight:h}}resolveAnchorRow(n,i,r,o){switch(n){case"top-left":case"top-center":case"top-right":return o;case"bottom-left":case"bottom-center":case"bottom-right":return o+r-i;case"left-center":case"center":case"right-center":return o+Math.floor((r-i)/2)}}resolveAnchorCol(n,i,r,o){switch(n){case"top-left":case"left-center":case"bottom-left":return o;case"top-right":case"right-center":case"bottom-right":return o+r-i;case"top-center":case"center":case"bottom-center":return o+Math.floor((r-i)/2)}}compositeOverlays(n,i,r){if(this.overlayStack.length===0)return n;let o=[...n],s=[],a=o.length,l=this.overlayStack.filter(p=>this.isOverlayVisible(p));l.sort((p,d)=>p.focusOrder-d.focusOrder);for(let p of l){let{component:d,options:m}=p,{width:g,maxHeight:h}=this.resolveOverlayLayout(m,0,i,r),f=d.render(g);h!==void 0&&f.length>h&&(f=f.slice(0,h));let{row:b,col:v}=this.resolveOverlayLayout(m,f.length,i,r);s.push({overlayLines:f,row:b,col:v,w:g}),a=Math.max(a,b+f.length)}let c=Math.max(o.length,r,a);for(;o.length<c;)o.push("");let u=Math.max(0,c-r);for(let{overlayLines:p,row:d,col:m,w:g}of s)for(let h=0;h<p.length;h++){let f=u+d+h;if(f>=0&&f<o.length){let b=N(p[h])>g?mt(p[h],0,g,!0):p[h];o[f]=this.compositeLineAt(o[f],b,m,g,i)}}return o}applyLineResets(n){let i=Bb;for(let r=0;r<n.length;r++){let o=n[r];St(o)||(n[r]=OP(o)+i)}return n}compositeLineAt(n,i,r,o,s){return Jo(n,i,r,o,s)}extractCursorPosition(n,i){let r=Math.max(0,n.length-i);for(let o=n.length-1;o>=r;o--){let s=n[o],a=s.indexOf(bi);if(a!==-1){let l=s.slice(0,a),c=N(l);return n[o]=s.slice(0,a)+s.slice(a+bi.length),{row:o,col:c}}}return null}queryTerminalBackgroundColor({timeoutMs:n}){return new Promise(i=>{let r={settled:!1,resolve:i,timer:void 0};r.timer=setTimeout(()=>{r.settled||(r.settled=!0,r.timer=void 0,r.resolve?.(void 0),r.resolve=void 0)},n),this.pendingOsc11BackgroundQueries.push(r),this.pendingOsc11BackgroundReplies+=1,this.terminal.write("\x1B]11;?\x07")})}queryTerminalColorScheme({timeoutMs:n}){return new Promise(i=>{let r=!1,o,s=()=>{},a=l=>{r||(r=!0,o&&(clearTimeout(o),o=void 0),s(),i(l))};s=this.onTerminalColorSchemeChange(a),o=setTimeout(()=>a(void 0),n),this.terminal.write("\x1B[?996n")})}};var ul=class{constructor(){this.stack=[]}push(e){this.stack.push(structuredClone(e))}pop(){return this.stack.pop()}clear(){this.stack.length=0}get length(){return this.stack.length}};var oI=tl();function Am(t,e,n){if(e<=0)return 0;let i=t.slice(0,e),r=n?.segment,o=n?.isAtomicSegment,s=r?[...r(i)]:[...oI.segment(i)],a=e;for(;s.length>0&&!o?.(s[s.length-1]?.segment||"")&&_n(s[s.length-1]?.segment||"");)a-=s.pop()?.segment.length||0;if(s.length===0)return a;let l=s[s.length-1];if(o?.(l.segment))a-=l.segment.length;else if(l.isWordLike){let c=l.segment,u=[...c.matchAll(new RegExp(Cb,"g"))];if(u.length<=0)a-=c.length;else{let p=u[u.length-1];a-=c.length-(p.index+p[0].length)}}else for(;s.length>0&&!o?.(s[s.length-1]?.segment||"")&&!s[s.length-1]?.isWordLike&&!_n(s[s.length-1]?.segment||"");)a-=s.pop()?.segment.length||0;return a}function Em(t,e,n){if(e>=t.length)return t.length;let i=t.slice(e),r=n?.segment,o=n?.isAtomicSegment,a=(r?r(i):oI.segment(i))[Symbol.iterator](),l=a.next(),c=e;for(;!l.done&&!o?.(l.value.segment)&&_n(l.value.segment);)c+=l.value.segment.length,l=a.next();if(l.done)return c;if(o?.(l.value.segment))c+=l.value.segment.length;else if(l.value.isWordLike)c+=Cb.exec(l.value.segment)?.index??l.value.segment.length;else for(;!l.done&&!o?.(l.value.segment)&&!l.value.isWordLike&&!_n(l.value.segment);)c+=l.value.segment.length,l=a.next();return c}var sI=32,aI=2,Oj=10,Lj=t=>t.replace(/[\r\n]+/g," ").trim(),Wj=(t,e,n)=>Math.max(e,Math.min(t,n)),Pt=class{constructor(e,n,i,r={}){this.items=[];this.filteredItems=[];this.selectedIndex=0;this.maxVisible=5;this.items=e,this.filteredItems=e,this.maxVisible=n,this.theme=i,this.layout=r}setFilter(e){this.filteredItems=this.items.filter(n=>n.value.toLowerCase().startsWith(e.toLowerCase())),this.selectedIndex=0}setSelectedIndex(e){this.selectedIndex=Math.max(0,Math.min(e,this.filteredItems.length-1))}invalidate(){}render(e){let n=[];if(this.filteredItems.length===0)return n.push(this.theme.noMatch(" No matching commands")),n;let i=this.getPrimaryColumnWidth(),r=Math.max(0,Math.min(this.selectedIndex-Math.floor(this.maxVisible/2),this.filteredItems.length-this.maxVisible)),o=Math.min(r+this.maxVisible,this.filteredItems.length);for(let s=r;s<o;s++){let a=this.filteredItems[s];if(!a)continue;let l=s===this.selectedIndex,c=a.description?Lj(a.description):void 0;n.push(this.renderItem(a,l,e,c,i))}if(r>0||o<this.filteredItems.length){let s=` (${this.selectedIndex+1}/${this.filteredItems.length})`;n.push(this.theme.scrollInfo(ee(s,e-2,"")))}return n}handleInput(e){let n=we();if(n.matches(e,"tui.select.up"))this.selectedIndex=this.selectedIndex===0?this.filteredItems.length-1:this.selectedIndex-1,this.notifySelectionChange();else if(n.matches(e,"tui.select.down"))this.selectedIndex=this.selectedIndex===this.filteredItems.length-1?0:this.selectedIndex+1,this.notifySelectionChange();else if(n.matches(e,"tui.select.confirm")){let i=this.filteredItems[this.selectedIndex];i&&this.onSelect&&this.onSelect(i)}else n.matches(e,"tui.select.cancel")&&this.onCancel&&this.onCancel()}renderItem(e,n,i,r,o){let s=n?"\u2192 ":" ",a=N(s);if(r&&i>40){let u=Math.max(1,Math.min(o,i-a-4)),p=Math.max(1,u-aI),d=this.truncatePrimary(e,n,p,u),m=N(d),g=" ".repeat(Math.max(1,u-m)),h=a+m+g.length,f=i-h-2;if(f>Oj){let b=ee(r,f,"");if(n)return this.theme.selectedText(`${s}${d}${g}${b}`);let v=this.theme.description(g+b);return s+d+v}}let l=i-a-2,c=this.truncatePrimary(e,n,l,l);return n?this.theme.selectedText(`${s}${c}`):s+c}getPrimaryColumnWidth(){let{min:e,max:n}=this.getPrimaryColumnBounds(),i=this.filteredItems.reduce((r,o)=>Math.max(r,N(this.getDisplayValue(o))+aI),0);return Wj(i,e,n)}getPrimaryColumnBounds(){let e=this.layout.minPrimaryColumnWidth??this.layout.maxPrimaryColumnWidth??sI,n=this.layout.maxPrimaryColumnWidth??this.layout.minPrimaryColumnWidth??sI;return{min:Math.max(1,Math.min(e,n)),max:Math.max(1,Math.max(e,n))}}truncatePrimary(e,n,i,r){let o=this.getDisplayValue(e),s=this.layout.truncatePrimary?this.layout.truncatePrimary({text:o,maxWidth:i,columnWidth:r,item:e,isSelected:n}):ee(o,i,"");return ee(s,i,"")}getDisplayValue(e){return e.label||e.value}notifySelectionChange(){let e=this.filteredItems[this.selectedIndex];e&&this.onSelectionChange&&this.onSelectionChange(e)}getSelectedItem(){return this.filteredItems[this.selectedIndex]||null}};var dI=gm(),Fj=tl(),mI=/\[paste #(\d+)( (\+\d+ lines|\d+ chars))?\]/g,hI=/^\[paste #(\d+)( (\+\d+ lines|\d+ chars))?\]$/;function pl(t){return t.length>=10&&hI.test(t)}function Dj(t,e,n){if(n.size===0||!t.includes("[paste #"))return e.segment(t);let i=[];for(let a of t.matchAll(mI)){let l=Number.parseInt(a[1],10);n.has(l)&&i.push({start:a.index,end:a.index+a[0].length})}if(i.length===0)return e.segment(t);let r=e.segment(t),o=[],s=0;for(let a of r){for(;s<i.length&&i[s].end<=a.index;)s++;let l=s<i.length?i[s]:null;if(l&&a.index>=l.start&&a.index<l.end){if(a.index===l.start){let c=t.slice(l.start,l.end);o.push({segment:c,index:l.start,input:t})}}else o.push(a)}return o}function qb(t,e,n){if(!t||e<=0)return[{text:"",startIndex:0,endIndex:0}];if(N(t)<=e)return[{text:t,startIndex:0,endIndex:t.length}];let r=[],o=n??[...dI.segment(t)],s=0,a=0,l=-1,c=0;for(let u=0;u<o.length;u++){let p=o[u],d=p.segment,m=N(d),g=p.index,h=!pl(d)&&_n(d);if(s+m>e&&(l>=0&&s-c+m<=e?(r.push({text:t.slice(a,l),startIndex:a,endIndex:l}),a=l,s-=c):a<g&&(r.push({text:t.slice(a,g),startIndex:a,endIndex:g}),a=g,s=0),l=-1),m>e){let b=qb(d,e);for(let y=0;y<b.length-1;y++){let R=b[y];r.push({text:R.text,startIndex:g+R.startIndex,endIndex:g+R.endIndex})}let v=b[b.length-1];a=g+v.startIndex,s=N(v.text),l=-1;continue}s+=m;let f=o[u+1];if(h&&f&&(pl(f.segment)||!_n(f.segment)))l=f.index,c=s;else if(!h&&f&&!_n(f.segment)){let b=!pl(d)&&fm.test(d),v=!pl(f.segment)&&fm.test(f.segment);(b||v)&&(l=f.index,c=s)}}return r.push({text:t.slice(a),startIndex:a,endIndex:t.length}),r}var Uj={minPrimaryColumnWidth:12,maxPrimaryColumnWidth:32},$j=20,lI=["@","#"];function gI(t){return t.replace(/[\\^$.*+?()[\]{}|-]/g,"\\$&")}function cI(t){return new RegExp(`(?:^|[\\s])[${t.map(gI).join("")}][^\\s]*$`)}function uI(t){let e=t.filter(n=>n!=="@").map(gI);return new RegExp(`(?:^|[ \\t])(?:@(?:"[^"]*|[^\\s]*)|[${e.join("")}][^\\s]*)$`)}function pI(t,e,n){let i=Math.max(0,n),r=`\u2500\u2500\u2500 ${t} ${e} more `,o=i-N(r);if(o>=0)return r+"\u2500".repeat(o);let s="...".slice(0,i),a=i-N(s);return mt(r,0,a,!0)+s}var Yo=class{constructor(e,n,i={}){this.state={lines:[""],cursorLine:0,cursorCol:0};this.focused=!1;this.paddingX=0;this.lastWidth=80;this.scrollOffset=0;this.autocompleteTriggerCharacters=[...lI];this.autocompleteTriggerPattern=cI(this.autocompleteTriggerCharacters);this.autocompleteDebouncePattern=uI(this.autocompleteTriggerCharacters);this.autocompleteState=null;this.autocompletePrefix="";this.autocompleteMaxVisible=5;this.autocompleteRequestTask=Promise.resolve();this.autocompleteStartToken=0;this.autocompleteRequestId=0;this.pastes=new Map;this.pasteCounter=0;this.pasteBuffer="";this.isInPaste=!1;this.history=[];this.historyIndex=-1;this.historyDraft=null;this.killRing=new rl;this.lastAction=null;this.jumpMode=null;this.preferredVisualCol=null;this.snappedFromCursorCol=null;this.undoStack=new ul;this.disableSubmit=!1;this.tui=e,this.theme=n,this.borderColor=n.borderColor;let r=i.paddingX??0;this.paddingX=Number.isFinite(r)?Math.max(0,Math.floor(r)):0;let o=i.autocompleteMaxVisible??5;this.autocompleteMaxVisible=Number.isFinite(o)?Math.max(3,Math.min(20,Math.floor(o))):5}validPasteIds(){return new Set(this.pastes.keys())}segment(e,n){return Dj(e,n==="word"?Fj:dI,this.validPasteIds())}getPaddingX(){return this.paddingX}setPaddingX(e){let n=Number.isFinite(e)?Math.max(0,Math.floor(e)):0;this.paddingX!==n&&(this.paddingX=n,this.tui.requestRender())}getAutocompleteMaxVisible(){return this.autocompleteMaxVisible}setAutocompleteMaxVisible(e){let n=Number.isFinite(e)?Math.max(3,Math.min(20,Math.floor(e))):5;this.autocompleteMaxVisible!==n&&(this.autocompleteMaxVisible=n,this.tui.requestRender())}setAutocompleteProvider(e){this.cancelAutocomplete(),this.autocompleteProvider=e,this.setAutocompleteTriggerCharacters(e.triggerCharacters??[])}addToHistory(e){let n=e.trim();n&&(this.history.length>0&&this.history[0]===n||(this.history.unshift(n),this.history.length>100&&this.history.pop()))}isEditorEmpty(){return this.state.lines.length===1&&this.state.lines[0]===""}isOnFirstVisualLine(){let e=this.buildVisualLineMap(this.lastWidth);return this.findCurrentVisualLine(e)===0}isOnLastVisualLine(){let e=this.buildVisualLineMap(this.lastWidth);return this.findCurrentVisualLine(e)===e.length-1}navigateHistory(e){if(this.lastAction=null,this.history.length===0)return;let n=this.historyIndex-e;if(!(n<-1||n>=this.history.length))if(this.historyIndex===-1&&n>=0&&(this.pushUndoSnapshot(),this.historyDraft=structuredClone(this.state)),this.historyIndex=n,this.historyIndex===-1){let i=this.historyDraft;this.historyDraft=null,i?(this.state=i,this.preferredVisualCol=null,this.snappedFromCursorCol=null,this.scrollOffset=0,this.onChange&&this.onChange(this.getText())):this.setTextInternal("")}else this.setTextInternal(this.history[this.historyIndex]||"",e===-1?"start":"end")}exitHistoryBrowsing(){this.historyIndex=-1,this.historyDraft=null}setTextInternal(e,n="end"){let i=e.split(`
@@ -239,7 +239,7 @@ ${t.sessionCwd}
239
239
 
240
240
  continue in current cwd
241
241
  ${t.fallbackCwd}`}var Gl=class extends Error{constructor(e){super(Az(e)),this.name="MissingSessionCwdError",this.issue=e}};var Bh=class extends Error{constructor(e){super(`File not found: ${e}`),this.name="SessionImportFileNotFoundError",this.filePath=e}};Wz(SP);import{existsSync as Cv,mkdirSync as s_,readFileSync as Fz,writeFileSync as Dz}from"node:fs";import{homedir as Uz}from"node:os";import{dirname as np,join as tp}from"node:path";import $z from"proper-lockfile";var Nz=["settings.json","extensions","skills","prompts","themes","SYSTEM.md","APPEND_SYSTEM.md"];function jh(t){return di(Ce(t))}function Bz(t,e){let n=jh(e);for(;;){let i=t[n];if(i===!0||i===!1)return{path:n,decision:i};let r=np(n);if(r===n)return null;n=r}}function jz(t){let e=jh(t),n=np(e);return n===e?void 0:n}function Rv(t,e){let n=jh(t),i=[{label:"Trust",trusted:!0,updates:[{path:n,decision:!0}],savedPath:n}],r=jz(t);return r!==void 0&&i.push({label:`Trust parent folder (${r})`,trusted:!0,updates:[{path:r,decision:!0},{path:n,decision:null}],savedPath:r}),e?.includeSessionOnly&&i.push({label:"Trust (this session only)",trusted:!0,updates:[]}),i.push({label:"Do not trust",trusted:!1,updates:[{path:n,decision:!1}],savedPath:n}),e?.includeSessionOnly&&i.push({label:"Do not trust (this session only)",trusted:!1,updates:[]}),i}function r_(t){if(!Cv(t))return{};let e;try{e=JSON.parse(Fz(t,"utf-8"))}catch(i){let r=i instanceof Error?i.message:String(i);throw new Error(`Failed to read trust store ${t}: ${r}`)}if(typeof e!="object"||e===null||Array.isArray(e))throw new Error(`Invalid trust store ${t}: expected an object`);let n={};for(let[i,r]of Object.entries(e)){if(r!==!0&&r!==!1&&r!==null)throw new Error(`Invalid trust store ${t}: value for ${JSON.stringify(i)} must be true, false, or null`);n[i]=r}return n}function qz(t,e){let n={};for(let i of Object.keys(e).sort()){let r=e[i];(r===!0||r===!1||r===null)&&(n[i]=r)}s_(np(t),{recursive:!0}),Dz(t,`${JSON.stringify(n,null,2)}
242
- `,"utf-8")}function Gz(t){let e=np(t);s_(e,{recursive:!0});let n=10,i=20,r;for(let o=1;o<=n;o++)try{return $z.lockSync(e,{realpath:!1,lockfilePath:`${t}.lock`})}catch(s){if((typeof s=="object"&&s!==null&&"code"in s?String(s.code):void 0)!=="ELOCKED"||o===n)throw s;r=s;let l=Date.now();for(;Date.now()-l<i;);}throw r instanceof Error?r:new Error("Failed to acquire trust store lock")}function o_(t,e){let n=Gz(t);try{return e()}finally{n()}}function Ts(t){let e=di(Ce(process.env.HOME||Uz())),n=tp(e,".agents","skills"),i=di(Ce(t)),r=tp(i,rt);if(Nz.some(o=>Cv(tp(r,o))))return!0;for(;;){let o=tp(i,".agents","skills");if(o!==n&&Cv(o))return!0;let s=np(i);if(s===i)return!1;i=s}}var co=class{constructor(e){this.trustPath=tp(Ce(e),"trust.json")}get(e){return this.getEntry(e)?.decision??null}getEntry(e){return o_(this.trustPath,()=>{let n=r_(this.trustPath);return Bz(n,e)})}set(e,n){this.setMany([{path:e,decision:n}])}setMany(e){o_(this.trustPath,()=>{let n=r_(this.trustPath);for(let{path:i,decision:r}of e){let o=jh(i);r===null?delete n[o]:n[o]=r}qz(this.trustPath,n)})}};import Dqe from"chalk";var H3e=30*6e4;import J3e from"chalk";import r$e from"chalk";import V$e from"chalk";function Pv(){return process.env.PI_EXPERIMENTAL==="1"}import{existsSync as Hz,readFileSync as zz}from"fs";import{join as Vz}from"path";var c_={...il,"app.interrupt":{defaultKeys:"escape",description:"Cancel or abort"},"app.clear":{defaultKeys:"ctrl+c",description:"Clear editor"},"app.exit":{defaultKeys:"ctrl+d",description:"Exit when editor is empty"},"app.suspend":{defaultKeys:process.platform==="win32"?[]:"ctrl+z",description:"Suspend to background"},"app.thinking.cycle":{defaultKeys:"shift+tab",description:"Cycle thinking level"},"app.model.cycleForward":{defaultKeys:"ctrl+p",description:"Cycle to next model"},"app.model.cycleBackward":{defaultKeys:"shift+ctrl+p",description:"Cycle to previous model"},"app.model.select":{defaultKeys:"ctrl+l",description:"Open model selector"},"app.tools.expand":{defaultKeys:"ctrl+o",description:"Toggle tool output"},"app.thinking.toggle":{defaultKeys:"ctrl+t",description:"Toggle thinking blocks"},"app.session.toggleNamedFilter":{defaultKeys:"ctrl+n",description:"Toggle named session filter"},"app.editor.external":{defaultKeys:"ctrl+g",description:"Open external editor"},"app.message.copy":{defaultKeys:"ctrl+x",description:"Copy message to clipboard"},"app.message.followUp":{defaultKeys:"alt+enter",description:"Queue follow-up message"},"app.message.dequeue":{defaultKeys:"alt+up",description:"Restore queued messages"},"app.clipboard.pasteImage":{defaultKeys:process.platform==="win32"?"alt+v":"ctrl+v",description:"Paste image from clipboard (text fallback)"},"app.session.new":{defaultKeys:[],description:"Start a new session"},"app.session.tree":{defaultKeys:[],description:"Open session tree"},"app.session.fork":{defaultKeys:[],description:"Fork current session"},"app.session.resume":{defaultKeys:[],description:"Resume a session"},"app.tree.foldOrUp":{defaultKeys:process.platform==="darwin"?["alt+left","ctrl+left"]:["ctrl+left","alt+left"],description:"Fold tree branch or move up"},"app.tree.unfoldOrDown":{defaultKeys:process.platform==="darwin"?["alt+right","ctrl+right"]:["ctrl+right","alt+right"],description:"Unfold tree branch or move down"},"app.tree.editLabel":{defaultKeys:"shift+l",description:"Edit tree label"},"app.tree.toggleLabelTimestamp":{defaultKeys:"shift+t",description:"Toggle tree label timestamps"},"app.session.togglePath":{defaultKeys:"ctrl+p",description:"Toggle session path display"},"app.session.toggleSort":{defaultKeys:"ctrl+s",description:"Toggle session sort mode"},"app.session.rename":{defaultKeys:"ctrl+r",description:"Rename session"},"app.session.delete":{defaultKeys:"ctrl+d",description:"Delete session"},"app.session.deleteNoninvasive":{defaultKeys:"ctrl+backspace",description:"Delete session when query is empty"},"app.models.save":{defaultKeys:"ctrl+s",description:"Save model selection"},"app.models.enableAll":{defaultKeys:"ctrl+a",description:"Enable all models"},"app.models.clearAll":{defaultKeys:"ctrl+x",description:"Clear all models"},"app.models.toggleProvider":{defaultKeys:"ctrl+p",description:"Toggle all models for provider"},"app.models.reorderUp":{defaultKeys:"alt+up",description:"Move model up in order"},"app.models.reorderDown":{defaultKeys:"alt+down",description:"Move model down in order"},"app.tree.filter.default":{defaultKeys:"ctrl+d",description:"Tree filter: default view"},"app.tree.filter.noTools":{defaultKeys:"ctrl+t",description:"Tree filter: hide tool results"},"app.tree.filter.userOnly":{defaultKeys:"ctrl+u",description:"Tree filter: user messages only"},"app.tree.filter.labeledOnly":{defaultKeys:"ctrl+l",description:"Tree filter: labeled entries only"},"app.tree.filter.all":{defaultKeys:"ctrl+a",description:"Tree filter: show all entries"},"app.tree.filter.cycleForward":{defaultKeys:"ctrl+o",description:"Tree filter: cycle forward"},"app.tree.filter.cycleBackward":{defaultKeys:"shift+ctrl+o",description:"Tree filter: cycle backward"}},u_={cursorUp:"tui.editor.cursorUp",cursorDown:"tui.editor.cursorDown",cursorLeft:"tui.editor.cursorLeft",cursorRight:"tui.editor.cursorRight",cursorWordLeft:"tui.editor.cursorWordLeft",cursorWordRight:"tui.editor.cursorWordRight",cursorLineStart:"tui.editor.cursorLineStart",cursorLineEnd:"tui.editor.cursorLineEnd",jumpForward:"tui.editor.jumpForward",jumpBackward:"tui.editor.jumpBackward",pageUp:"tui.editor.pageUp",pageDown:"tui.editor.pageDown",deleteCharBackward:"tui.editor.deleteCharBackward",deleteCharForward:"tui.editor.deleteCharForward",deleteWordBackward:"tui.editor.deleteWordBackward",deleteWordForward:"tui.editor.deleteWordForward",deleteToLineStart:"tui.editor.deleteToLineStart",deleteToLineEnd:"tui.editor.deleteToLineEnd",yank:"tui.editor.yank",yankPop:"tui.editor.yankPop",undo:"tui.editor.undo",newLine:"tui.input.newLine",submit:"tui.input.submit",tab:"tui.input.tab",copy:"tui.input.copy",selectUp:"tui.select.up",selectDown:"tui.select.down",selectPageUp:"tui.select.pageUp",selectPageDown:"tui.select.pageDown",selectConfirm:"tui.select.confirm",selectCancel:"tui.select.cancel",interrupt:"app.interrupt",clear:"app.clear",exit:"app.exit",suspend:"app.suspend",cycleThinkingLevel:"app.thinking.cycle",cycleModelForward:"app.model.cycleForward",cycleModelBackward:"app.model.cycleBackward",selectModel:"app.model.select",expandTools:"app.tools.expand",toggleThinking:"app.thinking.toggle",toggleSessionNamedFilter:"app.session.toggleNamedFilter",externalEditor:"app.editor.external",followUp:"app.message.followUp",dequeue:"app.message.dequeue",pasteImage:"app.clipboard.pasteImage",newSession:"app.session.new",tree:"app.session.tree",fork:"app.session.fork",resume:"app.session.resume",treeFoldOrUp:"app.tree.foldOrUp",treeUnfoldOrDown:"app.tree.unfoldOrDown",treeEditLabel:"app.tree.editLabel",treeToggleLabelTimestamp:"app.tree.toggleLabelTimestamp",toggleSessionPath:"app.session.togglePath",toggleSessionSort:"app.session.toggleSort",renameSession:"app.session.rename",deleteSession:"app.session.delete",deleteSessionNoninvasive:"app.session.deleteNoninvasive"};function Qz(t){return t in u_}function Jz(t){let e={};for(let[n,i]of Object.entries(t)){if(typeof i=="string"){e[n]=i;continue}Array.isArray(i)&&i.every(r=>typeof r=="string")&&(e[n]=i)}return e}function p_(t){let e={},n=!1;for(let[i,r]of Object.entries(t)){let o=Qz(i)?u_[i]:i;if(o!==i&&(n=!0),i!==o&&Object.hasOwn(t,o)){n=!0;continue}e[o]=r}return{config:Yz(e),migrated:n}}function Yz(t){let e={};for(let i of Object.keys(c_))Object.hasOwn(t,i)&&(e[i]=t[i]);let n=Object.keys(t).filter(i=>!Object.hasOwn(e,i)).sort();for(let i of n)e[i]=t[i];return e}function Xz(t){if(Hz(t))try{let e=JSON.parse(zz(t,"utf-8"));return typeof e!="object"||e===null?void 0:e}catch{return}}var uo=class t extends nl{constructor(e={},n){super(c_,e),this.configPath=n}static create(e=Ee()){let n=Vz(e,"keybindings.json"),i=t.loadFromFile(n);return new t(i,n)}reload(){this.configPath&&this.setUserBindings(t.loadFromFile(this.configPath))}getEffectiveConfig(){return this.getResolvedBindings()}static loadFromFile(e){let n=Xz(e);return n?Jz(p_(n).config):{}}};var po=class{constructor(e,n,i,r){this.tui=n,this.onTick=i,this.onExpire=r,this.remainingSeconds=Math.ceil(e/1e3),this.onTick(this.remainingSeconds),this.intervalId=setInterval(()=>{this.remainingSeconds--,this.onTick(this.remainingSeconds),this.tui?.requestRender(),this.remainingSeconds<=0&&(this.dispose(),this.onExpire())},1e3)}dispose(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=void 0)}};var V=class{constructor(e=n=>x.fg("border",n)){this.color=e}invalidate(){}render(e){return[this.color("\u2500".repeat(Math.max(1,e)))]}};var ks=class extends K{constructor(n,i,r,o,s){super();this._focused=!1;this.onSubmitCallback=r,this.onCancelCallback=o,this.baseTitle=n,this.addChild(new V),this.addChild(new W(1)),this.titleText=new E(x.fg("accent",n),1,0),this.addChild(this.titleText),this.addChild(new W(1)),s?.timeout&&s.timeout>0&&s.tui&&(this.countdown=new po(s.timeout,s.tui,a=>this.titleText.setText(x.fg("accent",`${this.baseTitle} (${a}s)`)),()=>this.onCancelCallback())),this.input=new ze,this.addChild(this.input),this.addChild(new W(1)),this.addChild(new E(`${ce("tui.select.confirm","submit")} ${ce("tui.select.cancel","cancel")}`,1,0)),this.addChild(new W(1)),this.addChild(new V)}get focused(){return this._focused}set focused(n){this._focused=n,this.input.focused=n}handleInput(n){let i=we();i.matches(n,"tui.select.confirm")||n===`
242
+ `,"utf-8")}function Gz(t){let e=np(t);s_(e,{recursive:!0});let n=10,i=20,r;for(let o=1;o<=n;o++)try{return $z.lockSync(e,{realpath:!1,lockfilePath:`${t}.lock`})}catch(s){if((typeof s=="object"&&s!==null&&"code"in s?String(s.code):void 0)!=="ELOCKED"||o===n)throw s;r=s;let l=Date.now();for(;Date.now()-l<i;);}throw r instanceof Error?r:new Error("Failed to acquire trust store lock")}function o_(t,e){let n=Gz(t);try{return e()}finally{n()}}function Ts(t){let e=di(Ce(process.env.HOME||Uz())),n=tp(e,".agents","skills"),i=di(Ce(t)),r=tp(i,rt);if(Nz.some(o=>Cv(tp(r,o))))return!0;for(;;){let o=tp(i,".agents","skills");if(o!==n&&Cv(o))return!0;let s=np(i);if(s===i)return!1;i=s}}var co=class{constructor(e){this.trustPath=tp(Ce(e),"trust.json")}get(e){return this.getEntry(e)?.decision??null}getEntry(e){return o_(this.trustPath,()=>{let n=r_(this.trustPath);return Bz(n,e)})}set(e,n){this.setMany([{path:e,decision:n}])}setMany(e){o_(this.trustPath,()=>{let n=r_(this.trustPath);for(let{path:i,decision:r}of e){let o=jh(i);r===null?delete n[o]:n[o]=r}qz(this.trustPath,n)})}};import Fqe from"chalk";var H3e=30*6e4;import J3e from"chalk";import r$e from"chalk";import V$e from"chalk";function Pv(){return process.env.PI_EXPERIMENTAL==="1"}import{existsSync as Hz,readFileSync as zz}from"fs";import{join as Vz}from"path";var c_={...il,"app.interrupt":{defaultKeys:"escape",description:"Cancel or abort"},"app.clear":{defaultKeys:"ctrl+c",description:"Clear editor"},"app.exit":{defaultKeys:"ctrl+d",description:"Exit when editor is empty"},"app.suspend":{defaultKeys:process.platform==="win32"?[]:"ctrl+z",description:"Suspend to background"},"app.thinking.cycle":{defaultKeys:"shift+tab",description:"Cycle thinking level"},"app.model.cycleForward":{defaultKeys:"ctrl+p",description:"Cycle to next model"},"app.model.cycleBackward":{defaultKeys:"shift+ctrl+p",description:"Cycle to previous model"},"app.model.select":{defaultKeys:"ctrl+l",description:"Open model selector"},"app.tools.expand":{defaultKeys:"ctrl+o",description:"Toggle tool output"},"app.thinking.toggle":{defaultKeys:"ctrl+t",description:"Toggle thinking blocks"},"app.session.toggleNamedFilter":{defaultKeys:"ctrl+n",description:"Toggle named session filter"},"app.editor.external":{defaultKeys:"ctrl+g",description:"Open external editor"},"app.message.copy":{defaultKeys:"ctrl+x",description:"Copy message to clipboard"},"app.message.followUp":{defaultKeys:"alt+enter",description:"Queue follow-up message"},"app.message.dequeue":{defaultKeys:"alt+up",description:"Restore queued messages"},"app.clipboard.pasteImage":{defaultKeys:process.platform==="win32"?"alt+v":"ctrl+v",description:"Paste image from clipboard (text fallback)"},"app.session.new":{defaultKeys:[],description:"Start a new session"},"app.session.tree":{defaultKeys:[],description:"Open session tree"},"app.session.fork":{defaultKeys:[],description:"Fork current session"},"app.session.resume":{defaultKeys:[],description:"Resume a session"},"app.tree.foldOrUp":{defaultKeys:process.platform==="darwin"?["alt+left","ctrl+left"]:["ctrl+left","alt+left"],description:"Fold tree branch or move up"},"app.tree.unfoldOrDown":{defaultKeys:process.platform==="darwin"?["alt+right","ctrl+right"]:["ctrl+right","alt+right"],description:"Unfold tree branch or move down"},"app.tree.editLabel":{defaultKeys:"shift+l",description:"Edit tree label"},"app.tree.toggleLabelTimestamp":{defaultKeys:"shift+t",description:"Toggle tree label timestamps"},"app.session.togglePath":{defaultKeys:"ctrl+p",description:"Toggle session path display"},"app.session.toggleSort":{defaultKeys:"ctrl+s",description:"Toggle session sort mode"},"app.session.rename":{defaultKeys:"ctrl+r",description:"Rename session"},"app.session.delete":{defaultKeys:"ctrl+d",description:"Delete session"},"app.session.deleteNoninvasive":{defaultKeys:"ctrl+backspace",description:"Delete session when query is empty"},"app.models.save":{defaultKeys:"ctrl+s",description:"Save model selection"},"app.models.enableAll":{defaultKeys:"ctrl+a",description:"Enable all models"},"app.models.clearAll":{defaultKeys:"ctrl+x",description:"Clear all models"},"app.models.toggleProvider":{defaultKeys:"ctrl+p",description:"Toggle all models for provider"},"app.models.reorderUp":{defaultKeys:"alt+up",description:"Move model up in order"},"app.models.reorderDown":{defaultKeys:"alt+down",description:"Move model down in order"},"app.tree.filter.default":{defaultKeys:"ctrl+d",description:"Tree filter: default view"},"app.tree.filter.noTools":{defaultKeys:"ctrl+t",description:"Tree filter: hide tool results"},"app.tree.filter.userOnly":{defaultKeys:"ctrl+u",description:"Tree filter: user messages only"},"app.tree.filter.labeledOnly":{defaultKeys:"ctrl+l",description:"Tree filter: labeled entries only"},"app.tree.filter.all":{defaultKeys:"ctrl+a",description:"Tree filter: show all entries"},"app.tree.filter.cycleForward":{defaultKeys:"ctrl+o",description:"Tree filter: cycle forward"},"app.tree.filter.cycleBackward":{defaultKeys:"shift+ctrl+o",description:"Tree filter: cycle backward"}},u_={cursorUp:"tui.editor.cursorUp",cursorDown:"tui.editor.cursorDown",cursorLeft:"tui.editor.cursorLeft",cursorRight:"tui.editor.cursorRight",cursorWordLeft:"tui.editor.cursorWordLeft",cursorWordRight:"tui.editor.cursorWordRight",cursorLineStart:"tui.editor.cursorLineStart",cursorLineEnd:"tui.editor.cursorLineEnd",jumpForward:"tui.editor.jumpForward",jumpBackward:"tui.editor.jumpBackward",pageUp:"tui.editor.pageUp",pageDown:"tui.editor.pageDown",deleteCharBackward:"tui.editor.deleteCharBackward",deleteCharForward:"tui.editor.deleteCharForward",deleteWordBackward:"tui.editor.deleteWordBackward",deleteWordForward:"tui.editor.deleteWordForward",deleteToLineStart:"tui.editor.deleteToLineStart",deleteToLineEnd:"tui.editor.deleteToLineEnd",yank:"tui.editor.yank",yankPop:"tui.editor.yankPop",undo:"tui.editor.undo",newLine:"tui.input.newLine",submit:"tui.input.submit",tab:"tui.input.tab",copy:"tui.input.copy",selectUp:"tui.select.up",selectDown:"tui.select.down",selectPageUp:"tui.select.pageUp",selectPageDown:"tui.select.pageDown",selectConfirm:"tui.select.confirm",selectCancel:"tui.select.cancel",interrupt:"app.interrupt",clear:"app.clear",exit:"app.exit",suspend:"app.suspend",cycleThinkingLevel:"app.thinking.cycle",cycleModelForward:"app.model.cycleForward",cycleModelBackward:"app.model.cycleBackward",selectModel:"app.model.select",expandTools:"app.tools.expand",toggleThinking:"app.thinking.toggle",toggleSessionNamedFilter:"app.session.toggleNamedFilter",externalEditor:"app.editor.external",followUp:"app.message.followUp",dequeue:"app.message.dequeue",pasteImage:"app.clipboard.pasteImage",newSession:"app.session.new",tree:"app.session.tree",fork:"app.session.fork",resume:"app.session.resume",treeFoldOrUp:"app.tree.foldOrUp",treeUnfoldOrDown:"app.tree.unfoldOrDown",treeEditLabel:"app.tree.editLabel",treeToggleLabelTimestamp:"app.tree.toggleLabelTimestamp",toggleSessionPath:"app.session.togglePath",toggleSessionSort:"app.session.toggleSort",renameSession:"app.session.rename",deleteSession:"app.session.delete",deleteSessionNoninvasive:"app.session.deleteNoninvasive"};function Qz(t){return t in u_}function Jz(t){let e={};for(let[n,i]of Object.entries(t)){if(typeof i=="string"){e[n]=i;continue}Array.isArray(i)&&i.every(r=>typeof r=="string")&&(e[n]=i)}return e}function p_(t){let e={},n=!1;for(let[i,r]of Object.entries(t)){let o=Qz(i)?u_[i]:i;if(o!==i&&(n=!0),i!==o&&Object.hasOwn(t,o)){n=!0;continue}e[o]=r}return{config:Yz(e),migrated:n}}function Yz(t){let e={};for(let i of Object.keys(c_))Object.hasOwn(t,i)&&(e[i]=t[i]);let n=Object.keys(t).filter(i=>!Object.hasOwn(e,i)).sort();for(let i of n)e[i]=t[i];return e}function Xz(t){if(Hz(t))try{let e=JSON.parse(zz(t,"utf-8"));return typeof e!="object"||e===null?void 0:e}catch{return}}var uo=class t extends nl{constructor(e={},n){super(c_,e),this.configPath=n}static create(e=Ee()){let n=Vz(e,"keybindings.json"),i=t.loadFromFile(n);return new t(i,n)}reload(){this.configPath&&this.setUserBindings(t.loadFromFile(this.configPath))}getEffectiveConfig(){return this.getResolvedBindings()}static loadFromFile(e){let n=Xz(e);return n?Jz(p_(n).config):{}}};var po=class{constructor(e,n,i,r){this.tui=n,this.onTick=i,this.onExpire=r,this.remainingSeconds=Math.ceil(e/1e3),this.onTick(this.remainingSeconds),this.intervalId=setInterval(()=>{this.remainingSeconds--,this.onTick(this.remainingSeconds),this.tui?.requestRender(),this.remainingSeconds<=0&&(this.dispose(),this.onExpire())},1e3)}dispose(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=void 0)}};var V=class{constructor(e=n=>x.fg("border",n)){this.color=e}invalidate(){}render(e){return[this.color("\u2500".repeat(Math.max(1,e)))]}};var ks=class extends K{constructor(n,i,r,o,s){super();this._focused=!1;this.onSubmitCallback=r,this.onCancelCallback=o,this.baseTitle=n,this.addChild(new V),this.addChild(new W(1)),this.titleText=new E(x.fg("accent",n),1,0),this.addChild(this.titleText),this.addChild(new W(1)),s?.timeout&&s.timeout>0&&s.tui&&(this.countdown=new po(s.timeout,s.tui,a=>this.titleText.setText(x.fg("accent",`${this.baseTitle} (${a}s)`)),()=>this.onCancelCallback())),this.input=new ze,this.addChild(this.input),this.addChild(new W(1)),this.addChild(new E(`${ce("tui.select.confirm","submit")} ${ce("tui.select.cancel","cancel")}`,1,0)),this.addChild(new W(1)),this.addChild(new V)}get focused(){return this._focused}set focused(n){this._focused=n,this.input.focused=n}handleInput(n){let i=we();i.matches(n,"tui.select.confirm")||n===`
243
243
  `?this.onSubmitCallback(this.input.getValue()):i.matches(n,"tui.select.cancel")?this.onCancelCallback():this.input.handleInput(n)}dispose(){this.countdown?.dispose()}};var yr=class extends K{constructor(n,i,r,o,s){super();this.selectedIndex=0;this.options=i,this.onSelectCallback=r,this.onCancelCallback=o,this.onToggleToolsExpanded=s?.onToggleToolsExpanded,this.baseTitle=n,this.addChild(new V),this.addChild(new W(1)),this.titleText=new E(x.fg("accent",x.bold(n)),1,0),this.addChild(this.titleText),this.addChild(new W(1)),s?.timeout&&s.timeout>0&&s.tui&&(this.countdown=new po(s.timeout,s.tui,a=>this.titleText.setText(x.fg("accent",x.bold(`${this.baseTitle} (${a}s)`))),()=>this.onCancelCallback())),this.listContainer=new K,this.addChild(this.listContainer),this.addChild(new W(1)),this.addChild(new E(ht("\u2191\u2193","navigate")+" "+ce("tui.select.confirm","select")+" "+ce("tui.select.cancel","cancel"),1,0)),this.addChild(new W(1)),this.addChild(new V),this.updateList()}updateList(){this.listContainer.clear();for(let n=0;n<this.options.length;n++){let r=n===this.selectedIndex?x.fg("accent","\u2192 ")+x.fg("accent",this.options[n]):` ${x.fg("text",this.options[n])}`;this.listContainer.addChild(new E(r,1,0))}}handleInput(n){let i=we();if(i.matches(n,"app.tools.expand"))this.onToggleToolsExpanded?.();else if(i.matches(n,"tui.select.up")||n==="k")this.selectedIndex=Math.max(0,this.selectedIndex-1),this.updateList();else if(i.matches(n,"tui.select.down")||n==="j")this.selectedIndex=Math.min(this.options.length-1,this.selectedIndex+1),this.updateList();else if(i.matches(n,"tui.select.confirm")||n===`
244
244
  `){let r=this.options[this.selectedIndex];r&&this.onSelectCallback(r)}else i.matches(n,"tui.select.cancel")&&this.onCancelCallback()}dispose(){this.countdown?.dispose()}};import{spawnSync as rV}from"node:child_process";import{existsSync as oV}from"node:fs";import{unlink as sV}from"node:fs/promises";import*as f_ from"node:os";function d_(t){return t.toLowerCase().replace(/\s+/g," ").trim()}function tV(t){return`${t.id} ${t.name??""} ${t.allMessagesText} ${t.cwd}`}function Iv(t){return!!t.name?.trim()}function nV(t,e){return e==="all"?!0:Iv(t)}function iV(t){let e=t.trim();if(!e)return{mode:"tokens",tokens:[],regex:null};if(e.startsWith("re:")){let a=e.slice(3).trim();if(!a)return{mode:"regex",tokens:[],regex:null,error:"Empty regex"};try{return{mode:"regex",tokens:[],regex:new RegExp(a,"i")}}catch(l){let c=l instanceof Error?l.message:String(l);return{mode:"regex",tokens:[],regex:null,error:c}}}let n=[],i="",r=!1,o=!1,s=a=>{let l=i.trim();i="",l&&n.push({kind:a,value:l})};for(let a=0;a<e.length;a++){let l=e[a];if(l==='"'){r?(s("phrase"),r=!1):(s("fuzzy"),r=!0);continue}if(!r&&/\s/.test(l)){s("fuzzy");continue}i+=l}return r&&(o=!0),o?{mode:"tokens",tokens:e.split(/\s+/).map(a=>a.trim()).filter(a=>a.length>0).map(a=>({kind:"fuzzy",value:a})),regex:null}:(s(r?"phrase":"fuzzy"),{mode:"tokens",tokens:n,regex:null})}function m_(t,e){let n=tV(t);if(e.mode==="regex"){if(!e.regex)return{matches:!1,score:0};let o=n.search(e.regex);return o<0?{matches:!1,score:0}:{matches:!0,score:o*.1}}if(e.tokens.length===0)return{matches:!0,score:0};let i=0,r=null;for(let o of e.tokens){if(o.kind==="phrase"){r===null&&(r=d_(n));let a=d_(o.value);if(!a)continue;let l=r.indexOf(a);if(l<0)return{matches:!1,score:0};i+=l*.1;continue}let s=mm(o.value,n);if(!s.matches)return{matches:!1,score:0};i+=s.score}return{matches:!0,score:i}}function h_(t,e,n,i="all"){let r=i==="all"?t:t.filter(l=>nV(l,i));if(!e.trim())return r;let s=iV(e);if(s.error)return[];if(n==="recent"){let l=[];for(let c of r)m_(c,s).matches&&l.push(c);return l}let a=[];for(let l of r){let c=m_(l,s);c.matches&&a.push({session:l,score:c.score})}return a.sort((l,c)=>l.score!==c.score?l.score-c.score:c.session.modified.getTime()-l.session.modified.getTime()),a.map(l=>l.session)}function g_(t){let e=f_.homedir();return t&&(t.startsWith(e)?`~${t.slice(e.length)}`:t)}function aV(t){let n=new Date().getTime()-t.getTime(),i=Math.floor(n/6e4),r=Math.floor(n/36e5),o=Math.floor(n/864e5);return i<1?"now":i<60?`${i}m`:r<24?`${r}h`:o<7?`${o}d`:o<30?`${Math.floor(o/7)}w`:o<365?`${Math.floor(o/30)}mo`:`${Math.floor(o/365)}y`}function ip(t){return t&&di(t)}var Av=class{constructor(e,n,i,r){this.loading=!1;this.loadProgress=null;this.showPath=!1;this.confirmingDeletePath=null;this.statusMessage=null;this.statusTimeout=null;this.showRenameHint=!1;this.scope=e,this.sortMode=n,this.nameFilter=i,this.requestRender=r}setScope(e){this.scope=e}setSortMode(e){this.sortMode=e}setNameFilter(e){this.nameFilter=e}setLoading(e){this.loading=e,this.loadProgress=null}setProgress(e,n){this.loadProgress={loaded:e,total:n}}setShowPath(e){this.showPath=e}setShowRenameHint(e){this.showRenameHint=e}setConfirmingDeletePath(e){this.confirmingDeletePath=e}clearStatusTimeout(){this.statusTimeout&&(clearTimeout(this.statusTimeout),this.statusTimeout=null)}setStatusMessage(e,n){this.clearStatusTimeout(),this.statusMessage=e,!(!e||!n)&&(this.statusTimeout=setTimeout(()=>{this.statusMessage=null,this.statusTimeout=null,this.requestRender()},n))}invalidate(){}render(e){let n=this.scope==="current"?"Resume Session (Current Folder)":"Resume Session (All)",i=x.bold(n),r=this.sortMode==="threaded"?"Threaded":this.sortMode==="recent"?"Recent":"Fuzzy",o=x.fg("muted","Sort: ")+x.fg("accent",r),s=this.nameFilter==="all"?"All":"Named",a=x.fg("muted","Name: ")+x.fg("accent",s),l;if(this.loading){let h=this.loadProgress?`${this.loadProgress.loaded}/${this.loadProgress.total}`:"...";l=`${x.fg("muted","\u25CB Current Folder | ")}${x.fg("accent",`Loading ${h}`)}`}else this.scope==="current"?l=`${x.fg("accent","\u25C9 Current Folder")}${x.fg("muted"," | \u25CB All")}`:l=`${x.fg("muted","\u25CB Current Folder | ")}${x.fg("accent","\u25C9 All")}`;let c=ee(`${l} ${a} ${o}`,e,""),u=Math.max(0,e-N(c)-1),p=ee(i,u,""),d=Math.max(0,e-N(p)-N(c)),m,g;if(this.confirmingDeletePath!==null){let h=`Delete session? ${ce("tui.select.confirm","confirm")} \xB7 ${ce("tui.select.cancel","cancel")}`;m=x.fg("error",ee(h,e,"\u2026")),g=""}else if(this.statusMessage){let h=this.statusMessage.type==="error"?"error":"accent";m=x.fg(h,ee(this.statusMessage.message,e,"\u2026")),g=""}else{let h=this.showPath?"(on)":"(off)",f=x.fg("muted"," \xB7 "),b=ce("tui.input.tab","scope")+f+x.fg("muted",'re:<pattern> regex \xB7 "phrase" exact'),v=[ce("app.session.toggleSort","sort"),ce("app.session.toggleNamedFilter","named"),ce("app.session.delete","delete"),ce("app.session.togglePath",`path ${h}`)];this.showRenameHint&&v.push(ce("app.session.rename","rename"));let y=v.join(f);m=ee(b,e,"\u2026"),g=ee(y,e,"\u2026")}return[`${p}${" ".repeat(d)}${c}`,m,g]}};function lV(t){let e=new Map;for(let o of t){let s=ip(o.path)??o.path;e.set(s,{session:o,children:[],latestActivity:o.modified.getTime()})}let n=[];for(let o of t){let s=ip(o.path)??o.path,a=e.get(s),l=ip(o.parentSessionPath);l&&e.has(l)?e.get(l).children.push(a):n.push(a)}let i=o=>{let s=o.session.modified.getTime();for(let a of o.children)s=Math.max(s,i(a));return o.latestActivity=s,s};for(let o of n)i(o);let r=o=>{o.sort((s,a)=>a.latestActivity-s.latestActivity);for(let s of o)r(s.children)};return r(n),n}function cV(t){let e=[],n=(i,r,o,s)=>{e.push({session:i.session,depth:r,isLast:s,ancestorContinues:o});for(let a=0;a<i.children.length;a++){let l=a===i.children.length-1,c=r>0?!s:!1;n(i.children[a],r+1,[...o,c],l)}};for(let i=0;i<t.length;i++)n(t[i],0,[],i===t.length-1);return e}var Ev=class{constructor(e,n,i,r,o,s){this.allSessions=[];this.filteredSessions=[];this.selectedIndex=0;this.showCwd=!1;this.sortMode="threaded";this.nameFilter="all";this.showPath=!1;this.confirmingDeletePath=null;this.onExit=()=>{};this.maxVisible=10;this._focused=!1;this.allSessions=e,this.filteredSessions=[],this.searchInput=new ze,this.showCwd=n,this.sortMode=i,this.nameFilter=r,this.keybindings=o,this.currentSessionCanonicalPath=ip(s),this.filterSessions(""),this.searchInput.onSubmit=()=>{if(this.filteredSessions[this.selectedIndex]){let a=this.filteredSessions[this.selectedIndex];this.onSelect&&this.onSelect(a.session.path)}}}getSelectedSessionPath(){return this.filteredSessions[this.selectedIndex]?.session.path}get focused(){return this._focused}set focused(e){this._focused=e,this.searchInput.focused=e}setSortMode(e){this.sortMode=e,this.filterSessions(this.searchInput.getValue())}setNameFilter(e){this.nameFilter=e,this.filterSessions(this.searchInput.getValue())}setSessions(e,n){this.allSessions=e,this.showCwd=n,this.filterSessions(this.searchInput.getValue())}filterSessions(e){let n=e.trim(),i=this.nameFilter==="all"?this.allSessions:this.allSessions.filter(r=>Iv(r));if(this.sortMode==="threaded"&&!n){let r=lV(i);this.filteredSessions=cV(r)}else{let r=h_(i,e,this.sortMode,"all");this.filteredSessions=r.map(o=>({session:o,depth:0,isLast:!0,ancestorContinues:[]}))}this.selectedIndex=Math.min(this.selectedIndex,Math.max(0,this.filteredSessions.length-1))}setConfirmingDeletePath(e){this.confirmingDeletePath=e,this.onDeleteConfirmationChange?.(e)}startDeleteConfirmationForSelectedSession(){let e=this.filteredSessions[this.selectedIndex];if(e){if(this.isCurrentSessionPath(e.session.path)){this.onError?.("Cannot delete the currently active session");return}this.setConfirmingDeletePath(e.session.path)}}isCurrentSessionPath(e){return this.currentSessionCanonicalPath?(ip(e)??e)===this.currentSessionCanonicalPath:!1}invalidate(){}render(e){let n=[];if(n.push(...this.searchInput.render(e)),n.push(""),this.filteredSessions.length===0){let o;if(this.nameFilter==="named"){let s=_e("app.session.toggleNamedFilter");this.showCwd?o=` No named sessions found. Press ${s} to show all.`:o=` No named sessions in current folder. Press ${s} to show all, or Tab to view all.`}else this.showCwd?o=" No sessions found":o=" No sessions in current folder. Press Tab to view all.";return n.push(x.fg("muted",ee(o,e,"\u2026"))),n}let i=Math.max(0,Math.min(this.selectedIndex-Math.floor(this.maxVisible/2),this.filteredSessions.length-this.maxVisible)),r=Math.min(i+this.maxVisible,this.filteredSessions.length);for(let o=i;o<r;o++){let s=this.filteredSessions[o],a=s.session,l=o===this.selectedIndex,c=a.path===this.confirmingDeletePath,u=this.isCurrentSessionPath(a.path),p=this.buildTreePrefix(s),d=!!a.name,g=(a.name??a.firstMessage).replace(/[\x00-\x1f\x7f]/g," ").trim(),h=aV(a.modified),b=`${String(a.messageCount)} ${h}`;this.showCwd&&a.cwd&&(b=`${g_(a.cwd)} ${b}`),this.showPath&&(b=`${g_(a.path)} ${b}`);let v=l?x.fg("accent","\u203A "):" ",y=N(p),R=N(b)+2,T=e-2-y-R,k=ee(g,Math.max(10,T),"\u2026"),I=null;c?I="error":u?I="accent":d&&(I="warning");let $=I?x.fg(I,k):k;l&&($=x.bold($));let O=v+x.fg("dim",p)+$,A=N(O),_=Math.max(1,e-A-N(b)),L=x.fg(c?"error":"dim",b),D=O+" ".repeat(_)+L;l&&(D=x.bg("selectedBg",D)),n.push(ee(D,e))}if(i>0||r<this.filteredSessions.length){let o=` (${this.selectedIndex+1}/${this.filteredSessions.length})`,s=x.fg("muted",ee(o,e,""));n.push(s)}return n}buildTreePrefix(e){if(e.depth===0)return"";let n=e.ancestorContinues.map(r=>r?"\u2502 ":" "),i=e.isLast?"\u2514\u2500 ":"\u251C\u2500 ";return n.join("")+i}handleInput(e){let n=we();if(this.confirmingDeletePath!==null){if(n.matches(e,"tui.select.confirm")){let i=this.confirmingDeletePath;this.setConfirmingDeletePath(null),this.onDeleteSession?.(i);return}if(n.matches(e,"tui.select.cancel")){this.setConfirmingDeletePath(null);return}return}if(n.matches(e,"tui.input.tab")){this.onToggleScope&&this.onToggleScope();return}if(n.matches(e,"app.session.toggleSort")){this.onToggleSort?.();return}if(this.keybindings.matches(e,"app.session.toggleNamedFilter")){this.onToggleNameFilter?.();return}if(n.matches(e,"app.session.togglePath")){this.showPath=!this.showPath,this.onTogglePath?.(this.showPath);return}if(n.matches(e,"app.session.delete")){this.startDeleteConfirmationForSelectedSession();return}if(n.matches(e,"app.session.rename")){let i=this.filteredSessions[this.selectedIndex];i&&this.onRenameSession?.(i.session.path);return}if(n.matches(e,"app.session.deleteNoninvasive")){if(this.searchInput.getValue().length>0){this.searchInput.handleInput(e),this.filterSessions(this.searchInput.getValue());return}this.startDeleteConfirmationForSelectedSession();return}if(n.matches(e,"tui.select.up"))this.selectedIndex=Math.max(0,this.selectedIndex-1);else if(n.matches(e,"tui.select.down"))this.selectedIndex=Math.min(this.filteredSessions.length-1,this.selectedIndex+1);else if(n.matches(e,"tui.select.pageUp"))this.selectedIndex=Math.max(0,this.selectedIndex-this.maxVisible);else if(n.matches(e,"tui.select.pageDown"))this.selectedIndex=Math.min(this.filteredSessions.length-1,this.selectedIndex+this.maxVisible);else if(n.matches(e,"tui.select.confirm")){let i=this.filteredSessions[this.selectedIndex];i&&this.onSelect&&this.onSelect(i.session.path)}else n.matches(e,"tui.select.cancel")?this.onCancel&&this.onCancel():(this.searchInput.handleInput(e),this.filterSessions(this.searchInput.getValue()))}};async function uV(t){let e=t.startsWith("-")?["--",t]:[t],n=rV("trash",e,{encoding:"utf-8"}),i=()=>{let r=[];n.error&&r.push(n.error.message);let o=n.stderr?.trim();return o&&r.push(o.split(`
245
245
  `)[0]??o),r.length===0?null:`trash: ${r.join(" \xB7 ").slice(0,200)}`};if(n.status===0||!oV(t))return{ok:!0,method:"trash"};try{return await sV(t),{ok:!0,method:"unlink"}}catch(r){let o=r instanceof Error?r.message:String(r),s=i();return{ok:!1,method:"unlink",error:s?`${o} (${s})`:o}}}var Cs=class extends K{constructor(n,i,r,o,s,a,l,c){super();this.canRename=!0;this.scope="current";this.sortMode="threaded";this.nameFilter="all";this.currentSessions=null;this.allSessions=null;this.currentLoading=!1;this.allLoading=!1;this.allLoadSeq=0;this.mode="list";this.renameInput=new ze;this.renameTargetPath=null;this._focused=!1;this.keybindings=l?.keybindings??uo.create(),this.currentSessionsLoader=n,this.allSessionsLoader=i,this.requestRender=a,this.header=new Av(this.scope,this.sortMode,this.nameFilter,this.requestRender);let u=l?.renameSession;this.renameSession=u,this.canRename=!!u,this.header.setShowRenameHint(l?.showRenameHint??this.canRename),this.sessionList=new Ev([],!1,this.sortMode,this.nameFilter,this.keybindings,c),this.buildBaseLayout(this.sessionList),this.renameInput.onSubmit=d=>{this.confirmRename(d)};let p=()=>this.header.setStatusMessage(null);this.sessionList.onSelect=d=>{p(),r(d)},this.sessionList.onCancel=()=>{p(),o()},this.sessionList.onExit=()=>{p(),s()},this.sessionList.onToggleScope=()=>this.toggleScope(),this.sessionList.onToggleSort=()=>this.toggleSortMode(),this.sessionList.onToggleNameFilter=()=>this.toggleNameFilter(),this.sessionList.onRenameSession=d=>{if(!u||this.scope==="current"&&this.currentLoading||this.scope==="all"&&this.allLoading)return;let g=(this.scope==="all"?this.allSessions??[]:this.currentSessions??[]).find(h=>h.path===d);this.enterRenameMode(d,g?.name)},this.sessionList.onTogglePath=d=>{this.header.setShowPath(d),this.requestRender()},this.sessionList.onDeleteConfirmationChange=d=>{this.header.setConfirmingDeletePath(d),this.requestRender()},this.sessionList.onError=d=>{this.header.setStatusMessage({type:"error",message:d},3e3),this.requestRender()},this.sessionList.onDeleteSession=async d=>{let m=await uV(d);if(m.ok){this.currentSessions&&(this.currentSessions=this.currentSessions.filter(b=>b.path!==d)),this.allSessions&&(this.allSessions=this.allSessions.filter(b=>b.path!==d));let g=this.scope==="all"?this.allSessions??[]:this.currentSessions??[],h=this.scope==="all";this.sessionList.setSessions(g,h);let f=m.method==="trash"?"Session moved to trash":"Session deleted";this.header.setStatusMessage({type:"info",message:f},2e3),await this.refreshSessionsAfterMutation()}else{let g=m.error??"Unknown error";this.header.setStatusMessage({type:"error",message:`Failed to delete: ${g}`},3e3)}this.requestRender()},this.loadCurrentSessions()}handleInput(n){if(this.mode==="rename"){if(we().matches(n,"tui.select.cancel")){this.exitRenameMode();return}this.renameInput.handleInput(n);return}this.sessionList.handleInput(n)}get focused(){return this._focused}set focused(n){this._focused=n,this.sessionList.focused=n,this.renameInput.focused=n,n&&this.mode==="rename"&&(this.renameInput.focused=!0)}buildBaseLayout(n,i){this.clear(),this.addChild(new W(1)),this.addChild(new V(r=>x.fg("accent",r))),this.addChild(new W(1)),(i?.showHeader??!0)&&(this.addChild(this.header),this.addChild(new W(1))),this.addChild(n),this.addChild(new W(1)),this.addChild(new V(r=>x.fg("accent",r)))}loadCurrentSessions(){this.loadScope("current","initial")}enterRenameMode(n,i){this.mode="rename",this.renameTargetPath=n,this.renameInput.setValue(i??""),this.renameInput.focused=!0;let r=new K;r.addChild(new E(x.bold("Rename Session"),1,0)),r.addChild(new W(1)),r.addChild(this.renameInput),r.addChild(new W(1)),r.addChild(new E(x.fg("muted",`${_e("tui.select.confirm")} to save \xB7 ${_e("tui.select.cancel")} to cancel`),1,0)),this.buildBaseLayout(r,{showHeader:!1}),this.requestRender()}exitRenameMode(){this.mode="list",this.renameTargetPath=null,this.buildBaseLayout(this.sessionList),this.requestRender()}async confirmRename(n){let i=n.trim();if(!i)return;let r=this.renameTargetPath;if(!r){this.exitRenameMode();return}let o=this.renameSession;if(!o){this.exitRenameMode();return}try{await o(r,i),await this.refreshSessionsAfterMutation()}finally{this.exitRenameMode()}}async loadScope(n,i){let r=n==="all";n==="current"?this.currentLoading=!0:this.allLoading=!0;let o=n==="all"?++this.allLoadSeq:void 0;this.header.setScope(n),this.header.setLoading(!0),this.requestRender();let s=(a,l)=>{n===this.scope&&(o!==void 0&&o!==this.allLoadSeq||(this.header.setProgress(a,l),this.requestRender()))};try{let a=await(n==="current"?this.currentSessionsLoader(s):this.allSessionsLoader(s));if(n==="current"?(this.currentSessions=a,this.currentLoading=!1):(this.allSessions=a,this.allLoading=!1),n!==this.scope||o!==void 0&&o!==this.allLoadSeq)return;this.header.setLoading(!1),this.sessionList.setSessions(a,r),this.requestRender()}catch(a){if(n==="current"?this.currentLoading=!1:this.allLoading=!1,n!==this.scope||o!==void 0&&o!==this.allLoadSeq)return;let l=a instanceof Error?a.message:String(a);this.header.setLoading(!1),this.header.setStatusMessage({type:"error",message:`Failed to load sessions: ${l}`},4e3),i==="initial"&&this.sessionList.setSessions([],r),this.requestRender()}}toggleSortMode(){this.sortMode=this.sortMode==="threaded"?"recent":this.sortMode==="recent"?"relevance":"threaded",this.header.setSortMode(this.sortMode),this.sessionList.setSortMode(this.sortMode),this.requestRender()}toggleNameFilter(){this.nameFilter=this.nameFilter==="all"?"named":"all",this.header.setNameFilter(this.nameFilter),this.sessionList.setNameFilter(this.nameFilter),this.requestRender()}async refreshSessionsAfterMutation(){await this.loadScope(this.scope,"refresh")}toggleScope(){if(this.scope==="current"){if(this.scope="all",this.header.setScope(this.scope),this.allSessions!==null){this.header.setLoading(!1),this.sessionList.setSessions(this.allSessions,!0),this.requestRender();return}this.allLoading||this.loadScope("all","toggle");return}this.scope="current",this.header.setScope(this.scope),this.header.setLoading(this.currentLoading),this.sessionList.setSessions(this.currentSessions??[],!1),this.requestRender()}getSessionList(){return this.sessionList}};import z4e from"chalk";import*as rO from"node:crypto";import*as Tr from"node:fs";import*as fp from"node:os";import*as st from"node:path";import tQ from"chalk";import{spawn as Z_,spawnSync as nQ}from"child_process";function b_(t,e,n){let i=e.usage,r=i.input+i.cacheRead+i.cacheWrite;if(!t||r<=0||i.cacheRead+i.cacheWrite===0&&!t.reportedCache)return;let o=Math.min(t.promptTokens,r)-i.cacheRead;if(o<=1024)return;let s=i.input+i.cacheWrite,a=s>0?(i.cost.input+i.cost.cacheWrite)/s:0,l=i.cacheRead>0?i.cost.cacheRead/i.cacheRead:(n.getModel(e.provider,e.model)?.cost.cacheRead??0)/1e6;return{missedTokens:o,missedCost:o*Math.max(0,a-l),idleMs:Math.max(0,e.timestamp-t.timestamp),modelChanged:`${e.provider}/${e.model}`!==t.modelKey}}function mV(t,e){let n=t.usage,i=n.input+n.cacheRead+n.cacheWrite;if(!(i<=0))return{promptTokens:i,modelKey:`${t.provider}/${t.model}`,timestamp:t.timestamp,reportedCache:e||n.cacheRead+n.cacheWrite>0}}function _v(t,e){let n,i={missedTokens:0,missedCost:0,missCount:0},r=new Map;for(let o of t){if(o.type==="compaction"||o.type==="branch_summary"){n=void 0;continue}if(o.type==="message"&&o.message.role==="assistant"){let s=b_(n,o.message,e);s&&(i.missedTokens+=s.missedTokens,i.missedCost+=s.missedCost,i.missCount+=1,r.set(o.message,s)),n=mV(o.message,n?.reportedCache??!1)??n}}return{prev:n,totals:i,misses:r}}function x_(t,e){return _v(t,e).totals}function v_(t,e){return _v(t,e).misses}function y_(t,e,n){return b_(_v(t,n).prev,e,n)}var Ov=[{name:"settings",description:"Open settings menu"},{name:"model",description:"Select model (opens selector UI)",argumentHint:"<provider/model>"},{name:"scoped-models",description:"Enable/disable models for Ctrl+P cycling"},{name:"export",description:"Export session (HTML default, or specify path: .html/.jsonl)"},{name:"import",description:"Import and resume a session from a JSONL file"},{name:"share",description:"Share session as a secret GitHub gist"},{name:"copy",description:"Copy last agent message to clipboard"},{name:"name",description:"Set session display name"},{name:"session",description:"Show session info and stats"},{name:"changelog",description:"Show changelog entries"},{name:"hotkeys",description:"Show all keyboard shortcuts"},{name:"fork",description:"Create a new fork from a previous user message"},{name:"clone",description:"Duplicate the current session at the current position"},{name:"tree",description:"Navigate session tree (switch branches)"},{name:"trust",description:"Save project trust decision for future sessions"},{name:"login",description:"Configure provider authentication",argumentHint:"<provider>"},{name:"logout",description:"Remove provider authentication"},{name:"new",description:"Start a new session"},{name:"compact",description:"Manually compact the session context"},{name:"resume",description:"Resume a different session"},{name:"reload",description:"Reload keybindings, extensions, skills, prompts, themes, and context files"},{name:"quit",description:`Quit ${Mt}`}];import qh from"node:path";import{existsSync as hV,readFileSync as gV}from"fs";var Lv="earendil-works/pi",fV="packages/coding-agent",bV=/^https:\/\/github\.com\/(?:badlogic|earendil-works)\/pi-mono(?=\/|$)/,xV=/^[a-z][a-z0-9+.-]*:/i,vV=/(!?\[[^\]\n]+\]\()([^\s)]+)((?:\s+[^)]*)?\))/g;function yV(t){return`${t.major}.${t.minor}.${t.patch}`}function wV(t){let e=typeof t=="string"?t:yV(t);return e.startsWith("v")?e:`v${e}`}function SV(t){let e=t.indexOf("#"),n=e===-1?t:t.slice(0,e),i=e===-1?"":t.slice(e),r=n.indexOf("?");return r===-1?{fragment:i,pathPart:n,query:""}:{fragment:i,pathPart:n.slice(0,r),query:n.slice(r)}}function TV(t){return t.replaceAll("\\","/")}function kV(t){let e=TV(t),n=e.startsWith("/")?qh.posix.normalize(e.replace(/^\/+/,"")):qh.posix.normalize(qh.posix.join(fV,e));if(!(n==="."||n.startsWith("../")||n===".."))return n}function CV(t,e){return t.endsWith("/")?!0:!qh.posix.basename(e).includes(".")}function RV(t,e){let n=t.replace(bV,`https://github.com/${Lv}`),i=`https://github.com/${Lv}`;for(let c of["blob","tree"])for(let u of["main","master"]){let p=`${i}/${c}/${u}/`;n.startsWith(p)&&(n=`${i}/${c}/${e}/${n.slice(p.length)}`)}if(n.startsWith("#")||n.startsWith("//")||xV.test(n))return n;let{fragment:r,pathPart:o,query:s}=SV(n);if(!o)return n;let a=kV(o);if(!a)return n;let l=CV(o,a)?"tree":"blob";return`https://github.com/${Lv}/${l}/${e}/${encodeURI(a)}${s}${r}`}function Wv(t,e){let n=wV(e);return t.replace(vV,(i,r,o,s)=>`${r}${RV(o,n)}${s}`)}function Fv(t){if(!hV(t))return[];try{let n=gV(t,"utf-8").split(`
@@ -278,7 +278,7 @@ ${H_(c)}
278
278
  ${i}`);let r=this.getTextOutput();return r&&(n+=`
279
279
  ${r}`),n}};var B9=2,j9=4,q9=20,G9=2,K9=12;function H9(t,e){let n=Math.max(0,e-B9),i=t.reduce((a,l)=>Math.max(a,l.bodyWidth),0),r=Math.max(0,i-n),o=t.find(a=>a.isSelected),s=0;if(o&&r>0){let a=Math.min(q9,Math.max(j9,Math.floor(n/3)));if(o.anchorCol>n-a){let l=Math.min(K9,Math.max(G9,Math.floor(n/4)));s=Math.min(r,o.anchorCol-l)}}return t.map(a=>{let l=s>0?`${a.gutter}${mt(a.body,s,n,!0)}\x1B[0m`:a.gutter+a.body;return ee(l,e,"")})}var zv=class{constructor(e,n,i,r,o){this.flatNodes=[];this.filteredNodes=[];this.selectedIndex=0;this.filterMode="default";this.searchQuery="";this.toolCallMap=new Map;this.multipleRoots=!1;this.showLabelTimestamps=!1;this.activePathIds=new Set;this.visibleParentMap=new Map;this.visibleChildrenMap=new Map;this.lastSelectedId=null;this.foldedNodes=new Set;this.currentLeafId=n,this.maxVisibleLines=i,this.filterMode=o??"default",this.multipleRoots=e.length>1,this.flatNodes=this.flattenTree(e),this.buildActivePath(),this.applyFilter();let s=r??n;this.selectedIndex=this.findNearestVisibleIndex(s),this.lastSelectedId=this.filteredNodes[this.selectedIndex]?.node.entry.id??null}findNearestVisibleIndex(e){if(this.filteredNodes.length===0)return 0;let n=new Map;for(let o of this.flatNodes)n.set(o.node.entry.id,o);let i=new Map(this.filteredNodes.map((o,s)=>[o.node.entry.id,s])),r=e;for(;r!==null;){let o=i.get(r);if(o!==void 0)return o;let s=n.get(r);if(!s)break;r=s.node.entry.parentId??null}return this.filteredNodes.length-1}buildActivePath(){if(this.activePathIds.clear(),!this.currentLeafId)return;let e=new Map;for(let i of this.flatNodes)e.set(i.node.entry.id,i);let n=this.currentLeafId;for(;n;){this.activePathIds.add(n);let i=e.get(n);if(!i)break;n=i.node.entry.parentId??null}}flattenTree(e){let n=[];this.toolCallMap.clear();let i=[],r=new Map,o=this.currentLeafId;{let l=[],c=[...e];for(;c.length>0;){let u=c.pop();l.push(u);for(let p=u.children.length-1;p>=0;p--)c.push(u.children[p])}for(let u=l.length-1;u>=0;u--){let p=l[u],d=o!==null&&p.entry.id===o;for(let m of p.children)r.get(m)&&(d=!0);r.set(p,d)}}let s=e.length>1,a=[...e].sort((l,c)=>Number(r.get(c))-Number(r.get(l)));for(let l=a.length-1;l>=0;l--){let c=l===a.length-1;i.push([a[l],s?1:0,s,s,c,[],s])}for(;i.length>0;){let[l,c,u,p,d,m,g]=i.pop(),h=l.entry;if(h.type==="message"&&h.message.role==="assistant"){let $=h.message.content;if(Array.isArray($)){for(let O of $)if(typeof O=="object"&&O!==null&&"type"in O&&O.type==="toolCall"){let A=O;this.toolCallMap.set(A.id,{name:A.name,arguments:A.arguments})}}}n.push({node:l,indent:c,showConnector:p,isLast:d,gutters:m,isVirtualRootChild:g});let f=l.children,b=f.length>1,v=(()=>{let $=[],O=[];for(let A of f)r.get(A)?$.push(A):O.push(A);return[...$,...O]})(),y;b||u&&c>0?y=c+1:y=c;let R=p&&!g,T=this.multipleRoots?Math.max(0,c-1):c,k=Math.max(0,T-1),I=R?[...m,{position:k,show:!d}]:m;for(let $=v.length-1;$>=0;$--){let O=$===v.length-1;i.push([v[$],y,b,b,O,I,!1])}}return n}applyFilter(){this.filteredNodes.length>0&&(this.lastSelectedId=this.filteredNodes[this.selectedIndex]?.node.entry.id??this.lastSelectedId);let e=this.searchQuery.toLowerCase().split(/\s+/).filter(Boolean);if(this.filteredNodes=this.flatNodes.filter(n=>{let i=n.node.entry,r=i.id===this.currentLeafId;if(i.type==="message"&&i.message.role==="assistant"&&!r){let a=i.message,l=this.hasTextContent(a.content),c=a.stopReason&&a.stopReason!=="stop"&&a.stopReason!=="toolUse";if(!l&&!c)return!1}let o=!0,s=i.type==="label"||i.type==="custom"||i.type==="model_change"||i.type==="thinking_level_change"||i.type==="session_info";switch(this.filterMode){case"user-only":o=i.type==="message"&&i.message.role==="user";break;case"no-tools":o=!s&&!(i.type==="message"&&i.message.role==="toolResult");break;case"labeled-only":o=n.node.label!==void 0;break;case"all":o=!0;break;default:o=!s;break}if(!o)return!1;if(e.length>0){let a=this.getSearchableText(n.node).toLowerCase();return e.every(l=>a.includes(l))}return!0}),this.foldedNodes.size>0){let n=new Set;for(let i of this.flatNodes){let{id:r,parentId:o}=i.node.entry;o!=null&&(this.foldedNodes.has(o)||n.has(o))&&n.add(r)}this.filteredNodes=this.filteredNodes.filter(i=>!n.has(i.node.entry.id))}this.recalculateVisualStructure(),this.lastSelectedId?this.selectedIndex=this.findNearestVisibleIndex(this.lastSelectedId):this.selectedIndex>=this.filteredNodes.length&&(this.selectedIndex=Math.max(0,this.filteredNodes.length-1)),this.filteredNodes.length>0&&(this.lastSelectedId=this.filteredNodes[this.selectedIndex]?.node.entry.id??this.lastSelectedId)}recalculateVisualStructure(){if(this.filteredNodes.length===0)return;let e=new Set(this.filteredNodes.map(c=>c.node.entry.id)),n=new Map;for(let c of this.flatNodes)n.set(c.node.entry.id,c);let i=c=>{let u=n.get(c)?.node.entry.parentId??null;for(;u!==null;){if(e.has(u))return u;u=n.get(u)?.node.entry.parentId??null}return null},r=new Map,o=new Map;o.set(null,[]);for(let c of this.filteredNodes){let u=c.node.entry.id,p=i(u);r.set(u,p),o.has(p)||o.set(p,[]),o.get(p).push(u)}let s=o.get(null);this.multipleRoots=s.length>1;let a=new Map;for(let c of this.filteredNodes)a.set(c.node.entry.id,c);let l=[];for(let c=s.length-1;c>=0;c--){let u=c===s.length-1;l.push([s[c],this.multipleRoots?1:0,this.multipleRoots,this.multipleRoots,u,[],this.multipleRoots])}for(;l.length>0;){let[c,u,p,d,m,g,h]=l.pop(),f=a.get(c);if(!f)continue;f.indent=u,f.showConnector=d,f.isLast=m,f.gutters=g,f.isVirtualRootChild=h;let b=o.get(c)||[],v=b.length>1,y;v||p&&u>0?y=u+1:y=u;let R=d&&!h,T=this.multipleRoots?Math.max(0,u-1):u,k=Math.max(0,T-1),I=R?[...g,{position:k,show:!m}]:g;for(let $=b.length-1;$>=0;$--){let O=$===b.length-1;l.push([b[$],y,v,v,O,I,!1])}}this.visibleParentMap=r,this.visibleChildrenMap=o}getSearchableText(e){let n=e.entry,i=[];switch(e.label&&i.push(e.label),n.type){case"message":{let r=n.message;if(i.push(r.role),"content"in r&&r.content&&i.push(this.extractContent(r.content)),r.role==="bashExecution"){let o=r;o.command&&i.push(o.command)}break}case"custom_message":{i.push(n.customType),typeof n.content=="string"?i.push(n.content):i.push(this.extractContent(n.content));break}case"compaction":i.push("compaction");break;case"branch_summary":i.push("branch summary",n.summary);break;case"session_info":i.push("title"),n.name&&i.push(n.name);break;case"model_change":i.push("model",n.modelId);break;case"thinking_level_change":i.push("thinking",n.thinkingLevel);break;case"custom":i.push("custom",n.customType);break;case"label":i.push("label",n.label??"");break}return i.join(" ")}invalidate(){}getSearchQuery(){return this.searchQuery}getSelectedNode(){return this.filteredNodes[this.selectedIndex]?.node}copySelected(){let e=this.getSelectedNode();this.onCopy?.(e?this.getEntryCopyText(e):void 0)}updateNodeLabel(e,n,i){for(let r of this.flatNodes)if(r.node.entry.id===e){r.node.label=n,r.node.labelTimestamp=n?i??new Date().toISOString():void 0;break}}getStatusLabels(){let e="";switch(this.filterMode){case"no-tools":e+=" [no-tools]";break;case"user-only":e+=" [user]";break;case"labeled-only":e+=" [labeled]";break;case"all":e+=" [all]";break}return this.showLabelTimestamps&&(e+=" [+label time]"),e}render(e){let n=[];if(this.filteredNodes.length===0)return n.push(ee(x.fg("muted"," No entries found"),e)),n.push(ee(x.fg("muted",` (0/0)${this.getStatusLabels()}`),e)),n;let i=Math.max(0,Math.min(this.selectedIndex-Math.floor(this.maxVisibleLines/2),this.filteredNodes.length-this.maxVisibleLines)),r=Math.min(i+this.maxVisibleLines,this.filteredNodes.length),o=[];for(let s=i;s<r;s++){let a=this.filteredNodes[s],l=a.node.entry,c=s===this.selectedIndex,u=c?x.fg("accent","\u203A "):" ",p=this.multipleRoots?Math.max(0,a.indent-1):a.indent,d=a.showConnector&&!a.isVirtualRootChild?a.isLast?"\u2514\u2500 ":"\u251C\u2500 ":"",m=d?p-1:-1,g=p*3,h=[],f=this.foldedNodes.has(l.id);for(let D=0;D<g;D++){let j=Math.floor(D/3),F=D%3,U=a.gutters.find(z=>z.position===j);if(U)F===0?h.push(U.show?"\u2502":" "):h.push(" ");else if(d&&j===m)if(F===0)h.push(a.isLast?"\u2514":"\u251C");else if(F===1){let z=this.isFoldable(l.id);h.push(f?"\u229E":z?"\u229F":"\u2500")}else h.push(" ");else h.push(" ")}let b=h.join(""),v=a.showConnector&&!a.isVirtualRootChild,y=f&&!v?x.fg("accent","\u229E "):"",T=this.activePathIds.has(l.id)?x.fg("accent","\u2022 "):"",k=a.node.label?x.fg("warning",`[${a.node.label}] `):"",I=this.showLabelTimestamps&&a.node.label&&a.node.labelTimestamp?x.fg("muted",`${this.formatLabelTimestamp(a.node.labelTimestamp)} `):"",$=this.getEntryDisplayText(a.node,c),O=x.fg("dim",b)+y+T,A=N(O),_=u,L=O+k+I+$;c&&(_=x.bg("selectedBg",_),L=x.bg("selectedBg",L)),o.push({gutter:_,body:L,anchorCol:A,bodyWidth:N(L),isSelected:c})}return n.push(...H9(o,e)),n.push(ee(x.fg("muted",` (${this.selectedIndex+1}/${this.filteredNodes.length})${this.getStatusLabels()}`),e)),n}getEntryDisplayText(e,n){let i=e.entry,r,o=s=>s.replace(/[\n\t]/g," ").trim();switch(i.type){case"message":{let s=i.message,a=s.role;if(a==="user"){let l=s,c=o(this.extractContent(l.content));r=x.fg("accent","user: ")+c}else if(a==="assistant"){let l=s,c=o(this.extractContent(l.content));if(c)r=x.fg("success","assistant: ")+c;else if(l.stopReason==="aborted")r=x.fg("success","assistant: ")+x.fg("muted","(aborted)");else if(l.errorMessage){let u=o(l.errorMessage).slice(0,80);r=x.fg("success","assistant: ")+x.fg("error",u)}else r=x.fg("success","assistant: ")+x.fg("muted","(no content)")}else if(a==="toolResult"){let l=s,c=l.toolCallId?this.toolCallMap.get(l.toolCallId):void 0;c?r=x.fg("muted",this.formatToolCall(c.name,c.arguments)):r=x.fg("muted",`[${l.toolName??"tool"}]`)}else if(a==="bashExecution"){let l=s;r=x.fg("dim",`[bash]: ${o(l.command??"")}`)}else r=x.fg("dim",`[${a}]`);break}case"custom_message":{let s=typeof i.content=="string"?i.content:i.content.filter(a=>a.type==="text").map(a=>a.text).join("");r=x.fg("customMessageLabel",`[${i.customType}]: `)+o(s);break}case"compaction":{let s=Math.round(i.tokensBefore/1e3);r=x.fg("borderAccent",`[compaction: ${s}k tokens]`);break}case"branch_summary":r=x.fg("warning","[branch summary]: ")+o(i.summary);break;case"model_change":r=x.fg("dim",`[model: ${i.modelId}]`);break;case"thinking_level_change":r=x.fg("dim",`[thinking: ${i.thinkingLevel}]`);break;case"custom":r=x.fg("dim",`[custom: ${i.customType}]`);break;case"label":r=x.fg("dim",`[label: ${i.label??"(cleared)"}]`);break;case"session_info":r=i.name?[x.fg("dim","[title: "),x.fg("dim",i.name),x.fg("dim","]")].join(""):[x.fg("dim","[title: "),x.italic(x.fg("dim","empty")),x.fg("dim","]")].join("");break;default:r=""}return n?x.bold(r):r}formatLabelTimestamp(e){let n=new Date(e),i=new Date,r=n.getHours().toString().padStart(2,"0"),o=n.getMinutes().toString().padStart(2,"0"),s=`${r}:${o}`;if(n.getFullYear()===i.getFullYear()&&n.getMonth()===i.getMonth()&&n.getDate()===i.getDate())return s;let a=n.getMonth()+1,l=n.getDate();return n.getFullYear()===i.getFullYear()?`${a}/${l} ${s}`:`${n.getFullYear().toString().slice(-2)}/${a}/${l} ${s}`}extractContent(e){return this.extractFullContent(e).slice(0,200)}extractFullContent(e){if(typeof e=="string")return e;if(!Array.isArray(e))return"";let n="";for(let i of e)typeof i=="object"&&i!==null&&"type"in i&&i.type==="text"&&(n+=i.text);return n}getEntryCopyText(e){let n=e.entry,i;switch(n.type){case"message":n.message.role==="bashExecution"?i=n.message.command:"content"in n.message&&(i=this.extractFullContent(n.message.content),!i&&n.message.role==="assistant"&&(i=n.message.errorMessage));break;case"custom_message":i=this.extractFullContent(n.content);break;case"compaction":i=n.summary;break;case"branch_summary":i=n.summary;break}return i?.trim()?i:void 0}hasTextContent(e){if(typeof e=="string")return e.trim().length>0;if(Array.isArray(e)){for(let n of e)if(typeof n=="object"&&n!==null&&"type"in n&&n.type==="text"){let i=n.text;if(i&&i.trim().length>0)return!0}}return!1}formatToolCall(e,n){let i=r=>{let o=process.env.HOME||process.env.USERPROFILE||"";return o&&r.startsWith(o)?`~${r.slice(o.length)}`:r};switch(e){case"read":{let r=i(String(n.path||n.file_path||"")),o=n.offset,s=n.limit,a=r;if(o!==void 0||s!==void 0){let l=o??1,c=s!==void 0?l+s-1:"";a+=`:${l}${c?`-${c}`:""}`}return`[read: ${a}]`}case"write":return`[write: ${i(String(n.path||n.file_path||""))}]`;case"edit":return`[edit: ${i(String(n.path||n.file_path||""))}]`;case"bash":{let r=String(n.command||"");return`[bash: ${r.replace(/[\n\t]/g," ").trim().slice(0,50)}${r.length>50?"...":""}]`}case"grep":{let r=String(n.pattern||""),o=i(String(n.path||"."));return`[grep: /${r}/ in ${o}]`}case"find":{let r=String(n.pattern||""),o=i(String(n.path||"."));return`[find: ${r} in ${o}]`}case"ls":return`[ls: ${i(String(n.path||"."))}]`;default:{let r=JSON.stringify(n).slice(0,40);return`[${e}: ${r}${JSON.stringify(n).length>40?"...":""}]`}}}handleInput(e){let n=we();if(n.matches(e,"tui.select.up"))this.selectedIndex=this.selectedIndex===0?this.filteredNodes.length-1:this.selectedIndex-1;else if(n.matches(e,"tui.select.down"))this.selectedIndex=this.selectedIndex===this.filteredNodes.length-1?0:this.selectedIndex+1;else if(n.matches(e,"app.tree.foldOrUp")){let i=this.filteredNodes[this.selectedIndex]?.node.entry.id;i&&this.isFoldable(i)&&!this.foldedNodes.has(i)?(this.foldedNodes.add(i),this.applyFilter()):this.selectedIndex=this.findBranchSegmentStart("up")}else if(n.matches(e,"app.tree.unfoldOrDown")){let i=this.filteredNodes[this.selectedIndex]?.node.entry.id;i&&this.foldedNodes.has(i)?(this.foldedNodes.delete(i),this.applyFilter()):this.selectedIndex=this.findBranchSegmentStart("down")}else if(n.matches(e,"tui.editor.cursorLeft")||n.matches(e,"tui.select.pageUp"))this.selectedIndex=Math.max(0,this.selectedIndex-this.maxVisibleLines);else if(n.matches(e,"tui.editor.cursorRight")||n.matches(e,"tui.select.pageDown"))this.selectedIndex=Math.min(this.filteredNodes.length-1,this.selectedIndex+this.maxVisibleLines);else if(n.matches(e,"tui.select.confirm")){let i=this.filteredNodes[this.selectedIndex];i&&this.onSelect&&this.onSelect(i.node.entry.id)}else if(n.matches(e,"app.message.copy"))this.copySelected();else if(n.matches(e,"tui.select.cancel"))this.searchQuery?(this.searchQuery="",this.foldedNodes.clear(),this.applyFilter()):this.onCancel?.();else if(n.matches(e,"app.tree.filter.default"))this.filterMode="default",this.foldedNodes.clear(),this.applyFilter();else if(n.matches(e,"app.tree.filter.noTools"))this.filterMode=this.filterMode==="no-tools"?"default":"no-tools",this.foldedNodes.clear(),this.applyFilter();else if(n.matches(e,"app.tree.filter.userOnly"))this.filterMode=this.filterMode==="user-only"?"default":"user-only",this.foldedNodes.clear(),this.applyFilter();else if(n.matches(e,"app.tree.filter.labeledOnly"))this.filterMode=this.filterMode==="labeled-only"?"default":"labeled-only",this.foldedNodes.clear(),this.applyFilter();else if(n.matches(e,"app.tree.filter.all"))this.filterMode=this.filterMode==="all"?"default":"all",this.foldedNodes.clear(),this.applyFilter();else if(n.matches(e,"app.tree.filter.cycleBackward")){let i=["default","no-tools","user-only","labeled-only","all"],r=i.indexOf(this.filterMode);this.filterMode=i[(r-1+i.length)%i.length],this.foldedNodes.clear(),this.applyFilter()}else if(n.matches(e,"app.tree.filter.cycleForward")){let i=["default","no-tools","user-only","labeled-only","all"],r=i.indexOf(this.filterMode);this.filterMode=i[(r+1)%i.length],this.foldedNodes.clear(),this.applyFilter()}else if(n.matches(e,"tui.editor.deleteCharBackward"))this.searchQuery.length>0&&(this.searchQuery=this.searchQuery.slice(0,-1),this.foldedNodes.clear(),this.applyFilter());else if(n.matches(e,"app.tree.editLabel")){let i=this.filteredNodes[this.selectedIndex];i&&this.onLabelEdit&&this.onLabelEdit(i.node.entry.id,i.node.label)}else n.matches(e,"app.tree.toggleLabelTimestamp")?this.showLabelTimestamps=!this.showLabelTimestamps:![...e].some(r=>{let o=r.charCodeAt(0);return o<32||o===127||o>=128&&o<=159})&&e.length>0&&(this.searchQuery+=e,this.foldedNodes.clear(),this.applyFilter())}isFoldable(e){let n=this.visibleChildrenMap.get(e);if(!n||n.length===0)return!1;let i=this.visibleParentMap.get(e);if(i==null)return!0;let r=this.visibleChildrenMap.get(i);return r!==void 0&&r.length>1}findBranchSegmentStart(e){let n=this.filteredNodes[this.selectedIndex]?.node.entry.id;if(!n)return this.selectedIndex;let i=new Map(this.filteredNodes.map((o,s)=>[o.node.entry.id,s])),r=n;if(e==="down")for(;;){let o=this.visibleChildrenMap.get(r)??[];if(o.length===0)return i.get(r);if(o.length>1)return i.get(o[0]);r=o[0]}for(;;){let o=this.visibleParentMap.get(r)??null;if(o===null)return i.get(r);if((this.visibleChildrenMap.get(o)??[]).length>1){let a=i.get(r);if(a<this.selectedIndex)return a}r=o}}},Vv=class{constructor(e){this.treeList=e}invalidate(){}render(e){let n=this.treeList.getSearchQuery();return n?[ee(` ${x.fg("muted","Type to search:")} ${x.fg("accent",n)}`,e)]:[ee(` ${x.fg("muted","Type to search:")}`,e)]}handleInput(e){}},Qv=class{invalidate(){}render(e){let n=z9.map(({keys:l,label:c,labelFirst:u})=>{let p=V9(l);return p?u?`${c} ${p}`:`${p} ${c}`:c}),i=Math.max(1,e),r=" ",o=" \xB7 ",s=[],a="";for(let l of n){let c=a?`${a}${o}${l}`:N(`${r}${l}`)<=i?`${r}${l}`:l;if(!a||N(c)<=i){a=c;continue}s.push(...mn(a.trimEnd(),i)),a=N(`${r}${l}`)<=i?`${r}${l}`:l}return a&&s.push(...mn(a.trimEnd(),i)),s.map(l=>x.fg("muted",l))}},z9=[{keys:["tui.select.up","tui.select.down"],label:"move"},{keys:["tui.editor.cursorLeft","tui.editor.cursorRight"],label:"page"},{keys:["app.tree.foldOrUp","app.tree.unfoldOrDown"],label:"branch"},{keys:["app.message.copy"],label:"copy"},{keys:["app.tree.editLabel"],label:"label"},{keys:["app.tree.toggleLabelTimestamp"],label:"label time"},{keys:["app.tree.filter.default","app.tree.filter.noTools","app.tree.filter.userOnly","app.tree.filter.labeledOnly","app.tree.filter.all"],label:"filters",labelFirst:!0},{keys:["app.tree.filter.cycleForward","app.tree.filter.cycleBackward"],label:"cycle",labelFirst:!0}];function V9(t){let e=[];for(let n of t){let i=we().getKeys(n)[0];i!==void 0&&e.push(i)}return e.length===0?"":hs(Q9(e)).replace(/\bpageUp\b/g,"pgup").replace(/\bpageDown\b/g,"pgdn").replace(/\bup\b/g,"\u2191").replace(/\bdown\b/g,"\u2193").replace(/\bleft\b/g,"\u2190").replace(/\bright\b/g,"\u2192")}function Q9(t){if(t.length===1)return t[0];let e=t.map(i=>{let r=i.lastIndexOf("+");return r===-1?{prefix:"",suffix:i}:{prefix:i.slice(0,r+1),suffix:i.slice(r+1)}}),n=e[0].prefix;return n&&e.every(i=>i.prefix===n)?`${n}${e.map(i=>i.suffix).join("/")}`:t.join("/")}var Jv=class{constructor(e,n){this._focused=!1;this.entryId=e,this.input=new ze,n&&this.input.setValue(n)}get focused(){return this._focused}set focused(e){this._focused=e,this.input.focused=e}invalidate(){}render(e){let n=[],r=e-2;return n.push(ee(` ${x.fg("muted","Label (empty to remove):")}`,e)),n.push(...this.input.render(r).map(o=>ee(` ${o}`,e))),n.push(ee(` ${ce("tui.select.confirm","save")} ${ce("tui.select.cancel","cancel")}`,e)),n}handleInput(e){let n=we();if(n.matches(e,"tui.select.confirm")){let i=this.input.getValue().trim();this.onSubmit?.(this.entryId,i||void 0)}else n.matches(e,"tui.select.cancel")?this.onCancel?.():this.input.handleInput(e)}},ic=class extends K{constructor(n,i,r,o,s,a,l,c){super();this.labelInput=null;this._focused=!1;this.onLabelChangeCallback=a;let u=Math.max(5,Math.floor(r/2));this.treeList=new zv(n,i,u,l,c),this.treeList.onSelect=o,this.treeList.onCancel=s,this.treeList.onCopy=p=>this.onCopy?.(p),this.treeList.onLabelEdit=(p,d)=>this.showLabelInput(p,d),this.treeContainer=new K,this.treeContainer.addChild(this.treeList),this.labelInputContainer=new K,this.addChild(new W(1)),this.addChild(new V),this.addChild(new E(x.bold(" Session Tree"),1,0)),this.addChild(new Qv),this.addChild(new Vv(this.treeList)),this.addChild(new V),this.addChild(new W(1)),this.addChild(this.treeContainer),this.addChild(this.labelInputContainer),this.addChild(new W(1)),this.addChild(new V),n.length===0&&setTimeout(()=>s(),100)}get focused(){return this._focused}set focused(n){this._focused=n,this.labelInput&&(this.labelInput.focused=n)}showLabelInput(n,i){this.labelInput=new Jv(n,i),this.labelInput.onSubmit=(r,o)=>{this.treeList.updateNodeLabel(r,o),this.onLabelChangeCallback?.(r,o),this.hideLabelInput()},this.labelInput.onCancel=()=>this.hideLabelInput(),this.labelInput.focused=this._focused,this.treeContainer.clear(),this.labelInputContainer.clear(),this.labelInputContainer.addChild(this.labelInput)}hideLabelInput(){this.labelInput=null,this.labelInputContainer.clear(),this.treeContainer.clear(),this.treeContainer.addChild(this.treeList)}handleInput(n){this.labelInput?this.labelInput.handleInput(n):this.treeList.handleInput(n)}getTreeList(){return this.treeList}};function J9(t,e){if(e===null)return"none";let n=e.decision?"trusted":"untrusted";return t!==void 0&&e.path!==t?`${n} (inherited from ${e.path})`:`${n} (${e.path})`}var hp=class extends K{constructor(e){super(),this.savedDecision=e.savedDecision,this.trustOptions=Rv(e.cwd),this.selectedIndex=Math.max(0,this.trustOptions.findIndex(n=>this.isSavedOption(n))),this.onSelectCallback=e.onSelect,this.onCancelCallback=e.onCancel,this.addChild(new V),this.addChild(new W(1)),this.addChild(new E(x.fg("accent",x.bold("Project trust")),1,0)),this.addChild(new E(x.fg("muted",e.cwd),1,0)),this.addChild(new W(1)),this.addChild(new E(x.fg("muted",`Saved decision: ${J9(this.trustOptions[0]?.savedPath,e.savedDecision)}`),1,0)),this.addChild(new E(x.fg("muted",`Current session: ${e.projectTrusted?"trusted":"untrusted"}`),1,0)),this.addChild(new W(1)),this.listContainer=new K,this.addChild(this.listContainer),this.addChild(new W(1)),this.addChild(new E(ht("\u2191\u2193","navigate")+" "+ce("tui.select.confirm","save")+" "+ce("tui.select.cancel","cancel"),1,0)),this.addChild(new W(1)),this.addChild(new V),this.updateList()}isSavedOption(e){return e.savedPath!==void 0&&this.savedDecision?.decision===e.trusted&&this.savedDecision.path===e.savedPath}updateList(){this.listContainer.clear();for(let e=0;e<this.trustOptions.length;e++){let n=this.trustOptions[e];if(!n)continue;let i=e===this.selectedIndex,o=this.isSavedOption(n)?x.fg("success"," \u2713"):"",s=i?x.fg("accent","\u2192 "):" ",a=i?x.fg("accent",n.label):x.fg("text",n.label);this.listContainer.addChild(new E(`${s}${a}${o}`,1,0))}}handleInput(e){let n=we();if(n.matches(e,"tui.select.up")||e==="k")this.selectedIndex=Math.max(0,this.selectedIndex-1),this.updateList();else if(n.matches(e,"tui.select.down")||e==="j")this.selectedIndex=Math.min(this.trustOptions.length-1,this.selectedIndex+1),this.updateList();else if(n.matches(e,"tui.select.confirm")||e===`
280
280
  `){let i=this.trustOptions[this.selectedIndex];i&&this.onSelectCallback({trusted:i.trusted,updates:i.updates})}else n.matches(e,"tui.select.cancel")&&this.onCancelCallback()}};var Y9="\x1B]133;A\x07",X9="\x1B]133;B\x07",Z9="\x1B]133;C\x07",bo=class extends K{constructor(e,n=It(),i=1,r=[]){super(),this.text=e,this.markdownTheme=n,this.outputPad=i,this.markdownTransformers=r,this.rebuild()}setOutputPad(e){this.outputPad=e,this.rebuild()}rebuild(){this.clear();let e=new xt(this.outputPad,1,n=>x.bg("userMessageBg",n));e.addChild(new Xe(this.text,0,0,this.markdownTheme,{color:n=>x.fg("userMessageText",n)},{preserveOrderedListMarkers:!0,preserveBackslashEscapes:!0,transform:op("user",!1,this.markdownTransformers)})),this.addChild(e)}render(e){let n=super.render(e);return n.length===0||(n[0]=Y9+n[0],n[n.length-1]=X9+Z9+n[n.length-1]),n}};var Yv=class{constructor(e,n){this.messages=[];this.selectedIndex=0;this.maxVisible=10;this.messages=e;let i=n?e.findIndex(r=>r.id===n):-1;this.selectedIndex=i>=0?i:Math.max(0,e.length-1)}invalidate(){}render(e){let n=[];if(this.messages.length===0)return n.push(x.fg("muted"," No user messages found")),n;let i=Math.max(0,Math.min(this.selectedIndex-Math.floor(this.maxVisible/2),this.messages.length-this.maxVisible)),r=Math.min(i+this.maxVisible,this.messages.length);for(let o=i;o<r;o++){let s=this.messages[o],a=o===this.selectedIndex,l=s.text.replace(/\n/g," ").trim(),c=a?x.fg("accent","\u203A "):" ",u=e-2,p=ee(l,u),d=c+(a?x.bold(p):p);n.push(d);let g=` Message ${o+1} of ${this.messages.length}`,h=x.fg("muted",g);n.push(h),n.push("")}if(i>0||r<this.messages.length){let o=x.fg("muted",` (${this.selectedIndex+1}/${this.messages.length})`);n.push(o)}return n}handleInput(e){let n=we();if(n.matches(e,"tui.select.up"))this.selectedIndex=this.selectedIndex===0?this.messages.length-1:this.selectedIndex-1;else if(n.matches(e,"tui.select.down"))this.selectedIndex=this.selectedIndex===this.messages.length-1?0:this.selectedIndex+1;else if(n.matches(e,"tui.select.confirm")){let i=this.messages[this.selectedIndex];i&&this.onSelect&&this.onSelect(i.id)}else n.matches(e,"tui.select.cancel")&&this.onCancel&&this.onCancel()}},rc=class extends K{constructor(e,n,i,r){super(),this.addChild(new W(1)),this.addChild(new E(x.bold("Fork from Message"),1,0)),this.addChild(new E(x.fg("muted","Select a user message to copy the active path up to that point into a new session"),1,0)),this.addChild(new W(1)),this.addChild(new V),this.addChild(new W(1)),this.messageList=new Yv(e,r),this.messageList.onSelect=n,this.messageList.onCancel=i,this.addChild(this.messageList),this.addChild(new W(1)),this.addChild(new V),e.length===0&&setTimeout(()=>i(),100)}getMessageList(){return this.messageList}};var eg=class{constructor(e,n,i,r){this.terminalTheme=Ru().theme;this.autoSyncEnabled=!1;this.ui=e,this.settingsManager=n,this.showError=i,this.onChanged=r,this.activeThemeName=Hm(this.settingsManager.getThemeSetting(),this.terminalTheme),Sl(this.activeThemeName,!0),this.bindTerminalColorSchemeListener()}rebindTui(){this.terminalColorSchemeUnsubscribe?.(),this.bindTerminalColorSchemeListener(),this.ui.setTerminalColorSchemeNotifications(this.autoSyncEnabled)}async applyFromSettings(){let e=this.settingsManager.getThemeSetting(),n=io(e);if(n){this.terminalTheme=await px({ui:this.ui,timeoutMs:100}),this.setAutoSync(!0),this.applyThemeName(this.terminalTheme==="light"?n.lightTheme:n.darkTheme,!0);return}if(this.setAutoSync(!1),e!==void 0){this.applyThemeName(e,!0);return}let i=await ux({ui:this.ui,timeoutMs:100});this.terminalTheme=i.theme,this.applyThemeName(i.theme).success&&i.confidence==="high"&&(this.settingsManager.setTheme(i.theme),await this.settingsManager.flush())}setThemeName(e,n=!1){return this.setAutoSync(!1),this.applyThemeName(e,n)}setThemeInstance(e){return this.setAutoSync(!1),aA(e),this.activeThemeName="<in-memory>",this.notifyChanged(),{success:!0}}preview(e){let n=Hm(e,this.terminalTheme)??this.activeThemeName;n&&zm(n,!0).success&&(this.ui.invalidate(),this.ui.requestRender())}disableAutoSync(){this.setAutoSync(!1)}getTerminalTheme(){return this.terminalTheme}applyThemeName(e,n=!1){let i=zm(e,!0);return this.activeThemeName=i.success?e:"dark",this.notifyChanged(),!i.success&&n&&this.showError(`Failed to load theme "${e}": ${i.error}
281
- Fell back to dark theme.`),i}notifyChanged(){this.ui.invalidate(),this.onChanged()}setAutoSync(e){this.autoSyncEnabled!==e&&(this.autoSyncEnabled=e,this.ui.setTerminalColorSchemeNotifications(e))}bindTerminalColorSchemeListener(){this.terminalColorSchemeUnsubscribe=this.ui.onTerminalColorSchemeChange(e=>this.applyTerminalTheme(e))}applyTerminalTheme(e){if(!this.autoSyncEnabled)return;this.terminalTheme=e;let n=io(this.settingsManager.getThemeSetting());if(!n){this.setAutoSync(!1);return}let i=e==="light"?n.lightTheme:n.darkTheme;i!==this.activeThemeName&&this.applyThemeName(i)}};function gp(t){return typeof t=="object"&&t!==null&&"setExpanded"in t&&typeof t.setExpanded=="function"}var tg=class extends E{constructor(e,n,i=!1,r=0,o=0){super(i?n():e(),r,o),this.getCollapsedText=e,this.getExpandedText=n}setExpanded(e){this.setText(e?this.getExpandedText():this.getCollapsedText())}};function iQ(t){return"type"in t&&t.type==="custom"}var rQ=new Set(["EIO","EPIPE","ENOTCONN"]);function oQ(t){if(!t||typeof t!="object"||!("code"in t))return!1;let e=t.code;return e!==void 0&&rQ.has(e)}var eO="Anthropic subscription auth is active. Third-party harness usage draws from extra usage and is billed per token, not your Claude plan limits. Manage extra usage at https://claude.ai/settings/usage. Disable this warning in /settings.";function sQ(t){return typeof t=="string"&&t.startsWith("sk-ant-oat")}function aQ(t){return!!t&&t.provider==="unknown"&&t.id==="unknown"&&t.api==="unknown"}function lQ(t){return t.length>0&&!/[^a-zA-Z0-9_\-./~:@]/.test(t)?t:`'${t.replace(/'/g,"'\\''")}'`}function cQ(t){if(!process.stdout.isTTY||!t.isPersisted())return;let e=t.getSessionFile();if(!e||!Tr.existsSync(e))return;let n=[Mt];return t.usesDefaultSessionDir()||n.push("--session-dir",lQ(t.getSessionDir())),n.push("--session",t.getSessionId()),n.join(" ")}function uQ(t){return t in rv}var tO={oauth:0,api_key:1};function nO(t,e,n,i){let r=Bt(t,e,n);return r.length===0?null:r.map(i)}function pQ(t){let e=new Map;for(let n of t){let i=e.get(n.id);if(i){i.authTypes.includes(n.authType)||(i.authTypes.push(n.authType),i.authTypes.sort((r,o)=>tO[r]-tO[o]));continue}e.set(n.id,{id:n.id,name:n.name,authTypes:[n.authType]})}return Array.from(e.values()).sort((n,i)=>n.name.localeCompare(i.name))}function dQ(t){let e=t.authTypes.map(n=>`${n} ${Xh(n)}`).join(" ");return`${t.id} ${t.name} ${e}`}function mQ(t){let e=t.authTypes.map(Xh).join("/");return t.name===t.id?e:`${t.name} \xB7 ${e}`}function iO(t){let e=t.terminal??new is;return t.tuiMode==="fullscreen"?new fl(e,t.showHardwareCursor,t.logDirectory,{openUrl:Hh,onRightClickPaste:t.onRightClickPaste}):new br(e,t.showHardwareCursor,t.logDirectory)}function hQ(t){return new Proxy({},{get:(e,n)=>{let i=t(),r=Reflect.get(i,n,i);if(typeof r!="function")return r;let o=i,s=r;return(...a)=>{let l=t();if(l!==o){let c=Reflect.get(l,n,l);if(typeof c!="function")throw new TypeError(`TUI property ${String(n)} is not callable`);o=l,s=c}return Reflect.apply(s,o,a)}},set:(e,n,i)=>{let r=t();return Reflect.set(r,n,i,r)},has:(e,n)=>Reflect.has(t(),n),getPrototypeOf:()=>Reflect.getPrototypeOf(t())})}var bp=class t{constructor(e,n={}){this.autocompleteProviderWrappers=[];this.isInitialized=!1;this.pendingUserInputs=[];this.activeStatusIndicator=void 0;this.idleStatus=new Zh;this.workingMessage=void 0;this.workingVisible=!0;this.workingIndicatorOptions=void 0;this.defaultWorkingMessage="Working...";this.defaultHiddenThinkingLabel="Thinking...";this.hiddenThinkingLabel=this.defaultHiddenThinkingLabel;this.lastSigintTime=0;this.lastEscapeTime=0;this.changelogMarkdown=void 0;this.startupNoticesShown=!1;this.anthropicSubscriptionWarningShown=!1;this.lastStatusSpacer=void 0;this.lastStatusText=void 0;this.streamingComponent=void 0;this.streamingMessage=void 0;this.pendingTools=new Map;this.toolOutputExpanded=!1;this.hideThinkingBlock=!1;this.outputPad=1;this.mermaidMarkdownTransformer=z_({getMode:()=>this.settingsManager.getMermaidRenderingMode(),theme:x});this.skillCommands=new Map;this.signalCleanupHandlers=[];this.isBashMode=!1;this.bashComponent=void 0;this.pendingBashComponents=[];this.compactionQueuedMessages=[];this.shutdownRequested=!1;this.extensionSelector=void 0;this.extensionInput=void 0;this.extensionEditor=void 0;this.extensionTerminalInputSubscriptions=new Set;this.extensionWidgetsAbove=new Map;this.extensionWidgetsBelow=new Map;this.customFooter=void 0;this.builtInHeader=void 0;this.customHeader=void 0;this.onRightClickPaste=()=>{this.handleRightClickPaste()};this.isShuttingDown=!1;this.runtimeHost=e;let i=n.tuiMode??this.settingsManager.getTuiMode();this.options={...n,tuiMode:i},this.autoTrustOnReloadCwd=n.autoTrustOnReloadCwd,this.runtimeHost.setBeforeSessionInvalidate(()=>{this.resetExtensionUI()}),this.runtimeHost.setRebindSession(async()=>{await this.rebindCurrentSession({renderBeforeBind:!0})}),this.version=Ii,this.renderer=iO({tuiMode:i,showHardwareCursor:this.settingsManager.getShowHardwareCursor(),logDirectory:Ee(),onRightClickPaste:this.onRightClickPaste}),this.ui=hQ(()=>this.renderer),this.ui.setClearOnShrink(this.settingsManager.getClearOnShrink()),this.headerContainer=new K,this.loadedResourcesContainer=new K,this.chatContainer=new K,this.documentContainer=new K,this.documentContainer.addChild(this.headerContainer),this.documentContainer.addChild(this.loadedResourcesContainer),this.documentContainer.addChild(this.chatContainer),this.pendingMessagesContainer=new K,this.statusContainer=new K,this.widgetContainerAbove=new K,this.widgetContainerBelow=new K,this.keybindings=uo.create(),du(this.keybindings);let r=this.settingsManager.getEditorPaddingX(),o=this.settingsManager.getAutocompleteMaxVisible();this.defaultEditor=new go(this.ui,Pu(),this.keybindings,{paddingX:r,autocompleteMaxVisible:o}),this.editor=this.defaultEditor,this.editorContainer=new K,this.editorContainer.addChild(this.editor),this.footerDataProvider=new Fh(this.sessionManager.getCwd()),this.footer=new Xl(this.session,this.footerDataProvider),this.footer.setAutoCompactEnabled(this.session.autoCompactionEnabled),this.footerContainer=new K,this.footerContainer.addChild(this.footer),this.hideThinkingBlock=this.settingsManager.getHideThinkingBlock(),this.outputPad=this.settingsManager.getOutputPad(),Mu(this.session.resourceLoader.getThemes().themes),this.themeController=new eg(this.ui,this.settingsManager,s=>this.showError(s),()=>this.updateEditorBorderColor())}get session(){return this.runtimeHost.session}get agent(){return this.session.agent}get sessionManager(){return this.session.sessionManager}get settingsManager(){return this.session.settingsManager}getAutocompleteSourceTag(e){if(!e)return;let n=e.scope==="user"?"u":e.scope==="project"?"p":"t",i=e.source.trim();if(i==="auto"||i==="local"||i==="cli")return n;if(i.startsWith("npm:"))return`${n}:${i}`;let r=Qu(i);if(r){let o=r.ref?`@${r.ref}`:"";return`${n}:git:${r.host}/${r.path}${o}`}return n}prefixAutocompleteDescription(e,n){let i=this.getAutocompleteSourceTag(n);return i?e?`[${i}] ${e}`:`[${i}]`:e}getBuiltInCommandConflictDiagnostics(e){let n=new Set(Ov.map(i=>i.name));return e.getRegisteredCommands().filter(i=>n.has(i.name)).map(i=>({type:"warning",message:i.invocationName===i.name?`Extension command '/${i.name}' conflicts with built-in interactive command. Skipping in autocomplete.`:`Extension command '/${i.name}' conflicts with built-in interactive command. Available as '/${i.invocationName}'.`,path:i.sourceInfo.path}))}createBaseAutocompleteProvider(){let e=Ov.map(l=>({name:l.name,description:l.description,...l.argumentHint&&{argumentHint:l.argumentHint}})),n=e.find(l=>l.name==="model");n&&(n.getArgumentCompletions=l=>{let c=this.session.scopedModels.length>0?this.session.scopedModels.map(p=>p.model):this.session.modelRuntime.getAvailableSnapshot();if(c.length===0)return null;let u=c.map(p=>({id:p.id,provider:p.provider,name:p.name,label:`${p.provider}/${p.id}`}));return nO(u,l,Yh,p=>({value:p.label,label:p.id,description:p.provider}))});let i=e.find(l=>l.name==="login");i&&(i.getArgumentCompletions=l=>{let c=pQ(this.getLoginProviderOptions());return nO(c,l,dQ,u=>({value:u.id,label:u.id,description:mQ(u)}))});let r=this.session.promptTemplates.map(l=>({name:l.name,description:this.prefixAutocompleteDescription(l.description,l.sourceInfo),...l.argumentHint&&{argumentHint:l.argumentHint}})),o=new Set(e.map(l=>l.name)),s=this.session.extensionRunner.getRegisteredCommands().filter(l=>!o.has(l.name)).map(l=>({name:l.invocationName,description:this.prefixAutocompleteDescription(l.description,l.sourceInfo),getArgumentCompletions:l.getArgumentCompletions}));this.skillCommands.clear();let a=[];if(this.settingsManager.getEnableSkillCommands())for(let l of this.session.resourceLoader.getSkills().skills){let c=`skill:${l.name}`;this.skillCommands.set(c,l.filePath),a.push({name:c,description:this.prefixAutocompleteDescription(l.description,l.sourceInfo)})}return new su([...e,...r,...s,...a],this.sessionManager.getCwd(),this.fdPath)}setupAutocompleteProvider(){let e=this.createBaseAutocompleteProvider(),n=[];for(let i of this.autocompleteProviderWrappers)e=i(e),n.push(...e.triggerCharacters??[]);n.length>0&&(e.triggerCharacters=[...new Set(n)]),this.autocompleteProvider=e,this.defaultEditor.setAutocompleteProvider(e),this.editor!==this.defaultEditor&&this.editor.setAutocompleteProvider?.(e)}showStartupNoticesIfNeeded(){if(!this.startupNoticesShown&&(this.startupNoticesShown=!0,!!this.changelogMarkdown)){if(this.chatContainer.children.length>0&&this.chatContainer.addChild(new W(1)),this.chatContainer.addChild(new V),this.settingsManager.getCollapseChangelog()){let e=this.changelogMarkdown.match(/##\s+\[?(\d+\.\d+\.\d+)\]?/),i=`Updated to v${e?e[1]:this.version}. Use ${x.bold("/changelog")} to view full changelog.`;this.chatContainer.addChild(new E(i,1,0))}else this.chatContainer.addChild(new E(x.bold(x.fg("accent","What's New")),1,0)),this.chatContainer.addChild(new W(1)),this.chatContainer.addChild(new Xe(this.changelogMarkdown.trim(),1,0,this.getMarkdownThemeWithSettings())),this.chatContainer.addChild(new W(1));this.chatContainer.addChild(new V)}}mountInteractiveTui(e,n){for(let i of n)e.addChild(i);if(Im(e)){if(!this.fullscreenLayoutRoot)throw new Error("Fullscreen layout is not initialized");e.setLayoutRoot(this.fullscreenLayoutRoot)}}stopInteractiveTui(e){if(this.renderer.mode==="fullscreen"&&e==="transcript"){for(;this.renderer.hasOverlayEntries;)this.renderer.hideOverlay();this.switchTuiMode("regular",!1,!1),this.renderer.renderNow()}this.ui.stop({preserveScreen:this.renderer.mode==="fullscreen"})}switchTuiMode(e,n=!0,i=!0){let r=this.renderer;if(e===r.mode)return!0;if(r.hasOverlayEntries)return!1;let o=[...r.children],s=r.getFocusedComponent(),a=r.terminal,l=r.getShowHardwareCursor(),c=r.getClearOnShrink(),u=r.onDebug;r instanceof br&&(this.mainScreenRenderState=r.captureRenderState()),r.stop({preserveScreen:!0}),r.setFocus(null),r.clear(),Im(r)&&r.setLayoutRoot(void 0);let p=iO({tuiMode:e,showHardwareCursor:l,logDirectory:Ee(),terminal:a,onRightClickPaste:this.onRightClickPaste});return p.setClearOnShrink(c),p.onDebug=u,p instanceof br&&this.mainScreenRenderState&&p.restoreRenderState(this.mainScreenRenderState),this.renderer=p,this.options.tuiMode=e,this.mountInteractiveTui(p,o),p.invalidate(),p.setFocus(s),i&&(p.start(),this.themeController.rebindTui(),this.rebindExtensionTerminalInputListeners(),n&&this.settingsManager.getShowTerminalProgress()&&(this.session.isStreaming||this.session.isCompacting)&&a.setProgress(!0)),!0}async init(){if(this.isInitialized)return;this.registerSignalHandlers(),this.changelogMarkdown=this.getChangelogForDisplay();let[e]=await Promise.all([bs("fd"),bs("rg")]);if(this.fdPath=e,this.session.scopedModels.length>0&&(this.options.verbose||!this.settingsManager.getQuietStartup())){let i=this.session.scopedModels.map(s=>{let a=s.thinkingLevel?`:${s.thinkingLevel}`:"";return`${s.model.id}${a}`}).join(", "),r=this.keybindings.getKeys("app.model.cycleForward"),o=r.length>0?x.fg("muted",` (${hs(r.join("/"),{capitalize:!0})} to cycle)`):"";console.log(x.fg("dim",`Model scope: ${i}${o}`))}this.renderWidgets(),this.transcriptScrollView=new ts(this.documentContainer,{follow:"end",primary:!0,overscroll:"chain",scrollbar:this.settingsManager.getFullscreenScrollbar(),scrollbarStyle:i=>x.bg("scrollbarThumb",i)});let n=new gl([{component:this.pendingMessagesContainer,shrink:1,minSize:0},{component:this.statusContainer,shrink:1,minSize:0},{component:this.widgetContainerAbove,shrink:1,minSize:0},{component:this.editorContainer,shrink:1,minSize:3},{component:this.widgetContainerBelow,shrink:1,minSize:0},{component:this.footerContainer,shrink:1,minSize:1}]);if(this.fullscreenLayoutRoot=new gl([{component:this.transcriptScrollView,basis:0,grow:1,shrink:1,minSize:1},{component:n,basis:"auto",grow:0,shrink:1,minSize:1}]),this.mountInteractiveTui(this.renderer,[this.documentContainer,this.pendingMessagesContainer,this.statusContainer,this.widgetContainerAbove,this.editorContainer,this.widgetContainerBelow,this.footerContainer]),this.ui.setFocus(this.editor),this.setupKeyHandlers(),this.setupEditorSubmitHandler(),this.ui.start(),this.isInitialized=!0,await this.themeController.applyFromSettings(),this.options.verbose||!this.settingsManager.getQuietStartup()){let i=x.bold(x.fg("accent",Mt))+x.fg("dim",` v${process.env.SLING_VERSION??this.version}`),r=(c,u)=>ce(c,u),o=[r("app.interrupt","to interrupt"),r("app.clear","to clear"),ht(`${_e("app.clear")} twice`,"to exit"),r("app.exit","to exit (empty)"),r("app.suspend","to suspend"),ce("tui.editor.deleteToLineEnd","to delete to end"),r("app.thinking.cycle","to cycle thinking level"),ht(`${_e("app.model.cycleForward")}/${_e("app.model.cycleBackward")}`,"to cycle models"),r("app.model.select","to select model"),r("app.tools.expand","to expand tools"),r("app.thinking.toggle","to expand thinking"),r("app.editor.external","for external editor"),ht("/","for commands"),ht("!","to run bash"),ht("!!","to run bash (no context)"),r("app.message.followUp","to queue follow-up"),r("app.message.dequeue","to edit all queued messages"),r("app.clipboard.pasteImage","to paste image (with text fallback)"),ht("drop files","to attach")].join(`
281
+ Fell back to dark theme.`),i}notifyChanged(){this.ui.invalidate(),this.onChanged()}setAutoSync(e){this.autoSyncEnabled!==e&&(this.autoSyncEnabled=e,this.ui.setTerminalColorSchemeNotifications(e))}bindTerminalColorSchemeListener(){this.terminalColorSchemeUnsubscribe=this.ui.onTerminalColorSchemeChange(e=>this.applyTerminalTheme(e))}applyTerminalTheme(e){if(!this.autoSyncEnabled)return;this.terminalTheme=e;let n=io(this.settingsManager.getThemeSetting());if(!n){this.setAutoSync(!1);return}let i=e==="light"?n.lightTheme:n.darkTheme;i!==this.activeThemeName&&this.applyThemeName(i)}};function gp(t){return typeof t=="object"&&t!==null&&"setExpanded"in t&&typeof t.setExpanded=="function"}var tg=class extends E{constructor(e,n,i=!1,r=0,o=0){super(i?n():e(),r,o),this.getCollapsedText=e,this.getExpandedText=n}setExpanded(e){this.setText(e?this.getExpandedText():this.getCollapsedText())}};function iQ(t){return"type"in t&&t.type==="custom"}var rQ=new Set(["EIO","EPIPE","ENOTCONN"]);function oQ(t){if(!t||typeof t!="object"||!("code"in t))return!1;let e=t.code;return e!==void 0&&rQ.has(e)}var eO="Anthropic subscription auth is active. Third-party harness usage draws from extra usage and is billed per token, not your Claude plan limits. Manage extra usage at https://claude.ai/settings/usage. Disable this warning in /settings.";function sQ(t){return typeof t=="string"&&t.startsWith("sk-ant-oat")}function aQ(t){return!!t&&t.provider==="unknown"&&t.id==="unknown"&&t.api==="unknown"}function lQ(t){return t.length>0&&!/[^a-zA-Z0-9_\-./~:@]/.test(t)?t:`'${t.replace(/'/g,"'\\''")}'`}function cQ(t){if(!process.stdout.isTTY||!t.isPersisted())return;let e=t.getSessionFile();if(!e||!Tr.existsSync(e))return;let n=[Mt];return t.usesDefaultSessionDir()||n.push("--session-dir",lQ(t.getSessionDir())),n.push("--session",t.getSessionId()),n.join(" ")}function uQ(t){return t in rv}var tO={oauth:0,api_key:1};function nO(t,e,n,i){let r=Bt(t,e,n);return r.length===0?null:r.map(i)}function pQ(t){let e=new Map;for(let n of t){let i=e.get(n.id);if(i){i.authTypes.includes(n.authType)||(i.authTypes.push(n.authType),i.authTypes.sort((r,o)=>tO[r]-tO[o]));continue}e.set(n.id,{id:n.id,name:n.name,authTypes:[n.authType]})}return Array.from(e.values()).sort((n,i)=>n.name.localeCompare(i.name))}function dQ(t){let e=t.authTypes.map(n=>`${n} ${Xh(n)}`).join(" ");return`${t.id} ${t.name} ${e}`}function mQ(t){let e=t.authTypes.map(Xh).join("/");return t.name===t.id?e:`${t.name} \xB7 ${e}`}function iO(t){let e=t.terminal??new is;return t.tuiMode==="fullscreen"?new fl(e,t.showHardwareCursor,t.logDirectory,{openUrl:Hh,onRightClickPaste:t.onRightClickPaste}):new br(e,t.showHardwareCursor,t.logDirectory)}function hQ(t){return new Proxy({},{get:(e,n)=>{let i=t(),r=Reflect.get(i,n,i);if(typeof r!="function")return r;let o=i,s=r;return(...a)=>{let l=t();if(l!==o){let c=Reflect.get(l,n,l);if(typeof c!="function")throw new TypeError(`TUI property ${String(n)} is not callable`);o=l,s=c}return Reflect.apply(s,o,a)}},set:(e,n,i)=>{let r=t();return Reflect.set(r,n,i,r)},has:(e,n)=>Reflect.has(t(),n),getPrototypeOf:()=>Reflect.getPrototypeOf(t())})}var bp=class t{constructor(e,n={}){this.autocompleteProviderWrappers=[];this.isInitialized=!1;this.pendingUserInputs=[];this.activeStatusIndicator=void 0;this.idleStatus=new Zh;this.workingMessage=void 0;this.workingVisible=!0;this.workingIndicatorOptions=void 0;this.defaultWorkingMessage="Working...";this.defaultHiddenThinkingLabel="Thinking...";this.hiddenThinkingLabel=this.defaultHiddenThinkingLabel;this.lastSigintTime=0;this.lastEscapeTime=0;this.changelogMarkdown=void 0;this.startupNoticesShown=!1;this.anthropicSubscriptionWarningShown=!1;this.lastStatusSpacer=void 0;this.lastStatusText=void 0;this.streamingComponent=void 0;this.streamingMessage=void 0;this.pendingTools=new Map;this.toolOutputExpanded=!1;this.hideThinkingBlock=!1;this.outputPad=1;this.mermaidMarkdownTransformer=z_({getMode:()=>this.settingsManager.getMermaidRenderingMode(),theme:x});this.skillCommands=new Map;this.signalCleanupHandlers=[];this.isBashMode=!1;this.bashComponent=void 0;this.pendingBashComponents=[];this.compactionQueuedMessages=[];this.shutdownRequested=!1;this.extensionSelector=void 0;this.extensionInput=void 0;this.extensionEditor=void 0;this.extensionTerminalInputSubscriptions=new Set;this.extensionWidgetsAbove=new Map;this.extensionWidgetsBelow=new Map;this.customFooter=void 0;this.builtInHeader=void 0;this.customHeader=void 0;this.onRightClickPaste=()=>{this.handleRightClickPaste()};this.isShuttingDown=!1;this.runtimeHost=e;let i=n.tuiMode??this.settingsManager.getTuiMode();this.options={...n,tuiMode:i},this.autoTrustOnReloadCwd=n.autoTrustOnReloadCwd,this.runtimeHost.setBeforeSessionInvalidate(()=>{this.resetExtensionUI()}),this.runtimeHost.setRebindSession(async()=>{await this.rebindCurrentSession({renderBeforeBind:!0})}),this.version=Ii,this.renderer=iO({tuiMode:i,showHardwareCursor:this.settingsManager.getShowHardwareCursor(),logDirectory:Ee(),onRightClickPaste:this.onRightClickPaste}),this.ui=hQ(()=>this.renderer),this.ui.setClearOnShrink(this.settingsManager.getClearOnShrink()),this.headerContainer=new K,this.loadedResourcesContainer=new K,this.chatContainer=new K,this.documentContainer=new K,this.documentContainer.addChild(this.headerContainer),this.documentContainer.addChild(this.loadedResourcesContainer),this.documentContainer.addChild(this.chatContainer),this.pendingMessagesContainer=new K,this.statusContainer=new K,this.widgetContainerAbove=new K,this.widgetContainerBelow=new K,this.keybindings=uo.create(),du(this.keybindings);let r=this.settingsManager.getEditorPaddingX(),o=this.settingsManager.getAutocompleteMaxVisible();this.defaultEditor=new go(this.ui,Pu(),this.keybindings,{paddingX:r,autocompleteMaxVisible:o}),this.editor=this.defaultEditor,this.editorContainer=new K,this.editorContainer.addChild(this.editor),this.footerDataProvider=new Fh(this.sessionManager.getCwd()),this.footer=new Xl(this.session,this.footerDataProvider),this.footer.setAutoCompactEnabled(this.session.autoCompactionEnabled),this.footerContainer=new K,this.footerContainer.addChild(this.footer),this.hideThinkingBlock=this.settingsManager.getHideThinkingBlock(),this.outputPad=this.settingsManager.getOutputPad(),Mu(this.session.resourceLoader.getThemes().themes),this.themeController=new eg(this.ui,this.settingsManager,s=>this.showError(s),()=>this.updateEditorBorderColor())}get session(){return this.runtimeHost.session}get agent(){return this.session.agent}get sessionManager(){return this.session.sessionManager}get settingsManager(){return this.session.settingsManager}getAutocompleteSourceTag(e){if(!e)return;let n=e.scope==="user"?"u":e.scope==="project"?"p":"t",i=e.source.trim();if(i==="auto"||i==="local"||i==="cli")return n;if(i.startsWith("npm:"))return`${n}:${i}`;let r=Qu(i);if(r){let o=r.ref?`@${r.ref}`:"";return`${n}:git:${r.host}/${r.path}${o}`}return n}prefixAutocompleteDescription(e,n){let i=this.getAutocompleteSourceTag(n);return i?e?`[${i}] ${e}`:`[${i}]`:e}getBuiltInCommandConflictDiagnostics(e){let n=new Set(Ov.map(i=>i.name));return e.getRegisteredCommands().filter(i=>n.has(i.name)).map(i=>({type:"warning",message:i.invocationName===i.name?`Extension command '/${i.name}' conflicts with built-in interactive command. Skipping in autocomplete.`:`Extension command '/${i.name}' conflicts with built-in interactive command. Available as '/${i.invocationName}'.`,path:i.sourceInfo.path}))}createBaseAutocompleteProvider(){let e=Ov.map(l=>({name:l.name,description:l.description,...l.argumentHint&&{argumentHint:l.argumentHint}})),n=e.find(l=>l.name==="model");n&&(n.getArgumentCompletions=l=>{let c=this.session.scopedModels.length>0?this.session.scopedModels.map(p=>p.model):this.session.modelRuntime.getAvailableSnapshot();if(c.length===0)return null;let u=c.map(p=>({id:p.id,provider:p.provider,name:p.name,label:`${p.provider}/${p.id}`}));return nO(u,l,Yh,p=>({value:p.label,label:p.id,description:p.provider}))});let i=e.find(l=>l.name==="login");i&&(i.getArgumentCompletions=l=>{let c=pQ(this.getLoginProviderOptions().filter(u=>u.id==="slingshot"));return nO(c,l,dQ,u=>({value:u.id,label:u.id,description:mQ(u)}))});let r=this.session.promptTemplates.map(l=>({name:l.name,description:this.prefixAutocompleteDescription(l.description,l.sourceInfo),...l.argumentHint&&{argumentHint:l.argumentHint}})),o=new Set(e.map(l=>l.name)),s=this.session.extensionRunner.getRegisteredCommands().filter(l=>!o.has(l.name)).map(l=>({name:l.invocationName,description:this.prefixAutocompleteDescription(l.description,l.sourceInfo),getArgumentCompletions:l.getArgumentCompletions}));this.skillCommands.clear();let a=[];if(this.settingsManager.getEnableSkillCommands())for(let l of this.session.resourceLoader.getSkills().skills){let c=`skill:${l.name}`;this.skillCommands.set(c,l.filePath),a.push({name:c,description:this.prefixAutocompleteDescription(l.description,l.sourceInfo)})}return new su([...e,...r,...s,...a],this.sessionManager.getCwd(),this.fdPath)}setupAutocompleteProvider(){let e=this.createBaseAutocompleteProvider(),n=[];for(let i of this.autocompleteProviderWrappers)e=i(e),n.push(...e.triggerCharacters??[]);n.length>0&&(e.triggerCharacters=[...new Set(n)]),this.autocompleteProvider=e,this.defaultEditor.setAutocompleteProvider(e),this.editor!==this.defaultEditor&&this.editor.setAutocompleteProvider?.(e)}showStartupNoticesIfNeeded(){if(!this.startupNoticesShown&&(this.startupNoticesShown=!0,!!this.changelogMarkdown)){if(this.chatContainer.children.length>0&&this.chatContainer.addChild(new W(1)),this.chatContainer.addChild(new V),this.settingsManager.getCollapseChangelog()){let e=this.changelogMarkdown.match(/##\s+\[?(\d+\.\d+\.\d+)\]?/),i=`Updated to v${e?e[1]:this.version}. Use ${x.bold("/changelog")} to view full changelog.`;this.chatContainer.addChild(new E(i,1,0))}else this.chatContainer.addChild(new E(x.bold(x.fg("accent","What's New")),1,0)),this.chatContainer.addChild(new W(1)),this.chatContainer.addChild(new Xe(this.changelogMarkdown.trim(),1,0,this.getMarkdownThemeWithSettings())),this.chatContainer.addChild(new W(1));this.chatContainer.addChild(new V)}}mountInteractiveTui(e,n){for(let i of n)e.addChild(i);if(Im(e)){if(!this.fullscreenLayoutRoot)throw new Error("Fullscreen layout is not initialized");e.setLayoutRoot(this.fullscreenLayoutRoot)}}stopInteractiveTui(e){if(this.renderer.mode==="fullscreen"&&e==="transcript"){for(;this.renderer.hasOverlayEntries;)this.renderer.hideOverlay();this.switchTuiMode("regular",!1,!1),this.renderer.renderNow()}this.ui.stop({preserveScreen:this.renderer.mode==="fullscreen"})}switchTuiMode(e,n=!0,i=!0){let r=this.renderer;if(e===r.mode)return!0;if(r.hasOverlayEntries)return!1;let o=[...r.children],s=r.getFocusedComponent(),a=r.terminal,l=r.getShowHardwareCursor(),c=r.getClearOnShrink(),u=r.onDebug;r instanceof br&&(this.mainScreenRenderState=r.captureRenderState()),r.stop({preserveScreen:!0}),r.setFocus(null),r.clear(),Im(r)&&r.setLayoutRoot(void 0);let p=iO({tuiMode:e,showHardwareCursor:l,logDirectory:Ee(),terminal:a,onRightClickPaste:this.onRightClickPaste});return p.setClearOnShrink(c),p.onDebug=u,p instanceof br&&this.mainScreenRenderState&&p.restoreRenderState(this.mainScreenRenderState),this.renderer=p,this.options.tuiMode=e,this.mountInteractiveTui(p,o),p.invalidate(),p.setFocus(s),i&&(p.start(),this.themeController.rebindTui(),this.rebindExtensionTerminalInputListeners(),n&&this.settingsManager.getShowTerminalProgress()&&(this.session.isStreaming||this.session.isCompacting)&&a.setProgress(!0)),!0}async init(){if(this.isInitialized)return;this.registerSignalHandlers(),this.changelogMarkdown=this.getChangelogForDisplay();let[e]=await Promise.all([bs("fd"),bs("rg")]);if(this.fdPath=e,this.session.scopedModels.length>0&&(this.options.verbose||!this.settingsManager.getQuietStartup())){let i=this.session.scopedModels.map(s=>{let a=s.thinkingLevel?`:${s.thinkingLevel}`:"";return`${s.model.id}${a}`}).join(", "),r=this.keybindings.getKeys("app.model.cycleForward"),o=r.length>0?x.fg("muted",` (${hs(r.join("/"),{capitalize:!0})} to cycle)`):"";console.log(x.fg("dim",`Model scope: ${i}${o}`))}this.renderWidgets(),this.transcriptScrollView=new ts(this.documentContainer,{follow:"end",primary:!0,overscroll:"chain",scrollbar:this.settingsManager.getFullscreenScrollbar(),scrollbarStyle:i=>x.bg("scrollbarThumb",i)});let n=new gl([{component:this.pendingMessagesContainer,shrink:1,minSize:0},{component:this.statusContainer,shrink:1,minSize:0},{component:this.widgetContainerAbove,shrink:1,minSize:0},{component:this.editorContainer,shrink:1,minSize:3},{component:this.widgetContainerBelow,shrink:1,minSize:0},{component:this.footerContainer,shrink:1,minSize:1}]);if(this.fullscreenLayoutRoot=new gl([{component:this.transcriptScrollView,basis:0,grow:1,shrink:1,minSize:1},{component:n,basis:"auto",grow:0,shrink:1,minSize:1}]),this.mountInteractiveTui(this.renderer,[this.documentContainer,this.pendingMessagesContainer,this.statusContainer,this.widgetContainerAbove,this.editorContainer,this.widgetContainerBelow,this.footerContainer]),this.ui.setFocus(this.editor),this.setupKeyHandlers(),this.setupEditorSubmitHandler(),this.ui.start(),this.isInitialized=!0,await this.themeController.applyFromSettings(),this.options.verbose||!this.settingsManager.getQuietStartup()){let i=x.bold(x.fg("accent",Mt))+x.fg("dim",` v${process.env.SLING_VERSION??this.version}`),r=(c,u)=>ce(c,u),o=[r("app.interrupt","to interrupt"),r("app.clear","to clear"),ht(`${_e("app.clear")} twice`,"to exit"),r("app.exit","to exit (empty)"),r("app.suspend","to suspend"),ce("tui.editor.deleteToLineEnd","to delete to end"),r("app.thinking.cycle","to cycle thinking level"),ht(`${_e("app.model.cycleForward")}/${_e("app.model.cycleBackward")}`,"to cycle models"),r("app.model.select","to select model"),r("app.tools.expand","to expand tools"),r("app.thinking.toggle","to expand thinking"),r("app.editor.external","for external editor"),ht("/","for commands"),ht("!","to run bash"),ht("!!","to run bash (no context)"),r("app.message.followUp","to queue follow-up"),r("app.message.dequeue","to edit all queued messages"),r("app.clipboard.pasteImage","to paste image (with text fallback)"),ht("drop files","to attach")].join(`
282
282
  `),s=[r("app.interrupt","interrupt"),ht(`${_e("app.clear")}/${_e("app.exit")}`,"clear/exit"),ht("/","commands"),ht("!","bash"),r("app.tools.expand","more")].join(x.fg("muted"," \xB7 ")),a=x.fg("dim",`Press ${_e("app.tools.expand")} to show full startup help and loaded resources.`),l=x.fg("dim","Sling can explain its own features and look up its docs. Ask it how to use or extend Sling.");this.builtInHeader=new tg(()=>`${i}
283
283
  ${s}
284
284
  ${a}
@@ -310,7 +310,7 @@ ${r}`,1,0)),this.chatContainer.addChild(new V(o=>x.fg("warning",o))),this.ui.req
310
310
 
311
311
  `),s=e?.currentText??this.editor.getText(),a=[o,s].filter(l=>l.trim()).join(`
312
312
 
313
- `);return this.editor.setText(a),this.updatePendingMessagesDisplay(),e?.abort&&this.agent.abort(),r.length}queueCompactionMessage(e,n){this.compactionQueuedMessages.push({text:e,mode:n}),this.editor.addToHistory?.(e),this.editor.setText(""),this.updatePendingMessagesDisplay(),this.showStatus("Queued message for after compaction")}isExtensionCommand(e){if(!e.startsWith("/"))return!1;let n=this.session.extensionRunner,i=e.indexOf(" "),r=i===-1?e.slice(1):e.slice(1,i);return!!n.getCommand(r)}async flushCompactionQueue(e){if(this.compactionQueuedMessages.length===0)return;let n=[...this.compactionQueuedMessages];this.compactionQueuedMessages=[],this.updatePendingMessagesDisplay();let i=r=>{this.session.clearQueue(),this.compactionQueuedMessages=n,this.updatePendingMessagesDisplay(),this.showError(`Failed to send queued message${n.length>1?"s":""}: ${r instanceof Error?r.message:String(r)}`)};try{if(e?.willRetry){for(let c of n)this.isExtensionCommand(c.text)?await this.session.prompt(c.text):c.mode==="followUp"?await this.session.followUp(c.text):await this.session.steer(c.text);this.updatePendingMessagesDisplay();return}let r=n.findIndex(c=>!this.isExtensionCommand(c.text));if(r===-1){for(let c of n)await this.session.prompt(c.text);return}let o=n.slice(0,r),s=n[r],a=n.slice(r+1);for(let c of o)await this.session.prompt(c.text);let l=this.session.prompt(s.text,{streamingBehavior:s.mode}).catch(c=>{i(c)});for(let c of a)this.isExtensionCommand(c.text)?await this.session.prompt(c.text):c.mode==="followUp"?await this.session.followUp(c.text):await this.session.steer(c.text);this.updatePendingMessagesDisplay()}catch(r){i(r)}}flushPendingBashComponents(){for(let e of this.pendingBashComponents)this.pendingMessagesContainer.removeChild(e),this.chatContainer.addChild(e);this.pendingBashComponents=[]}disposeActiveSelector(){let e=this.activeSelectorDispose;this.activeSelectorToken=void 0,this.activeSelectorDispose=void 0,e?.()}showSelector(e){let n={},i,o=e(()=>{i?.(),this.activeSelectorToken===n&&(this.activeSelectorToken=void 0,this.activeSelectorDispose=void 0,this.editorContainer.clear(),this.editorContainer.addChild(this.editor),this.ui.setFocus(this.editor))});i=o.dispose,this.disposeActiveSelector(),this.activeSelectorToken=n,this.activeSelectorDispose=i,this.editorContainer.clear(),this.editorContainer.addChild(o.component),this.ui.setFocus(o.focus),this.ui.requestRender()}showSettingsSelector(){this.showSelector(e=>{let n;return n=new ec({autoCompact:this.session.autoCompactionEnabled,showImages:this.settingsManager.getShowImages(),imageWidthCells:this.settingsManager.getImageWidthCells(),autoResizeImages:this.settingsManager.getImageAutoResize(),blockImages:this.settingsManager.getBlockImages(),enableSkillCommands:this.settingsManager.getEnableSkillCommands(),steeringMode:this.session.steeringMode,followUpMode:this.session.followUpMode,transport:this.settingsManager.getTransport(),httpIdleTimeoutMs:this.settingsManager.getHttpIdleTimeoutMs(),thinkingLevel:this.session.thinkingLevel,availableThinkingLevels:this.session.getAvailableThinkingLevels(),currentTheme:this.settingsManager.getThemeSetting()||"dark",terminalTheme:this.themeController.getTerminalTheme(),availableThemes:ax(),hideThinkingBlock:this.hideThinkingBlock,mermaidRenderingMode:this.settingsManager.getMermaidRenderingMode(),collapseChangelog:this.settingsManager.getCollapseChangelog(),enableInstallTelemetry:this.settingsManager.getEnableInstallTelemetry(),doubleEscapeAction:this.settingsManager.getDoubleEscapeAction(),treeFilterMode:this.settingsManager.getTreeFilterMode(),showHardwareCursor:this.settingsManager.getShowHardwareCursor(),showCacheMissNotices:this.settingsManager.getShowCacheMissNotices(),defaultProjectTrust:this.settingsManager.getDefaultProjectTrust(),editorPaddingX:this.settingsManager.getEditorPaddingX(),outputPad:this.settingsManager.getOutputPad(),autocompleteMaxVisible:this.settingsManager.getAutocompleteMaxVisible(),quietStartup:this.settingsManager.getQuietStartup(),clearOnShrink:this.settingsManager.getClearOnShrink(),showTerminalProgress:this.settingsManager.getShowTerminalProgress(),tuiMode:this.ui.mode,fullscreenExitOutput:this.settingsManager.getFullscreenExitOutput(),fullscreenScrollbar:this.settingsManager.getFullscreenScrollbar(),warnings:this.settingsManager.getWarnings()},{onAutoCompactChange:i=>{this.session.setAutoCompactionEnabled(i),this.footer.setAutoCompactEnabled(i)},onShowImagesChange:i=>{this.settingsManager.setShowImages(i);for(let r of this.chatContainer.children)r instanceof qi&&r.setShowImages(i)},onImageWidthCellsChange:i=>{this.settingsManager.setImageWidthCells(i);for(let r of this.chatContainer.children)r instanceof qi&&r.setImageWidthCells(i)},onAutoResizeImagesChange:i=>{this.settingsManager.setImageAutoResize(i)},onBlockImagesChange:i=>{this.settingsManager.setBlockImages(i)},onEnableSkillCommandsChange:i=>{this.settingsManager.setEnableSkillCommands(i),this.setupAutocompleteProvider()},onSteeringModeChange:i=>{this.session.setSteeringMode(i)},onFollowUpModeChange:i=>{this.session.setFollowUpMode(i)},onTransportChange:i=>{this.settingsManager.setTransport(i),this.session.agent.transport=i},onHttpIdleTimeoutMsChange:i=>{this.settingsManager.setHttpIdleTimeoutMs(i),Nh(i),this.showStatus(`HTTP idle timeout: ${$h(i)}`)},onThinkingLevelChange:i=>{this.session.setThinkingLevel(i),this.footer.invalidate(),this.updateEditorBorderColor()},onThemeChange:i=>{this.settingsManager.setTheme(i),this.themeController.applyFromSettings()},onThemePreview:i=>this.themeController.preview(i),onHideThinkingBlockChange:i=>{this.hideThinkingBlock=i,this.settingsManager.setHideThinkingBlock(i);for(let r of this.chatContainer.children)r instanceof ji&&r.setHideThinkingBlock(i);this.chatContainer.clear(),this.rebuildChatFromMessages()},onMermaidRenderingModeChange:i=>{this.settingsManager.setMermaidRenderingMode(i),this.chatContainer.invalidate(),this.ui.requestRender()},onShowCacheMissNoticesChange:i=>{this.settingsManager.setShowCacheMissNotices(i),this.rebuildChatFromMessages()},onCollapseChangelogChange:i=>{this.settingsManager.setCollapseChangelog(i)},onEnableInstallTelemetryChange:i=>{this.settingsManager.setEnableInstallTelemetry(i)},onQuietStartupChange:i=>{this.settingsManager.setQuietStartup(i)},onDefaultProjectTrustChange:i=>{this.settingsManager.setDefaultProjectTrust(i)},onDoubleEscapeActionChange:i=>{this.settingsManager.setDoubleEscapeAction(i)},onTreeFilterModeChange:i=>{this.settingsManager.setTreeFilterMode(i)},onShowHardwareCursorChange:i=>{this.settingsManager.setShowHardwareCursor(i),this.ui.setShowHardwareCursor(i)},onEditorPaddingXChange:i=>{this.settingsManager.setEditorPaddingX(i),this.defaultEditor.setPaddingX(i),this.editor!==this.defaultEditor&&this.editor.setPaddingX!==void 0&&this.editor.setPaddingX(i)},onOutputPadChange:i=>{if(this.settingsManager.setOutputPad(i),this.outputPad=i,this.streamingComponent||this.session.isStreaming){for(let r of this.chatContainer.children)(r instanceof ji||r instanceof Rs||r instanceof bo)&&r.setOutputPad(i);this.streamingComponent&&this.streamingComponent.setOutputPad(i),this.ui.requestRender();return}this.rebuildChatFromMessages()},onAutocompleteMaxVisibleChange:i=>{this.settingsManager.setAutocompleteMaxVisible(i),this.defaultEditor.setAutocompleteMaxVisible(i),this.editor!==this.defaultEditor&&this.editor.setAutocompleteMaxVisible!==void 0&&this.editor.setAutocompleteMaxVisible(i)},onClearOnShrinkChange:i=>{this.settingsManager.setClearOnShrink(i),this.ui.setClearOnShrink(i),!i&&!this.activeStatusIndicator&&this.statusContainer.clear()},onShowTerminalProgressChange:i=>{this.settingsManager.setShowTerminalProgress(i)},onTuiModeChange:i=>{if(!this.switchTuiMode(i)){n?.getSettingsList().updateValue("tui-mode",this.ui.mode),this.showStatus("Close active overlays before changing TUI mode");return}this.settingsManager.setTuiMode(i),this.activeStatusIndicator||this.statusContainer.clear(),this.showStatus(`TUI mode: ${i}`)},onFullscreenExitOutputChange:i=>{this.settingsManager.setFullscreenExitOutput(i)},onFullscreenScrollbarChange:i=>{this.settingsManager.setFullscreenScrollbar(i),this.applyFullscreenScrollbarSetting()},onWarningsChange:i=>{this.settingsManager.setWarnings(i)},onCancel:()=>{e(),this.ui.requestRender()}}),{component:n,focus:n.getSettingsList()}})}async handleModelCommand(e){if(!e){this.showModelSelector();return}let n=await this.findExactModelMatch(e);if(n){try{await this.session.setModel(n),this.footer.invalidate(),this.updateEditorBorderColor(),this.showStatus(`Model: ${n.id}`),this.maybeWarnAboutAnthropicSubscriptionAuth(n),this.checkDaxnutsEasterEgg(n)}catch(i){this.showError(i instanceof Error?i.message:String(i))}return}this.showModelSelector(e)}async findExactModelMatch(e){let n=this.session.scopedModels.length>0?this.session.scopedModels.map(a=>a.model):[...this.session.modelRuntime.getAvailableSnapshot()],i=zu(e,n);if(i||this.session.scopedModels.length>0)return i;this.showStatus("Refreshing model catalogs\u2026");let r=new AbortController,o=!1,s=setTimeout(()=>{o=!0,r.abort()},15e3);try{let a=await this.session.modelRuntime.refresh({signal:r.signal});a.aborted&&o?this.showWarning("Model refresh timed out; searching cached models."):a.errors.size>0&&this.showWarning(`Could not refresh ${[...a.errors.keys()].join(", ")}; searching cached models.`)}catch(a){this.showWarning(o?"Model refresh timed out; searching cached models.":`Could not refresh model catalogs: ${a instanceof Error?a.message:String(a)}`)}finally{clearTimeout(s)}return zu(e,[...this.session.modelRuntime.getAvailableSnapshot()])}updateAvailableProviderCount(){let e=this.session.scopedModels.length>0?this.session.scopedModels.map(i=>i.model):this.session.modelRuntime.getAvailableSnapshot(),n=new Set(e.map(i=>i.provider));this.footerDataProvider.setAvailableProviderCount(n.size)}async maybeWarnAboutAnthropicSubscriptionAuth(e=this.session.model){if(this.settingsManager.getWarnings().anthropicExtraUsage!==!1&&!this.anthropicSubscriptionWarningShown&&!(!e||e.provider!=="anthropic"))try{if((await this.session.modelRuntime.checkAuth("anthropic"))?.type==="oauth"){this.anthropicSubscriptionWarningShown=!0,this.showWarning(eO);return}let n=(await this.session.modelRuntime.getAuth(e.provider))?.auth.apiKey;if(!sQ(n))return;this.anthropicSubscriptionWarningShown=!0,this.showWarning(eO)}catch{}}maybeSaveImplicitProjectTrustAfterReload(){let e=this.sessionManager.getCwd();if(this.autoTrustOnReloadCwd!==e||!this.settingsManager.isProjectTrusted()||!Ts(e))return!1;let n=new co(this.runtimeHost.services.agentDir);try{return n.get(e)!==null?(this.autoTrustOnReloadCwd=void 0,!1):(n.set(e,!0),this.autoTrustOnReloadCwd=void 0,!0)}catch(i){return this.showWarning(`Could not save project trust after reload: ${i instanceof Error?i.message:String(i)}`),!1}}showTrustSelector(){let e=this.sessionManager.getCwd(),n=new co(this.runtimeHost.services.agentDir),i=n.getEntry(e);this.showSelector(r=>{let o=new hp({cwd:e,savedDecision:i,projectTrusted:this.settingsManager.isProjectTrusted(),onSelect:s=>{n.setMany(s.updates),r(),this.showStatus(`Saved trust decision: ${s.trusted?"trusted":"untrusted"}. Restart sling for this to take effect.`)},onCancel:()=>{r(),this.ui.requestRender()}});return{component:o,focus:o}})}showModelSelector(e){this.showSelector(n=>{let i=new Zl(this.ui,this.session.model,this.settingsManager,this.session.modelRuntime,this.session.scopedModels,async r=>{try{await this.session.setModel(r),this.footer.invalidate(),this.updateEditorBorderColor(),n(),this.showStatus(`Model: ${r.id}`),this.maybeWarnAboutAnthropicSubscriptionAuth(r),this.checkDaxnutsEasterEgg(r)}catch(o){n(),this.showError(o instanceof Error?o.message:String(o))}},()=>{n(),this.ui.requestRender()},e);return{component:i,focus:i,dispose:()=>i.dispose()}})}showModelsSelector(){let e=[...this.session.modelRuntime.getAvailableSnapshot()],n=new Set(e.map(c=>`${c.provider}/${c.id}`)),i=this.settingsManager.getEnabledModels(),r=this.session.scopedModels,o=c=>{if(!i?.length)return null;let u=ov(i,c),p=u.scopedModels.map(d=>`${d.model.provider}/${d.model.id}`);for(let d of u.diagnostics)d.code==="no-match"&&!p.includes(d.pattern)&&p.push(d.pattern);return p},s=r.length>0?r.map(c=>`${c.model.provider}/${c.model.id}`):o(e),a=!1,l=c=>{s=c===null?null:[...c];let u=c?.some(d=>n.has(d))??!1,p=c!==null&&[...n].every(d=>c.includes(d));if(c&&u&&!p){let d=ov(c,e).scopedModels;this.session.setScopedModels(d.map(m=>({model:m.model,thinkingLevel:m.thinkingLevel})))}else this.session.setScopedModels([]);this.updateAvailableProviderCount(),this.ui.requestRender()};this.showSelector(c=>{let u=!1,p=!1,d=new AbortController,m=setTimeout(()=>{p=!0,d.abort()},15e3),g=new lp({allModels:e,enabledModelIds:s,refreshStatus:"Refreshing model catalogs\u2026"},{onChange:h=>{a=!0,l(h)},onPersist:h=>{let f=h!==null&&h.length===e.length&&h.every(v=>n.has(v)),b=h===null||f?void 0:h;this.settingsManager.setEnabledModels(b?[...b]:void 0),this.showStatus("Model selection saved to settings")},onCancel:()=>{c(),this.ui.requestRender()}});return this.session.modelRuntime.refresh({signal:d.signal}).then(h=>{u||(e=[...this.session.modelRuntime.getAvailableSnapshot()],n=new Set(e.map(f=>`${f.provider}/${f.id}`)),!a&&r.length===0?(s=o(e),g.updateModels(e,s)):g.updateModels(e),s!==null&&l(s),h.aborted&&p?g.setRefreshStatus("Model refresh timed out; showing cached models.","warning"):h.errors.size>0?g.setRefreshStatus(`Could not refresh ${[...h.errors.keys()].join(", ")}; showing cached models.`,"warning"):g.setRefreshStatus("Model catalogs refreshed.","success"),this.ui.requestRender())}).catch(h=>{u||(g.setRefreshStatus(p?"Model refresh timed out; showing cached models.":`Could not refresh model catalogs: ${h instanceof Error?h.message:String(h)}`,"warning"),this.ui.requestRender())}).finally(()=>clearTimeout(m)),{component:g,focus:g,dispose:()=>{u=!0,clearTimeout(m),d.abort()}}})}showUserMessageSelector(){let e=this.session.getUserMessagesForForking();if(e.length===0){this.showStatus("No messages to fork from");return}let n=e[e.length-1]?.entryId;this.showSelector(i=>{let r=new rc(e.map(o=>({id:o.entryId,text:o.text})),async o=>{i();try{let s=await this.runtimeHost.fork(o);if(s.cancelled){this.ui.requestRender();return}this.editor.setText(s.selectedText??""),this.showStatus("Forked to new session")}catch(s){this.showError(s instanceof Error?s.message:String(s))}},()=>{i(),this.ui.requestRender()},n);return{component:r,focus:r.getMessageList()}})}async handleCloneCommand(){let e=this.sessionManager.getLeafId();if(!e){this.showStatus("Nothing to clone yet");return}try{if((await this.runtimeHost.fork(e,{position:"at"})).cancelled){this.ui.requestRender();return}this.editor.setText(""),this.showStatus("Cloned to new session")}catch(n){this.showError(n instanceof Error?n.message:String(n))}}showTreeSelector(e){let n=this.sessionManager.getTree(),i=this.sessionManager.getLeafId(),r=this.settingsManager.getTreeFilterMode();if(n.length===0){this.showStatus("No entries in session");return}this.showSelector(o=>{let s=new ic(n,i,this.ui.terminal.rows,async a=>{if(a===this.sessionManager.getLeafId()){o(),this.showStatus("Already at this point");return}o();let l=!1,c;if(!this.settingsManager.getBranchSummarySkipPrompt())for(;;){let d=await this.showExtensionSelector("Summarize branch?",["No summary","Summarize","Summarize with custom prompt"]);if(d===void 0){this.showTreeSelector(a);return}if(l=d!=="No summary",!(d==="Summarize with custom prompt"&&(c=await this.showExtensionEditor("Custom summarization instructions"),c===void 0)))break}this.session.isStreaming&&(this.restoreQueuedMessagesToEditor(),await this.session.abort());let u=!1,p=this.defaultEditor.onEscape;l&&(this.defaultEditor.onEscape=()=>{this.session.abortBranchSummary()},this.chatContainer.addChild(new W(1)),this.showStatusIndicator(new mp(this.ui)),u=!0,this.ui.requestRender());try{let d=await this.session.navigateTree(a,{summarize:l,customInstructions:c});if(d.aborted){this.showStatus("Branch summarization cancelled"),this.showTreeSelector(a);return}if(d.cancelled){this.showStatus("Navigation cancelled");return}this.chatContainer.clear(),this.renderInitialMessages(),d.editorText&&!this.editor.getText().trim()&&this.editor.setText(d.editorText),this.showStatus("Navigated to selected point"),this.flushCompactionQueue({willRetry:!1})}catch(d){this.showError(d instanceof Error?d.message:String(d))}finally{u&&this.clearStatusIndicator("branchSummary"),this.defaultEditor.onEscape=p}},()=>{o(),this.ui.requestRender()},(a,l)=>{this.sessionManager.appendLabelChange(a,l),this.ui.requestRender()},e,r);return s.onCopy=async a=>{if(!a){this.showError("Selected entry has no text to copy");return}try{await zl(a),this.showStatus("Copied selected message to clipboard")}catch(l){this.showError(l instanceof Error?l.message:String(l))}},{component:s,focus:s}})}showSessionSelector(){this.showSelector(e=>{let n=new Cs(i=>Xn.list(this.sessionManager.getCwd(),this.sessionManager.getSessionDir(),i),i=>this.sessionManager.usesDefaultSessionDir()?Xn.listAll(i):Xn.listAll(this.sessionManager.getSessionDir(),i),async i=>{e(),await this.handleResumeSession(i)},()=>{e(),this.ui.requestRender()},()=>{this.shutdown()},()=>this.ui.requestRender(),{renameSession:async(i,r)=>{let o=(r??"").trim();if(!o)return;Xn.open(i).appendSessionInfo(o)},showRenameHint:!0,keybindings:this.keybindings},this.sessionManager.getSessionFile());return{component:n,focus:n}})}async handleResumeSession(e,n){this.clearStatusIndicator();try{let i=await this.runtimeHost.switchSession(e,{withSession:n?.withSession,projectTrustContextFactory:r=>this.createProjectTrustContext(r)});return i.cancelled||this.showStatus("Resumed session"),i}catch(i){if(i instanceof Gl){let r=await this.promptForMissingSessionCwd(i);if(!r)return this.showStatus("Resume cancelled"),{cancelled:!0};let o=await this.runtimeHost.switchSession(e,{cwdOverride:r,withSession:n?.withSession,projectTrustContextFactory:s=>this.createProjectTrustContext(s)});return o.cancelled||this.showStatus("Resumed session in current cwd"),o}return this.handleFatalRuntimeError("Failed to resume session",i)}}getLoginProviderOptions(e){let n=[];for(let i of this.session.modelRuntime.getProviders()){let r=this.session.modelRuntime.getProviderAuthStatus(i.id),o=r.configured?{type:this.session.modelRuntime.isUsingOAuth(i.id)?"oauth":"api_key",source:r.label??r.source}:void 0;(!e||e==="oauth")&&i.auth.oauth&&n.push({id:i.id,name:i.name,authType:"oauth",method:i.auth.oauth,status:o}),(!e||e==="api_key")&&i.auth.apiKey&&n.push({id:i.id,name:i.name,authType:"api_key",method:i.auth.apiKey,status:o})}return n.sort((i,r)=>i.name.localeCompare(r.name))}async getLogoutProviderOptions(){return(await this.session.modelRuntime.listCredentials({signal:AbortSignal.timeout(15e3)})).map(({providerId:e,type:n})=>({id:e,name:this.session.modelRuntime.getProvider(e)?.name??e,authType:n,status:{type:n,source:"stored credential"}})).sort((e,n)=>e.name.localeCompare(n.name))}findLoginProviderOptions(e){let n=e.trim().toLowerCase();return n?this.getLoginProviderOptions().filter(i=>i.id.toLowerCase()===n||i.name.toLowerCase()===n):[]}async handleLoginCommand(e){if(!e){this.showLoginAuthTypeSelector();return}let n=this.findLoginProviderOptions(e);if(n.length===1){await this.startProviderLogin(n[0]);return}if(n.length>1&&new Set(n.map(r=>r.id)).size===1){this.showLoginAuthTypeSelector(n);return}this.showLoginProviderSelector(void 0,e)}async startProviderLogin(e){e.authType==="oauth"?await this.showLoginDialog(e.id,e.name):e.method?.login?await this.showApiKeyLoginDialog(e.id,e.name):this.showAmbientAuthDialog(e)}showLoginAuthTypeSelector(e){let n=e?.find(c=>c.authType==="oauth"),r=(n?.method&&"loginLabel"in n.method?n.method.loginLabel:void 0)??"Sign in with an account",o="Sign in with an API key",s=e?new Set(e.map(c=>c.authType)):new Set(["oauth","api_key"]),a=[];if(s.has("oauth")&&a.push(r),s.has("api_key")&&a.push(o),a.length===0){this.showStatus("No login methods available.");return}if(e&&a.length===1){let c=e[0];c&&this.startProviderLogin(c);return}let l=e?.[0]?`Select authentication method for ${e[0].name}:`:"Select authentication method:";this.showSelector(c=>{let u=new yr(l,a,p=>{c();let d=p===r?"oauth":"api_key";if(e){let m=e.find(g=>g.authType===d);m&&this.startProviderLogin(m);return}this.showLoginProviderSelector(d)},()=>{c(),this.ui.requestRender()});return{component:u,focus:u}})}showLoginProviderSelector(e,n){let i=this.getLoginProviderOptions(e);if(i.length===0){let r=e==="oauth"?"No subscription providers available.":e==="api_key"?"No API key providers available.":"No login providers available.";this.showStatus(r);return}this.showSelector(r=>{let o=new Ms("login",i,async(s,a)=>{r();let l=i.find(c=>c.id===s&&c.authType===a);l&&await this.startProviderLogin(l)},()=>{r(),e?this.showLoginAuthTypeSelector():this.ui.requestRender()},n);return{component:o,focus:o}})}async showOAuthSelector(e){if(e==="login"){this.showLoginAuthTypeSelector();return}let n;try{n=(await this.getLogoutProviderOptions()).filter(i=>i.name==="slingshot")}catch(i){this.showError(`Could not read stored credentials: ${i instanceof Error?i.message:String(i)}`);return}if(n.length===0){this.showStatus("No stored credentials to remove. /logout only removes credentials saved by /login; environment variables and models.json config are unchanged.");return}this.showSelector(i=>{let r=new Ms(e,n,async o=>{i();let s=n.find(a=>a.id===o);if(s)try{await this.session.modelRuntime.logout(s.id,{signal:AbortSignal.timeout(15e3)}),await this.updateAvailableProviderCount();let a=s.authType==="oauth"?`Logged out of ${s.name}`:`Removed stored API key for ${s.name}. Environment variables and models.json config are unchanged.`;this.showStatus(a)}catch(a){let l=a instanceof Error?a.message:String(a);this.showError(a instanceof ys?`Credentials removed for ${s.name}, but local model state could not be synchronized: ${l}`:`Logout failed: ${l}`)}},()=>{i(),this.ui.requestRender()});return{component:r,focus:r}})}async completeProviderAuthentication(e,n,i,r){let o=i==="oauth"?`Logged in to ${n}`:`Saved API key for ${n}`,s,a;if(aQ(r)){let p=this.session.modelRuntime.getAvailableSnapshot().filter(d=>d.provider===e);if(!uQ(e))a=`${o}, but no default model is configured for provider "${e}". Use /model to select a model.`;else if(p.length===0)a=`${o}, but no models are available for that provider. Use /model to select a model.`;else{let d=rv[e];if(s=p.find(m=>m.id===d),!s)a=`${o}, but its default model "${d}" is not available. Use /model to select a model.`;else try{await this.session.setModel(s)}catch(m){s=void 0;let g=m instanceof Error?m.message:String(m);a=`${o}, but selecting its default model failed: ${g}. Use /model to select a model.`}}}await this.updateAvailableProviderCount(),this.footer.invalidate(),this.updateEditorBorderColor(),s?(this.showStatus(`${o}. Selected ${s.id}. Credentials saved to ${S0()}`),this.maybeWarnAboutAnthropicSubscriptionAuth(s),this.checkDaxnutsEasterEgg(s)):(this.showStatus(`${o}. Credentials saved to ${S0()}`),a?this.showError(a):this.maybeWarnAboutAnthropicSubscriptionAuth());let l=new AbortController,c=setTimeout(()=>l.abort(),15e3);this.session.modelRuntime.refresh({providers:[e],signal:l.signal}).then(u=>{u.aborted?this.showWarning(`${o}, but its model catalog refresh timed out; using cached models.`):u.errors.size>0&&this.showWarning(`${o}, but its model catalog could not be refreshed; using cached models.`),this.updateAvailableProviderCount(),this.footer.invalidate(),this.ui.requestRender()}).catch(u=>{this.showWarning(`${o}, but its model catalog could not be refreshed: ${u instanceof Error?u.message:String(u)}`)}).finally(()=>clearTimeout(c))}showAmbientAuthDialog(e){let n=()=>{this.editorContainer.clear(),this.editorContainer.addChild(this.editor),this.ui.setFocus(this.editor),this.ui.requestRender()},i=new fo(this.ui,e.id,()=>n(),e.name,`${e.name} setup`);i.showInfo(`${e.method?.name??"Authentication"} is configured outside pi.`,[],!0),this.editorContainer.clear(),this.editorContainer.addChild(i),this.ui.setFocus(i),this.ui.requestRender()}async showApiKeyLoginDialog(e,n){let i=this.session.model,r=new fo(this.ui,e,(s,a)=>{},n);e==="amazon-bedrock"&&r.showDetails([x.fg("text","You can also use an AWS profile, IAM keys, or role-based credentials."),x.fg("muted","See:"),x.fg("accent",` ${st.join(Kc(),"providers.md")}`)]),this.editorContainer.clear(),this.editorContainer.addChild(r),this.ui.setFocus(r),this.ui.requestRender();let o=()=>{this.editorContainer.clear(),this.editorContainer.addChild(this.editor),this.ui.setFocus(this.editor),this.ui.requestRender()};try{await this.loginProvider(r,e,"api_key"),o(),await this.completeProviderAuthentication(e,n,"api_key",i)}catch(s){o();let a=s instanceof Error?s.message:String(s);s instanceof ys?this.showError(`Saved API key for ${n}, but local model state could not be synchronized: ${a}`):a!=="Login cancelled"&&this.showError(`Failed to save API key for ${n}: ${a}`)}}showAuthSelect(e,n){return new Promise((i,r)=>{let o=()=>{this.editorContainer.clear(),this.editorContainer.addChild(e),this.ui.setFocus(e),this.ui.requestRender()},s=n.options.map(l=>l.label),a=new yr(n.message,s,l=>{o();let c=n.options.find(u=>u.label===l)?.id;c?i(c):r(new Error("Login cancelled"))},()=>{o(),r(new Error("Login cancelled"))});this.editorContainer.clear(),this.editorContainer.addChild(a),this.ui.setFocus(a),this.ui.requestRender()})}async showAuthPrompt(e,n){let i;if(n.type==="select"?i=this.showAuthSelect(e,n):n.type==="manual_code"?i=e.showManualInput(n.message):i=e.showPrompt(n.message,n.placeholder),!n.signal)return i;if(n.signal.aborted)throw new Error("Login cancelled");let r=n.signal,o,s=new Promise((a,l)=>{o=()=>l(new Error("Login cancelled")),r.addEventListener("abort",o,{once:!0})});try{return await Promise.race([i,s])}finally{o&&r.removeEventListener("abort",o)}}notifyAuthDialog(e,n){n.type==="auth_url"?e.showAuth(n.url,n.instructions):n.type==="device_code"?(e.showDeviceCode(n),e.showWaiting("Waiting for authentication...")):n.type==="info"?e.showInfo(n.message,n.links):e.showProgress(n.message)}async loginProvider(e,n,i){await this.session.modelRuntime.login(n,i,{signal:e.signal,prompt:r=>this.showAuthPrompt(e,r),notify:r=>this.notifyAuthDialog(e,r)})}async showLoginDialog(e,n){let i=this.session.model,r=new fo(this.ui,e,(s,a)=>{},n);this.editorContainer.clear(),this.editorContainer.addChild(r),this.ui.setFocus(r),this.ui.requestRender();let o=()=>{this.editorContainer.clear(),this.editorContainer.addChild(this.editor),this.ui.setFocus(this.editor),this.ui.requestRender()};try{await this.loginProvider(r,e,"oauth"),o(),await this.completeProviderAuthentication(e,n,"oauth",i)}catch(s){o();let a=s instanceof Error?s.message:String(s);s instanceof ys?this.showError(`Logged in to ${n}, but local model state could not be synchronized: ${a}`):a!=="Login cancelled"&&this.showError(`Failed to login to ${n}: ${a}`)}}async handleReloadCommand(){if(this.session.isStreaming){this.showWarning("Wait for the current response to finish before reloading.");return}if(this.session.isCompacting){this.showWarning("Wait for compaction to finish before reloading.");return}this.resetExtensionUI();let e=new K,n=l=>x.fg("border",l);e.addChild(new V(n)),e.addChild(new W(1)),e.addChild(new E(x.fg("muted","Reloading keybindings, extensions, skills, prompts, themes, and context files..."),1,0)),e.addChild(new W(1)),e.addChild(new V(n));let i=this.editor;this.editorContainer.clear(),this.editorContainer.addChild(e),this.ui.setFocus(e),this.ui.requestRender(!0),await new Promise(l=>process.nextTick(l));let r=l=>{this.editorContainer.clear(),this.editorContainer.addChild(l),this.ui.setFocus(l),this.ui.requestRender()},o=!1,s=!1,a=()=>{o||(this.hideThinkingBlock=this.settingsManager.getHideThinkingBlock(),this.outputPad=this.settingsManager.getOutputPad(),this.rebuildChatFromMessages(),o=!0)};try{await this.session.reload({beforeSessionStart:a}),a(),this.keybindings.reload();let l=this.customHeader??this.builtInHeader;gp(l)&&l.setExpanded(this.toolOutputExpanded),Mu(this.session.resourceLoader.getThemes().themes),await this.themeController.applyFromSettings(),this.applyRuntimeSettings(),this.setupAutocompleteProvider();let c=this.session.extensionRunner;this.setupExtensionShortcuts(c),this.showLoadedResources({force:!1,showDiagnosticsWhenQuiet:!0});let u=this.maybeSaveImplicitProjectTrustAfterReload(),p=this.session.modelRuntime.getError();p&&this.showError(`models.json error: ${p}`),this.showStatus(u?"Reloaded keybindings, extensions, skills, prompts, themes, and context files; saved project trust":"Reloaded keybindings, extensions, skills, prompts, themes, and context files"),r(this.editor),s=!0}catch(l){s||r(i),this.showError(`Reload failed: ${l instanceof Error?l.message:String(l)}`)}}async handleExportCommand(e){let n=this.getPathCommandArgument(e,"/export");try{if(n?.endsWith(".jsonl")){let i=this.session.exportToJsonl(n);this.showStatus(`Session exported to: ${i}`)}else{let i=await this.session.exportToHtml(n);this.showStatus(`Session exported to: ${i}`)}}catch(i){this.showError(`Failed to export session: ${i instanceof Error?i.message:"Unknown error"}`)}}getPathCommandArgument(e,n){if(e===n||!e.startsWith(`${n} `))return;let i=e.slice(n.length+1).trimStart();if(!i)return;let r=i[0];if(r==='"'||r==="'"){let s=i.indexOf(r,1);return s<0?void 0:i.slice(1,s)}let o=i.search(/\s/);return o<0?i:i.slice(0,o)}async handleImportCommand(e){let n=this.getPathCommandArgument(e,"/import");if(!n){this.showError("Usage: /import <path.jsonl>");return}if(!await this.showExtensionConfirm("Import session",`Replace current session with ${n}?`)){this.showStatus("Import cancelled");return}try{if(this.clearStatusIndicator(),(await this.runtimeHost.importFromJsonl(n)).cancelled){this.showStatus("Import cancelled");return}this.showStatus(`Session imported from: ${n}`)}catch(r){if(r instanceof Gl){let o=await this.promptForMissingSessionCwd(r);if(!o){this.showStatus("Import cancelled");return}if((await this.runtimeHost.importFromJsonl(n,o)).cancelled){this.showStatus("Import cancelled");return}this.showStatus(`Session imported from: ${n}`);return}if(r instanceof Bh){this.showError(`Failed to import session: ${r.message}`);return}await this.handleFatalRuntimeError("Failed to import session",r)}}async handleShareCommand(){try{if(nQ("gh",["auth","status"],{encoding:"utf-8"}).status!==0){this.showError("GitHub CLI is not logged in. Run 'gh auth login' first.");return}}catch{this.showError("GitHub CLI (gh) is not installed. Install it from https://cli.github.com/");return}let e=st.join(fp.tmpdir(),"session.html");try{await this.session.exportToHtml(e)}catch(o){this.showError(`Failed to export session: ${o instanceof Error?o.message:"Unknown error"}`);return}let n=new ho(this.ui,x,"Creating gist...");this.editorContainer.clear(),this.editorContainer.addChild(n),this.ui.setFocus(n),this.ui.requestRender();let i=()=>{n.dispose(),this.editorContainer.clear(),this.editorContainer.addChild(this.editor),this.ui.setFocus(this.editor);try{Tr.unlinkSync(e)}catch{}},r=null;n.onAbort=()=>{r?.kill(),i(),this.showStatus("Share cancelled")};try{let o=await new Promise(c=>{r=Z_("gh",["gist","create","--public=false",e]);let u="",p="";r.stdout?.on("data",d=>{u+=d.toString()}),r.stderr?.on("data",d=>{p+=d.toString()}),r.on("close",d=>c({stdout:u,stderr:p,code:d}))});if(n.signal.aborted)return;if(i(),o.code!==0){let c=o.stderr?.trim()||"Unknown error";this.showError(`Failed to create gist: ${c}`);return}let s=o.stdout?.trim(),a=s?.split("/").pop();if(!a){this.showError("Failed to parse gist ID from gh output");return}let l=qk(a);this.showStatus(`Share URL: ${l}
313
+ `);return this.editor.setText(a),this.updatePendingMessagesDisplay(),e?.abort&&this.agent.abort(),r.length}queueCompactionMessage(e,n){this.compactionQueuedMessages.push({text:e,mode:n}),this.editor.addToHistory?.(e),this.editor.setText(""),this.updatePendingMessagesDisplay(),this.showStatus("Queued message for after compaction")}isExtensionCommand(e){if(!e.startsWith("/"))return!1;let n=this.session.extensionRunner,i=e.indexOf(" "),r=i===-1?e.slice(1):e.slice(1,i);return!!n.getCommand(r)}async flushCompactionQueue(e){if(this.compactionQueuedMessages.length===0)return;let n=[...this.compactionQueuedMessages];this.compactionQueuedMessages=[],this.updatePendingMessagesDisplay();let i=r=>{this.session.clearQueue(),this.compactionQueuedMessages=n,this.updatePendingMessagesDisplay(),this.showError(`Failed to send queued message${n.length>1?"s":""}: ${r instanceof Error?r.message:String(r)}`)};try{if(e?.willRetry){for(let c of n)this.isExtensionCommand(c.text)?await this.session.prompt(c.text):c.mode==="followUp"?await this.session.followUp(c.text):await this.session.steer(c.text);this.updatePendingMessagesDisplay();return}let r=n.findIndex(c=>!this.isExtensionCommand(c.text));if(r===-1){for(let c of n)await this.session.prompt(c.text);return}let o=n.slice(0,r),s=n[r],a=n.slice(r+1);for(let c of o)await this.session.prompt(c.text);let l=this.session.prompt(s.text,{streamingBehavior:s.mode}).catch(c=>{i(c)});for(let c of a)this.isExtensionCommand(c.text)?await this.session.prompt(c.text):c.mode==="followUp"?await this.session.followUp(c.text):await this.session.steer(c.text);this.updatePendingMessagesDisplay()}catch(r){i(r)}}flushPendingBashComponents(){for(let e of this.pendingBashComponents)this.pendingMessagesContainer.removeChild(e),this.chatContainer.addChild(e);this.pendingBashComponents=[]}disposeActiveSelector(){let e=this.activeSelectorDispose;this.activeSelectorToken=void 0,this.activeSelectorDispose=void 0,e?.()}showSelector(e){let n={},i,o=e(()=>{i?.(),this.activeSelectorToken===n&&(this.activeSelectorToken=void 0,this.activeSelectorDispose=void 0,this.editorContainer.clear(),this.editorContainer.addChild(this.editor),this.ui.setFocus(this.editor))});i=o.dispose,this.disposeActiveSelector(),this.activeSelectorToken=n,this.activeSelectorDispose=i,this.editorContainer.clear(),this.editorContainer.addChild(o.component),this.ui.setFocus(o.focus),this.ui.requestRender()}showSettingsSelector(){this.showSelector(e=>{let n;return n=new ec({autoCompact:this.session.autoCompactionEnabled,showImages:this.settingsManager.getShowImages(),imageWidthCells:this.settingsManager.getImageWidthCells(),autoResizeImages:this.settingsManager.getImageAutoResize(),blockImages:this.settingsManager.getBlockImages(),enableSkillCommands:this.settingsManager.getEnableSkillCommands(),steeringMode:this.session.steeringMode,followUpMode:this.session.followUpMode,transport:this.settingsManager.getTransport(),httpIdleTimeoutMs:this.settingsManager.getHttpIdleTimeoutMs(),thinkingLevel:this.session.thinkingLevel,availableThinkingLevels:this.session.getAvailableThinkingLevels(),currentTheme:this.settingsManager.getThemeSetting()||"dark",terminalTheme:this.themeController.getTerminalTheme(),availableThemes:ax(),hideThinkingBlock:this.hideThinkingBlock,mermaidRenderingMode:this.settingsManager.getMermaidRenderingMode(),collapseChangelog:this.settingsManager.getCollapseChangelog(),enableInstallTelemetry:this.settingsManager.getEnableInstallTelemetry(),doubleEscapeAction:this.settingsManager.getDoubleEscapeAction(),treeFilterMode:this.settingsManager.getTreeFilterMode(),showHardwareCursor:this.settingsManager.getShowHardwareCursor(),showCacheMissNotices:this.settingsManager.getShowCacheMissNotices(),defaultProjectTrust:this.settingsManager.getDefaultProjectTrust(),editorPaddingX:this.settingsManager.getEditorPaddingX(),outputPad:this.settingsManager.getOutputPad(),autocompleteMaxVisible:this.settingsManager.getAutocompleteMaxVisible(),quietStartup:this.settingsManager.getQuietStartup(),clearOnShrink:this.settingsManager.getClearOnShrink(),showTerminalProgress:this.settingsManager.getShowTerminalProgress(),tuiMode:this.ui.mode,fullscreenExitOutput:this.settingsManager.getFullscreenExitOutput(),fullscreenScrollbar:this.settingsManager.getFullscreenScrollbar(),warnings:this.settingsManager.getWarnings()},{onAutoCompactChange:i=>{this.session.setAutoCompactionEnabled(i),this.footer.setAutoCompactEnabled(i)},onShowImagesChange:i=>{this.settingsManager.setShowImages(i);for(let r of this.chatContainer.children)r instanceof qi&&r.setShowImages(i)},onImageWidthCellsChange:i=>{this.settingsManager.setImageWidthCells(i);for(let r of this.chatContainer.children)r instanceof qi&&r.setImageWidthCells(i)},onAutoResizeImagesChange:i=>{this.settingsManager.setImageAutoResize(i)},onBlockImagesChange:i=>{this.settingsManager.setBlockImages(i)},onEnableSkillCommandsChange:i=>{this.settingsManager.setEnableSkillCommands(i),this.setupAutocompleteProvider()},onSteeringModeChange:i=>{this.session.setSteeringMode(i)},onFollowUpModeChange:i=>{this.session.setFollowUpMode(i)},onTransportChange:i=>{this.settingsManager.setTransport(i),this.session.agent.transport=i},onHttpIdleTimeoutMsChange:i=>{this.settingsManager.setHttpIdleTimeoutMs(i),Nh(i),this.showStatus(`HTTP idle timeout: ${$h(i)}`)},onThinkingLevelChange:i=>{this.session.setThinkingLevel(i),this.footer.invalidate(),this.updateEditorBorderColor()},onThemeChange:i=>{this.settingsManager.setTheme(i),this.themeController.applyFromSettings()},onThemePreview:i=>this.themeController.preview(i),onHideThinkingBlockChange:i=>{this.hideThinkingBlock=i,this.settingsManager.setHideThinkingBlock(i);for(let r of this.chatContainer.children)r instanceof ji&&r.setHideThinkingBlock(i);this.chatContainer.clear(),this.rebuildChatFromMessages()},onMermaidRenderingModeChange:i=>{this.settingsManager.setMermaidRenderingMode(i),this.chatContainer.invalidate(),this.ui.requestRender()},onShowCacheMissNoticesChange:i=>{this.settingsManager.setShowCacheMissNotices(i),this.rebuildChatFromMessages()},onCollapseChangelogChange:i=>{this.settingsManager.setCollapseChangelog(i)},onEnableInstallTelemetryChange:i=>{this.settingsManager.setEnableInstallTelemetry(i)},onQuietStartupChange:i=>{this.settingsManager.setQuietStartup(i)},onDefaultProjectTrustChange:i=>{this.settingsManager.setDefaultProjectTrust(i)},onDoubleEscapeActionChange:i=>{this.settingsManager.setDoubleEscapeAction(i)},onTreeFilterModeChange:i=>{this.settingsManager.setTreeFilterMode(i)},onShowHardwareCursorChange:i=>{this.settingsManager.setShowHardwareCursor(i),this.ui.setShowHardwareCursor(i)},onEditorPaddingXChange:i=>{this.settingsManager.setEditorPaddingX(i),this.defaultEditor.setPaddingX(i),this.editor!==this.defaultEditor&&this.editor.setPaddingX!==void 0&&this.editor.setPaddingX(i)},onOutputPadChange:i=>{if(this.settingsManager.setOutputPad(i),this.outputPad=i,this.streamingComponent||this.session.isStreaming){for(let r of this.chatContainer.children)(r instanceof ji||r instanceof Rs||r instanceof bo)&&r.setOutputPad(i);this.streamingComponent&&this.streamingComponent.setOutputPad(i),this.ui.requestRender();return}this.rebuildChatFromMessages()},onAutocompleteMaxVisibleChange:i=>{this.settingsManager.setAutocompleteMaxVisible(i),this.defaultEditor.setAutocompleteMaxVisible(i),this.editor!==this.defaultEditor&&this.editor.setAutocompleteMaxVisible!==void 0&&this.editor.setAutocompleteMaxVisible(i)},onClearOnShrinkChange:i=>{this.settingsManager.setClearOnShrink(i),this.ui.setClearOnShrink(i),!i&&!this.activeStatusIndicator&&this.statusContainer.clear()},onShowTerminalProgressChange:i=>{this.settingsManager.setShowTerminalProgress(i)},onTuiModeChange:i=>{if(!this.switchTuiMode(i)){n?.getSettingsList().updateValue("tui-mode",this.ui.mode),this.showStatus("Close active overlays before changing TUI mode");return}this.settingsManager.setTuiMode(i),this.activeStatusIndicator||this.statusContainer.clear(),this.showStatus(`TUI mode: ${i}`)},onFullscreenExitOutputChange:i=>{this.settingsManager.setFullscreenExitOutput(i)},onFullscreenScrollbarChange:i=>{this.settingsManager.setFullscreenScrollbar(i),this.applyFullscreenScrollbarSetting()},onWarningsChange:i=>{this.settingsManager.setWarnings(i)},onCancel:()=>{e(),this.ui.requestRender()}}),{component:n,focus:n.getSettingsList()}})}async handleModelCommand(e){if(!e){this.showModelSelector();return}let n=await this.findExactModelMatch(e);if(n){try{await this.session.setModel(n),this.footer.invalidate(),this.updateEditorBorderColor(),this.showStatus(`Model: ${n.id}`),this.maybeWarnAboutAnthropicSubscriptionAuth(n),this.checkDaxnutsEasterEgg(n)}catch(i){this.showError(i instanceof Error?i.message:String(i))}return}this.showModelSelector(e)}async findExactModelMatch(e){let n=this.session.scopedModels.length>0?this.session.scopedModels.map(a=>a.model):[...this.session.modelRuntime.getAvailableSnapshot()],i=zu(e,n);if(i||this.session.scopedModels.length>0)return i;this.showStatus("Refreshing model catalogs\u2026");let r=new AbortController,o=!1,s=setTimeout(()=>{o=!0,r.abort()},15e3);try{let a=await this.session.modelRuntime.refresh({signal:r.signal});a.aborted&&o?this.showWarning("Model refresh timed out; searching cached models."):a.errors.size>0&&this.showWarning(`Could not refresh ${[...a.errors.keys()].join(", ")}; searching cached models.`)}catch(a){this.showWarning(o?"Model refresh timed out; searching cached models.":`Could not refresh model catalogs: ${a instanceof Error?a.message:String(a)}`)}finally{clearTimeout(s)}return zu(e,[...this.session.modelRuntime.getAvailableSnapshot()])}updateAvailableProviderCount(){let e=this.session.scopedModels.length>0?this.session.scopedModels.map(i=>i.model):this.session.modelRuntime.getAvailableSnapshot(),n=new Set(e.map(i=>i.provider));this.footerDataProvider.setAvailableProviderCount(n.size)}async maybeWarnAboutAnthropicSubscriptionAuth(e=this.session.model){if(this.settingsManager.getWarnings().anthropicExtraUsage!==!1&&!this.anthropicSubscriptionWarningShown&&!(!e||e.provider!=="anthropic"))try{if((await this.session.modelRuntime.checkAuth("anthropic"))?.type==="oauth"){this.anthropicSubscriptionWarningShown=!0,this.showWarning(eO);return}let n=(await this.session.modelRuntime.getAuth(e.provider))?.auth.apiKey;if(!sQ(n))return;this.anthropicSubscriptionWarningShown=!0,this.showWarning(eO)}catch{}}maybeSaveImplicitProjectTrustAfterReload(){let e=this.sessionManager.getCwd();if(this.autoTrustOnReloadCwd!==e||!this.settingsManager.isProjectTrusted()||!Ts(e))return!1;let n=new co(this.runtimeHost.services.agentDir);try{return n.get(e)!==null?(this.autoTrustOnReloadCwd=void 0,!1):(n.set(e,!0),this.autoTrustOnReloadCwd=void 0,!0)}catch(i){return this.showWarning(`Could not save project trust after reload: ${i instanceof Error?i.message:String(i)}`),!1}}showTrustSelector(){let e=this.sessionManager.getCwd(),n=new co(this.runtimeHost.services.agentDir),i=n.getEntry(e);this.showSelector(r=>{let o=new hp({cwd:e,savedDecision:i,projectTrusted:this.settingsManager.isProjectTrusted(),onSelect:s=>{n.setMany(s.updates),r(),this.showStatus(`Saved trust decision: ${s.trusted?"trusted":"untrusted"}. Restart sling for this to take effect.`)},onCancel:()=>{r(),this.ui.requestRender()}});return{component:o,focus:o}})}showModelSelector(e){this.showSelector(n=>{let i=new Zl(this.ui,this.session.model,this.settingsManager,this.session.modelRuntime,this.session.scopedModels,async r=>{try{await this.session.setModel(r),this.footer.invalidate(),this.updateEditorBorderColor(),n(),this.showStatus(`Model: ${r.id}`),this.maybeWarnAboutAnthropicSubscriptionAuth(r),this.checkDaxnutsEasterEgg(r)}catch(o){n(),this.showError(o instanceof Error?o.message:String(o))}},()=>{n(),this.ui.requestRender()},e);return{component:i,focus:i,dispose:()=>i.dispose()}})}showModelsSelector(){let e=[...this.session.modelRuntime.getAvailableSnapshot()],n=new Set(e.map(c=>`${c.provider}/${c.id}`)),i=this.settingsManager.getEnabledModels(),r=this.session.scopedModels,o=c=>{if(!i?.length)return null;let u=ov(i,c),p=u.scopedModels.map(d=>`${d.model.provider}/${d.model.id}`);for(let d of u.diagnostics)d.code==="no-match"&&!p.includes(d.pattern)&&p.push(d.pattern);return p},s=r.length>0?r.map(c=>`${c.model.provider}/${c.model.id}`):o(e),a=!1,l=c=>{s=c===null?null:[...c];let u=c?.some(d=>n.has(d))??!1,p=c!==null&&[...n].every(d=>c.includes(d));if(c&&u&&!p){let d=ov(c,e).scopedModels;this.session.setScopedModels(d.map(m=>({model:m.model,thinkingLevel:m.thinkingLevel})))}else this.session.setScopedModels([]);this.updateAvailableProviderCount(),this.ui.requestRender()};this.showSelector(c=>{let u=!1,p=!1,d=new AbortController,m=setTimeout(()=>{p=!0,d.abort()},15e3),g=new lp({allModels:e,enabledModelIds:s,refreshStatus:"Refreshing model catalogs\u2026"},{onChange:h=>{a=!0,l(h)},onPersist:h=>{let f=h!==null&&h.length===e.length&&h.every(v=>n.has(v)),b=h===null||f?void 0:h;this.settingsManager.setEnabledModels(b?[...b]:void 0),this.showStatus("Model selection saved to settings")},onCancel:()=>{c(),this.ui.requestRender()}});return this.session.modelRuntime.refresh({signal:d.signal}).then(h=>{u||(e=[...this.session.modelRuntime.getAvailableSnapshot()],n=new Set(e.map(f=>`${f.provider}/${f.id}`)),!a&&r.length===0?(s=o(e),g.updateModels(e,s)):g.updateModels(e),s!==null&&l(s),h.aborted&&p?g.setRefreshStatus("Model refresh timed out; showing cached models.","warning"):h.errors.size>0?g.setRefreshStatus(`Could not refresh ${[...h.errors.keys()].join(", ")}; showing cached models.`,"warning"):g.setRefreshStatus("Model catalogs refreshed.","success"),this.ui.requestRender())}).catch(h=>{u||(g.setRefreshStatus(p?"Model refresh timed out; showing cached models.":`Could not refresh model catalogs: ${h instanceof Error?h.message:String(h)}`,"warning"),this.ui.requestRender())}).finally(()=>clearTimeout(m)),{component:g,focus:g,dispose:()=>{u=!0,clearTimeout(m),d.abort()}}})}showUserMessageSelector(){let e=this.session.getUserMessagesForForking();if(e.length===0){this.showStatus("No messages to fork from");return}let n=e[e.length-1]?.entryId;this.showSelector(i=>{let r=new rc(e.map(o=>({id:o.entryId,text:o.text})),async o=>{i();try{let s=await this.runtimeHost.fork(o);if(s.cancelled){this.ui.requestRender();return}this.editor.setText(s.selectedText??""),this.showStatus("Forked to new session")}catch(s){this.showError(s instanceof Error?s.message:String(s))}},()=>{i(),this.ui.requestRender()},n);return{component:r,focus:r.getMessageList()}})}async handleCloneCommand(){let e=this.sessionManager.getLeafId();if(!e){this.showStatus("Nothing to clone yet");return}try{if((await this.runtimeHost.fork(e,{position:"at"})).cancelled){this.ui.requestRender();return}this.editor.setText(""),this.showStatus("Cloned to new session")}catch(n){this.showError(n instanceof Error?n.message:String(n))}}showTreeSelector(e){let n=this.sessionManager.getTree(),i=this.sessionManager.getLeafId(),r=this.settingsManager.getTreeFilterMode();if(n.length===0){this.showStatus("No entries in session");return}this.showSelector(o=>{let s=new ic(n,i,this.ui.terminal.rows,async a=>{if(a===this.sessionManager.getLeafId()){o(),this.showStatus("Already at this point");return}o();let l=!1,c;if(!this.settingsManager.getBranchSummarySkipPrompt())for(;;){let d=await this.showExtensionSelector("Summarize branch?",["No summary","Summarize","Summarize with custom prompt"]);if(d===void 0){this.showTreeSelector(a);return}if(l=d!=="No summary",!(d==="Summarize with custom prompt"&&(c=await this.showExtensionEditor("Custom summarization instructions"),c===void 0)))break}this.session.isStreaming&&(this.restoreQueuedMessagesToEditor(),await this.session.abort());let u=!1,p=this.defaultEditor.onEscape;l&&(this.defaultEditor.onEscape=()=>{this.session.abortBranchSummary()},this.chatContainer.addChild(new W(1)),this.showStatusIndicator(new mp(this.ui)),u=!0,this.ui.requestRender());try{let d=await this.session.navigateTree(a,{summarize:l,customInstructions:c});if(d.aborted){this.showStatus("Branch summarization cancelled"),this.showTreeSelector(a);return}if(d.cancelled){this.showStatus("Navigation cancelled");return}this.chatContainer.clear(),this.renderInitialMessages(),d.editorText&&!this.editor.getText().trim()&&this.editor.setText(d.editorText),this.showStatus("Navigated to selected point"),this.flushCompactionQueue({willRetry:!1})}catch(d){this.showError(d instanceof Error?d.message:String(d))}finally{u&&this.clearStatusIndicator("branchSummary"),this.defaultEditor.onEscape=p}},()=>{o(),this.ui.requestRender()},(a,l)=>{this.sessionManager.appendLabelChange(a,l),this.ui.requestRender()},e,r);return s.onCopy=async a=>{if(!a){this.showError("Selected entry has no text to copy");return}try{await zl(a),this.showStatus("Copied selected message to clipboard")}catch(l){this.showError(l instanceof Error?l.message:String(l))}},{component:s,focus:s}})}showSessionSelector(){this.showSelector(e=>{let n=new Cs(i=>Xn.list(this.sessionManager.getCwd(),this.sessionManager.getSessionDir(),i),i=>this.sessionManager.usesDefaultSessionDir()?Xn.listAll(i):Xn.listAll(this.sessionManager.getSessionDir(),i),async i=>{e(),await this.handleResumeSession(i)},()=>{e(),this.ui.requestRender()},()=>{this.shutdown()},()=>this.ui.requestRender(),{renameSession:async(i,r)=>{let o=(r??"").trim();if(!o)return;Xn.open(i).appendSessionInfo(o)},showRenameHint:!0,keybindings:this.keybindings},this.sessionManager.getSessionFile());return{component:n,focus:n}})}async handleResumeSession(e,n){this.clearStatusIndicator();try{let i=await this.runtimeHost.switchSession(e,{withSession:n?.withSession,projectTrustContextFactory:r=>this.createProjectTrustContext(r)});return i.cancelled||this.showStatus("Resumed session"),i}catch(i){if(i instanceof Gl){let r=await this.promptForMissingSessionCwd(i);if(!r)return this.showStatus("Resume cancelled"),{cancelled:!0};let o=await this.runtimeHost.switchSession(e,{cwdOverride:r,withSession:n?.withSession,projectTrustContextFactory:s=>this.createProjectTrustContext(s)});return o.cancelled||this.showStatus("Resumed session in current cwd"),o}return this.handleFatalRuntimeError("Failed to resume session",i)}}getLoginProviderOptions(e){let n=[];for(let i of this.session.modelRuntime.getProviders()){let r=this.session.modelRuntime.getProviderAuthStatus(i.id),o=r.configured?{type:this.session.modelRuntime.isUsingOAuth(i.id)?"oauth":"api_key",source:r.label??r.source}:void 0;(!e||e==="oauth")&&i.auth.oauth&&n.push({id:i.id,name:i.name,authType:"oauth",method:i.auth.oauth,status:o}),(!e||e==="api_key")&&i.auth.apiKey&&n.push({id:i.id,name:i.name,authType:"api_key",method:i.auth.apiKey,status:o})}return n.sort((i,r)=>i.name.localeCompare(r.name))}async getLogoutProviderOptions(){return(await this.session.modelRuntime.listCredentials({signal:AbortSignal.timeout(15e3)})).map(({providerId:e,type:n})=>({id:e,name:this.session.modelRuntime.getProvider(e)?.name??e,authType:n,status:{type:n,source:"stored credential"}})).sort((e,n)=>e.name.localeCompare(n.name))}findLoginProviderOptions(e){let n=e.trim().toLowerCase();return n?this.getLoginProviderOptions().filter(i=>i.id.toLowerCase()===n||i.name.toLowerCase()===n):[]}async handleLoginCommand(e){if(!e){this.showLoginAuthTypeSelector();return}let n=this.findLoginProviderOptions(e);if(n.length===1){await this.startProviderLogin(n[0]);return}if(n.length>1&&new Set(n.map(r=>r.id)).size===1){this.showLoginAuthTypeSelector(n);return}this.showLoginProviderSelector(void 0,e)}async startProviderLogin(e){e.authType==="oauth"?await this.showLoginDialog(e.id,e.name):e.method?.login?await this.showApiKeyLoginDialog(e.id,e.name):this.showAmbientAuthDialog(e)}showLoginAuthTypeSelector(e){let n=e?.find(c=>c.authType==="oauth"),r=(n?.method&&"loginLabel"in n.method?n.method.loginLabel:void 0)??"Sign in with an account",o="Sign in with an API key",s=e?new Set(e.map(c=>c.authType)):new Set(["oauth","api_key"]),a=[];if(s.has("oauth")&&a.push(r),s.has("api_key")&&a.push(o),a.length===0){this.showStatus("No login methods available.");return}if(e&&a.length===1){let c=e[0];c&&this.startProviderLogin(c);return}let l=e?.[0]?`Select authentication method for ${e[0].name}:`:"Select authentication method:";this.showSelector(c=>{let u=new yr(l,a,p=>{c();let d=p===r?"oauth":"api_key";if(e){let m=e.find(g=>g.authType===d);m&&this.startProviderLogin(m);return}this.showLoginProviderSelector(d)},()=>{c(),this.ui.requestRender()});return{component:u,focus:u}})}showLoginProviderSelector(e,n){let i=this.getLoginProviderOptions(e).filter(r=>r.id!=="slingshot");if(i.length===0){let r=e==="oauth"?"No subscription providers available.":e==="api_key"?"No API key providers available.":"No login providers available.";this.showStatus(r);return}this.showSelector(r=>{let o=new Ms("login",i,async(s,a)=>{r();let l=i.find(c=>c.id===s&&c.authType===a);l&&await this.startProviderLogin(l)},()=>{r(),e?this.showLoginAuthTypeSelector():this.ui.requestRender()},n);return{component:o,focus:o}})}async showOAuthSelector(e){if(e==="login"){this.showLoginAuthTypeSelector();return}let n;try{n=(await this.getLogoutProviderOptions()).filter(i=>i.id==="slingshot")}catch(i){this.showError(`Could not read stored credentials: ${i instanceof Error?i.message:String(i)}`);return}if(n.length===0){this.showStatus("No stored credentials to remove. /logout only removes credentials saved by /login; environment variables and models.json config are unchanged.");return}this.showSelector(i=>{let r=new Ms(e,n,async o=>{i();let s=n.find(a=>a.id===o);if(s)try{await this.session.modelRuntime.logout(s.id,{signal:AbortSignal.timeout(15e3)}),await this.updateAvailableProviderCount();let a=s.authType==="oauth"?`Logged out of ${s.name}`:`Removed stored API key for ${s.name}. Environment variables and models.json config are unchanged.`;this.showStatus(a)}catch(a){let l=a instanceof Error?a.message:String(a);this.showError(a instanceof ys?`Credentials removed for ${s.name}, but local model state could not be synchronized: ${l}`:`Logout failed: ${l}`)}},()=>{i(),this.ui.requestRender()});return{component:r,focus:r}})}async completeProviderAuthentication(e,n,i,r){let o=i==="oauth"?`Logged in to ${n}`:`Saved API key for ${n}`,s,a;if(aQ(r)){let p=this.session.modelRuntime.getAvailableSnapshot().filter(d=>d.provider===e);if(!uQ(e))a=`${o}, but no default model is configured for provider "${e}". Use /model to select a model.`;else if(p.length===0)a=`${o}, but no models are available for that provider. Use /model to select a model.`;else{let d=rv[e];if(s=p.find(m=>m.id===d),!s)a=`${o}, but its default model "${d}" is not available. Use /model to select a model.`;else try{await this.session.setModel(s)}catch(m){s=void 0;let g=m instanceof Error?m.message:String(m);a=`${o}, but selecting its default model failed: ${g}. Use /model to select a model.`}}}await this.updateAvailableProviderCount(),this.footer.invalidate(),this.updateEditorBorderColor(),s?(this.showStatus(`${o}. Selected ${s.id}. Credentials saved to ${S0()}`),this.maybeWarnAboutAnthropicSubscriptionAuth(s),this.checkDaxnutsEasterEgg(s)):(this.showStatus(`${o}. Credentials saved to ${S0()}`),a?this.showError(a):this.maybeWarnAboutAnthropicSubscriptionAuth());let l=new AbortController,c=setTimeout(()=>l.abort(),15e3);this.session.modelRuntime.refresh({providers:[e],signal:l.signal}).then(u=>{u.aborted?this.showWarning(`${o}, but its model catalog refresh timed out; using cached models.`):u.errors.size>0&&this.showWarning(`${o}, but its model catalog could not be refreshed; using cached models.`),this.updateAvailableProviderCount(),this.footer.invalidate(),this.ui.requestRender()}).catch(u=>{this.showWarning(`${o}, but its model catalog could not be refreshed: ${u instanceof Error?u.message:String(u)}`)}).finally(()=>clearTimeout(c))}showAmbientAuthDialog(e){let n=()=>{this.editorContainer.clear(),this.editorContainer.addChild(this.editor),this.ui.setFocus(this.editor),this.ui.requestRender()},i=new fo(this.ui,e.id,()=>n(),e.name,`${e.name} setup`);i.showInfo(`${e.method?.name??"Authentication"} is configured outside sling.`,[],!0),this.editorContainer.clear(),this.editorContainer.addChild(i),this.ui.setFocus(i),this.ui.requestRender()}async showApiKeyLoginDialog(e,n){let i=this.session.model,r=new fo(this.ui,e,(s,a)=>{},n);e==="amazon-bedrock"&&r.showDetails([x.fg("text","You can also use an AWS profile, IAM keys, or role-based credentials."),x.fg("muted","See:"),x.fg("accent",` ${st.join(Kc(),"providers.md")}`)]),this.editorContainer.clear(),this.editorContainer.addChild(r),this.ui.setFocus(r),this.ui.requestRender();let o=()=>{this.editorContainer.clear(),this.editorContainer.addChild(this.editor),this.ui.setFocus(this.editor),this.ui.requestRender()};try{await this.loginProvider(r,e,"api_key"),o(),await this.completeProviderAuthentication(e,n,"api_key",i)}catch(s){o();let a=s instanceof Error?s.message:String(s);s instanceof ys?this.showError(`Saved API key for ${n}, but local model state could not be synchronized: ${a}`):a!=="Login cancelled"&&this.showError(`Failed to save API key for ${n}: ${a}`)}}showAuthSelect(e,n){return new Promise((i,r)=>{let o=()=>{this.editorContainer.clear(),this.editorContainer.addChild(e),this.ui.setFocus(e),this.ui.requestRender()},s=n.options.map(l=>l.label),a=new yr(n.message,s,l=>{o();let c=n.options.find(u=>u.label===l)?.id;c?i(c):r(new Error("Login cancelled"))},()=>{o(),r(new Error("Login cancelled"))});this.editorContainer.clear(),this.editorContainer.addChild(a),this.ui.setFocus(a),this.ui.requestRender()})}async showAuthPrompt(e,n){let i;if(n.type==="select"?i=this.showAuthSelect(e,n):n.type==="manual_code"?i=e.showManualInput(n.message):i=e.showPrompt(n.message,n.placeholder),!n.signal)return i;if(n.signal.aborted)throw new Error("Login cancelled");let r=n.signal,o,s=new Promise((a,l)=>{o=()=>l(new Error("Login cancelled")),r.addEventListener("abort",o,{once:!0})});try{return await Promise.race([i,s])}finally{o&&r.removeEventListener("abort",o)}}notifyAuthDialog(e,n){n.type==="auth_url"?e.showAuth(n.url,n.instructions):n.type==="device_code"?(e.showDeviceCode(n),e.showWaiting("Waiting for authentication...")):n.type==="info"?e.showInfo(n.message,n.links):e.showProgress(n.message)}async loginProvider(e,n,i){await this.session.modelRuntime.login(n,i,{signal:e.signal,prompt:r=>this.showAuthPrompt(e,r),notify:r=>this.notifyAuthDialog(e,r)})}async showLoginDialog(e,n){let i=this.session.model,r=new fo(this.ui,e,(s,a)=>{},n);this.editorContainer.clear(),this.editorContainer.addChild(r),this.ui.setFocus(r),this.ui.requestRender();let o=()=>{this.editorContainer.clear(),this.editorContainer.addChild(this.editor),this.ui.setFocus(this.editor),this.ui.requestRender()};try{await this.loginProvider(r,e,"oauth"),o(),await this.completeProviderAuthentication(e,n,"oauth",i)}catch(s){o();let a=s instanceof Error?s.message:String(s);s instanceof ys?this.showError(`Logged in to ${n}, but local model state could not be synchronized: ${a}`):a!=="Login cancelled"&&this.showError(`Failed to login to ${n}: ${a}`)}}async handleReloadCommand(){if(this.session.isStreaming){this.showWarning("Wait for the current response to finish before reloading.");return}if(this.session.isCompacting){this.showWarning("Wait for compaction to finish before reloading.");return}this.resetExtensionUI();let e=new K,n=l=>x.fg("border",l);e.addChild(new V(n)),e.addChild(new W(1)),e.addChild(new E(x.fg("muted","Reloading keybindings, extensions, skills, prompts, themes, and context files..."),1,0)),e.addChild(new W(1)),e.addChild(new V(n));let i=this.editor;this.editorContainer.clear(),this.editorContainer.addChild(e),this.ui.setFocus(e),this.ui.requestRender(!0),await new Promise(l=>process.nextTick(l));let r=l=>{this.editorContainer.clear(),this.editorContainer.addChild(l),this.ui.setFocus(l),this.ui.requestRender()},o=!1,s=!1,a=()=>{o||(this.hideThinkingBlock=this.settingsManager.getHideThinkingBlock(),this.outputPad=this.settingsManager.getOutputPad(),this.rebuildChatFromMessages(),o=!0)};try{await this.session.reload({beforeSessionStart:a}),a(),this.keybindings.reload();let l=this.customHeader??this.builtInHeader;gp(l)&&l.setExpanded(this.toolOutputExpanded),Mu(this.session.resourceLoader.getThemes().themes),await this.themeController.applyFromSettings(),this.applyRuntimeSettings(),this.setupAutocompleteProvider();let c=this.session.extensionRunner;this.setupExtensionShortcuts(c),this.showLoadedResources({force:!1,showDiagnosticsWhenQuiet:!0});let u=this.maybeSaveImplicitProjectTrustAfterReload(),p=this.session.modelRuntime.getError();p&&this.showError(`models.json error: ${p}`),this.showStatus(u?"Reloaded keybindings, extensions, skills, prompts, themes, and context files; saved project trust":"Reloaded keybindings, extensions, skills, prompts, themes, and context files"),r(this.editor),s=!0}catch(l){s||r(i),this.showError(`Reload failed: ${l instanceof Error?l.message:String(l)}`)}}async handleExportCommand(e){let n=this.getPathCommandArgument(e,"/export");try{if(n?.endsWith(".jsonl")){let i=this.session.exportToJsonl(n);this.showStatus(`Session exported to: ${i}`)}else{let i=await this.session.exportToHtml(n);this.showStatus(`Session exported to: ${i}`)}}catch(i){this.showError(`Failed to export session: ${i instanceof Error?i.message:"Unknown error"}`)}}getPathCommandArgument(e,n){if(e===n||!e.startsWith(`${n} `))return;let i=e.slice(n.length+1).trimStart();if(!i)return;let r=i[0];if(r==='"'||r==="'"){let s=i.indexOf(r,1);return s<0?void 0:i.slice(1,s)}let o=i.search(/\s/);return o<0?i:i.slice(0,o)}async handleImportCommand(e){let n=this.getPathCommandArgument(e,"/import");if(!n){this.showError("Usage: /import <path.jsonl>");return}if(!await this.showExtensionConfirm("Import session",`Replace current session with ${n}?`)){this.showStatus("Import cancelled");return}try{if(this.clearStatusIndicator(),(await this.runtimeHost.importFromJsonl(n)).cancelled){this.showStatus("Import cancelled");return}this.showStatus(`Session imported from: ${n}`)}catch(r){if(r instanceof Gl){let o=await this.promptForMissingSessionCwd(r);if(!o){this.showStatus("Import cancelled");return}if((await this.runtimeHost.importFromJsonl(n,o)).cancelled){this.showStatus("Import cancelled");return}this.showStatus(`Session imported from: ${n}`);return}if(r instanceof Bh){this.showError(`Failed to import session: ${r.message}`);return}await this.handleFatalRuntimeError("Failed to import session",r)}}async handleShareCommand(){try{if(nQ("gh",["auth","status"],{encoding:"utf-8"}).status!==0){this.showError("GitHub CLI is not logged in. Run 'gh auth login' first.");return}}catch{this.showError("GitHub CLI (gh) is not installed. Install it from https://cli.github.com/");return}let e=st.join(fp.tmpdir(),"session.html");try{await this.session.exportToHtml(e)}catch(o){this.showError(`Failed to export session: ${o instanceof Error?o.message:"Unknown error"}`);return}let n=new ho(this.ui,x,"Creating gist...");this.editorContainer.clear(),this.editorContainer.addChild(n),this.ui.setFocus(n),this.ui.requestRender();let i=()=>{n.dispose(),this.editorContainer.clear(),this.editorContainer.addChild(this.editor),this.ui.setFocus(this.editor);try{Tr.unlinkSync(e)}catch{}},r=null;n.onAbort=()=>{r?.kill(),i(),this.showStatus("Share cancelled")};try{let o=await new Promise(c=>{r=Z_("gh",["gist","create","--public=false",e]);let u="",p="";r.stdout?.on("data",d=>{u+=d.toString()}),r.stderr?.on("data",d=>{p+=d.toString()}),r.on("close",d=>c({stdout:u,stderr:p,code:d}))});if(n.signal.aborted)return;if(i(),o.code!==0){let c=o.stderr?.trim()||"Unknown error";this.showError(`Failed to create gist: ${c}`);return}let s=o.stdout?.trim(),a=s?.split("/").pop();if(!a){this.showError("Failed to parse gist ID from gh output");return}let l=qk(a);this.showStatus(`Share URL: ${l}
314
314
  Gist: ${s}`)}catch(o){n.signal.aborted||(i(),this.showError(`Failed to create gist: ${o instanceof Error?o.message:"Unknown error"}`))}}async handleCopyCommand(e={}){let n=this.session.getLastAssistantText();if(!n){this.showError("No agent messages to copy yet.");return}try{await zl(n),e.flashConfirmation&&this.ui instanceof fl?this.ui.flash("Copied!"):this.showStatus("Copied last agent message to clipboard")}catch(i){this.showError(i instanceof Error?i.message:String(i))}}handleNameCommand(e){let n=e.replace(/^\/name\s*/,"").trim();if(!n){let r=this.sessionManager.getSessionName();r?(this.chatContainer.addChild(new W(1)),this.chatContainer.addChild(new E(x.fg("dim",`Session name: ${r}`),1,0))):this.showWarning("Usage: /name <name>"),this.ui.requestRender();return}this.session.setSessionName(n);let i=this.sessionManager.getSessionName();i!==n&&this.showWarning(`Session name was normalized from ${JSON.stringify(n)} to ${JSON.stringify(i)}`),this.chatContainer.addChild(new W(1)),this.chatContainer.addChild(new E(x.fg("dim",`Session name set: ${i??n}`),1,0)),this.ui.requestRender()}handleSessionCommand(){let e=this.session.getSessionStats(),n=this.sessionManager.getSessionName(),i=this.sessionManager.getEntries(),r=x_(i,this.session.modelRuntime),o=CE(i),s=`${x.bold("Session Info")}
315
315
 
316
316
  `;n&&(s+=`${x.fg("dim","Name:")} ${n}
@@ -389,7 +389,7 @@ ${x.fg("dim","Cache Re-billed:")} ${d}`}}this.chatContainer.addChild(new W(1)),t
389
389
  `;for(let[Vt,se]of zt){let ke=se.description??se.extensionPath,Me=hs(Vt,{capitalize:!0});Ie+=`| \`${Me}\` | ${ke} |
390
390
  `}}this.chatContainer.addChild(new W(1)),this.chatContainer.addChild(new V),this.chatContainer.addChild(new E(x.bold(x.fg("accent","Keyboard Shortcuts")),1,0)),this.chatContainer.addChild(new W(1)),this.chatContainer.addChild(new Xe(Ie.trim(),1,1,this.getMarkdownThemeWithSettings())),this.chatContainer.addChild(new V),this.ui.requestRender()}async handleClearCommand(){this.clearStatusIndicator();try{if((await this.runtimeHost.newSession()).cancelled)return;this.chatContainer.addChild(new W(1)),this.chatContainer.addChild(new E(`${x.fg("accent","\u2713 New session started")}`,1,1)),this.ui.requestRender()}catch(e){await this.handleFatalRuntimeError("Failed to create session",e)}}handleDebugCommand(){let e=this.ui.terminal.columns,n=this.ui.terminal.rows,i=this.ui.render(e),r=Kk(),o=[`Debug output at ${new Date().toISOString()}`,`Terminal: ${e}x${n}`,`Total lines: ${i.length}`,"","=== All rendered lines with visible widths ===",...i.map((s,a)=>{let l=N(s),c=JSON.stringify(s);return`[${a}] (w=${l}) ${c}`}),"","=== Agent messages (JSONL) ===",...this.session.messages.map(s=>JSON.stringify(s)),""].join(`
391
391
  `);Tr.mkdirSync(st.dirname(r),{recursive:!0}),Tr.writeFileSync(r,o),this.chatContainer.addChild(new W(1)),this.chatContainer.addChild(new E(`${x.fg("accent","\u2713 Debug log written")}
392
- ${x.fg("muted",r)}`,1,1)),this.ui.requestRender()}handleArminSaysHi(){this.chatContainer.addChild(new W(1)),this.chatContainer.addChild(new Vl(this.ui)),this.ui.requestRender()}handleDementedDelves(){this.chatContainer.addChild(new W(1)),this.chatContainer.addChild(new Qh),this.ui.requestRender()}handleDaxnuts(){this.chatContainer.addChild(new W(1)),this.chatContainer.addChild(new ap(this.ui)),this.ui.requestRender()}checkDaxnutsEasterEgg(e){e.provider==="opencode"&&e.id.toLowerCase().includes("kimi-k2.5")&&this.handleDaxnuts()}async handleBashCommand(e,n=!1){let r=await this.session.extensionRunner.emitUserBash({type:"user_bash",command:e,excludeFromContext:n,cwd:this.sessionManager.getCwd()});if(r?.result){let s=r.result;this.bashComponent=new mo(e,this.ui,n),this.session.isStreaming?(this.pendingMessagesContainer.addChild(this.bashComponent),this.pendingBashComponents.push(this.bashComponent)):this.chatContainer.addChild(this.bashComponent),s.output&&this.bashComponent.appendOutput(s.output),this.bashComponent.setComplete(s.exitCode,s.cancelled,s.truncated?{truncated:!0,content:s.output}:void 0,s.fullOutputPath),this.session.recordBashResult(e,s,{excludeFromContext:n}),this.bashComponent=void 0,this.ui.requestRender();return}let o=this.session.isStreaming;this.bashComponent=new mo(e,this.ui,n),o?(this.pendingMessagesContainer.addChild(this.bashComponent),this.pendingBashComponents.push(this.bashComponent)):this.chatContainer.addChild(this.bashComponent),this.ui.requestRender();try{let s=await this.session.executeBash(e,a=>{this.bashComponent&&(this.bashComponent.appendOutput(a),this.ui.requestRender())},{excludeFromContext:n,operations:r?.operations});this.bashComponent&&this.bashComponent.setComplete(s.exitCode,s.cancelled,s.truncated?{truncated:!0,content:s.output}:void 0,s.fullOutputPath)}catch(s){this.bashComponent&&this.bashComponent.setComplete(void 0,!1),this.showError(`Bash command failed: ${s instanceof Error?s.message:"Unknown error"}`)}this.bashComponent=void 0,this.ui.requestRender()}async handleCompactCommand(e){this.clearStatusIndicator();try{await this.session.compact(e)}catch{}}stop(e=this.settingsManager.getFullscreenExitOutput()){this.disposeActiveSelector(),this.settingsManager.getShowTerminalProgress()&&this.ui.terminal.setProgress(!1),this.clearStatusIndicator(),this.themeController.disableAutoSync(),this.clearExtensionTerminalInputListeners(),this.footer.dispose(),this.footerDataProvider.dispose(),this.unsubscribe&&this.unsubscribe(),this.isInitialized&&(this.stopInteractiveTui(e),this.isInitialized=!1),this.unregisterSignalHandlers()}};import z8e from"chalk";var sqe=`${Mt} config [-l] [--approve|--no-approve]`;import{randomBytes as $Q}from"node:crypto";import ng from"node:path";import wi from"node:fs";var kr=null,xo=null,xp=process.env.SLINGSHOT_DEBUG==="true";function vp(){return xp}function aO(t){xp=t,t?Xv():kr=null}function lO(){return kr}function Xv(){if(xp)try{if(typeof process<"u"&&process.versions?.node){xo=kd("fs");let t=kd("path"),e=kd("os"),n=process.env.SLINGSHOT_LOG_DIR||t.join(e.homedir(),".sling"),i=t.join(n,"logs","analytics");xo.existsSync(i)||xo.mkdirSync(i,{recursive:!0});let r=new Date().toISOString().replace(/[:.]/g,"-").slice(0,-5);kr=t.join(i,`${r}.log`);let o=`
392
+ ${x.fg("muted",r)}`,1,1)),this.ui.requestRender()}handleArminSaysHi(){this.chatContainer.addChild(new W(1)),this.chatContainer.addChild(new Vl(this.ui)),this.ui.requestRender()}handleDementedDelves(){this.chatContainer.addChild(new W(1)),this.chatContainer.addChild(new Qh),this.ui.requestRender()}handleDaxnuts(){this.chatContainer.addChild(new W(1)),this.chatContainer.addChild(new ap(this.ui)),this.ui.requestRender()}checkDaxnutsEasterEgg(e){e.provider==="opencode"&&e.id.toLowerCase().includes("kimi-k2.5")&&this.handleDaxnuts()}async handleBashCommand(e,n=!1){let r=await this.session.extensionRunner.emitUserBash({type:"user_bash",command:e,excludeFromContext:n,cwd:this.sessionManager.getCwd()});if(r?.result){let s=r.result;this.bashComponent=new mo(e,this.ui,n),this.session.isStreaming?(this.pendingMessagesContainer.addChild(this.bashComponent),this.pendingBashComponents.push(this.bashComponent)):this.chatContainer.addChild(this.bashComponent),s.output&&this.bashComponent.appendOutput(s.output),this.bashComponent.setComplete(s.exitCode,s.cancelled,s.truncated?{truncated:!0,content:s.output}:void 0,s.fullOutputPath),this.session.recordBashResult(e,s,{excludeFromContext:n}),this.bashComponent=void 0,this.ui.requestRender();return}let o=this.session.isStreaming;this.bashComponent=new mo(e,this.ui,n),o?(this.pendingMessagesContainer.addChild(this.bashComponent),this.pendingBashComponents.push(this.bashComponent)):this.chatContainer.addChild(this.bashComponent),this.ui.requestRender();try{let s=await this.session.executeBash(e,a=>{this.bashComponent&&(this.bashComponent.appendOutput(a),this.ui.requestRender())},{excludeFromContext:n,operations:r?.operations});this.bashComponent&&this.bashComponent.setComplete(s.exitCode,s.cancelled,s.truncated?{truncated:!0,content:s.output}:void 0,s.fullOutputPath)}catch(s){this.bashComponent&&this.bashComponent.setComplete(void 0,!1),this.showError(`Bash command failed: ${s instanceof Error?s.message:"Unknown error"}`)}this.bashComponent=void 0,this.ui.requestRender()}async handleCompactCommand(e){this.clearStatusIndicator();try{await this.session.compact(e)}catch{}}stop(e=this.settingsManager.getFullscreenExitOutput()){this.disposeActiveSelector(),this.settingsManager.getShowTerminalProgress()&&this.ui.terminal.setProgress(!1),this.clearStatusIndicator(),this.themeController.disableAutoSync(),this.clearExtensionTerminalInputListeners(),this.footer.dispose(),this.footerDataProvider.dispose(),this.unsubscribe&&this.unsubscribe(),this.isInitialized&&(this.stopInteractiveTui(e),this.isInitialized=!1),this.unregisterSignalHandlers()}};import H8e from"chalk";var oqe=`${Mt} config [-l] [--approve|--no-approve]`;import{randomBytes as $Q}from"node:crypto";import ng from"node:path";import wi from"node:fs";var kr=null,xo=null,xp=process.env.SLINGSHOT_DEBUG==="true";function vp(){return xp}function aO(t){xp=t,t?Xv():kr=null}function lO(){return kr}function Xv(){if(xp)try{if(typeof process<"u"&&process.versions?.node){xo=kd("fs");let t=kd("path"),e=kd("os"),n=process.env.SLINGSHOT_LOG_DIR||t.join(e.homedir(),".sling"),i=t.join(n,"logs","analytics");xo.existsSync(i)||xo.mkdirSync(i,{recursive:!0});let r=new Date().toISOString().replace(/[:.]/g,"-").slice(0,-5);kr=t.join(i,`${r}.log`);let o=`
393
393
  \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
394
394
  \u2551 SLINGSHOT ANALYTICS DEBUG LOG \u2551
395
395
  \u2551 Started: ${new Date().toISOString()} \u2551
@@ -401,7 +401,7 @@ Log file: ${kr}
401
401
  `;xo.appendFileSync(kr,n)}catch{}}function gt(t,e){if(!(!kr||!xo||!xp))try{let i=`[${new Date().toISOString()}] ${t}:
402
402
  ${JSON.stringify(e,null,2)}
403
403
 
404
- `;xo.appendFileSync(kr,i)}catch{}}var vo=null;function cO(t){if(!t)return;let e=t.trim();if(e)return e.replace(/\/+$/,"")}var oe=class t{static{this.BASE_URL="base_url"}static{this.ANALYTICS_DOMAIN="analytics_domain"}static{this.CLIENT_ID="client_id"}static{this.PROJECT_ID="project_id"}static{this.WORKSPACE_ID="workspace_id"}static{this.PROJECT_NAME="project_name"}static{this.WORKSPACE_NAME="workspace_name"}static{this.defaultValues={[t.BASE_URL]:"https://sapientaiproducts.com",[t.ANALYTICS_DOMAIN]:"https://slingshot.sapientaiproducts.com",[t.CLIENT_ID]:"b97fbef7-cad9-4e56-9850-39e86c8fdf61",[t.PROJECT_ID]:"fa8121c4-e2fc-48f1-9478-8949c04e13cc",[t.WORKSPACE_ID]:"6e5756eb-d7e2-4d80-ad07-9d7a51600d85"}}static{this.LOGIN_PATH="/web/v1/studio-auth/login"}static{this.EXCHANGE_PATH="/api/v1/studio-auth/auth/desktop/exchange"}static{this.REFRESH_PATH="/api/v3/auth/refreshtoken"}static{this.API_BASE_PATH="/api/v1/llm"}static{this.SAGE_EVENTS_PATH="/api/v1/ai-portal/sage_events"}static{this.APP_TOKEN_PATH="/api/v3/auth/app-token"}static{this.CONFIG_SERVICE_PATH="/api/v2/configservice/client"}static{this.SLINGSHOT_RAG_MCP="/api/v1/ai-prompt-lib/mcp/"}static{this.SAPI="/save/api/v1"}static{this.REFRESH_CLIENT_NAME="machine"}static{this.SLINGSHOT_APP_TOKEN_ENV="SLINGSHOT_APP_TOKEN_HEADER"}static{this.APP_TOKEN_REFRESH_BUFFER_MS=60*1e3}static{this.TOKEN_EXPIRY_BUFFER_MS=300*1e3}static{this.CLIENT_NAME="desktop"}static defaults(e){return this.defaultValues[e]}static getLocalSettingsPath(){return ng.resolve(process.cwd(),".sling","sling.settings.json")}static getGlobalSettingsPath(){return ng.resolve(Ee(),"sling.settings.json")}static getSettingsPath(e){if(e==="local")return this.getLocalSettingsPath();if(e==="global")return this.getGlobalSettingsPath();let n=this.getLocalSettingsPath();return wi.existsSync(n)?n:this.getGlobalSettingsPath()}static getSettings(){if(!vo){let i=this.getSettingsPath();try{if(wi.existsSync(i)){let r=wi.readFileSync(i,"utf-8"),o=JSON.parse(r)||{};vo={...this.defaultValues,...o}}else{let r=ng.dirname(i);wi.existsSync(r)||wi.mkdirSync(r,{recursive:!0}),wi.writeFileSync(i,JSON.stringify(this.defaultValues,null,2),"utf-8"),vo={...this.defaultValues}}}catch(r){gt("Error reading/writing sling.settings.json: ",r),vo={...this.defaultValues}}}let e=cO(process.env.SLINGSHOT_API_DOMAIN),n=cO(process.env.SLINGSHOT_ANALYTICS_DOMAIN);return{...vo,[t.BASE_URL]:e||vo[t.BASE_URL],[t.ANALYTICS_DOMAIN]:n||vo[t.ANALYTICS_DOMAIN]}}static updateSettings(e,n){let i=n?.scope??"global",r=this.getSettingsPath(i);try{let o={};if(wi.existsSync(r)){let l=wi.readFileSync(r,"utf-8");o=JSON.parse(l)||{}}let s={...this.defaultValues,...o,...e},a=ng.dirname(r);wi.existsSync(a)||wi.mkdirSync(a,{recursive:!0}),wi.writeFileSync(r,JSON.stringify(s,null,2),"utf-8"),vo=null}catch(o){gt("Error updating sling.settings.json: ",o)}}static getLoginUrl(e){let n=this.getSettings(),i=new URLSearchParams({client:this.CLIENT_NAME,port:String(e.port),localState:e.localState});return e.clientId&&i.set("clientId",e.clientId),`${n[t.BASE_URL]}${this.LOGIN_PATH}?${i.toString()}`}static getExchangeUrl(){return`${this.getSettings()[t.BASE_URL]}${this.EXCHANGE_PATH}`}static getRefreshUrl(){let e=this.getSettings(),n=new URLSearchParams({client:this.REFRESH_CLIENT_NAME});return`${e[t.BASE_URL]}${this.REFRESH_PATH}?${n.toString()}`}static getApiBaseUrl(){return`${this.getSettings()[t.BASE_URL]}${this.API_BASE_PATH}`}static getSageEventsUrl(){return`${this.getSettings()[t.ANALYTICS_DOMAIN]}${this.SAGE_EVENTS_PATH}`}static getSlingshotRAGMCPUrl(){return`${this.getSettings()[t.ANALYTICS_DOMAIN]}${this.SLINGSHOT_RAG_MCP}`}static getTokenExpiryBuffer(){return this.TOKEN_EXPIRY_BUFFER_MS}static getDefaultProjectId(){let e=this.getSettings();return process.env.SLINGSHOT_PROJECT_ID||e[t.PROJECT_ID]}static getDefaultWorkspaceId(){let e=this.getSettings();return process.env.SLINGSHOT_WORKSPACE_ID||e[t.WORKSPACE_ID]}static getDefaultClientId(){let e=this.getSettings();return process.env.CLIENT_ID||e[t.CLIENT_ID]}static getUserActivityUrl(){return`${this.getSettings()[t.BASE_URL]}${this.SAPI}/users/activity`}static getUserUrl(){return`${this.getSettings()[t.BASE_URL]}${this.SAPI}/users`}static getModelsUrl(){return`${this.getSettings()[t.BASE_URL]}${this.SAPI}/ai/models`}static getAppTokenUrl(){return`${this.getSettings()[t.BASE_URL]}${this.APP_TOKEN_PATH}`}static getConfigServiceUrl(e){let n=this.getSettings(),i=this.getDefaultClientId(),r=new URLSearchParams({keys:e});return`${n[t.BASE_URL]}${this.CONFIG_SERVICE_PATH}/${i}?${r.toString()}`}static getAppTokenRefreshBuffer(){return this.APP_TOKEN_REFRESH_BUFFER_MS}};function yp(t){try{let e=t.split(".");if(e.length!==3)return 0;let n=JSON.parse(atob(e[1]));return n.exp?n.exp*1e3:0}catch{return 0}}function uO(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}var Zv="Xq7Wm2zR9pLkVbN4cD8fH3jT6yG1sA5",EQ=BigInt(Zv.length);function _Q(t){if(t.length===0)return"";let e=0n;for(let i of t){let r=Zv.indexOf(i);if(r===-1)throw new Error(`Cannot decode app_key: character "${i}" is not in the expected alphabet`);e=e*EQ+BigInt(r)}let n=[];for(;e>0n;)n.unshift(Number(e&0xffn)),e>>=8n;for(let i of t)if(i===Zv[0])n.unshift(0);else break;return new TextDecoder().decode(new Uint8Array(n))}var ey=new Map,ig=new Map;async function OQ(t,e){let n=oe.getConfigServiceUrl(t);Ne(`sling-config: fetching ${n}`);let i;try{i=await fetch(n,{method:"GET",headers:{Accept:"application/json",Authorization:`Bearer ${e}`}})}catch(s){let a=s instanceof Error?s.message:String(s);throw new Error(`Cannot reach config service: ${a}`)}if(!i.ok){let s=`${i.status} ${i.statusText}`;try{let a=await i.json();a.message?s=String(a.message):a.error&&(s=String(a.error))}catch{}throw new Error(`Config service request failed: ${s}`)}let o=(await i.json())?.data?.config;if(!o||typeof o!="object")throw new Error("Config service response missing data.config");return o}async function pO(t,e){let n=ey.get(t);if(n)return n;let i=ig.get(t);if(i)return i;if(!e)throw new Error("Cannot reach config service: no Slingshot user token provided");let r=OQ(t,e).then(o=>(ey.set(t,o),o)).finally(()=>{ig.delete(t)});return ig.set(t,r),r}var oc=class{static async getSlingcliConfig(e){let n=await pO("slingcli",e),i=n.slingcli;if(!i||typeof i.app_id!="string"||typeof i.app_key!="string"||!i.app_id||!i.app_key)throw gt("sling-config: missing slingcli block",n),new Error("Config service did not return slingcli.app_id / slingcli.app_key for this client");return{app_id:i.app_id,app_key:_Q(i.app_key)}}static async getRemoteConfig(e,n){return pO(e,n)}static clearCache(){ey.clear(),ig=new Map}};import dO from"node:path";import yo from"node:fs";var LQ="sling.app-creds.json";function ty(){return dO.resolve(Ee(),LQ)}function mO(){let t=ty();if(!yo.existsSync(t))return null;try{let e=yo.readFileSync(t,"utf-8"),n=JSON.parse(e);return typeof n.app_id!="string"||typeof n.app_key!="string"||!n.app_id||!n.app_key?(gt("app-creds-store: invalid creds file, ignoring",n),null):{app_id:n.app_id,app_key:n.app_key}}catch(e){return gt("app-creds-store: failed to read creds file",e),null}}function ny(t){let e=ty(),n=dO.dirname(e);try{yo.existsSync(n)||yo.mkdirSync(n,{recursive:!0});let i={...t,savedAt:Date.now()};yo.writeFileSync(e,JSON.stringify(i,null,2),{encoding:"utf-8",mode:384});try{yo.chmodSync(e,384)}catch{}Ne(`app-creds-store: persisted to ${e}`)}catch(i){gt("app-creds-store: failed to persist creds",i)}}function hO(){let t=ty();try{yo.existsSync(t)&&(yo.unlinkSync(t),Ne(`app-creds-store: cleared ${t}`))}catch(e){gt("app-creds-store: failed to clear creds file",e)}}var og=class extends Error{constructor(n,i){super(i);this.status=n;this.name="AppTokenHttpError"}},wp=null,Sp=null,rg=null,sc=null;function gO(t){process.env[oe.SLINGSHOT_APP_TOKEN_ENV]=`Bearer ${t}`}function WQ(t){sc&&(clearTimeout(sc),sc=null);let e=t.expiresAt-Date.now();e<=0||(sc=setTimeout(()=>{sc=null,ni().catch(n=>{gt("app-token: scheduled refresh failed",n)})},e),sc.unref?.())}async function fO(t){let e=Buffer.from(`${t.app_id}:${t.app_key}`).toString("base64"),n=oe.getAppTokenUrl();Ne(`app-token: minting from ${n}`);let i;try{i=await fetch(n,{method:"GET",headers:{Accept:"application/json",Authorization:`Basic ${e}`}})}catch(a){let l=a instanceof Error?a.message:String(a);throw new Error(`Cannot reach app-token service: ${l}`)}if(!i.ok){let a=`${i.status} ${i.statusText}`;try{let l=await i.text()||"";l&&(a=l)}catch{}throw new og(i.status,`App token request failed: ${a}`)}let r=await i.json();if(!r.app_token||typeof r.expires_in!="number")throw new Error("App token response missing app_token or expires_in");let o=oe.getAppTokenRefreshBuffer(),s=Date.now()+r.expires_in*1e3-o;return Ne(`app-token: minted, expires at ${new Date(s).toISOString()}`),{token:r.app_token,expiresAt:s}}async function FQ(){let t=mO();if(t)return{creds:t,fromDisk:!0};if(!Sp)throw new Error("Cannot mint app token: no on-disk app credentials and no Slingshot user token available (please /login slingshot first)");let e=await oc.getSlingcliConfig(Sp);return ny(e),{creds:e,fromDisk:!1}}async function DQ(){let{creds:t,fromDisk:e}=await FQ();try{return await fO(t)}catch(n){let i=n instanceof og&&(n.status===401||n.status===403);if(!e||!i)throw n;if(gt("app-token: disk creds rejected (likely rotated), refetching from config service",{status:n.status}),hO(),!Sp)throw new Error("Cannot rotate app credentials: on-disk creds rejected and no Slingshot user token available (please /login slingshot)");let r=await oc.getSlingcliConfig(Sp);return ny(r),await fO(r)}}async function ni(t){if(t&&(Sp=t),wp&&wp.expiresAt>Date.now())return gO(wp.token),wp.token;if(rg)return(await rg).token;let e=DQ().then(i=>(wp=i,gO(i.token),WQ(i),i)).finally(()=>{rg=null});return rg=e,(await e).token}var Tp=null,iy=null;typeof process<"u"&&process.versions?.node&&(iy=import("node:http").then(t=>{Tp=t.createServer}));async function UQ(){if(Tp||(iy&&await iy,Tp))return Tp;throw new Error("Slingshot OAuth requires Node.js")}async function ry(t){let e=await UQ(),n,i,r,o=!1,s=new Promise((u,p)=>{i=u,r=p}),a=u=>{if(!o){o=!0;try{n.close()}catch{}u()}};n=e((u,p)=>{let d=new URL(u.url||"","http://127.0.0.1"),m=d.searchParams.get("code"),g=d.searchParams.get("state"),h=d.searchParams.get("clientId"),f=d.searchParams.get("error"),b=d.searchParams.get("error_description");if(f){p.writeHead(400,{"Content-Type":"text/html"}),p.end(`<html><body><h1>Login Failed</h1><p>${b||f}</p><p>You can close this window.</p></body></html>`),a(()=>r(new Error(`Login failed: ${b||f}`)));return}if(!m||!g){p.writeHead(400,{"Content-Type":"text/html"}),p.end("<html><body><h1>Login Failed</h1><p>Missing code or state in callback.</p><p>You can close this window.</p></body></html>"),a(()=>r(new Error("Missing code or state in callback")));return}p.writeHead(200,{"Content-Type":"text/html"}),p.end("<html><body><h1>Login Successful</h1><p>You can close this window and return to your terminal.</p><script>setTimeout(()=>window.close(),3000)</script></body></html>"),a(()=>i({code:m,state:g,clientId:h||""}))}),n.on("error",u=>{a(()=>r(u))});let l=setTimeout(()=>{a(()=>r(new Error("Login timeout - no callback received within 5 minutes")))},300*1e3);return n.on("close",()=>clearTimeout(l)),t&&t.addEventListener("abort",()=>{a(()=>r(new Error("Login cancelled")))}),{port:await new Promise((u,p)=>{n.once("error",p),n.listen(0,"127.0.0.1",()=>{let d=n.address();d&&typeof d=="object"?u(d.port):p(new Error("Failed to obtain loopback server port"))})}),result:s}}async function oy(t,e){if(!t)throw new Error("Missing exchange code");if(!e)throw new Error("Missing clientId for exchange");let n=oe.getExchangeUrl(),i;try{i=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",accept:"application/json"},body:JSON.stringify({code:t,clientId:e})})}catch(o){let s=o instanceof Error?o.message:String(o);throw new Error(`Cannot reach Studio Auth: ${s}`)}if(!i.ok){let o,s=`${i.status} ${i.statusText}`;try{let a=await i.json();o=a.error?.code,a.error?.message?s=a.error.message:a.message?s=a.message:o&&(s=o)}catch{}throw o==="INVALID_CALLBACK"?new Error("Login failed: exchange code is expired, already used, or bound to a different tenant. Please log in again."):new Error(`Code exchange failed: ${s}`)}let r=await i.json();if(!r.accessToken||!r.refreshToken)throw new Error("Exchange response missing accessToken or refreshToken");return r}function NQ(){return $Q(16).toString("hex")}function BQ(t){let e=new URL(t),n=e.searchParams.get("code"),i=e.searchParams.get("state"),r=e.searchParams.get("clientId");if(!n||!i)throw new Error("Pasted URL is missing code or state");return{code:n,state:i,clientId:r||""}}async function sy(t){let e=process.env.SLINGSHOT_TOKEN;if(e){let u=yp(e);return Ne("Using Slingshot token from SLINGSHOT_TOKEN environment variable"),await ni(e),{refresh:"",access:e,expires:u>0?u-oe.getTokenExpiryBuffer():Date.now()+10800*1e3,projectId:oe.getDefaultProjectId(),workspaceId:oe.getDefaultWorkspaceId()}}let{port:n,result:i}=await ry(t.signal),r=NQ(),o=oe.getDefaultClientId(),s=oe.getLoginUrl({port:n,localState:r,clientId:o||void 0});t.onAuth({url:s});let a;if(t.onManualCodeInput){let u=t.onManualCodeInput().then(BQ);a=await Promise.race([i,u])}else a=await i;if(a.state!==r)throw new Error("CSRF check failed - state does not match localState");if(!a.clientId)throw new Error("Login callback did not include clientId");let l=await oy(a.code,a.clientId),c=yp(l.accessToken);return await ni(l.accessToken),{refresh:l.refreshToken,access:l.accessToken,expires:c>0?c-oe.getTokenExpiryBuffer():Date.now()+10800*1e3,projectId:oe.getDefaultProjectId(),workspaceId:oe.getDefaultWorkspaceId()}}import{randomUUID as jQ}from"node:crypto";async function ay(t){if(!t.refresh)throw new Error("No refresh token available. Please login again.");let e;try{e=await ni()}catch(a){throw gt("auth/refresh: app token unavailable for refresh call",a),new Error(`Cannot refresh Slingshot token: app token unavailable (${a instanceof Error?a.message:String(a)}). Please /login slingshot.`)}let n=jQ(),i={accept:"application/json",rt:t.refresh,"trace-id":n,Authorization:`Bearer ${e}`},r;try{let a=oe.getRefreshUrl();r=await fetch(a,{headers:i})}catch(a){let l=a instanceof Error?a.message:String(a);throw new Error(`Cannot reach Slingshot server: ${l}`)}if(!r.ok){let a=`${r.status} ${r.statusText}`;try{let l=await r.json();l.message?a=String(l.message):l.error&&(a=String(l.error))}catch{}throw new Error(`Token refresh failed: ${a}`)}let o=await r.json();if(!o.accessToken)throw new Error("No access token in refresh response");let s=yp(o.accessToken);try{await ni(o.accessToken)}catch(a){throw gt("auth/refresh: app token refresh failed",a),a}return{refresh:o.refreshToken||t.refresh,access:o.accessToken,expires:s>0?s-oe.getTokenExpiryBuffer():Date.now()+10800*1e3,projectId:t.projectId,workspaceId:t.workspaceId}}var sg=[{id:"gpt-5.4-nano",name:"GPT-5.4 nano",baseUrl:"",reasoning:!0,thinkingLevelMap:{xhigh:"xhigh"},input:["text","image"],cost:{input:.2,output:1.25,cacheRead:.02,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,api:"openai-responses",provider:"slingshot"},{id:"gpt-4.1",name:"GPT-4.1",baseUrl:"",reasoning:!1,input:["text","image"],cost:{input:2,output:8,cacheRead:.5,cacheWrite:0},contextWindow:1047576,maxTokens:32768,provider:"slingshot",api:"openai-completions"},{id:"gpt-5",name:"GPT-5",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,provider:"slingshot",api:"openai-responses"},{id:"gpt-5-mini",name:"GPT-5 Mini",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:.25,output:2,cacheRead:.025,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,provider:"slingshot",api:"openai-responses"},{id:"gpt-5-nano",name:"GPT-5 Nano",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:.05,output:.4,cacheRead:.005,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,provider:"slingshot",api:"openai-responses"},{id:"gpt-5.1",name:"GPT-5.1",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.13,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,provider:"slingshot",api:"openai-responses"},{id:"gpt-5.2",name:"GPT-5.2",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,provider:"slingshot",api:"openai-responses"},{id:"gpt-5.4-mini",name:"GPT-5.4 mini",baseUrl:"",reasoning:!0,thinkingLevelMap:{xhigh:"xhigh"},input:["text","image"],cost:{input:.75,output:4.5,cacheRead:.075,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,api:"openai-responses",provider:"slingshot"},{id:"gpt-5.4",name:"GPT-5.4",baseUrl:"",reasoning:!0,thinkingLevelMap:{xhigh:"xhigh"},input:["text","image"],cost:{input:2.5,output:15,cacheRead:.25,cacheWrite:0},contextWindow:272e3,maxTokens:128e3,api:"openai-responses",provider:"slingshot"},{id:"gpt-5.5",name:"GPT-5.5",baseUrl:"",reasoning:!0,thinkingLevelMap:{xhigh:"xhigh"},input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:0},contextWindow:272e3,maxTokens:128e3,api:"openai-responses",provider:"slingshot"},{id:"gpt-5.6-luna",name:"GPT-5.6 Luna",baseUrl:"",reasoning:!0,thinkingLevelMap:{xhigh:"xhigh"},input:["text","image"],cost:{input:.96,output:5.76,cacheRead:.096,cacheWrite:0},contextWindow:105e4,maxTokens:5e5,api:"openai-responses",provider:"slingshot"},{id:"gpt-5.6-terra",name:"GPT-5.6 Terra",baseUrl:"",reasoning:!0,thinkingLevelMap:{xhigh:"xhigh"},input:["text","image"],cost:{input:2.4,output:14.4,cacheRead:.24,cacheWrite:0},contextWindow:105e4,maxTokens:5e5,api:"openai-responses",provider:"slingshot"},{id:"gpt-5.6-sol",name:"GPT-5.6 Sol",baseUrl:"",reasoning:!0,thinkingLevelMap:{xhigh:"xhigh"},input:["text","image"],cost:{input:4.8,output:28.8,cacheRead:.48,cacheWrite:0},contextWindow:105e4,maxTokens:5e5,api:"openai-responses",provider:"slingshot"},{id:"gpt-5.3-codex",name:"GPT-5.3 Codex",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,provider:"slingshot",api:"openai-responses"},{id:"claude-opus-4@20250514",name:"Claude Opus 4",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:15,output:75,cacheRead:1.5,cacheWrite:18.75},contextWindow:2e5,maxTokens:32e3,provider:"slingshot",api:"openai-completions"},{id:"claude-sonnet-4@20250514",name:"Claude Sonnet 4",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:2e5,maxTokens:64e3,provider:"slingshot",api:"openai-completions"},{id:"claude-sonnet-4-5@20250929",name:"Claude Sonnet 4.5",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:2e5,maxTokens:64e3,provider:"slingshot",api:"openai-completions"},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:1e6,maxTokens:64e3,provider:"slingshot",api:"openai-completions"},{id:"claude-opus-4-6",name:"Claude Opus 4.6",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,provider:"slingshot",api:"openai-completions"},{id:"claude-sonnet-5",name:"Claude Sonnet 5",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:1e5,maxTokens:64e3,provider:"slingshot",api:"openai-completions"},{id:"Qwen/Qwen3.6-27B-FP8",name:"Qwen 3.6 27B FP8",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:1.2,output:3.6,cacheRead:.3,cacheWrite:3.75},contextWindow:64e3,maxTokens:56e3,provider:"slingshot",api:"openai-completions"},{id:"o3",name:"O3",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:2,output:8,cacheRead:.5,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,provider:"slingshot",api:"openai-completions"},{id:"o3-mini",name:"o3-mini",baseUrl:"",reasoning:!0,input:["text"],cost:{input:1.1,output:4.4,cacheRead:.55,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,provider:"slingshot",api:"openai-completions"},{id:"o4-mini",name:"o4-mini",baseUrl:"",reasoning:!0,input:["text"],cost:{input:1.1,output:4.4,cacheRead:.28,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,provider:"slingshot",api:"openai-completions"},{id:"gemini-3.1-flash-lite",name:"Gemini 3.1 Flash Lite",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:.44,output:1.32,cacheRead:.075,cacheWrite:0},contextWindow:1e6,maxTokens:5e5,provider:"slingshot",api:"openai-completions"},{id:"gemini-3.1-pro-preview",name:"Gemini 3.1 Pro Preview",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:1.76,output:10.56,cacheRead:.075,cacheWrite:0},contextWindow:1e6,maxTokens:5e5,provider:"slingshot",api:"openai-completions"}];var ag=t=>Math.round((t??0)*1e3*1e6)/1e6,qQ=32768,GQ=new Map(sg.map(t=>[t.id,t.maxTokens]));async function bO(t,e){let n=await fetch(t,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!n.ok)throw new Error(`Slingshot models fetch failed: ${n.status}`);let i=await n.json();return KQ(Array.isArray(i)?i:i?.data??[])}function KQ(t){return t.filter(e=>e.model_type==="chat").map(e=>{let n=e.metadata??{},i=n.context_length??0,r=(n.supported_modalities??["text"]).filter(o=>o==="text"||o==="image");return{id:e.id,name:n.name||e.id,baseUrl:"",reasoning:!!n.reasoning,input:r,cost:{input:ag(e.inputCostPer1KTokens),output:ag(e.outputCostPer1KTokens),cacheRead:ag(e.cacheCostPer1KTokens?.read),cacheWrite:ag(e.cacheCostPer1KTokens?.write)},contextWindow:i,maxTokens:Math.min(i,GQ.get(e.id)??qQ),provider:"slingshot",api:e.supported_apis?.includes("responses")?"openai-responses":"openai-completions"}}).sort((e,n)=>e.id.localeCompare(n.id))}import xO from"node:fs";function vO(t,e,n){try{xO.writeFileSync(t,JSON.stringify({baseUrl:e,fetchedAt:new Date().toISOString(),models:n}))}catch{}}function yO(t,e){try{let n=JSON.parse(xO.readFileSync(t,"utf-8"));return n?.baseUrl!==e||!Array.isArray(n.models)||n.models.length===0?null:n.models}catch{return null}}var lg={name:"slingshot.cli",private:!0,type:"module",workspaces:["packages/*","packages/web-ui/example","packages/coding-agent/examples/extensions/with-deps","packages/coding-agent/examples/extensions/custom-provider-anthropic","packages/coding-agent/examples/extensions/custom-provider-gitlab-duo"],scripts:{clean:"npm run clean --workspaces",build:"cd packages/tui && npm run build && cd ../ai && npm run build && cd ../agent && npm run build && cd ../storage/sqlite-node && npm run build && cd ../../coding-agent && npm run build && cd ../server && npm run build","build:offline":"cd packages/tui && npm run build && cd ../ai && npm run build:offline && cd ../agent && npm run build && cd ../storage/sqlite-node && npm run build && cd ../../coding-agent && npm run build && cd ../server && npm run build",dev:'concurrently --names "ai,agent,coding-agent,web-ui,tui" --prefix-colors "cyan,yellow,red,white,green,magenta" "cd packages/ai && npm run dev" "cd packages/agent && npm run dev" "cd packages/coding-agent && npm run dev" "cd packages/server && npm run dev" "cd packages/tui && npm run dev"',"dev:tsc":'concurrently --names "ai,web-ui" --prefix-colors "cyan,green" "cd packages/ai && npm run dev:tsc" "cd packages/web-ui && npm run dev:tsc"',check:"","check:browser-smoke":"","test:models":"node scripts/test-models.mjs","profile:tui":"node scripts/profile-coding-agent-node.mjs --mode tui","profile:rpc":"node scripts/profile-coding-agent-node.mjs --mode rpc",test:"npm run test --workspaces --if-present","version:patch":"npm version patch -ws --no-git-tag-version && node scripts/sync-versions.js && shx rm -rf node_modules packages/*/node_modules package-lock.json && npm install","version:minor":"npm version minor -ws --no-git-tag-version && node scripts/sync-versions.js && shx rm -rf node_modules packages/*/node_modules package-lock.json && npm install","version:major":"npm version major -ws --no-git-tag-version && node scripts/sync-versions.js && shx rm -rf node_modules packages/*/node_modules package-lock.json && npm install","version:set":"npm version -ws",prepublishOnly:"npm run clean && npm run build && npm run check",publish:"npm run prepublishOnly && npm publish -ws --access public","publish:dry":"npm run prepublishOnly && npm publish -ws --access public --dry-run","release:patch":"node scripts/release.mjs patch","release:minor":"node scripts/release.mjs minor","release:major":"node scripts/release.mjs major",prepare:"husky"},devDependencies:{"@anthropic-ai/sandbox-runtime":"0.0.57","@biomejs/biome":"2.3.15","@types/better-sqlite3":"^7.6.13","@types/lodash.mergewith":"^4.6.9","@types/node":"24.13.2","@types/turndown":"^5.0.6","@typescript/native-preview":"7.0.0-dev.20260120.1",concurrently:"^9.2.3",esbuild:"0.28.1","fast-xml-parser":"^5.9.3",husky:"9.1.7",jiti:"2.7.0",psadk:"^1.5.1",shx:"0.4.0",tsx:"4.22.4",turbo:"^2.9.18",typescript:"5.9.3",vitest:"^4.1.9"},engines:{node:">=20.0.0"},slingVersion:"3.0.20260811-2",overrides:{rimraf:"6.1.2",gaxios:{rimraf:"6.1.2"},postcss:"8.5.14",next:{postcss:"8.5.14"},"ip-address":"^10.1.1","@modelcontextprotocol/sdk":"^1.29.0",ai:">=5.0.52","fast-xml-parser":"^5.9.3","@aws-sdk/xml-builder":{"fast-xml-parser":"^5.9.3"},"adaptivecards-templating":{"adaptive-expressions":{"fast-xml-parser":"^5.5.8"}},picomatch:"^4.0.4","path-to-regexp":"8.4.1",router:{"path-to-regexp":"8.4.1"},minimatch:"^10.2.3",tar:"7.5.11",react:"19.1.1","react-dom":"19.1.1","@types/react":"19","@types/react-dom":"19",tailwindcss:"4.1.12",lightningcss:"1.30.2",glob:{".":"11.1.0",minimatch:"10.2.3"},prismjs:"^1.30.0",qs:"^6.15.0","@hono/node-server":"1.19.14",protobufjs:"^8.2.0","@opentelemetry/otlp-transformer":{protobufjs:"^8.2.0"},langchain:{langsmith:">=0.7.0"},hono:"4.12.18",fsevents:"^2.3.3",swiper:"^12.1.2",lodash:"^4.18.0","lodash-es":"^4.18.1",axios:"^1.15.0","ibm-cloud-sdk-core":"^5.4.11",dompurify:">=3.4.0","react-markdown-mermaid":{mermaid:"10.9.6"}},dependencies:{"@modelcontextprotocol/sdk":"^1.29.0","@mozilla/readability":"^0.6.0","better-sqlite3":"^12.11.1","compound-engineering-pi":"^0.2.4","get-east-asian-width":"^1.4.0",linkedom:"^0.18.12",turndown:"^7.2.4",unpdf:"^1.6.2"}};import kp from"chalk";function wO(t,e){return{render(n){let i=` \u26AC _______. __ __ .__ __. _______
404
+ `;xo.appendFileSync(kr,i)}catch{}}var vo=null;function cO(t){if(!t)return;let e=t.trim();if(e)return e.replace(/\/+$/,"")}var oe=class t{static{this.BASE_URL="base_url"}static{this.ANALYTICS_DOMAIN="analytics_domain"}static{this.CLIENT_ID="client_id"}static{this.PROJECT_ID="project_id"}static{this.WORKSPACE_ID="workspace_id"}static{this.PROJECT_NAME="project_name"}static{this.WORKSPACE_NAME="workspace_name"}static{this.defaultValues={[t.BASE_URL]:"https://sapientaiproducts.com",[t.ANALYTICS_DOMAIN]:"https://slingshot.sapientaiproducts.com",[t.CLIENT_ID]:"b97fbef7-cad9-4e56-9850-39e86c8fdf61",[t.PROJECT_ID]:"fa8121c4-e2fc-48f1-9478-8949c04e13cc",[t.WORKSPACE_ID]:"6e5756eb-d7e2-4d80-ad07-9d7a51600d85"}}static{this.LOGIN_PATH="/web/v1/studio-auth/login"}static{this.EXCHANGE_PATH="/api/v1/studio-auth/auth/desktop/exchange"}static{this.REFRESH_PATH="/api/v3/auth/refreshtoken"}static{this.API_BASE_PATH="/api/v1/llm"}static{this.SAGE_EVENTS_PATH="/api/v1/ai-portal/sage_events"}static{this.APP_TOKEN_PATH="/api/v3/auth/app-token"}static{this.CONFIG_SERVICE_PATH="/api/v2/configservice/client"}static{this.SLINGSHOT_RAG_MCP="/api/v1/ai-prompt-lib/mcp/"}static{this.SAPI="/save/api/v1"}static{this.REFRESH_CLIENT_NAME="machine"}static{this.SLINGSHOT_APP_TOKEN_ENV="SLINGSHOT_APP_TOKEN_HEADER"}static{this.APP_TOKEN_REFRESH_BUFFER_MS=60*1e3}static{this.TOKEN_EXPIRY_BUFFER_MS=300*1e3}static{this.CLIENT_NAME="desktop"}static defaults(e){return this.defaultValues[e]}static getLocalSettingsPath(){return ng.resolve(process.cwd(),".sling","sling.settings.json")}static getGlobalSettingsPath(){return ng.resolve(Ee(),"sling.settings.json")}static getSettingsPath(e){if(e==="local")return this.getLocalSettingsPath();if(e==="global")return this.getGlobalSettingsPath();let n=this.getLocalSettingsPath();return wi.existsSync(n)?n:this.getGlobalSettingsPath()}static getSettings(){if(!vo){let i=this.getSettingsPath();try{if(wi.existsSync(i)){let r=wi.readFileSync(i,"utf-8"),o=JSON.parse(r)||{};vo={...this.defaultValues,...o}}else{let r=ng.dirname(i);wi.existsSync(r)||wi.mkdirSync(r,{recursive:!0}),wi.writeFileSync(i,JSON.stringify(this.defaultValues,null,2),"utf-8"),vo={...this.defaultValues}}}catch(r){gt("Error reading/writing sling.settings.json: ",r),vo={...this.defaultValues}}}let e=cO(process.env.SLINGSHOT_API_DOMAIN),n=cO(process.env.SLINGSHOT_ANALYTICS_DOMAIN);return{...vo,[t.BASE_URL]:e||vo[t.BASE_URL],[t.ANALYTICS_DOMAIN]:n||vo[t.ANALYTICS_DOMAIN]}}static updateSettings(e,n){let i=n?.scope??"global",r=this.getSettingsPath(i);try{let o={};if(wi.existsSync(r)){let l=wi.readFileSync(r,"utf-8");o=JSON.parse(l)||{}}let s={...this.defaultValues,...o,...e},a=ng.dirname(r);wi.existsSync(a)||wi.mkdirSync(a,{recursive:!0}),wi.writeFileSync(r,JSON.stringify(s,null,2),"utf-8"),vo=null}catch(o){gt("Error updating sling.settings.json: ",o)}}static getLoginUrl(e){let n=this.getSettings(),i=new URLSearchParams({client:this.CLIENT_NAME,port:String(e.port),localState:e.localState});return e.clientId&&i.set("clientId",e.clientId),`${n[t.BASE_URL]}${this.LOGIN_PATH}?${i.toString()}`}static getExchangeUrl(){return`${this.getSettings()[t.BASE_URL]}${this.EXCHANGE_PATH}`}static getRefreshUrl(){let e=this.getSettings(),n=new URLSearchParams({client:this.REFRESH_CLIENT_NAME});return`${e[t.BASE_URL]}${this.REFRESH_PATH}?${n.toString()}`}static getApiBaseUrl(){return`${this.getSettings()[t.BASE_URL]}${this.API_BASE_PATH}`}static getSageEventsUrl(){return`${this.getSettings()[t.ANALYTICS_DOMAIN]}${this.SAGE_EVENTS_PATH}`}static getSlingshotRAGMCPUrl(){return`${this.getSettings()[t.ANALYTICS_DOMAIN]}${this.SLINGSHOT_RAG_MCP}`}static getTokenExpiryBuffer(){return this.TOKEN_EXPIRY_BUFFER_MS}static getDefaultProjectId(){let e=this.getSettings();return process.env.SLINGSHOT_PROJECT_ID||e[t.PROJECT_ID]}static getDefaultWorkspaceId(){let e=this.getSettings();return process.env.SLINGSHOT_WORKSPACE_ID||e[t.WORKSPACE_ID]}static getDefaultClientId(){let e=this.getSettings();return process.env.CLIENT_ID||e[t.CLIENT_ID]}static getUserActivityUrl(){return`${this.getSettings()[t.BASE_URL]}${this.SAPI}/users/activity`}static getUserUrl(){return`${this.getSettings()[t.BASE_URL]}${this.SAPI}/users`}static getModelsUrl(){return`${this.getSettings()[t.BASE_URL]}${this.SAPI}/ai/models`}static getAppTokenUrl(){return`${this.getSettings()[t.BASE_URL]}${this.APP_TOKEN_PATH}`}static getConfigServiceUrl(e){let n=this.getSettings(),i=this.getDefaultClientId(),r=new URLSearchParams({keys:e});return`${n[t.BASE_URL]}${this.CONFIG_SERVICE_PATH}/${i}?${r.toString()}`}static getAppTokenRefreshBuffer(){return this.APP_TOKEN_REFRESH_BUFFER_MS}};function yp(t){try{let e=t.split(".");if(e.length!==3)return 0;let n=JSON.parse(atob(e[1]));return n.exp?n.exp*1e3:0}catch{return 0}}function uO(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}var Zv="Xq7Wm2zR9pLkVbN4cD8fH3jT6yG1sA5",EQ=BigInt(Zv.length);function _Q(t){if(t.length===0)return"";let e=0n;for(let i of t){let r=Zv.indexOf(i);if(r===-1)throw new Error(`Cannot decode app_key: character "${i}" is not in the expected alphabet`);e=e*EQ+BigInt(r)}let n=[];for(;e>0n;)n.unshift(Number(e&0xffn)),e>>=8n;for(let i of t)if(i===Zv[0])n.unshift(0);else break;return new TextDecoder().decode(new Uint8Array(n))}var ey=new Map,ig=new Map;async function OQ(t,e){let n=oe.getConfigServiceUrl(t);Ne(`sling-config: fetching ${n}`);let i;try{i=await fetch(n,{method:"GET",headers:{Accept:"application/json",Authorization:`Bearer ${e}`}})}catch(s){let a=s instanceof Error?s.message:String(s);throw new Error(`Cannot reach config service: ${a}`)}if(!i.ok){let s=`${i.status} ${i.statusText}`;try{let a=await i.json();a.message?s=String(a.message):a.error&&(s=String(a.error))}catch{}throw new Error(`Config service request failed: ${s}`)}let o=(await i.json())?.data?.config;if(!o||typeof o!="object")throw new Error("Config service response missing data.config");return o}async function pO(t,e){let n=ey.get(t);if(n)return n;let i=ig.get(t);if(i)return i;if(!e)throw new Error("Cannot reach config service: no Slingshot user token provided");let r=OQ(t,e).then(o=>(ey.set(t,o),o)).finally(()=>{ig.delete(t)});return ig.set(t,r),r}var oc=class{static async getSlingcliConfig(e){let n=await pO("slingcli",e),i=n.slingcli;if(!i||typeof i.app_id!="string"||typeof i.app_key!="string"||!i.app_id||!i.app_key)throw gt("sling-config: missing slingcli block",n),new Error("Config service did not return slingcli.app_id / slingcli.app_key for this client");return{app_id:i.app_id,app_key:_Q(i.app_key)}}static async getRemoteConfig(e,n){return pO(e,n)}static clearCache(){ey.clear(),ig=new Map}};import dO from"node:path";import yo from"node:fs";var LQ="sling.app-creds.json";function ty(){return dO.resolve(Ee(),LQ)}function mO(){let t=ty();if(!yo.existsSync(t))return null;try{let e=yo.readFileSync(t,"utf-8"),n=JSON.parse(e);return typeof n.app_id!="string"||typeof n.app_key!="string"||!n.app_id||!n.app_key?(gt("app-creds-store: invalid creds file, ignoring",n),null):{app_id:n.app_id,app_key:n.app_key}}catch(e){return gt("app-creds-store: failed to read creds file",e),null}}function ny(t){let e=ty(),n=dO.dirname(e);try{yo.existsSync(n)||yo.mkdirSync(n,{recursive:!0});let i={...t,savedAt:Date.now()};yo.writeFileSync(e,JSON.stringify(i,null,2),{encoding:"utf-8",mode:384});try{yo.chmodSync(e,384)}catch{}Ne(`app-creds-store: persisted to ${e}`)}catch(i){gt("app-creds-store: failed to persist creds",i)}}function hO(){let t=ty();try{yo.existsSync(t)&&(yo.unlinkSync(t),Ne(`app-creds-store: cleared ${t}`))}catch(e){gt("app-creds-store: failed to clear creds file",e)}}var og=class extends Error{constructor(n,i){super(i);this.status=n;this.name="AppTokenHttpError"}},wp=null,Sp=null,rg=null,sc=null;function gO(t){process.env[oe.SLINGSHOT_APP_TOKEN_ENV]=`Bearer ${t}`}function WQ(t){sc&&(clearTimeout(sc),sc=null);let e=t.expiresAt-Date.now();e<=0||(sc=setTimeout(()=>{sc=null,ni().catch(n=>{gt("app-token: scheduled refresh failed",n)})},e),sc.unref?.())}async function fO(t){let e=Buffer.from(`${t.app_id}:${t.app_key}`).toString("base64"),n=oe.getAppTokenUrl();Ne(`app-token: minting from ${n}`);let i;try{i=await fetch(n,{method:"GET",headers:{Accept:"application/json",Authorization:`Basic ${e}`}})}catch(a){let l=a instanceof Error?a.message:String(a);throw new Error(`Cannot reach app-token service: ${l}`)}if(!i.ok){let a=`${i.status} ${i.statusText}`;try{let l=await i.text()||"";l&&(a=l)}catch{}throw new og(i.status,`App token request failed: ${a}`)}let r=await i.json();if(!r.app_token||typeof r.expires_in!="number")throw new Error("App token response missing app_token or expires_in");let o=oe.getAppTokenRefreshBuffer(),s=Date.now()+r.expires_in*1e3-o;return Ne(`app-token: minted, expires at ${new Date(s).toISOString()}`),{token:r.app_token,expiresAt:s}}async function FQ(){let t=mO();if(t)return{creds:t,fromDisk:!0};if(!Sp)throw new Error("Cannot mint app token: no on-disk app credentials and no Slingshot user token available (please /login slingshot first)");let e=await oc.getSlingcliConfig(Sp);return ny(e),{creds:e,fromDisk:!1}}async function DQ(){let{creds:t,fromDisk:e}=await FQ();try{return await fO(t)}catch(n){let i=n instanceof og&&(n.status===401||n.status===403);if(!e||!i)throw n;if(gt("app-token: disk creds rejected (likely rotated), refetching from config service",{status:n.status}),hO(),!Sp)throw new Error("Cannot rotate app credentials: on-disk creds rejected and no Slingshot user token available (please /login slingshot)");let r=await oc.getSlingcliConfig(Sp);return ny(r),await fO(r)}}async function ni(t){if(t&&(Sp=t),wp&&wp.expiresAt>Date.now())return gO(wp.token),wp.token;if(rg)return(await rg).token;let e=DQ().then(i=>(wp=i,gO(i.token),WQ(i),i)).finally(()=>{rg=null});return rg=e,(await e).token}var Tp=null,iy=null;typeof process<"u"&&process.versions?.node&&(iy=import("node:http").then(t=>{Tp=t.createServer}));async function UQ(){if(Tp||(iy&&await iy,Tp))return Tp;throw new Error("Slingshot OAuth requires Node.js")}async function ry(t){let e=await UQ(),n,i,r,o=!1,s=new Promise((u,p)=>{i=u,r=p}),a=u=>{if(!o){o=!0;try{n.close()}catch{}u()}};n=e((u,p)=>{let d=new URL(u.url||"","http://127.0.0.1"),m=d.searchParams.get("code"),g=d.searchParams.get("state"),h=d.searchParams.get("clientId"),f=d.searchParams.get("error"),b=d.searchParams.get("error_description");if(f){p.writeHead(400,{"Content-Type":"text/html"}),p.end(`<html><body><h1>Login Failed</h1><p>${b||f}</p><p>You can close this window.</p></body></html>`),a(()=>r(new Error(`Login failed: ${b||f}`)));return}if(!m||!g){p.writeHead(400,{"Content-Type":"text/html"}),p.end("<html><body><h1>Login Failed</h1><p>Missing code or state in callback.</p><p>You can close this window.</p></body></html>"),a(()=>r(new Error("Missing code or state in callback")));return}p.writeHead(200,{"Content-Type":"text/html"}),p.end("<html><body><h1>Login Successful</h1><p>You can close this window and return to your terminal.</p><script>setTimeout(()=>window.close(),3000)</script></body></html>"),a(()=>i({code:m,state:g,clientId:h||""}))}),n.on("error",u=>{a(()=>r(u))});let l=setTimeout(()=>{a(()=>r(new Error("Login timeout - no callback received within 5 minutes")))},300*1e3);return n.on("close",()=>clearTimeout(l)),t&&t.addEventListener("abort",()=>{a(()=>r(new Error("Login cancelled")))}),{port:await new Promise((u,p)=>{n.once("error",p),n.listen(0,"127.0.0.1",()=>{let d=n.address();d&&typeof d=="object"?u(d.port):p(new Error("Failed to obtain loopback server port"))})}),result:s}}async function oy(t,e){if(!t)throw new Error("Missing exchange code");if(!e)throw new Error("Missing clientId for exchange");let n=oe.getExchangeUrl(),i;try{i=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",accept:"application/json"},body:JSON.stringify({code:t,clientId:e})})}catch(o){let s=o instanceof Error?o.message:String(o);throw new Error(`Cannot reach Studio Auth: ${s}`)}if(!i.ok){let o,s=`${i.status} ${i.statusText}`;try{let a=await i.json();o=a.error?.code,a.error?.message?s=a.error.message:a.message?s=a.message:o&&(s=o)}catch{}throw o==="INVALID_CALLBACK"?new Error("Login failed: exchange code is expired, already used, or bound to a different tenant. Please log in again."):new Error(`Code exchange failed: ${s}`)}let r=await i.json();if(!r.accessToken||!r.refreshToken)throw new Error("Exchange response missing accessToken or refreshToken");return r}function NQ(){return $Q(16).toString("hex")}function BQ(t){let e=new URL(t),n=e.searchParams.get("code"),i=e.searchParams.get("state"),r=e.searchParams.get("clientId");if(!n||!i)throw new Error("Pasted URL is missing code or state");return{code:n,state:i,clientId:r||""}}async function sy(t){let e=process.env.SLINGSHOT_TOKEN;if(e){let u=yp(e);return Ne("Using Slingshot token from SLINGSHOT_TOKEN environment variable"),await ni(e),{refresh:"",access:e,expires:u>0?u-oe.getTokenExpiryBuffer():Date.now()+10800*1e3,projectId:oe.getDefaultProjectId(),workspaceId:oe.getDefaultWorkspaceId()}}let{port:n,result:i}=await ry(t.signal),r=NQ(),o=oe.getDefaultClientId(),s=oe.getLoginUrl({port:n,localState:r,clientId:o||void 0});t.onAuth({url:s});let a;if(t.onManualCodeInput){let u=t.onManualCodeInput().then(BQ);a=await Promise.race([i,u])}else a=await i;if(a.state!==r)throw new Error("CSRF check failed - state does not match localState");if(!a.clientId)throw new Error("Login callback did not include clientId");let l=await oy(a.code,a.clientId),c=yp(l.accessToken);return await ni(l.accessToken),{refresh:l.refreshToken,access:l.accessToken,expires:c>0?c-oe.getTokenExpiryBuffer():Date.now()+10800*1e3,projectId:oe.getDefaultProjectId(),workspaceId:oe.getDefaultWorkspaceId()}}import{randomUUID as jQ}from"node:crypto";async function ay(t){if(!t.refresh)throw new Error("No refresh token available. Please login again.");let e;try{e=await ni()}catch(a){throw gt("auth/refresh: app token unavailable for refresh call",a),new Error(`Cannot refresh Slingshot token: app token unavailable (${a instanceof Error?a.message:String(a)}). Please /login slingshot.`)}let n=jQ(),i={accept:"application/json",rt:t.refresh,"trace-id":n,Authorization:`Bearer ${e}`},r;try{let a=oe.getRefreshUrl();r=await fetch(a,{headers:i})}catch(a){let l=a instanceof Error?a.message:String(a);throw new Error(`Cannot reach Slingshot server: ${l}`)}if(!r.ok){let a=`${r.status} ${r.statusText}`;try{let l=await r.json();l.message?a=String(l.message):l.error&&(a=String(l.error))}catch{}throw new Error(`Token refresh failed: ${a}`)}let o=await r.json();if(!o.accessToken)throw new Error("No access token in refresh response");let s=yp(o.accessToken);try{await ni(o.accessToken)}catch(a){throw gt("auth/refresh: app token refresh failed",a),a}return{refresh:o.refreshToken||t.refresh,access:o.accessToken,expires:s>0?s-oe.getTokenExpiryBuffer():Date.now()+10800*1e3,projectId:t.projectId,workspaceId:t.workspaceId}}var sg=[{id:"gpt-5.4-nano",name:"GPT-5.4 nano",baseUrl:"",reasoning:!0,thinkingLevelMap:{xhigh:"xhigh"},input:["text","image"],cost:{input:.2,output:1.25,cacheRead:.02,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,api:"openai-responses",provider:"slingshot"},{id:"gpt-4.1",name:"GPT-4.1",baseUrl:"",reasoning:!1,input:["text","image"],cost:{input:2,output:8,cacheRead:.5,cacheWrite:0},contextWindow:1047576,maxTokens:32768,provider:"slingshot",api:"openai-completions"},{id:"gpt-5",name:"GPT-5",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.125,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,provider:"slingshot",api:"openai-responses"},{id:"gpt-5-mini",name:"GPT-5 Mini",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:.25,output:2,cacheRead:.025,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,provider:"slingshot",api:"openai-responses"},{id:"gpt-5-nano",name:"GPT-5 Nano",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:.05,output:.4,cacheRead:.005,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,provider:"slingshot",api:"openai-responses"},{id:"gpt-5.1",name:"GPT-5.1",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:1.25,output:10,cacheRead:.13,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,provider:"slingshot",api:"openai-responses"},{id:"gpt-5.2",name:"GPT-5.2",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,provider:"slingshot",api:"openai-responses"},{id:"gpt-5.4-mini",name:"GPT-5.4 mini",baseUrl:"",reasoning:!0,thinkingLevelMap:{xhigh:"xhigh"},input:["text","image"],cost:{input:.75,output:4.5,cacheRead:.075,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,api:"openai-responses",provider:"slingshot"},{id:"gpt-5.4",name:"GPT-5.4",baseUrl:"",reasoning:!0,thinkingLevelMap:{xhigh:"xhigh"},input:["text","image"],cost:{input:2.5,output:15,cacheRead:.25,cacheWrite:0},contextWindow:272e3,maxTokens:128e3,api:"openai-responses",provider:"slingshot"},{id:"gpt-5.5",name:"GPT-5.5",baseUrl:"",reasoning:!0,thinkingLevelMap:{xhigh:"xhigh"},input:["text","image"],cost:{input:5,output:30,cacheRead:.5,cacheWrite:0},contextWindow:272e3,maxTokens:128e3,api:"openai-responses",provider:"slingshot"},{id:"gpt-5.6-luna",name:"GPT-5.6 Luna",baseUrl:"",reasoning:!0,thinkingLevelMap:{xhigh:"xhigh"},input:["text","image"],cost:{input:.96,output:5.76,cacheRead:.096,cacheWrite:0},contextWindow:105e4,maxTokens:5e5,api:"openai-responses",provider:"slingshot"},{id:"gpt-5.6-terra",name:"GPT-5.6 Terra",baseUrl:"",reasoning:!0,thinkingLevelMap:{xhigh:"xhigh"},input:["text","image"],cost:{input:2.4,output:14.4,cacheRead:.24,cacheWrite:0},contextWindow:105e4,maxTokens:5e5,api:"openai-responses",provider:"slingshot"},{id:"gpt-5.6-sol",name:"GPT-5.6 Sol",baseUrl:"",reasoning:!0,thinkingLevelMap:{xhigh:"xhigh"},input:["text","image"],cost:{input:4.8,output:28.8,cacheRead:.48,cacheWrite:0},contextWindow:105e4,maxTokens:5e5,api:"openai-responses",provider:"slingshot"},{id:"gpt-5.3-codex",name:"GPT-5.3 Codex",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:1.75,output:14,cacheRead:.175,cacheWrite:0},contextWindow:4e5,maxTokens:128e3,provider:"slingshot",api:"openai-responses"},{id:"claude-opus-4@20250514",name:"Claude Opus 4",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:15,output:75,cacheRead:1.5,cacheWrite:18.75},contextWindow:2e5,maxTokens:32e3,provider:"slingshot",api:"openai-completions"},{id:"claude-sonnet-4@20250514",name:"Claude Sonnet 4",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:2e5,maxTokens:64e3,provider:"slingshot",api:"openai-completions"},{id:"claude-sonnet-4-5@20250929",name:"Claude Sonnet 4.5",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:2e5,maxTokens:64e3,provider:"slingshot",api:"openai-completions"},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:1e6,maxTokens:64e3,provider:"slingshot",api:"openai-completions"},{id:"claude-opus-4-6",name:"Claude Opus 4.6",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:5,output:25,cacheRead:.5,cacheWrite:6.25},contextWindow:1e6,maxTokens:128e3,provider:"slingshot",api:"openai-completions"},{id:"claude-sonnet-5",name:"Claude Sonnet 5",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:3,output:15,cacheRead:.3,cacheWrite:3.75},contextWindow:1e5,maxTokens:64e3,provider:"slingshot",api:"openai-completions"},{id:"Qwen/Qwen3.6-27B-FP8",name:"Qwen 3.6 27B FP8",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:1.2,output:3.6,cacheRead:.3,cacheWrite:3.75},contextWindow:64e3,maxTokens:56e3,provider:"slingshot",api:"openai-completions"},{id:"o3",name:"O3",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:2,output:8,cacheRead:.5,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,provider:"slingshot",api:"openai-completions"},{id:"o3-mini",name:"o3-mini",baseUrl:"",reasoning:!0,input:["text"],cost:{input:1.1,output:4.4,cacheRead:.55,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,provider:"slingshot",api:"openai-completions"},{id:"o4-mini",name:"o4-mini",baseUrl:"",reasoning:!0,input:["text"],cost:{input:1.1,output:4.4,cacheRead:.28,cacheWrite:0},contextWindow:2e5,maxTokens:1e5,provider:"slingshot",api:"openai-completions"},{id:"gemini-3.1-flash-lite",name:"Gemini 3.1 Flash Lite",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:.44,output:1.32,cacheRead:.075,cacheWrite:0},contextWindow:1e6,maxTokens:5e5,provider:"slingshot",api:"openai-completions"},{id:"gemini-3.1-pro-preview",name:"Gemini 3.1 Pro Preview",baseUrl:"",reasoning:!0,input:["text","image"],cost:{input:1.76,output:10.56,cacheRead:.075,cacheWrite:0},contextWindow:1e6,maxTokens:5e5,provider:"slingshot",api:"openai-completions"}];var ag=t=>Math.round((t??0)*1e3*1e6)/1e6,qQ=32768,GQ=new Map(sg.map(t=>[t.id,t.maxTokens]));async function bO(t,e){let n=await fetch(t,{headers:{Authorization:`Bearer ${e}`,Accept:"application/json"}});if(!n.ok)throw new Error(`Slingshot models fetch failed: ${n.status}`);let i=await n.json();return KQ(Array.isArray(i)?i:i?.data??[])}function KQ(t){return t.filter(e=>e.model_type==="chat").map(e=>{let n=e.metadata??{},i=n.context_length??0,r=(n.supported_modalities??["text"]).filter(o=>o==="text"||o==="image");return{id:e.id,name:n.name||e.id,baseUrl:"",reasoning:!!n.reasoning,input:r,cost:{input:ag(e.inputCostPer1KTokens),output:ag(e.outputCostPer1KTokens),cacheRead:ag(e.cacheCostPer1KTokens?.read),cacheWrite:ag(e.cacheCostPer1KTokens?.write)},contextWindow:i,maxTokens:Math.min(i,GQ.get(e.id)??qQ),provider:"slingshot",api:e.supported_apis?.includes("responses")?"openai-responses":"openai-completions"}}).sort((e,n)=>e.id.localeCompare(n.id))}import xO from"node:fs";function vO(t,e,n){try{xO.writeFileSync(t,JSON.stringify({baseUrl:e,fetchedAt:new Date().toISOString(),models:n}))}catch{}}function yO(t,e){try{let n=JSON.parse(xO.readFileSync(t,"utf-8"));return n?.baseUrl!==e||!Array.isArray(n.models)||n.models.length===0?null:n.models}catch{return null}}var lg={name:"slingshot.cli",private:!0,type:"module",workspaces:["packages/*","packages/web-ui/example","packages/coding-agent/examples/extensions/with-deps","packages/coding-agent/examples/extensions/custom-provider-anthropic","packages/coding-agent/examples/extensions/custom-provider-gitlab-duo"],scripts:{clean:"npm run clean --workspaces",build:"cd packages/tui && npm run build && cd ../ai && npm run build && cd ../agent && npm run build && cd ../storage/sqlite-node && npm run build && cd ../../coding-agent && npm run build && cd ../server && npm run build","build:offline":"cd packages/tui && npm run build && cd ../ai && npm run build:offline && cd ../agent && npm run build && cd ../storage/sqlite-node && npm run build && cd ../../coding-agent && npm run build && cd ../server && npm run build",dev:'concurrently --names "ai,agent,coding-agent,web-ui,tui" --prefix-colors "cyan,yellow,red,white,green,magenta" "cd packages/ai && npm run dev" "cd packages/agent && npm run dev" "cd packages/coding-agent && npm run dev" "cd packages/server && npm run dev" "cd packages/tui && npm run dev"',"dev:tsc":'concurrently --names "ai,web-ui" --prefix-colors "cyan,green" "cd packages/ai && npm run dev:tsc" "cd packages/web-ui && npm run dev:tsc"',check:"","check:browser-smoke":"","test:models":"node scripts/test-models.mjs","profile:tui":"node scripts/profile-coding-agent-node.mjs --mode tui","profile:rpc":"node scripts/profile-coding-agent-node.mjs --mode rpc",test:"npm run test --workspaces --if-present","version:patch":"npm version patch -ws --no-git-tag-version && node scripts/sync-versions.js && shx rm -rf node_modules packages/*/node_modules package-lock.json && npm install","version:minor":"npm version minor -ws --no-git-tag-version && node scripts/sync-versions.js && shx rm -rf node_modules packages/*/node_modules package-lock.json && npm install","version:major":"npm version major -ws --no-git-tag-version && node scripts/sync-versions.js && shx rm -rf node_modules packages/*/node_modules package-lock.json && npm install","version:set":"npm version -ws",prepublishOnly:"npm run clean && npm run build && npm run check",publish:"npm run prepublishOnly && npm publish -ws --access public","publish:dry":"npm run prepublishOnly && npm publish -ws --access public --dry-run","release:patch":"node scripts/release.mjs patch","release:minor":"node scripts/release.mjs minor","release:major":"node scripts/release.mjs major",prepare:"husky"},devDependencies:{"@anthropic-ai/sandbox-runtime":"0.0.57","@biomejs/biome":"2.3.15","@types/better-sqlite3":"^7.6.13","@types/lodash.mergewith":"^4.6.9","@types/node":"24.13.2","@types/turndown":"^5.0.6","@typescript/native-preview":"7.0.0-dev.20260120.1",concurrently:"^9.2.3",esbuild:"0.28.1","fast-xml-parser":"^5.9.3",husky:"9.1.7",jiti:"2.7.0",psadk:"^1.5.1",shx:"0.4.0",tsx:"4.22.4",turbo:"^2.9.18",typescript:"5.9.3",vitest:"^4.1.9"},engines:{node:">=20.0.0"},slingVersion:"3.0.20260811-3",overrides:{rimraf:"6.1.2",gaxios:{rimraf:"6.1.2"},postcss:"8.5.14",next:{postcss:"8.5.14"},"ip-address":"^10.1.1","@modelcontextprotocol/sdk":"^1.29.0",ai:">=5.0.52","fast-xml-parser":"^5.9.3","@aws-sdk/xml-builder":{"fast-xml-parser":"^5.9.3"},"adaptivecards-templating":{"adaptive-expressions":{"fast-xml-parser":"^5.5.8"}},picomatch:"^4.0.4","path-to-regexp":"8.4.1",router:{"path-to-regexp":"8.4.1"},minimatch:"^10.2.3",tar:"7.5.11",react:"19.1.1","react-dom":"19.1.1","@types/react":"19","@types/react-dom":"19",tailwindcss:"4.1.12",lightningcss:"1.30.2",glob:{".":"11.1.0",minimatch:"10.2.3"},prismjs:"^1.30.0",qs:"^6.15.0","@hono/node-server":"1.19.14",protobufjs:"^8.2.0","@opentelemetry/otlp-transformer":{protobufjs:"^8.2.0"},langchain:{langsmith:">=0.7.0"},hono:"4.12.18",fsevents:"^2.3.3",swiper:"^12.1.2",lodash:"^4.18.0","lodash-es":"^4.18.1",axios:"^1.15.0","ibm-cloud-sdk-core":"^5.4.11",dompurify:">=3.4.0","react-markdown-mermaid":{mermaid:"10.9.6"}},dependencies:{"@modelcontextprotocol/sdk":"^1.29.0","@mozilla/readability":"^0.6.0","better-sqlite3":"^12.11.1","compound-engineering-pi":"^0.2.4","get-east-asian-width":"^1.4.0",linkedom:"^0.18.12",turndown:"^7.2.4",unpdf:"^1.6.2"}};import kp from"chalk";function wO(t,e){return{render(n){let i=` \u26AC _______. __ __ .__ __. _______
405
405
  \u274D \xB7 \u274D / || | | | | \\ | | / _____|
406
406
  \u2726 \u26AC \u2726 | (----\`| | | | | \\| | | | __
407
407
  \u26AC \xB7 \u26AC \u26AC \xB7 \u26AC \\ \\ | | | | | . \` | | | |_ |
@@ -464,7 +464,7 @@ print -r -- "${_p}:$PWD"
464
464
  `);this.buffer=i.pop()??"";for(let r of i){let o=r.trimEnd();if(!this.state.ready){o.startsWith(`${_p}:`)&&(this.state.ready=!0,this.state.cwd=o.slice(_p.length+1)||this.state.cwd,this.readyResolve?.(),this.readyResolve=null,this.readyReject=null,this.onStateChange());continue}if(o.startsWith(`${gg}:`)){let[,s,a]=o.split(":");a&&(this.state.cwd=a),this.currentCommandId=s??this.currentCommandId,this.onStateChange();continue}if(o.startsWith(`${fg}:`)){let[,s,a,l]=o.split(":"),c=Number.parseInt(a??"1",10);if(this.state.running=!1,this.state.lastExitCode=Number.isFinite(c)?c:1,l&&(this.state.cwd=l),s){this.transcript.finishCommand(s,this.state.lastExitCode);let p=this.transcript.getSnapshot().commands.find(d=>d.id===s);p&&this.state.lastExitCode===0&&this.onCommandSuccess(p.command,this.state.cwd)}this.currentCommandId=null,this.onStateChange();continue}this.currentCommandId&&(this.transcript.appendOutput(this.currentCommandId,o),this.onStateChange())}}};import{existsSync as oY,readFileSync as sY}from"node:fs";import{join as aY,dirname as lY}from"node:path";import{fileURLToPath as cY}from"node:url";var wy={model:"#d787af",shellMode:"accent",path:"#00afaf",gitDirty:"warning",gitClean:"success",thinking:"thinkingOff",thinkingMinimal:"thinkingMinimal",thinkingLow:"thinkingLow",thinkingMedium:"thinkingMedium",context:"dim",contextWarn:"warning",contextError:"error",cost:"text",tokens:"muted",separator:"dim",border:"borderMuted"},qO=["#b281d6","#d787af","#febc38","#e4c00f","#89d281","#00afaf","#178fb9","#b281d6"],xg=null,GO=0,lc=null,yy=0,KO=5e3,vg=new Set;function HO(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function uY(t){if(!HO(t))return{};let e={};for(let[n,i]of Object.entries(t)){if(!Object.prototype.hasOwnProperty.call(wy,n)||typeof i!="string")continue;let r=i.trim();r&&(e[n]=r)}return e}function pY(){let t=lY(cY(import.meta.url));return aY(t,"theme.json")}function Sy(){let t=Date.now();if(lc&&t-yy<KO)return lc;let e=pY();try{if(oY(e)){let n=sY(e,"utf-8"),i=JSON.parse(n);return lc=HO(i)?i:{},yy=t,lc}}catch(n){console.debug(`[powerline-theme] Failed to load ${e}:`,n)}return lc={},yy=t,lc}function dY(){let t=Date.now();return xg&&t-GO<KO||(xg=uY(Sy().colors),GO=t),xg}function mY(t,e){return dY()[t]??e?.[t]??wy[t]}function hY(t){return typeof t=="string"&&/^#[0-9a-fA-F]{6}$/.test(t)}function zO(t){let e=t.replace("#",""),n=parseInt(e.slice(0,2),16),i=parseInt(e.slice(2,4),16),r=parseInt(e.slice(4,6),16);return`\x1B[38;2;${n};${i};${r}m`}function cc(t,e,n){if(hY(e))return`${zO(e)}${n}\x1B[0m`;try{return t.fg(e,n)}catch(i){let r=String(e);return vg.has(r)||(vg.add(r),vg.size>200&&vg.clear(),console.debug(`[powerline-theme] Invalid theme color "${r}"; falling back to "text".`,i)),t.fg("text",n)}}function VO(t,e,n,i){let r=mY(e,i);return cc(t,r,n)}function QO(t){let e="",n=0;for(let i of t)i===" "||i===":"?e+=i:(e+=zO(qO[n%qO.length])+i,n++);return e+"\x1B[0m"}function yg(){return{...wy}}var uc=yg(),JO={...uc,model:"text",path:"text",gitClean:"dim"},gY={...uc,model:"accent",path:"success",tokens:"muted",cost:"warning"},pc={default:{leftSegments:["model","thinking","shell_mode","path","git","context_pct","cache_read","cost"],rightSegments:[],secondarySegments:["extension_statuses"],separator:"powerline-thin",colors:uc,segmentOptions:{model:{showThinkingLevel:!1},path:{mode:"basename"},git:{showBranch:!0,showStaged:!0,showUnstaged:!0,showUntracked:!0}}},minimal:{leftSegments:["shell_mode","path","git"],rightSegments:["context_pct"],separator:"slash",colors:JO,segmentOptions:{path:{mode:"basename"},git:{showBranch:!0,showStaged:!1,showUnstaged:!1,showUntracked:!1}}},compact:{leftSegments:["model","shell_mode","git"],rightSegments:["cost","context_pct"],separator:"powerline-thin",colors:uc,segmentOptions:{model:{showThinkingLevel:!1},git:{showBranch:!0,showStaged:!0,showUnstaged:!0,showUntracked:!1}}},full:{leftSegments:["hostname","model","thinking","shell_mode","path","git","subagents"],rightSegments:["token_in","token_out","cache_read","cost","context_pct","time_spent","time","extension_statuses"],separator:"powerline",colors:uc,segmentOptions:{model:{showThinkingLevel:!1},path:{mode:"abbreviated",maxLength:50},git:{showBranch:!0,showStaged:!0,showUnstaged:!0,showUntracked:!0},time:{format:"24h",showSeconds:!1}}},nerd:{leftSegments:["hostname","model","thinking","shell_mode","path","git","session","subagents"],rightSegments:["token_in","token_out","cache_read","cache_write","cost","context_pct","context_total","time_spent","time","extension_statuses"],separator:"powerline",colors:gY,segmentOptions:{model:{showThinkingLevel:!1},path:{mode:"abbreviated",maxLength:60},git:{showBranch:!0,showStaged:!0,showUnstaged:!0,showUntracked:!0},time:{format:"24h",showSeconds:!0}}},ascii:{leftSegments:["model","shell_mode","path","git"],rightSegments:["token_total","cost","context_pct"],separator:"ascii",colors:JO,segmentOptions:{model:{showThinkingLevel:!0},path:{mode:"abbreviated",maxLength:40},git:{showBranch:!0,showStaged:!0,showUnstaged:!0,showUntracked:!0}}},custom:{leftSegments:["model","shell_mode","path","git"],rightSegments:["token_total","cost","context_pct"],separator:"powerline-thin",colors:uc,segmentOptions:{}}};function Ty(t){return pc[t]??pc.default}function dc(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function YO(t,e){if(typeof t!="string")return null;let n=t.trim().toLowerCase();return e.includes(n)?n:null}function fY(t){if(typeof t!="string")return null;let e=t.trim();return e&&/^[a-zA-Z0-9_-]+$/.test(e)?e:null}function bY(t){return t==="left"||t==="right"||t==="secondary"?t:"right"}function xY(t){if(typeof t!="string")return;let e=t.trim();return e||void 0}function vY(t){if(typeof t!="string")return;let e=t.trim();return e||void 0}function XO(t,e){if(!dc(t))return null;let n=fY(e??t.id);if(!n)return null;let i=typeof t.statusKey=="string"&&t.statusKey.trim()?t.statusKey.trim():n;return{id:n,statusKey:i,position:bY(t.position),color:xY(t.color),prefix:vY(t.prefix),hideWhenMissing:t.hideWhenMissing!==!1,excludeFromExtensionStatuses:t.excludeFromExtensionStatuses!==!1}}function yY(t){let e=[];if(Array.isArray(t))for(let i of t){let r=XO(i);r&&e.push(r)}else if(dc(t))for(let[i,r]of Object.entries(t)){let o=XO(r,i);o&&e.push(o)}let n=new Map;for(let i of e)n.set(i.id,i);return[...n.values()]}function wY(t){return typeof t=="boolean"?t:dc(t)&&typeof t.enabled=="boolean"?t.enabled:null}function ky(t,e){let n={preset:"default",customItems:[],mouseScroll:!0,fixedEditor:!0,welcome:!1},i=YO(t,e);return i?{...n,preset:i}:dc(t)?{preset:YO(t.preset,e)??n.preset,customItems:yY(t.customItems),mouseScroll:t.mouseScroll!==!1,fixedEditor:t.fixedEditor!==!1,welcome:wY(t.welcome)??n.welcome}:n}function ZO(t,e){let n=[...t.leftSegments],i=[...t.rightSegments],r=[...t.secondarySegments??[]];for(let o of e){let s=`custom:${o.id}`;o.position==="left"?n.push(s):o.position==="secondary"?r.push(s):i.push(s)}return{leftSegments:n,rightSegments:i,secondarySegments:r}}function eL(t,e){return dc(t)?{...t,preset:e}:e}function tL(t,e,n){return dc(t)?{...t,...e}:{preset:n,...e}}function Cy(t){let e=new Set;for(let n of t)n.excludeFromExtensionStatuses&&e.add(n.statusKey);return e}function nL(t){return t.trimStart().startsWith("[")}function iL(t,e){let n=[];for(let[i,r]of t.entries())e.has(i)||!r||!nL(r)||n.push(r);return n}function Ry(t){if(!t||N(t)<=0)return null;let e=t.replace(/(\x1b\[[0-9;]*m|\s|·|[|])+$/,"");return N(e)>0?e:null}function rL(t){return nL(t)?null:Ry(t)}var Op=" \xB7 ",SY={minimal:"[min]",low:"[low]",medium:"[med]",high:"[high]",xhigh:"[xhi]"},TY={minimal:"\uF0E7 min",low:"\uF10C low",medium:"\uF192 med",high:"\uF111 high",xhigh:"\uF06D xhi"};function oL(t){return My()?TY[t]:SY[t]}var sL={pi:"\uE22C",model:"\uEC19",folder:"\uF115",branch:"\uF126",git:"\uF1D3",tokens:"\uE26B",context:"\uE70F",cost:"\uF155",time:"\uF017",agents:"\uF0C0",cache:"\uF1C0",input:"\uF090",output:"\uF08B",host:"\uF109",session:"\uF550",auto:"\u{F0068}",warning:"\uF071"},kY={pi:"\u2B55\uFE0F",model:"\u{1F9E0}",folder:"\u{1F5C2}\uFE0F",branch:"\u2387",git:"\u2387",tokens:"\u229B",context:"\u25EB",cost:"$",time:"\u25F7",agents:"AG",cache:"cache",input:"in:",output:"out:",host:"host",session:"id",auto:"AC",warning:"!"};function CY(t){if(typeof t!="object"||t===null||Array.isArray(t))return{};let e={},n=Object.keys(sL);for(let i of n){let r=t[i];typeof r=="string"&&(e[i]=r)}return e}var RY={powerlineLeft:"\uE0B0",powerlineRight:"\uE0B2",powerlineThinLeft:"\uE0B1",powerlineThinRight:"\uE0B3",slash:"/",pipe:"|",block:"\u2588",space:" ",asciiLeft:">",asciiRight:"<",dot:"\xB7"},MY={powerlineLeft:">",powerlineRight:"<",powerlineThinLeft:"|",powerlineThinRight:"|",slash:"/",pipe:"|",block:"#",space:" ",asciiLeft:">",asciiRight:"<",dot:"."};function My(){if(process.env.POWERLINE_NERD_FONTS==="1")return!0;if(process.env.POWERLINE_NERD_FONTS==="0")return!1;if(process.env.GHOSTTY_RESOURCES_DIR)return!0;let t=(process.env.TERM_PROGRAM||"").toLowerCase();return["iterm","wezterm","kitty","ghostty","alacritty"].some(n=>t.includes(n))}function tn(){return{...My()?sL:kY,...CY(Sy().icons)}}function aL(){return My()?RY:MY}function wg(t){let e=aL();switch(t){case"powerline":return{left:e.powerlineLeft,right:e.powerlineRight,endCaps:{left:e.powerlineRight,right:e.powerlineLeft,useBgAsFg:!0}};case"powerline-thin":return{left:e.powerlineThinLeft,right:e.powerlineThinRight,endCaps:{left:e.powerlineRight,right:e.powerlineLeft,useBgAsFg:!0}};case"slash":return{left:` ${e.slash} `,right:` ${e.slash} `};case"pipe":return{left:` ${e.pipe} `,right:` ${e.pipe} `};case"block":return{left:e.block,right:e.block};case"none":return{left:e.space,right:e.space};case"ascii":return{left:e.asciiLeft,right:e.asciiRight};case"dot":return{left:e.dot,right:e.dot};case"chevron":return{left:"\u203A",right:"\u2039"};case"star":return{left:"\u2726",right:"\u2726"};default:return wg("powerline-thin")}}import{hostname as PY}from"node:os";import{basename as lL}from"node:path";function At(t,e,n){return VO(t.theme,e,n,t.colors)}function fn(t,e){return t?`${t} ${e}`:e}function Is(t){return t<1e3?t.toString():t<1e4?`${(t/1e3).toFixed(1)}k`:t<1e6?`${Math.round(t/1e3)}k`:t<1e7?`${(t/1e6).toFixed(1)}M`:`${Math.round(t/1e6)}M`}function IY(t){let e=Math.floor(t/1e3),n=Math.floor(e/60),i=Math.floor(n/60);return i>0?`${i}h${n%60}m`:n>0?`${n}m${e%60}s`:`${e}s`}var AY={id:"model",render(t){let e=tn(),n=t.options.model??{},i=t.model?.name||t.model?.id||"no-model";i.startsWith("Claude ")&&(i=i.slice(7));let r=fn(e.model,i);if(n.showThinkingLevel!==!1&&t.model?.reasoning){let o=t.thinkingLevel||"off";if(o!=="off"){let s=oL(o);s&&(r+=`${Op}${s}`)}}return{content:At(t,"model",r),visible:!0}}},EY={id:"shell_mode",render(t){if(!t.shellModeActive)return{content:"",visible:!1};let e=t.shellName??"shell",n=t.shellRunning?"run":"idle",i=t.shellCwd?lL(t.shellCwd):null,r=[e,n];return i&&r.push(i),{content:At(t,"shellMode",r.join(Op)),visible:!0}}},_Y={id:"path",render(t){let e=tn(),n=t.options.path??{},i=n.mode??"basename",r=t.shellModeActive&&t.shellCwd?t.shellCwd:t.cwd??process.cwd(),o=process.env.HOME||process.env.USERPROFILE;if(i==="basename")r=lL(r)||r;else if(o&&r.startsWith(o)&&(r=`~${r.slice(o.length)}`),r.startsWith("/work/")&&(r=r.slice(6)),i==="abbreviated"){let a=n.maxLength??40;r.length>a&&(r=`\u2026${r.slice(-(a-1))}`)}let s=fn(e.folder,r);return{content:At(t,"path",s),visible:!0}}},OY={id:"git",render(t){let e=tn(),n=t.options.git??{},{branch:i,staged:r,unstaged:o,untracked:s}=t.git,a=r>0||o>0||s>0?{staged:r,unstaged:o,untracked:s}:null;if(!i&&!a)return{content:"",visible:!1};let l=a&&(a.staged>0||a.unstaged>0||a.untracked>0),c=n.showBranch!==!1,u=l?"gitDirty":"gitClean",p="";if(c&&i&&(p=At(t,u,fn(e.branch,i))),a){let d=[];if(n.showUnstaged!==!1&&a.unstaged>0&&d.push(cc(t.theme,"warning",`*${a.unstaged}`)),n.showStaged!==!1&&a.staged>0&&d.push(cc(t.theme,"success",`+${a.staged}`)),n.showUntracked!==!1&&a.untracked>0&&d.push(cc(t.theme,"muted",`?${a.untracked}`)),d.length>0){let m=d.join(" ");!p&&c===!1?p=At(t,u,e.git?`${e.git} `:"")+m:p+=p?` ${m}`:m}}return p?{content:p,visible:!0}:{content:"",visible:!1}}},LY={id:"thinking",render(t){let e=t.thinkingLevel||"off",r=`think:${{off:"off",minimal:"min",low:"low",medium:"med",high:"high",xhigh:"xhigh"}[e]||e}`;return e==="high"||e==="xhigh"?{content:QO(r),visible:!0}:e==="minimal"?{content:At(t,"thinkingMinimal",r),visible:!0}:e==="low"?{content:At(t,"thinkingLow",r),visible:!0}:e==="medium"?{content:At(t,"thinkingMedium",r),visible:!0}:{content:At(t,"thinking",r),visible:!0}}},WY={id:"subagents",render(){return{content:"",visible:!1}}},FY={id:"token_in",render(t){let e=tn(),{input:n}=t.usageStats;if(!n)return{content:"",visible:!1};let i=fn(e.input,Is(n));return{content:At(t,"tokens",i),visible:!0}}},DY={id:"token_out",render(t){let e=tn(),{output:n}=t.usageStats;if(!n)return{content:"",visible:!1};let i=fn(e.output,Is(n));return{content:At(t,"tokens",i),visible:!0}}},UY={id:"token_total",render(t){let e=tn(),{input:n,output:i,cacheRead:r,cacheWrite:o}=t.usageStats,s=n+i+r+o;if(!s)return{content:"",visible:!1};let a=fn(e.tokens,Is(s));return{content:At(t,"tokens",a),visible:!0}}},$Y={id:"cost",render(t){let{cost:e}=t.usageStats,n=t.usingSubscription;if(!e&&!n)return{content:"",visible:!1};let i=n?"(sub)":`$${e.toFixed(2)}`;return{content:At(t,"cost",i),visible:!0}}},NY={id:"context_pct",render(t){if(t.customCompactionEnabled)return{content:"",visible:!1};let e=tn(),n=t.contextPercent,i=t.contextWindow,r=t.autoCompactEnabled&&e.auto?` ${e.auto}`:"",o=`${n.toFixed(1)}%/${Is(i)}${r}`,s;return n>90?s=fn(e.context,At(t,"contextError",o)):n>70?s=fn(e.context,At(t,"contextWarn",o)):s=fn(e.context,At(t,"context",o)),{content:s,visible:!0}}},BY={id:"context_total",render(t){if(t.customCompactionEnabled)return{content:"",visible:!1};let e=tn(),n=t.contextWindow;return n?{content:At(t,"context",fn(e.context,Is(n))),visible:!0}:{content:"",visible:!1}}},jY={id:"time_spent",render(t){let e=tn(),n=Date.now()-t.sessionStartTime;return n<1e3?{content:"",visible:!1}:{content:fn(e.time,IY(n)),visible:!0}}},qY={id:"time",render(t){let e=tn(),n=t.options.time??{},i=new Date,r=i.getHours(),o="";n.format==="12h"&&(o=r>=12?"pm":"am",r=r%12||12);let s=i.getMinutes().toString().padStart(2,"0"),a=`${r}:${s}`;return n.showSeconds&&(a+=`:${i.getSeconds().toString().padStart(2,"0")}`),a+=o,{content:fn(e.time,a),visible:!0}}},GY={id:"session",render(t){let e=tn(),i=t.sessionId?.slice(0,8)||"new";return{content:fn(e.session,i),visible:!0}}},KY={id:"hostname",render(){let t=tn(),e=PY().split(".")[0];return{content:fn(t.host,e),visible:!0}}},HY={id:"cache_read",render(t){let e=tn(),{cacheRead:n}=t.usageStats;if(!n)return{content:"",visible:!1};let r=[e.cache,e.input,Is(n)].filter(Boolean).join(" ");return{content:At(t,"tokens",r),visible:!0}}},zY={id:"cache_write",render(t){let e=tn(),{cacheWrite:n}=t.usageStats;if(!n)return{content:"",visible:!1};let r=[e.cache,e.output,Is(n)].filter(Boolean).join(" ");return{content:At(t,"tokens",r),visible:!0}}},VY={id:"extension_statuses",render(t){let e=t.extensionStatuses;if(!e||e.size===0)return{content:"",visible:!1};let n=[];for(let[r,o]of e.entries()){if(t.hiddenExtensionStatusKeys.has(r))continue;let s=o?rL(o):null;s&&n.push(s)}return n.length===0?{content:"",visible:!1}:{content:n.join(` ${Op} `),visible:!0}}},QY={model:AY,shell_mode:EY,path:_Y,git:OY,thinking:LY,subagents:WY,token_in:FY,token_out:DY,token_total:UY,cost:$Y,context_pct:NY,context_total:BY,time_spent:jY,time:qY,session:GY,hostname:KY,cache_read:HY,cache_write:zY,extension_statuses:VY};function JY(t,e){let n=t.slice(7),i=e.customItemsById.get(n);if(!i)return{content:"",visible:!1};let r=e.extensionStatuses.get(i.statusKey),o=r?Ry(r):null;if(!o)return i.hideWhenMissing?{content:"",visible:!1}:{content:i.prefix??i.id,visible:!0};let s=o;return i.prefix&&(s=`${i.prefix}${Op}${s}`),i.color&&(s=cc(e.theme,i.color,s)),{content:s,visible:!0}}function cL(t,e){if(t.startsWith("custom:"))return JY(t,e);let n=QY[t];return n?n.render(e):{content:"",visible:!1}}import{spawn as YY}from"node:child_process";var XY=1e3,ZY=500,Si=null,As=null,Py=null,Iy=null,Ay=0,Ey=0;function eX(t){let e=0,n=0,i=0;for(let r of t.split(`
465
465
  `)){if(!r)continue;let o=r[0],s=r[1];if(o==="?"&&s==="?"){i++;continue}o&&o!==" "&&o!=="?"&&e++,s&&s!==" "&&n++}return{staged:e,unstaged:n,untracked:i}}function _y(t,e=200){return new Promise(n=>{let i=YY("git",t,{stdio:["ignore","pipe","pipe"]}),r="",o=!1,s=l=>{o||(o=!0,clearTimeout(a),n(l))};i.stdout.on("data",l=>{r+=l.toString()}),i.on("close",l=>{s(l===0?r.trim():null)}),i.on("error",()=>{s(null)});let a=setTimeout(()=>{i.kill(),s(null)},e)})}async function tX(){let t=await _y(["branch","--show-current"]);if(t===null)return null;if(t)return t;let e=await _y(["rev-parse","--short","HEAD"]);return e?`${e} (detached)`:"detached"}async function nX(){let t=await _y(["status","--porcelain"],500);return t===null?null:eX(t)}function iX(t){let e=Date.now();if(As&&e-As.timestamp<ZY)return As.branch;if(!Iy){let n=Ey;Iy=tX().then(i=>{n===Ey&&(As={branch:i,timestamp:Date.now()}),Iy=null})}return As?As.branch:t}function uL(t){let e=Date.now(),n=iX(t);if(Si&&e-Si.timestamp<XY)return{branch:n,staged:Si.staged,unstaged:Si.unstaged,untracked:Si.untracked};if(!Py){let i=Ay;Py=nX().then(r=>{i===Ay&&(Si=r?{staged:r.staged,unstaged:r.unstaged,untracked:r.untracked,timestamp:Date.now()}:{staged:0,unstaged:0,untracked:0,timestamp:Date.now()}),Py=null})}return Si?{branch:n,staged:Si.staged,unstaged:Si.unstaged,untracked:Si.untracked}:{branch:n,staged:0,unstaged:0,untracked:0}}function Sg(){Si=null,Ay++}function Oy(){As=null,Ey++}var Un={getBgAnsi:(t,e,n)=>`\x1B[48;2;${t};${e};${n}m`,getFgAnsi:(t,e,n)=>`\x1B[38;2;${t};${e};${n}m`,getFgAnsi256:t=>`\x1B[38;5;${t}m`,reset:"\x1B[0m"};function rX(t){let e=t.replace("#","");return[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16)]}var oX={sep:244,model:"#d787af",path:"#00afaf",gitClean:"#5faf5f",accent:"#febc38"};function pL(t){let e=oX[t];if(e===void 0||e==="")return"";if(typeof e=="number")return Un.getFgAnsi256(e);if(typeof e=="string"&&e.startsWith("#")){let[n,i,r]=rX(e);return Un.getFgAnsi(n,i,r)}return""}function Ti(t,e){let n=pL(t);return n?`${n}${e}`:e}function Es(t){return pL(t)}import{readdirSync as Cg,existsSync as Gi,statSync as Rg,readFileSync as sX}from"node:fs";import{join as Ve,basename as Wy}from"node:path";import{homedir as mL}from"node:os";var aX=[" xxxxxxxxxxxxxx "," xxxxxxxxxxxxxxxxxxxxx "," xxxxxxx;:+xxxxxxx+:;xxxxxxx "," xxxxxxxx .xxxxxxx. xxxxxxxx "," xxxxxxxxxxxxxx+;+xxxxxxxxxxxxxxx "," xxxxxxxxxxxxxxx+ +xxxxxxxxxxxxxxx "," xxxx..xxx+ xx+ +xx. +xxx:.xxxxx","xxxx; +xx+ .xxx xxx: +xx+ ;xxxx","xxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxx","xxxxxxxx+ ;xx; +xx+ +xxxxxxxx","xxxxxxxx+ ;xx+ ;xx; ;xxxxxxxx","xxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxx","xxxx; +xx+ .xxx xxx: +xx+ ;xxxx"," xxxx.:xxx+ xx+ xxx +xxx. xxxxx"," xxxxxxxxxxx+xxx+ +xxx+xxxxxxxxxxx "," xxxxxxxxxxxxxxx+:+xxxxxxxxxxxxxxx "," xxxxxxxx .xxxxxxx. xxxxxxxx "," xxxxxxx;:+xxxxxxx+:;xxxxxxx "," xxxxxxxxxxxxxxxxxxxxx "," xxxxxxxxxxxxxx "],Ly=["\x1B[0;38;5;196;49m","\x1B[0;38;5;196;49m","\x1B[0;38;5;197;49m","\x1B[0;38;5;198;49m","\x1B[0;38;5;197;49m","\x1B[0;38;5;196;49m","\x1B[0;38;5;196;49m"];function Mg(t){return`\x1B[1m${t}\x1B[22m`}function ut(t){return Es("sep")+t+Un.reset}function lX(t){let e=Un.reset,n="",i=0,r=Math.max(1,Math.floor(t.length/Ly.length));for(let o=0;o<t.length;o++){o>0&&o%r===0&&i<Ly.length-1&&i++;let s=t[o];s!==" "?n+=Ly[i]+s+e:n+=s}return n}function Tg(t,e){let n=N(t);if(n>e)return ee(t,e,"\u2026");if(n===e)return t;let i=Math.floor((e-n)/2),r=e-n-i;return" ".repeat(i)+t+" ".repeat(r)}function dL(t,e){let n=N(t);return n>e?ee(t,e,"\u2026"):t+" ".repeat(e-n)}function cX(t,e){let n=aX.map(i=>lX(i));return["",Tg(Mg("Welcome back!"),e),"",...n.map(i=>Tg(i,e)),"",Tg(Ti("model",t.modelName),e),Tg(ut(t.providerName),e)]}function uX(t,e){let i=` ${ut("\u2500".repeat(e-2))}`,r=[];if(t.recentSessions.length===0)r.push(` ${ut("No recent sessions")}`);else for(let p of t.recentSessions.slice(0,3))r.push(` ${ut("\u2022 ")}${Ti("path",p.name)}${ut(` (${p.timeAgo})`)}`);let o=[],{contextFiles:s,extensions:a,skills:l,promptTemplates:c}=t.loadedCounts,u=ut("- ");return s>0||a>0||l>0||c>0?(s>0&&o.push(` ${u}${Ti("gitClean",`${s}`)} context file${s!==1?"s":""}`),a>0&&o.push(` ${u}${Ti("gitClean",`${a}`)} extension${a!==1?"s":""}`),l>0&&o.push(` ${u}${Ti("gitClean",`${l}`)} skill${l!==1?"s":""}`),c>0&&o.push(` ${u}${Ti("gitClean",`${c}`)} prompt template${c!==1?"s":""}`)):o.push(` ${ut("No extensions loaded")}`),[` ${Mg(Ti("accent","Tips"))}`,` ${ut("/")} for commands`,` ${ut("!")} to run bash`,` ${ut("Shift+Tab")} cycle thinking`,i,` ${Mg(Ti("accent","Loaded"))}`,...o,i,` ${Mg(Ti("accent","Recent sessions"))}`,...r,""]}function hL(t,e,n){if(e<58)return[];let s=Math.min(e,Math.max(76,Math.min(e-2,96))),a=40,l=Math.max(1,s-a-3),c="\u2500",u=ut("\u2502"),p=ut("\u2554"),d=ut("\u2557"),m=ut("\u255A"),g=ut("\u255D"),h=cX(t,a),f=uX(t,l),b=[],v=" sling - Slingshot agent ",R=ut(c.repeat(1))+Ti("model",v),T=1+N(v),k=s-2-T,I=k>0?ut(c.repeat(k)):"";b.push(p+R+I+d);let $=Math.max(h.length,f.length);for(let O=0;O<$;O++){let A=dL(h[O]??"",a),_=dL(f[O]??"",l);b.push(u+A+u+_+u)}return b.push(m+n+g),b}var Pg=class{constructor(e,n,i=[],r={contextFiles:0,extensions:0,skills:0,promptTemplates:0}){this.countdown=10;this.data={modelName:e,providerName:n,recentSessions:i,loadedCounts:r}}setCountdown(e){this.countdown=e}invalidate(){}render(e){if(e<44)return[];let o=Math.min(e,Math.max(76,Math.min(e-2,96))),s=` Press any key to continue (${this.countdown}s) `,a=ut(s),l=o-2,c=N(s),u=Math.floor((l-c)/2),p=l-c-u,d="\u2500",m=ut(d.repeat(Math.max(0,u)))+a+ut(d.repeat(Math.max(0,p)));return hL(this.data,e,m)}},Ig=class{constructor(e,n,i=[],r={contextFiles:0,extensions:0,skills:0,promptTemplates:0}){this.data={modelName:e,providerName:n,recentSessions:i,loadedCounts:r}}invalidate(){}render(e){if(e<44)return[];let o=Math.min(e,Math.max(76,Math.min(e-2,96))),s="\u2500",a=26,l=Math.max(1,o-a-3),c=ut(s.repeat(a))+ut("\u2534")+ut(s.repeat(l)),u=hL(this.data,e,c);return u.length>0&&u.push(""),u}},kg=new Set;function Cr(t,e){let n=e instanceof Error?e.message:String(e),i=`${t}:${n}`;kg.has(i)||(kg.add(i),kg.size>500&&kg.clear(),console.debug(`[powerline-welcome] ${t}:`,e))}function Fy(){let t=process.env.HOME||process.env.USERPROFILE||mL(),e=process.cwd(),n=0,i=0,r=0,o=0,s=[Ve(t,".pi","agent","AGENTS.md"),Ve(t,".claude","AGENTS.md"),Ve(e,"AGENTS.md"),Ve(e,".pi","AGENTS.md"),Ve(e,".claude","AGENTS.md")];for(let h of s)Gi(h)&&n++;let a=[Ve(t,".pi","agent","extensions"),Ve(e,"extensions"),Ve(e,".pi","extensions")],l=new Set,c=[Ve(t,".pi","agent","settings.json"),Ve(e,".pi","settings.json")];for(let h of c)if(Gi(h))try{let f=JSON.parse(sX(h,"utf-8")),b=null;if(typeof f=="object"&&f!==null&&!Array.isArray(f)&&(b=f.packages),Array.isArray(b))for(let v of b){let y=null,R=null;if(typeof v=="string"?y=v:typeof v=="object"&&v!==null&&!Array.isArray(v)&&(y=v.source,R=v.extensions),typeof y!="string")continue;let T=y.trim();if(!T.startsWith("npm:")||Array.isArray(R)&&R.length===0)continue;let k=T.slice(4),I=k.lastIndexOf("@"),$=I>0?k.slice(0,I):k;!$||l.has($)||(l.add($),i++)}}catch(f){Cr(`Failed to read settings at ${h}`,f)}for(let h of a)if(Gi(h))try{let f=Cg(h);for(let b of f){let v=Ve(h,b);try{if(Rg(v).isDirectory())(Gi(Ve(v,"index.ts"))||Gi(Ve(v,"index.js"))||Gi(Ve(v,"package.json")))&&(l.has(b)||(l.add(b),i++));else if((b.endsWith(".ts")||b.endsWith(".js"))&&!b.startsWith(".")){let R=b.endsWith(".ts")?".ts":".js",T=Wy(b,R);l.has(T)||(l.add(T),i++)}}catch(y){Cr(`Failed to inspect extension entry ${v}`,y)}}}catch(f){Cr(`Failed to scan extensions dir ${h}`,f)}let u=[Ve(t,".pi","agent","skills"),Ve(e,".pi","skills"),Ve(e,"skills")],p=new Set;for(let h of u)if(Gi(h))try{let f=Cg(h);for(let b of f){let v=Ve(h,b);try{Rg(v).isDirectory()&&Gi(Ve(v,"SKILL.md"))&&(p.has(b)||(p.add(b),r++))}catch(y){Cr(`Failed to inspect skill entry ${v}`,y)}}}catch(f){Cr(`Failed to scan skills dir ${h}`,f)}let d=[Ve(t,".pi","agent","commands"),Ve(t,".claude","commands"),Ve(e,".pi","commands"),Ve(e,".claude","commands")],m=new Set;function g(h){if(Gi(h))try{let f=Cg(h);for(let b of f){let v=Ve(h,b);try{if(Rg(v).isDirectory())g(v);else if(b.endsWith(".md")){let R=Wy(b,".md");m.has(R)||(m.add(R),o++)}}catch(y){Cr(`Failed to inspect prompt template entry ${v}`,y)}}}catch(f){Cr(`Failed to scan prompt template dir ${h}`,f)}}for(let h of d)g(h);return{contextFiles:n,extensions:i,skills:r,promptTemplates:o}}function Dy(t=3){let e=process.env.HOME||process.env.USERPROFILE||mL(),n=[Ve(e,".pi","agent","sessions"),Ve(e,".pi","sessions")],i=[];function r(l){if(Gi(l))try{let c=Cg(l);for(let u of c){let p=Ve(l,u);try{let d=Rg(p);if(d.isDirectory())r(p);else if(u.endsWith(".jsonl")){let m=Wy(l),g=m;if(m.startsWith("--")){let h=m.split("-").filter(f=>f);g=h[h.length-1]||m}i.push({name:g,mtime:d.mtimeMs})}}catch(d){Cr(`Failed to inspect session entry ${p}`,d)}}}catch(c){Cr(`Failed to scan sessions dir ${l}`,c)}}for(let l of n)r(l);if(i.length===0)return[];i.sort((l,c)=>c.mtime-l.mtime);let o=new Set,s=[];for(let l of i)o.has(l.name)||(o.add(l.name),s.push(l));let a=Date.now();return s.slice(0,t).map(l=>({name:l.name.length>20?l.name.slice(0,17)+"\u2026":l.name,timeAgo:pX(a-l.mtime)}))}function pX(t){let e=Math.floor(t/1e3),n=Math.floor(e/60),i=Math.floor(n/60),r=Math.floor(i/24);return r>0?`${r}d ago`:i>0?`${i}h ago`:n>0?`${n}m ago`:"just now"}function gL(t){let e=null;return{schedule(n){if(e)return;let i=t.getGeneration();e=setTimeout(()=>{e=null,!(!t.isEnabled()||i!==t.getGeneration())&&t.dismiss(n)},0)},cancel(){e&&(clearTimeout(e),e=null)}}}function fL(t,e){let n=null;return{schedule(i=e){n||(n=setTimeout(()=>{n=null,t()},i))},cancel(){n&&(clearTimeout(n),n=null)}}}function bL(t){return typeof t=="object"&&t!==null}function xL(t){if(!bL(t)||typeof t.getContextUsage!="function")return null;let e=t.getContextUsage();if(!bL(e))return null;let n=e.tokens,i=e.contextWindow;if(typeof n!="number"||!Number.isFinite(n)||typeof i!="number"||!Number.isFinite(i)||i<=0)return null;let r=e.percent;return{contextTokens:n,contextWindow:i,contextPercent:typeof r=="number"&&Number.isFinite(r)?r:n/i*100}}var Uy="\x1B_pi:c\x07";function mc(t,e){return!t||e<=0?[]:t.filter(n=>n!=null).map(n=>N(n)>e?ee(n,e,"",!0):n)}function Lp(t,e){return e<=0?[]:t.length<=e?t:t.slice(t.length-e)}function dX(t,e){if(e<=0)return[];if(t.length<=e)return t;let n=t.findIndex(o=>o.includes(Uy));if(n!==-1){let o=Math.max(0,Math.min(n-e+1,t.length-e));return t.slice(o,o+e)}let i=t.findIndex(o=>o.replace(/\x1b\[[0-9;]*m/g,"").trimStart().startsWith("\u2192 "));if(i===-1)return t.slice(0,e);let r=Math.max(0,Math.min(i-Math.floor(e/2),t.length-e));return t.slice(r,r+e)}function mX(t){let e=null;return{lines:t.map((i,r)=>{let o=i.indexOf(Uy);return o===-1?i:(e||(e={row:r,col:N(i.slice(0,o))}),i.slice(0,o)+i.slice(o+Uy.length))}),cursor:e}}function vL(t){let e=Math.max(1,t.width),n=Math.max(1,t.terminalRows-1),i=mc(t.statusLines,e),r=mc(t.topLines,e),o=mc(t.editorLines,e),s=mc(t.secondaryLines,e),a=mc(t.transcriptLines,e),l=mc(t.lastPromptLines,e),c=dX(o,n),u=n-c.length,p=Lp(r,u);u-=p.length;let d=Lp(s,u);u-=d.length;let m=Lp(l,u);u-=m.length;let g=Lp(i,u);u-=g.length;let h=Lp(a,u);return mX([...g,...p,...c,...d,...h,...m])}var hX=1200,gX=5e3,yL=100,fX=500,ML={up:"super+up",down:"super+down"};function So(){return"\x1B[?2026h"}function To(){return"\x1B[?2026l"}function wL(t,e){return`\x1B[${t};${e}r`}function jy(){return"\x1B[r"}function Eg(t,e){return`\x1B[${t};${e}H`}function PL(){return"\x1B[2K"}function bX(){return"\x1B[?25l"}function xX(){return"\x1B[?25h"}function vX(){return"\x1B[?1049h"}function IL(){return"\x1B[?1049l"}function AL(){return"\x1B[?1007h"}function yX(){return"\x1B[?1007l"}function SL(){return"\x1B[?1002h\x1B[?1006h"}function By(){return"\x1B[?1006l\x1B[?1002l\x1B[?1000l"}function TL(t){return t==="kitty"?"\x1B[>7u":"\x1B[>4;2m"}function wX(t){return t==="kitty"?"\x1B[<u":"\x1B[>4;0m"}function EL(){return"\x1B[<999u\x1B[>4;0m"}function _L(){return So()+jy()+By()+AL()+IL()+EL()+To()}function SX(t,e=ML){return Ln(t)?0:ii(t,e.up)||De(t,"pageUp")||De(t,"ctrl+shift+up")||/^\x1b\[(?:5;9(?::[12])?~|1;6(?::[12])?A|57421;9(?::[12])?u|57419;6(?::[12])?u)$/.test(t)?10:ii(t,e.down)||De(t,"pageDown")||De(t,"ctrl+shift+down")||/^\x1b\[(?:6;9(?::[12])?~|1;6(?::[12])?B|57422;9(?::[12])?u|57420;6(?::[12])?u)$/.test(t)?-10:0}function TX(t){let e=/\x1b\[<(\d+);(\d+);(\d+)([Mm])/g,n=[],i=0;for(let r of t.matchAll(e)){if(r.index!==i)return null;i=r.index+r[0].length,n.push({code:Number(r[1]),col:Number(r[2]),row:Number(r[3]),final:r[4]})}return n.length>0&&i===t.length?n:null}function Og(t){return t&-61}function kX(t){if(t.final!=="M")return 0;let e=Og(t.code);return e===64?3:e===65?-3:0}function CX(t){return t.final==="M"&&Og(t.code)===0&&(t.code&32)===0}function kL(t){return t.final==="M"&&Og(t.code)===0&&(t.code&32)!==0}function RX(t){return t.final==="M"&&Og(t.code)===2&&(t.code&32)===0}function MX(t){return t.final==="m"}function OL(t){return t.replace(/\x1b\][^\x07]*(?:\x07|\x1b\\)/g,"")}function $y(t){return OL(t).replace(/\x1b\[[0-9;?]*[ -/]*[@-~]/g,"")}var PX=new Intl.Segmenter(void 0,{granularity:"grapheme"});function Ag(t,e,n){let i=0,r="";for(let{segment:o}of PX.segment(t)){let s=Math.max(0,N(o));i>=e&&i<n&&(r+=o),i+=s}return r}function CL(t,e){return t.line===e.line?t.col-e.col:t.line-e.line}function IX(t){let e=t;for(;e;){let n=Object.getOwnPropertyDescriptor(e,"rows");if(n)return n;e=Object.getPrototypeOf(e)}}function AX(t,e){if(e?.get){let i=e.get.call(t);return typeof i=="number"&&Number.isFinite(i)?i:24}let n=Reflect.get(t,"rows");return typeof n=="number"&&Number.isFinite(n)?n:24}function qy(t,e){return N(t)>e?ee(t,e,"",!0):t}function EX(t,e){return qy(OL(t),e)}function RL(t){return t.includes(" ")?t.replace(/\t/g," "):t}function Ny(t,e,n,i){if(t.lines.length===0)return"";let r=Math.max(1,e-t.lines.length+1),o=jy();for(let s=0;s<t.lines.length;s++)o+=Eg(r+s,1),o+=PL(),o+=qy(t.lines[s]??"",n);return t.cursor&&i?(o+=Eg(r+t.cursor.row,Math.max(1,t.cursor.col+1)),o+=xX()):o+=bX(),o}var _g=class{constructor(e){this.extendedKeyboardMode=null;this.originalCompositeLineAt=null;this.patchedRenders=[];this.removeInputListener=null;this.emergencyCleanup=null;this.mouseReportingResumeTimer=null;this.clipboardRestoreTimer=null;this.installed=!1;this.disposed=!1;this.writing=!1;this.renderPassActive=!1;this.renderPassCluster=null;this.renderingCluster=!1;this.renderingScrollableRoot=!1;this.checkingOverlay=!1;this.scrollOffset=0;this.maxScrollOffset=0;this.lastRootLineCount=0;this.rootLines=[];this.visibleRootStart=0;this.visibleScrollableRows=0;this.visibleRootLines=[];this.visibleClusterLines=[];this.selectionArea=null;this.selectionAnchor=null;this.selectionFocus=null;this.selectionDragging=!1;this.preserveSelectionFocusOnRelease=!1;this.lastLeftPress=null;this.tui=e.tui,this.terminal=e.terminal,this.renderCluster=e.renderCluster,this.getShowHardwareCursor=e.getShowHardwareCursor??(()=>!1),this.mouseScroll=e.mouseScroll!==!1,this.keyboardScrollShortcuts=e.keyboardScrollShortcuts??ML,this.onCopySelection=e.onCopySelection??null,this.rowsDescriptor=IX(e.terminal),this.originalWrite=e.terminal.write.bind(e.terminal),this.originalDoRender=typeof e.tui.doRender=="function"?e.tui.doRender.bind(e.tui):null,this.originalRender=typeof e.tui.render=="function"?e.tui.render.bind(e.tui):null}install(){if(!this.installed){if(typeof this.terminal.write!="function")throw new Error("[powerline-footer] Fixed editor compositor expected terminal.write(data) to exist");this.originalWrite(So()+vX()+this.enableAlternateScreenKeyboardMode()+yX()+(this.mouseScroll?SL():"")+To()),this.emergencyCleanup=()=>{this.disposed||this.restoreTerminalStateForExit()},process.once("exit",this.emergencyCleanup),Object.defineProperty(this.terminal,"rows",{configurable:!0,get:()=>this.getScrollableRows()}),this.originalRender&&(this.tui.render=e=>this.renderScrollableRoot(e)),typeof this.tui.addInputListener=="function"&&(this.removeInputListener=this.tui.addInputListener(e=>this.handleInput(e))),this.terminal.write=e=>this.write(e),this.originalDoRender&&(this.tui.doRender=()=>{this.renderPassActive=!0,this.renderPassCluster=null;try{this.originalDoRender?.(),this.requestRepaint()}finally{this.renderPassActive=!1,this.renderPassCluster=null}}),typeof this.tui.compositeLineAt=="function"&&(this.originalCompositeLineAt=this.tui.compositeLineAt.bind(this.tui),this.tui.compositeLineAt=(e,n,i,r,o)=>this.originalCompositeLineAt?.(RL(e),RL(n),i,r,o)??""),this.installed=!0}}hideRenderable(e){if(this.patchedRenders.some(i=>i.target===e))return;let n=e.render.bind(e);this.patchedRenders.push({target:e,originalRender:n}),e.render=()=>[]}renderHidden(e,n){return(this.patchedRenders.find(o=>o.target===e)?.originalRender??e.render.bind(e))(n)}jumpToPreviousRootTarget(e){return this.jumpToRootTarget(e,"previous")}jumpToNextRootTarget(e){return this.jumpToRootTarget(e,"next")}jumpToRootBottom(){return this.disposed||this.hasVisibleOverlay()||this.scrollOffset===0?!1:(this.clearSelection(),this.lastLeftPress=null,this.scrollOffset=0,this.requestRender(),!0)}jumpToRootTarget(e,n){if(this.disposed||e.length===0||this.hasVisibleOverlay())return!1;let i=this.visibleRootStart,r=n==="previous"?e.filter(o=>o<i).sort((o,s)=>s-o):e.filter(o=>o>i).sort((o,s)=>o-s);for(let o of r){let s=Math.max(0,Math.min(this.lastRootLineCount-Math.max(1,this.visibleScrollableRows)-o,this.maxScrollOffset));if(s!==this.scrollOffset)return this.clearSelection(),this.lastLeftPress=null,this.scrollOffset=s,this.requestRender(),!0}return!1}requestRepaint(){if(this.disposed||this.hasVisibleOverlay())return;let e=this.getRawRows(),n=Math.max(1,this.terminal.columns||80),i=this.getCluster(n,e);i.lines.length!==0&&this.originalWrite(So()+Ny(this.decorateCluster(i),e,n,this.getShowHardwareCursor())+To())}dispose(e={}){if(!this.disposed){this.disposed=!0;for(let n of this.patchedRenders.splice(0))n.target.render=n.originalRender;this.removeInputListener?.(),this.removeInputListener=null,this.emergencyCleanup&&(process.removeListener("exit",this.emergencyCleanup),this.emergencyCleanup=null),this.mouseReportingResumeTimer&&(clearTimeout(this.mouseReportingResumeTimer),this.mouseReportingResumeTimer=null),this.clipboardRestoreTimer&&(clearTimeout(this.clipboardRestoreTimer),this.clipboardRestoreTimer=null),this.terminal.write=this.originalWrite,this.originalDoRender&&(this.tui.doRender=this.originalDoRender),this.originalRender&&(this.tui.render=this.originalRender),this.originalCompositeLineAt&&(this.tui.compositeLineAt=this.originalCompositeLineAt,this.originalCompositeLineAt=null),this.rowsDescriptor?Object.defineProperty(this.terminal,"rows",this.rowsDescriptor):Reflect.deleteProperty(this.terminal,"rows"),this.restoreTerminalState(e)}}getRawRows(){return Math.max(2,AX(this.terminal,this.rowsDescriptor))}getScrollableRows(){if(this.disposed||this.writing||this.renderingCluster||this.checkingOverlay||this.hasVisibleOverlay())return this.getRawRows();let e=this.getRawRows(),n=Math.max(1,this.terminal.columns||80),i=this.getCluster(n,e);return Math.max(1,e-i.lines.length)}renderScrollableRoot(e){if(!this.originalRender||this.disposed||this.renderingScrollableRoot)return this.originalRender?.(e)??[];if(this.hasVisibleOverlay())return this.originalRender(e).map(n=>EX(n,Math.max(1,e)));this.renderingScrollableRoot=!0;try{let n=this.refreshRootWindow(e);return this.visibleRootLines.map((i,r)=>this.renderSelectionHighlight(i,n+r,"root"))}finally{this.renderingScrollableRoot=!1}}refreshRootWindow(e){if(!this.originalRender)return this.updateVisibleRootWindow();let n=this.getRawRows(),i=Math.max(1,e),r=this.getCluster(i,n),o=Math.max(1,n-r.lines.length),s=this.originalRender(i);return this.rootLines=s,this.scrollOffset>0&&this.lastRootLineCount>0&&s.length>this.lastRootLineCount&&(this.scrollOffset+=s.length-this.lastRootLineCount),this.lastRootLineCount=s.length,this.maxScrollOffset=Math.max(0,s.length-o),this.scrollOffset=Math.max(0,Math.min(this.scrollOffset,this.maxScrollOffset)),this.updateVisibleRootWindow(o)}handleInput(e){if(this.disposed||this.hasVisibleOverlay())return;let n=this.mouseScroll?TX(e):null;if(n){for(let r of n)this.handleMousePacket(r);return{consume:!0}}let i=SX(e,this.keyboardScrollShortcuts);if(i!==0)return this.scrollBy(i),{consume:!0}}handleMousePacket(e){let n=kX(e);if(n!==0){this.selectionDragging=!1,this.scrollBy(n);return}let i=this.selectionLocationForPacket(e);if(RX(e)){this.selectionDragging=!1,this.preserveSelectionFocusOnRelease=!1;let r=this.isLocationInsideSelection(i)?this.getSelectedText():"";if(r){this.onCopySelection?.(r),this.lastLeftPress=null,this.pauseMouseReportingForContextMenu(r);return}this.clearSelection(),this.lastLeftPress=null,this.pauseMouseReportingForContextMenu();return}if(!this.scrollSelectionAtViewportEdge(e)){if(this.selectionDragging&&MX(e)){this.finishSelection(e,i);return}if(i){if(CX(e)){this.startSelection(i);return}if(this.selectionDragging&&kL(e)&&i.area===this.selectionArea){this.lastLeftPress=null,this.preserveSelectionFocusOnRelease=!1,this.selectionFocus=i.point,this.requestRender();return}}}}updateVisibleRootWindow(e=this.visibleScrollableRows){let n=Math.max(1,e),i=Math.max(0,this.rootLines.length-n-this.scrollOffset),r=this.rootLines.slice(i,i+n);for(;r.length<n;)r.push("");return this.visibleRootStart=i,this.visibleScrollableRows=n,this.visibleRootLines=r,i}finishSelection(e,n){this.preserveSelectionFocusOnRelease||(this.selectionFocus=n?.area===this.selectionArea?n.point:this.clampedSelectionPointForPacket(e,this.selectionArea)),this.preserveSelectionFocusOnRelease=!1,this.selectionDragging=!1;let i=this.getSelectedText();i?(this.lastLeftPress=null,this.onCopySelection?.(i)):this.clearSelection(),this.requestRender()}startSelection(e){let n=Date.now(),i=e.point.line;if(this.lastLeftPress&&this.lastLeftPress.area===e.area&&this.lastLeftPress.line===i&&n-this.lastLeftPress.at<=fX){this.selectionArea=e.area,this.selectionAnchor={line:i,col:0},this.selectionFocus={line:i,col:this.selectionLineWidth(e.area,i)},this.selectionDragging=!0,this.preserveSelectionFocusOnRelease=!0,this.lastLeftPress=null,this.requestRender();return}this.selectionArea=e.area,this.selectionAnchor=e.point,this.selectionFocus=e.point,this.selectionDragging=!0,this.preserveSelectionFocusOnRelease=!1,this.lastLeftPress={area:e.area,line:i,at:n},this.requestRender()}selectionLocationForPacket(e){if(e.row<1)return null;let n=Math.max(0,e.col-1);if(e.row<=this.visibleScrollableRows)return{area:"root",point:{line:this.visibleRootStart+e.row-1,col:n}};let i=e.row-this.visibleScrollableRows-1;return i>=this.visibleClusterLines.length?null:{area:"cluster",point:{line:i,col:n}}}scrollSelectionAtViewportEdge(e){if(!this.selectionDragging||this.selectionArea!=="root"||!kL(e))return!1;let n=e.row<=1?1:e.row>=this.visibleScrollableRows?-1:0;if(n===0)return!1;let i=Math.max(0,Math.min(this.scrollOffset+n,this.maxScrollOffset));if(i===this.scrollOffset)return!1;this.lastLeftPress=null,this.preserveSelectionFocusOnRelease=!0,this.scrollOffset=i;let r=this.updateVisibleRootWindow(),o=n>0?r:r+Math.max(0,this.visibleScrollableRows-1);return this.selectionFocus={line:o,col:Math.max(0,e.col-1)},this.requestRender(),!0}clampedSelectionPointForPacket(e,n){if(n==="cluster")return{line:Math.max(0,Math.min(e.row-this.visibleScrollableRows-1,this.visibleClusterLines.length-1)),col:Math.max(0,e.col-1)};let i=Math.max(1,Math.min(e.row,this.visibleScrollableRows));return{line:this.visibleRootStart+i-1,col:Math.max(0,e.col-1)}}renderSelectionHighlight(e,n,i){let r=this.getSelectionRangeForLine(n,i);if(!r)return e;let o=$y(e),s=Math.max(0,Math.min(r.startCol,N(o))),a=Math.max(s,Math.min(r.endCol,N(o)));if(s===a)return e;let l=Ag(o,0,s),c=Ag(o,s,a),u=Ag(o,a,Number.POSITIVE_INFINITY);return`${l}\x1B[7m${c}\x1B[27m${u}`}selectionLineWidth(e,n){let i=e==="root"?this.visibleRootLines:this.visibleClusterLines,r=e==="root"?this.visibleRootStart:0;return N($y(i[n-r]??""))}getSelectedText(){if(!this.selectionArea||!this.selectionAnchor||!this.selectionFocus)return"";let e=CL(this.selectionAnchor,this.selectionFocus)<=0?this.selectionAnchor:this.selectionFocus,n=e===this.selectionAnchor?this.selectionFocus:this.selectionAnchor;if(e.line===n.line&&e.col===n.col)return"";let i=this.selectionArea==="root"?this.rootLines:this.visibleClusterLines,r=[];for(let o=e.line;o<=n.line;o++){let s=$y(i[o]??""),a=o===e.line?e.col:0,l=o===n.line?n.col:Number.POSITIVE_INFINITY;r.push(Ag(s,a,l))}return r.join(`
466
466
  `).replace(/[ \t]+$/gm,"").trimEnd()}getSelectionRangeForLine(e,n){if(this.selectionArea!==n||!this.selectionAnchor||!this.selectionFocus)return null;let i=CL(this.selectionAnchor,this.selectionFocus)<=0?this.selectionAnchor:this.selectionFocus,r=i===this.selectionAnchor?this.selectionFocus:this.selectionAnchor;return e<i.line||e>r.line?null:{startCol:e===i.line?i.col:0,endCol:e===r.line?r.col:Number.POSITIVE_INFINITY}}isLocationInsideSelection(e){if(!e||e.area!==this.selectionArea)return!1;let n=this.getSelectionRangeForLine(e.point.line,e.area);return!!(n&&e.point.col>=n.startCol&&e.point.col<n.endCol)}scrollBy(e){let n=Math.max(1,this.terminal.columns||80);this.refreshRootWindow(n);let i=Math.max(0,Math.min(this.scrollOffset+e,this.maxScrollOffset));i!==this.scrollOffset&&(this.clearSelection(),this.lastLeftPress=null,this.scrollOffset=i,this.repaintScrollableViewport(n),this.requestRender())}requestRender(){typeof this.tui.requestRender=="function"&&this.tui.requestRender()}repaintScrollableViewport(e){if(this.disposed||this.writing||this.hasVisibleOverlay())return;let n=this.getRawRows(),i=this.getCluster(e,n),r=Math.max(1,n-i.lines.length),o=this.updateVisibleRootWindow(r),s=So()+wL(1,r)+Eg(1,1);for(let a=0;a<r;a++)a>0&&(s+=`\r
467
- `),s+=PL(),s+=qy(this.renderSelectionHighlight(this.visibleRootLines[a]??"",o+a,"root"),e);s+=Ny(this.decorateCluster(i),n,e,this.getShowHardwareCursor()),s+=To(),this.originalWrite(s)}pauseMouseReportingForContextMenu(e=null){this.mouseReportingResumeTimer&&clearTimeout(this.mouseReportingResumeTimer),this.clipboardRestoreTimer&&(clearTimeout(this.clipboardRestoreTimer),this.clipboardRestoreTimer=null),this.originalWrite(So()+By()+To()),this.mouseReportingResumeTimer=setTimeout(()=>{this.mouseReportingResumeTimer=null,this.disposed||this.originalWrite(So()+SL()+To())},hX),typeof this.mouseReportingResumeTimer=="object"&&"unref"in this.mouseReportingResumeTimer&&this.mouseReportingResumeTimer.unref();let n=this.onCopySelection;if(!e||!n)return;let i=Math.ceil(gX/yL),r=()=>{this.clipboardRestoreTimer=setTimeout(()=>{this.clipboardRestoreTimer=null,!this.disposed&&(i-=1,this.getSelectedText()===e&&(n(e),i>0&&r()))},yL),typeof this.clipboardRestoreTimer=="object"&&"unref"in this.clipboardRestoreTimer&&this.clipboardRestoreTimer.unref()};r()}clearSelection(){this.selectionArea=null,this.selectionAnchor=null,this.selectionFocus=null,this.selectionDragging=!1,this.preserveSelectionFocusOnRelease=!1}activeExtendedKeyboardMode(){return this.terminal.kittyProtocolActive===!0?"kitty":Reflect.get(this.terminal,"_modifyOtherKeysActive")===!0?"modifyOtherKeys":null}enableAlternateScreenKeyboardMode(){return this.extendedKeyboardMode=this.activeExtendedKeyboardMode(),this.extendedKeyboardMode?TL(this.extendedKeyboardMode):""}restoreTerminalState(e={}){let n=this.extendedKeyboardMode??this.activeExtendedKeyboardMode(),i=!e.resetExtendedKeyboardModes&&this.extendedKeyboardMode===null&&n!==null;this.originalWrite(So()+jy()+(this.mouseScroll?By():"")+(n?wX(n):"")+AL()+IL()+(i&&n?TL(n):"")+(e.resetExtendedKeyboardModes?EL():"")+To())}restoreTerminalStateForExit(){try{this.restoreTerminalState({resetExtendedKeyboardModes:!0})}catch{}}write(e){if(this.disposed||this.writing||this.hasVisibleOverlay()){this.originalWrite(e);return}this.writing=!0;try{let n=this.getRawRows(),i=Math.max(1,this.terminal.columns||80),r=this.getCluster(i,n),o=r.lines.length;if(o===0||n<=2){this.originalWrite(e);return}let s=Math.max(1,n-o),a=typeof this.tui.hardwareCursorRow=="number"?this.tui.hardwareCursorRow:typeof this.tui.cursorRow=="number"?this.tui.cursorRow:0,l=typeof this.tui.previousViewportTop=="number"?this.tui.previousViewportTop:0,c=Math.max(1,Math.min(s,a-l+1)),u=So()+wL(1,s)+Eg(c,1)+e+Ny(this.decorateCluster(r),n,i,this.getShowHardwareCursor())+To();this.originalWrite(u)}finally{this.writing=!1}}getCluster(e,n){if(this.renderPassActive&&this.renderPassCluster?.width===e&&this.renderPassCluster.terminalRows===n)return this.renderPassCluster.cluster;let i=this.withClusterRender(()=>this.renderCluster(e,n));return this.visibleClusterLines=i.lines,this.renderPassActive&&(this.renderPassCluster={width:e,terminalRows:n,cluster:i}),i}decorateCluster(e){return this.selectionArea!=="cluster"?e:{...e,lines:e.lines.map((n,i)=>this.renderSelectionHighlight(n,i,"cluster"))}}withClusterRender(e){let n=this.renderingCluster;this.renderingCluster=!0;try{return e()}finally{this.renderingCluster=n}}hasVisibleOverlay(){if(this.checkingOverlay)return!1;this.checkingOverlay=!0;try{if(typeof this.tui.hasOverlay=="function"&&this.tui.hasOverlay())return!0;let e=Reflect.get(this.tui,"overlayStack");return Array.isArray(e)?e.some(n=>n&&n.hidden!==!0):!1}finally{this.checkingOverlay=!1}}};import{existsSync as FL,readFileSync as DL,writeFileSync as Fze,mkdirSync as Dze}from"node:fs";import{join as Vy,dirname as $ze}from"node:path";import{homedir as UL}from"node:os";var _X="openai-codex/gpt-5.4-mini",OX=`Generate a 2-4 word "{theme}" themed loading message ending in "...".
467
+ `),s+=PL(),s+=qy(this.renderSelectionHighlight(this.visibleRootLines[a]??"",o+a,"root"),e);s+=Ny(this.decorateCluster(i),n,e,this.getShowHardwareCursor()),s+=To(),this.originalWrite(s)}pauseMouseReportingForContextMenu(e=null){this.mouseReportingResumeTimer&&clearTimeout(this.mouseReportingResumeTimer),this.clipboardRestoreTimer&&(clearTimeout(this.clipboardRestoreTimer),this.clipboardRestoreTimer=null),this.originalWrite(So()+By()+To()),this.mouseReportingResumeTimer=setTimeout(()=>{this.mouseReportingResumeTimer=null,this.disposed||this.originalWrite(So()+SL()+To())},hX),typeof this.mouseReportingResumeTimer=="object"&&"unref"in this.mouseReportingResumeTimer&&this.mouseReportingResumeTimer.unref();let n=this.onCopySelection;if(!e||!n)return;let i=Math.ceil(gX/yL),r=()=>{this.clipboardRestoreTimer=setTimeout(()=>{this.clipboardRestoreTimer=null,!this.disposed&&(i-=1,this.getSelectedText()===e&&(n(e),i>0&&r()))},yL),typeof this.clipboardRestoreTimer=="object"&&"unref"in this.clipboardRestoreTimer&&this.clipboardRestoreTimer.unref()};r()}clearSelection(){this.selectionArea=null,this.selectionAnchor=null,this.selectionFocus=null,this.selectionDragging=!1,this.preserveSelectionFocusOnRelease=!1}activeExtendedKeyboardMode(){return this.terminal.kittyProtocolActive===!0?"kitty":Reflect.get(this.terminal,"_modifyOtherKeysActive")===!0?"modifyOtherKeys":null}enableAlternateScreenKeyboardMode(){return this.extendedKeyboardMode=this.activeExtendedKeyboardMode(),this.extendedKeyboardMode?TL(this.extendedKeyboardMode):""}restoreTerminalState(e={}){let n=this.extendedKeyboardMode??this.activeExtendedKeyboardMode(),i=!e.resetExtendedKeyboardModes&&this.extendedKeyboardMode===null&&n!==null;this.originalWrite(So()+jy()+(this.mouseScroll?By():"")+(n?wX(n):"")+AL()+IL()+(i&&n?TL(n):"")+(e.resetExtendedKeyboardModes?EL():"")+To())}restoreTerminalStateForExit(){try{this.restoreTerminalState({resetExtendedKeyboardModes:!0})}catch{}}write(e){if(this.disposed||this.writing||this.hasVisibleOverlay()){this.originalWrite(e);return}this.writing=!0;try{let n=this.getRawRows(),i=Math.max(1,this.terminal.columns||80),r=this.getCluster(i,n),o=r.lines.length;if(o===0||n<=2){this.originalWrite(e);return}let s=Math.max(1,n-o),a=typeof this.tui.hardwareCursorRow=="number"?this.tui.hardwareCursorRow:typeof this.tui.cursorRow=="number"?this.tui.cursorRow:0,l=typeof this.tui.previousViewportTop=="number"?this.tui.previousViewportTop:0,c=Math.max(1,Math.min(s,a-l+1)),u=So()+wL(1,s)+Eg(c,1)+e+Ny(this.decorateCluster(r),n,i,this.getShowHardwareCursor())+To();this.originalWrite(u)}finally{this.writing=!1}}getCluster(e,n){if(this.renderPassActive&&this.renderPassCluster?.width===e&&this.renderPassCluster.terminalRows===n)return this.renderPassCluster.cluster;let i=this.withClusterRender(()=>this.renderCluster(e,n));return this.visibleClusterLines=i.lines,this.renderPassActive&&(this.renderPassCluster={width:e,terminalRows:n,cluster:i}),i}decorateCluster(e){return this.selectionArea!=="cluster"?e:{...e,lines:e.lines.map((n,i)=>this.renderSelectionHighlight(n,i,"cluster"))}}withClusterRender(e){let n=this.renderingCluster;this.renderingCluster=!0;try{return e()}finally{this.renderingCluster=n}}hasVisibleOverlay(){if(this.checkingOverlay)return!1;this.checkingOverlay=!0;try{if(typeof this.tui.hasOverlay=="function"&&this.tui.hasOverlay())return!0;let e=Reflect.get(this.tui,"overlayStack");return Array.isArray(e)?e.some(n=>n&&n.hidden!==!0):!1}finally{this.checkingOverlay=!1}}};import{existsSync as FL,readFileSync as DL,writeFileSync as Wze,mkdirSync as Fze}from"node:fs";import{join as Vy,dirname as Uze}from"node:path";import{homedir as UL}from"node:os";var _X="openai-codex/gpt-5.4-mini",OX=`Generate a 2-4 word "{theme}" themed loading message ending in "...".
468
468
 
469
469
  Task: {task}
470
470