performance.mark("js-parse-end:44880-c22b67bf8c595f2d.js"); "use strict";(globalThis.webpackChunk_github_ui_github_ui=globalThis.webpackChunk_github_ui_github_ui||[]).push([["44880"],{72153(e,l,i){i.d(l,{v:()=>n});var o=i(74848),t=i(16522),r=i(58846),s=i(34164),a=i(9152);function n(e){let l,i,n,d,m,c,u=(0,t.c)(21),{className:p,provider:h,size:g}=e,_=void 0===g?"small":g;u[0]!==h?(l=(0,a.LB)(h),u[0]=h,u[1]=l):l=u[1];let f=l,{colorMode:v}=(0,r.A)(),y="night"===v?"dark":"day"===v?"light":"auto",b=!!f.logo.dark;u[2]!==p?(i=(0,s.$)("ProviderLogo-module__ProviderLogo__CLMke",p),u[2]=p,u[3]=i):i=u[3],u[4]!==b||u[5]!==y||u[6]!==f.logo.dark?(n=b&&"dark"===y&&(0,o.jsx)("source",{srcSet:f.logo.dark}),u[4]=b,u[5]=y,u[6]=f.logo.dark,u[7]=n):n=u[7],u[8]!==b||u[9]!==y||u[10]!==f.logo.dark?(d=b&&"auto"===y&&(0,o.jsx)("source",{srcSet:f.logo.dark,media:"(prefers-color-scheme: dark)"}),u[8]=b,u[9]=y,u[10]=f.logo.dark,u[11]=d):d=u[11];let x=`${f.name} logo`;return u[12]!==f.logo.light||u[13]!==x?(m=(0,o.jsx)("img",{src:f.logo.light,alt:x,"aria-hidden":!0}),u[12]=f.logo.light,u[13]=x,u[14]=m):m=u[14],u[15]!==_||u[16]!==i||u[17]!==n||u[18]!==d||u[19]!==m?(c=(0,o.jsxs)("picture",{className:i,"data-size":_,children:[n,d,m]}),u[15]=_,u[16]=i,u[17]=n,u[18]=d,u[19]=m,u[20]=c):c=u[20],c}n.displayName="ProviderLogo"},9152(e,l,i){i.d(l,{lP:()=>b,bz:()=>v,eU:()=>y,G5:()=>_,LB:()=>f,cM:()=>x});var o=i(11561);let t=i.p+"anthropic-black-e02ffc6daa3b3c77.svg",r=i.p+"anthropic-white-318479089263e7da.svg",s=i.p+"microsoft-foundry-9528f47e1307839d.svg",a=i.p+"openai-black-5c162cd803c7bd03.svg",n=i.p+"openai-white-be06bb6c2057ee1f.svg",d=i.p+"xai-black-fa318307e7b22651.svg",m=i.p+"xai-white-e3e0c982eeb84b5f.svg",c=i.p+"google-black-3062b5a5fe186963.svg",u=i.p+"google-white-3100cc4383c31d4f.svg",p=i.p+"awsbedrock-black-9370dd1e4192092b.svg",h=i.p+"awsbedrock-white-01c7ee4dbe3e72cb.svg",g=i.p+"models-white-c0adcc687776b3a0.svg",_=[{key:"openai",name:"OpenAI",logo:{light:a,dark:n}},{key:"azureai",name:"Microsoft Foundry",logo:{light:s,dark:void 0}},{key:"anthropic",name:"Anthropic",logo:{light:t,dark:r}},{key:"googleaistudio",name:"Google AI Studio",logo:{light:c,dark:u}},{key:"xai",name:"xAI",logo:{light:d,dark:m}},{key:"awsbedrock",name:"AWS Bedrock",logo:{light:p,dark:h}},{key:"openaicompatible",name:"OpenAI Compatible",logo:{light:i.p+"models-black-219d541d199eb7bf.svg",dark:g}}];function f(e){let l=_.find(l=>l.key===e);return(0,o.A)(l,`Provider with key "${e}" not found`),l}function v(e){let l=f(e).name.replaceAll(/\s+/g,"_");return`${l}_custom_key`}function y(e){return"openai"===e||"anthropic"===e||"xai"===e||"openaicompatible"===e||"awsbedrock"===e||"googleaistudio"===e}function b(e){return"awsbedrock"===e?"Secret access key":"API key"}let x=["api_key","access_key"]},61225(e,l,i){i.d(l,{Yb:()=>z,z5:()=>X,k:()=>$});var o=i(74848),t=i(16522),r=i(72153),s=i(206),a=i(66743),n=i(54590),d=i(38621),m=i(26108),c=i(47819),u=i(20757),p=i(18990),h=i(56133),g=i(80117),_=i(72685),f=i(34164),v=i(96540),y=i(86633),b=i(11515),x=i(68626),k=i(20331),j=i(49685),w=i(10506),M=i(10881),N=i(23184),P=i(12104);let S=["o3-mini","Gemini 2.0 Flash"];function L(e){let l=e.custom_model.owner_name,i=e.custom_model.owner_type??"organization";return`${l}::${i}`}var R=i(33899);let C="ModelPicker-module__menuButton__Imu_h",F="ModelPicker-module__buttonName__xOg9m",U="ModelPicker-module__menuHeading__E0_lO",A="ModelPicker-module__messageRetryButtonGroup__YW_Bc",E="ModelPicker-module__messageRetryDivider__AQFOI",I="ModelPicker-module__messageRetryMenuButton__Je1zd",O="ModelPicker-module__messageRetryButton__r4hqd",q="ModelPicker-module__modelNameDisabled__tkWnT",T="ModelPicker-module__modelMetaLabel__YU79V",G="ModelPicker-module__footer__RhVWV",D="ModelPicker-module__actionMenuOverlay___1wse",B="ModelPicker-module__actionList__mxBmh",Y="ModelPicker-module__multiplier__VCXvu";var H=i(81403),W=i(4216);function z({onNewThreadSelected:e,type:l="global",selectedModel:i,onModelSelected:t,disabled:r=!1}){let s=(0,N.b)(),{model:d,availableModels:m,mode:c,messages:u,currentReferences:p,selectedThreadID:h,modelsLoading:g,isWaitingOnCopilot:_,streamingMessage:f}=(0,M.Pk)(),{premiumInteractionsQuotaExceeded:y,overagesEnabled:b,plan:S,licenseType:L}=(0,W.xR)(),R="pending"===g.state,{search:C,pathname:F}=(0,n.zy)(),U=(0,v.useRef)(!1),A=j.W.premiumRequestQuotasEnabled&&y&&!b,E=r;j.W.disableModelPickerWhileStreaming&&(E=r||_||null!==f);let[I,O]=(0,v.useState)(null),q=(0,v.useRef)(!1);function T(e){t?t(e):s.selectModel(e)}return(i||(i=d),(0,v.useEffect)(()=>{R&&L!==k.mF.Unlicensed&&s.fetchModels()},[s,R,L]),(0,v.useEffect)(()=>{if(!U.current&&!R&&m.length>1){let e=w.Jt.getModel(h),l=e?.id,i=m.find(e=>e.id===l&&(A||l!==P.QA))||null;if((!i&&S||S!==k.UH.IndividualFree&&i?.billing?.is_premium&&y&&!b)&&(i=(0,P.fZ)(m,S,y,b)),i){let e=null===h;s.selectModel(i,!0,e),U.current=!0}}},[m,s,d,R,b,S,y,h,A]),(0,v.useEffect)(()=>{if("immersive"!==c)return;let e=new URLSearchParams(C).get("model");if(e&&("/copilot"===F||"/copilot/"===F)){if(d.id===e||q.current||!m?.length)return;q.current=!0;let l=m?.find(l=>l.id===e);l&&(s.selectModel(l,!1),(0,a.BI)("dotcom_chat.activate",{target:"COPILOT_MODEL_LOADED_FROM_URL",mode:"immersive"}))}},[m,s,c,d?.id,F,C]),m.length<2)?null:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)($,{selectedModel:i,models:m,type:l,onModelPicked:e=>{var o,t,r,s,n;"global"===l&&ei(i,e)||((0,a.BI)("dotcom_chat.activate",{target:"MODEL_PICKER_MODEL_SELECT",mode:"immersive",model:e.id,isUnchanged:ei(i,e),type:l}),ei(i,e)?T(e):(o=u,t=e,("message-retry"===l?(0,x.B)(o):o).some(e=>e.skillExecutions?.length)&&(!t.capabilities?.supports?.tool_calls||t.isThirdParty||"o1-ga"===t.capabilities.family))?O({model:e,command:{action:"requires-new-conversation",reason:"external-content"}}):(r=u,s=p,n=e,(("message-retry"===l?(0,x.B)(r):r).some(e=>e.mediaContent?.length)||s.some(e=>"image"===e.type))&&!n.capabilities?.supports?.vision)?O({model:e,command:{action:"requires-new-conversation",reason:"degraded-image-support"}}):T(e))},disabled:E,variant:"invisible",plan:S??void 0,mode:c}),I?.command.action==="requires-new-conversation"&&(0,o.jsx)(ee,{model:I.model,reason:I.command.reason,onDismiss:()=>{(0,a.BI)("dotcom_chat.activate",{target:"MODEL_PICKER_DIALOG_REQUIRES_NEW_CONVERSATION_CANCEL",mode:"immersive",model:I.model.id,type:l}),O(null)},onSwitch:async()=>{(0,a.BI)("dotcom_chat.activate",{target:"MODEL_PICKER_DIALOG_REQUIRES_NEW_CONVERSATION_CONFIRM",mode:"immersive",model:I.model.id,type:l}),O(null),await e(),s.selectModel(I.model)}})]})}function Z(e){let l,i,r,s,a,n,u,p,h,g,_,f=(0,t.c)(23);f[0]!==e?({ref:i,...l}=e,f[0]=e,f[1]=l,f[2]=i):(l=f[1],i=f[2]),f[3]!==l?({selectedModel:n,onModelPicked:a,disabled:s,...r}=l,f[3]=l,f[4]=r,f[5]=s,f[6]=a,f[7]=n):(r=f[4],s=f[5],a=f[6],n=f[7]);let v=`Retry with ${n.displayName}`;return f[8]!==a||f[9]!==n?(u=()=>a(n),f[8]=a,f[9]=n,f[10]=u):u=f[10],f[11]!==s||f[12]!==v||f[13]!==u?(p=(0,o.jsx)(m.K,{variant:"invisible","aria-label":v,onClick:u,icon:d.SyncIcon,disabled:s,className:O}),f[11]=s,f[12]=v,f[13]=u,f[14]=p):p=f[14],f[15]===Symbol.for("react.memo_cache_sentinel")?(h=(0,o.jsx)("div",{className:E}),f[15]=h):h=f[15],f[16]!==r||f[17]!==s?(g=(0,o.jsx)(m.K,{variant:"invisible",icon:d.TriangleDownIcon,"aria-label":"Retry with\u2026",disabled:s,className:I,...r}),f[16]=r,f[17]=s,f[18]=g):g=f[18],f[19]!==i||f[20]!==p||f[21]!==g?(_=(0,o.jsxs)(c.A,{className:A,ref:i,children:[p,h,g]}),f[19]=i,f[20]=p,f[21]=g,f[22]=_):_=f[22],_}function $(e){let l,i,r,s,n,d,m,c,h,g,_,f,b,x,w=(0,t.c)(59),{selectedModel:M,models:N,onModelPicked:R,type:A,disabled:E,variant:I,plan:O,showCategories:q,showMultipliers:T,showPreviewModelsSeparately:G,mode:Y}=e,W=void 0!==T&&T,z=void 0===Y?"immersive":Y,[$,ee]=(0,v.useState)(!1),el=(0,y.d)(),er=O===k.UH.IndividualFree?(f=new Set(N.map(V)),[...N,...et.filter(e=>!f.has(e.displayName)).map(eo)]):N,es=!1!==q&&j.W.immersiveStructuredModelPicker&&(b=er.some(e=>void 0!==e.model_picker_category)&&new Set(er.filter(e=>void 0!==e.model_picker_category).map(e=>e.model_picker_category)).size>1,x=er.some(e=>e.billing?.multiplier!==void 0)&&new Set(er.filter(e=>e.billing?.multiplier!==void 0).map(e=>e.billing?.multiplier)).size>1,b||x),{lowTier:ea,midTier:en,highTier:ed,base:em,preview:ec,custom:eu}=function(e,l){let{shouldShowCategories:i,shouldShowPreviewModelsSeparately:o=!0}=l,[t,r]=e.reduce((e,l)=>(e[+!(0,P.ZL)(l)].push(l),e),[[],[]]),s={};for(let e of t){let l=L(e);s[l]||(s[l]={ownerName:e.custom_model.owner_name,ownerType:e.custom_model.owner_type})}let a=t.reduce((e,l)=>{let i=L(l);if(!e[i]){let o=l.custom_model.owner_name,t=l.custom_model.owner_type;e[i]={displayName:Object.values(s).some(e=>e.ownerType!==t&&e.ownerName.trim().toLocaleLowerCase()===o.trim().toLocaleLowerCase())&&t?`${o} (${t})`:o,ownerType:t,models:[]}}return e[i].models.push(l),e},{});return i?{lowTier:r.filter(e=>void 0!==e.model_picker_category?"lightweight"===e.model_picker_category:e.billing&&(e.billing?.multiplier<1&&e.billing?.multiplier!==0||S.includes(e.displayName))||!1),midTier:r.filter(e=>void 0!==e.model_picker_category?"versatile"===e.model_picker_category:e.billing&&(e.billing?.multiplier===1||e.billing?.multiplier===0)&&!S.includes(e.displayName)||!1),highTier:r.filter(e=>void 0!==e.model_picker_category?"powerful"===e.model_picker_category:e.billing&&e.billing?.multiplier>1||!1),base:[],preview:[],custom:a}:{lowTier:[],midTier:[],highTier:[],base:o?r.filter(e=>!e.preview):r,preview:o?r.filter(e=>e.preview):[],custom:a}}(er,{shouldShowCategories:es,shouldShowPreviewModelsSeparately:void 0===G||G}),ep=Object.keys(eu).length>0;w[0]!==E||w[1]!==M.id||w[2]!==A?(l=e=>{let l=!E&&e;ee(l),l&&(0,a.BI)("dotcom_chat.activate",{target:"MODEL_PICKER_OPEN",mode:"immersive",model:M.id,type:A})},w[0]=E,w[1]=M.id,w[2]=A,w[3]=l):l=w[3];let eh=l,eg=(void 0===I?"invisible":I)??"invisible",e_=(0,v.useRef)(null),[ef,ev]=(0,v.useState)("down"),ey=u.W;w[4]!==E||w[5]!==R||w[6]!==M||w[7]!==eg||w[8]!==A?(i="global"===A?(0,o.jsxs)(u.W.Button,{className:C,variant:eg,disabled:E,children:[(0,o.jsx)("span",{className:"sr-only",children:"Model: "}),(0,o.jsx)("div",{className:F,children:M.displayName})]}):(0,o.jsx)(u.W.Anchor,{"aria-label":"Retry with model",children:(0,o.jsx)(Z,{selectedModel:M,onModelPicked:R,disabled:E})}),w[4]=E,w[5]=R,w[6]=M,w[7]=eg,w[8]=A,w[9]=i):i=w[9];let eb=u.W,ex="global"===A?"medium":"small",ek="assistive"===z?"relative":void 0,ej="assistive"===z?H.E5:void 0;w[10]===Symbol.for("react.memo_cache_sentinel")?(r=e=>{let{position:l}=e;ev(["inside-bottom","outside-bottom"].includes(l.anchorSide)?"down":"up")},w[10]=r):r=w[10];let ew=p.l,eM="global"===A?"single":void 0;w[11]!==ef||w[12]!==R||w[13]!==M||w[14]!==A?(s="message-retry"===A&&"down"===ef&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(J,{selectedModel:M,onModelPicked:R}),(0,o.jsx)(p.l.Divider,{})]}),w[11]=ef,w[12]=R,w[13]=M,w[14]=A,w[15]=s):s=w[15],w[16]!==A?(n="global"===A&&(0,o.jsx)("div",{className:U,children:"Models"}),w[16]=A,w[17]=n):n=w[17];let eN=em.length>0&&(0,o.jsxs)(p.l.Group,{children:["global"!==A&&(0,o.jsx)(p.l.GroupHeading,{children:"Models"}),em.map(e=>(0,o.jsx)(X,{model:e,selected:ei(M,e)&&"global"===A,onModelPicked:R,showMultipliers:W},e.id)),(ea.length>0||en.length>0||ed.length>0||ec.length>0||ep)&&(0,o.jsx)(p.l.Divider,{})]}),eP=ea.length>0&&(0,o.jsxs)(p.l.Group,{children:[(0,o.jsx)(p.l.GroupHeading,{children:"Fast and cost-efficient"}),ea.map(e=>(0,o.jsx)(X,{model:e,selected:ei(M,e)&&"global"===A,onModelPicked:R,showMultipliers:W},e.id)),(en.length>0||ed.length>0)&&(0,o.jsx)(p.l.Divider,{})]}),eS=en.length>0&&(0,o.jsxs)(p.l.Group,{children:[(0,o.jsx)(p.l.GroupHeading,{children:"Versatile and highly intelligent"}),en.map(e=>(0,o.jsx)(X,{model:e,selected:ei(M,e)&&"global"===A,onModelPicked:R,showMultipliers:W},e.id)),(ed.length>0||ec.length>0||ep)&&(0,o.jsx)(p.l.Divider,{})]}),eL=ed.length>0&&(0,o.jsxs)(p.l.Group,{children:[(0,o.jsx)(p.l.GroupHeading,{children:"Most powerful at complex tasks"}),ed.map(e=>(0,o.jsx)(X,{model:e,selected:ei(M,e)&&"global"===A,onModelPicked:R,showMultipliers:W},e.id)),(ec.length>0||ep)&&(0,o.jsx)(p.l.Divider,{})]}),eR=ec.length>0&&(0,o.jsxs)(p.l.Group,{children:[(0,o.jsx)(p.l.GroupHeading,{children:"Preview"}),ec.map(e=>(0,o.jsx)(X,{model:e,selected:ei(M,e)&&"global"===A,onModelPicked:R,showMultipliers:W},e.id)),ep&&(0,o.jsx)(p.l.Divider,{})]});return w[18]!==eu||w[19]!==ep||w[20]!==R||w[21]!==M||w[22]!==W||w[23]!==A?(d=ep&&(0,o.jsx)(Q,{customModelGroups:eu,children:e=>(0,o.jsx)(X,{model:e,selected:ei(M,e)&&"global"===A,onModelPicked:R,showMultipliers:W},e.id)}),w[18]=eu,w[19]=ep,w[20]=R,w[21]=M,w[22]=W,w[23]=A,w[24]=d):d=w[24],w[25]!==ef||w[26]!==R||w[27]!==M||w[28]!==A?(m="message-retry"===A&&"up"===ef&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(p.l.Divider,{}),(0,o.jsx)(J,{selectedModel:M,onModelPicked:R})]}),w[25]=ef,w[26]=R,w[27]=M,w[28]=A,w[29]=m):m=w[29],w[30]!==ew||w[31]!==B||w[32]!==eM||w[33]!==s||w[34]!==n||w[35]!==eN||w[36]!==eP||w[37]!==eS||w[38]!==eL||w[39]!==eR||w[40]!==d||w[41]!==m?(c=(0,o.jsxs)(ew,{className:B,selectionVariant:eM,children:[s,n,eN,eP,eS,eL,eR,d,m]}),w[30]=ew,w[31]=B,w[32]=eM,w[33]=s,w[34]=n,w[35]=eN,w[36]=eP,w[37]=eS,w[38]=eL,w[39]=eR,w[40]=d,w[41]=m,w[42]=c):c=w[42],w[43]===Symbol.for("react.memo_cache_sentinel")?(h=j.W.premiumRequestQuotasEnabled&&(0,o.jsx)(K,{}),w[43]=h):h=w[43],w[44]!==el||w[45]!==D||w[46]!==ek||w[47]!==ej||w[48]!==r||w[49]!==c||w[50]!==eb.Overlay||w[51]!==ex?(g=(0,o.jsxs)(eb.Overlay,{width:ex,side:el,overflow:"auto",className:D,maxHeight:"fit-content",align:"end",position:ek,portalContainerName:ej,onPositionChange:r,children:[c,h]}),w[44]=el,w[45]=D,w[46]=ek,w[47]=ej,w[48]=r,w[49]=c,w[50]=eb.Overlay,w[51]=ex,w[52]=g):g=w[52],w[53]!==ey||w[54]!==eh||w[55]!==$||w[56]!==g||w[57]!==i?(_=(0,o.jsx)("div",{ref:e_,children:(0,o.jsxs)(ey,{open:$,onOpenChange:eh,children:[i,g]})}),w[53]=ey,w[54]=eh,w[55]=$,w[56]=g,w[57]=i,w[58]=_):_=w[58],_}function V(e){return e.displayName}function Q({customModelGroups:e,children:l}){let i=Object.keys(e),t=i.length-1;return i.map((i,r)=>{let s=e[i];return(0,o.jsxs)(p.l.Group,{children:[(0,o.jsx)(p.l.GroupHeading,{children:s.displayName}),s.models.map(l),rm(n),a[0]=m,a[1]=n,a[2]=l):l=a[2],a[3]===Symbol.for("react.memo_cache_sentinel")?(i=(0,o.jsx)(p.l.LeadingVisual,{children:(0,o.jsx)(d.SyncIcon,{})}),a[3]=i):i=a[3],a[4]!==n.displayName?(r=(0,o.jsx)(p.l.Description,{variant:"block",truncate:!0,children:n.displayName}),a[4]=n.displayName,a[5]=r):r=a[5],a[6]!==n.id||a[7]!==l||a[8]!==r?(s=(0,o.jsxs)(p.l.Item,{onSelect:l,children:[i,"Try again",r]},n.id),a[6]=n.id,a[7]=l,a[8]=r,a[9]=s):s=a[9],s}function X(e){let l,i,r,s,a,n,d,m,c,u,h=(0,t.c)(33),{model:_,selected:v,onModelPicked:y,showMultipliers:b}=e,x=void 0!==b&&b,{plan:w,premiumInteractionsQuotaExceeded:M,chatQuotaExceeded:N,overagesEnabled:S}=(0,W.xR)(),L=w===k.UH.IndividualFree&&N,R=_.billing?.is_premium&&w!==k.UH.IndividualFree&&M&&!S;h[0]!==_.billing?.restricted_to||h[1]!==w?(l=w&&_.billing?.restricted_to&&!_.billing?.restricted_to.includes(w),h[0]=_.billing?.restricted_to,h[1]=w,h[2]=l):l=h[2];let C=l,F="upsellModel"in _&&!0===_.upsellModel,U=L||R||C||F;if(h[3]!==_||h[4]!==x){var A;i=x&&!(0,P.ZL)(_)?(A=_.billing?.multiplier,`${Number((A??0).toFixed(2))}x`):null,h[3]=_,h[4]=x,h[5]=i}else i=h[5];let E=i,I=_.id;h[6]!==_||h[7]!==y?(r=()=>y(_),h[6]=_,h[7]=y,h[8]=r):r=h[8];let O=!!U;h[9]!==_?(s=(0,o.jsx)(p.l.LeadingVisual,{children:(0,o.jsx)(el,{model:_})}),h[9]=_,h[10]=s):s=h[10];let G=U&&q;return h[11]!==G?(a=(0,f.$)(G),h[11]=G,h[12]=a):a=h[12],h[13]!==_.vendor?(n=_.vendor&&(0,o.jsxs)(g.s,{children:[", ",_.vendor," provider"]}),h[13]=_.vendor,h[14]=n):n=h[14],h[15]!==_.displayName||h[16]!==n||h[17]!==a?(d=(0,o.jsxs)("span",{className:a,children:[_.displayName,n]}),h[15]=_.displayName,h[16]=n,h[17]=a,h[18]=d):d=h[18],h[19]!==_.id||h[20]!==_.preview?(m=j.W.premiumRequestQuotasEnabled&&_.preview&&_.id!==P.QA&&(0,o.jsx)("span",{className:T,children:"Preview"}),h[19]=_.id,h[20]=_.preview,h[21]=m):m=h[21],h[22]!==E?(c=E&&(0,o.jsx)(p.l.TrailingVisual,{children:(0,o.jsx)("span",{className:Y,children:E})}),h[22]=E,h[23]=c):c=h[23],h[24]!==_.id||h[25]!==v||h[26]!==d||h[27]!==m||h[28]!==c||h[29]!==r||h[30]!==O||h[31]!==s?(u=(0,o.jsxs)(p.l.Item,{onSelect:r,selected:v,disabled:O,children:[s,d,m,c]},I),h[24]=_.id,h[25]=v,h[26]=d,h[27]=m,h[28]=c,h[29]=r,h[30]=O,h[31]=s,h[32]=u):u=h[32],u}function ee(e){let l,i,r,s,a=(0,t.c)(13),{model:n,onDismiss:d,onSwitch:m,reason:c}=e;return a[0]!==d||a[1]!==m?(l=e=>"confirm"===e?m():d(),a[0]=d,a[1]=m,a[2]=l):l=a[2],a[3]!==n||a[4]!==c?(i="external-content"===c&&(0,o.jsxs)("p",{children:["The ",n.displayName," model currently doesn\u2019t support external context from ongoing conversations. Start a new conversation to chat with this model."]}),a[3]=n,a[4]=c,a[5]=i):i=a[5],a[6]!==n||a[7]!==c?(r="degraded-image-support"===c&&(0,o.jsxs)("p",{children:["The ",n.displayName," model doesn\u2019t support answering questions about images. Start a new conversation without images to chat with this model."]}),a[6]=n,a[7]=c,a[8]=r):r=a[8],a[9]!==l||a[10]!==i||a[11]!==r?(s=(0,o.jsxs)(_.K,{title:"Switch model",onClose:l,confirmButtonContent:"New conversation",confirmButtonType:"primary",children:[i,r]}),a[9]=l,a[10]=i,a[11]=r,a[12]=s):s=a[12],s}function el(e){let l,i=(0,t.c)(5),{model:a}=e;if((0,P.ZL)(a)&&a.custom_model.provider){let e;return i[0]!==a.custom_model.provider?(e=(0,o.jsx)(r.v,{provider:a.custom_model.provider}),i[0]=a.custom_model.provider,i[1]=e):e=i[1],e}return i[2]!==a.logoURL||i[3]!==a.vendor?(l=a.logoURL?(0,o.jsx)(s.r,{alt:`${a.vendor} logo`,square:!0,size:18,src:a.logoURL}):(0,o.jsx)(d.CopilotIcon,{}),i[2]=a.logoURL,i[3]=a.vendor,i[4]=l):l=i[4],l}function ei(e,l){return e.id===l.id}function eo(e){let l=e.logoURL?.includes("anthropic")?"Anthropic":e.logoURL?.includes("openai")?"Azure OpenAI":e.logoURL?.includes("gemini")?"Google":e.logoURL?.includes("x-ai")?"xAI":"Unknown";return{...e,name:e.displayName,version:"1.0",vendor:l,model_picker_enabled:!0,hasLimitedCapabilities:!1,isThirdParty:!R.m.has(l),capabilities:{family:"unknown",limits:{max_prompt_tokens:4096},supports:{},tokenizer:"gpt",type:"chat"},preview:e.preview??!1,billing:{...e.billing,is_premium:!0}}}z.displayName="ModelPicker",Z.displayName="RetryButtonGroup",$.displayName="ModelPickerDesign",Q.displayName="CustomModelActionListGroups",K.displayName="ModelPickerFooter",J.displayName="RetryListItem",X.displayName="ModelListItem",ee.displayName="NewConversationConfirmationDialog",el.displayName="ModelVendorIcon";let et=[{id:"grok-code-upgrade",displayName:"Grok Code Fast 1",logoURL:"/images/modules/marketplace/models/families/xai.svg",upsellModel:!0,model_picker_category:"lightweight",billing:{multiplier:.33}},{id:"gemini-3-flash-upgrade",displayName:"Gemini 3 Flash",logoURL:"/images/modules/marketplace/models/families/gemini.svg",upsellModel:!0,preview:!0,model_picker_category:"lightweight",billing:{multiplier:.33}},{id:"gpt-5-upgrade",displayName:"GPT-5",logoURL:"/images/modules/marketplace/models/families/openai-logo.svg",upsellModel:!0,model_picker_category:"versatile",billing:{multiplier:1}},{id:"gpt-5.1-upgrade",displayName:"GPT-5.1",logoURL:"/images/modules/marketplace/models/families/openai-logo.svg",upsellModel:!0,model_picker_category:"versatile",billing:{multiplier:1}},{id:"gpt-5.2-upgrade",displayName:"GPT-5.2",logoURL:"/images/modules/marketplace/models/families/openai-logo.svg",upsellModel:!0,model_picker_category:"versatile",billing:{multiplier:1}},{id:"claude-sonnet-4-upgrade",displayName:"Claude Sonnet 4",logoURL:"/images/modules/marketplace/models/families/anthropic.svg",upsellModel:!0,model_picker_category:"versatile",billing:{multiplier:1}},{id:"claude-sonnet-4.5-upgrade",displayName:"Claude Sonnet 4.5",logoURL:"/images/modules/marketplace/models/families/anthropic.svg",upsellModel:!0,model_picker_category:"versatile",billing:{multiplier:1}},{id:"claude-opus-4.5-upgrade",displayName:"Claude Opus 4.5",logoURL:"/images/modules/marketplace/models/families/anthropic.svg",upsellModel:!0,model_picker_category:"powerful",billing:{multiplier:10}},{id:"gemini-3-pro-upgrade",displayName:"Gemini 3 Pro",logoURL:"/images/modules/marketplace/models/families/gemini.svg",upsellModel:!0,model_picker_category:"powerful",billing:{multiplier:10},preview:!0}]},81403(e,l,i){i.d(l,{Cb:()=>h,hl:()=>g,E5:()=>d,cB:()=>u,tY:()=>c,UJ:()=>_,Dq:()=>m,zc:()=>p});var o=i(74848),t=i(16522),r=i(56149),s=i(20757),a=i(34164),n=i(96540);let d="copilotChatMenuPortalRoot",m="copilotChatMessagesMenuPortalRoot",c="PortalContainerUtils-module__embeddedMenuPortalContainer__CYHiy",u=()=>{let e,l,i,s=(0,t.c)(3),a=(0,n.useRef)(null);return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=()=>{(0,r.cw)(a.current,"copilotChatPortalRoot")},l=[],s[0]=e,s[1]=l):(e=s[0],l=s[1]),(0,n.useEffect)(e,l),s[2]===Symbol.for("react.memo_cache_sentinel")?(i=(0,o.jsx)("div",{ref:a,className:"PortalContainerUtils-module__chatPortalContainer__ZwauZ"}),s[2]=i):i=s[2],i};u.displayName="ChatPortalContainer";let p=e=>{let l,i,s,m,c=(0,t.c)(6),{className:u}=e,p=(0,n.useRef)(null);return c[0]===Symbol.for("react.memo_cache_sentinel")?(l=()=>{(0,r.cw)(p.current,d)},i=[],c[0]=l,c[1]=i):(l=c[0],i=c[1]),(0,n.useEffect)(l,i),c[2]!==u?(s=(0,a.$)("PortalContainerUtils-module__menuPortalContainer__q0Ygl",u),c[2]=u,c[3]=s):s=c[3],c[4]!==s?(m=(0,o.jsx)("div",{ref:p,className:s}),c[4]=s,c[5]=m):m=c[5],m};p.displayName="MenuPortalContainer";let h=()=>{let e,l,i,s=(0,t.c)(3),a=(0,n.useRef)(null);return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=()=>{(0,r.cw)(a.current,m)},l=[],s[0]=e,s[1]=l):(e=s[0],l=s[1]),(0,n.useEffect)(e,l),s[2]===Symbol.for("react.memo_cache_sentinel")?(i=(0,o.jsx)("div",{ref:a}),s[2]=i):i=s[2],i};h.displayName="MessagesPortalContainer";let g=()=>{let e,l,i,s=(0,t.c)(3),a=(0,n.useRef)(null);return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=()=>{(0,r.cw)(a.current,"copilotChatTopicPickerPortalRoot")},l=[],s[0]=e,s[1]=l):(e=s[0],l=s[1]),(0,n.useEffect)(e,l),s[2]===Symbol.for("react.memo_cache_sentinel")?(i=(0,o.jsx)("div",{ref:a}),s[2]=i):i=s[2],i};g.displayName="TopicPickerPortalContainer";let _=e=>{let l,i,r,a,m,c,u=(0,t.c)(10);u[0]!==e?({children:l,portalContainerName:r,...i}=e,u[0]=e,u[1]=l,u[2]=i,u[3]=r):(l=u[1],i=u[2],r=u[3]);let[p,h]=(0,n.useState)(f);if(u[4]===Symbol.for("react.memo_cache_sentinel")?(a=()=>h(!0),m=[],u[4]=a,u[5]=m):(a=u[4],m=u[5]),(0,n.useEffect)(a,m),!p)return null;let g=r||d;return u[6]!==l||u[7]!==i||u[8]!==g?(c=(0,o.jsx)(s.W.Overlay,{...i,portalContainerName:g,children:l}),u[6]=l,u[7]=i,u[8]=g,u[9]=c):c=u[9],c};function f(){return"u">typeof document}_.displayName="ActionMenuOverlay"},86633(e,l,i){i.d(l,{J:()=>a,d:()=>n});var o=i(74848),t=i(16522),r=i(96540);let s=(0,r.createContext)(void 0);s.displayName="OverlayDirectionContext";let a=e=>{let l,i,r=(0,t.c)(5),{preferredOverlaySide:a,children:n}=e;r[0]!==a?(l={preferredOverlaySide:a},r[0]=a,r[1]=l):l=r[1];let d=l;return r[2]!==n||r[3]!==d?(i=(0,o.jsx)(s,{value:d,children:n}),r[2]=n,r[3]=d,r[4]=i):i=r[4],i};a.displayName="OverlayDirectionProvider";let n=()=>{let e=(0,r.use)(s);return e?.preferredOverlaySide??"outside-bottom"}}}]); //# sourceMappingURL=44880-c22b67bf8c595f2d-2fae8b06944362d2.js.map