@adaline/open-router 1.11.0 → 1.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2,37 +2,37 @@
2
2
 
3
3
  var zod = require('zod');
4
4
 
5
- var Qn=Object.defineProperty;var Ie=Object.getOwnPropertySymbols;var Xn=Object.prototype.hasOwnProperty,ei=Object.prototype.propertyIsEnumerable;var z=(i,n)=>(n=Symbol[i])?n:Symbol.for("Symbol."+i),ni=i=>{throw TypeError(i)};var Le=(i,n,o)=>n in i?Qn(i,n,{enumerable:true,configurable:true,writable:true,value:o}):i[n]=o,R=(i,n)=>{for(var o in n||(n={}))Xn.call(n,o)&&Le(i,o,n[o]);if(Ie)for(var o of Ie(n))ei.call(n,o)&&Le(i,o,n[o]);return i};var N=(i,n,o)=>new Promise((t,r)=>{var a=p=>{try{m(o.next(p));}catch(k){r(k);}},u=p=>{try{m(o.throw(p));}catch(k){r(k);}},m=p=>p.done?t(p.value):Promise.resolve(p.value).then(a,u);m((o=o.apply(i,n)).next());}),$e=function(i,n){this[0]=i,this[1]=n;},ee=(i,n,o)=>{var t=(u,m,p,k)=>{try{var P=o[u](m),d=(m=P.value)instanceof $e,g=P.done;Promise.resolve(d?m[0]:m).then(y=>d?t(u==="return"?u:"next",m[1]?{done:y.done,value:y.value}:y,p,k):p({value:y,done:g})).catch(y=>t("throw",y,p,k));}catch(y){k(y);}},r=u=>a[u]=m=>new Promise((p,k)=>t(u,m,p,k)),a={};return o=o.apply(i,n),a[z("asyncIterator")]=()=>a,r("next"),r("throw"),r("return"),a},Ae=i=>{var n=i[z("asyncIterator")],o=false,t,r={};return n==null?(n=i[z("iterator")](),t=a=>r[a]=u=>n[a](u)):(n=n.call(i),t=a=>r[a]=u=>{if(o){if(o=false,a==="throw")throw u;return u}return o=true,{done:false,value:new $e(new Promise(m=>{var p=n[a](u);p instanceof Object||ni("Object expected"),m(p);}),1)}}),r[z("iterator")]=()=>r,t("next"),"throw"in n?t("throw"):r.throw=a=>{throw a},"return"in n&&t("return"),r};var _="system",j="user",M="assistant",I="tool",ii=[_,j,M,I],oe=zod.z.enum(ii),oi=[M],ti=zod.z.enum(oi),He="error",Ge="safety",ri=zod.z.object({type:zod.z.literal(Ge),value:zod.z.object({category:zod.z.string(),probability:zod.z.string(),blocked:zod.z.boolean(),message:zod.z.string()})}),ai=(i=zod.z.undefined())=>zod.z.object({modality:zod.z.literal(He),value:zod.z.discriminatedUnion("type",[ri]),metadata:i}),Ve="partial-error",li=zod.z.object({type:zod.z.literal(Ge),category:zod.z.string().optional(),probability:zod.z.string().optional(),blocked:zod.z.boolean().optional(),message:zod.z.string().optional()}),si=(i=zod.z.undefined())=>zod.z.object({modality:zod.z.literal(Ve),value:zod.z.discriminatedUnion("type",[li]),metadata:i}),D="image",te="base64",mi=["png","jpeg","webp","gif"],ci=zod.z.object({type:zod.z.literal(te),base64:zod.z.string(),mediaType:zod.z.enum(mi)}),re="url",ui=zod.z.object({type:zod.z.literal(re),url:zod.z.string()}),pi=zod.z.discriminatedUnion("type",[ci,ui]),di=["low","medium","high","auto"],gi=zod.z.enum(di),Pi=(i=zod.z.undefined())=>zod.z.object({modality:zod.z.literal(D),detail:gi,value:pi,metadata:i}),Ke="pdf",bi="base64",ki=zod.z.object({type:zod.z.literal(bi),base64:zod.z.string()}),yi="url",hi=zod.z.object({type:zod.z.literal(yi),url:zod.z.string()}),fi=zod.z.discriminatedUnion("type",[ki,hi]),Ti=(i=zod.z.undefined())=>zod.z.object({modality:zod.z.literal(Ke),value:fi,file:zod.z.object({name:zod.z.string(),id:zod.z.string(),size:zod.z.number().optional()}),metadata:i}),H="reasoning",G="partial-reasoning",V="thinking",ae="redacted",ie=zod.z.object({type:zod.z.literal(V),thinking:zod.z.string(),signature:zod.z.string()}),We=zod.z.object({type:zod.z.literal(ae),data:zod.z.string()}),Mi=zod.z.discriminatedUnion("type",[ie,We]),le=(i=zod.z.undefined())=>zod.z.object({modality:zod.z.literal(H),value:Mi,metadata:i}),Ri=zod.z.object({type:zod.z.literal(V),thinking:ie.shape.thinking.optional(),signature:ie.shape.signature.optional()}),xi=zod.z.discriminatedUnion("type",[Ri,We]),se=(i=zod.z.undefined())=>zod.z.object({modality:zod.z.literal(G),value:xi,metadata:i}),Je="search-result",Ze="google",Si=zod.z.object({type:zod.z.literal(Ze),query:zod.z.string(),responses:zod.z.array(zod.z.object({source:zod.z.string(),url:zod.z.string(),title:zod.z.string(),snippet:zod.z.string().optional()})),references:zod.z.array(zod.z.object({text:zod.z.string(),responseIndices:zod.z.array(zod.z.number()),startIndex:zod.z.number().optional(),endIndex:zod.z.number().optional(),confidenceScores:zod.z.array(zod.z.number()).optional()}))}),vi=(i=zod.z.undefined())=>zod.z.object({modality:zod.z.literal(Je),value:zod.z.discriminatedUnion("type",[Si]),metadata:i}),Ye="partial-search-result",Ci=zod.z.object({type:zod.z.literal(Ze),query:zod.z.string().optional(),responses:zod.z.array(zod.z.object({source:zod.z.string().optional(),url:zod.z.string().optional(),title:zod.z.string().optional(),snippet:zod.z.string().optional()})).optional(),references:zod.z.array(zod.z.object({text:zod.z.string().optional(),responseIndices:zod.z.array(zod.z.number()).optional(),startIndex:zod.z.number().optional(),endIndex:zod.z.number().optional(),confidenceScores:zod.z.array(zod.z.number()).optional()})).optional()}),Ni=(i=zod.z.undefined())=>zod.z.object({modality:zod.z.literal(Ye),value:zod.z.discriminatedUnion("type",[Ci]),metadata:i}),T="text",Qe=(i=zod.z.undefined())=>zod.z.object({modality:zod.z.literal(T),value:zod.z.string(),metadata:i}),me="partial-text",Xe=(i=zod.z.undefined())=>zod.z.object({modality:zod.z.literal(me),value:zod.z.string(),metadata:i}),U="tool-call",en=(i=zod.z.undefined())=>zod.z.object({modality:zod.z.literal(U),index:zod.z.number().int().nonnegative(),id:zod.z.string().min(1),name:zod.z.string().min(1),arguments:zod.z.string(),serverName:zod.z.string().optional(),thoughtSignature:zod.z.string().optional(),metadata:i}),ce="partial-tool-call",nn=(i=zod.z.undefined())=>zod.z.object({modality:zod.z.literal(ce),index:zod.z.number().int().nonnegative(),id:zod.z.string().optional(),name:zod.z.string().optional(),arguments:zod.z.string().optional(),serverName:zod.z.string().optional(),thoughtSignature:zod.z.string().optional(),metadata:i}),q="tool-response",Ui=(i=zod.z.undefined())=>zod.z.object({modality:zod.z.literal(q),index:zod.z.number().int().nonnegative(),id:zod.z.string().min(1),name:zod.z.string().min(1),data:zod.z.string(),apiResponse:zod.z.object({statusCode:zod.z.number().int().nonnegative()}).optional(),metadata:i}),wi="partial-tool-response",Di=(i=zod.z.undefined())=>zod.z.object({modality:zod.z.literal(wi),index:zod.z.number().int().nonnegative(),id:zod.z.string().optional(),name:zod.z.string().optional(),data:zod.z.string().optional(),apiResponse:zod.z.object({statusCode:zod.z.number().int().nonnegative()}).optional(),metadata:i}),qi=[T,D,Ke,U,q,H,He,Je],on=zod.z.enum(qi),Ei=(i=zod.z.undefined(),n=zod.z.undefined(),o=zod.z.undefined(),t=zod.z.undefined(),r=zod.z.undefined(),a=zod.z.undefined(),u=zod.z.undefined(),m=zod.z.undefined())=>zod.z.discriminatedUnion("modality",[Qe(i),Pi(n),Ti(o),en(t),Ui(r),le(a),ai(u),vi(m)]),Oi=[me,ce,G,Ve,Ye];zod.z.enum(Oi);var _i=(i=zod.z.undefined(),n=zod.z.undefined(),o=zod.z.undefined(),t=zod.z.undefined(),r=zod.z.undefined(),a=zod.z.undefined())=>zod.z.discriminatedUnion("modality",[Xe(i),nn(n),se(t),Di(o),si(r),Ni(a)]);var ue=(i=oe,n=zod.z.undefined(),o=zod.z.undefined(),t=zod.z.undefined(),r=zod.z.undefined(),a=zod.z.undefined(),u=zod.z.undefined(),m=zod.z.undefined())=>zod.z.object({role:i,content:zod.z.array(Ei(n,o,t,r,u,a)),metadata:m}),$=(i=ti,n=zod.z.undefined(),o=zod.z.undefined(),t=zod.z.undefined(),r=zod.z.undefined(),a=zod.z.undefined())=>zod.z.object({role:i,partialContent:_i(n,o,t,a),metadata:r}),ji=zod.z.object({promptTokens:zod.z.number().nonnegative(),completionTokens:zod.z.number().nonnegative(),totalTokens:zod.z.number().nonnegative()}),Be=zod.z.object({token:zod.z.string(),logProb:zod.z.number(),bytes:zod.z.array(zod.z.number().int()).nullable()}),Ii=Be.extend({topLogProbs:zod.z.array(Be)}),tn=zod.z.array(Ii);zod.z.object({messages:zod.z.array(ue()),usage:ji.optional(),logProbs:tn.optional()});var Li=zod.z.object({promptTokens:zod.z.number().nonnegative().optional(),completionTokens:zod.z.number().nonnegative().optional(),totalTokens:zod.z.number().nonnegative().optional()});zod.z.object({partialMessages:zod.z.array($()),usage:Li.optional(),logProbs:tn.optional()});var rn=(i=zod.z.record(zod.z.string(),zod.z.any()).optional())=>i,$i=zod.z.object({enabled:zod.z.boolean().default(true),allowedTools:zod.z.array(zod.z.string().min(1))});zod.z.object({type:zod.z.literal("url"),url:zod.z.string().url().refine(i=>i.startsWith("https://"),{message:"MCP server URL must start with https://"}),name:zod.z.string().min(1),toolConfiguration:$i.optional(),authorizationToken:zod.z.string().min(1).optional()});var Ai=["object","array","number","string","boolean","enum"],Fe=zod.z.enum(Ai),Bi=zod.z.object({anyOf:zod.z.array(zod.z.any()).optional(),type:zod.z.union([Fe,zod.z.array(zod.z.union([Fe,zod.z.literal("null")]))]).optional(),default:zod.z.any().optional(),title:zod.z.string().optional(),description:zod.z.string().max(4096).optional(),properties:zod.z.record(zod.z.any()).optional(),required:zod.z.array(zod.z.string()).optional(),minItems:zod.z.number().int().min(0).optional(),maxItems:zod.z.number().int().optional(),items:zod.z.record(zod.z.any()).optional(),enum:zod.z.array(zod.z.union([zod.z.string(),zod.z.number(),zod.z.boolean(),zod.z.null()])).optional(),minimum:zod.z.number().optional(),maximum:zod.z.number().optional(),minLength:zod.z.number().int().min(0).optional(),maxLength:zod.z.number().int().optional(),$ref:zod.z.string().optional()}),Fi=zod.z.object({type:zod.z.enum(["object"]),required:zod.z.array(zod.z.string()),$defs:zod.z.record(zod.z.any()).optional(),properties:zod.z.record(Bi),additionalProperties:zod.z.literal(false)}),an=zod.z.object({name:zod.z.string().regex(/^[a-zA-Z0-9_]{1,64}$/).max(64),description:zod.z.string().max(4096),strict:zod.z.boolean().optional(),schema:Fi}).optional(),zi="text",Hi="token",Gi=[zi,Hi];zod.z.enum(Gi);zod.z.array(zod.z.string().min(1));zod.z.array(zod.z.array(zod.z.number().int().nonnegative()));var Ki="float",Wi=zod.z.object({index:zod.z.number().int().nonnegative(),embedding:zod.z.array(zod.z.number())}),Ji="base64",Zi=zod.z.object({index:zod.z.number().int().nonnegative(),embedding:zod.z.string().base64()}),ze=zod.z.object({totalTokens:zod.z.number().int().nonnegative()});zod.z.discriminatedUnion("encodingFormat",[zod.z.object({encodingFormat:zod.z.literal(Ki),embeddings:zod.z.array(Wi),usage:ze.optional()}),zod.z.object({encodingFormat:zod.z.literal(Ji),embeddings:zod.z.array(Zi),usage:ze.optional()})]);var Yi=i=>{let n=new WeakSet;return JSON.stringify(i,(o,t)=>{if(typeof t=="object"&&t!==null){if(n.has(t))return;n.add(t);}return t})},Qi=i=>i==null?"unknown error":typeof i=="string"?i:i instanceof Error?i.message:Yi(i),ne="GatewayBaseError",E=class ln extends Error{constructor({info:n,cause:o},t){super(`[${t!=null?t:ne}]: ${n}
6
- Message: ${Qi(o)}`),this.name=ne,this.info=n,this.cause=o,this.name=t!=null?t:ne,Object.setPrototypeOf(this,new.target.prototype);}static isGatewayBaseError(n){return n instanceof ln}toJSON(){return {name:this.name,info:this.info,cause:this.cause,message:this.message,stack:this.stack}}},Xi=zod.z.object({inputPricePerMillion:zod.z.number().nonnegative().describe("Price per 1M input tokens"),outputPricePerMillion:zod.z.number().nonnegative().describe("Price per 1M output tokens")}).describe("Input/output price pair (per 1M tokens) for a specific category within a ChatModel pricing tier."),eo=zod.z.object({base:Xi.describe("Base (uncached, non\u2011reasoning) rates")}).describe("Holds the `ChatModelTokenPairPrice` for different categories (e.g., base) within a single pricing tier."),no=zod.z.object({minTokens:zod.z.number().int().nonnegative().describe("Inclusive lower token bound for this tier."),maxTokens:zod.z.number().int().nullable().optional().describe("Exclusive upper token bound; `null` means \u221E."),prices:eo.describe("Price categories and rates for this specific token range.")}).refine(i=>i.maxTokens===null||typeof i.maxTokens=="number"&&i.maxTokens>i.minTokens,{message:"maxTokens must be > minTokens (or null for infinite).",path:["maxTokens"]}).describe("A single pricing tier defined by a token range and associated prices.");zod.z.object({modelName:zod.z.string().describe("Model name this schedule applies to."),currency:zod.z.string().default("USD").describe("Currency code (e.g., USD)."),tokenRanges:zod.z.array(no).min(1).describe("Pricing tiers (`ChatModelTokenRangePrice`) schedule, sorted by minTokens.")}).superRefine((i,n)=>{let{tokenRanges:o}=i;o[0].minTokens!==0&&n.addIssue({code:zod.z.ZodIssueCode.custom,path:["tokenRanges",0,"minTokens"],message:"The first tier must have minTokens = 0."});for(let r=1;r<o.length;r++){let a=o[r-1],u=o[r];if(a.maxTokens===null){n.addIssue({code:zod.z.ZodIssueCode.custom,path:["tokenRanges",r-1,"maxTokens"],message:"Cannot define any tokenRanges after an infinite tier (maxTokens = null)."});break}u.minTokens!==a.maxTokens&&n.addIssue({code:zod.z.ZodIssueCode.custom,path:["tokenRanges",r,"minTokens"],message:`Tier ${r} minTokens (${u.minTokens}) must equal previous tier's maxTokens (${a.maxTokens}) for contiguity.`}),u.minTokens<a.minTokens&&n.addIssue({code:zod.z.ZodIssueCode.custom,path:["tokenRanges",r,"minTokens"],message:`tokenRanges must be sorted by ascending minTokens. Tier ${r} (${u.minTokens}) starts before Tier ${r-1} (${a.minTokens}).`});}let t=o[o.length-1];o.every(r=>r.maxTokens!==null||r===t)&&t.maxTokens!==null&&n.addIssue({code:zod.z.ZodIssueCode.custom,path:["tokenRanges",o.length-1,"maxTokens"],message:"The final tier must have maxTokens = null (representing infinity)."});}).describe("Complete pricing schedule for a single chat model, including all its token-based tiers.");var io="function";var oo=zod.z.enum(["object","array","number","string","boolean","null"]),to=zod.z.object({anyOf:zod.z.array(zod.z.any()).optional(),type:oo.optional(),default:zod.z.any().optional(),title:zod.z.string().optional(),description:zod.z.string().max(4096).optional(),properties:zod.z.record(zod.z.any()).optional(),required:zod.z.array(zod.z.string()).optional(),minItems:zod.z.number().int().min(0).optional(),maxItems:zod.z.number().int().optional(),items:zod.z.record(zod.z.any()).optional(),enum:zod.z.array(zod.z.union([zod.z.string(),zod.z.number(),zod.z.boolean(),zod.z.null()])).optional(),minimum:zod.z.number().optional(),maximum:zod.z.number().optional(),minLength:zod.z.number().int().min(0).optional(),maxLength:zod.z.number().int().optional()});zod.z.object({type:zod.z.enum(["object"]),title:zod.z.string().optional(),$defs:zod.z.record(zod.z.any()).optional(),properties:zod.z.record(to).optional(),required:zod.z.array(zod.z.string()).optional()});var ro=zod.z.object({name:zod.z.string().regex(/^[a-zA-Z0-9_]{1,64}$/).max(64),description:zod.z.string().max(4096),parameters:zod.z.any(),strict:zod.z.boolean().optional()});var ao=zod.z.enum(["function"]),lo=zod.z.object({maxAttempts:zod.z.number().int().positive(),initialDelay:zod.z.number().int().positive(),exponentialFactor:zod.z.number().int().positive()}),so=zod.z.object({type:zod.z.literal("http"),method:zod.z.enum(["get","post"]),url:zod.z.string().url(),headers:zod.z.record(zod.z.string()).optional(),query:zod.z.record(zod.z.string()).optional(),body:zod.z.record(zod.z.any()).optional(),proxyUrl:zod.z.string().url().optional(),proxyHeaders:zod.z.record(zod.z.string()).optional(),retry:lo.optional()}),mo=zod.z.discriminatedUnion("type",[so]),co=zod.z.object({type:ao,definition:zod.z.object({schema:ro}),request:mo.optional()}),uo=[io];zod.z.enum(uo);var sn=(i=zod.z.undefined())=>zod.z.discriminatedUnion("type",[co.extend({metadata:i})]),pe=i=>Qe().parse({modality:T,value:i}),mn=(i,n,o,t,r,a)=>en().parse({modality:U,index:i,id:n,name:o,arguments:t,serverName:r,thoughtSignature:a});var de=(i,n)=>$().parse({role:i,partialContent:Xe().parse({modality:me,value:n})}),cn=(i,n,o,t,r,a,u)=>$().parse({role:i,partialContent:nn().parse({modality:ce,index:n,id:o,name:t,arguments:r,serverName:a,thoughtSignature:u})});var K=(i,n)=>le().parse({modality:H,value:{type:V,thinking:i,signature:n}});var un=i=>le().parse({modality:H,value:{type:ae,data:i}});var W=(i,n,o)=>$().parse({role:i,partialContent:se().parse({modality:G,value:{type:V,thinking:n,signature:o}})}),pn=(i,n)=>$().parse({role:i,partialContent:se().parse({modality:G,value:{type:ae,data:n}})});var po=Object.defineProperty,dn=Object.getOwnPropertySymbols,go=Object.prototype.hasOwnProperty,Po=Object.prototype.propertyIsEnumerable,gn=(i,n,o)=>n in i?po(i,n,{enumerable:true,configurable:true,writable:true,value:o}):i[n]=o,A=(i,n)=>{for(var o in n||(n={}))go.call(n,o)&&gn(i,o,n[o]);if(dn)for(var o of dn(n))Po.call(n,o)&&gn(i,o,n[o]);return i},Pn="ProviderError",Mn=class Rn extends E{constructor({info:n,cause:o}){super({info:n,cause:o},Pn),this.name=Pn,this.info=n,this.cause=o;}static isProviderError(n){return n instanceof Rn}};var bn="ModelResponseError",L=class xn extends E{constructor({info:n,cause:o}){super({info:n,cause:o},bn),this.name=bn,this.cause=o,this.info=n;}static isModelResponseError(n){return n instanceof xn}},kn="InvalidModelRequestError",J=class Sn extends E{constructor({info:n,cause:o}){super({info:n,cause:o},kn),this.name=kn,this.cause=o,this.info=n,Object.setPrototypeOf(this,new.target.prototype);}static isInvalidModelRequestError(n){return n instanceof Sn}},yn="InvalidConfigError",O=class vn extends E{constructor({info:n,cause:o}){super({info:n,cause:o},yn),this.name=yn,this.cause=o,this.info=n,Object.setPrototypeOf(this,new.target.prototype);}static isInvalidConfigError(n){return n instanceof vn}},hn="InvalidMessagesError",S=class Cn extends E{constructor({info:n,cause:o}){super({info:n,cause:o},hn),this.name=hn,this.cause=o,this.info=n,Object.setPrototypeOf(this,new.target.prototype);}static isInvalidMessagesError(n){return n instanceof Cn}},fn="InvalidToolsError",ge=class Nn extends E{constructor({info:n,cause:o}){super({info:n,cause:o},fn),this.name=fn,this.cause=o,this.info=n,Object.setPrototypeOf(this,new.target.prototype);}static isInvalidToolsError(n){return n instanceof Nn}};var Pe="multi-string",Un=zod.z.object({type:zod.z.literal(Pe),param:zod.z.string().min(1),title:zod.z.string().min(1),description:zod.z.string().min(1).max(500),max:zod.z.number().int().positive()}),bo=i=>zod.z.array(zod.z.string()).max(i).default([]).optional(),wn=i=>({def:Un.parse(A({type:Pe},i)),schema:bo(i.max)}),be="object-schema",Dn=zod.z.object({type:zod.z.literal(be),param:zod.z.string().min(1),title:zod.z.string().min(1),description:zod.z.string().min(1).max(500),objectSchema:zod.z.any()}),ko=i=>i.optional(),qn=i=>({def:Dn.parse(A({type:be},i)),schema:ko(i.objectSchema)}),En="paired-select",yo=zod.z.object({value:zod.z.string().min(1),label:zod.z.string().min(1)}),Tn=zod.z.object({key:zod.z.string().min(1),label:zod.z.string().min(1),description:zod.z.string().min(1).max(500).optional(),choices:zod.z.array(yo).min(1)}),ho=zod.z.object({type:zod.z.literal(En),param:zod.z.string().min(1),title:zod.z.string().min(1),description:zod.z.string().min(1).max(500),fields:zod.z.tuple([Tn,Tn]),uniqueByField:zod.z.string().min(1).optional()});var ke="range",On=zod.z.object({type:zod.z.literal(ke),param:zod.z.string().min(1),title:zod.z.string().min(1),description:zod.z.string().min(1).max(500),min:zod.z.number().int(),max:zod.z.number().int(),step:zod.z.number().positive(),default:zod.z.number()}),fo=(i,n,o,t)=>zod.z.number().min(i).max(n).step(o).default(t).optional(),v=i=>({def:On.parse(A({type:ke},i)),schema:fo(i.min,i.max,i.step,i.default)}),ye="select-boolean",_n=zod.z.object({type:zod.z.literal(ye),param:zod.z.string().min(1),title:zod.z.string().min(1),description:zod.z.string().min(1).max(500),default:zod.z.boolean().nullable()}),To=i=>zod.z.boolean().nullable().default(i).optional(),jn=i=>({def:_n.parse(A({type:ye},i)),schema:To(i.default)}),he="select-string",In=zod.z.object({type:zod.z.literal(he),param:zod.z.string().min(1),title:zod.z.string().min(1),description:zod.z.string().min(1).max(500),default:zod.z.string(),choices:zod.z.array(zod.z.string())}),Mo=(i,n)=>zod.z.enum(n).nullable().default(i).optional(),Z=i=>({def:In.parse(A({type:he},i)),schema:Mo(i.default,i.choices)}),Ro=[ke,Pe,he,be,ye,En];zod.z.enum(Ro);var xo=zod.z.discriminatedUnion("type",[On,Un,In,_n,Dn,ho]),Ln=(i=oe,n=on)=>zod.z.object({name:zod.z.string().min(1),description:zod.z.string().min(1),roles:zod.z.record(i,zod.z.string().min(1).optional()),modalities:zod.z.array(n).nonempty(),maxInputTokens:zod.z.number().int().positive().min(1),maxOutputTokens:zod.z.number().int().positive().min(1),maxReasoningTokens:zod.z.number().int().positive().min(1).optional(),config:zod.z.object({def:zod.z.record(zod.z.string().min(1),xo),schema:zod.z.instanceof(zod.z.ZodObject)}).refine(o=>{var t,r;let a=Object.keys(o.def),u=Object.keys((r=(t=o.schema)==null?void 0:t.shape)!=null?r:{});return a.every(m=>u.includes(m))&&u.every(m=>a.includes(m))},{message:"Keys in 'config.def' must exactly match keys in 'config.schema'"}),price:zod.z.custom()});zod.z.record(zod.z.string());zod.z.record(zod.z.union([zod.z.boolean(),zod.z.string(),zod.z.number(),zod.z.object({}),zod.z.array(zod.z.any()),zod.z.null(),zod.z.undefined()]));zod.z.string().url();var So={type:"range",title:"Temperature",description:"Adjusts the model's creativity level. With a setting of 0, the model strictly picks the most probable next word. For endeavors that benefit from a dash of inventiveness, consider dialing it up to 0.7 or higher, enabling the model to produce text that's unexpectedly fresh."},vo={type:"range",title:"Max tokens",description:"Specify the total tokens for generation, where one token approximates four English characters. Setting this to 0 defaults to the model's maximum capacity."},Co={type:"range",title:"Max reasoning tokens",description:"Specify the total tokens for reasoning, where one token approximates four English characters."},No=i=>({type:"multi",title:"Stop sequence",description:`Enter up to ${i} sequences that will halt additional text output. The generated text will exclude these sequences.`}),Uo={type:"range",title:"Top A",description:"Considers only the top tokens that have 'sufficiently high' probabilities relative to the most likely token, functioning like a dynamic Top-P. A lower Top-A value narrows down the token choices based on the highest probability token, while a higher Top-A value refines the filtering without necessarily impacting the creativity of the output."},wo={type:"range",title:"Top P",description:"Selects a subset of likely tokens for generation, restricting choices to the top-P fraction of possibilities, such as the top 10% when P=0.1. This approach can limit the variety of the output. By default, it's set to 1, indicating no restriction. It's advised to adjust this parameter or temperature to modulate output diversity, but not to modify both simultaneously."},Do={type:"range",title:"Top K",description:"Select only from the highest K probabilities for each following word, effectively eliminating the less likely 'long tail' options."},qo={type:"range",title:"Min P",description:"Specifies the minimum probability a token must have to be considered, in relation to the probability of the most likely token. (This value varies based on the confidence level of the top token.) For example, if Min-P is set to 0.1, only tokens with at least 1/10th the probability of the highest-ranked token will be considered."},Eo={type:"range",title:"Frequency penalty",description:"Minimize redundancy. By assigning a penalty to frequently used tokens within the text, the likelihood of repeating identical phrases is reduced. The default setting for this penalty is zero."},Oo={type:"range",title:"Presence penalty",description:"Enhance the introduction of novel subjects by reducing the preference for tokens that have already appeared in the text, thus boosting the chances of exploring fresh topics. The standard setting for this is zero."},_o={type:"range",title:"Seed",description:"When seed is fixed to a specific value, the model makes a best effort to provide the same response for repeated requests. Deterministic output isn't guaranteed. Also, changing the model or parameter settings, such as the temperature, can cause variations in the response even when you use the same seed value. By default, a random seed value is used."},jo={type:"range",title:"Repetition penalty",description:"Reduces the likelihood of repeating tokens from the input. Increasing this value makes the model less prone to repetition, but setting it too high may lead to less coherent output, often resulting in run-on sentences missing smaller words. The token penalty is scaled according to the original token's probability."},Io={type:"boolean",title:"Log probs",description:"Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned."},Lo={type:"range",title:"Top log probs",description:"The number of most likely tokens to return at each token position, each with an associated log probability. 'logprobs' must be set to true if this parameter is used."},$o={type:"boolean",title:"Echo",description:"If true, the response will contain the prompt."},Ao={type:"select",title:"Response format",description:"Choose the response format of your model. For JSON, you must include the string 'JSON' in some form within your system / user prompt."},Bo={type:"select",title:"Response format",description:"Choose the response format of your model. 'json_object' colloquially known as JSON mode, instructs the model to respond with a valid JSON (must include the term 'json' in prompt). 'json_schema' colloquially known as structured outputs, allows you to specify a strict response schema that the model will adhere to."},Fo={type:"object",title:"Response schema",description:"When response format is set to 'json_schema', the model will return a JSON object of the specified schema."},zo={type:"object",title:"MCP servers",description:"MCP servers to use for the model."},b={TEMPERATURE:So,MAX_TOKENS:vo,STOP:No,TOP_A:Uo,TOP_P:wo,TOP_K:Do,MIN_P:qo,FREQUENCY_PENALTY:Eo,PRESENCE_PENALTY:Oo,REPETITION_PENALTY:jo,SEED:_o,LOG_PROBS:Io,TOP_LOG_PROBS:Lo,ECHO:$o,RESPONSE_FORMAT:Ao,RESPONSE_FORMAT_WITH_SCHEMA:Bo,RESPONSE_SCHEMA:Fo,MAX_REASONING_TOKENS:Co,MCP_SERVERS:zo};var $n=i=>Object.fromEntries(Object.entries(i).filter(([n,o])=>o!=null));var An=i=>i.split(";")[0].split("/")[1],Y=i=>i==null?void 0:i.replace(/\/$/,"");var fe=v({param:"temperature",title:b.TEMPERATURE.title,description:b.TEMPERATURE.description,min:0,max:2,step:.01,default:1}),Te=i=>v({param:"max_tokens",title:b.MAX_TOKENS.title,description:b.MAX_TOKENS.description,min:0,max:i,step:1,default:0}),Me=i=>wn({param:"stop",title:b.STOP(i).title,description:b.STOP(i).description,max:i}),wt=v({param:"top_a",title:b.TOP_A.title,description:b.TOP_A.description,min:0,max:1,step:.01,default:0}),Dt=v({param:"top_k",title:b.TOP_K.title,description:b.TOP_K.description,min:0,max:100,step:1,default:0}),Re=v({param:"top_p",title:b.TOP_P.title,description:b.TOP_P.description,min:0,max:1,step:.01,default:1}),qt=v({param:"min_p",title:b.MIN_P.title,description:b.MIN_P.description,min:0,max:1,step:.01,default:0}),xe=v({param:"frequency_penalty",title:b.FREQUENCY_PENALTY.title,description:b.FREQUENCY_PENALTY.description,min:-2,max:2,step:.01,default:0}),Se=v({param:"presence_penalty",title:b.PRESENCE_PENALTY.title,description:b.PRESENCE_PENALTY.description,min:-2,max:2,step:.01,default:0}),Et=v({param:"repetition_penalty",title:b.REPETITION_PENALTY.title,description:b.REPETITION_PENALTY.description,min:0,max:2,step:.01,default:0}),ve=v({param:"seed",title:b.SEED.title,description:b.SEED.description,min:0,max:1e6,step:1,default:0}),Ce=jn({param:"logprobs",title:b.LOG_PROBS.title,description:b.LOG_PROBS.description,default:false}),Ne=v({param:"top_logprobs",title:b.TOP_LOG_PROBS.title,description:b.TOP_LOG_PROBS.description,min:0,max:20,step:1,default:0}),Ue=Z({param:"tool_choice",title:"Tool choice",description:"Controls which (if any) tool is called by the model. 'none' means the model will not call a function. 'auto' means the model can pick between generating a message or calling a tool.",default:"auto",choices:["auto","required","none"]}),Ot=Z({param:"response_format",title:b.RESPONSE_FORMAT.title,description:b.RESPONSE_FORMAT.description,default:"text",choices:["text","json_object"]}),we=Z({param:"response_format",title:b.RESPONSE_FORMAT_WITH_SCHEMA.title,description:b.RESPONSE_FORMAT_WITH_SCHEMA.description,default:"text",choices:["text","json_object","json_schema"]}),De=qn({param:"response_schema",title:b.RESPONSE_SCHEMA.title,description:b.RESPONSE_SCHEMA.description,objectSchema:an});var Bn=(i,n)=>zod.z.object({temperature:fe.schema,maxTokens:Te(i).schema,stop:Me(n).schema,topP:Re.schema,frequencyPenalty:xe.schema,presencePenalty:Se.schema,seed:ve.schema.transform(o=>o===0?void 0:o),logProbs:Ce.schema,topLogProbs:Ne.schema,toolChoice:Ue.schema,responseFormat:we.schema,responseSchema:De.schema}),Fn=(i,n)=>({temperature:fe.def,maxTokens:Te(i).def,stop:Me(n).def,topP:Re.def,frequencyPenalty:xe.def,presencePenalty:Se.def,seed:ve.def,logProbs:Ce.def,topLogProbs:Ne.def,toolChoice:Ue.def,responseFormat:we.def,responseSchema:De.def});var qe={base:(i,n)=>({def:Fn(i,n),schema:Bn(i,n)})};var Go="open-router",B=class{constructor(){this.version="v1";this.name=Go;this.embeddingModelFactories={};}chatModelLiterals(){return ["__base__"]}chatModelSchemas(){return {__base__:Ee}}chatModel(n){let o=Q,t=Oe.parse(n);return new o(Ee,t)}embeddingModelLiterals(){return Object.keys(this.embeddingModelFactories)}embeddingModelSchemas(){return Object.keys(this.embeddingModelFactories).reduce((n,o)=>(n[o]=this.embeddingModelFactories[o].modelSchema,n),{})}embeddingModel(n){throw new Mn({info:"Open Router does not support embedding models yet",cause:new Error("Open Router does not support embedding models yet")})}};B.baseUrl="https://openrouter.ai/api/v1";var _e={"microsoft/mai-ds-r1:free":{modelName:"microsoft/mai-ds-r1:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"google/gemini-2.5-pro-preview-03-25":{modelName:"google/gemini-2.5-pro-preview-03-25",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1.25,outputPricePerMillion:10}}}]},"thudm/glm-z1-32b:free":{modelName:"thudm/glm-z1-32b:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"thudm/glm-4-32b:free":{modelName:"thudm/glm-4-32b:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"google/gemini-2.5-flash-preview":{modelName:"google/gemini-2.5-flash-preview",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.15,outputPricePerMillion:.6}}}]},"google/gemini-2.5-flash-preview:thinking":{modelName:"google/gemini-2.5-flash-preview:thinking",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.15,outputPricePerMillion:3.5}}}]},"openai/o4-mini-high":{modelName:"openai/o4-mini-high",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1.1,outputPricePerMillion:4.4}}}]},"openai/o3":{modelName:"openai/o3",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:10,outputPricePerMillion:40}}}]},"openai/o4-mini":{modelName:"openai/o4-mini",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1.1,outputPricePerMillion:4.4}}}]},"shisa-ai/shisa-v2-llama3.3-70b:free":{modelName:"shisa-ai/shisa-v2-llama3.3-70b:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"qwen/qwen2.5-coder-7b-instruct":{modelName:"qwen/qwen2.5-coder-7b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.19999999999999998,outputPricePerMillion:.19999999999999998}}}]},"openai/gpt-4.1":{modelName:"openai/gpt-4.1",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2,outputPricePerMillion:8}}}]},"openai/gpt-4.1-mini":{modelName:"openai/gpt-4.1-mini",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.39999999999999997,outputPricePerMillion:1.5999999999999999}}}]},"openai/gpt-4.1-nano":{modelName:"openai/gpt-4.1-nano",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.09999999999999999,outputPricePerMillion:.39999999999999997}}}]},"eleutherai/llemma_7b":{modelName:"eleutherai/llemma_7b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7999999999999999,outputPricePerMillion:1.2}}}]},"alfredpros/codellama-7b-instruct-solidity":{modelName:"alfredpros/codellama-7b-instruct-solidity",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7999999999999999,outputPricePerMillion:1.2}}}]},"arliai/qwq-32b-arliai-rpr-v1:free":{modelName:"arliai/qwq-32b-arliai-rpr-v1:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"agentica-org/deepcoder-14b-preview:free":{modelName:"agentica-org/deepcoder-14b-preview:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"moonshotai/kimi-vl-a3b-thinking:free":{modelName:"moonshotai/kimi-vl-a3b-thinking:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"x-ai/grok-3-mini-beta":{modelName:"x-ai/grok-3-mini-beta",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.3,outputPricePerMillion:.5}}}]},"x-ai/grok-3-beta":{modelName:"x-ai/grok-3-beta",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:3,outputPricePerMillion:15}}}]},"nvidia/llama-3.1-nemotron-nano-8b-v1:free":{modelName:"nvidia/llama-3.1-nemotron-nano-8b-v1:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"nvidia/llama-3.3-nemotron-super-49b-v1:free":{modelName:"nvidia/llama-3.3-nemotron-super-49b-v1:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"nvidia/llama-3.1-nemotron-ultra-253b-v1:free":{modelName:"nvidia/llama-3.1-nemotron-ultra-253b-v1:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"meta-llama/llama-4-maverick:free":{modelName:"meta-llama/llama-4-maverick:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"meta-llama/llama-4-maverick":{modelName:"meta-llama/llama-4-maverick",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.16999999999999998,outputPricePerMillion:.6}}}]},"meta-llama/llama-4-scout:free":{modelName:"meta-llama/llama-4-scout:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"meta-llama/llama-4-scout":{modelName:"meta-llama/llama-4-scout",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.08,outputPricePerMillion:.3}}}]},"all-hands/openhands-lm-32b-v0.1":{modelName:"all-hands/openhands-lm-32b-v0.1",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2.6,outputPricePerMillion:3.4}}}]},"mistral/ministral-8b":{modelName:"mistral/ministral-8b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.09999999999999999,outputPricePerMillion:.09999999999999999}}}]},"deepseek/deepseek-v3-base:free":{modelName:"deepseek/deepseek-v3-base:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"scb10x/llama3.1-typhoon2-8b-instruct":{modelName:"scb10x/llama3.1-typhoon2-8b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.18,outputPricePerMillion:.18}}}]},"scb10x/llama3.1-typhoon2-70b-instruct":{modelName:"scb10x/llama3.1-typhoon2-70b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.88,outputPricePerMillion:.88}}}]},"allenai/molmo-7b-d:free":{modelName:"allenai/molmo-7b-d:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"bytedance-research/ui-tars-72b:free":{modelName:"bytedance-research/ui-tars-72b:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"qwen/qwen2.5-vl-3b-instruct:free":{modelName:"qwen/qwen2.5-vl-3b-instruct:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"google/gemini-2.5-pro-exp-03-25:free":{modelName:"google/gemini-2.5-pro-exp-03-25:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"qwen/qwen2.5-vl-32b-instruct:free":{modelName:"qwen/qwen2.5-vl-32b-instruct:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"qwen/qwen2.5-vl-32b-instruct":{modelName:"qwen/qwen2.5-vl-32b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.8999999999999999,outputPricePerMillion:.8999999999999999}}}]},"deepseek/deepseek-chat-v3-0324:free":{modelName:"deepseek/deepseek-chat-v3-0324:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"deepseek/deepseek-chat-v3-0324":{modelName:"deepseek/deepseek-chat-v3-0324",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.27,outputPricePerMillion:1.1}}}]},"featherless/qwerky-72b:free":{modelName:"featherless/qwerky-72b:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"openai/o1-pro":{modelName:"openai/o1-pro",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:150,outputPricePerMillion:600}}}]},"mistralai/mistral-small-3.1-24b-instruct:free":{modelName:"mistralai/mistral-small-3.1-24b-instruct:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"mistralai/mistral-small-3.1-24b-instruct":{modelName:"mistralai/mistral-small-3.1-24b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.09999999999999999,outputPricePerMillion:.3}}}]},"open-r1/olympiccoder-32b:free":{modelName:"open-r1/olympiccoder-32b:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"steelskull/l3.3-electra-r1-70b":{modelName:"steelskull/l3.3-electra-r1-70b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7,outputPricePerMillion:.95}}}]},"google/gemma-3-1b-it:free":{modelName:"google/gemma-3-1b-it:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"google/gemma-3-4b-it:free":{modelName:"google/gemma-3-4b-it:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"google/gemma-3-4b-it":{modelName:"google/gemma-3-4b-it",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.02,outputPricePerMillion:.04}}}]},"ai21/jamba-1.6-large":{modelName:"ai21/jamba-1.6-large",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2,outputPricePerMillion:8}}}]},"ai21/jamba-1.6-mini":{modelName:"ai21/jamba-1.6-mini",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.19999999999999998,outputPricePerMillion:.39999999999999997}}}]},"google/gemma-3-12b-it:free":{modelName:"google/gemma-3-12b-it:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"google/gemma-3-12b-it":{modelName:"google/gemma-3-12b-it",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.049999999999999996,outputPricePerMillion:.09999999999999999}}}]},"cohere/command-a":{modelName:"cohere/command-a",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2.5,outputPricePerMillion:10}}}]},"openai/gpt-4o-mini-search-preview":{modelName:"openai/gpt-4o-mini-search-preview",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.15,outputPricePerMillion:.6}}}]},"openai/gpt-4o-search-preview":{modelName:"openai/gpt-4o-search-preview",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2.5,outputPricePerMillion:10}}}]},"rekaai/reka-flash-3:free":{modelName:"rekaai/reka-flash-3:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"google/gemma-3-27b-it:free":{modelName:"google/gemma-3-27b-it:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"google/gemma-3-27b-it":{modelName:"google/gemma-3-27b-it",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.09999999999999999,outputPricePerMillion:.19999999999999998}}}]},"thedrummer/anubis-pro-105b-v1":{modelName:"thedrummer/anubis-pro-105b-v1",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7999999999999999,outputPricePerMillion:1}}}]},"latitudegames/wayfarer-large-70b-llama-3.3":{modelName:"latitudegames/wayfarer-large-70b-llama-3.3",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7999999999999999,outputPricePerMillion:.8999999999999999}}}]},"thedrummer/skyfall-36b-v2":{modelName:"thedrummer/skyfall-36b-v2",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.5,outputPricePerMillion:.7999999999999999}}}]},"microsoft/phi-4-multimodal-instruct":{modelName:"microsoft/phi-4-multimodal-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.049999999999999996,outputPricePerMillion:.09999999999999999}}}]},"perplexity/sonar-reasoning-pro":{modelName:"perplexity/sonar-reasoning-pro",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2,outputPricePerMillion:8}}}]},"perplexity/sonar-pro":{modelName:"perplexity/sonar-pro",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:3,outputPricePerMillion:15}}}]},"perplexity/sonar-deep-research":{modelName:"perplexity/sonar-deep-research",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2,outputPricePerMillion:8}}}]},"deepseek/deepseek-r1-zero:free":{modelName:"deepseek/deepseek-r1-zero:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"qwen/qwq-32b:free":{modelName:"qwen/qwq-32b:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"qwen/qwq-32b":{modelName:"qwen/qwq-32b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.15,outputPricePerMillion:.19999999999999998}}}]},"moonshotai/moonlight-16b-a3b-instruct:free":{modelName:"moonshotai/moonlight-16b-a3b-instruct:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"nousresearch/deephermes-3-llama-3-8b-preview:free":{modelName:"nousresearch/deephermes-3-llama-3-8b-preview:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"openai/gpt-4.5-preview":{modelName:"openai/gpt-4.5-preview",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:75,outputPricePerMillion:150}}}]},"google/gemini-2.0-flash-lite-001":{modelName:"google/gemini-2.0-flash-lite-001",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.075,outputPricePerMillion:.3}}}]},"anthropic/claude-3.7-sonnet":{modelName:"anthropic/claude-3.7-sonnet",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:3,outputPricePerMillion:15}}}]},"anthropic/claude-3.7-sonnet:thinking":{modelName:"anthropic/claude-3.7-sonnet:thinking",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:3,outputPricePerMillion:15}}}]},"anthropic/claude-3.7-sonnet:beta":{modelName:"anthropic/claude-3.7-sonnet:beta",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:3,outputPricePerMillion:15}}}]},"perplexity/r1-1776":{modelName:"perplexity/r1-1776",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2,outputPricePerMillion:8}}}]},"mistralai/mistral-saba":{modelName:"mistralai/mistral-saba",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.19999999999999998,outputPricePerMillion:.6}}}]},"cognitivecomputations/dolphin3.0-r1-mistral-24b:free":{modelName:"cognitivecomputations/dolphin3.0-r1-mistral-24b:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"cognitivecomputations/dolphin3.0-mistral-24b:free":{modelName:"cognitivecomputations/dolphin3.0-mistral-24b:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"meta-llama/llama-guard-3-8b":{modelName:"meta-llama/llama-guard-3-8b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.055,outputPricePerMillion:.055}}}]},"openai/o3-mini-high":{modelName:"openai/o3-mini-high",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1.1,outputPricePerMillion:4.4}}}]},"deepseek/deepseek-r1-distill-llama-8b":{modelName:"deepseek/deepseek-r1-distill-llama-8b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.04,outputPricePerMillion:.04}}}]},"google/gemini-2.0-flash-001":{modelName:"google/gemini-2.0-flash-001",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.09999999999999999,outputPricePerMillion:.39999999999999997}}}]},"qwen/qwen-vl-plus":{modelName:"qwen/qwen-vl-plus",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.21,outputPricePerMillion:.63}}}]},"aion-labs/aion-1.0":{modelName:"aion-labs/aion-1.0",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:4,outputPricePerMillion:8}}}]},"aion-labs/aion-1.0-mini":{modelName:"aion-labs/aion-1.0-mini",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7,outputPricePerMillion:1.4}}}]},"aion-labs/aion-rp-llama-3.1-8b":{modelName:"aion-labs/aion-rp-llama-3.1-8b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.19999999999999998,outputPricePerMillion:.19999999999999998}}}]},"qwen/qwen-vl-max":{modelName:"qwen/qwen-vl-max",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7999999999999999,outputPricePerMillion:3.1999999999999997}}}]},"qwen/qwen-turbo":{modelName:"qwen/qwen-turbo",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.049999999999999996,outputPricePerMillion:.19999999999999998}}}]},"qwen/qwen2.5-vl-72b-instruct:free":{modelName:"qwen/qwen2.5-vl-72b-instruct:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"qwen/qwen2.5-vl-72b-instruct":{modelName:"qwen/qwen2.5-vl-72b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7,outputPricePerMillion:.7}}}]},"qwen/qwen-plus":{modelName:"qwen/qwen-plus",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.39999999999999997,outputPricePerMillion:1.2}}}]},"qwen/qwen-max":{modelName:"qwen/qwen-max",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1.5999999999999999,outputPricePerMillion:6.3999999999999995}}}]},"openai/o3-mini":{modelName:"openai/o3-mini",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1.1,outputPricePerMillion:4.4}}}]},"deepseek/deepseek-r1-distill-qwen-1.5b":{modelName:"deepseek/deepseek-r1-distill-qwen-1.5b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.18,outputPricePerMillion:.18}}}]},"mistralai/mistral-small-24b-instruct-2501:free":{modelName:"mistralai/mistral-small-24b-instruct-2501:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"mistralai/mistral-small-24b-instruct-2501":{modelName:"mistralai/mistral-small-24b-instruct-2501",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.07,outputPricePerMillion:.14}}}]},"deepseek/deepseek-r1-distill-qwen-32b:free":{modelName:"deepseek/deepseek-r1-distill-qwen-32b:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"deepseek/deepseek-r1-distill-qwen-32b":{modelName:"deepseek/deepseek-r1-distill-qwen-32b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.12,outputPricePerMillion:.18}}}]},"deepseek/deepseek-r1-distill-qwen-14b:free":{modelName:"deepseek/deepseek-r1-distill-qwen-14b:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"deepseek/deepseek-r1-distill-qwen-14b":{modelName:"deepseek/deepseek-r1-distill-qwen-14b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.15,outputPricePerMillion:.15}}}]},"perplexity/sonar-reasoning":{modelName:"perplexity/sonar-reasoning",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1,outputPricePerMillion:5}}}]},"perplexity/sonar":{modelName:"perplexity/sonar",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1,outputPricePerMillion:1}}}]},"liquid/lfm-7b":{modelName:"liquid/lfm-7b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.01,outputPricePerMillion:.01}}}]},"liquid/lfm-3b":{modelName:"liquid/lfm-3b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.02,outputPricePerMillion:.02}}}]},"deepseek/deepseek-r1-distill-llama-70b:free":{modelName:"deepseek/deepseek-r1-distill-llama-70b:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"deepseek/deepseek-r1-distill-llama-70b":{modelName:"deepseek/deepseek-r1-distill-llama-70b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.09999999999999999,outputPricePerMillion:.39999999999999997}}}]},"deepseek/deepseek-r1:free":{modelName:"deepseek/deepseek-r1:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"deepseek/deepseek-r1":{modelName:"deepseek/deepseek-r1",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.5,outputPricePerMillion:2.1799999999999997}}}]},"sophosympatheia/rogue-rose-103b-v0.2:free":{modelName:"sophosympatheia/rogue-rose-103b-v0.2:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"minimax/minimax-01":{modelName:"minimax/minimax-01",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.19999999999999998,outputPricePerMillion:1.1}}}]},"mistralai/codestral-2501":{modelName:"mistralai/codestral-2501",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.3,outputPricePerMillion:.8999999999999999}}}]},"microsoft/phi-4":{modelName:"microsoft/phi-4",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.07,outputPricePerMillion:.14}}}]},"deepseek/deepseek-chat:free":{modelName:"deepseek/deepseek-chat:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"deepseek/deepseek-chat":{modelName:"deepseek/deepseek-chat",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.38,outputPricePerMillion:.8899999999999999}}}]},"sao10k/l3.3-euryale-70b":{modelName:"sao10k/l3.3-euryale-70b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7,outputPricePerMillion:.7999999999999999}}}]},"openai/o1":{modelName:"openai/o1",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:15,outputPricePerMillion:60}}}]},"eva-unit-01/eva-llama-3.33-70b":{modelName:"eva-unit-01/eva-llama-3.33-70b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:4,outputPricePerMillion:6}}}]},"x-ai/grok-2-vision-1212":{modelName:"x-ai/grok-2-vision-1212",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2,outputPricePerMillion:10}}}]},"x-ai/grok-2-1212":{modelName:"x-ai/grok-2-1212",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2,outputPricePerMillion:10}}}]},"cohere/command-r7b-12-2024":{modelName:"cohere/command-r7b-12-2024",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.0375,outputPricePerMillion:.15}}}]},"google/gemini-2.0-flash-exp:free":{modelName:"google/gemini-2.0-flash-exp:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"meta-llama/llama-3.3-70b-instruct:free":{modelName:"meta-llama/llama-3.3-70b-instruct:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"meta-llama/llama-3.3-70b-instruct":{modelName:"meta-llama/llama-3.3-70b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.09999999999999999,outputPricePerMillion:.25}}}]},"amazon/nova-lite-v1":{modelName:"amazon/nova-lite-v1",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.06,outputPricePerMillion:.24}}}]},"amazon/nova-micro-v1":{modelName:"amazon/nova-micro-v1",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.035,outputPricePerMillion:.14}}}]},"amazon/nova-pro-v1":{modelName:"amazon/nova-pro-v1",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7999999999999999,outputPricePerMillion:3.1999999999999997}}}]},"qwen/qwq-32b-preview:free":{modelName:"qwen/qwq-32b-preview:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"qwen/qwq-32b-preview":{modelName:"qwen/qwq-32b-preview",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.19999999999999998,outputPricePerMillion:.19999999999999998}}}]},"google/learnlm-1.5-pro-experimental:free":{modelName:"google/learnlm-1.5-pro-experimental:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"eva-unit-01/eva-qwen-2.5-72b":{modelName:"eva-unit-01/eva-qwen-2.5-72b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.8999999999999999,outputPricePerMillion:1.2}}}]},"openai/gpt-4o-2024-11-20":{modelName:"openai/gpt-4o-2024-11-20",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2.5,outputPricePerMillion:10}}}]},"mistralai/mistral-large-2411":{modelName:"mistralai/mistral-large-2411",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2,outputPricePerMillion:6}}}]},"mistralai/mistral-large-2407":{modelName:"mistralai/mistral-large-2407",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2,outputPricePerMillion:6}}}]},"mistralai/pixtral-large-2411":{modelName:"mistralai/pixtral-large-2411",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2,outputPricePerMillion:6}}}]},"x-ai/grok-vision-beta":{modelName:"x-ai/grok-vision-beta",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:5,outputPricePerMillion:15}}}]},"infermatic/mn-inferor-12b":{modelName:"infermatic/mn-inferor-12b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7999999999999999,outputPricePerMillion:1.2}}}]},"qwen/qwen-2.5-coder-32b-instruct:free":{modelName:"qwen/qwen-2.5-coder-32b-instruct:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"qwen/qwen-2.5-coder-32b-instruct":{modelName:"qwen/qwen-2.5-coder-32b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.07,outputPricePerMillion:.15}}}]},"raifle/sorcererlm-8x22b":{modelName:"raifle/sorcererlm-8x22b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:4.5,outputPricePerMillion:4.5}}}]},"eva-unit-01/eva-qwen-2.5-32b":{modelName:"eva-unit-01/eva-qwen-2.5-32b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2.6,outputPricePerMillion:3.4}}}]},"thedrummer/unslopnemo-12b":{modelName:"thedrummer/unslopnemo-12b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.5,outputPricePerMillion:.5}}}]},"anthropic/claude-3.5-haiku:beta":{modelName:"anthropic/claude-3.5-haiku:beta",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7999999999999999,outputPricePerMillion:4}}}]},"anthropic/claude-3.5-haiku":{modelName:"anthropic/claude-3.5-haiku",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7999999999999999,outputPricePerMillion:4}}}]},"anthropic/claude-3.5-haiku-20241022:beta":{modelName:"anthropic/claude-3.5-haiku-20241022:beta",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7999999999999999,outputPricePerMillion:4}}}]},"anthropic/claude-3.5-haiku-20241022":{modelName:"anthropic/claude-3.5-haiku-20241022",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7999999999999999,outputPricePerMillion:4}}}]},"neversleep/llama-3.1-lumimaid-70b":{modelName:"neversleep/llama-3.1-lumimaid-70b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1.5,outputPricePerMillion:2.25}}}]},"anthracite-org/magnum-v4-72b":{modelName:"anthracite-org/magnum-v4-72b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1.5,outputPricePerMillion:2.25}}}]},"anthropic/claude-3.5-sonnet:beta":{modelName:"anthropic/claude-3.5-sonnet:beta",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:3,outputPricePerMillion:15}}}]},"anthropic/claude-3.5-sonnet":{modelName:"anthropic/claude-3.5-sonnet",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:3,outputPricePerMillion:15}}}]},"x-ai/grok-beta":{modelName:"x-ai/grok-beta",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:5,outputPricePerMillion:15}}}]},"mistralai/ministral-8b":{modelName:"mistralai/ministral-8b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.09999999999999999,outputPricePerMillion:.09999999999999999}}}]},"mistralai/ministral-3b":{modelName:"mistralai/ministral-3b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.04,outputPricePerMillion:.04}}}]},"qwen/qwen-2.5-7b-instruct:free":{modelName:"qwen/qwen-2.5-7b-instruct:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"qwen/qwen-2.5-7b-instruct":{modelName:"qwen/qwen-2.5-7b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.049999999999999996,outputPricePerMillion:.09999999999999999}}}]},"nvidia/llama-3.1-nemotron-70b-instruct:free":{modelName:"nvidia/llama-3.1-nemotron-70b-instruct:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"nvidia/llama-3.1-nemotron-70b-instruct":{modelName:"nvidia/llama-3.1-nemotron-70b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.12,outputPricePerMillion:.3}}}]},"inflection/inflection-3-productivity":{modelName:"inflection/inflection-3-productivity",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2.5,outputPricePerMillion:10}}}]},"inflection/inflection-3-pi":{modelName:"inflection/inflection-3-pi",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2.5,outputPricePerMillion:10}}}]},"google/gemini-flash-1.5-8b":{modelName:"google/gemini-flash-1.5-8b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.0375,outputPricePerMillion:.15}}}]},"thedrummer/rocinante-12b":{modelName:"thedrummer/rocinante-12b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.25,outputPricePerMillion:.5}}}]},"anthracite-org/magnum-v2-72b":{modelName:"anthracite-org/magnum-v2-72b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:3,outputPricePerMillion:3}}}]},"liquid/lfm-40b":{modelName:"liquid/lfm-40b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.15,outputPricePerMillion:.15}}}]},"meta-llama/llama-3.2-3b-instruct:free":{modelName:"meta-llama/llama-3.2-3b-instruct:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"meta-llama/llama-3.2-3b-instruct":{modelName:"meta-llama/llama-3.2-3b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.015,outputPricePerMillion:.024999999999999998}}}]},"meta-llama/llama-3.2-1b-instruct:free":{modelName:"meta-llama/llama-3.2-1b-instruct:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"meta-llama/llama-3.2-1b-instruct":{modelName:"meta-llama/llama-3.2-1b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.01,outputPricePerMillion:.01}}}]},"meta-llama/llama-3.2-90b-vision-instruct":{modelName:"meta-llama/llama-3.2-90b-vision-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.8999999999999999,outputPricePerMillion:.8999999999999999}}}]},"meta-llama/llama-3.2-11b-vision-instruct:free":{modelName:"meta-llama/llama-3.2-11b-vision-instruct:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"meta-llama/llama-3.2-11b-vision-instruct":{modelName:"meta-llama/llama-3.2-11b-vision-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.049,outputPricePerMillion:.049}}}]},"qwen/qwen-2.5-72b-instruct:free":{modelName:"qwen/qwen-2.5-72b-instruct:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"qwen/qwen-2.5-72b-instruct":{modelName:"qwen/qwen-2.5-72b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.12,outputPricePerMillion:.39}}}]},"qwen/qwen-2.5-vl-72b-instruct":{modelName:"qwen/qwen-2.5-vl-72b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.6,outputPricePerMillion:.6}}}]},"neversleep/llama-3.1-lumimaid-8b":{modelName:"neversleep/llama-3.1-lumimaid-8b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.09375,outputPricePerMillion:.75}}}]},"openai/o1-preview":{modelName:"openai/o1-preview",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:15,outputPricePerMillion:60}}}]},"openai/o1-preview-2024-09-12":{modelName:"openai/o1-preview-2024-09-12",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:15,outputPricePerMillion:60}}}]},"openai/o1-mini":{modelName:"openai/o1-mini",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1.1,outputPricePerMillion:4.4}}}]},"openai/o1-mini-2024-09-12":{modelName:"openai/o1-mini-2024-09-12",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1.1,outputPricePerMillion:4.4}}}]},"mistralai/pixtral-12b":{modelName:"mistralai/pixtral-12b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.09999999999999999,outputPricePerMillion:.09999999999999999}}}]},"cohere/command-r-plus-08-2024":{modelName:"cohere/command-r-plus-08-2024",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2.5,outputPricePerMillion:10}}}]},"cohere/command-r-08-2024":{modelName:"cohere/command-r-08-2024",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.15,outputPricePerMillion:.6}}}]},"qwen/qwen-2.5-vl-7b-instruct:free":{modelName:"qwen/qwen-2.5-vl-7b-instruct:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"qwen/qwen-2.5-vl-7b-instruct":{modelName:"qwen/qwen-2.5-vl-7b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.19999999999999998,outputPricePerMillion:.19999999999999998}}}]},"sao10k/l3.1-euryale-70b":{modelName:"sao10k/l3.1-euryale-70b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7,outputPricePerMillion:.7999999999999999}}}]},"google/gemini-flash-1.5-8b-exp":{modelName:"google/gemini-flash-1.5-8b-exp",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"ai21/jamba-1-5-mini":{modelName:"ai21/jamba-1-5-mini",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.19999999999999998,outputPricePerMillion:.39999999999999997}}}]},"ai21/jamba-1-5-large":{modelName:"ai21/jamba-1-5-large",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2,outputPricePerMillion:8}}}]},"microsoft/phi-3.5-mini-128k-instruct":{modelName:"microsoft/phi-3.5-mini-128k-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.09999999999999999,outputPricePerMillion:.09999999999999999}}}]},"nousresearch/hermes-3-llama-3.1-70b":{modelName:"nousresearch/hermes-3-llama-3.1-70b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.12,outputPricePerMillion:.3}}}]},"nousresearch/hermes-3-llama-3.1-405b":{modelName:"nousresearch/hermes-3-llama-3.1-405b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7999999999999999,outputPricePerMillion:.7999999999999999}}}]},"openai/chatgpt-4o-latest":{modelName:"openai/chatgpt-4o-latest",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:5,outputPricePerMillion:15}}}]},"sao10k/l3-lunaris-8b":{modelName:"sao10k/l3-lunaris-8b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.02,outputPricePerMillion:.049999999999999996}}}]},"aetherwiing/mn-starcannon-12b":{modelName:"aetherwiing/mn-starcannon-12b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7999999999999999,outputPricePerMillion:1.2}}}]},"openai/gpt-4o-2024-08-06":{modelName:"openai/gpt-4o-2024-08-06",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2.5,outputPricePerMillion:10}}}]},"meta-llama/llama-3.1-405b:free":{modelName:"meta-llama/llama-3.1-405b:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"meta-llama/llama-3.1-405b":{modelName:"meta-llama/llama-3.1-405b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2,outputPricePerMillion:2}}}]},"nothingiisreal/mn-celeste-12b":{modelName:"nothingiisreal/mn-celeste-12b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7999999999999999,outputPricePerMillion:1.2}}}]},"perplexity/llama-3.1-sonar-small-128k-online":{modelName:"perplexity/llama-3.1-sonar-small-128k-online",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.19999999999999998,outputPricePerMillion:.19999999999999998}}}]},"perplexity/llama-3.1-sonar-large-128k-online":{modelName:"perplexity/llama-3.1-sonar-large-128k-online",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1,outputPricePerMillion:1}}}]},"meta-llama/llama-3.1-8b-instruct:free":{modelName:"meta-llama/llama-3.1-8b-instruct:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"meta-llama/llama-3.1-8b-instruct":{modelName:"meta-llama/llama-3.1-8b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.02,outputPricePerMillion:.03}}}]},"meta-llama/llama-3.1-405b-instruct":{modelName:"meta-llama/llama-3.1-405b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7999999999999999,outputPricePerMillion:.7999999999999999}}}]},"meta-llama/llama-3.1-70b-instruct":{modelName:"meta-llama/llama-3.1-70b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.09999999999999999,outputPricePerMillion:.28}}}]},"mistralai/codestral-mamba":{modelName:"mistralai/codestral-mamba",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.25,outputPricePerMillion:.25}}}]},"mistralai/mistral-nemo:free":{modelName:"mistralai/mistral-nemo:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"mistralai/mistral-nemo":{modelName:"mistralai/mistral-nemo",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.03,outputPricePerMillion:.07}}}]},"openai/gpt-4o-mini":{modelName:"openai/gpt-4o-mini",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.15,outputPricePerMillion:.6}}}]},"openai/gpt-4o-mini-2024-07-18":{modelName:"openai/gpt-4o-mini-2024-07-18",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.15,outputPricePerMillion:.6}}}]},"google/gemma-2-27b-it":{modelName:"google/gemma-2-27b-it",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7999999999999999,outputPricePerMillion:.7999999999999999}}}]},"alpindale/magnum-72b":{modelName:"alpindale/magnum-72b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:4,outputPricePerMillion:6}}}]},"google/gemma-2-9b-it:free":{modelName:"google/gemma-2-9b-it:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"google/gemma-2-9b-it":{modelName:"google/gemma-2-9b-it",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.07,outputPricePerMillion:.07}}}]},"01-ai/yi-large":{modelName:"01-ai/yi-large",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:3,outputPricePerMillion:3}}}]},"ai21/jamba-instruct":{modelName:"ai21/jamba-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.5,outputPricePerMillion:.7}}}]},"anthropic/claude-3.5-sonnet-20240620:beta":{modelName:"anthropic/claude-3.5-sonnet-20240620:beta",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:3,outputPricePerMillion:15}}}]},"anthropic/claude-3.5-sonnet-20240620":{modelName:"anthropic/claude-3.5-sonnet-20240620",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:3,outputPricePerMillion:15}}}]},"sao10k/l3-euryale-70b":{modelName:"sao10k/l3-euryale-70b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1.48,outputPricePerMillion:1.48}}}]},"cognitivecomputations/dolphin-mixtral-8x22b":{modelName:"cognitivecomputations/dolphin-mixtral-8x22b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.8999999999999999,outputPricePerMillion:.8999999999999999}}}]},"qwen/qwen-2-72b-instruct":{modelName:"qwen/qwen-2-72b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.8999999999999999,outputPricePerMillion:.8999999999999999}}}]},"mistralai/mistral-7b-instruct:free":{modelName:"mistralai/mistral-7b-instruct:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"mistralai/mistral-7b-instruct":{modelName:"mistralai/mistral-7b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.029,outputPricePerMillion:.055}}}]},"mistralai/mistral-7b-instruct-v0.3":{modelName:"mistralai/mistral-7b-instruct-v0.3",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.029,outputPricePerMillion:.055}}}]},"nousresearch/hermes-2-pro-llama-3-8b":{modelName:"nousresearch/hermes-2-pro-llama-3-8b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.024999999999999998,outputPricePerMillion:.04}}}]},"microsoft/phi-3-mini-128k-instruct":{modelName:"microsoft/phi-3-mini-128k-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.09999999999999999,outputPricePerMillion:.09999999999999999}}}]},"microsoft/phi-3-medium-128k-instruct":{modelName:"microsoft/phi-3-medium-128k-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1,outputPricePerMillion:1}}}]},"neversleep/llama-3-lumimaid-70b":{modelName:"neversleep/llama-3-lumimaid-70b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:4,outputPricePerMillion:6}}}]},"google/gemini-flash-1.5":{modelName:"google/gemini-flash-1.5",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.075,outputPricePerMillion:.3}}}]},"openai/gpt-4o":{modelName:"openai/gpt-4o",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2.5,outputPricePerMillion:10}}}]},"openai/gpt-4o:extended":{modelName:"openai/gpt-4o:extended",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:6,outputPricePerMillion:18}}}]},"meta-llama/llama-guard-2-8b":{modelName:"meta-llama/llama-guard-2-8b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.19999999999999998,outputPricePerMillion:.19999999999999998}}}]},"openai/gpt-4o-2024-05-13":{modelName:"openai/gpt-4o-2024-05-13",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:5,outputPricePerMillion:15}}}]},"neversleep/llama-3-lumimaid-8b:extended":{modelName:"neversleep/llama-3-lumimaid-8b:extended",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.09375,outputPricePerMillion:.75}}}]},"neversleep/llama-3-lumimaid-8b":{modelName:"neversleep/llama-3-lumimaid-8b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.09375,outputPricePerMillion:.75}}}]},"sao10k/fimbulvetr-11b-v2":{modelName:"sao10k/fimbulvetr-11b-v2",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7999999999999999,outputPricePerMillion:1.2}}}]},"meta-llama/llama-3-8b-instruct":{modelName:"meta-llama/llama-3-8b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.03,outputPricePerMillion:.06}}}]},"meta-llama/llama-3-70b-instruct":{modelName:"meta-llama/llama-3-70b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.3,outputPricePerMillion:.39999999999999997}}}]},"mistralai/mixtral-8x22b-instruct":{modelName:"mistralai/mixtral-8x22b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.8999999999999999,outputPricePerMillion:.8999999999999999}}}]},"microsoft/wizardlm-2-8x22b":{modelName:"microsoft/wizardlm-2-8x22b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.5,outputPricePerMillion:.5}}}]},"microsoft/wizardlm-2-7b":{modelName:"microsoft/wizardlm-2-7b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.07,outputPricePerMillion:.07}}}]},"google/gemini-pro-1.5":{modelName:"google/gemini-pro-1.5",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1.25,outputPricePerMillion:5}}}]},"openai/gpt-4-turbo":{modelName:"openai/gpt-4-turbo",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:10,outputPricePerMillion:30}}}]},"cohere/command-r-plus":{modelName:"cohere/command-r-plus",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:3,outputPricePerMillion:15}}}]},"cohere/command-r-plus-04-2024":{modelName:"cohere/command-r-plus-04-2024",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:3,outputPricePerMillion:15}}}]},"sophosympatheia/midnight-rose-70b":{modelName:"sophosympatheia/midnight-rose-70b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7999999999999999,outputPricePerMillion:.7999999999999999}}}]},"cohere/command":{modelName:"cohere/command",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1,outputPricePerMillion:2}}}]},"cohere/command-r":{modelName:"cohere/command-r",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.5,outputPricePerMillion:1.5}}}]},"anthropic/claude-3-haiku:beta":{modelName:"anthropic/claude-3-haiku:beta",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.25,outputPricePerMillion:1.25}}}]},"anthropic/claude-3-haiku":{modelName:"anthropic/claude-3-haiku",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.25,outputPricePerMillion:1.25}}}]},"anthropic/claude-3-opus:beta":{modelName:"anthropic/claude-3-opus:beta",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:15,outputPricePerMillion:75}}}]},"anthropic/claude-3-opus":{modelName:"anthropic/claude-3-opus",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:15,outputPricePerMillion:75}}}]},"anthropic/claude-3-sonnet:beta":{modelName:"anthropic/claude-3-sonnet:beta",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:3,outputPricePerMillion:15}}}]},"anthropic/claude-3-sonnet":{modelName:"anthropic/claude-3-sonnet",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:3,outputPricePerMillion:15}}}]},"cohere/command-r-03-2024":{modelName:"cohere/command-r-03-2024",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.5,outputPricePerMillion:1.5}}}]},"mistralai/mistral-large":{modelName:"mistralai/mistral-large",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2,outputPricePerMillion:6}}}]},"openai/gpt-3.5-turbo-0613":{modelName:"openai/gpt-3.5-turbo-0613",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1,outputPricePerMillion:2}}}]},"openai/gpt-4-turbo-preview":{modelName:"openai/gpt-4-turbo-preview",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:10,outputPricePerMillion:30}}}]},"nousresearch/nous-hermes-2-mixtral-8x7b-dpo":{modelName:"nousresearch/nous-hermes-2-mixtral-8x7b-dpo",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.6,outputPricePerMillion:.6}}}]},"mistralai/mistral-medium":{modelName:"mistralai/mistral-medium",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2.75,outputPricePerMillion:8.1}}}]},"mistralai/mistral-small":{modelName:"mistralai/mistral-small",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.19999999999999998,outputPricePerMillion:.6}}}]},"mistralai/mistral-tiny":{modelName:"mistralai/mistral-tiny",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.25,outputPricePerMillion:.25}}}]},"mistralai/mistral-7b-instruct-v0.2":{modelName:"mistralai/mistral-7b-instruct-v0.2",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.19999999999999998,outputPricePerMillion:.19999999999999998}}}]},"cognitivecomputations/dolphin-mixtral-8x7b":{modelName:"cognitivecomputations/dolphin-mixtral-8x7b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.5,outputPricePerMillion:.5}}}]},"google/gemini-pro-vision":{modelName:"google/gemini-pro-vision",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.5,outputPricePerMillion:1.5}}}]},"mistralai/mixtral-8x7b-instruct":{modelName:"mistralai/mixtral-8x7b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.24,outputPricePerMillion:.24}}}]},"openchat/openchat-7b":{modelName:"openchat/openchat-7b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.07,outputPricePerMillion:.07}}}]},"neversleep/noromaid-20b":{modelName:"neversleep/noromaid-20b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.75,outputPricePerMillion:1.5}}}]},"anthropic/claude-2.1:beta":{modelName:"anthropic/claude-2.1:beta",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:8,outputPricePerMillion:24}}}]},"anthropic/claude-2.1":{modelName:"anthropic/claude-2.1",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:8,outputPricePerMillion:24}}}]},"anthropic/claude-2:beta":{modelName:"anthropic/claude-2:beta",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:8,outputPricePerMillion:24}}}]},"anthropic/claude-2":{modelName:"anthropic/claude-2",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:8,outputPricePerMillion:24}}}]},"undi95/toppy-m-7b":{modelName:"undi95/toppy-m-7b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.07,outputPricePerMillion:.07}}}]},"alpindale/goliath-120b":{modelName:"alpindale/goliath-120b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:6.5625,outputPricePerMillion:9.375}}}]},"openrouter/auto":{modelName:"openrouter/auto",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:-1e6,outputPricePerMillion:-1e6}}}]},"openai/gpt-3.5-turbo-1106":{modelName:"openai/gpt-3.5-turbo-1106",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1,outputPricePerMillion:2}}}]},"openai/gpt-4-1106-preview":{modelName:"openai/gpt-4-1106-preview",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:10,outputPricePerMillion:30}}}]},"google/palm-2-chat-bison-32k":{modelName:"google/palm-2-chat-bison-32k",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1,outputPricePerMillion:2}}}]},"google/palm-2-codechat-bison-32k":{modelName:"google/palm-2-codechat-bison-32k",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1,outputPricePerMillion:2}}}]},"jondurbin/airoboros-l2-70b":{modelName:"jondurbin/airoboros-l2-70b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.5,outputPricePerMillion:.5}}}]},"openai/gpt-3.5-turbo-instruct":{modelName:"openai/gpt-3.5-turbo-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1.5,outputPricePerMillion:2}}}]},"mistralai/mistral-7b-instruct-v0.1":{modelName:"mistralai/mistral-7b-instruct-v0.1",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.19999999999999998,outputPricePerMillion:.19999999999999998}}}]},"pygmalionai/mythalion-13b":{modelName:"pygmalionai/mythalion-13b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.5625,outputPricePerMillion:1.125}}}]},"openai/gpt-3.5-turbo-16k":{modelName:"openai/gpt-3.5-turbo-16k",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:3,outputPricePerMillion:4}}}]},"openai/gpt-4-32k":{modelName:"openai/gpt-4-32k",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:60,outputPricePerMillion:120}}}]},"openai/gpt-4-32k-0314":{modelName:"openai/gpt-4-32k-0314",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:60,outputPricePerMillion:120}}}]},"nousresearch/nous-hermes-llama2-13b":{modelName:"nousresearch/nous-hermes-llama2-13b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.18,outputPricePerMillion:.18}}}]},"mancer/weaver":{modelName:"mancer/weaver",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1.125,outputPricePerMillion:1.125}}}]},"huggingfaceh4/zephyr-7b-beta:free":{modelName:"huggingfaceh4/zephyr-7b-beta:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"anthropic/claude-2.0:beta":{modelName:"anthropic/claude-2.0:beta",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:8,outputPricePerMillion:24}}}]},"anthropic/claude-2.0":{modelName:"anthropic/claude-2.0",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:8,outputPricePerMillion:24}}}]},"undi95/remm-slerp-l2-13b":{modelName:"undi95/remm-slerp-l2-13b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.5625,outputPricePerMillion:1.125}}}]},"google/palm-2-chat-bison":{modelName:"google/palm-2-chat-bison",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1,outputPricePerMillion:2}}}]},"google/palm-2-codechat-bison":{modelName:"google/palm-2-codechat-bison",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1,outputPricePerMillion:2}}}]},"gryphe/mythomax-l2-13b":{modelName:"gryphe/mythomax-l2-13b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.065,outputPricePerMillion:.065}}}]},"meta-llama/llama-2-13b-chat":{modelName:"meta-llama/llama-2-13b-chat",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.22,outputPricePerMillion:.22}}}]},"meta-llama/llama-2-70b-chat":{modelName:"meta-llama/llama-2-70b-chat",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.8999999999999999,outputPricePerMillion:.8999999999999999}}}]},"openai/gpt-3.5-turbo":{modelName:"openai/gpt-3.5-turbo",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.5,outputPricePerMillion:1.5}}}]},"openai/gpt-3.5-turbo-0125":{modelName:"openai/gpt-3.5-turbo-0125",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.5,outputPricePerMillion:1.5}}}]},"openai/gpt-4":{modelName:"openai/gpt-4",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:30,outputPricePerMillion:60}}}]},"openai/gpt-4-0314":{modelName:"openai/gpt-4-0314",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:30,outputPricePerMillion:60}}}]}};var zn=zod.z.enum([_,j,M,I]),Hn={system:_,user:j,assistant:M,tool:I};var Gn=[T,D,U,q],Vn=zod.z.enum([T,D,U,q]);var X=zod.z.object({token:zod.z.string(),logprob:zod.z.number(),bytes:zod.z.array(zod.z.number()).nullable()}),Kn=zod.z.object({content:zod.z.array(X.extend({top_logprobs:zod.z.array(X)})).nullable(),refusal:zod.z.array(X.extend({top_logprobs:zod.z.array(X)})).nullable()}).nullable(),Wn=zod.z.discriminatedUnion("type",[zod.z.object({type:zod.z.literal("reasoning.summary"),summary:zod.z.string(),id:zod.z.string().nullable().optional(),format:zod.z.string().nullable().optional(),index:zod.z.number().optional()}),zod.z.object({type:zod.z.literal("reasoning.encrypted"),data:zod.z.string(),id:zod.z.string().nullable().optional(),format:zod.z.string().nullable().optional(),index:zod.z.number().optional()}),zod.z.object({type:zod.z.literal("reasoning.text"),text:zod.z.string().nullable().optional(),signature:zod.z.string().nullable().optional(),id:zod.z.string().nullable().optional(),format:zod.z.string().nullable().optional(),index:zod.z.number().optional()})]),Jo=zod.z.array(zod.z.object({id:zod.z.string().min(1),type:zod.z.enum(["function"]),function:zod.z.object({name:zod.z.string(),arguments:zod.z.string()})})),Jn=zod.z.object({id:zod.z.string(),object:zod.z.string(),created:zod.z.number(),model:zod.z.string(),system_fingerprint:zod.z.string().nullable().optional(),choices:zod.z.array(zod.z.object({index:zod.z.number(),message:zod.z.object({role:zod.z.string(),content:zod.z.string().nullable().optional(),tool_calls:Jo.optional(),refusal:zod.z.string().nullable().optional(),reasoning:zod.z.string().nullable().optional(),reasoning_details:zod.z.array(Wn).optional()}),logprobs:Kn.optional(),finish_reason:zod.z.string().nullable().optional()})),usage:zod.z.object({prompt_tokens:zod.z.number(),completion_tokens:zod.z.number(),total_tokens:zod.z.number()}).nullable().optional()}),Zo=zod.z.array(zod.z.object({index:zod.z.number().int(),id:zod.z.string().min(1).optional(),type:zod.z.enum(["function"]).optional(),function:zod.z.object({name:zod.z.string().min(1).optional(),arguments:zod.z.string().optional()}).optional()})),Zn=zod.z.object({id:zod.z.string(),object:zod.z.string(),created:zod.z.number(),model:zod.z.string(),system_fingerprint:zod.z.string().nullable().optional(),choices:zod.z.array(zod.z.object({index:zod.z.number(),delta:zod.z.object({role:zod.z.string().optional(),content:zod.z.string().nullable().optional(),tool_calls:Zo.optional(),refusal:zod.z.string().nullable().optional(),reasoning:zod.z.string().nullable().optional(),reasoning_details:zod.z.array(Wn).optional()}).or(zod.z.object({})),logprobs:Kn.optional(),finish_reason:zod.z.string().nullable().optional()})),usage:zod.z.object({prompt_tokens:zod.z.number(),completion_tokens:zod.z.number(),total_tokens:zod.z.number()}).nullable().optional()});var Yo=zod.z.object({type:zod.z.literal("function"),function:zod.z.object({name:zod.z.string().min(1),description:zod.z.string().min(1).optional(),strict:zod.z.boolean().optional(),parameters:zod.z.any()})}),Qo=zod.z.enum(["none","auto","required"]),Xo=zod.z.object({type:zod.z.literal("function"),function:zod.z.object({name:zod.z.string().min(1)})}),et=zod.z.object({type:zod.z.enum(["text","json_object"])}).or(zod.z.object({type:zod.z.literal("json_schema"),json_schema:zod.z.object({name:zod.z.string().min(1),description:zod.z.string().min(1).optional(),strict:zod.z.boolean().optional(),schema:zod.z.any()})})),je=zod.z.object({text:zod.z.string().min(1),type:zod.z.literal("text")}),nt=zod.z.object({type:zod.z.literal("image_url"),image_url:zod.z.object({url:zod.z.string().url().min(1),detail:zod.z.enum(["low","high","auto"]).optional()})}),it=zod.z.object({id:zod.z.string().min(1),type:zod.z.literal("function"),function:zod.z.object({name:zod.z.string().min(1),arguments:zod.z.string().min(1)})}),ot=zod.z.object({role:zod.z.literal("system"),content:zod.z.string().min(1).or(zod.z.array(je).min(1))}),tt=zod.z.object({role:zod.z.literal("user"),content:zod.z.string().min(1).or(zod.z.array(zod.z.union([je,nt])).min(1))}),rt=zod.z.object({role:zod.z.literal("assistant"),content:zod.z.string().min(1).or(zod.z.array(je).min(1)).optional(),tool_calls:zod.z.array(it).min(1).optional()}),at=zod.z.object({role:zod.z.literal("tool"),tool_call_id:zod.z.string().min(1),content:zod.z.string().min(1)}),lt=zod.z.union([ot,tt,rt,at]),Yn=zod.z.object({model:zod.z.string().min(1).optional(),messages:zod.z.array(lt).min(1),frequency_penalty:zod.z.number().min(-2).max(2).nullable().optional(),logprobs:zod.z.boolean().nullable().optional(),top_logprobs:zod.z.number().min(0).max(20).nullable().optional(),max_tokens:zod.z.number().min(0).nullable().optional(),presence_penalty:zod.z.number().min(-2).max(2).nullable().optional(),repetition_penalty:zod.z.number().min(0).max(2).nullable().optional(),response_format:et.optional(),seed:zod.z.number().nullable().optional(),stop:zod.z.string().or(zod.z.array(zod.z.string()).max(4)).nullable().optional(),top_a:zod.z.number().min(0).max(1).nullable().optional(),temperature:zod.z.number().min(0).max(2).nullable().optional(),top_p:zod.z.number().min(0).max(1).nullable().optional(),top_k:zod.z.number().min(0).max(100).nullable().optional(),min_p:zod.z.number().min(0).max(1).nullable().optional(),tools:zod.z.array(Yo).optional(),tool_choice:Qo.or(Xo).optional()});var Oe=zod.z.object({modelName:zod.z.string(),apiKey:zod.z.string(),openRouterReferer:zod.z.string().optional(),openRouterTitle:zod.z.string().optional()}),Q=class{constructor(n,o){this.version="v1";let t=Oe.parse(o);this.modelSchema=n,this.modelName=t.modelName,this.apiKey=t.apiKey,this.baseUrl=Y(B.baseUrl),this.streamChatUrl=Y(`${this.baseUrl}/chat/completions`),this.completeChatUrl=Y(`${this.baseUrl}/chat/completions`),this.openRouterReferer=t.openRouterReferer,this.openRouterTitle=t.openRouterTitle;}getDefaultBaseUrl(){return this.baseUrl}getDefaultHeaders(){return R(R({Authorization:`Bearer ${this.apiKey}`,"Content-Type":"application/json"},this.openRouterReferer?{"HTTP-Referer":this.openRouterReferer}:{}),this.openRouterTitle?{"X-Title":this.openRouterTitle}:{})}getDefaultParams(){return {model:this.modelName}}getRetryDelay(n,o){let r=0,a=n["retry-after"];if(a){let u=parseInt(a,10);!Number.isNaN(u)&&u>=0&&(r=u*1e3);}return {shouldRetry:true,delayMs:r}}getTokenCount(n){return n.reduce((o,t)=>o+t.content.map(r=>r.modality==="text"?r.value:"").join(" ").length,0)}transformModelRequest(n){let o=Yn.safeParse(n);if(!o.success)throw new J({info:"Invalid model request",cause:o.error});let t=o.data,r=t.model;if(t.tool_choice&&(!t.tools||t.tools.length===0))throw new J({info:`Invalid model request for model : '${this.modelName}'`,cause:new Error("'tools' are required when 'tool_choice' is specified")});let a={};t.response_format&&(a.responseFormat=t.response_format.type,t.response_format.type==="json_schema"&&(a.responseSchema={name:t.response_format.json_schema.name,description:t.response_format.json_schema.description||"",strict:t.response_format.json_schema.strict,schema:t.response_format.json_schema.schema})),t.tool_choice&&(typeof t.tool_choice=="string"?a.toolChoice=t.tool_choice:a.toolChoice=t.tool_choice.function.name),a.seed=t.seed,a.maxTokens=t.max_tokens,a.temperature=t.temperature,a.topA=t.top_a,a.topP=t.top_p,a.minP=t.min_p,a.topK=t.top_k,a.repetitionPenalty=t.repetition_penalty,a.presencePenalty=t.presence_penalty,a.frequencyPenalty=t.frequency_penalty,a.stop=t.stop,a.logProbs=t.logprobs,a.topLogProbs=t.top_logprobs;let u=rn().parse($n(a)),m=[],p={};t.messages.forEach(P=>{let d=P.role;switch(d){case "system":{let g=P.content;if(typeof g=="string")m.push({role:d,content:[{modality:T,value:g}]});else {let y=g.map(h=>({modality:T,value:h.text}));m.push({role:d,content:y});}}break;case "user":{let g=P.content;if(typeof g=="string")m.push({role:d,content:[{modality:T,value:g}]});else {let y=g.map(h=>h.type==="text"?{modality:T,value:h.text}:h.image_url.url.startsWith("data:")?{modality:D,detail:h.image_url.detail||"auto",value:{type:te,base64:h.image_url.url,mediaType:An(h.image_url.url)}}:{modality:D,detail:h.image_url.detail||"auto",value:{type:re,url:h.image_url.url}});m.push({role:d,content:y});}}break;case "assistant":{let g=[];if(!P.content&&!P.tool_calls)throw new J({info:`Invalid model request for model : '${this.modelName}'`,cause:new Error("one of'content' or 'tool_calls' must be provided")});if(P.content){let y=P.content;typeof y=="string"?g.push({modality:T,value:y}):y.forEach(h=>{g.push({modality:T,value:h.text});});}P.tool_calls&&P.tool_calls.forEach((h,C)=>{let w={modality:U,id:h.id,index:C,name:h.function.name,arguments:h.function.arguments};g.push(w),p[w.id]=w;}),m.push({role:d,content:g});}break;case "tool":{let g=P;m.push({role:d,content:[{modality:q,id:g.tool_call_id,index:p[g.tool_call_id].index,name:p[g.tool_call_id].name,data:g.content}]});}break}});let k=[];return t.tools&&t.tools.forEach(P=>{k.push({type:"function",definition:{schema:{name:P.function.name,description:P.function.description||"",strict:P.function.strict,parameters:P.function.parameters}}});}),{modelName:r,config:u,messages:m,tools:k.length>0?k:void 0}}transformConfig(n,o,t){let r=n.toolChoice;delete n.toolChoice;let a=this.modelSchema.config.schema.safeParse(n);if(!a.success)throw new O({info:`Invalid config for model : '${this.modelName}'`,cause:a.error});let u=a.data;r!==void 0&&(u.toolChoice=r),Object.keys(u).forEach(p=>{if(!(p in this.modelSchema.config.def))throw new O({info:`Invalid config for model : '${this.modelName}'`,cause:new Error(`Invalid config key : '${p}',
7
- available keys : [${Object.keys(this.modelSchema.config.def).join(", ")}]`)})});let m=Object.keys(u).reduce((p,k)=>{let P=this.modelSchema.config.def[k],d=P.param,g=u[k];return d==="max_tokens"&&P.type==="range"&&g===0?p[d]=P.max:p[d]=g,p},{});if(m.top_logprobs&&!m.logprobs)throw new O({info:`Invalid config for model : '${this.modelName}'`,cause:new Error("'logprobs' must be 'true' when 'top_logprobs' is specified")});if("tool_choice"in m&&m.tool_choice!==void 0){let p=m.tool_choice;if(!t||t&&t.length===0)throw new O({info:`Invalid config for model : '${this.modelName}'`,cause:new Error("'tools' are required when 'toolChoice' is specified")});if(t&&t.length>0){let k=this.modelSchema.config.def.toolChoice;if(!k.choices.includes(p))if(t.map(P=>P.definition.schema.name).includes(p))m.tool_choice={type:"function",function:{name:p}};else throw new O({info:`Invalid config for model : '${this.modelName}'`,cause:new Error(`toolChoice : '${p}' is not part of provided 'tools' names or
8
- one of [${k.choices.join(", ")}]`)})}}if("response_format"in m&&m.response_format!==void 0){let p=m.response_format;if(p==="json_schema")if("response_schema"in m)m.response_format={type:"json_schema",json_schema:m.response_schema},delete m.response_schema;else throw new O({info:`Invalid config for model : '${this.modelName}'`,cause:new Error("'responseSchema' is required in config when 'responseFormat' is 'json_schema'")});else m.response_format={type:p};}return m}transformMessages(n){if(!n||n&&n.length===0)return {messages:[]};let o=n.map(r=>{let a=ue().safeParse(r);if(!a.success)throw new S({info:"Invalid messages",cause:a.error});return a.data});return o.forEach(r=>{r.content.forEach(a=>{if(!this.modelSchema.modalities.includes(a.modality))throw new S({info:`Invalid message content for model : '${this.modelName}'`,cause:new Error(`model : '${this.modelName}' does not support modality : '${a.modality}',
5
+ var Qn=Object.defineProperty;var Ie=Object.getOwnPropertySymbols;var ei=Object.prototype.hasOwnProperty,ni=Object.prototype.propertyIsEnumerable;var F=(i,n)=>(n=Symbol[i])?n:Symbol.for("Symbol."+i),ii=i=>{throw TypeError(i)};var Le=(i,n,o)=>n in i?Qn(i,n,{enumerable:true,configurable:true,writable:true,value:o}):i[n]=o,R=(i,n)=>{for(var o in n||(n={}))ei.call(n,o)&&Le(i,o,n[o]);if(Ie)for(var o of Ie(n))ni.call(n,o)&&Le(i,o,n[o]);return i};var N=(i,n,o)=>new Promise((t,r)=>{var a=p=>{try{m(o.next(p));}catch(k){r(k);}},u=p=>{try{m(o.throw(p));}catch(k){r(k);}},m=p=>p.done?t(p.value):Promise.resolve(p.value).then(a,u);m((o=o.apply(i,n)).next());}),Ae=function(i,n){this[0]=i,this[1]=n;},ee=(i,n,o)=>{var t=(u,m,p,k)=>{try{var P=o[u](m),d=(m=P.value)instanceof Ae,g=P.done;Promise.resolve(d?m[0]:m).then(y=>d?t(u==="return"?u:"next",m[1]?{done:y.done,value:y.value}:y,p,k):p({value:y,done:g})).catch(y=>t("throw",y,p,k));}catch(y){k(y);}},r=u=>a[u]=m=>new Promise((p,k)=>t(u,m,p,k)),a={};return o=o.apply(i,n),a[F("asyncIterator")]=()=>a,r("next"),r("throw"),r("return"),a},$e=i=>{var n=i[F("asyncIterator")],o=false,t,r={};return n==null?(n=i[F("iterator")](),t=a=>r[a]=u=>n[a](u)):(n=n.call(i),t=a=>r[a]=u=>{if(o){if(o=false,a==="throw")throw u;return u}return o=true,{done:false,value:new Ae(new Promise(m=>{var p=n[a](u);p instanceof Object||ii("Object expected"),m(p);}),1)}}),r[F("iterator")]=()=>r,t("next"),"throw"in n?t("throw"):r.throw=a=>{throw a},"return"in n&&t("return"),r};var j="system",_="user",M="assistant",I="tool",oi=[j,_,M,I],oe=zod.z.enum(oi),ti=[M],ri=zod.z.enum(ti),He="error",Ve="safety",ai=zod.z.object({type:zod.z.literal(Ve),value:zod.z.object({category:zod.z.string(),probability:zod.z.string(),blocked:zod.z.boolean(),message:zod.z.string()})}),li=(i=zod.z.undefined())=>zod.z.object({modality:zod.z.literal(He),value:zod.z.discriminatedUnion("type",[ai]),metadata:i}),Ge="partial-error",si=zod.z.object({type:zod.z.literal(Ve),category:zod.z.string().optional(),probability:zod.z.string().optional(),blocked:zod.z.boolean().optional(),message:zod.z.string().optional()}),mi=(i=zod.z.undefined())=>zod.z.object({modality:zod.z.literal(Ge),value:zod.z.discriminatedUnion("type",[si]),metadata:i}),D="image",te="base64",ci=["png","jpeg","webp","gif"],ui=zod.z.object({type:zod.z.literal(te),base64:zod.z.string(),mediaType:zod.z.enum(ci)}),re="url",pi=zod.z.object({type:zod.z.literal(re),url:zod.z.string()}),di=zod.z.discriminatedUnion("type",[ui,pi]),gi=["low","medium","high","auto"],Pi=zod.z.enum(gi),bi=(i=zod.z.undefined())=>zod.z.object({modality:zod.z.literal(D),detail:Pi,value:di,metadata:i}),Ke="pdf",ki="base64",yi=zod.z.object({type:zod.z.literal(ki),base64:zod.z.string()}),hi="url",fi=zod.z.object({type:zod.z.literal(hi),url:zod.z.string()}),Ti=zod.z.discriminatedUnion("type",[yi,fi]),Mi=(i=zod.z.undefined())=>zod.z.object({modality:zod.z.literal(Ke),value:Ti,file:zod.z.object({name:zod.z.string(),id:zod.z.string(),size:zod.z.number().optional()}),metadata:i}),H="reasoning",V="partial-reasoning",G="thinking",ae="redacted",ie=zod.z.object({type:zod.z.literal(G),thinking:zod.z.string(),signature:zod.z.string()}),We=zod.z.object({type:zod.z.literal(ae),data:zod.z.string()}),Ri=zod.z.discriminatedUnion("type",[ie,We]),le=(i=zod.z.undefined())=>zod.z.object({modality:zod.z.literal(H),value:Ri,metadata:i}),xi=zod.z.object({type:zod.z.literal(G),thinking:ie.shape.thinking.optional(),signature:ie.shape.signature.optional()}),Si=zod.z.discriminatedUnion("type",[xi,We]),se=(i=zod.z.undefined())=>zod.z.object({modality:zod.z.literal(V),value:Si,metadata:i}),Je="search-result",Ye="google",vi=zod.z.object({type:zod.z.literal(Ye),query:zod.z.string(),responses:zod.z.array(zod.z.object({source:zod.z.string(),url:zod.z.string(),title:zod.z.string(),snippet:zod.z.string().optional()})),references:zod.z.array(zod.z.object({text:zod.z.string(),responseIndices:zod.z.array(zod.z.number()),startIndex:zod.z.number().optional(),endIndex:zod.z.number().optional(),confidenceScores:zod.z.array(zod.z.number()).optional()}))}),Ze="openai",Ci=zod.z.object({type:zod.z.literal(Ze),query:zod.z.string(),responses:zod.z.array(zod.z.object({source:zod.z.string(),url:zod.z.string(),title:zod.z.string(),snippet:zod.z.string().optional()})),references:zod.z.array(zod.z.object({text:zod.z.string(),responseIndices:zod.z.array(zod.z.number()),startIndex:zod.z.number().optional(),endIndex:zod.z.number().optional(),confidenceScores:zod.z.array(zod.z.number()).optional()}))}),Ni=(i=zod.z.undefined())=>zod.z.object({modality:zod.z.literal(Je),value:zod.z.discriminatedUnion("type",[vi,Ci]),metadata:i}),Xe="partial-search-result",Ui=zod.z.object({type:zod.z.literal(Ye),query:zod.z.string().optional(),responses:zod.z.array(zod.z.object({source:zod.z.string().optional(),url:zod.z.string().optional(),title:zod.z.string().optional(),snippet:zod.z.string().optional()})).optional(),references:zod.z.array(zod.z.object({text:zod.z.string().optional(),responseIndices:zod.z.array(zod.z.number()).optional(),startIndex:zod.z.number().optional(),endIndex:zod.z.number().optional(),confidenceScores:zod.z.array(zod.z.number()).optional()})).optional()}),wi=zod.z.object({type:zod.z.literal(Ze),query:zod.z.string().optional(),responses:zod.z.array(zod.z.object({source:zod.z.string().optional(),url:zod.z.string().optional(),title:zod.z.string().optional(),snippet:zod.z.string().optional()})).optional(),references:zod.z.array(zod.z.object({text:zod.z.string().optional(),responseIndices:zod.z.array(zod.z.number()).optional(),startIndex:zod.z.number().optional(),endIndex:zod.z.number().optional(),confidenceScores:zod.z.array(zod.z.number()).optional()})).optional()}),Di=(i=zod.z.undefined())=>zod.z.object({modality:zod.z.literal(Xe),value:zod.z.discriminatedUnion("type",[Ui,wi]),metadata:i}),T="text",Qe=(i=zod.z.undefined())=>zod.z.object({modality:zod.z.literal(T),value:zod.z.string(),metadata:i}),me="partial-text",en=(i=zod.z.undefined())=>zod.z.object({modality:zod.z.literal(me),value:zod.z.string(),metadata:i}),U="tool-call",nn=(i=zod.z.undefined())=>zod.z.object({modality:zod.z.literal(U),index:zod.z.number().int().nonnegative(),id:zod.z.string().min(1),name:zod.z.string().min(1),arguments:zod.z.string(),serverName:zod.z.string().optional(),thoughtSignature:zod.z.string().optional(),metadata:i}),ce="partial-tool-call",on=(i=zod.z.undefined())=>zod.z.object({modality:zod.z.literal(ce),index:zod.z.number().int().nonnegative(),id:zod.z.string().optional(),name:zod.z.string().optional(),arguments:zod.z.string().optional(),serverName:zod.z.string().optional(),thoughtSignature:zod.z.string().optional(),metadata:i}),q="tool-response",qi=(i=zod.z.undefined())=>zod.z.object({modality:zod.z.literal(q),index:zod.z.number().int().nonnegative(),id:zod.z.string().min(1),name:zod.z.string().min(1),data:zod.z.string(),apiResponse:zod.z.object({statusCode:zod.z.number().int().nonnegative()}).optional(),metadata:i}),Oi="partial-tool-response",Ei=(i=zod.z.undefined())=>zod.z.object({modality:zod.z.literal(Oi),index:zod.z.number().int().nonnegative(),id:zod.z.string().optional(),name:zod.z.string().optional(),data:zod.z.string().optional(),apiResponse:zod.z.object({statusCode:zod.z.number().int().nonnegative()}).optional(),metadata:i}),ji=[T,D,Ke,U,q,H,He,Je],tn=zod.z.enum(ji),_i=(i=zod.z.undefined(),n=zod.z.undefined(),o=zod.z.undefined(),t=zod.z.undefined(),r=zod.z.undefined(),a=zod.z.undefined(),u=zod.z.undefined(),m=zod.z.undefined())=>zod.z.discriminatedUnion("modality",[Qe(i),bi(n),Mi(o),nn(t),qi(r),le(a),li(u),Ni(m)]),Ii=[me,ce,V,Ge,Xe];zod.z.enum(Ii);var Li=(i=zod.z.undefined(),n=zod.z.undefined(),o=zod.z.undefined(),t=zod.z.undefined(),r=zod.z.undefined(),a=zod.z.undefined())=>zod.z.discriminatedUnion("modality",[en(i),on(n),se(t),Ei(o),mi(r),Di(a)]);var ue=(i=oe,n=zod.z.undefined(),o=zod.z.undefined(),t=zod.z.undefined(),r=zod.z.undefined(),a=zod.z.undefined(),u=zod.z.undefined(),m=zod.z.undefined())=>zod.z.object({role:i,content:zod.z.array(_i(n,o,t,r,u,a)),metadata:m}),A=(i=ri,n=zod.z.undefined(),o=zod.z.undefined(),t=zod.z.undefined(),r=zod.z.undefined(),a=zod.z.undefined())=>zod.z.object({role:i,partialContent:Li(n,o,t,a),metadata:r}),Ai=zod.z.object({promptTokens:zod.z.number().nonnegative(),completionTokens:zod.z.number().nonnegative(),totalTokens:zod.z.number().nonnegative()}),Be=zod.z.object({token:zod.z.string(),logProb:zod.z.number(),bytes:zod.z.array(zod.z.number().int()).nullable()}),$i=Be.extend({topLogProbs:zod.z.array(Be)}),rn=zod.z.array($i);zod.z.object({messages:zod.z.array(ue()),usage:Ai.optional(),logProbs:rn.optional()});var Bi=zod.z.object({promptTokens:zod.z.number().nonnegative().optional(),completionTokens:zod.z.number().nonnegative().optional(),totalTokens:zod.z.number().nonnegative().optional()});zod.z.object({partialMessages:zod.z.array(A()),usage:Bi.optional(),logProbs:rn.optional()});var an=(i=zod.z.record(zod.z.string(),zod.z.any()).optional())=>i,zi=zod.z.object({enabled:zod.z.boolean().default(true),allowedTools:zod.z.array(zod.z.string().min(1))});zod.z.object({type:zod.z.literal("url"),url:zod.z.string().url().refine(i=>i.startsWith("https://"),{message:"MCP server URL must start with https://"}),name:zod.z.string().min(1),toolConfiguration:zi.optional(),authorizationToken:zod.z.string().min(1).optional()});var Fi=["object","array","number","string","boolean","enum"],ze=zod.z.enum(Fi),Hi=zod.z.object({anyOf:zod.z.array(zod.z.any()).optional(),type:zod.z.union([ze,zod.z.array(zod.z.union([ze,zod.z.literal("null")]))]).optional(),default:zod.z.any().optional(),title:zod.z.string().optional(),description:zod.z.string().max(4096).optional(),properties:zod.z.record(zod.z.any()).optional(),required:zod.z.array(zod.z.string()).optional(),minItems:zod.z.number().int().min(0).optional(),maxItems:zod.z.number().int().optional(),items:zod.z.record(zod.z.any()).optional(),enum:zod.z.array(zod.z.union([zod.z.string(),zod.z.number(),zod.z.boolean(),zod.z.null()])).optional(),minimum:zod.z.number().optional(),maximum:zod.z.number().optional(),minLength:zod.z.number().int().min(0).optional(),maxLength:zod.z.number().int().optional(),$ref:zod.z.string().optional()}),Vi=zod.z.object({type:zod.z.enum(["object"]),required:zod.z.array(zod.z.string()),$defs:zod.z.record(zod.z.any()).optional(),properties:zod.z.record(Hi),additionalProperties:zod.z.literal(false)}),ln=zod.z.object({name:zod.z.string().regex(/^[a-zA-Z0-9_]{1,64}$/).max(64),description:zod.z.string().max(4096),strict:zod.z.boolean().optional(),schema:Vi}).optional(),Gi="text",Ki="token",Wi=[Gi,Ki];zod.z.enum(Wi);zod.z.array(zod.z.string().min(1));zod.z.array(zod.z.array(zod.z.number().int().nonnegative()));var Yi="float",Zi=zod.z.object({index:zod.z.number().int().nonnegative(),embedding:zod.z.array(zod.z.number())}),Xi="base64",Qi=zod.z.object({index:zod.z.number().int().nonnegative(),embedding:zod.z.string().base64()}),Fe=zod.z.object({totalTokens:zod.z.number().int().nonnegative()});zod.z.discriminatedUnion("encodingFormat",[zod.z.object({encodingFormat:zod.z.literal(Yi),embeddings:zod.z.array(Zi),usage:Fe.optional()}),zod.z.object({encodingFormat:zod.z.literal(Xi),embeddings:zod.z.array(Qi),usage:Fe.optional()})]);var eo=i=>{let n=new WeakSet;return JSON.stringify(i,(o,t)=>{if(typeof t=="object"&&t!==null){if(n.has(t))return;n.add(t);}return t})},no=i=>i==null?"unknown error":typeof i=="string"?i:i instanceof Error?i.message:eo(i),ne="GatewayBaseError",O=class sn extends Error{constructor({info:n,cause:o},t){super(`[${t!=null?t:ne}]: ${n}
6
+ Message: ${no(o)}`),this.name=ne,this.info=n,this.cause=o,this.name=t!=null?t:ne,Object.setPrototypeOf(this,new.target.prototype);}static isGatewayBaseError(n){return n instanceof sn}toJSON(){return {name:this.name,info:this.info,cause:this.cause,message:this.message,stack:this.stack}}},io=zod.z.object({inputPricePerMillion:zod.z.number().nonnegative().describe("Price per 1M input tokens"),outputPricePerMillion:zod.z.number().nonnegative().describe("Price per 1M output tokens")}).describe("Input/output price pair (per 1M tokens) for a specific category within a ChatModel pricing tier."),oo=zod.z.object({base:io.describe("Base (uncached, non\u2011reasoning) rates")}).describe("Holds the `ChatModelTokenPairPrice` for different categories (e.g., base) within a single pricing tier."),to=zod.z.object({minTokens:zod.z.number().int().nonnegative().describe("Inclusive lower token bound for this tier."),maxTokens:zod.z.number().int().nullable().optional().describe("Exclusive upper token bound; `null` means \u221E."),prices:oo.describe("Price categories and rates for this specific token range.")}).refine(i=>i.maxTokens===null||typeof i.maxTokens=="number"&&i.maxTokens>i.minTokens,{message:"maxTokens must be > minTokens (or null for infinite).",path:["maxTokens"]}).describe("A single pricing tier defined by a token range and associated prices.");zod.z.object({modelName:zod.z.string().describe("Model name this schedule applies to."),currency:zod.z.string().default("USD").describe("Currency code (e.g., USD)."),tokenRanges:zod.z.array(to).min(1).describe("Pricing tiers (`ChatModelTokenRangePrice`) schedule, sorted by minTokens.")}).superRefine((i,n)=>{let{tokenRanges:o}=i;o[0].minTokens!==0&&n.addIssue({code:zod.z.ZodIssueCode.custom,path:["tokenRanges",0,"minTokens"],message:"The first tier must have minTokens = 0."});for(let r=1;r<o.length;r++){let a=o[r-1],u=o[r];if(a.maxTokens===null){n.addIssue({code:zod.z.ZodIssueCode.custom,path:["tokenRanges",r-1,"maxTokens"],message:"Cannot define any tokenRanges after an infinite tier (maxTokens = null)."});break}u.minTokens!==a.maxTokens&&n.addIssue({code:zod.z.ZodIssueCode.custom,path:["tokenRanges",r,"minTokens"],message:`Tier ${r} minTokens (${u.minTokens}) must equal previous tier's maxTokens (${a.maxTokens}) for contiguity.`}),u.minTokens<a.minTokens&&n.addIssue({code:zod.z.ZodIssueCode.custom,path:["tokenRanges",r,"minTokens"],message:`tokenRanges must be sorted by ascending minTokens. Tier ${r} (${u.minTokens}) starts before Tier ${r-1} (${a.minTokens}).`});}let t=o[o.length-1];o.every(r=>r.maxTokens!==null||r===t)&&t.maxTokens!==null&&n.addIssue({code:zod.z.ZodIssueCode.custom,path:["tokenRanges",o.length-1,"maxTokens"],message:"The final tier must have maxTokens = null (representing infinity)."});}).describe("Complete pricing schedule for a single chat model, including all its token-based tiers.");var ro="function";var ao=zod.z.enum(["object","array","number","string","boolean","null"]),lo=zod.z.object({anyOf:zod.z.array(zod.z.any()).optional(),type:ao.optional(),default:zod.z.any().optional(),title:zod.z.string().optional(),description:zod.z.string().max(4096).optional(),properties:zod.z.record(zod.z.any()).optional(),required:zod.z.array(zod.z.string()).optional(),minItems:zod.z.number().int().min(0).optional(),maxItems:zod.z.number().int().optional(),items:zod.z.record(zod.z.any()).optional(),enum:zod.z.array(zod.z.union([zod.z.string(),zod.z.number(),zod.z.boolean(),zod.z.null()])).optional(),minimum:zod.z.number().optional(),maximum:zod.z.number().optional(),minLength:zod.z.number().int().min(0).optional(),maxLength:zod.z.number().int().optional()});zod.z.object({type:zod.z.enum(["object"]),title:zod.z.string().optional(),$defs:zod.z.record(zod.z.any()).optional(),properties:zod.z.record(lo).optional(),required:zod.z.array(zod.z.string()).optional()});var so=zod.z.object({name:zod.z.string().regex(/^[a-zA-Z0-9_]{1,64}$/).max(64),description:zod.z.string().max(4096),parameters:zod.z.any(),strict:zod.z.boolean().optional()});var mo=zod.z.enum(["function"]),co=zod.z.object({maxAttempts:zod.z.number().int().positive(),initialDelay:zod.z.number().int().positive(),exponentialFactor:zod.z.number().int().positive()}),uo=zod.z.object({type:zod.z.literal("http"),method:zod.z.enum(["get","post"]),url:zod.z.string().url(),headers:zod.z.record(zod.z.string()).optional(),query:zod.z.record(zod.z.string()).optional(),body:zod.z.record(zod.z.any()).optional(),proxyUrl:zod.z.string().url().optional(),proxyHeaders:zod.z.record(zod.z.string()).optional(),retry:co.optional()}),po=zod.z.discriminatedUnion("type",[uo]),go=zod.z.object({type:mo,definition:zod.z.object({schema:so}),request:po.optional()}),Po=[ro];zod.z.enum(Po);var mn=(i=zod.z.undefined())=>zod.z.discriminatedUnion("type",[go.extend({metadata:i})]),pe=i=>Qe().parse({modality:T,value:i}),cn=(i,n,o,t,r,a)=>nn().parse({modality:U,index:i,id:n,name:o,arguments:t,serverName:r,thoughtSignature:a});var de=(i,n)=>A().parse({role:i,partialContent:en().parse({modality:me,value:n})}),un=(i,n,o,t,r,a,u)=>A().parse({role:i,partialContent:on().parse({modality:ce,index:n,id:o,name:t,arguments:r,serverName:a,thoughtSignature:u})});var K=(i,n)=>le().parse({modality:H,value:{type:G,thinking:i,signature:n}});var pn=i=>le().parse({modality:H,value:{type:ae,data:i}});var W=(i,n,o)=>A().parse({role:i,partialContent:se().parse({modality:V,value:{type:G,thinking:n,signature:o}})}),dn=(i,n)=>A().parse({role:i,partialContent:se().parse({modality:V,value:{type:ae,data:n}})});var bo=Object.defineProperty,gn=Object.getOwnPropertySymbols,ko=Object.prototype.hasOwnProperty,yo=Object.prototype.propertyIsEnumerable,Pn=(i,n,o)=>n in i?bo(i,n,{enumerable:true,configurable:true,writable:true,value:o}):i[n]=o,$=(i,n)=>{for(var o in n||(n={}))ko.call(n,o)&&Pn(i,o,n[o]);if(gn)for(var o of gn(n))yo.call(n,o)&&Pn(i,o,n[o]);return i},bn="ProviderError",Rn=class xn extends O{constructor({info:n,cause:o}){super({info:n,cause:o},bn),this.name=bn,this.info=n,this.cause=o;}static isProviderError(n){return n instanceof xn}};var kn="ModelResponseError",L=class Sn extends O{constructor({info:n,cause:o}){super({info:n,cause:o},kn),this.name=kn,this.cause=o,this.info=n;}static isModelResponseError(n){return n instanceof Sn}},yn="InvalidModelRequestError",J=class vn extends O{constructor({info:n,cause:o}){super({info:n,cause:o},yn),this.name=yn,this.cause=o,this.info=n,Object.setPrototypeOf(this,new.target.prototype);}static isInvalidModelRequestError(n){return n instanceof vn}},hn="InvalidConfigError",E=class Cn extends O{constructor({info:n,cause:o}){super({info:n,cause:o},hn),this.name=hn,this.cause=o,this.info=n,Object.setPrototypeOf(this,new.target.prototype);}static isInvalidConfigError(n){return n instanceof Cn}},fn="InvalidMessagesError",S=class Nn extends O{constructor({info:n,cause:o}){super({info:n,cause:o},fn),this.name=fn,this.cause=o,this.info=n,Object.setPrototypeOf(this,new.target.prototype);}static isInvalidMessagesError(n){return n instanceof Nn}},Tn="InvalidToolsError",ge=class Un extends O{constructor({info:n,cause:o}){super({info:n,cause:o},Tn),this.name=Tn,this.cause=o,this.info=n,Object.setPrototypeOf(this,new.target.prototype);}static isInvalidToolsError(n){return n instanceof Un}};var Pe="multi-string",wn=zod.z.object({type:zod.z.literal(Pe),param:zod.z.string().min(1),title:zod.z.string().min(1),description:zod.z.string().min(1).max(500),max:zod.z.number().int().positive()}),ho=i=>zod.z.array(zod.z.string()).max(i).default([]).optional(),Dn=i=>({def:wn.parse($({type:Pe},i)),schema:ho(i.max)}),be="object-schema",qn=zod.z.object({type:zod.z.literal(be),param:zod.z.string().min(1),title:zod.z.string().min(1),description:zod.z.string().min(1).max(500),objectSchema:zod.z.any()}),fo=i=>i.optional(),On=i=>({def:qn.parse($({type:be},i)),schema:fo(i.objectSchema)}),En="paired-select",To=zod.z.object({value:zod.z.string().min(1),label:zod.z.string().min(1)}),Mn=zod.z.object({key:zod.z.string().min(1),label:zod.z.string().min(1),description:zod.z.string().min(1).max(500).optional(),choices:zod.z.array(To).min(1)}),Mo=zod.z.object({type:zod.z.literal(En),param:zod.z.string().min(1),title:zod.z.string().min(1),description:zod.z.string().min(1).max(500),fields:zod.z.tuple([Mn,Mn]),uniqueByField:zod.z.string().min(1).optional()});var ke="range",jn=zod.z.object({type:zod.z.literal(ke),param:zod.z.string().min(1),title:zod.z.string().min(1),description:zod.z.string().min(1).max(500),min:zod.z.number().int(),max:zod.z.number().int(),step:zod.z.number().positive(),default:zod.z.number()}),Ro=(i,n,o,t)=>zod.z.number().min(i).max(n).step(o).default(t).optional(),v=i=>({def:jn.parse($({type:ke},i)),schema:Ro(i.min,i.max,i.step,i.default)}),ye="select-boolean",_n=zod.z.object({type:zod.z.literal(ye),param:zod.z.string().min(1),title:zod.z.string().min(1),description:zod.z.string().min(1).max(500),default:zod.z.boolean().nullable()}),xo=i=>zod.z.boolean().nullable().default(i).optional(),In=i=>({def:_n.parse($({type:ye},i)),schema:xo(i.default)}),he="select-string",Ln=zod.z.object({type:zod.z.literal(he),param:zod.z.string().min(1),title:zod.z.string().min(1),description:zod.z.string().min(1).max(500),default:zod.z.string(),choices:zod.z.array(zod.z.string())}),So=(i,n)=>zod.z.enum(n).nullable().default(i).optional(),Y=i=>({def:Ln.parse($({type:he},i)),schema:So(i.default,i.choices)}),vo=[ke,Pe,he,be,ye,En];zod.z.enum(vo);var Co=zod.z.discriminatedUnion("type",[jn,wn,Ln,_n,qn,Mo]),An=(i=oe,n=tn)=>zod.z.object({name:zod.z.string().min(1),description:zod.z.string().min(1),roles:zod.z.record(i,zod.z.string().min(1).optional()),modalities:zod.z.array(n).nonempty(),maxInputTokens:zod.z.number().int().positive().min(1),maxOutputTokens:zod.z.number().int().positive().min(1),maxReasoningTokens:zod.z.number().int().positive().min(1).optional(),config:zod.z.object({def:zod.z.record(zod.z.string().min(1),Co),schema:zod.z.instanceof(zod.z.ZodObject)}).refine(o=>{var t,r;let a=Object.keys(o.def),u=Object.keys((r=(t=o.schema)==null?void 0:t.shape)!=null?r:{});return a.every(m=>u.includes(m))&&u.every(m=>a.includes(m))},{message:"Keys in 'config.def' must exactly match keys in 'config.schema'"}),price:zod.z.custom()});zod.z.record(zod.z.string());zod.z.record(zod.z.union([zod.z.boolean(),zod.z.string(),zod.z.number(),zod.z.object({}),zod.z.array(zod.z.any()),zod.z.null(),zod.z.undefined()]));zod.z.string().url();var No={type:"range",title:"Temperature",description:"Adjusts the model's creativity level. With a setting of 0, the model strictly picks the most probable next word. For endeavors that benefit from a dash of inventiveness, consider dialing it up to 0.7 or higher, enabling the model to produce text that's unexpectedly fresh."},Uo={type:"range",title:"Max tokens",description:"Specify the total tokens for generation, where one token approximates four English characters. Setting this to 0 defaults to the model's maximum capacity."},wo={type:"range",title:"Max reasoning tokens",description:"Specify the total tokens for reasoning, where one token approximates four English characters."},Do=i=>({type:"multi",title:"Stop sequence",description:`Enter up to ${i} sequences that will halt additional text output. The generated text will exclude these sequences.`}),qo={type:"range",title:"Top A",description:"Considers only the top tokens that have 'sufficiently high' probabilities relative to the most likely token, functioning like a dynamic Top-P. A lower Top-A value narrows down the token choices based on the highest probability token, while a higher Top-A value refines the filtering without necessarily impacting the creativity of the output."},Oo={type:"range",title:"Top P",description:"Selects a subset of likely tokens for generation, restricting choices to the top-P fraction of possibilities, such as the top 10% when P=0.1. This approach can limit the variety of the output. By default, it's set to 1, indicating no restriction. It's advised to adjust this parameter or temperature to modulate output diversity, but not to modify both simultaneously."},Eo={type:"range",title:"Top K",description:"Select only from the highest K probabilities for each following word, effectively eliminating the less likely 'long tail' options."},jo={type:"range",title:"Min P",description:"Specifies the minimum probability a token must have to be considered, in relation to the probability of the most likely token. (This value varies based on the confidence level of the top token.) For example, if Min-P is set to 0.1, only tokens with at least 1/10th the probability of the highest-ranked token will be considered."},_o={type:"range",title:"Frequency penalty",description:"Minimize redundancy. By assigning a penalty to frequently used tokens within the text, the likelihood of repeating identical phrases is reduced. The default setting for this penalty is zero."},Io={type:"range",title:"Presence penalty",description:"Enhance the introduction of novel subjects by reducing the preference for tokens that have already appeared in the text, thus boosting the chances of exploring fresh topics. The standard setting for this is zero."},Lo={type:"range",title:"Seed",description:"When seed is fixed to a specific value, the model makes a best effort to provide the same response for repeated requests. Deterministic output isn't guaranteed. Also, changing the model or parameter settings, such as the temperature, can cause variations in the response even when you use the same seed value. By default, a random seed value is used."},Ao={type:"range",title:"Repetition penalty",description:"Reduces the likelihood of repeating tokens from the input. Increasing this value makes the model less prone to repetition, but setting it too high may lead to less coherent output, often resulting in run-on sentences missing smaller words. The token penalty is scaled according to the original token's probability."},$o={type:"boolean",title:"Log probs",description:"Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned."},Bo={type:"range",title:"Top log probs",description:"The number of most likely tokens to return at each token position, each with an associated log probability. 'logprobs' must be set to true if this parameter is used."},zo={type:"boolean",title:"Echo",description:"If true, the response will contain the prompt."},Fo={type:"select",title:"Response format",description:"Choose the response format of your model. For JSON, you must include the string 'JSON' in some form within your system / user prompt."},Ho={type:"select",title:"Response format",description:"Choose the response format of your model. 'json_object' colloquially known as JSON mode, instructs the model to respond with a valid JSON (must include the term 'json' in prompt). 'json_schema' colloquially known as structured outputs, allows you to specify a strict response schema that the model will adhere to."},Vo={type:"object",title:"Response schema",description:"When response format is set to 'json_schema', the model will return a JSON object of the specified schema."},Go={type:"object",title:"MCP servers",description:"MCP servers to use for the model."},b={TEMPERATURE:No,MAX_TOKENS:Uo,STOP:Do,TOP_A:qo,TOP_P:Oo,TOP_K:Eo,MIN_P:jo,FREQUENCY_PENALTY:_o,PRESENCE_PENALTY:Io,REPETITION_PENALTY:Ao,SEED:Lo,LOG_PROBS:$o,TOP_LOG_PROBS:Bo,ECHO:zo,RESPONSE_FORMAT:Fo,RESPONSE_FORMAT_WITH_SCHEMA:Ho,RESPONSE_SCHEMA:Vo,MAX_REASONING_TOKENS:wo,MCP_SERVERS:Go};var $n=i=>Object.fromEntries(Object.entries(i).filter(([n,o])=>o!=null));var Bn=i=>i.split(";")[0].split("/")[1],Z=i=>i==null?void 0:i.replace(/\/$/,"");var fe=v({param:"temperature",title:b.TEMPERATURE.title,description:b.TEMPERATURE.description,min:0,max:2,step:.01,default:1}),Te=i=>v({param:"max_tokens",title:b.MAX_TOKENS.title,description:b.MAX_TOKENS.description,min:0,max:i,step:1,default:0}),Me=i=>Dn({param:"stop",title:b.STOP(i).title,description:b.STOP(i).description,max:i}),Ot=v({param:"top_a",title:b.TOP_A.title,description:b.TOP_A.description,min:0,max:1,step:.01,default:0}),Et=v({param:"top_k",title:b.TOP_K.title,description:b.TOP_K.description,min:0,max:100,step:1,default:0}),Re=v({param:"top_p",title:b.TOP_P.title,description:b.TOP_P.description,min:0,max:1,step:.01,default:1}),jt=v({param:"min_p",title:b.MIN_P.title,description:b.MIN_P.description,min:0,max:1,step:.01,default:0}),xe=v({param:"frequency_penalty",title:b.FREQUENCY_PENALTY.title,description:b.FREQUENCY_PENALTY.description,min:-2,max:2,step:.01,default:0}),Se=v({param:"presence_penalty",title:b.PRESENCE_PENALTY.title,description:b.PRESENCE_PENALTY.description,min:-2,max:2,step:.01,default:0}),_t=v({param:"repetition_penalty",title:b.REPETITION_PENALTY.title,description:b.REPETITION_PENALTY.description,min:0,max:2,step:.01,default:0}),ve=v({param:"seed",title:b.SEED.title,description:b.SEED.description,min:0,max:1e6,step:1,default:0}),Ce=In({param:"logprobs",title:b.LOG_PROBS.title,description:b.LOG_PROBS.description,default:false}),Ne=v({param:"top_logprobs",title:b.TOP_LOG_PROBS.title,description:b.TOP_LOG_PROBS.description,min:0,max:20,step:1,default:0}),Ue=Y({param:"tool_choice",title:"Tool choice",description:"Controls which (if any) tool is called by the model. 'none' means the model will not call a function. 'auto' means the model can pick between generating a message or calling a tool.",default:"auto",choices:["auto","required","none"]}),It=Y({param:"response_format",title:b.RESPONSE_FORMAT.title,description:b.RESPONSE_FORMAT.description,default:"text",choices:["text","json_object"]}),we=Y({param:"response_format",title:b.RESPONSE_FORMAT_WITH_SCHEMA.title,description:b.RESPONSE_FORMAT_WITH_SCHEMA.description,default:"text",choices:["text","json_object","json_schema"]}),De=On({param:"response_schema",title:b.RESPONSE_SCHEMA.title,description:b.RESPONSE_SCHEMA.description,objectSchema:ln});var zn=(i,n)=>zod.z.object({temperature:fe.schema,maxTokens:Te(i).schema,stop:Me(n).schema,topP:Re.schema,frequencyPenalty:xe.schema,presencePenalty:Se.schema,seed:ve.schema.transform(o=>o===0?void 0:o),logProbs:Ce.schema,topLogProbs:Ne.schema,toolChoice:Ue.schema,responseFormat:we.schema,responseSchema:De.schema}),Fn=(i,n)=>({temperature:fe.def,maxTokens:Te(i).def,stop:Me(n).def,topP:Re.def,frequencyPenalty:xe.def,presencePenalty:Se.def,seed:ve.def,logProbs:Ce.def,topLogProbs:Ne.def,toolChoice:Ue.def,responseFormat:we.def,responseSchema:De.def});var qe={base:(i,n)=>({def:Fn(i,n),schema:zn(i,n)})};var Wo="open-router",B=class{constructor(){this.version="v1";this.name=Wo;this.embeddingModelFactories={};}chatModelLiterals(){return ["__base__"]}chatModelSchemas(){return {__base__:Oe}}chatModel(n){let o=X,t=Ee.parse(n);return new o(Oe,t)}embeddingModelLiterals(){return Object.keys(this.embeddingModelFactories)}embeddingModelSchemas(){return Object.keys(this.embeddingModelFactories).reduce((n,o)=>(n[o]=this.embeddingModelFactories[o].modelSchema,n),{})}embeddingModel(n){throw new Rn({info:"Open Router does not support embedding models yet",cause:new Error("Open Router does not support embedding models yet")})}};B.baseUrl="https://openrouter.ai/api/v1";var je={"microsoft/mai-ds-r1:free":{modelName:"microsoft/mai-ds-r1:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"google/gemini-2.5-pro-preview-03-25":{modelName:"google/gemini-2.5-pro-preview-03-25",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1.25,outputPricePerMillion:10}}}]},"thudm/glm-z1-32b:free":{modelName:"thudm/glm-z1-32b:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"thudm/glm-4-32b:free":{modelName:"thudm/glm-4-32b:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"google/gemini-2.5-flash-preview":{modelName:"google/gemini-2.5-flash-preview",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.15,outputPricePerMillion:.6}}}]},"google/gemini-2.5-flash-preview:thinking":{modelName:"google/gemini-2.5-flash-preview:thinking",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.15,outputPricePerMillion:3.5}}}]},"openai/o4-mini-high":{modelName:"openai/o4-mini-high",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1.1,outputPricePerMillion:4.4}}}]},"openai/o3":{modelName:"openai/o3",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:10,outputPricePerMillion:40}}}]},"openai/o4-mini":{modelName:"openai/o4-mini",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1.1,outputPricePerMillion:4.4}}}]},"shisa-ai/shisa-v2-llama3.3-70b:free":{modelName:"shisa-ai/shisa-v2-llama3.3-70b:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"qwen/qwen2.5-coder-7b-instruct":{modelName:"qwen/qwen2.5-coder-7b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.19999999999999998,outputPricePerMillion:.19999999999999998}}}]},"openai/gpt-4.1":{modelName:"openai/gpt-4.1",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2,outputPricePerMillion:8}}}]},"openai/gpt-4.1-mini":{modelName:"openai/gpt-4.1-mini",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.39999999999999997,outputPricePerMillion:1.5999999999999999}}}]},"openai/gpt-4.1-nano":{modelName:"openai/gpt-4.1-nano",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.09999999999999999,outputPricePerMillion:.39999999999999997}}}]},"eleutherai/llemma_7b":{modelName:"eleutherai/llemma_7b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7999999999999999,outputPricePerMillion:1.2}}}]},"alfredpros/codellama-7b-instruct-solidity":{modelName:"alfredpros/codellama-7b-instruct-solidity",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7999999999999999,outputPricePerMillion:1.2}}}]},"arliai/qwq-32b-arliai-rpr-v1:free":{modelName:"arliai/qwq-32b-arliai-rpr-v1:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"agentica-org/deepcoder-14b-preview:free":{modelName:"agentica-org/deepcoder-14b-preview:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"moonshotai/kimi-vl-a3b-thinking:free":{modelName:"moonshotai/kimi-vl-a3b-thinking:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"x-ai/grok-3-mini-beta":{modelName:"x-ai/grok-3-mini-beta",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.3,outputPricePerMillion:.5}}}]},"x-ai/grok-3-beta":{modelName:"x-ai/grok-3-beta",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:3,outputPricePerMillion:15}}}]},"nvidia/llama-3.1-nemotron-nano-8b-v1:free":{modelName:"nvidia/llama-3.1-nemotron-nano-8b-v1:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"nvidia/llama-3.3-nemotron-super-49b-v1:free":{modelName:"nvidia/llama-3.3-nemotron-super-49b-v1:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"nvidia/llama-3.1-nemotron-ultra-253b-v1:free":{modelName:"nvidia/llama-3.1-nemotron-ultra-253b-v1:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"meta-llama/llama-4-maverick:free":{modelName:"meta-llama/llama-4-maverick:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"meta-llama/llama-4-maverick":{modelName:"meta-llama/llama-4-maverick",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.16999999999999998,outputPricePerMillion:.6}}}]},"meta-llama/llama-4-scout:free":{modelName:"meta-llama/llama-4-scout:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"meta-llama/llama-4-scout":{modelName:"meta-llama/llama-4-scout",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.08,outputPricePerMillion:.3}}}]},"all-hands/openhands-lm-32b-v0.1":{modelName:"all-hands/openhands-lm-32b-v0.1",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2.6,outputPricePerMillion:3.4}}}]},"mistral/ministral-8b":{modelName:"mistral/ministral-8b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.09999999999999999,outputPricePerMillion:.09999999999999999}}}]},"deepseek/deepseek-v3-base:free":{modelName:"deepseek/deepseek-v3-base:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"scb10x/llama3.1-typhoon2-8b-instruct":{modelName:"scb10x/llama3.1-typhoon2-8b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.18,outputPricePerMillion:.18}}}]},"scb10x/llama3.1-typhoon2-70b-instruct":{modelName:"scb10x/llama3.1-typhoon2-70b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.88,outputPricePerMillion:.88}}}]},"allenai/molmo-7b-d:free":{modelName:"allenai/molmo-7b-d:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"bytedance-research/ui-tars-72b:free":{modelName:"bytedance-research/ui-tars-72b:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"qwen/qwen2.5-vl-3b-instruct:free":{modelName:"qwen/qwen2.5-vl-3b-instruct:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"google/gemini-2.5-pro-exp-03-25:free":{modelName:"google/gemini-2.5-pro-exp-03-25:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"qwen/qwen2.5-vl-32b-instruct:free":{modelName:"qwen/qwen2.5-vl-32b-instruct:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"qwen/qwen2.5-vl-32b-instruct":{modelName:"qwen/qwen2.5-vl-32b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.8999999999999999,outputPricePerMillion:.8999999999999999}}}]},"deepseek/deepseek-chat-v3-0324:free":{modelName:"deepseek/deepseek-chat-v3-0324:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"deepseek/deepseek-chat-v3-0324":{modelName:"deepseek/deepseek-chat-v3-0324",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.27,outputPricePerMillion:1.1}}}]},"featherless/qwerky-72b:free":{modelName:"featherless/qwerky-72b:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"openai/o1-pro":{modelName:"openai/o1-pro",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:150,outputPricePerMillion:600}}}]},"mistralai/mistral-small-3.1-24b-instruct:free":{modelName:"mistralai/mistral-small-3.1-24b-instruct:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"mistralai/mistral-small-3.1-24b-instruct":{modelName:"mistralai/mistral-small-3.1-24b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.09999999999999999,outputPricePerMillion:.3}}}]},"open-r1/olympiccoder-32b:free":{modelName:"open-r1/olympiccoder-32b:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"steelskull/l3.3-electra-r1-70b":{modelName:"steelskull/l3.3-electra-r1-70b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7,outputPricePerMillion:.95}}}]},"google/gemma-3-1b-it:free":{modelName:"google/gemma-3-1b-it:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"google/gemma-3-4b-it:free":{modelName:"google/gemma-3-4b-it:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"google/gemma-3-4b-it":{modelName:"google/gemma-3-4b-it",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.02,outputPricePerMillion:.04}}}]},"ai21/jamba-1.6-large":{modelName:"ai21/jamba-1.6-large",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2,outputPricePerMillion:8}}}]},"ai21/jamba-1.6-mini":{modelName:"ai21/jamba-1.6-mini",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.19999999999999998,outputPricePerMillion:.39999999999999997}}}]},"google/gemma-3-12b-it:free":{modelName:"google/gemma-3-12b-it:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"google/gemma-3-12b-it":{modelName:"google/gemma-3-12b-it",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.049999999999999996,outputPricePerMillion:.09999999999999999}}}]},"cohere/command-a":{modelName:"cohere/command-a",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2.5,outputPricePerMillion:10}}}]},"openai/gpt-4o-mini-search-preview":{modelName:"openai/gpt-4o-mini-search-preview",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.15,outputPricePerMillion:.6}}}]},"openai/gpt-4o-search-preview":{modelName:"openai/gpt-4o-search-preview",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2.5,outputPricePerMillion:10}}}]},"rekaai/reka-flash-3:free":{modelName:"rekaai/reka-flash-3:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"google/gemma-3-27b-it:free":{modelName:"google/gemma-3-27b-it:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"google/gemma-3-27b-it":{modelName:"google/gemma-3-27b-it",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.09999999999999999,outputPricePerMillion:.19999999999999998}}}]},"thedrummer/anubis-pro-105b-v1":{modelName:"thedrummer/anubis-pro-105b-v1",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7999999999999999,outputPricePerMillion:1}}}]},"latitudegames/wayfarer-large-70b-llama-3.3":{modelName:"latitudegames/wayfarer-large-70b-llama-3.3",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7999999999999999,outputPricePerMillion:.8999999999999999}}}]},"thedrummer/skyfall-36b-v2":{modelName:"thedrummer/skyfall-36b-v2",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.5,outputPricePerMillion:.7999999999999999}}}]},"microsoft/phi-4-multimodal-instruct":{modelName:"microsoft/phi-4-multimodal-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.049999999999999996,outputPricePerMillion:.09999999999999999}}}]},"perplexity/sonar-reasoning-pro":{modelName:"perplexity/sonar-reasoning-pro",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2,outputPricePerMillion:8}}}]},"perplexity/sonar-pro":{modelName:"perplexity/sonar-pro",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:3,outputPricePerMillion:15}}}]},"perplexity/sonar-deep-research":{modelName:"perplexity/sonar-deep-research",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2,outputPricePerMillion:8}}}]},"deepseek/deepseek-r1-zero:free":{modelName:"deepseek/deepseek-r1-zero:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"qwen/qwq-32b:free":{modelName:"qwen/qwq-32b:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"qwen/qwq-32b":{modelName:"qwen/qwq-32b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.15,outputPricePerMillion:.19999999999999998}}}]},"moonshotai/moonlight-16b-a3b-instruct:free":{modelName:"moonshotai/moonlight-16b-a3b-instruct:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"nousresearch/deephermes-3-llama-3-8b-preview:free":{modelName:"nousresearch/deephermes-3-llama-3-8b-preview:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"openai/gpt-4.5-preview":{modelName:"openai/gpt-4.5-preview",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:75,outputPricePerMillion:150}}}]},"google/gemini-2.0-flash-lite-001":{modelName:"google/gemini-2.0-flash-lite-001",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.075,outputPricePerMillion:.3}}}]},"anthropic/claude-3.7-sonnet":{modelName:"anthropic/claude-3.7-sonnet",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:3,outputPricePerMillion:15}}}]},"anthropic/claude-3.7-sonnet:thinking":{modelName:"anthropic/claude-3.7-sonnet:thinking",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:3,outputPricePerMillion:15}}}]},"anthropic/claude-3.7-sonnet:beta":{modelName:"anthropic/claude-3.7-sonnet:beta",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:3,outputPricePerMillion:15}}}]},"perplexity/r1-1776":{modelName:"perplexity/r1-1776",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2,outputPricePerMillion:8}}}]},"mistralai/mistral-saba":{modelName:"mistralai/mistral-saba",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.19999999999999998,outputPricePerMillion:.6}}}]},"cognitivecomputations/dolphin3.0-r1-mistral-24b:free":{modelName:"cognitivecomputations/dolphin3.0-r1-mistral-24b:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"cognitivecomputations/dolphin3.0-mistral-24b:free":{modelName:"cognitivecomputations/dolphin3.0-mistral-24b:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"meta-llama/llama-guard-3-8b":{modelName:"meta-llama/llama-guard-3-8b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.055,outputPricePerMillion:.055}}}]},"openai/o3-mini-high":{modelName:"openai/o3-mini-high",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1.1,outputPricePerMillion:4.4}}}]},"deepseek/deepseek-r1-distill-llama-8b":{modelName:"deepseek/deepseek-r1-distill-llama-8b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.04,outputPricePerMillion:.04}}}]},"google/gemini-2.0-flash-001":{modelName:"google/gemini-2.0-flash-001",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.09999999999999999,outputPricePerMillion:.39999999999999997}}}]},"qwen/qwen-vl-plus":{modelName:"qwen/qwen-vl-plus",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.21,outputPricePerMillion:.63}}}]},"aion-labs/aion-1.0":{modelName:"aion-labs/aion-1.0",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:4,outputPricePerMillion:8}}}]},"aion-labs/aion-1.0-mini":{modelName:"aion-labs/aion-1.0-mini",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7,outputPricePerMillion:1.4}}}]},"aion-labs/aion-rp-llama-3.1-8b":{modelName:"aion-labs/aion-rp-llama-3.1-8b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.19999999999999998,outputPricePerMillion:.19999999999999998}}}]},"qwen/qwen-vl-max":{modelName:"qwen/qwen-vl-max",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7999999999999999,outputPricePerMillion:3.1999999999999997}}}]},"qwen/qwen-turbo":{modelName:"qwen/qwen-turbo",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.049999999999999996,outputPricePerMillion:.19999999999999998}}}]},"qwen/qwen2.5-vl-72b-instruct:free":{modelName:"qwen/qwen2.5-vl-72b-instruct:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"qwen/qwen2.5-vl-72b-instruct":{modelName:"qwen/qwen2.5-vl-72b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7,outputPricePerMillion:.7}}}]},"qwen/qwen-plus":{modelName:"qwen/qwen-plus",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.39999999999999997,outputPricePerMillion:1.2}}}]},"qwen/qwen-max":{modelName:"qwen/qwen-max",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1.5999999999999999,outputPricePerMillion:6.3999999999999995}}}]},"openai/o3-mini":{modelName:"openai/o3-mini",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1.1,outputPricePerMillion:4.4}}}]},"deepseek/deepseek-r1-distill-qwen-1.5b":{modelName:"deepseek/deepseek-r1-distill-qwen-1.5b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.18,outputPricePerMillion:.18}}}]},"mistralai/mistral-small-24b-instruct-2501:free":{modelName:"mistralai/mistral-small-24b-instruct-2501:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"mistralai/mistral-small-24b-instruct-2501":{modelName:"mistralai/mistral-small-24b-instruct-2501",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.07,outputPricePerMillion:.14}}}]},"deepseek/deepseek-r1-distill-qwen-32b:free":{modelName:"deepseek/deepseek-r1-distill-qwen-32b:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"deepseek/deepseek-r1-distill-qwen-32b":{modelName:"deepseek/deepseek-r1-distill-qwen-32b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.12,outputPricePerMillion:.18}}}]},"deepseek/deepseek-r1-distill-qwen-14b:free":{modelName:"deepseek/deepseek-r1-distill-qwen-14b:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"deepseek/deepseek-r1-distill-qwen-14b":{modelName:"deepseek/deepseek-r1-distill-qwen-14b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.15,outputPricePerMillion:.15}}}]},"perplexity/sonar-reasoning":{modelName:"perplexity/sonar-reasoning",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1,outputPricePerMillion:5}}}]},"perplexity/sonar":{modelName:"perplexity/sonar",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1,outputPricePerMillion:1}}}]},"liquid/lfm-7b":{modelName:"liquid/lfm-7b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.01,outputPricePerMillion:.01}}}]},"liquid/lfm-3b":{modelName:"liquid/lfm-3b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.02,outputPricePerMillion:.02}}}]},"deepseek/deepseek-r1-distill-llama-70b:free":{modelName:"deepseek/deepseek-r1-distill-llama-70b:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"deepseek/deepseek-r1-distill-llama-70b":{modelName:"deepseek/deepseek-r1-distill-llama-70b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.09999999999999999,outputPricePerMillion:.39999999999999997}}}]},"deepseek/deepseek-r1:free":{modelName:"deepseek/deepseek-r1:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"deepseek/deepseek-r1":{modelName:"deepseek/deepseek-r1",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.5,outputPricePerMillion:2.1799999999999997}}}]},"sophosympatheia/rogue-rose-103b-v0.2:free":{modelName:"sophosympatheia/rogue-rose-103b-v0.2:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"minimax/minimax-01":{modelName:"minimax/minimax-01",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.19999999999999998,outputPricePerMillion:1.1}}}]},"mistralai/codestral-2501":{modelName:"mistralai/codestral-2501",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.3,outputPricePerMillion:.8999999999999999}}}]},"microsoft/phi-4":{modelName:"microsoft/phi-4",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.07,outputPricePerMillion:.14}}}]},"deepseek/deepseek-chat:free":{modelName:"deepseek/deepseek-chat:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"deepseek/deepseek-chat":{modelName:"deepseek/deepseek-chat",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.38,outputPricePerMillion:.8899999999999999}}}]},"sao10k/l3.3-euryale-70b":{modelName:"sao10k/l3.3-euryale-70b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7,outputPricePerMillion:.7999999999999999}}}]},"openai/o1":{modelName:"openai/o1",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:15,outputPricePerMillion:60}}}]},"eva-unit-01/eva-llama-3.33-70b":{modelName:"eva-unit-01/eva-llama-3.33-70b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:4,outputPricePerMillion:6}}}]},"x-ai/grok-2-vision-1212":{modelName:"x-ai/grok-2-vision-1212",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2,outputPricePerMillion:10}}}]},"x-ai/grok-2-1212":{modelName:"x-ai/grok-2-1212",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2,outputPricePerMillion:10}}}]},"cohere/command-r7b-12-2024":{modelName:"cohere/command-r7b-12-2024",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.0375,outputPricePerMillion:.15}}}]},"google/gemini-2.0-flash-exp:free":{modelName:"google/gemini-2.0-flash-exp:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"meta-llama/llama-3.3-70b-instruct:free":{modelName:"meta-llama/llama-3.3-70b-instruct:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"meta-llama/llama-3.3-70b-instruct":{modelName:"meta-llama/llama-3.3-70b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.09999999999999999,outputPricePerMillion:.25}}}]},"amazon/nova-lite-v1":{modelName:"amazon/nova-lite-v1",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.06,outputPricePerMillion:.24}}}]},"amazon/nova-micro-v1":{modelName:"amazon/nova-micro-v1",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.035,outputPricePerMillion:.14}}}]},"amazon/nova-pro-v1":{modelName:"amazon/nova-pro-v1",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7999999999999999,outputPricePerMillion:3.1999999999999997}}}]},"qwen/qwq-32b-preview:free":{modelName:"qwen/qwq-32b-preview:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"qwen/qwq-32b-preview":{modelName:"qwen/qwq-32b-preview",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.19999999999999998,outputPricePerMillion:.19999999999999998}}}]},"google/learnlm-1.5-pro-experimental:free":{modelName:"google/learnlm-1.5-pro-experimental:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"eva-unit-01/eva-qwen-2.5-72b":{modelName:"eva-unit-01/eva-qwen-2.5-72b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.8999999999999999,outputPricePerMillion:1.2}}}]},"openai/gpt-4o-2024-11-20":{modelName:"openai/gpt-4o-2024-11-20",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2.5,outputPricePerMillion:10}}}]},"mistralai/mistral-large-2411":{modelName:"mistralai/mistral-large-2411",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2,outputPricePerMillion:6}}}]},"mistralai/mistral-large-2407":{modelName:"mistralai/mistral-large-2407",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2,outputPricePerMillion:6}}}]},"mistralai/pixtral-large-2411":{modelName:"mistralai/pixtral-large-2411",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2,outputPricePerMillion:6}}}]},"x-ai/grok-vision-beta":{modelName:"x-ai/grok-vision-beta",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:5,outputPricePerMillion:15}}}]},"infermatic/mn-inferor-12b":{modelName:"infermatic/mn-inferor-12b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7999999999999999,outputPricePerMillion:1.2}}}]},"qwen/qwen-2.5-coder-32b-instruct:free":{modelName:"qwen/qwen-2.5-coder-32b-instruct:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"qwen/qwen-2.5-coder-32b-instruct":{modelName:"qwen/qwen-2.5-coder-32b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.07,outputPricePerMillion:.15}}}]},"raifle/sorcererlm-8x22b":{modelName:"raifle/sorcererlm-8x22b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:4.5,outputPricePerMillion:4.5}}}]},"eva-unit-01/eva-qwen-2.5-32b":{modelName:"eva-unit-01/eva-qwen-2.5-32b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2.6,outputPricePerMillion:3.4}}}]},"thedrummer/unslopnemo-12b":{modelName:"thedrummer/unslopnemo-12b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.5,outputPricePerMillion:.5}}}]},"anthropic/claude-3.5-haiku:beta":{modelName:"anthropic/claude-3.5-haiku:beta",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7999999999999999,outputPricePerMillion:4}}}]},"anthropic/claude-3.5-haiku":{modelName:"anthropic/claude-3.5-haiku",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7999999999999999,outputPricePerMillion:4}}}]},"anthropic/claude-3.5-haiku-20241022:beta":{modelName:"anthropic/claude-3.5-haiku-20241022:beta",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7999999999999999,outputPricePerMillion:4}}}]},"anthropic/claude-3.5-haiku-20241022":{modelName:"anthropic/claude-3.5-haiku-20241022",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7999999999999999,outputPricePerMillion:4}}}]},"neversleep/llama-3.1-lumimaid-70b":{modelName:"neversleep/llama-3.1-lumimaid-70b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1.5,outputPricePerMillion:2.25}}}]},"anthracite-org/magnum-v4-72b":{modelName:"anthracite-org/magnum-v4-72b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1.5,outputPricePerMillion:2.25}}}]},"anthropic/claude-3.5-sonnet:beta":{modelName:"anthropic/claude-3.5-sonnet:beta",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:3,outputPricePerMillion:15}}}]},"anthropic/claude-3.5-sonnet":{modelName:"anthropic/claude-3.5-sonnet",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:3,outputPricePerMillion:15}}}]},"x-ai/grok-beta":{modelName:"x-ai/grok-beta",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:5,outputPricePerMillion:15}}}]},"mistralai/ministral-8b":{modelName:"mistralai/ministral-8b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.09999999999999999,outputPricePerMillion:.09999999999999999}}}]},"mistralai/ministral-3b":{modelName:"mistralai/ministral-3b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.04,outputPricePerMillion:.04}}}]},"qwen/qwen-2.5-7b-instruct:free":{modelName:"qwen/qwen-2.5-7b-instruct:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"qwen/qwen-2.5-7b-instruct":{modelName:"qwen/qwen-2.5-7b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.049999999999999996,outputPricePerMillion:.09999999999999999}}}]},"nvidia/llama-3.1-nemotron-70b-instruct:free":{modelName:"nvidia/llama-3.1-nemotron-70b-instruct:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"nvidia/llama-3.1-nemotron-70b-instruct":{modelName:"nvidia/llama-3.1-nemotron-70b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.12,outputPricePerMillion:.3}}}]},"inflection/inflection-3-productivity":{modelName:"inflection/inflection-3-productivity",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2.5,outputPricePerMillion:10}}}]},"inflection/inflection-3-pi":{modelName:"inflection/inflection-3-pi",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2.5,outputPricePerMillion:10}}}]},"google/gemini-flash-1.5-8b":{modelName:"google/gemini-flash-1.5-8b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.0375,outputPricePerMillion:.15}}}]},"thedrummer/rocinante-12b":{modelName:"thedrummer/rocinante-12b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.25,outputPricePerMillion:.5}}}]},"anthracite-org/magnum-v2-72b":{modelName:"anthracite-org/magnum-v2-72b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:3,outputPricePerMillion:3}}}]},"liquid/lfm-40b":{modelName:"liquid/lfm-40b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.15,outputPricePerMillion:.15}}}]},"meta-llama/llama-3.2-3b-instruct:free":{modelName:"meta-llama/llama-3.2-3b-instruct:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"meta-llama/llama-3.2-3b-instruct":{modelName:"meta-llama/llama-3.2-3b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.015,outputPricePerMillion:.024999999999999998}}}]},"meta-llama/llama-3.2-1b-instruct:free":{modelName:"meta-llama/llama-3.2-1b-instruct:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"meta-llama/llama-3.2-1b-instruct":{modelName:"meta-llama/llama-3.2-1b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.01,outputPricePerMillion:.01}}}]},"meta-llama/llama-3.2-90b-vision-instruct":{modelName:"meta-llama/llama-3.2-90b-vision-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.8999999999999999,outputPricePerMillion:.8999999999999999}}}]},"meta-llama/llama-3.2-11b-vision-instruct:free":{modelName:"meta-llama/llama-3.2-11b-vision-instruct:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"meta-llama/llama-3.2-11b-vision-instruct":{modelName:"meta-llama/llama-3.2-11b-vision-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.049,outputPricePerMillion:.049}}}]},"qwen/qwen-2.5-72b-instruct:free":{modelName:"qwen/qwen-2.5-72b-instruct:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"qwen/qwen-2.5-72b-instruct":{modelName:"qwen/qwen-2.5-72b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.12,outputPricePerMillion:.39}}}]},"qwen/qwen-2.5-vl-72b-instruct":{modelName:"qwen/qwen-2.5-vl-72b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.6,outputPricePerMillion:.6}}}]},"neversleep/llama-3.1-lumimaid-8b":{modelName:"neversleep/llama-3.1-lumimaid-8b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.09375,outputPricePerMillion:.75}}}]},"openai/o1-preview":{modelName:"openai/o1-preview",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:15,outputPricePerMillion:60}}}]},"openai/o1-preview-2024-09-12":{modelName:"openai/o1-preview-2024-09-12",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:15,outputPricePerMillion:60}}}]},"openai/o1-mini":{modelName:"openai/o1-mini",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1.1,outputPricePerMillion:4.4}}}]},"openai/o1-mini-2024-09-12":{modelName:"openai/o1-mini-2024-09-12",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1.1,outputPricePerMillion:4.4}}}]},"mistralai/pixtral-12b":{modelName:"mistralai/pixtral-12b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.09999999999999999,outputPricePerMillion:.09999999999999999}}}]},"cohere/command-r-plus-08-2024":{modelName:"cohere/command-r-plus-08-2024",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2.5,outputPricePerMillion:10}}}]},"cohere/command-r-08-2024":{modelName:"cohere/command-r-08-2024",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.15,outputPricePerMillion:.6}}}]},"qwen/qwen-2.5-vl-7b-instruct:free":{modelName:"qwen/qwen-2.5-vl-7b-instruct:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"qwen/qwen-2.5-vl-7b-instruct":{modelName:"qwen/qwen-2.5-vl-7b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.19999999999999998,outputPricePerMillion:.19999999999999998}}}]},"sao10k/l3.1-euryale-70b":{modelName:"sao10k/l3.1-euryale-70b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7,outputPricePerMillion:.7999999999999999}}}]},"google/gemini-flash-1.5-8b-exp":{modelName:"google/gemini-flash-1.5-8b-exp",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"ai21/jamba-1-5-mini":{modelName:"ai21/jamba-1-5-mini",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.19999999999999998,outputPricePerMillion:.39999999999999997}}}]},"ai21/jamba-1-5-large":{modelName:"ai21/jamba-1-5-large",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2,outputPricePerMillion:8}}}]},"microsoft/phi-3.5-mini-128k-instruct":{modelName:"microsoft/phi-3.5-mini-128k-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.09999999999999999,outputPricePerMillion:.09999999999999999}}}]},"nousresearch/hermes-3-llama-3.1-70b":{modelName:"nousresearch/hermes-3-llama-3.1-70b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.12,outputPricePerMillion:.3}}}]},"nousresearch/hermes-3-llama-3.1-405b":{modelName:"nousresearch/hermes-3-llama-3.1-405b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7999999999999999,outputPricePerMillion:.7999999999999999}}}]},"openai/chatgpt-4o-latest":{modelName:"openai/chatgpt-4o-latest",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:5,outputPricePerMillion:15}}}]},"sao10k/l3-lunaris-8b":{modelName:"sao10k/l3-lunaris-8b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.02,outputPricePerMillion:.049999999999999996}}}]},"aetherwiing/mn-starcannon-12b":{modelName:"aetherwiing/mn-starcannon-12b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7999999999999999,outputPricePerMillion:1.2}}}]},"openai/gpt-4o-2024-08-06":{modelName:"openai/gpt-4o-2024-08-06",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2.5,outputPricePerMillion:10}}}]},"meta-llama/llama-3.1-405b:free":{modelName:"meta-llama/llama-3.1-405b:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"meta-llama/llama-3.1-405b":{modelName:"meta-llama/llama-3.1-405b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2,outputPricePerMillion:2}}}]},"nothingiisreal/mn-celeste-12b":{modelName:"nothingiisreal/mn-celeste-12b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7999999999999999,outputPricePerMillion:1.2}}}]},"perplexity/llama-3.1-sonar-small-128k-online":{modelName:"perplexity/llama-3.1-sonar-small-128k-online",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.19999999999999998,outputPricePerMillion:.19999999999999998}}}]},"perplexity/llama-3.1-sonar-large-128k-online":{modelName:"perplexity/llama-3.1-sonar-large-128k-online",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1,outputPricePerMillion:1}}}]},"meta-llama/llama-3.1-8b-instruct:free":{modelName:"meta-llama/llama-3.1-8b-instruct:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"meta-llama/llama-3.1-8b-instruct":{modelName:"meta-llama/llama-3.1-8b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.02,outputPricePerMillion:.03}}}]},"meta-llama/llama-3.1-405b-instruct":{modelName:"meta-llama/llama-3.1-405b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7999999999999999,outputPricePerMillion:.7999999999999999}}}]},"meta-llama/llama-3.1-70b-instruct":{modelName:"meta-llama/llama-3.1-70b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.09999999999999999,outputPricePerMillion:.28}}}]},"mistralai/codestral-mamba":{modelName:"mistralai/codestral-mamba",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.25,outputPricePerMillion:.25}}}]},"mistralai/mistral-nemo:free":{modelName:"mistralai/mistral-nemo:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"mistralai/mistral-nemo":{modelName:"mistralai/mistral-nemo",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.03,outputPricePerMillion:.07}}}]},"openai/gpt-4o-mini":{modelName:"openai/gpt-4o-mini",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.15,outputPricePerMillion:.6}}}]},"openai/gpt-4o-mini-2024-07-18":{modelName:"openai/gpt-4o-mini-2024-07-18",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.15,outputPricePerMillion:.6}}}]},"google/gemma-2-27b-it":{modelName:"google/gemma-2-27b-it",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7999999999999999,outputPricePerMillion:.7999999999999999}}}]},"alpindale/magnum-72b":{modelName:"alpindale/magnum-72b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:4,outputPricePerMillion:6}}}]},"google/gemma-2-9b-it:free":{modelName:"google/gemma-2-9b-it:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"google/gemma-2-9b-it":{modelName:"google/gemma-2-9b-it",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.07,outputPricePerMillion:.07}}}]},"01-ai/yi-large":{modelName:"01-ai/yi-large",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:3,outputPricePerMillion:3}}}]},"ai21/jamba-instruct":{modelName:"ai21/jamba-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.5,outputPricePerMillion:.7}}}]},"anthropic/claude-3.5-sonnet-20240620:beta":{modelName:"anthropic/claude-3.5-sonnet-20240620:beta",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:3,outputPricePerMillion:15}}}]},"anthropic/claude-3.5-sonnet-20240620":{modelName:"anthropic/claude-3.5-sonnet-20240620",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:3,outputPricePerMillion:15}}}]},"sao10k/l3-euryale-70b":{modelName:"sao10k/l3-euryale-70b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1.48,outputPricePerMillion:1.48}}}]},"cognitivecomputations/dolphin-mixtral-8x22b":{modelName:"cognitivecomputations/dolphin-mixtral-8x22b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.8999999999999999,outputPricePerMillion:.8999999999999999}}}]},"qwen/qwen-2-72b-instruct":{modelName:"qwen/qwen-2-72b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.8999999999999999,outputPricePerMillion:.8999999999999999}}}]},"mistralai/mistral-7b-instruct:free":{modelName:"mistralai/mistral-7b-instruct:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"mistralai/mistral-7b-instruct":{modelName:"mistralai/mistral-7b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.029,outputPricePerMillion:.055}}}]},"mistralai/mistral-7b-instruct-v0.3":{modelName:"mistralai/mistral-7b-instruct-v0.3",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.029,outputPricePerMillion:.055}}}]},"nousresearch/hermes-2-pro-llama-3-8b":{modelName:"nousresearch/hermes-2-pro-llama-3-8b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.024999999999999998,outputPricePerMillion:.04}}}]},"microsoft/phi-3-mini-128k-instruct":{modelName:"microsoft/phi-3-mini-128k-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.09999999999999999,outputPricePerMillion:.09999999999999999}}}]},"microsoft/phi-3-medium-128k-instruct":{modelName:"microsoft/phi-3-medium-128k-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1,outputPricePerMillion:1}}}]},"neversleep/llama-3-lumimaid-70b":{modelName:"neversleep/llama-3-lumimaid-70b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:4,outputPricePerMillion:6}}}]},"google/gemini-flash-1.5":{modelName:"google/gemini-flash-1.5",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.075,outputPricePerMillion:.3}}}]},"openai/gpt-4o":{modelName:"openai/gpt-4o",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2.5,outputPricePerMillion:10}}}]},"openai/gpt-4o:extended":{modelName:"openai/gpt-4o:extended",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:6,outputPricePerMillion:18}}}]},"meta-llama/llama-guard-2-8b":{modelName:"meta-llama/llama-guard-2-8b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.19999999999999998,outputPricePerMillion:.19999999999999998}}}]},"openai/gpt-4o-2024-05-13":{modelName:"openai/gpt-4o-2024-05-13",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:5,outputPricePerMillion:15}}}]},"neversleep/llama-3-lumimaid-8b:extended":{modelName:"neversleep/llama-3-lumimaid-8b:extended",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.09375,outputPricePerMillion:.75}}}]},"neversleep/llama-3-lumimaid-8b":{modelName:"neversleep/llama-3-lumimaid-8b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.09375,outputPricePerMillion:.75}}}]},"sao10k/fimbulvetr-11b-v2":{modelName:"sao10k/fimbulvetr-11b-v2",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7999999999999999,outputPricePerMillion:1.2}}}]},"meta-llama/llama-3-8b-instruct":{modelName:"meta-llama/llama-3-8b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.03,outputPricePerMillion:.06}}}]},"meta-llama/llama-3-70b-instruct":{modelName:"meta-llama/llama-3-70b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.3,outputPricePerMillion:.39999999999999997}}}]},"mistralai/mixtral-8x22b-instruct":{modelName:"mistralai/mixtral-8x22b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.8999999999999999,outputPricePerMillion:.8999999999999999}}}]},"microsoft/wizardlm-2-8x22b":{modelName:"microsoft/wizardlm-2-8x22b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.5,outputPricePerMillion:.5}}}]},"microsoft/wizardlm-2-7b":{modelName:"microsoft/wizardlm-2-7b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.07,outputPricePerMillion:.07}}}]},"google/gemini-pro-1.5":{modelName:"google/gemini-pro-1.5",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1.25,outputPricePerMillion:5}}}]},"openai/gpt-4-turbo":{modelName:"openai/gpt-4-turbo",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:10,outputPricePerMillion:30}}}]},"cohere/command-r-plus":{modelName:"cohere/command-r-plus",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:3,outputPricePerMillion:15}}}]},"cohere/command-r-plus-04-2024":{modelName:"cohere/command-r-plus-04-2024",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:3,outputPricePerMillion:15}}}]},"sophosympatheia/midnight-rose-70b":{modelName:"sophosympatheia/midnight-rose-70b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.7999999999999999,outputPricePerMillion:.7999999999999999}}}]},"cohere/command":{modelName:"cohere/command",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1,outputPricePerMillion:2}}}]},"cohere/command-r":{modelName:"cohere/command-r",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.5,outputPricePerMillion:1.5}}}]},"anthropic/claude-3-haiku:beta":{modelName:"anthropic/claude-3-haiku:beta",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.25,outputPricePerMillion:1.25}}}]},"anthropic/claude-3-haiku":{modelName:"anthropic/claude-3-haiku",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.25,outputPricePerMillion:1.25}}}]},"anthropic/claude-3-opus:beta":{modelName:"anthropic/claude-3-opus:beta",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:15,outputPricePerMillion:75}}}]},"anthropic/claude-3-opus":{modelName:"anthropic/claude-3-opus",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:15,outputPricePerMillion:75}}}]},"anthropic/claude-3-sonnet:beta":{modelName:"anthropic/claude-3-sonnet:beta",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:3,outputPricePerMillion:15}}}]},"anthropic/claude-3-sonnet":{modelName:"anthropic/claude-3-sonnet",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:3,outputPricePerMillion:15}}}]},"cohere/command-r-03-2024":{modelName:"cohere/command-r-03-2024",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.5,outputPricePerMillion:1.5}}}]},"mistralai/mistral-large":{modelName:"mistralai/mistral-large",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2,outputPricePerMillion:6}}}]},"openai/gpt-3.5-turbo-0613":{modelName:"openai/gpt-3.5-turbo-0613",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1,outputPricePerMillion:2}}}]},"openai/gpt-4-turbo-preview":{modelName:"openai/gpt-4-turbo-preview",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:10,outputPricePerMillion:30}}}]},"nousresearch/nous-hermes-2-mixtral-8x7b-dpo":{modelName:"nousresearch/nous-hermes-2-mixtral-8x7b-dpo",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.6,outputPricePerMillion:.6}}}]},"mistralai/mistral-medium":{modelName:"mistralai/mistral-medium",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:2.75,outputPricePerMillion:8.1}}}]},"mistralai/mistral-small":{modelName:"mistralai/mistral-small",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.19999999999999998,outputPricePerMillion:.6}}}]},"mistralai/mistral-tiny":{modelName:"mistralai/mistral-tiny",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.25,outputPricePerMillion:.25}}}]},"mistralai/mistral-7b-instruct-v0.2":{modelName:"mistralai/mistral-7b-instruct-v0.2",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.19999999999999998,outputPricePerMillion:.19999999999999998}}}]},"cognitivecomputations/dolphin-mixtral-8x7b":{modelName:"cognitivecomputations/dolphin-mixtral-8x7b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.5,outputPricePerMillion:.5}}}]},"google/gemini-pro-vision":{modelName:"google/gemini-pro-vision",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.5,outputPricePerMillion:1.5}}}]},"mistralai/mixtral-8x7b-instruct":{modelName:"mistralai/mixtral-8x7b-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.24,outputPricePerMillion:.24}}}]},"openchat/openchat-7b":{modelName:"openchat/openchat-7b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.07,outputPricePerMillion:.07}}}]},"neversleep/noromaid-20b":{modelName:"neversleep/noromaid-20b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.75,outputPricePerMillion:1.5}}}]},"anthropic/claude-2.1:beta":{modelName:"anthropic/claude-2.1:beta",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:8,outputPricePerMillion:24}}}]},"anthropic/claude-2.1":{modelName:"anthropic/claude-2.1",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:8,outputPricePerMillion:24}}}]},"anthropic/claude-2:beta":{modelName:"anthropic/claude-2:beta",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:8,outputPricePerMillion:24}}}]},"anthropic/claude-2":{modelName:"anthropic/claude-2",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:8,outputPricePerMillion:24}}}]},"undi95/toppy-m-7b":{modelName:"undi95/toppy-m-7b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.07,outputPricePerMillion:.07}}}]},"alpindale/goliath-120b":{modelName:"alpindale/goliath-120b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:6.5625,outputPricePerMillion:9.375}}}]},"openrouter/auto":{modelName:"openrouter/auto",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:-1e6,outputPricePerMillion:-1e6}}}]},"openai/gpt-3.5-turbo-1106":{modelName:"openai/gpt-3.5-turbo-1106",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1,outputPricePerMillion:2}}}]},"openai/gpt-4-1106-preview":{modelName:"openai/gpt-4-1106-preview",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:10,outputPricePerMillion:30}}}]},"google/palm-2-chat-bison-32k":{modelName:"google/palm-2-chat-bison-32k",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1,outputPricePerMillion:2}}}]},"google/palm-2-codechat-bison-32k":{modelName:"google/palm-2-codechat-bison-32k",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1,outputPricePerMillion:2}}}]},"jondurbin/airoboros-l2-70b":{modelName:"jondurbin/airoboros-l2-70b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.5,outputPricePerMillion:.5}}}]},"openai/gpt-3.5-turbo-instruct":{modelName:"openai/gpt-3.5-turbo-instruct",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1.5,outputPricePerMillion:2}}}]},"mistralai/mistral-7b-instruct-v0.1":{modelName:"mistralai/mistral-7b-instruct-v0.1",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.19999999999999998,outputPricePerMillion:.19999999999999998}}}]},"pygmalionai/mythalion-13b":{modelName:"pygmalionai/mythalion-13b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.5625,outputPricePerMillion:1.125}}}]},"openai/gpt-3.5-turbo-16k":{modelName:"openai/gpt-3.5-turbo-16k",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:3,outputPricePerMillion:4}}}]},"openai/gpt-4-32k":{modelName:"openai/gpt-4-32k",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:60,outputPricePerMillion:120}}}]},"openai/gpt-4-32k-0314":{modelName:"openai/gpt-4-32k-0314",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:60,outputPricePerMillion:120}}}]},"nousresearch/nous-hermes-llama2-13b":{modelName:"nousresearch/nous-hermes-llama2-13b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.18,outputPricePerMillion:.18}}}]},"mancer/weaver":{modelName:"mancer/weaver",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1.125,outputPricePerMillion:1.125}}}]},"huggingfaceh4/zephyr-7b-beta:free":{modelName:"huggingfaceh4/zephyr-7b-beta:free",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:0,outputPricePerMillion:0}}}]},"anthropic/claude-2.0:beta":{modelName:"anthropic/claude-2.0:beta",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:8,outputPricePerMillion:24}}}]},"anthropic/claude-2.0":{modelName:"anthropic/claude-2.0",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:8,outputPricePerMillion:24}}}]},"undi95/remm-slerp-l2-13b":{modelName:"undi95/remm-slerp-l2-13b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.5625,outputPricePerMillion:1.125}}}]},"google/palm-2-chat-bison":{modelName:"google/palm-2-chat-bison",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1,outputPricePerMillion:2}}}]},"google/palm-2-codechat-bison":{modelName:"google/palm-2-codechat-bison",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:1,outputPricePerMillion:2}}}]},"gryphe/mythomax-l2-13b":{modelName:"gryphe/mythomax-l2-13b",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.065,outputPricePerMillion:.065}}}]},"meta-llama/llama-2-13b-chat":{modelName:"meta-llama/llama-2-13b-chat",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.22,outputPricePerMillion:.22}}}]},"meta-llama/llama-2-70b-chat":{modelName:"meta-llama/llama-2-70b-chat",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.8999999999999999,outputPricePerMillion:.8999999999999999}}}]},"openai/gpt-3.5-turbo":{modelName:"openai/gpt-3.5-turbo",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.5,outputPricePerMillion:1.5}}}]},"openai/gpt-3.5-turbo-0125":{modelName:"openai/gpt-3.5-turbo-0125",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:.5,outputPricePerMillion:1.5}}}]},"openai/gpt-4":{modelName:"openai/gpt-4",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:30,outputPricePerMillion:60}}}]},"openai/gpt-4-0314":{modelName:"openai/gpt-4-0314",currency:"USD",tokenRanges:[{minTokens:0,maxTokens:null,prices:{base:{inputPricePerMillion:30,outputPricePerMillion:60}}}]}};var Hn=zod.z.enum([j,_,M,I]),Vn={system:j,user:_,assistant:M,tool:I};var Gn=[T,D,U,q],Kn=zod.z.enum([T,D,U,q]);var Q=zod.z.object({token:zod.z.string(),logprob:zod.z.number(),bytes:zod.z.array(zod.z.number()).nullable()}),Wn=zod.z.object({content:zod.z.array(Q.extend({top_logprobs:zod.z.array(Q)})).nullable(),refusal:zod.z.array(Q.extend({top_logprobs:zod.z.array(Q)})).nullable()}).nullable(),Jn=zod.z.discriminatedUnion("type",[zod.z.object({type:zod.z.literal("reasoning.summary"),summary:zod.z.string(),id:zod.z.string().nullable().optional(),format:zod.z.string().nullable().optional(),index:zod.z.number().optional()}),zod.z.object({type:zod.z.literal("reasoning.encrypted"),data:zod.z.string(),id:zod.z.string().nullable().optional(),format:zod.z.string().nullable().optional(),index:zod.z.number().optional()}),zod.z.object({type:zod.z.literal("reasoning.text"),text:zod.z.string().nullable().optional(),signature:zod.z.string().nullable().optional(),id:zod.z.string().nullable().optional(),format:zod.z.string().nullable().optional(),index:zod.z.number().optional()})]),Xo=zod.z.array(zod.z.object({id:zod.z.string().min(1),type:zod.z.enum(["function"]),function:zod.z.object({name:zod.z.string(),arguments:zod.z.string()})})),Yn=zod.z.object({id:zod.z.string(),object:zod.z.string(),created:zod.z.number(),model:zod.z.string(),system_fingerprint:zod.z.string().nullable().optional(),choices:zod.z.array(zod.z.object({index:zod.z.number(),message:zod.z.object({role:zod.z.string(),content:zod.z.string().nullable().optional(),tool_calls:Xo.optional(),refusal:zod.z.string().nullable().optional(),reasoning:zod.z.string().nullable().optional(),reasoning_details:zod.z.array(Jn).optional()}),logprobs:Wn.optional(),finish_reason:zod.z.string().nullable().optional()})),usage:zod.z.object({prompt_tokens:zod.z.number(),completion_tokens:zod.z.number(),total_tokens:zod.z.number()}).nullable().optional()}),Qo=zod.z.array(zod.z.object({index:zod.z.number().int(),id:zod.z.string().min(1).optional(),type:zod.z.enum(["function"]).optional(),function:zod.z.object({name:zod.z.string().min(1).optional(),arguments:zod.z.string().optional()}).optional()})),Zn=zod.z.object({id:zod.z.string(),object:zod.z.string(),created:zod.z.number(),model:zod.z.string(),system_fingerprint:zod.z.string().nullable().optional(),choices:zod.z.array(zod.z.object({index:zod.z.number(),delta:zod.z.object({role:zod.z.string().optional(),content:zod.z.string().nullable().optional(),tool_calls:Qo.optional(),refusal:zod.z.string().nullable().optional(),reasoning:zod.z.string().nullable().optional(),reasoning_details:zod.z.array(Jn).optional()}).or(zod.z.object({})),logprobs:Wn.optional(),finish_reason:zod.z.string().nullable().optional()})),usage:zod.z.object({prompt_tokens:zod.z.number(),completion_tokens:zod.z.number(),total_tokens:zod.z.number()}).nullable().optional()});var et=zod.z.object({type:zod.z.literal("function"),function:zod.z.object({name:zod.z.string().min(1),description:zod.z.string().min(1).optional(),strict:zod.z.boolean().optional(),parameters:zod.z.any()})}),nt=zod.z.enum(["none","auto","required"]),it=zod.z.object({type:zod.z.literal("function"),function:zod.z.object({name:zod.z.string().min(1)})}),ot=zod.z.object({type:zod.z.enum(["text","json_object"])}).or(zod.z.object({type:zod.z.literal("json_schema"),json_schema:zod.z.object({name:zod.z.string().min(1),description:zod.z.string().min(1).optional(),strict:zod.z.boolean().optional(),schema:zod.z.any()})})),_e=zod.z.object({text:zod.z.string().min(1),type:zod.z.literal("text")}),tt=zod.z.object({type:zod.z.literal("image_url"),image_url:zod.z.object({url:zod.z.string().url().min(1),detail:zod.z.enum(["low","high","auto"]).optional()})}),rt=zod.z.object({id:zod.z.string().min(1),type:zod.z.literal("function"),function:zod.z.object({name:zod.z.string().min(1),arguments:zod.z.string().min(1)})}),at=zod.z.object({role:zod.z.literal("system"),content:zod.z.string().min(1).or(zod.z.array(_e).min(1))}),lt=zod.z.object({role:zod.z.literal("user"),content:zod.z.string().min(1).or(zod.z.array(zod.z.union([_e,tt])).min(1))}),st=zod.z.object({role:zod.z.literal("assistant"),content:zod.z.string().min(1).or(zod.z.array(_e).min(1)).optional(),tool_calls:zod.z.array(rt).min(1).optional()}),mt=zod.z.object({role:zod.z.literal("tool"),tool_call_id:zod.z.string().min(1),content:zod.z.string().min(1)}),ct=zod.z.union([at,lt,st,mt]),Xn=zod.z.object({model:zod.z.string().min(1).optional(),messages:zod.z.array(ct).min(1),frequency_penalty:zod.z.number().min(-2).max(2).nullable().optional(),logprobs:zod.z.boolean().nullable().optional(),top_logprobs:zod.z.number().min(0).max(20).nullable().optional(),max_tokens:zod.z.number().min(0).nullable().optional(),presence_penalty:zod.z.number().min(-2).max(2).nullable().optional(),repetition_penalty:zod.z.number().min(0).max(2).nullable().optional(),response_format:ot.optional(),seed:zod.z.number().nullable().optional(),stop:zod.z.string().or(zod.z.array(zod.z.string()).max(4)).nullable().optional(),top_a:zod.z.number().min(0).max(1).nullable().optional(),temperature:zod.z.number().min(0).max(2).nullable().optional(),top_p:zod.z.number().min(0).max(1).nullable().optional(),top_k:zod.z.number().min(0).max(100).nullable().optional(),min_p:zod.z.number().min(0).max(1).nullable().optional(),tools:zod.z.array(et).optional(),tool_choice:nt.or(it).optional()});var Ee=zod.z.object({modelName:zod.z.string(),apiKey:zod.z.string(),openRouterReferer:zod.z.string().optional(),openRouterTitle:zod.z.string().optional()}),X=class{constructor(n,o){this.version="v1";let t=Ee.parse(o);this.modelSchema=n,this.modelName=t.modelName,this.apiKey=t.apiKey,this.baseUrl=Z(B.baseUrl),this.streamChatUrl=Z(`${this.baseUrl}/chat/completions`),this.completeChatUrl=Z(`${this.baseUrl}/chat/completions`),this.openRouterReferer=t.openRouterReferer,this.openRouterTitle=t.openRouterTitle;}getDefaultBaseUrl(){return this.baseUrl}getDefaultHeaders(){return R(R({Authorization:`Bearer ${this.apiKey}`,"Content-Type":"application/json"},this.openRouterReferer?{"HTTP-Referer":this.openRouterReferer}:{}),this.openRouterTitle?{"X-Title":this.openRouterTitle}:{})}getDefaultParams(){return {model:this.modelName}}getRetryDelay(n,o){let r=0,a=n["retry-after"];if(a){let u=parseInt(a,10);!Number.isNaN(u)&&u>=0&&(r=u*1e3);}return {shouldRetry:true,delayMs:r}}getTokenCount(n){return n.reduce((o,t)=>o+t.content.map(r=>r.modality==="text"?r.value:"").join(" ").length,0)}transformModelRequest(n){let o=Xn.safeParse(n);if(!o.success)throw new J({info:"Invalid model request",cause:o.error});let t=o.data,r=t.model;if(t.tool_choice&&(!t.tools||t.tools.length===0))throw new J({info:`Invalid model request for model : '${this.modelName}'`,cause:new Error("'tools' are required when 'tool_choice' is specified")});let a={};t.response_format&&(a.responseFormat=t.response_format.type,t.response_format.type==="json_schema"&&(a.responseSchema={name:t.response_format.json_schema.name,description:t.response_format.json_schema.description||"",strict:t.response_format.json_schema.strict,schema:t.response_format.json_schema.schema})),t.tool_choice&&(typeof t.tool_choice=="string"?a.toolChoice=t.tool_choice:a.toolChoice=t.tool_choice.function.name),a.seed=t.seed,a.maxTokens=t.max_tokens,a.temperature=t.temperature,a.topA=t.top_a,a.topP=t.top_p,a.minP=t.min_p,a.topK=t.top_k,a.repetitionPenalty=t.repetition_penalty,a.presencePenalty=t.presence_penalty,a.frequencyPenalty=t.frequency_penalty,a.stop=t.stop,a.logProbs=t.logprobs,a.topLogProbs=t.top_logprobs;let u=an().parse($n(a)),m=[],p={};t.messages.forEach(P=>{let d=P.role;switch(d){case "system":{let g=P.content;if(typeof g=="string")m.push({role:d,content:[{modality:T,value:g}]});else {let y=g.map(h=>({modality:T,value:h.text}));m.push({role:d,content:y});}}break;case "user":{let g=P.content;if(typeof g=="string")m.push({role:d,content:[{modality:T,value:g}]});else {let y=g.map(h=>h.type==="text"?{modality:T,value:h.text}:h.image_url.url.startsWith("data:")?{modality:D,detail:h.image_url.detail||"auto",value:{type:te,base64:h.image_url.url,mediaType:Bn(h.image_url.url)}}:{modality:D,detail:h.image_url.detail||"auto",value:{type:re,url:h.image_url.url}});m.push({role:d,content:y});}}break;case "assistant":{let g=[];if(!P.content&&!P.tool_calls)throw new J({info:`Invalid model request for model : '${this.modelName}'`,cause:new Error("one of'content' or 'tool_calls' must be provided")});if(P.content){let y=P.content;typeof y=="string"?g.push({modality:T,value:y}):y.forEach(h=>{g.push({modality:T,value:h.text});});}P.tool_calls&&P.tool_calls.forEach((h,C)=>{let w={modality:U,id:h.id,index:C,name:h.function.name,arguments:h.function.arguments};g.push(w),p[w.id]=w;}),m.push({role:d,content:g});}break;case "tool":{let g=P;m.push({role:d,content:[{modality:q,id:g.tool_call_id,index:p[g.tool_call_id].index,name:p[g.tool_call_id].name,data:g.content}]});}break}});let k=[];return t.tools&&t.tools.forEach(P=>{k.push({type:"function",definition:{schema:{name:P.function.name,description:P.function.description||"",strict:P.function.strict,parameters:P.function.parameters}}});}),{modelName:r,config:u,messages:m,tools:k.length>0?k:void 0}}transformConfig(n,o,t){let r=n.toolChoice;delete n.toolChoice;let a=this.modelSchema.config.schema.safeParse(n);if(!a.success)throw new E({info:`Invalid config for model : '${this.modelName}'`,cause:a.error});let u=a.data;r!==void 0&&(u.toolChoice=r),Object.keys(u).forEach(p=>{if(!(p in this.modelSchema.config.def))throw new E({info:`Invalid config for model : '${this.modelName}'`,cause:new Error(`Invalid config key : '${p}',
7
+ available keys : [${Object.keys(this.modelSchema.config.def).join(", ")}]`)})});let m=Object.keys(u).reduce((p,k)=>{let P=this.modelSchema.config.def[k],d=P.param,g=u[k];return d==="max_tokens"&&P.type==="range"&&g===0?p[d]=P.max:p[d]=g,p},{});if(m.top_logprobs&&!m.logprobs)throw new E({info:`Invalid config for model : '${this.modelName}'`,cause:new Error("'logprobs' must be 'true' when 'top_logprobs' is specified")});if("tool_choice"in m&&m.tool_choice!==void 0){let p=m.tool_choice;if(!t||t&&t.length===0)throw new E({info:`Invalid config for model : '${this.modelName}'`,cause:new Error("'tools' are required when 'toolChoice' is specified")});if(t&&t.length>0){let k=this.modelSchema.config.def.toolChoice;if(!k.choices.includes(p))if(t.map(P=>P.definition.schema.name).includes(p))m.tool_choice={type:"function",function:{name:p}};else throw new E({info:`Invalid config for model : '${this.modelName}'`,cause:new Error(`toolChoice : '${p}' is not part of provided 'tools' names or
8
+ one of [${k.choices.join(", ")}]`)})}}if("response_format"in m&&m.response_format!==void 0){let p=m.response_format;if(p==="json_schema")if("response_schema"in m)m.response_format={type:"json_schema",json_schema:m.response_schema},delete m.response_schema;else throw new E({info:`Invalid config for model : '${this.modelName}'`,cause:new Error("'responseSchema' is required in config when 'responseFormat' is 'json_schema'")});else m.response_format={type:p};}return m}transformMessages(n){if(!n||n&&n.length===0)return {messages:[]};let o=n.map(r=>{let a=ue().safeParse(r);if(!a.success)throw new S({info:"Invalid messages",cause:a.error});return a.data});return o.forEach(r=>{r.content.forEach(a=>{if(!this.modelSchema.modalities.includes(a.modality))throw new S({info:`Invalid message content for model : '${this.modelName}'`,cause:new Error(`model : '${this.modelName}' does not support modality : '${a.modality}',
9
9
  available modalities : [${this.modelSchema.modalities.join(", ")}]`)})});}),o.forEach(r=>{if(!Object.keys(this.modelSchema.roles).includes(r.role))throw new S({info:`Invalid message content for model : '${this.modelName}'`,cause:new Error(`model : '${this.modelName}' does not support role : '${r.role}',
10
- available roles : [${Object.keys(this.modelSchema.roles).join(", ")}]`)})}),o.forEach(r=>{r.content=r.content.filter(a=>a.modality!=="error"&&a.modality!=="search-result");}),{messages:o.map(r=>{switch(r.role){case _:{let a=[];return r.content.forEach(u=>{if(u.modality===T)a.push({type:"text",text:u.value});else throw new S({info:`Invalid message 'role' and 'modality' combination for model : ${this.modelName}`,cause:new Error(`role : '${r.role}' cannot have content with modality : '${u.modality}'`)})}),{role:this.modelSchema.roles[r.role],content:a}}case M:{let a=[],u=[];return r.content.forEach(m=>{if(m.modality===T)a.push({type:"text",text:m.value});else if(m.modality===U)u.push({id:m.id,type:"function",function:{name:m.name,arguments:m.arguments}});else throw new S({info:`Invalid message 'role' and 'modality' combination for model : ${this.modelName}`,cause:new Error(`role : '${r.role}' cannot have content with modality : '${m.modality}'`)})}),R(R({role:this.modelSchema.roles[r.role]},a.length>0?{content:a}:{}),u.length>0?{tool_calls:u}:{})}case j:{let a=[],u=[];r.content.forEach(p=>{if(p.modality===T)a.push({type:"text",text:p.value});else if(p.modality===D)u.push({type:"image_url",image_url:{url:p.value.type==="url"?p.value.url:p.value.base64,detail:p.detail}});else throw new S({info:`Invalid message 'role' and 'modality' combination for model : ${this.modelName}`,cause:new Error(`role : '${r.role}' cannot have content with modality : '${p.modality}'`)})});let m=[...a,...u];return {role:this.modelSchema.roles[r.role],content:m}}case I:{if(r.content.length!==1)throw new S({info:`Invalid message for role : '${r.role}'`,cause:new Error(`role : '${r.role}' must have exactly one content item`)});if(r.content[0].modality!==q)throw new S({info:`Invalid message 'role' and 'modality' combination for model : ${this.modelName}`,cause:new Error(`role : '${r.role}' must have content with modality : '${q}'`)});let a=r.content[0];return {role:this.modelSchema.roles[r.role],tool_call_id:a.id,content:a.data}}default:throw new S({info:`Invalid message 'role' for model : ${this.modelName}`,cause:new Error(`role : '${r.role}' is not supported,
11
- available roles : [${Object.keys(this.modelSchema.roles).join(", ")}]`)})}})}}transformTools(n){if(!this.modelSchema.modalities.includes(U))throw new ge({info:`Invalid tool 'modality' for model : ${this.modelName}`,cause:new Error(`model : '${this.modelName}' does not support tool modality : '${U}'`)});return !n||n&&n.length===0?{tools:[]}:{tools:n.map(r=>{let a=sn().safeParse(r);if(!a.success)throw new ge({info:"Invalid tools",cause:a.error});return a.data}).map(r=>({type:"function",function:r.definition.schema}))}}getCompleteChatUrl(n,o,t){return N(this,null,function*(){return new Promise(r=>{r(this.completeChatUrl);})})}getCompleteChatHeaders(n,o,t){return N(this,null,function*(){return new Promise(r=>{r(this.getDefaultHeaders());})})}getCompleteChatData(n,o,t){return N(this,null,function*(){let r=this.transformConfig(n,o,t),a=this.transformMessages(o);if(a.messages&&a.messages.length===0)throw new S({info:"Messages are required",cause:new Error("Messages are required")});let u=t?this.transformTools(t):{};return new Promise(m=>{m(R(R(R(R({},this.getDefaultParams()),r),a),u));})})}transformCompleteChatResponse(n){var t,r;let o=Jn.safeParse(n);if(o.success){if(o.data.choices.length===0)throw new L({info:"Invalid response from model",cause:new Error(`No choices in response : ${JSON.stringify(o.data)}`)});let a=o.data,u=[{role:M,content:[]}],m=a.choices[0].message;if(m.reasoning_details&&m.reasoning_details.length>0)for(let d of m.reasoning_details)d.type==="reasoning.summary"?u[0].content.push(K(d.summary,"")):d.type==="reasoning.encrypted"?u[0].content.push(un(d.data)):d.type==="reasoning.text"&&u[0].content.push(K((t=d.text)!=null?t:"",(r=d.signature)!=null?r:""));else m.reasoning&&u[0].content.push(K(m.reasoning,""));m.content&&u[0].content.push(pe(m.content)),m.refusal&&u[0].content.push(pe(m.refusal)),m.tool_calls&&m.tool_calls.forEach((d,g)=>{u[0].content.push(mn(g,d.id,d.function.name,d.function.arguments));});let p;a.usage&&(p={promptTokens:a.usage.prompt_tokens,completionTokens:a.usage.completion_tokens,totalTokens:a.usage.total_tokens});let k=[],P=a.choices[0].logprobs;return P&&(P.content&&k.push(...P.content.map(d=>({token:d.token,logProb:d.logprob,bytes:d.bytes,topLogProbs:d.top_logprobs.map(g=>({token:g.token,logProb:g.logprob,bytes:g.bytes}))}))),P.refusal&&k.push(...P.refusal.map(d=>({token:d.token,logProb:d.logprob,bytes:d.bytes,topLogProbs:d.top_logprobs.map(g=>({token:g.token,logProb:g.logprob,bytes:g.bytes}))})))),{messages:u,usage:p,logProbs:k}}throw new L({info:"Invalid response from model",cause:o.error})}getStreamChatUrl(n,o,t){return N(this,null,function*(){return new Promise(r=>{r(this.streamChatUrl);})})}getStreamChatHeaders(n,o,t){return N(this,null,function*(){return new Promise(r=>{r(this.getDefaultHeaders());})})}getStreamChatData(n,o,t){return N(this,null,function*(){let r=this.transformConfig(n,o,t),a=this.transformMessages(o);if(a.messages&&a.messages.length===0)throw new S({info:"Messages are required",cause:new Error("Messages are required")});let u=t?this.transformTools(t):{};return new Promise(m=>{m(R(R(R(R({stream:true,stream_options:{include_usage:true}},this.getDefaultParams()),r),a),u));})})}transformStreamChatResponseChunk(n,o){return ee(this,null,function*(){var m,p,k,P;let t=o+n,r=[],a="",u=0;for(;u<t.length;){let d=t.indexOf(`
12
- `,u);if(d===-1){a=t.substring(u);break}else {let g=t.substring(u,d).trim();g&&r.push(g),u=d+1;}}for(let d of r){if(d==="data: [DONE]")return;if(d.startsWith("data: ")){let g=d.substring(6);try{let y=JSON.parse(g),h=Zn.safeParse(y);if(h.success){let C={partialMessages:[]},w=h.data;if(w.choices.length>0){let f=w.choices[0].delta;if(f!==void 0&&Object.keys(f).length!==0){if("reasoning_details"in f&&f.reasoning_details!==void 0&&f.reasoning_details.length>0)for(let x of f.reasoning_details)x.type==="reasoning.summary"?C.partialMessages.push(W(M,x.summary)):x.type==="reasoning.encrypted"?C.partialMessages.push(pn(M,x.data)):x.type==="reasoning.text"&&C.partialMessages.push(W(M,(m=x.text)!=null?m:void 0,(p=x.signature)!=null?p:void 0));else "reasoning"in f&&f.reasoning&&C.partialMessages.push(W(M,f.reasoning));if("content"in f&&f.content!==null&&f.content!==void 0&&f.content!=="")C.partialMessages.push(de(M,f.content));else if("refusal"in f&&f.refusal!==null)C.partialMessages.push(de(M,f.refusal));else if("tool_calls"in f&&f.tool_calls!==void 0){let x=f.tool_calls.at(0);C.partialMessages.push(cn(M,x.index,x.id,(k=x.function)==null?void 0:k.name,(P=x.function)==null?void 0:P.arguments));}}}w.usage&&(C.usage={promptTokens:w.usage.prompt_tokens,completionTokens:w.usage.completion_tokens,totalTokens:w.usage.total_tokens}),yield {partialResponse:C,buffer:a};}else throw new L({info:"Invalid response from model",cause:h.error})}catch(y){throw new L({info:`Malformed JSON received in stream: ${g}`,cause:y})}}}yield {partialResponse:{partialMessages:[]},buffer:a};})}transformProxyStreamChatResponseChunk(n,o,t,r,a){return ee(this,null,function*(){yield*Ae(this.transformStreamChatResponseChunk(n,o));})}getProxyStreamChatUrl(n,o,t){return N(this,null,function*(){return new Promise(r=>{r(this.streamChatUrl);})})}getProxyCompleteChatUrl(n,o,t){return N(this,null,function*(){return new Promise(r=>{r(this.completeChatUrl);})})}getProxyCompleteChatHeaders(n,o,t){return N(this,null,function*(){if(!o)return {};let r=R({},o);return delete r.host,delete r["content-length"],r})}getProxyStreamChatHeaders(n,o,t){return N(this,null,function*(){return yield this.getProxyCompleteChatHeaders(n,o,t)})}getModelPricing(){if(!(this.modelName in _e))throw new L({info:`Invalid model pricing for model : '${this.modelName}'`,cause:new Error(`No pricing configuration found for model "${this.modelName}"`)});return _e[this.modelName]}};var Ee=Ln(zn,Vn).parse({name:"__base__",description:"Base chat model for Open Router",maxInputTokens:128e3,maxOutputTokens:128e3,roles:Hn,modalities:Gn,config:{def:qe.base(128e3,4).def,schema:qe.base(128e3,4).schema}});
10
+ available roles : [${Object.keys(this.modelSchema.roles).join(", ")}]`)})}),o.forEach(r=>{r.content=r.content.filter(a=>a.modality!=="error"&&a.modality!=="search-result");}),{messages:o.map(r=>{switch(r.role){case j:{let a=[];return r.content.forEach(u=>{if(u.modality===T)a.push({type:"text",text:u.value});else throw new S({info:`Invalid message 'role' and 'modality' combination for model : ${this.modelName}`,cause:new Error(`role : '${r.role}' cannot have content with modality : '${u.modality}'`)})}),{role:this.modelSchema.roles[r.role],content:a}}case M:{let a=[],u=[];return r.content.forEach(m=>{if(m.modality===T)a.push({type:"text",text:m.value});else if(m.modality===U)u.push({id:m.id,type:"function",function:{name:m.name,arguments:m.arguments}});else throw new S({info:`Invalid message 'role' and 'modality' combination for model : ${this.modelName}`,cause:new Error(`role : '${r.role}' cannot have content with modality : '${m.modality}'`)})}),R(R({role:this.modelSchema.roles[r.role]},a.length>0?{content:a}:{}),u.length>0?{tool_calls:u}:{})}case _:{let a=[],u=[];r.content.forEach(p=>{if(p.modality===T)a.push({type:"text",text:p.value});else if(p.modality===D)u.push({type:"image_url",image_url:{url:p.value.type==="url"?p.value.url:p.value.base64,detail:p.detail}});else throw new S({info:`Invalid message 'role' and 'modality' combination for model : ${this.modelName}`,cause:new Error(`role : '${r.role}' cannot have content with modality : '${p.modality}'`)})});let m=[...a,...u];return {role:this.modelSchema.roles[r.role],content:m}}case I:{if(r.content.length!==1)throw new S({info:`Invalid message for role : '${r.role}'`,cause:new Error(`role : '${r.role}' must have exactly one content item`)});if(r.content[0].modality!==q)throw new S({info:`Invalid message 'role' and 'modality' combination for model : ${this.modelName}`,cause:new Error(`role : '${r.role}' must have content with modality : '${q}'`)});let a=r.content[0];return {role:this.modelSchema.roles[r.role],tool_call_id:a.id,content:a.data}}default:throw new S({info:`Invalid message 'role' for model : ${this.modelName}`,cause:new Error(`role : '${r.role}' is not supported,
11
+ available roles : [${Object.keys(this.modelSchema.roles).join(", ")}]`)})}})}}transformTools(n){if(!this.modelSchema.modalities.includes(U))throw new ge({info:`Invalid tool 'modality' for model : ${this.modelName}`,cause:new Error(`model : '${this.modelName}' does not support tool modality : '${U}'`)});return !n||n&&n.length===0?{tools:[]}:{tools:n.map(r=>{let a=mn().safeParse(r);if(!a.success)throw new ge({info:"Invalid tools",cause:a.error});return a.data}).map(r=>({type:"function",function:r.definition.schema}))}}getCompleteChatUrl(n,o,t){return N(this,null,function*(){return new Promise(r=>{r(this.completeChatUrl);})})}getCompleteChatHeaders(n,o,t){return N(this,null,function*(){return new Promise(r=>{r(this.getDefaultHeaders());})})}getCompleteChatData(n,o,t){return N(this,null,function*(){let r=this.transformConfig(n,o,t),a=this.transformMessages(o);if(a.messages&&a.messages.length===0)throw new S({info:"Messages are required",cause:new Error("Messages are required")});let u=t?this.transformTools(t):{};return new Promise(m=>{m(R(R(R(R({},this.getDefaultParams()),r),a),u));})})}transformCompleteChatResponse(n){var t,r;let o=Yn.safeParse(n);if(o.success){if(o.data.choices.length===0)throw new L({info:"Invalid response from model",cause:new Error(`No choices in response : ${JSON.stringify(o.data)}`)});let a=o.data,u=[{role:M,content:[]}],m=a.choices[0].message;if(m.reasoning_details&&m.reasoning_details.length>0)for(let d of m.reasoning_details)d.type==="reasoning.summary"?u[0].content.push(K(d.summary,"")):d.type==="reasoning.encrypted"?u[0].content.push(pn(d.data)):d.type==="reasoning.text"&&u[0].content.push(K((t=d.text)!=null?t:"",(r=d.signature)!=null?r:""));else m.reasoning&&u[0].content.push(K(m.reasoning,""));m.content&&u[0].content.push(pe(m.content)),m.refusal&&u[0].content.push(pe(m.refusal)),m.tool_calls&&m.tool_calls.forEach((d,g)=>{u[0].content.push(cn(g,d.id,d.function.name,d.function.arguments));});let p;a.usage&&(p={promptTokens:a.usage.prompt_tokens,completionTokens:a.usage.completion_tokens,totalTokens:a.usage.total_tokens});let k=[],P=a.choices[0].logprobs;return P&&(P.content&&k.push(...P.content.map(d=>({token:d.token,logProb:d.logprob,bytes:d.bytes,topLogProbs:d.top_logprobs.map(g=>({token:g.token,logProb:g.logprob,bytes:g.bytes}))}))),P.refusal&&k.push(...P.refusal.map(d=>({token:d.token,logProb:d.logprob,bytes:d.bytes,topLogProbs:d.top_logprobs.map(g=>({token:g.token,logProb:g.logprob,bytes:g.bytes}))})))),{messages:u,usage:p,logProbs:k}}throw new L({info:"Invalid response from model",cause:o.error})}getStreamChatUrl(n,o,t){return N(this,null,function*(){return new Promise(r=>{r(this.streamChatUrl);})})}getStreamChatHeaders(n,o,t){return N(this,null,function*(){return new Promise(r=>{r(this.getDefaultHeaders());})})}getStreamChatData(n,o,t){return N(this,null,function*(){let r=this.transformConfig(n,o,t),a=this.transformMessages(o);if(a.messages&&a.messages.length===0)throw new S({info:"Messages are required",cause:new Error("Messages are required")});let u=t?this.transformTools(t):{};return new Promise(m=>{m(R(R(R(R({stream:true,stream_options:{include_usage:true}},this.getDefaultParams()),r),a),u));})})}transformStreamChatResponseChunk(n,o){return ee(this,null,function*(){var m,p,k,P;let t=o+n,r=[],a="",u=0;for(;u<t.length;){let d=t.indexOf(`
12
+ `,u);if(d===-1){a=t.substring(u);break}else {let g=t.substring(u,d).trim();g&&r.push(g),u=d+1;}}for(let d of r){if(d==="data: [DONE]")return;if(d.startsWith("data: ")){let g=d.substring(6);try{let y=JSON.parse(g),h=Zn.safeParse(y);if(h.success){let C={partialMessages:[]},w=h.data;if(w.choices.length>0){let f=w.choices[0].delta;if(f!==void 0&&Object.keys(f).length!==0){if("reasoning_details"in f&&f.reasoning_details!==void 0&&f.reasoning_details.length>0)for(let x of f.reasoning_details)x.type==="reasoning.summary"?C.partialMessages.push(W(M,x.summary)):x.type==="reasoning.encrypted"?C.partialMessages.push(dn(M,x.data)):x.type==="reasoning.text"&&C.partialMessages.push(W(M,(m=x.text)!=null?m:void 0,(p=x.signature)!=null?p:void 0));else "reasoning"in f&&f.reasoning&&C.partialMessages.push(W(M,f.reasoning));if("content"in f&&f.content!==null&&f.content!==void 0&&f.content!=="")C.partialMessages.push(de(M,f.content));else if("refusal"in f&&f.refusal!==null)C.partialMessages.push(de(M,f.refusal));else if("tool_calls"in f&&f.tool_calls!==void 0){let x=f.tool_calls.at(0);C.partialMessages.push(un(M,x.index,x.id,(k=x.function)==null?void 0:k.name,(P=x.function)==null?void 0:P.arguments));}}}w.usage&&(C.usage={promptTokens:w.usage.prompt_tokens,completionTokens:w.usage.completion_tokens,totalTokens:w.usage.total_tokens}),yield {partialResponse:C,buffer:a};}else throw new L({info:"Invalid response from model",cause:h.error})}catch(y){throw new L({info:`Malformed JSON received in stream: ${g}`,cause:y})}}}yield {partialResponse:{partialMessages:[]},buffer:a};})}transformProxyStreamChatResponseChunk(n,o,t,r,a){return ee(this,null,function*(){yield*$e(this.transformStreamChatResponseChunk(n,o));})}getProxyStreamChatUrl(n,o,t){return N(this,null,function*(){return new Promise(r=>{r(this.streamChatUrl);})})}getProxyCompleteChatUrl(n,o,t){return N(this,null,function*(){return new Promise(r=>{r(this.completeChatUrl);})})}getProxyCompleteChatHeaders(n,o,t){return N(this,null,function*(){if(!o)return {};let r=R({},o);return delete r.host,delete r["content-length"],r})}getProxyStreamChatHeaders(n,o,t){return N(this,null,function*(){return yield this.getProxyCompleteChatHeaders(n,o,t)})}getModelPricing(){if(!(this.modelName in je))throw new L({info:`Invalid model pricing for model : '${this.modelName}'`,cause:new Error(`No pricing configuration found for model "${this.modelName}"`)});return je[this.modelName]}};var Oe=An(Hn,Kn).parse({name:"__base__",description:"Base chat model for Open Router",maxInputTokens:128e3,maxOutputTokens:128e3,roles:Vn,modalities:Gn,config:{def:qe.base(128e3,4).def,schema:qe.base(128e3,4).schema}});
13
13
 
14
- exports.BaseChatModel = Q;
15
- exports.BaseChatModelOptions = Oe;
16
- exports.BaseChatModelSchema = Ee;
14
+ exports.BaseChatModel = X;
15
+ exports.BaseChatModelOptions = Ee;
16
+ exports.BaseChatModelSchema = Oe;
17
17
  exports.ChatModelBaseConfigDef = Fn;
18
- exports.ChatModelBaseConfigSchema = Bn;
18
+ exports.ChatModelBaseConfigSchema = zn;
19
19
  exports.OpenRouter = B;
20
20
  exports.OpenRouterChatModelConfigs = qe;
21
21
  exports.frequencyPenalty = xe;
22
22
  exports.logProbs = Ce;
23
23
  exports.maxTokens = Te;
24
- exports.minP = qt;
24
+ exports.minP = jt;
25
25
  exports.presencePenalty = Se;
26
- exports.repetitionPenalty = Et;
27
- exports.responseFormat = Ot;
26
+ exports.repetitionPenalty = _t;
27
+ exports.responseFormat = It;
28
28
  exports.responseFormatWithSchema = we;
29
29
  exports.responseSchema = De;
30
30
  exports.seed = ve;
31
31
  exports.stop = Me;
32
32
  exports.temperature = fe;
33
33
  exports.toolChoice = Ue;
34
- exports.topA = wt;
35
- exports.topK = Dt;
34
+ exports.topA = Ot;
35
+ exports.topK = Et;
36
36
  exports.topLogProbs = Ne;
37
37
  exports.topP = Re;
38
38
  //# sourceMappingURL=index.js.map