Repository navigation
No supported models available error #207
Copy link
Copy link
Closed as duplicate
Labels
Description
Activity
revert to 0.0.330 works for me
Question for you @abbas10to8: do you get access to Copilot via an organization, and does that organization have the "Copilot CLI" policy turned on?
Possibly similar issue:
If it type /model it will just crash
.nvm/versions/node/v22.20.0/lib/node_modules/@github/copilot/index.js:1564:603 1561: } 1562: } 1563: } 1564 `,I=new URL("/graphql",dEt(t)),n=await fetch(I.href,{method:"POST",headers:{Authorization:`Bearer : ${e}`,Accept:"application/json"},body:JSON.stringify({query:l})});if(!n.ok)throw new Error(`Failed to fetch Copilot info: ${n.statusText}`);let r=await n.json(),{viewer:a}=r.data;return a.copilotEndpoints.api}c();c();var IYt=Gt(MEt(),1);c();var X2=["claude-sonnet-4.5","claude-sonnet-4","gpt-5"];function Mne(t){return X2.includes(t)}function Hxe(t,e){if(!e)return!0;let l=e.find(I=>I.id===t);return l?l.policy?l.policy.state!=="disabled":!0:!1}function FWe(t){let e=X2.find(l=>Hxe(l,t));if(!e)throw new Error("No supported model available");return e}async function Wx(t,e,l){if(t)return t;if(e){let I=e.getSelectedModel();if(I)return I}if(process.env.COPILOT_MODEL&&Mne(process.env.COPILOT_MODEL))return process.env.COPILOT_MODEL;try{let n=(await Mr.load()||{}).model;if(n&&Mne(n))return n}catch{}return FWe(l)}function DEt(t,e,l){if(t)return t;if(e){let I=e.getSelectedModel();if(I)return I}return process.env.COPILOT_MODEL&&Mne(process.env.COPILOT_MODEL)?process.env.COPILOT_MODEL:FWe(l)}c();import{existsSync as fxe}from"fs";import{mkdir as YOl,readdir as VOl,readFile as wOl,stat as FOl,writeFile as QOl}from"fs/promises";import{homedir as vOl}from"os";import{dirname as COl,join as Dne}from"path";c();c();var gOl=new Error("timeout while waiting for mutex to become available"),iNr=new Error("mutex already locked"),AOl=new Error("request for lock canceled"),yOl=function(t,e,l,I){function n(r){return r instanceof l?r:new l(function(a){a(r)})}return new(l||(l=Promise))(function(r,a){function s(G){try{d(I.next(G))}catch(u){a(u)}}function o(G){try{d(I.throw(G))}catch(u){a(u)}}function d(G){G.done?r(G.value):n(G.value).then(s,o)}d((I=I.apply(t,e||[])).next ())})},Xxe=class{constructor(e,l=AOl){this._value=e,this._cancelError=l,this._queue=[],this._weightedWaiters=[]}acquire(e=1,l=0){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise((I,n)=>{let r={resolve:I,reject:n,weight:e,priority:l},a=PEt(this._queue,s=>l<=s.priority);a===-1&&e<=this._value ?this._dispatchItem(r):this._queue.splice(a+1,0,r)})}runExclusive(e){return yOl(this,arguments,void 0,function*(l,I=1,n=0){let[r,a]=yield this.acquire(I,n);try{return yield l(r)}finally{a()}})}waitForUnlock(e=1,l=0){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return this._couldLockImmediately(e,l)?Promise.resolve():new Promise(I=>{this._weightedWaiters[e-1]||(this._weightedWaiters[e-1]=[]),ROl(this._weightedWaiters[e-1],{resolve:I,priority:l})})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(e){this._value=e,this._dispatchQueue()}release(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);this._value+=e,this._dispatchQueue()}cancel(){this._queue.forEach(e=>e.reject(this._cancelError)),this._queue=[]}_dispatchQueue(){for(this._drainUnlockWa iters();this._queue.length>0&&this._queue[0].weight<=this._value;)this._dispatchItem(this._queue.shift()),this._drainUnlockWaiters()}_dispatchItem(e){let l=this._value;this._value-=e.weight,e.resolve([l,this._newReleaser(e.weight)])}_newReleaser(e){let l=!1;return()=>{l||(l=!0,this.release(e))}}_drainUnlockWaiters(){if(this._queue.length===0)for(let e=this._value;e>0;e--){let l=this._weightedWaiters[e-1];l&&(l.forEach(I=>I.resolve()),this._weightedWaiters[e-1]=[])}else{let e=this._queue[0].priority;for(let l=this._value;l>0;l--){let I=this._weightedWaiters[l-1];if(!I)continue;let n=I.findIndex(r=>r.priority<=e);(n===-1?I:I.splice(0,n)).forEach(r=>r.resolve())}}}_couldLockImmediately(e,l){return (this._queue.length===0||this._queue[0].priority<l)&&e<=this._value}};function ROl(t,e){let l=PEt(t,I=>e.priority<=I.priority);t.splice(l+1,0,e)}function PEt(t,e){for(let l=t.length-1;l>=0;l--)if(e(t[l]))return l;return-1}var EOl=function(t,e,l,I){function n(r){return r instanceof l?r:new l(function(a){a(r)})}return new(l||(l=Promise))(function(r,a){function s(G){try{d(I.next(G))}catch(u){a(u)}}function o(G){try{d(I.throw(G))}catch(u){a(u)}}function d(G){G.done?r(G.value):n(G.value).then(s,o)}d((I=I.apply(t,e||[])).next())})},vWe=class{constructor(e){this._semaphore=new Xxe(1,e)}acquire(){return EOl(this,arguments,void 0,function*(e=0){let[,l]=yield this._semaphore.acquire(1,e);return l})}runExclusive(e,l=0){return this._semaphore.runExclusive(()=>e(),1,l)}isLocked(){return this._semaphore.isLocked()}waitForUnlock(e=0){return this._semaphore.waitForUnlock(1,e)}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}},jEt=function(t,e,l,I){function n(r){return r instanceof l?r:new l(function(a){a(r)})}return new(l||(l=Promise))(function(r,a){function s(G){try{d(I.next(G))}catch(u){a(u)}}function o(G){try{d(I.throw(G))}catch(u){a(u)}}function d(G){G.done?r(G.value):n(G.value).then(s,o)}d((I=I.apply(t,e||[])).next())})};function KEt(t,e,l=gOl){return{acquire:(I,n)=>{let r;if(QWe(t)?r=I:(r=void 0,n=I),r!==void 0&&r<=0)throw new Error(`invalid weight ${r}: must be positive`);return new Promise((a,s)=>jEt(this,void 0,void 0,function*(){let o=!1,d=setTimeout(()=>{o=!0,s(l)},e);try{let G=yield QWe(t)?t.acquire(r,n):t.acquire(n);o?(Array.isArray(G)?G[1]:G)():(clearTimeout(d),a(G))}catch(G){o||(clearTimeout(d),s(G))}}))},runExclusive(I,n,r){return jEt(this,void 0,void 0,function*(){let a=()=>{};try{let s=yield this.acquire(n,r);return Array.isArray(s)?(a=s[1],yield I(s[0])):(a=s,yield I())}finally{a()}})},release(I){t.release(I)},cancel(){return t.cancel()},waitForUnlock:(I,n)=>{let r;if(QWe(t)?r=I:(r=void 0,n=I),r!==void 0&&r<=0)throw new Error(`invalid weight ${r}: must be positive`);return new Promise((a,s)=>{let o=setTimeout(()=>s(l),e);(QWe(t)?t.waitForUnlock(r,n):t.waitForUnlock(n)).then(()=>{cl earTimeout(o),a()})})},isLocked:()=>t.isLocked(),getValue:()=>t.getValue(),setValue:I=>t.setValue(I)}}function QWe(t){return t.getValue!==void 0}var CWe=class{mutexes=new Map;async runExclusive(e,l,I=5e3){let n=this.mutexes.get(e);n||(n=new vWe,n.refCount=0,this.mutexes.set(e,n));let r=n;try{return r.refCount++,await KEt(n,I).runExclusive(l)}finally{--r.refCount===0&&this.mutexes.delete(e)}}};var HWe=(l=>(l.DEFAULT="config",l.MCP="mcp",l))(HWe||{});function qEt(t){return Object.values(HWe).includes(t)}var $Et=".copilot",eYt=new CWe;async function HOl(t){let e=COl(t);try{await YOl(e,{recursive:!0,mode:448})}catch{}}async function XOl(t,e){if(fxe(t))try{let l={},I=await eYt.runExclusive(t,()=>wOl(t,"utf8"));return I.trim().startsWith("{")?l=JSON.parse(I):I.split(` 1565 `).forEach(n=>{let[r,a]=n.split("=").map(s=>s.trim());r&&a&&(l[r]=a)}),e(l)}catch(l){throw new Error(`Failed to read configuration from ${t}: ${l}`)}}async : function fOl(t,e){try{await HOl(t);let l=JSON.stringify(e,null,2);await eYt.runExclusive(t,()=>QOl(t,l,{mode:384}))}catch(l){throw new Error(`Failed to write configuration to ${t}: ${l}`)}}var tYt=(t,e)=>{let l=()=>{let d=qEt(e)?process.env.XDG_CONFIG_HOME:process.env.XDG_STATE_HOME;return d?Dne(d,$Et):Dne(vOl(),$Et)},I=()=>{let d=qEt(e)?"-config":"-state";return`${e}${e=="config"?"":d}`},n=d=>{let G=".json",u=I()+(d?"":G),h=Dne(l(),u,d?`${d}${G}`:"");return!fxe(h)&&fxe(h.replace(/\.json$/,""))&&(h=h.replace(/\.json$/,"")),h},r=async()=>{let d=Dne(l(),I());try{let u=(await VOl(d)).filter(W=>W.endsWith(".json")),h=await Promise.all(u.map(async W=>{let y=Dne(d,W);try{let R=await FOl(y);return{file:W,mtime:R.mtime}}catch{return{file:W,mtime:new Date}}}));return h.sort((W,y)=>y.mtime.getTime()-W.mtime.getTime()),h.map(W=>W.file)}catch{}return[]},a=async d=>await XOl(n(d),t),s=async(d,G)=>{await fOl(n(G),d)};return{load:a,write:s,writeKey:async(d,G,u)=>{let h=await a(u);if(G===void 0){h&&(delete h[d],await s(h,u));return}let W={[d]:G},y;h?y={...h,...W}:y=W,await s(y,u)},path:n,directoryFiles:r}},XWe=(t,e)=>tYt(t,e),fWe=(t,e)=>tYt(t,e);var lYt=Wn({host:Ql(),login:Ql()}),JOl=Wn({banner:V2(["always","once","never"]).optional(),beep:Dm().optional(),last_logged_in_user:lYt.optional(),logged_in_users:dm(lY t).optional(),model:V2(X2).optional(),render_markdown:Dm().optional(),screen_reader:Dm().optional(),theme:Ql().optional(),trusted_folders:dm(Ql()).optional(),capi_h mac_key:Ql().optional(),copilot_hmac_key:Ql().optional(),copilot_integration_id:Ql().optional(),copilot_tokens:IQ(Ql(),Ql()).optional(),copilot_url:Ql().optional()} ),kOl=IQ(Ql(),Tke()),LOl=kOl.transform(t=>(0,IYt.default)(t,(e,l)=>{let I=l.toLowerCase();return I==="github_copilot_integration_id"?"copilot_integration_id":I})),xOl=LOl.pipe(JOl),Mr=XWe(xOl.parse,"config");c();function Jxe(t){return uQ(t,{onHMACAuthInfo:()=>"Logged in with HMAC",onEnvAuthInfo:e=>`Logged in with ${e.envVar} as user: ${e.login}`,onUserAuthInfo:e=>`Logged in as user: ${jne(e)}`,onGhCliAuthInfo:e=>`Logged in with gh as user: ${jne(e)}`})}function Pne(t){return uQ(t,{onHMACAuthInfo:()=>"Unknown (via HMAC)",onEnvAuthInfo:e=>`${e.login} (via ${e.envVar})`,onUserAuthInfo:e=>jne(e),onGhCliAuthInfo:e=>`${e.login} (via gh)`})}function kxe(t,e){return uQ(t,{onHMACAuthInfo:l=>e.type==="hmac"&&l.hmac===e.hmac,onEnvAuthInfo:l=>e.type==="env"&&l.envVar===e.envVar&&l.login===e.login,onUserAuthInfo:l=>e.type==="user"&& gx(l,e),onGhCliAuthInfo:l=>e.type==="gh-cli"&&gx(l,e)})}async function nYt(t,e){let l=await t.getAllAuthAvailable(),I=">",n="-";return l.map(r=>`${e&&kxe(r.authInfo,e)?I:n} ${Pne(r.authInfo)}`)}function jne(t){return t.host!==H2?`${t.login} (${t.host})`:t.login}async function rYt(){let t=await Mr.load()||{};return t?.last_logged_in_user??t.logged_in_users?.[0]??void 0}async function Lxe(t){await Mr.writeKey("last_logged_in_user",t)}async function JWe(){return(await Mr.load()||{}).logged_in_users||[]}async function aYt(t,e){await Mr.writeKey("last_logged_in_user",t),await Mr.writeKey("logged_in_users",e)}async function sYt(t){let e=await JWe();return e.some(I=>gx(I,t))?(e=e.filter(I=>!gx(I,t)),await aYt(void 0,e),e.length>0):!1}async function oYt(t){let e=await JWe();e.some(I=>gx(I,t))||(e.push(t),await aYt(t,e))}function gx(t,e){return t.login===e.login&&t.host===e.host}c();async function cYt(t,e){try{let l=await e.execReturn("gh",["auth","token","--hostname","[github.com](https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgithub.com%2F&data=05%7C02%7CEric.Peters%40gendigital.com%7Ca4786c81820f4b202f8a08de05171909%7C94986b1d466f4fc0ab4b5c725603deab%7C0%7C0%7C638953793936512818%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=cgU8OxrjxvgFmwQiRooiZcYqMzp%2Fb8Sl4xe2pDkWh6c%3D&reserved=0)"],{silent:!0,ignoreReturnCode:!0});if(l.exitCode!==0||!l.stdout.trim()){let n=`Failed to retrieve GitHub token from CLI (exit code: ${l.exitCode})`,r=l.stderr?.trim();return r?t.debug(`${n}: ${r}`):t.debug(n),null}let I=l.stdout.trim();return I.startsWith("ghp_")?(t.debug("GitHub token is a classic PAT"),null):(t.debug("GitHub CLI authenticated with valid token"),I)}catch(l){let I=`Error checking GitHub CLI: ${l}`;return l&&typeof l=="object"&&"stderr"in l&&typeof l.stderr=="string"&&(I+=` (stderr: ${l.stderr.trim()})`),t.debug(I),null}}c();import{existsSync as iYt}from"fs";var kWe="copilot-cli",LWe;async function xWe(){if(LWe)return LWe;let t=await import("keytar-forked-forked");return LWe=t.default||t,LWe}var Kne=(t,e)=>{if(!(!t||!e))return`${t}:${e}`},SOl=()=>{let t=new Map,e=async(o,d)=>{let G=Kne(o,d);if(G)if(iYt(Mr.path()))try{let W=(await Mr.load())?.copilot_tokens?.[G];t.set(G,W&&W.trim()!==""?W:void 0)}catch{t.set(G,void 0)}else t.set(G,void 0)},l=async()=>{if(iYt(Mr.path()))try{let d=(await Mr.load())?.copilot_tokens;if(d){let G=Object.values(d).filter(u=>u&&u.trim()!=="");if(G.length>0)return G[0]}}catch{return}};return{getToken:async(o,d)=>{let G=Kne(o,d);if(G){if(t.has(G))return t.get(G);try{let h=await(await xWe()).getPassword(kWe,G);h?t.set(G,h):await e(o,d)}catch{await e(o,d)}return t.get(G)}},getAnyToken:async()=>{if(t.size>0)return t.values().next().value;let o;try{o=await(await xWe()).findPassword(kWe)}catch{}return o||(o=await l()),o},removeToken:async(o,d)=>{let G=Kne(o,d);if(G){t.delete(G);try{return(await xWe()).deletePassword(kWe,G)}catch{let W=(await Mr.load())?.copilot_tokens??{};return delete W[G],await Mr.writeKey("copilot_tokens",W),Promise.resolve(!0)}}},storeToken:async(o,d,G)=>{if(!o)throw new Error("No token provided to store");let u=Kne(d,G);if(u){t.set(u,o);try{return await(await xWe()).setPassword(kWe,u,o),!0}catch{return!1}}},storeCurrentTokenInConfig:async(o,d)=>{let G=Kne(o,d);if(!G)return;let u=t.get(G);if(!u)return;let W=(await Mr.load())?.copilot_tokens??{};W[G]=u,await Mr.writeKey("copilot_tokens",W)}}},pQ=SOl();function uQ(t,e){switch(t.type){case"hmac":return e.onHMACAuthInfo(t);case"env":return e.onEnvAuthInfo(t);case"user":return e.onUserAuthInfo(t);case"gh-cli":return e.onGhCliAuthInfo(t);default:{let l=t;throw new Error(`unexpected auth info type: ${JSON.stringify(t)}`)}}}async function ZD(t){return await uQ(t,{onHMACAuthInfo:async()=>{},onEnvAuthInfo:async e=>e.token,onUserAuthInfo:async e=>await pQ.getToken(e.host,e.login)||void 0,onGhCliAuthInfo:async e=>e.token})}var xxe=class{currentAuthInfo=null;logger=new Xh;authCallbacks=[];setLogger(e){this.logger=e}onAuthChange(e){this.authCallbacks.push(e)}removeAuthCallback(e){let l=this.authCallbacks.indexOf(e);l>-1&&this.authCallbacks.splice(l,1)}async notifyAuthChange(e,l){this.currentAuthInfo=e;for(let I of this.authCallbacks)try{await I(e,l)}catch(n){this.logger.error(`Error in auth change callback: ${n}`)}}async tryHMACLogin(){let e=await Mr.load()||{},l=e.copilot_hmac_key||e.capi_hmac_key||process.env.CAPI_HMAC_KEY||process.env.COPILOT_HMAC_KEY;return l?[{authInfo:{type:"hmac",hmac:l}}]:[]}async tryGitHubTokenLogin(){let e=process.env.GH_TOKEN||process.env.GITHUB_TOKEN;if(!e)return[];if(e.startsWith("ghp_"))return this.logger.error("Classic PATs are not supported. Please use fine-grained PATs or other supported token types."),[];if(!e.startsWith("gho_")&&!e.startsWith("ghu_")&&!e.startsWith("github_pat_"))return this.logger.error("Unsupported token type, ignoring."),[];try{let l=await dD(H2,e);return[{authInfo:{type:"env",host:H2,login:l,token:e,envVar:process.env.GH_TOKEN?"GH_TOKEN":"GITHUB_TOKEN"},token:e}]}catch(l){l instanceof Sf?this.logger.error(`Failed to fetch PAT user login (${l.status}): ${l.message}`):this.logger.error("Failed to fetch PAT user login")}return[]}async tryGhCliTokenLogin(){let e=new W0(this.logger),l=await cYt(this.logger,e);if(!l)return[];try{let I=await dD(H2,l);return[{authInfo:{type:"gh-cli",host:H2,login:I,token:l},token:l}]}catch(I){I instanceof Sf?this.logger.error(`Failed to fetch GitHub CLI user login (${I.status}): ${I.message}`):this.logger.error("Failed to fetch GitHub CLI user login")}return[]}async tryLoginToken(){let e=await rYt(),l;if(e){if(l=await pQ.getToken(e.host,e.login),!l||l.trim()==="")return[]}else{if(l=await pQ.getAnyToken(),!l||l.trim()==="")return[];e={host:H2,login:await dD(H2,l)}}return[{authInfo:{type:"user",host:e.host,login:e.login},token:l}]}async getAllGitHubLoginTokens(){let l=(await this.tryGitHubTokenLogin()).at(0),I=await JWe(),n=[];for(let r of I){if(l?.authInfo.type==="user"&&gx(r,l.authInfo))continue;let a=await pQ.getToken(r.host,r.login);a&&n.push({authInfo:{type:"user",host:r.host,login:r.login},token:a})}return n}async getAllAuthAvailable(){let e=[],l=this.getPrioritizedAuthMethods(!0);for(let I of l){let n=await I();e.push(...n)}return e}getPrioritizedAuthMethods(e){return[this.tryHMACLogin.bind(this),thi s.tryGitHubTokenLogin.bind(this),e?this.getAllGitHubLoginTokens.bind(this):this.tryLoginToken.bind(this),this.tryGhCliTokenLogin.bind(this)]}async loadAuthInfo(){let e=this.currentAuthInfo!==null;this.currentAuthInfo=null;let l=this.getPrioritizedAuthMethods(!1);for(let I of l){let n=await I();if(n.length>0){let{authInfo:r,token:a}=n[0];r.type==="user"&&Lxe({host:r.host,login:r.login}),this.currentAuthInfo=r,e||await this.notifyAuthChange(r,a);return}}}async getCurrentAuthInfo(){return this.currentAuthInfo||await this.loadAuthInfo(),this.currentAuthInfo}async loginUser(e,l){let I={host:e,login:l},n={type:"user",...I};await oYt(I);let r=await ZD(n);await this.notifyAuthChange(n,r)}async switchToAuth(e){this.currentAuthInfo=e.authInfo,e.authInfo.type==="user"&&await Lxe({host:e.authInfo.host,login:e.authInfo.login}),await this.notifyAuthChange(e.authInfo,e.token)}async logout(){if(!this.currentAuthInfo)return!1;let e=await uQ(this.currentAuthInfo,{onHMACAuthInfo:async()=>!1,onEnvAuthInfo:async()=>!1,onUserAuthInfo:async l=>(await pQ.removeToken(l.host,l.login),await sYt(l)),onGhCliAuthInfo:async()=>!1});return await this.notifyAuthChange(null),e}},BOl=new xxe,SWe=BOl;var ND=class t extends GWe{constructor(l,I,n,r){super(l,I,r);this.exec=n}static GITHUB_SERVER_NAME="github-mcp-server";hasUserConfiguredGitHubServer=!1;lastGitHubAuthInfo=null;lastGitHubToken=null;githubMcpToken;async configureGitHubAuth(l,I){if(this.lastGitHubAuthInfo=l,this.lastGitHubToken=I,this.isServerDisabled(t.GITHUB_SERVER_NAME))return this.logger.debug("GitHub MCP server is disabled, skipping auto-configuration"),!1;if(this.hasUserConfiguredGitHubServer)return this.logger.debug("User has explicitly configured github-mcp-server, ignoring auth changes"),!1;if(await this.shouldHandleGitHubAuth(l)&&I){if(I===this.githubMcpToken)return!1;this.githubMcpToken=I;let r=await this.createGitHubServerConfig(I,l);try{return await this.restartServer(t.GITHUB_SERVER_NAME,r),this.logger.log("GitHub MCP server configured after authentication"),!0}catch(a){return this.logger.error(`Failed to configure GitHub MCP server after auth: ${a}`),!1}}return!1}async removeGitHubAuth(){if(this.hasUserConfiguredGitHubServer)return this.logger.debug("User has explicitly configured github-mcp-server, ignoring auth changes"),!1;this.githubMcpToken=void 0;try{return this.isServerRunning(t.GITHUB_SERVER_NAME)?(await this.stopServer(t.GITHUB_SERVER_NAME),this.logger.debug("Removed GitHub MCP server"),!0):!1}catch(l){return this.logger.error(`Failed to remove GitHub server: ${l}`),!1}}async shouldHandleGitHubAuth(l){return await uQ(l,{onHMACAuthInfo:async()=>!1,onEnvAuthInfo:async()=>!0,onUserAuthInfo:async()=>!0,onGhCliAuthInfo:async()=>!0})}async createGitHubServerConfig(l,I){let n="[https://api.githubcopilot.com/mcp/readonly](https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Freadonly&data=05%7C02%7CEric.Peters%40gendigital.com%7Ca4786c81820f4b202f8a08de05171909%7C94986b1d466f4fc0ab4b5c725603deab%7C0%7C0%7C638953793936559671%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=8l24mUmuqNtZMlXQh2CcRv%2BgXIu32%2FVLSsrmluuiLck%3D&reserved=0)";try{let r=await uQ(I,{onHMACAuthInfo:async()=>"[https://github.com](https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2F&data=05%7C02%7CEric.Peters%40gendigital.com%7Ca4786c81820f4b202f8a08de05171909%7C94986b1d466f4fc0ab4b5c725603deab%7C0%7C0%7C638953793936610396%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=X4%2BpDxds6buSbEQFWGXe7p3CKkScQHTl2r4YAk7pLfg%3D&reserved=0)",onEnvAuthInfo:async s=>s.host,onUserAuthInfo:async s=>s.host,onGhCliAuthInfo:async s=>s.host}),a=await mD(r,l);n=new URL("/mcp/readonly",a).toString(),this.logger.log(`Using Copilot API endpoint: ${n}`)}catch(r){this.logger.error(`Failed to fetch Copilot URL, using default: ${r}`)}return{type:"http",url:n,headers:{Authorization:"Bearer "+l,"X-MCP-Toolsets":" repos,issues,users,pull_requests,code_security,secret_protection,actions","X-MCP-Host":"copilot-cli"},tools:["*"],isDefaultServer:!0,filterMapping:{get_issue:"markd own",get_issue_comments:"markdown",get_pull_request:"markdown",get_pull_request_comments:"markdown",get_pull_request_reviews:"markdown"}}}async injectDefaultServers(l){if(l.mcpServers[t.GITHUB_SERVER_NAME]){this.hasUserConfiguredGitHubServer=!0,this.logger.debug("User has already configured github-mcp-server, skipping auto-configuration");return}}async startBuiltInServer(l){l===t.GITHUB_SERVER_NAME&&!this.hasUserConfiguredGitHubServer?this.lastGitHubAuthInfo&&this.lastGitHubToken?(this.logger.log("Attempting to configure GitHub MCP server using stored authentication"),await this.configureGitHubAuth(this.lastGitHubAuthInfo,this.lastGitHubToken)?this.logger.log("GitHub MCP server configured successfully after enabling"):this.logger.log("GitHub MCP server enabled but could not be configured - authentication may be invalid or insufficient")):this.logger.log("GitHub MCP server enabled - will be configured automatically when authentication becomes available"):await super.startBuiltInServer(l)}};c();c();var TOl=Wn({commandHistory:dm(Ql())}),Sxe=fWe(TOl.parse,"command-history");var UOl=50,Bxe=class{commandHistory=[];historyIndex=-1;isNavigatingHistory=!1;unSubmittedCommand=null;async initialize(){try{let e=await Sxe.load();this.commandHistory=e?.commandHistory||[],this.resetNavigation()}catch{this.commandHistory=[]}}async addCommand(e){this.commandHistory=this.commandHistor y.filter(l=>l!==e),this.commandHistory.unshift(e),this.commandHistory=this.commandHistory.slice(0,UOl),this.resetNavigation(),this.unSubmittedCommand=null,await this.saveHistory()}async updateCurrentCommand(e){this.historyIndex!==-1?(this.commandHistory[this.historyIndex]=e,await this.saveHistory()):this.unSubmittedCommand=e}navigateUp(e){if(this.commandHistory.length===0)return;let l=this.historyIndex+1;if(l<this.commandHistory.length){this.historyIndex=l,this.isNavigatingHistory=!0;let I=this.getCurrentHistoryItem();I&&e.setText(I)}}navigateDown(e){if(this.historyIndex===-1)return;if(this.historyIndex===0)this.resetNavigation();else{let I=this.historyIndex-1;this.historyIndex=I,this.isNavigatingHistory=!0}let l=this.getCurrentHistoryItem();l?(e.setText(l),e.setCursorPosition(0)):e.clear()}resetNavi gation(){this.historyIndex=-1,this.isNavigatingHistory=!1}getHistoryIndex(){return this.historyIndex}getHistory(){return this.commandHistory}getCurrentHistoryItem(){return this.historyIndex===-1?this.unSubmittedCommand?this.unSubmittedCommand:void 0:this.commandHistory[this.historyIndex]}isNavigating(){return this.isNavigatingHistory}setNavigating(e){this.isNavigatingHistory=e}async saveHistory(){try{await Sxe.write({commandHistory:this.commandHistory})}catch{}}},f2=new Bxe;c();c();function dYt(t,e){var l=Object.keys(t);if(Object.getOwnPropertySymbols){var I=Object.getOwnPropertySymbols(t);e&&(I=I.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),l.push.apply(l,I)}return l}function mYt(t){for(var e=1;e<arguments.length;e++){var l=arguments[e]!=null?arguments[e]:{};e%2?dYt(Object(l),!0).forEach(function(I){_Ol(t,I,l[I])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.get OwnPropertyDescriptors(l)):dYt(Object(l)).forEach(function(I){Object.defineProperty(t,I,Object.getOwnPropertyDescriptor(l,I))})}return t}function _Ol(t,e,l){return e=zOl(e),e in t?Object.defineProperty(t,e,{value:l,enumerable:!0,configurable:!0,writable:!0}):t[e]=l,t}function zOl(t){var e=MOl(t,"string");return typeof e=="symbol"?e:String(e)}function MOl(t,e){if(typeof t!="object"||t===null)return t;var l=t[Symbol.toPrimitive];if(l!==void 0){var I=l.call(t,e||"default");if(typeof I!="object")return I;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var DOl=bYt({}),GYt=DOl;function bYt(t){return e.withOptions=l=>bYt(mYt(mYt({},t),l)),e;function e(l,...I){let n=typeof l=="string"?[l]:l.raw,{escapeSpecialCharacters:r=Array.isArray(l),trimWhitespace:a=!0}=t,s="";for(let G=0;G<n.length;G++){let u=n[G];r&&(u=u.replace(/\\\n[ \t]*/g,"").replace(/\\`/g,"`").replace(/\\\$/g,"$").replace(/\\\{/g,"{")),s+=u,G<I.length&&(s+=I[G])}let o=s.split(` 1566: `),d=null;for(let G of o){let u=G.match(/^(\s+)\S+/);if(u){let h=u[1].length;d?d=Math.min(d,h):d=h}}if(d!==null){let G=d;s=o.map(u=>u[0]===" "||u[0]===" "?u.slice(G):u).join(` 1567: `)}return a&&(s=s.trim()),r&&(s=s.replace(/\\n/g,` - FWe (.nvm/versions/node/v22.20.0/lib/node_modules/@github/copilot/index.js:1564:603) - kLt (.nvm/versions/node/v22.20.0/lib/node_modules/@github/copilot/index.js:1912:55895) - react-stack-bottom-frame (.nvm/versions/node/v22.20.0/lib/node_modules/@github/copilot/index.js:228:12764) - D2 (.nvm/versions/node/v22.20.0/lib/node_modules/@github/copilot/index.js:138:807) - L1 (.nvm/versions/node/v22.20.0/lib/node_modules/@github/copilot/index.js:145:18038) - fy (.nvm/versions/node/v22.20.0/lib/node_modules/@github/copilot/index.js:154:10074) - rI (.nvm/versions/node/v22.20.0/lib/node_modules/@github/copilot/index.js:103:110) - K1 (.nvm/versions/node/v22.20.0/lib/node_modules/@github/copilot/index.js:167:29983) - P5 (.nvm/versions/node/v22.20.0/lib/node_modules/@github/copilot/index.js:167:28575) - j5 (.nvm/versions/node/v22.20.0/lib/node_modules/@github/copilot/index.js:167:28404)I've opened #229 to track a more informative error message when you're blocked by policy -- I'm going to close this in favor of that!

Describe the bug
No supported models available error in windows
Affected version
0.0.334
Steps to reproduce the behavior
No response
Expected behavior
No response
Additional context