!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a09dc9-fdaf-73d2-b562-c7a9e5c67eed")}catch(e){}}();(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,581603,e=>{"use strict";e.i(204067);var t=e.i(796805);let n={TextGeneration:"text_generation",ImageGeneration:"image_generation",VideoGeneration:"video_generation",Embeddings:"embeddings",Rerank:"rerank",TTS:"tts",STT:"stt",Unknown:"unknown"};t.z.enum([n.TextGeneration,n.ImageGeneration,n.VideoGeneration,n.Embeddings,n.Rerank,n.TTS,n.STT,n.Unknown]),n.TextGeneration,e.s(["PerfWorkload",0,n])},826117,e=>{"use strict";e.i(723157);var t=e.i(611784),n=e.i(687421);e.i(200222),e.i(722343);var r=e.i(217631);function i(e,t){return Object.entries(e).filter(([e,n])=>!0===n[t]).map(([e])=>e).filter(e=>(0,r.isMember)(e,n.ProviderName))}e.i(204067),e.i(984378),e.s(["getUserSettings",0,(e,n)=>{if(!e)return{shouldDisablePaidModelTraining:!0,shouldDisableLogging:!0,shouldDisableFreeModelTraining:!1,shouldDisableFreeModelPublication:!1,shouldEnforceZDR:!1,shouldEnforceZdrAnthropic:!1,shouldEnforceZdrOpenAI:!1,shouldEnforceZdrGoogle:!1,shouldEnforceZdrXai:!1,shouldEnforceZdrOther:!1,ignoredProviders:[],allowedProviders:[],defaultProviderSort:null,shouldLockPrivacySettings:!1};let o=e.provider_settings||{},a=i(o,"ignored"),l=i(o,"allowed"),{enable_training:s,enforce_zdr:d,enforce_zdr_anthropic:c,enforce_zdr_openai:u,enforce_zdr_google:p,enforce_zdr_xai:g,enforce_zdr_other:m,default_provider_sort:f,enable_free_model_training:b,enable_free_model_publication:h,lock_privacy_settings:_}=e,y=void 0!==n?n.default_provider_sort:f,E=!(e.is_workspace_data_discount_logging_allowed&&n?.is_data_discount_logging_enabled);return{shouldDisablePaidModelTraining:!1===s||null===s&&E,shouldDisableLogging:E,shouldDisableFreeModelTraining:!1===b,shouldDisableFreeModelPublication:!1===h,shouldEnforceZDR:d,shouldEnforceZdrAnthropic:c,shouldEnforceZdrOpenAI:u,shouldEnforceZdrGoogle:p,shouldEnforceZdrXai:g,shouldEnforceZdrOther:m,ignoredProviders:a,allowedProviders:l,defaultProviderSort:(0,r.isMember)(y,t.ProviderSort)?y:null,shouldLockPrivacySettings:_}}])},407359,e=>{"use strict";var t,n=((t={})[t.Default=0]="Default",t[t.Deprioritized=-1]="Deprioritized",t[t.DegradedPerformance=-2]="DegradedPerformance",t[t.Deranked=-3]="Deranked",t[t.Down=-5]="Down",t[t.Disabled=-10]="Disabled",t);e.s(["EndpointStatus",()=>n])},264552,e=>{"use strict";var t=e.i(581603);let n={[t.PerfWorkload.TextGeneration]:"Time to first token, measured from when the request is sent. Data from the last 30 minutes.",[t.PerfWorkload.ImageGeneration]:"Time to generate the image, measured from when the request is sent until the image is returned. Data from the last 30 minutes.",[t.PerfWorkload.VideoGeneration]:"Time to generate the video, measured from when the job is submitted until the video is ready. Data from the last 30 minutes.",[t.PerfWorkload.Embeddings]:"Time to return the embeddings, measured from when the request is sent until the full response arrives. Data from the last 30 minutes.",[t.PerfWorkload.Rerank]:"Time to return the ranked results, measured from when the request is sent until the full response arrives. Data from the last 30 minutes.",[t.PerfWorkload.TTS]:"Time to return the generated audio, measured from when the request is sent until the full response arrives. Data from the last 30 minutes.",[t.PerfWorkload.STT]:"Time to return the transcript, measured from when the request is sent until the full response arrives. Data from the last 30 minutes.",[t.PerfWorkload.Unknown]:"Time to complete the request, measured from when the request is sent. Data from the last 30 minutes."};e.s(["PERFORMANCE_CHART_LABELS",0,{LATENCY:"Time to First Token",E2E_LATENCY:"Time to Last Token"},"PERFORMANCE_TOOLTIPS",0,{LATENCY:"Median time to first token, measured from when the request is sent. Data from the last 30 minutes.",THROUGHPUT:"Avg. output tokens/sec, measured from request start to completion. Includes reasoning tokens. Data from the last 30 minutes.",E2E_LATENCY:"Median time to end of response, measured from when the request is sent. Data from the last 30 minutes.",LATENCY_CHART:"Median time to first token, measured from when the request is sent. Data aggregated over one full day.",THROUGHPUT_CHART:"Avg. output tokens/sec, measured from request start to completion. Includes reasoning tokens. Data aggregated over one full day.",E2E_LATENCY_CHART:"Median time to end of response, measured from when the request is sent. Data aggregated over one full day.",CACHE_HIT_RATE_CHART:"Percentage of prompt tokens served from cache. Higher values mean more cache reuse and lower costs. Data aggregated over one full day."},"PROVIDER_LATENCY_TOOLTIP_BY_WORKLOAD",0,n])},366224,234168,e=>{"use strict";var t=e.i(321019),n=e.i(81174),r=e.i(204067),i=e.i(796805);let o={Person:"PERSON",Location:"LOCATION"};Object.values(o);let a=i.z.enum([o.Person,o.Location]),l={Redact:"redact",Block:"block",Flag:"flag"};i.z.object({entity_type:a,action:i.z.enum([l.Redact,l.Block,l.Flag]),score_threshold:i.z.number().min(0).max(1).optional().default(.5)}),e.s(["PiiFilterAction",0,l],234168);var s=e.i(693697);let d=[`sk-or-v1-${"a".repeat(64)}`,`ghp_${"A".repeat(36)}`,"-----BEGIN RSA PRIVATE KEY-----\nAAAA\n-----END RSA PRIVATE KEY-----"],c="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}",u={email:{patterns:[{pattern:c}],label:"Email address",description:"Matches standard email addresses (e.g. user@example.com).",examples:["user@example.com","name+tag@domain.co"]},phone:{patterns:[{pattern:"\\b\\d{3}[-.\\s]?\\d{3}[-.\\s]?\\d{4}\\b"}],label:"Phone number",description:"Matches 10-digit US-style phone numbers with optional separators (dashes, dots, or spaces).",examples:["9143094996","914-309-4996","914.309.4996"]},ssn:{patterns:[{pattern:"\\b\\d{3}-\\d{2}-\\d{4}\\b"}],label:"Social Security number",description:"Matches US Social Security numbers in XXX-XX-XXXX format.",examples:["123-45-6789"]},"credit-card":{patterns:[{pattern:"\\b(?:\\d{4} \\d{4} \\d{4} \\d{4}|\\d{4}-\\d{4}-\\d{4}-\\d{4})\\b"}],label:"Credit card number",description:"Matches 16-digit card numbers separated by spaces or dashes (4 groups of 4 digits).",examples:["4265 5256 0839 8752","4265-5256-0839-8752"]},"ip-address":{patterns:[{pattern:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\b"}],label:"IP address",description:"Matches IPv4 addresses in dotted-quad notation.",examples:["192.168.0.1","10.0.0.1"]},secrets:{patterns:[{id:"aws-access-key-id",pattern:"\\b(?:AKIA|ASIA|ABIA|ACCA|A3T[A-Z0-9])[A-Z0-9]{16}\\b"},{id:"github-token",pattern:"\\bgh[pousr]_[A-Za-z0-9]{36,}"},{id:"github-fine-grained-pat",pattern:"\\bgithub_pat_[A-Za-z0-9_]{82,}"},{id:"gitlab-personal-access-token",pattern:"\\bglpat-[A-Za-z0-9_-]{20,}"},{id:"openai-api-key",pattern:"\\bsk-(?:proj|svcacct|admin)-[A-Za-z0-9_-]{20,200}T3BlbkFJ[A-Za-z0-9_-]{20,}"},{id:"openai-legacy-api-key",pattern:"\\bsk-[A-Za-z0-9]{20}T3BlbkFJ[A-Za-z0-9]{20,}"},{id:"anthropic-api-key",pattern:"\\bsk-ant-(?:api03|admin01)-[A-Za-z0-9_-]{93,}AA"},{id:"openrouter-api-key",pattern:"\\bsk-or-v1-[0-9a-f]{64}\\b"},{id:"google-api-key",pattern:"\\bAIza[A-Za-z0-9_-]{35,}"},{id:"google-oauth-client-secret",pattern:"\\bGOCSPX-[A-Za-z0-9_-]{28,}"},{id:"stripe-secret-key",pattern:"\\b(?:sk|rk)_(?:live|test)_[A-Za-z0-9]{20,}"},{id:"slack-token",pattern:"\\bxox[bpos]-[0-9]{6,}-[A-Za-z0-9-]{10,}"},{id:"slack-legacy-workspace-token",pattern:"\\bxox[ar]-(?:[0-9]-)?[0-9a-zA-Z]{8,}"},{id:"slack-app-token",pattern:"\\bxapp-[0-9]-[A-Z0-9]+-[0-9]+-[a-f0-9]{16,}"},{id:"slack-webhook-url",pattern:"https://hooks\\.slack\\.com/(?:services|workflows|triggers)/[A-Za-z0-9+/]{40,}"},{id:"npm-access-token",pattern:"\\bnpm_[A-Za-z0-9]{36,}"},{id:"sendgrid-api-key",pattern:"\\bSG\\.[A-Za-z0-9_-]{20,}\\.[A-Za-z0-9_-]{40,}"},{id:"huggingface-access-token",pattern:"\\bhf_[A-Za-z0-9]{34,}"},{id:"databricks-api-token",pattern:"\\bdapi[0-9a-f]{32}(?:-[0-9])?\\b"},{id:"atlassian-api-token",pattern:"\\bATATT3[A-Za-z0-9_=-]{100,}"},{id:"doppler-token",pattern:"\\bdp\\.(?:pt|st|ct|sa|scim|audit)\\.[A-Za-z0-9]{40,}"},{id:"linear-api-key",pattern:"\\blin_api_[A-Za-z0-9]{40,}"},{id:"shopify-access-token",pattern:"\\bshp(?:at|ca|pa|ss)_[0-9a-fA-F]{32}\\b"},{id:"telegram-bot-token",pattern:"\\b[0-9]{8,10}:AA[A-Za-z0-9_-]{32,}"},{id:"age-secret-key",pattern:"\\bAGE-SECRET-KEY-1[0-9A-Z]{58}\\b"},{id:"json-web-token",pattern:"\\beyJ[A-Za-z0-9_-]{10,}\\.eyJ[A-Za-z0-9_-]{10,}\\.[A-Za-z0-9_-]{10,}"},{id:"bitcoin-wif-uncompressed",pattern:"\\b5[HJK][1-9A-HJ-NP-Za-km-z]{49}\\b"},{id:"bitcoin-wif-compressed",pattern:"\\b[KL][1-9A-HJ-NP-Za-km-z]{51}\\b"},{id:"bitcoin-extended-private-key",pattern:"\\b[xyzYZtuvUV]prv[1-9A-HJ-NP-Za-km-z]{107}\\b"},{id:"ethereum-private-key",pattern:"\\b0x[0-9a-fA-F]{64}\\b"},{id:"private-key-block",pattern:"-----BEGIN [A-Z ]{0,20}PRIVATE KEY(?: BLOCK)?-----\\s(?:-{0,4}[^-]){0,32768}?-----END [A-Z ]{0,20}PRIVATE KEY(?: BLOCK)?-----"},{id:"pypi-upload-token",pattern:"\\bpypi-AgEIcHlwaS5vcmc[A-Za-z0-9_-]{50,}"},{id:"digitalocean-token",pattern:"\\bdo[oprs]_v1_[a-f0-9]{64}\\b"}].map(({id:e,pattern:t})=>({pattern:t,detail:e})),label:"API keys and secrets",description:"Matches well-known provider-prefixed API keys and secret formats curated for low false-positive rates.",examples:d,docsUrl:"https://openrouter.ai/docs/guides/features/guardrails/secret-formats"}},p={"person-name":"PERSON",address:"LOCATION"},g=new Set(["regex-prompt-injection"]);e.s(["EMAIL_CONTENT_FILTER_BUILTIN_PATTERN",0,c,"expandBuiltinsToContentFilters",0,function(e){return e.flatMap(e=>{if(g.has(e.slug)||p[e.slug])return[];let n=u[e.slug];if(!n)return[];let r=(0,t.getContentFilterBuiltinDefaultRedactionLabel)(e.slug),i=e.label??r,o=i===r;return n.patterns.map(({pattern:n,detail:a})=>({pattern:n,action:e.action,label:o&&a?(0,t.formatBuiltinRedactionLabelDetail)(r,a):i}))})},"extractPresidioFiltersFromBuiltins",0,function(e){return e.flatMap(e=>{let n=p[e.slug];return n?[{entity_type:n,action:function(e){switch(e){case t.ContentFilterAction.Block:return l.Block;case t.ContentFilterAction.Flag:return l.Flag;case t.ContentFilterAction.Redact:default:return l.Redact}}(e.action),score_threshold:.4}]:[]})},"getContentFilterBuiltinInfo",0,function(e){let t=u[e];if(t)return{description:t.description,examples:t.examples,patterns:t.patterns.map(({pattern:e})=>e),...t.docsUrl?{docsUrl:t.docsUrl}:{}}},"getPromptInjectionBuiltinAction",0,function(e){let t=e.find(e=>"regex-prompt-injection"===e.slug);return!!t&&t.action},"getPromptInjectionScanScope",0,function(e){let n=e.find(e=>"regex-prompt-injection"===e.slug);return n?.scan_scope??t.PromptInjectionScanScope.AllMessages},"parseContentFilterBuiltins",0,function(e){return null==e?[]:Array.isArray(e)?e.map((e,i)=>{let o=(0,r.parseSchema)(t.ContentFilterBuiltinEntrySchema,e);return(0,s.isOk)(o)?o.data:((0,n.wLog)("parse_content_filter_builtins_invalid_entry",{index:i,error:o.error}),null)}).filter(e=>null!==e).map(e=>({...e,label:e.label??(0,t.getContentFilterBuiltinDefaultRedactionLabel)(e.slug)})):((0,n.wLog)("parse_content_filter_builtins_invalid",{reason:"not_array"}),[])},"parseContentFilters",0,function(e){return null==e?[]:Array.isArray(e)?e.map((e,i)=>{let o=(0,r.parseSchema)(t.ContentFilterSchema,e);return(0,s.isOk)(o)?o.data:((0,n.wLog)("parse_content_filters_invalid_entry",{index:i}),null)}).filter(e=>null!==e):((0,n.wLog)("parse_content_filters_invalid",{reason:"not_array"}),[])}],366224)},936136,207492,e=>{"use strict";var t,n,r=e.i(377514),i=e.i(831025),o=e.i(348752).ContextAPI.getInstance();(t=n||(n={}))[t.INTERNAL=0]="INTERNAL",t[t.SERVER=1]="SERVER",t[t.CLIENT=2]="CLIENT",t[t.PRODUCER=3]="PRODUCER",t[t.CONSUMER=4]="CONSUMER",e.s(["SpanKind",0,n],207492);var a=e.i(871582),l=e.i(495644),s=e.i(116398);e.i(728517);var d=e.i(462904),c=e.i(477449);let u=null,p={kind:n.CLIENT};function g(e,t,n){let{tracer:i=(!u&&(u=s.trace.getTracer("@openrouter-monorepo")),u),suppressResultErrorStatus:l=!1,...p}=n??{},g=i.startSpan(e,p);try{let e=s.trace.setSpan(o.active(),g),n=o.with(e,()=>t(g));if(!(0,r.isPromiseLike)(n))return(0,c.wrapInstrumentation)(()=>{m(g,n,l)||g.setStatus({code:a.SpanStatusCode.OK}),g.end()}),n;return Promise.resolve(n).then(e=>((0,c.wrapInstrumentation)(()=>{m(g,e,l)||g.setStatus({code:a.SpanStatusCode.OK}),g.end()}),e),e=>{throw(0,d.captureException)(e,{isCauseKnown:!1,span:g,setSpanStatus:!0}),(0,c.wrapInstrumentation)(()=>{g.end()}),e})}catch(e){throw(0,d.captureException)(e,{isCauseKnown:!1,span:g,setSpanStatus:!0}),(0,c.wrapInstrumentation)(()=>{g.end()}),e}}function m(e,t,n){if("object"==typeof t&&null!==t&&"__kind"in t&&"string"==typeof t.__kind)switch(t.__kind){case"OK":return e.setStatus({code:a.SpanStatusCode.OK}),!0;case"ERR":{let r="error"in t?t.error:void 0;if(!("function"==typeof n?n():n)){let t=(e.spanContext().traceFlags&l.TraceFlags.SAMPLED)!=0;(0,d.recordSpanFailure)(e,r,{captureStack:t})}return!0}}return!1}n.CLIENT,n.CLIENT,n.CLIENT;class f{spanContext(){return i.INVALID_SPAN_CONTEXT}setAttribute(e,t){return this}setAttributes(e){return this}addEvent(e,t,n){return this}addLink(e){return this}addLinks(e){return this}setStatus(e){return this}updateName(e){return this}end(e){}isRecording(){return!1}recordException(e,t){}}e.s(["ATTR_DB_ROWS_AFFECTED",0,"db.response.affected_rows","ATTR_DB_ROWS_RETURNED",0,"db.response.returned_rows","CLERK_CALL_SPAN_OPTIONS",0,p,"SPAN_CLERK_CALL_PREFIX",0,"or.clerk.call","composeSpanName",0,function(e,t){let n=t?.trim();return n?`${e} ${n}`:e},"instrumentCall",0,g,"instrumentCallIfRecording",0,function(e,t,n){return(s.trace.getActiveSpan()??new f).isRecording()?g(e,t,n):t(void 0)}],936136)},687411,e=>{"use strict";e.i(358390);var t=e.i(722343);let n={Us:"us",Eu:"eu"},r={[t.DataRegion.Global]:[],[t.DataRegion.Europe]:["europe","eu-","uk","sweden","france","germany","netherlands","finland","norway","poland","italy","spain","switzerland","westeurope","northeurope","austria","belgium","denmark","czech","romania","greece","hungary"],[t.DataRegion.Us]:["us-","usgov","usdod","eastus","westus","centralus","northcentralus","southcentralus","westcentralus"]},i={[t.DataRegion.Global]:null,[t.DataRegion.Europe]:n.Eu,[t.DataRegion.Us]:n.Us};e.s(["MULTI_REGIONS",0,n,"isProviderRegionInDataRegion",0,function(e,n){let{provider_region:o,provider_model_id:a}=e;switch(n){case t.DataRegion.Global:return!0;case t.DataRegion.Europe:case t.DataRegion.Us:if(a.startsWith("global."))return!1;var l=o,s=n;if(s===t.DataRegion.Global)return!0;if(!l||"global"===l)return!1;let d=l.toLowerCase();return d===i[s]||r[s].some(e=>d.startsWith(e));default:return!1}}])},885567,707690,e=>{"use strict";var t=e.i(222666),n=e.i(505962),r=e.i(553215),i=e.i(738286),o=e.i(252358),a=e.i(621364),l=e.i(420863),s=e.i(581603),d=e.i(206210),c=e.i(217631);let u="reasoningEffort",p=[d.ReasoningEffortValue.None,d.ReasoningEffortValue.Minimal,d.ReasoningEffortValue.Low,d.ReasoningEffortValue.Medium,d.ReasoningEffortValue.High,d.ReasoningEffortValue.XHigh,d.ReasoningEffortValue.Max],g="Reasoning effort",m=(0,a.parseAsStringLiteral)(p).withOptions({history:"replace"}),f={[d.ReasoningEffortValue.None]:"None",[d.ReasoningEffortValue.Minimal]:"Minimal",[d.ReasoningEffortValue.Low]:"Low",[d.ReasoningEffortValue.Medium]:"Medium",[d.ReasoningEffortValue.High]:"High",[d.ReasoningEffortValue.XHigh]:"Extra high",[d.ReasoningEffortValue.Max]:"Max"};function b(e){let t=e.reasoning_config?.supported_reasoning_efforts;return t&&0!==t.length?p.filter(e=>t.includes(e)):[]}function h(e,t){if(null!==e&&t.includes(e))return e}function _(e){return(0,t.jsx)(i.SelectItem,{value:e,children:f[e]},e)}e.s(["ReasoningEffortSelect",0,function(e){let s,p,f,b,y,E,P,A,v,S=(0,n.c)(20),{className:k,efforts:R}=e,T=(0,o.usePosthogClient)(),[x,I]=(0,a.useQueryState)(u,m);S[0]!==R||S[1]!==x?(s=h(x,R),S[0]=R,S[1]=x,S[2]=s):s=S[2];let w=s;S[3]!==T||S[4]!==I?(p=e=>{("all"===e||(0,c.isMember)(e,d.ReasoningEffortValue))&&(T.capture(r.PostHogEvent.ChangeModelPageProviderFilter,{filter:"reasoning_effort",value:e}),I("all"===e?null:e))},S[3]=T,S[4]=I,S[5]=p):p=S[5];let z=p,M=k??"flex w-full items-center justify-end gap-2 md:w-auto";S[6]===Symbol.for("react.memo_cache_sentinel")?(f=(0,t.jsxs)("span",{className:"flex items-center gap-1 whitespace-nowrap text-xs text-muted-foreground",children:[g,(0,t.jsx)(l.PricingInfoTooltip,{label:g,tooltip:"Latency and throughput (output tokens per second, reasoning tokens included) are measured per request. Filter by the reasoning effort requested to compare like with like. Slices with few requests are noisier than the blended view."})]}),S[6]=f):f=S[6];let C=w??"all";return S[7]===Symbol.for("react.memo_cache_sentinel")?(b=(0,t.jsx)(i.SelectTrigger,{className:"w-full md:w-28","aria-label":g,children:(0,t.jsx)(i.SelectValue,{})}),S[7]=b):b=S[7],S[8]===Symbol.for("react.memo_cache_sentinel")?(y=(0,t.jsx)(i.SelectItem,{value:"all",children:"All"}),S[8]=y):y=S[8],S[9]!==R?(E=R.map(_),S[9]=R,S[10]=E):E=S[10],S[11]!==E?(P=(0,t.jsxs)(i.SelectContent,{children:[y,E]}),S[11]=E,S[12]=P):P=S[12],S[13]!==z||S[14]!==C||S[15]!==P?(A=(0,t.jsxs)(i.Select,{onValueChange:z,value:C,children:[b,P]}),S[13]=z,S[14]=C,S[15]=P,S[16]=A):A=S[16],S[17]!==A||S[18]!==M?(v=(0,t.jsxs)("label",{className:M,children:[f,A]}),S[17]=A,S[18]=M,S[19]=v):v=S[19],v}],885567),e.s(["useReasoningEffortFilter",0,function(e){let t,r,i=(0,n.c)(6);i[0]!==e?(t=function({model:e,perfWorkload:t,isPrivateView:n}){return!n&&e.supports_reasoning&&t===s.PerfWorkload.TextGeneration&&b(e).length>1}(e),i[0]=e,i[1]=t):t=i[1];let o=t,l=b(e.model),[d]=(0,a.useQueryState)(u,m),c=o?h(d,l):void 0;return i[2]!==l||i[3]!==o||i[4]!==c?(r={showReasoningEffortSelect:o,selectableEfforts:l,reasoningEffort:c},i[2]=l,i[3]=o,i[4]=c,i[5]=r):r=i[5],r}],707690)},682964,538152,e=>{"use strict";e.i(204067);var t=e.i(796805),n=e.i(6984);let r=["p50","p75","p90","p95","p99"];t.z.tuple([t.z.coerce.number(),t.z.coerce.number(),t.z.coerce.number(),t.z.coerce.number(),t.z.coerce.number()]);let i=t.z.object({colo:t.z.string(),request_count:t.z.coerce.number()});t.z.object({data:t.z.array(i)}).extend(n.ClickHouseResponseSchema.shape);let o=t.z.object({date:t.z.string(),endpoint_id:t.z.string(),colo:t.z.string(),request_count:t.z.coerce.number()});t.z.object({data:t.z.array(o)}).extend(n.ClickHouseResponseSchema.shape),t.z.object({date:t.z.string(),endpoint_id:t.z.string(),p50_throughput:t.z.coerce.number(),p75_throughput:t.z.coerce.number(),p90_throughput:t.z.coerce.number(),p95_throughput:t.z.coerce.number(),p99_throughput:t.z.coerce.number(),request_count:t.z.coerce.number()});let a=t.z.object({date:t.z.string(),endpoint_id:t.z.string(),p50_throughput:t.z.coerce.number(),request_count:t.z.coerce.number()});t.z.object({data:t.z.array(a)}).extend(n.ClickHouseResponseSchema.shape),t.z.object({date:t.z.string(),endpoint_id:t.z.string(),p50_latency:t.z.coerce.number(),p75_latency:t.z.coerce.number(),p90_latency:t.z.coerce.number(),p95_latency:t.z.coerce.number(),p99_latency:t.z.coerce.number(),request_count:t.z.coerce.number()});let l=t.z.object({date:t.z.string(),endpoint_id:t.z.string(),p50_latency:t.z.coerce.number(),request_count:t.z.coerce.number()});t.z.object({data:t.z.array(l)}).extend(n.ClickHouseResponseSchema.shape),t.z.object({date:t.z.string(),endpoint_id:t.z.string(),p50_latency_e2e:t.z.coerce.number(),p75_latency_e2e:t.z.coerce.number(),p90_latency_e2e:t.z.coerce.number(),p95_latency_e2e:t.z.coerce.number(),p99_latency_e2e:t.z.coerce.number(),request_count:t.z.coerce.number()});let s=t.z.object({date:t.z.string(),endpoint_id:t.z.string(),p50_throughput:t.z.coerce.number(),p75_throughput:t.z.coerce.number(),p90_throughput:t.z.coerce.number(),p95_throughput:t.z.coerce.number(),p99_throughput:t.z.coerce.number(),request_count:t.z.coerce.number()});t.z.object({data:t.z.array(s)}).extend(n.ClickHouseResponseSchema.shape);let d=t.z.object({date:t.z.string(),endpoint_id:t.z.string(),p50_latency:t.z.coerce.number(),p75_latency:t.z.coerce.number(),p90_latency:t.z.coerce.number(),p95_latency:t.z.coerce.number(),p99_latency:t.z.coerce.number(),request_count:t.z.coerce.number()});t.z.object({data:t.z.array(d)}).extend(n.ClickHouseResponseSchema.shape);let c=t.z.object({date:t.z.string(),endpoint_id:t.z.string(),p50_latency_e2e:t.z.coerce.number(),p75_latency_e2e:t.z.coerce.number(),p90_latency_e2e:t.z.coerce.number(),p95_latency_e2e:t.z.coerce.number(),p99_latency_e2e:t.z.coerce.number(),request_count:t.z.coerce.number()});t.z.object({data:t.z.array(c)}).extend(n.ClickHouseResponseSchema.shape),e.s(["QUANTILE_KEYS",0,r],538152);var u=e.i(586404);function p(e){return e.toUpperCase()}e.s(["DEFAULT_METRIC_PERCENTILE",0,"p50","METRIC_PERCENTILE_VALUES",0,r,"formatPercentileLabel",0,p,"getLatencyMs",0,function(e,t){return e?.[`${t}_latency`]??void 0},"getThroughputTps",0,function(e,t){return e?.[`${t}_throughput`]??void 0},"hasSelectablePercentileData",0,function(e){return e.some(e=>(0,u.isDefinedAndNotNull)(e.stats))},"isMetricPercentile",0,function(e){return r.some(t=>t===e)},"metricLabelWithPercentile",0,function(e,t){return"p50"===t?e:`${e} (${p(t)})`}],682964)},559310,409169,e=>{"use strict";var t=e.i(833560),n=e.i(687421),r=e.i(722343),i=e.i(204067);let o=e.i(796805).z.enum(["anthropic","openai","google","xai","other"]),a={Anthropic:o.enum.anthropic,OpenAI:o.enum.openai,Google:o.enum.google,Xai:o.enum.xai,Other:o.enum.other};var l=e.i(81174),s=e.i(560174),d=e.i(936136),c=e.i(687411),u=e.i(555105),p=e.i(217631),g=e.i(431387);function m(e){return{[a.Anthropic]:e.enforceZdrAnthropic,[a.OpenAI]:e.enforceZdrOpenAI,[a.Google]:e.enforceZdrGoogle,[a.Xai]:e.enforceZdrXai,[a.Other]:e.enforceZdrOther}}var f=e.i(321019),b=e.i(185473),h=e.i(984205),_=e.i(693697);let y=h.ModelArmorConfidenceLevel.Medium,E={[h.ModelArmorConfidenceLevel.Low]:2,[h.ModelArmorConfidenceLevel.Medium]:1,[h.ModelArmorConfidenceLevel.High]:0};var P=e.i(234168),A=e.i(366224);function v(e,t){let n=[...e,...t??[]],r=new Set;return n.filter(e=>{let t=`${e.pattern}:${e.action}`;return!r.has(t)&&(r.add(t),!0)})}function S(e,t){return[...new Set([...e,...t??[]])]}let k={[P.PiiFilterAction.Flag]:0,[P.PiiFilterAction.Redact]:1,[P.PiiFilterAction.Block]:2};function R(e,t){return t===f.GuardrailEnforcementMode.Block||e===f.GuardrailEnforcementMode.Block?f.GuardrailEnforcementMode.Block:t===f.GuardrailEnforcementMode.Flag?f.GuardrailEnforcementMode.Flag:e}let T={[f.PromptInjectionScanScope.UserOnly]:1,[f.PromptInjectionScanScope.AllMessages]:2},x="openrouter.guardrail.zdr.violation",I="openrouter.guardrail.data_policy.violation",w="openrouter.guardrail.provider_not_allowed",z="openrouter.guardrail.provider_ignored";function M(e,t){return!0===e.data_policy.retainsPrompts&&t[function(e){switch((0,g.getAuthorSlugFromPermaslug)(e)){case"anthropic":return a.Anthropic;case"openai":return a.OpenAI;case"google":return a.Google;case"x-ai":return a.Xai;default:return a.Other}}(e.model.permaslug)]}function C(e,t){return t&&e.is_free&&e.data_policy.training}function B(e,t){return t&&!e.is_free&&e.data_policy.training}function N(e,t){return t&&!0===e.data_policy.canPublish}let D="data-policy",F="account-provider",L="guardrail",j={[t.EndpointIneligibilityReason.ZdrViolationByAccount]:D,[t.EndpointIneligibilityReason.ZdrViolationByGuardrail]:D,[t.EndpointIneligibilityReason.FreeModelTrainingViolationByAccount]:D,[t.EndpointIneligibilityReason.FreeModelTrainingViolationByGuardrail]:D,[t.EndpointIneligibilityReason.PaidModelTrainingViolationByAccount]:D,[t.EndpointIneligibilityReason.PaidModelTrainingViolationByGuardrail]:D,[t.EndpointIneligibilityReason.FreeModelPublicationViolationByAccount]:D,[t.EndpointIneligibilityReason.FreeModelPublicationViolationByGuardrail]:D,[t.EndpointIneligibilityReason.ProviderNotAllowedByAccount]:F,[t.EndpointIneligibilityReason.ProviderIgnoredByAccount]:F,[t.EndpointIneligibilityReason.ProviderNotAllowedByGuardrail]:L,[t.EndpointIneligibilityReason.ProviderIgnoredByGuardrail]:L,[t.EndpointIneligibilityReason.ModelIgnoredByGuardrail]:L,[t.EndpointIneligibilityReason.DataRegionNotAllowedByGuardrail]:L,[t.EndpointIneligibilityReason.ProviderRequiresWorkspaceKey]:"workspace-byok"};e.s(["getIneligibilityReasonsById",0,function({endpoints:e,userSettings:o,isUserLoggedIn:g,getGuardrailReasons:P=()=>[]}){var D;if(!g)return new Map;let{ineligible:F}=(D={endpoints:e,userSettings:o,guardrails:[]},(0,d.instrumentCall)("or.guardrail.filter_endpoints",e=>{let o,d,g,P,{endpoints:F,userSettings:L,guardrails:j,defaultRowSlugsByModel:G,skipDataRegionCheck:Z}=D,O=performance.now();e.setAttribute("or.guardrail.input_endpoint_count",F.length),e.setAttribute("or.guardrail.guardrail_count",j.length);let V=function({userSettings:e,guardrails:t,endpoints:o,defaultRowSlugsByModel:a,skipDataRegionCheck:s=!1}){let d=function(e){if(0===e.length)return{allowedProviders:null,allowedModels:null,allowedDataRegions:null,ignoredModels:[],enforceZdr:!1,enforceZdrAnthropic:!1,enforceZdrOpenAI:!1,enforceZdrGoogle:!1,enforceZdrXai:!1,enforceZdrOther:!1,disableFreeModelPublication:!1,disableFreeModelTraining:!1,disablePaidModelTraining:!1,contentFilters:[],ignoredProviders:[],presidioFilters:[],modelArmorMode:null,modelArmorConfidenceLevel:y,lakeraMode:null,enableRegexPromptInjection:!1,regexPromptInjectionScanScope:f.PromptInjectionScanScope.AllMessages};let t=null,n=null,r=function(e){let t=null;for(let n of e){let e=n?.allowed_data_regions;if(null==e)continue;if(null===t){t=[...e];continue}let r=new Set(e);t=t.filter(e=>r.has(e))}return t}(e),o=[],a=!1,s=!1,d=!1,c=!1,u=!1,p=!1,g=!1,m=!1,P=!1,x=[],I=[],w=[],z=null,M=null,C=null,B=!1,N=f.PromptInjectionScanScope.UserOnly;for(let r of e){var D,F,L;t=(0,b.intersectRestrictions)(t,r.allowed_providers??null),n=(0,b.intersectRestrictions)(n,r.allowed_models??null),o=S(o,r.ignored_models),!0===r.enforce_zdr&&(a=!0),!0===r.enforce_zdr_anthropic&&(s=!0),!0===r.enforce_zdr_openai&&(d=!0),!0===r.enforce_zdr_google&&(c=!0),!0===r.enforce_zdr_xai&&(u=!0),!0===r.enforce_zdr_other&&(p=!0),!1===r.enable_free_model_publication&&(g=!0),!1===r.enable_free_model_training&&(m=!0),!1===r.enable_paid_model_training&&(P=!0);let e=(0,A.parseContentFilterBuiltins)(r.content_filter_builtins);x=v(x,(0,A.expandBuiltinsToContentFilters)(e)),x=v(x,(0,A.parseContentFilters)(r.content_filters)),I=S(I,r.ignored_providers),w=function(e,t){let n=[...e,...t],r=new Map;for(let e of n){var i,o;let t=r.get(e.entity_type);if(!t){r.set(e.entity_type,e);continue}r.set(e.entity_type,{entity_type:e.entity_type,action:(i=t.action,k[o=e.action]>k[i]?o:i),score_threshold:Math.min(t.score_threshold,e.score_threshold)})}return[...r.values()]}(w,(0,A.extractPresidioFiltersFromBuiltins)(e)),z=R(z,r.model_armor_injection_protection_mode);let y=function(e){if(null==e)return null;let t=(0,i.parseSchema)(h.ModelArmorConfidenceLevelSchema,e);return(0,_.isErr)(t)?((0,l.wLog)("model_armor_invalid_confidence_level",{raw_value:e,error:String(t.error)}),null):t.data}(r.model_armor_injection_confidence_level);y&&(M=M?E[D=M]>=E[y]?D:y:y),C=R(C,r.lakera_injection_protection_mode);let j=(0,A.getPromptInjectionBuiltinAction)(e);if(!1!==j){B=(F=B)===f.ContentFilterAction.Block||j===f.ContentFilterAction.Block?f.ContentFilterAction.Block:F===f.ContentFilterAction.Redact||j===f.ContentFilterAction.Redact?f.ContentFilterAction.Redact:j;let t=(0,A.getPromptInjectionScanScope)(e);N=T[L=N]>T[t]?L:t}}return{allowedProviders:t,allowedModels:n,allowedDataRegions:r,ignoredModels:o,enforceZdr:a,enforceZdrAnthropic:s,enforceZdrOpenAI:d,enforceZdrGoogle:c,enforceZdrXai:u,enforceZdrOther:p,disableFreeModelPublication:g,disableFreeModelTraining:m,disablePaidModelTraining:P,contentFilters:x,ignoredProviders:I,presidioFilters:w,modelArmorMode:z,modelArmorConfidenceLevel:M??y,lakeraMode:C,enableRegexPromptInjection:B,regexPromptInjectionScanScope:!1===B?f.PromptInjectionScanScope.AllMessages:N}}(t);return{defaultRowSlugsByModel:a??(0,u.getDefaultRowSlugsByModel)(o),userSettings:e,guardrail:{allowedProviderSet:null===d.allowedProviders?null:new Set(d.allowedProviders),allowedModelSet:null===d.allowedModels?null:new Set(d.allowedModels),ignoredModelSet:new Set(d.ignoredModels),ignoredProviderSet:new Set(d.ignoredProviders),allowedDataRegions:s?null:function(e){if(null===e)return null;let t=e.filter(e=>(0,p.isMember)(e,r.DataRegion)),n=e.filter(e=>!(0,p.isMember)(e,r.DataRegion));return n.length>0&&(0,l.wLog)("guardrail_allowed_data_region_unknown",{unknown_regions:n.join(","),known_region_count:t.length}),t}(d.allowedDataRegions),disableFreeModelPublication:d.disableFreeModelPublication,disableFreeModelTraining:d.disableFreeModelTraining,disablePaidModelTraining:d.disablePaidModelTraining},accountPerProviderZdr:m({enforceZdrAnthropic:e.shouldEnforceZdrAnthropic,enforceZdrOpenAI:e.shouldEnforceZdrOpenAI,enforceZdrGoogle:e.shouldEnforceZdrGoogle,enforceZdrXai:e.shouldEnforceZdrXai,enforceZdrOther:e.shouldEnforceZdrOther}),guardrailPerProviderZdr:m(d),account:{allowedProviderSet:0===e.allowedProviders.length?null:new Set(e.allowedProviders.filter(e=>(0,p.isMember)(e,n.PublicProviderName)).flatMap(n.getProviderSlugsForName)),ignoredProviderSet:new Set(e.ignoredProviders.filter(e=>(0,p.isMember)(e,n.PublicProviderName)).flatMap(n.getProviderSlugsForName))}}}({userSettings:L,guardrails:j,endpoints:F,defaultRowSlugsByModel:G,skipDataRegionCheck:Z}),{accountPerProviderZdr:W,guardrailPerProviderZdr:U}=V,H=[],q=[],K=new Map;for(let e of F){let n=function({endpoint:e,defaultRowSlugsByModel:n,userSettings:r,guardrail:{allowedProviderSet:i,allowedModelSet:o,ignoredModelSet:a,ignoredProviderSet:l,allowedDataRegions:s,disableFreeModelPublication:d,disableFreeModelTraining:p,disablePaidModelTraining:g},accountPerProviderZdr:m,guardrailPerProviderZdr:f,account:{allowedProviderSet:b,ignoredProviderSet:h}}){let _=[],y=n.get(e.model.permaslug);return null===i||(0,u.isEndpointProviderInSet)(e,i,y)||_.push(t.EndpointIneligibilityReason.ProviderNotAllowedByGuardrail),null===b||(0,u.isEndpointProviderInSet)(e,b,y)||_.push(t.EndpointIneligibilityReason.ProviderNotAllowedByAccount),(0,u.isEndpointProviderInSet)(e,l,y)&&_.push(t.EndpointIneligibilityReason.ProviderIgnoredByGuardrail),(0,u.isEndpointProviderInSet)(e,h,y)&&_.push(t.EndpointIneligibilityReason.ProviderIgnoredByAccount),null===o||o.has(e.model_variant_permaslug)||_.push(t.EndpointIneligibilityReason.ModelIgnoredByGuardrail),a.has(e.model_variant_permaslug)&&!_.includes(t.EndpointIneligibilityReason.ModelIgnoredByGuardrail)&&_.push(t.EndpointIneligibilityReason.ModelIgnoredByGuardrail),null===s||s.some(t=>(0,c.isProviderRegionInDataRegion)(e,t))||_.push(t.EndpointIneligibilityReason.DataRegionNotAllowedByGuardrail),M(e,m)&&_.push(t.EndpointIneligibilityReason.ZdrViolationByAccount),M(e,f)&&_.push(t.EndpointIneligibilityReason.ZdrViolationByGuardrail),C(e,r.shouldDisableFreeModelTraining)&&_.push(t.EndpointIneligibilityReason.FreeModelTrainingViolationByAccount),C(e,p)&&_.push(t.EndpointIneligibilityReason.FreeModelTrainingViolationByGuardrail),B(e,r.shouldDisablePaidModelTraining)&&_.push(t.EndpointIneligibilityReason.PaidModelTrainingViolationByAccount),B(e,g)&&_.push(t.EndpointIneligibilityReason.PaidModelTrainingViolationByGuardrail),N(e,r.shouldDisableFreeModelPublication)&&_.push(t.EndpointIneligibilityReason.FreeModelPublicationViolationByAccount),N(e,d)&&_.push(t.EndpointIneligibilityReason.FreeModelPublicationViolationByGuardrail),_}({endpoint:e,...V});if(0===n.length)H.push({endpoint:e});else for(let r of(q.push({endpoint:e,reasons:n}),n)){K.set(r,(K.get(r)??0)+1);let n=`provider:${(0,u.getProviderBaseSlug)(e.provider_slug)}`;switch(r){case t.EndpointIneligibilityReason.ZdrViolationByAccount:(0,s.getStatsd)().incr(x,1,["source:account",n]);break;case t.EndpointIneligibilityReason.ZdrViolationByGuardrail:(0,s.getStatsd)().incr(x,1,["source:guardrail",n]);break;case t.EndpointIneligibilityReason.FreeModelTrainingViolationByAccount:case t.EndpointIneligibilityReason.PaidModelTrainingViolationByAccount:(0,s.getStatsd)().incr(I,1,["type:training","source:account",n]);break;case t.EndpointIneligibilityReason.FreeModelTrainingViolationByGuardrail:case t.EndpointIneligibilityReason.PaidModelTrainingViolationByGuardrail:(0,s.getStatsd)().incr(I,1,["type:training","source:guardrail",n]);break;case t.EndpointIneligibilityReason.FreeModelPublicationViolationByAccount:(0,s.getStatsd)().incr(I,1,["type:publication","source:account",n]);break;case t.EndpointIneligibilityReason.FreeModelPublicationViolationByGuardrail:(0,s.getStatsd)().incr(I,1,["type:publication","source:guardrail",n]);break;case t.EndpointIneligibilityReason.ProviderNotAllowedByGuardrail:(0,s.getStatsd)().incr(w,1,["source:guardrail",n]);break;case t.EndpointIneligibilityReason.ProviderNotAllowedByAccount:(0,s.getStatsd)().incr(w,1,["source:account",n]);break;case t.EndpointIneligibilityReason.ProviderIgnoredByGuardrail:(0,s.getStatsd)().incr(z,1,["source:guardrail",n]);break;case t.EndpointIneligibilityReason.ProviderIgnoredByAccount:(0,s.getStatsd)().incr(z,1,["source:account",n]);break;case t.EndpointIneligibilityReason.ModelIgnoredByGuardrail:(0,s.getStatsd)().incr("openrouter.guardrail.model_ignored",1,[n]);break;case t.EndpointIneligibilityReason.DataRegionNotAllowedByGuardrail:(0,s.getStatsd)().incr("openrouter.guardrail.data_region_not_allowed",1,[n]);case t.EndpointIneligibilityReason.ProviderRequiresWorkspaceKey:}}}let X=performance.now()-O;for(let t of((0,s.getStatsd)().distribution("openrouter.guardrail.filter_endpoints.latency",X),e.setAttribute("or.guardrail.eligible_count",H.length),e.setAttribute("or.guardrail.ineligible_count",q.length),Object.values(a)))e.setAttribute(`or.guardrail.enforce_zdr.${t}`,W[t]||U[t]);for(let[t,n]of K.entries())e.setAttribute(`or.guardrail.ineligibility.${t}`,n);let Q={eligible:H,ineligible:q,summary:(o=[...new Set(H.map(e=>(0,u.getProviderBaseSlug)(e.endpoint.provider_slug)))],d=[...new Set(q.map(e=>(0,u.getProviderBaseSlug)(e.endpoint.provider_slug)))],g=[...new Set(H.map(e=>e.endpoint.model_variant_slug))],P=[...new Set(q.map(e=>e.endpoint.model_variant_slug))],{eligibleCount:H.length,ineligibleCount:q.length,eligibleProviderSlugs:o,ineligibleProviderSlugs:d,eligibleModelSlugs:g,ineligibleModelSlugs:P})};return(0,s.getStatsd)().distribution("openrouter.guardrail.endpoints.before_filter",F.length),(0,s.getStatsd)().distribution("openrouter.guardrail.endpoints.after_filter",H.length),Q})),L=new Map(F.map(({endpoint:e,reasons:t})=>[e.id,t]));return new Map(e.flatMap(e=>{let t=[...new Set([...L.get(e.id)??[],...P(e)])];return t.length>0?[[e.id,t]]:[]}))},"isDataPolicyReason",0,function(e){return j[e]===D},"isGuardrailReason",0,function(e){return j[e]===L},"isIgnoredProviderReason",0,function(e){return j[e]===F}],559310);var G=e.i(196948);e.s(["formatLatencySeconds",0,function(e,t){return(0,G.formatFixed)(t,{locale:e,fractionDigits:2,maxDigits:4})??"—"},"formatThroughputTps",0,function(e,t){return(0,G.formatFixed)(t,{locale:e,fractionDigits:0,maxDigits:4})??"—"}],409169)},289798,159470,e=>{"use strict";var t=e.i(222666),n=e.i(505962),r=e.i(270401),i=e.i(727086);let o=(0,r.createContext)(null);function a(e){let a,l,s,d,c,u,p,g,m=(0,n.c)(21),{children:f,hasPricingSection:b}=e,h=void 0!==b&&b;m[0]===Symbol.for("react.memo_cache_sentinel")?(a={paramName:"endpoint",pinUrlHash:!0},m[0]=a):a=m[0];let{selectedId:_,isOpen:y,open:E,close:P,toggle:A,setIsOpen:v}=(0,i.useDetailPaneDeeplink)(a),[S,k]=(0,r.useState)("providers");m[1]!==h?(l=()=>{h&&"#pricing"===window.location.hash&&k("pricing")},s=[h],m[1]=h,m[2]=l,m[3]=s):(l=m[2],s=m[3]),(0,r.useEffect)(l,s);let[R,T]=(0,r.useState)(null),[x,I]=(0,r.useState)(null);m[4]===Symbol.for("react.memo_cache_sentinel")?(d=e=>{I(t=>null!==t&&t.size===e.size&&[...e].every(e=>{let[n,r]=e;return t.get(n)===r})?t:e)},m[4]=d):d=m[4];let w=d,z=(0,r.useRef)(null);m[5]!==A?(c=(e,t)=>(k(e),A(t)),m[5]=A,m[6]=c):c=m[6];let M=c;m[7]===Symbol.for("react.memo_cache_sentinel")?(u=e=>{T(t=>null!==t&&t.length===e.length&&t.every((t,n)=>t===e[n])?t:e)},m[7]=u):u=m[7];let C=u;m[8]!==P||m[9]!==y||m[10]!==E||m[11]!==R||m[12]!==x||m[13]!==_||m[14]!==v||m[15]!==S||m[16]!==M?(p={selectedEndpointId:_,isOpen:y,source:S,open:E,toggleFrom:M,close:P,setIsOpen:v,pricingNavEndpointIds:R,pricingTableRef:z,providersDisplayNames:x,setProvidersDisplayNames:w,setPricingNavOrder:C},m[8]=P,m[9]=y,m[10]=E,m[11]=R,m[12]=x,m[13]=_,m[14]=v,m[15]=S,m[16]=M,m[17]=p):p=m[17];let B=p;return m[18]!==f||m[19]!==B?(g=(0,t.jsx)(o.Provider,{value:B,children:f}),m[18]=f,m[19]=B,m[20]=g):g=m[20],g}e.s(["EndpointPaneProvider",0,a,"EndpointPaneScope",0,function(e){let i,l=(0,n.c)(4),{children:s}=e;if(null!==(0,r.useContext)(o)){let e;return l[0]!==s?(e=(0,t.jsx)(t.Fragment,{children:s}),l[0]=s,l[1]=e):e=l[1],e}return l[2]!==s?(i=(0,t.jsx)(a,{children:s}),l[2]=s,l[3]=i):i=l[3],i},"useEndpointPane",0,function(){let e=(0,r.useContext)(o);if(null===e)throw Error("useEndpointPane must be used within EndpointPaneProvider");return e},"useOptionalEndpointPane",0,function(){return(0,r.useContext)(o)}],289798),e.s(["HeadLabel",0,function(e){let r,i,o=(0,n.c)(5),{label:a,unit:l}=e;return o[0]!==l?(r=void 0!==l&&(0,t.jsxs)(t.Fragment,{children:[" ",(0,t.jsx)("span",{className:"text-[10px] font-normal text-faint",children:l})]}),o[0]=l,o[1]=r):r=o[1],o[2]!==a||o[3]!==r?(i=(0,t.jsxs)("span",{className:"whitespace-nowrap !text-[13px] font-medium",children:[a,r]}),o[2]=a,o[3]=r,o[4]=i):i=o[4],i}],159470)},420863,e=>{"use strict";var t=e.i(222666),n=e.i(505962),r=e.i(704318),i=e.i(553215),o=e.i(648156),a=e.i(252358),l=e.i(779100),s=e.i(288027),d=e.i(61291),c=e.i(190557);function u(e,t){return`${(0,c.formatUsd)((0,s.bn)(t).times(1),{locale:e,preset:"model-price"})??"—"}`}function p(e){let r,i,o,a,l=(0,n.c)(10),{label:s,value:d,subtitle:c}=e;return l[0]!==s?(r=(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:s}),l[0]=s,l[1]=r):r=l[1],l[2]!==d?(i=(0,t.jsx)("p",{className:"text-2xl font-bold tabular-nums",children:d}),l[2]=d,l[3]=i):i=l[3],l[4]!==c?(o=(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:c}),l[4]=c,l[5]=o):o=l[5],l[6]!==r||l[7]!==i||l[8]!==o?(a=(0,t.jsxs)("div",{className:"flex flex-col gap-1 rounded-lg border p-4",children:[r,i,o]}),l[6]=r,l[7]=i,l[8]=o,l[9]=a):a=l[9],a}function g(e){let i,a,l,s=(0,n.c)(6),{label:d,tooltip:c}=e,u=`${d} explanation`;return s[0]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)(r.InformationCircleIcon,{className:"size-4"}),s[0]=i):i=s[0],s[1]!==u?(a=(0,t.jsx)("button",{type:"button",tabIndex:-1,className:"inline-flex shrink-0 cursor-help text-muted-foreground","aria-label":u,children:i}),s[1]=u,s[2]=a):a=s[2],s[3]!==a||s[4]!==c?(l=(0,t.jsx)(o.Tooltip,{side:"right",className:"max-w-xs",content:c,children:a}),s[3]=a,s[4]=c,s[5]=l):l=s[5],l}function m(e){let r,i,o,a=(0,n.c)(8),{title:l,tooltip:s}=e;return a[0]!==l?(r=(0,t.jsx)("h3",{className:"text-sm font-medium text-muted-foreground",children:l}),a[0]=l,a[1]=r):r=a[1],a[2]!==l||a[3]!==s?(i=(0,t.jsx)(g,{label:l,tooltip:s}),a[2]=l,a[3]=s,a[4]=i):i=a[4],a[5]!==r||a[6]!==i?(o=(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[r,i]}),a[5]=r,a[6]=i,a[7]=o):o=a[7],o}e.s(["PriceValue",0,function(e){let r,i,o=(0,n.c)(5),{value:a}=e,d=(0,l.useLocale)();return o[0]!==d||o[1]!==a?(r=(0,c.formatUsd)((0,s.bn)(a).times(1),{locale:d,preset:"model-price"})??"—",o[0]=d,o[1]=a,o[2]=r):r=o[2],o[3]!==r?(i=(0,t.jsx)("span",{className:"tabular-nums",children:(0,t.jsx)("span",{className:"text-foreground",children:r})}),o[3]=r,o[4]=i):i=o[4],i},"PricingInfoTooltip",0,g,"PricingLoadError",0,function(e){let r,o,l=(0,n.c)(6),{onRetry:s,message:d}=e,c=void 0===d?"Unable to load pricing data.":d,u=(0,a.usePosthogClient)();return l[0]!==s||l[1]!==u?(r=(0,t.jsx)("button",{type:"button",className:"underline underline-offset-2 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring",onClick:()=>{u.capture(i.PostHogEvent.RetryModelPagePricing,{}),s()},children:"Retry"}),l[0]=s,l[1]=u,l[2]=r):r=l[2],l[3]!==c||l[4]!==r?(o=(0,t.jsxs)("p",{className:"py-8 text-center text-sm text-destructive",children:[c," ",r]}),l[3]=c,l[4]=r,l[5]=o):o=l[5],o},"PricingSectionHeading",0,m,"WeightedAverageCards",0,function(e){let r,i,o,a,s,d,c=(0,n.c)(14),{weightedInputPrice:g,weightedOutputPrice:f}=e,b=(0,l.useLocale)();return c[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)(m,{title:"Weighted Average",tooltip:"Observed cost paid per token, weighted by token volume: each provider contributes in proportion to the tokens it served today (UTC). Includes cache discounts and any provider discounts, so it can sit below posted prices."}),c[0]=r):r=c[0],c[1]!==b||c[2]!==g?(i=u(b,g),c[1]=b,c[2]=g,c[3]=i):i=c[3],c[4]!==i?(o=(0,t.jsx)(p,{label:"Weighted Avg Input Price",value:i,subtitle:"/M tokens"}),c[4]=i,c[5]=o):o=c[5],c[6]!==b||c[7]!==f?(a=u(b,f),c[6]=b,c[7]=f,c[8]=a):a=c[8],c[9]!==a?(s=(0,t.jsx)(p,{label:"Weighted Avg Output Price",value:a,subtitle:"/M tokens"}),c[9]=a,c[10]=s):s=c[10],c[11]!==o||c[12]!==s?(d=(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[r,(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[o,s]})]}),c[11]=o,c[12]=s,c[13]=d):d=c[13],d},"formatDollarsPerMillion",0,u,"formatPercent",0,function(e,t){return Number.isFinite(t)?(0,d.formatPercentPoints)(100*t,{locale:e,preset:"native-fixed-1"})??"—":"—"}])},616384,e=>{"use strict";var t=e.i(581603),n=e.i(963),r=e.i(182657),i=e.i(264552);let o={[r.QuickStartExampleType.Text]:t.PerfWorkload.TextGeneration,[r.QuickStartExampleType.ComputerUseTool]:t.PerfWorkload.TextGeneration,[r.QuickStartExampleType.AudioTool]:t.PerfWorkload.TextGeneration,[r.QuickStartExampleType.AudioOutput]:t.PerfWorkload.TextGeneration,[r.QuickStartExampleType.FastApply]:t.PerfWorkload.TextGeneration,[r.QuickStartExampleType.Embeddings]:t.PerfWorkload.Embeddings,[r.QuickStartExampleType.ImageInputEmbeddings]:t.PerfWorkload.Embeddings,[r.QuickStartExampleType.Reasoning]:t.PerfWorkload.TextGeneration,[r.QuickStartExampleType.ImageGeneration]:t.PerfWorkload.ImageGeneration,[r.QuickStartExampleType.ImageGenerationWithoutText]:t.PerfWorkload.ImageGeneration,[r.QuickStartExampleType.VideoGeneration]:t.PerfWorkload.VideoGeneration,[r.QuickStartExampleType.Rerank]:t.PerfWorkload.Rerank,[r.QuickStartExampleType.TTS]:t.PerfWorkload.TTS,[r.QuickStartExampleType.STT]:t.PerfWorkload.STT,[r.QuickStartExampleType.STTMaiTranscribe]:t.PerfWorkload.STT,[r.QuickStartExampleType.OCR]:t.PerfWorkload.TextGeneration},a=[[n.OutputModality.Embeddings,t.PerfWorkload.Embeddings],[n.OutputModality.Video,t.PerfWorkload.VideoGeneration],[n.OutputModality.Image,t.PerfWorkload.ImageGeneration],[n.OutputModality.TTS,t.PerfWorkload.TTS],[n.OutputModality.Transcription,t.PerfWorkload.STT],[n.OutputModality.Rerank,t.PerfWorkload.Rerank]];e.s(["getProviderTablePerfPresentation",0,function(e){return{latencyLabel:"latency_e2e"===e.latencyMetric?"End-to-end latency":"Latency",latencyTooltip:i.PROVIDER_LATENCY_TOOLTIP_BY_WORKLOAD[e.perfWorkload],shouldShowThroughputColumn:e.perfWorkload===t.PerfWorkload.TextGeneration}},"getProviderTablePerfSelector",0,function(e){var n;let r=(n=e).quick_start_example_type?o[n.quick_start_example_type]:function(e){for(let[t,n]of a)if(e.includes(t))return n;return t.PerfWorkload.TextGeneration}(n.output_modalities);return{perfWorkload:r,latencyMetric:r===t.PerfWorkload.ImageGeneration||r===t.PerfWorkload.VideoGeneration?"latency_e2e":"latency"}}])},916998,238525,e=>{"use strict";var t=e.i(222666),n=e.i(505962),r=e.i(452473),i=e.i(970654);function o(e){return"number"==typeof e&&e>0&&e<1}function a(e){return`${Math.round(100*e)}% off`}e.s(["formatDiscountPercent",0,a,"isValidDiscount",0,o],238525),e.s(["DiscountBadge",0,function(e){let l,s,d,c=(0,n.c)(14),{discount:u,variant:p,className:g}=e;if(!o(u))return null;if("subdued"===(void 0===p?"prominent":p)){let e,n,i;return c[0]!==g?(e=(0,r.cn)("shrink-0 text-xs font-medium text-positive-text",g),c[0]=g,c[1]=e):e=c[1],c[2]!==u?(n=a(u),c[2]=u,c[3]=n):n=c[3],c[4]!==e||c[5]!==n?(i=(0,t.jsx)("span",{className:e,children:n}),c[4]=e,c[5]=n,c[6]=i):i=c[6],i}return c[7]!==g?(l=(0,r.cn)("shrink-0",g),c[7]=g,c[8]=l):l=c[8],c[9]!==u?(s=a(u),c[9]=u,c[10]=s):s=c[10],c[11]!==l||c[12]!==s?(d=(0,t.jsx)(i.Badge,{variant:"positive",size:"sm",className:l,children:s}),c[11]=l,c[12]=s,c[13]=d):d=c[13],d}],916998)},939044,e=>{"use strict";var t=e.i(222666),n=e.i(505962),r=e.i(970654),i=e.i(648156);let o={Endpoint:"endpoint",Provider:"provider"},a={[o.Endpoint]:"Covered by a business associate agreement: HIPAA traffic may route to this endpoint.",[o.Provider]:"At least one of this provider's endpoints is covered by a business associate agreement. Check each model for HIPAA eligibility."};e.s(["HipaaBadgeScope",0,o,"HipaaEligibleBadge",0,function(e){let l,s,d=(0,n.c)(3),{isEligible:c,scope:u}=e,p=void 0===u?o.Endpoint:u;if(!c)return null;let g=a[p];return d[0]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)(r.Badge,{tabIndex:0,variant:"info",size:"sm",className:"shrink-0 cursor-help",children:"HIPAA"}),d[0]=l):l=d[0],d[1]!==g?(s=(0,t.jsx)(i.Tooltip,{side:"top",content:g,children:l}),d[1]=g,d[2]=s):s=d[2],s}])}]); //# sourceMappingURL=1u_a6kd5584n7.js.map //# chunkId=01a09dc9-fdaf-73d2-b562-c7a9e5c67eed