Skip to content

Execution failed: Error: Failed to get response from the AI model; retried 5 times #1808

@nicodemuz

Description

@nicodemuz

Describe the bug


...

✗ AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

    aB(t[TNe]===0);return}if(t[hU]&&!t[SNe]){t[hU](),t[hU]=null;return}if(t[ag]&&t[ag].resume(),t[Wgt])t[bU]=2;else 
  if(t[bU]===2){e?(t[bU]=1,queueMicrotask(()=>Zbn(t))):Zbn(t);continue}if(t[TNe]===0||t[BNe]>=(Wbn(t)||1))return;let 
  n=t[dX][t[uX]];if(t[rS].protocol==="https:"&&t[gU]!==n.servername){if(t[BNe]>0)return;t[gU]=n.servername,t[ag]?.destroy(new Edo("servername changed"),()=>{t[ag]=null,vgt(t)})}if(t[Sle])r
  eturn;if(!t[ag]){wbn(t);return}if(t[ag].destroyed||t[ag].busy(n))return;!n.aborted&&t[ag].write(n)?t[uX]++:t[dX].splice(t[uX],1)}}vbn.exports=wgt});var Cgt=x((hyi,Cbn)=>{"use strict";var
   EJe=class{bottom=0;top=0;list=new Array(2048).fill(void 0);next=null;isEmpty(){return 
  this.top===this.bottom}isFull(){return(this.top+1&2047)===this.bottom}push(e){this.list[this.top]=e,this.top=this.top+1&2047}shift(){let e=this.list[this.bottom];return e===void 
  0?null:(this.list[this.bottom]=void 0,this.bottom=this.bottom+1&2047,e)}};Cbn.exports=class{constructor(){this.head=this.tail=new EJe}isEmpty(){return 
  this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new EJe),this.head.push(e)}shift(){let e=this.tail,n=e.shift();return 
  e.isEmpty()&&e.next!==null&&(this.tail=e.next,e.next=null),n}}});var Xgt=x((byi,Sbn)=>{"use strict";var{PoolStats:jdo}=XGt(),Kdo=Eq(),qdo=Cgt(),{kConnected:Ygt,kSize:Ybn,kRunning:Vbn,kPe
  nding:Fbn,kQueued:_Ne,kBusy:$do,kFree:euo,kUrl:tuo,kClose:nuo,kDestroy:ruo,kDispatch:ouo}=Ym(),bA=Symbol("clients"),DW=Symbol("needDrain"),ONe=Symbol("queue"),Vgt=Symbol("closed 
  resolve"),Fgt=Symbol("onDrain"),Qbn=Symbol("onConnect"),Hbn=Symbol("onDisconnect"),Xbn=Symbol("onConnectionError"),Qgt=Symbol("get dispatcher"),kbn=Symbol("add 
  client"),xbn=Symbol("remove client"),Hgt=class extends Kdo{[ONe]=new qdo;[_Ne]=0;[bA]=[];[DW]=!1;[Fgt](e,n,r){let o=this[ONe],s=!1;for(;!s;){let 
  l=o.shift();if(!l)break;this[_Ne]--,s=!e.dispatch(l.opts,l.handler)}if(e[DW]=s,!s&&this[DW]&&(this[DW]=!1,this.emit("drain",n,[this,...r])),this[Vgt]&&o.isEmpty()){let l=new 
  Array(this[bA].length);for(let a=0;a<this[bA].length;a++)l[a]=this[bA][a].close();Promise.all(l).then(this[Vgt])}}[Qbn]=(e,n)=>{this.emit("connect",e,[this,...n])};[Hbn]=(e,n,r)=>{this.e
  mit("disconnect",e,[this,...n],r)};[Xbn]=(e,n,r)=>{this.emit("connectionError",e,[this,...n],r)};get[$do](){return this[DW]}get[Ygt](){let e=0;for(let{[Ygt]:n}of this[bA])e+=n;return 
  e}get[euo](){let e=0;for(let{[Ygt]:n,[DW]:r}of this[bA])e+=n&&!r;return e}get[Fbn](){let e=this[_Ne];for(let{[Fbn]:n}of this[bA])e+=n;return e}get[Vbn](){let e=0;for(let{[Vbn]:n}of 
  this[bA])e+=n;return e}get[Ybn](){let e=this[_Ne];for(let{[Ybn]:n}of this[bA])e+=n;return e}get stats(){return new jdo(this)}[nuo](){if(this[ONe].isEmpty()){let e=new 
  Array(this[bA].length);for(let n=0;n<this[bA].length;n++)e[n]=this[bA][n].close();return Promise.all(e)}else return new Promise(e=>{this[Vgt]=e})}[ruo](e){for(;;){let 
  r=this[ONe].shift();if(!r)break;r.handler.onError(e)}let n=new Array(this[bA].length);for(let r=0;r<this[bA].length;r++)n[r]=this[bA][r].destroy(e);return Promise.all(n)}[ouo](e,n){let 
  r=this[Qgt]();return r?r.dispatch(e,n)||(r[DW]=!0,this[DW]=!this[Qgt]()):(this[DW]=!0,this[ONe].push({opts:e,handler:n}),this[_Ne]++),!this[DW]}[kbn](e){return 
  e.on("drain",this[Fgt].bind(this,e)).on("connect",this[Qbn]).on("disconnect",this[Hbn]).on("connectionError",this[Xbn]),this[bA].push(e),this[DW]&&queueMicrotask(()=>{this[DW]&&this[Fgt]
  (e,e[tuo],[e,this])}),this}[xbn](e){e.close(()=>{let n=this[bA].indexOf(e);n!==-1&&this[bA].splice(n,1)}),this[DW]=this[bA].some(n=>!n[DW]&&n.closed!==!0&&n.destroyed!==!0)}};Sbn.exports
  ={PoolBase:Hgt,kClients:bA,kNeedDrain:DW,kAddClient:kbn,kRemoveClient:xbn,kGetDispatcher:Qgt}});var Lle=x((Gyi,Tbn)=>{"use 
  strict";var{PoolBase:suo,kClients:WJe,kNeedDrain:iuo,kAddClient:luo,kGetDispatcher:auo,kRemoveClient:cuo}=Xgt(),Iuo=Qq(),{InvalidArgumentError:kgt}=ja(),Lbn=da(),{kUrl:Jbn}=Ym(),duo=RNe(
  ),RJe=Symbol("options"),xgt=Symbol("connections"),Bbn=Symbol("factory");function uuo(t,e){return new Iuo(t,e)}var Sgt=class extends 
  suo{constructor(e,{connections:n,factory:r=uuo,connect:o,connectTimeout:s,tls:l,maxCachedSessions:a,socketPath:c,autoSelectFamily:I,autoSelectFamilyAttemptTimeout:d,allowH2:u,clientTtl:p
  ,...m}={}){if(n!=null&&(!Number.isFinite(n)||n<0))throw new kgt("invalid connections");if(typeof r!="function")throw new kgt("factory must be a function.");if(o!=null&&typeof 
  o!="function"&&typeof o!="object")throw new kgt("connect must be a function or an object");typeof 
  o!="function"&&(o=duo({...l,maxCachedSessions:a,allowH2:u,socketPath:c,timeout:s,...typeof I=="boolean"?{autoSelectFamily:I,autoSelectFamilyAttemptTimeout:d}:void 0,...o})),super(),this[
  xgt]=n||null,this[Jbn]=Lbn.parseOrigin(e),this[RJe]={...Lbn.deepClone(m),connect:o,allowH2:u,clientTtl:p},this[RJe].interceptors=m.interceptors?{...m.interceptors}:void 
  0,this[Bbn]=r,this.on("connect",(h,G)=>{if(p!=null&&p>0)for(let g of G)Object.assign(g,{ttl:Date.now()})}),this.on("connectionError",(h,G,g)=>{for(let f of G){let 
  N=this[WJe].indexOf(f);N!==-1&&this[WJe].splice(N,1)}})}[auo](){let e=this[RJe].clientTtl;for(let n of this[WJe])if(e!=null&&e>0&&n.ttl&&Date.now()-n.ttl>e)this[cuo](n);else 
  if(!n[iuo])return n;if(!this[xgt]||this[WJe].length<this[xgt]){let n=this[Bbn](this[Jbn],this[RJe]);return this[luo](n),n}}};Tbn.exports=Sgt});var Dbn=x((gyi,Ubn)=>{"use 
  strict";var{BalancedPoolMissingUpstreamError:muo,InvalidArgumentError:puo}=ja(),{PoolBase:huo,kClients:$Z,kNeedDrain:MNe,kAddClient:buo,kRemoveClient:Guo,kGetDispatcher:guo}=Xgt(),Auo=Ll
  e(),{kUrl:Lgt}=Ym(),{parseOrigin:_bn}=da(),Obn=Symbol("factory"),wJe=Symbol("options"),Mbn=Symbol("kGreatestCommonDivisor"),Hq=Symbol("kCurrentWeight"),Xq=Symbol("kIndex"),DV=Symbol("kWe
  ight"),vJe=Symbol("kMaxWeightPerServer"),CJe=Symbol("kErrorPenalty");function fuo(t,e){if(t===0)return e;for(;e!==0;){let n=e;e=t%e,t=n}return t}function yuo(t,e){return new Auo(t,e)}var
   Jgt=class extends huo{constructor(e=[],{factory:n=yuo,...r}={}){if(typeof n!="function")throw new puo("factory must be a 
  function.");super(),this[wJe]=r,this[Xq]=-1,this[Hq]=0,this[vJe]=this[wJe].maxWeightPerServer||100,this[CJe]=this[wJe].errorPenalty||15,Array.isArray(e)||(e=[e]),this[Obn]=n;for(let o of
   e)this.addUpstream(o);this._updateBalancedPoolStats()}addUpstream(e){let n=_bn(e).origin;if(this[$Z].find(o=>o[Lgt].origin===n&&o.closed!==!0&&o.destroyed!==!0))return this;let 
  r=this[Obn](n,Object.assign({},this[wJe]));this[buo](r),r.on("connect",()=>{r[DV]=Math.min(this[vJe],r[DV]+this[CJe])}),r.on("connectionError",()=>{r[DV]=Math.max(1,r[DV]-this[CJe]),this
  ._updateBalancedPoolStats()}),r.on("disconnect",(...o)=>{let s=o[2];s&&s.code==="UND_ERR_SOCKET"&&(r[DV]=Math.max(1,r[DV]-this[CJe]),this._updateBalancedPoolStats())});for(let o of 
  this[$Z])o[DV]=this[vJe];return this._updateBalancedPoolStats(),this}_updateBalancedPoolStats(){let e=0;for(let 
  n=0;n<this[$Z].length;n++)e=fuo(this[$Z][n][DV],e);this[Mbn]=e}removeUpstream(e){let n=_bn(e).origin,r=this[$Z].find(o=>o[Lgt].origin===n&&o.closed!==!0&&o.destroyed!==!0);return 
  r&&this[Guo](r),this}get upstreams(){return this[$Z].filter(e=>e.closed!==!0&&e.destroyed!==!0).map(e=>e[Lgt].origin)}[guo](){if(this[$Z].length===0)throw new 
  muo;if(!this[$Z].find(s=>!s[MNe]&&s.closed!==!0&&s.destroyed!==!0)||this[$Z].map(s=>s[MNe]).reduce((s,l)=>s&&l,!0))return;let 
  r=0,o=this[$Z].findIndex(s=>!s[MNe]);for(;r++<this[$Z].length;){this[Xq]=(this[Xq]+1)%this[$Z].length;let 
  s=this[$Z][this[Xq]];if(s[DV]>this[$Z][o][DV]&&!s[MNe]&&(o=this[Xq]),this[Xq]===0&&(this[Hq]=this[Hq]-this[Mbn],this[Hq]<=0&&(this[Hq]=this[vJe])),s[DV]>=this[Hq]&&!s[MNe])return 
  s}return this[Hq]=this[$Z][o][DV],this[Xq]=o,this[$Z][o]}};Ubn.exports=Jgt});var kq=x((Ayi,eGn)=>{"use 
  strict";var{InvalidArgumentError:YJe,MaxOriginsReachedError:Nuo}=ja(),{kClients:zV,kRunning:zbn,kClose:Zuo,kDestroy:Euo,kDispatch:Wuo,kUrl:Ruo}=Ym(),wuo=Eq(),vuo=Lle(),Cuo=Qq(),Yuo=da(),
  Pbn=Symbol("onConnect"),jbn=Symbol("onDisconnect"),Kbn=Symbol("onConnectionError"),qbn=Symbol("onDrain"),$bn=Symbol("factory"),Bgt=Symbol("options"),UNe=Symbol("origins");function 
  Vuo(t,e){return e&&e.connections===1?new Cuo(t,e):new vuo(t,e)}var Tgt=class extends wuo{constructor({factory:e=Vuo,maxOrigins:n=1/0,connect:r,...o}={}){if(typeof e!="function")throw new
   YJe("factory must be a function.");if(r!=null&&typeof r!="function"&&typeof r!="object")throw new YJe("connect must be a function or an object");if(typeof 
  n!="number"||Number.isNaN(n)||n<=0)throw new YJe("maxOrigins must be a number greater than 0");super(),r&&typeof 
  r!="function"&&(r={...r}),this[Bgt]={...Yuo.deepClone(o),maxOrigins:n,connect:r},this[$bn]=e,this[zV]=new Map,this[UNe]=new 
  Set,this[qbn]=(s,l)=>{this.emit("drain",s,[this,...l])},this[Pbn]=(s,l)=>{this.emit("connect",s,[this,...l])},this[jbn]=(s,l,a)=>{this.emit("disconnect",s,[this,...l],a)},this[Kbn]=(s,l,
  a)=>{this.emit("connectionError",s,[this,...l],a)}}get[zbn](){let e=0;for(let{dispatcher:n}of this[zV].values())e+=n[zbn];return e}[Wuo](e,n){let r;if(e.origin&&(typeof 
  e.origin=="string"||e.origin instanceof URL))r=String(e.origin);else throw new YJe("opts.origin must be a non-empty string or 
  URL.");if(this[UNe].size>=this[Bgt].maxOrigins&&!this[UNe].has(r))throw new Nuo;let o=this[zV].get(r),s=o&&o.dispatcher;if(!s){let l=a=>{let c=this[zV].get(r);c&&(a&&(c.count-=1),c.count
  <=0&&(this[zV].delete(r),c.dispatcher.close()),this[UNe].delete(r))};s=this[$bn](e.origin,this[Bgt]).on("drain",this[qbn]).on("connect",(a,c)=>{let I=this[zV].get(r);I&&(I.count+=1),this
  [Pbn](a,c)}).on("disconnect",(a,c,I)=>{l(!0),this[jbn](a,c,I)}).on("connectionError",(a,c,I)=>{l(!1),this[Kbn](a,c,I)}),this[zV].set(r,{count:0,dispatcher:s}),this[UNe].add(r)}return 
  s.dispatch(e,n)}[Zuo](){let e=[];for(let{dispatcher:n}of this[zV].values())e.push(n.close());return this[zV].clear(),Promise.all(e)}[Euo](e){let n=[];for(let{dispatcher:r}of 
  this[zV].values())n.push(r.destroy(e));return this[zV].clear(),Promise.all(n)}get stats(){let e={};for(let{dispatcher:n}of this[zV].values())n.stats&&(e[n[Ruo].origin]=n.stats);return 
  e}};eGn.exports=Tgt});var Dgt=x((fyi,dGn)=>{"use strict";var{kProxy:_gt,kClose:iGn,kDestroy:lGn,kDispatch:tGn}=Ym(),Fuo=kq(),aGn=Lle(),cGn=Eq(),{InvalidArgumentError:Jle,RequestAbortedEr
  ror:Quo,SecureProxyConnectionError:Huo}=ja(),nGn=RNe(),IGn=Qq(),VJe=Symbol("proxy agent"),FJe=Symbol("proxy client"),AU=Symbol("proxy headers"),Ogt=Symbol("request tls 
  settings"),rGn=Symbol("proxy tls settings"),oGn=Symbol("connect endpoint function"),sGn=Symbol("tunnel proxy");function Xuo(t){return t==="https:"?443:80}function kuo(t,e){return new 
  aGn(t,e)}var xuo=()=>{};function Suo(t,e){return e.connections===1?new IGn(t,e):new aGn(t,e)}var Mgt=class extends cGn{#e;constructor(e,{headers:n={},connect:r,factory:o}){if(!e)throw 
  new Jle("Proxy URL is mandatory");super(),this[AU]=n,o?this.#e=o(e,{connect:r}):this.#e=new IGn(e,{connect:r})}[tGn](e,n){let r=n.onHeaders;n.onHeaders=function(a,c,I){if(a===407){typeof
   n.onError=="function"&&n.onError(new Jle("Proxy Authentication Required (407)"));return}r&&r.call(this,a,c,I)};let{origin:o,path:s="/",headers:l={}}=e;if(e.path=o+s,!("host"in 
  l)&&!("Host"in l)){let{host:a}=new URL(o);l.host=a}return e.headers={...this[AU],...l},this.#e[tGn](e,n)}[iGn](){return this.#e.close()}[lGn](e){return this.#e.destroy(e)}},Ugt=class 
  extends cGn{constructor(e){if(!e||typeof e=="object"&&!(e instanceof URL)&&!e.uri)throw new Jle("Proxy uri is mandatory");let{clientFactory:n=kuo}=e;if(typeof n!="function")throw new 
  Jle("Proxy opts.clientFactory must be a function.");let{proxyTunnel:r=!0}=e;super();let o=this.#e(e),{href:s,origin:l,port:a,protocol:c,username:I,password:d,hostname:u}=o;if(this[_gt]={
  uri:s,protocol:c},this[Ogt]=e.requestTls,this[rGn]=e.proxyTls,this[AU]=e.headers||{},this[sGn]=r,e.auth&&e.token)throw new Jle("opts.auth cannot be used in combination with 
  opts.token");e.auth?this[AU]["proxy-authorization"]=`Basic ${e.auth}`:e.token?this[AU]["proxy-authorization"]=e.token:I&&d&&(this[AU]["proxy-authorization"]=`Basic 
  ${Buffer.from(`${decodeURIComponent(I)}:${decodeURIComponent(d)}`)


✗ AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

    aB(t[TNe]===0);return}if(t[hU]&&!t[SNe]){t[hU](),t[hU]=null;return}if(t[ag]&&t[ag].resume(),t[Wgt])t[bU]=2;else 
  if(t[bU]===2){e?(t[bU]=1,queueMicrotask(()=>Zbn(t))):Zbn(t);continue}if(t[TNe]===0||t[BNe]>=(Wbn(t)||1))return;let 
  n=t[dX][t[uX]];if(t[rS].protocol==="https:"&&t[gU]!==n.servername){if(t[BNe]>0)return;t[gU]=n.servername,t[ag]?.destroy(new Edo("servername changed"),()=>{t[ag]=null,vgt(t)})}if(t[Sle])r
  eturn;if(!t[ag]){wbn(t);return}if(t[ag].destroyed||t[ag].busy(n))return;!n.aborted&&t[ag].write(n)?t[uX]++:t[dX].splice(t[uX],1)}}vbn.exports=wgt});var Cgt=x((hyi,Cbn)=>{"use strict";var
   EJe=class{bottom=0;top=0;list=new Array(2048).fill(void 0);next=null;isEmpty(){return 
  this.top===this.bottom}isFull(){return(this.top+1&2047)===this.bottom}push(e){this.list[this.top]=e,this.top=this.top+1&2047}shift(){let e=this.list[this.bottom];return e===void 
  0?null:(this.list[this.bottom]=void 0,this.bottom=this.bottom+1&2047,e)}};Cbn.exports=class{constructor(){this.head=this.tail=new EJe}isEmpty(){return 
  this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new EJe),this.head.push(e)}shift(){let e=this.tail,n=e.shift();return 
  e.isEmpty()&&e.next!==null&&(this.tail=e.next,e.next=null),n}}});var Xgt=x((byi,Sbn)=>{"use strict";var{PoolStats:jdo}=XGt(),Kdo=Eq(),qdo=Cgt(),{kConnected:Ygt,kSize:Ybn,kRunning:Vbn,kPe
  nding:Fbn,kQueued:_Ne,kBusy:$do,kFree:euo,kUrl:tuo,kClose:nuo,kDestroy:ruo,kDispatch:ouo}=Ym(),bA=Symbol("clients"),DW=Symbol("needDrain"),ONe=Symbol("queue"),Vgt=Symbol("closed 
  resolve"),Fgt=Symbol("onDrain"),Qbn=Symbol("onConnect"),Hbn=Symbol("onDisconnect"),Xbn=Symbol("onConnectionError"),Qgt=Symbol("get dispatcher"),kbn=Symbol("add 
  client"),xbn=Symbol("remove client"),Hgt=class extends Kdo{[ONe]=new qdo;[_Ne]=0;[bA]=[];[DW]=!1;[Fgt](e,n,r){let o=this[ONe],s=!1;for(;!s;){let 
  l=o.shift();if(!l)break;this[_Ne]--,s=!e.dispatch(l.opts,l.handler)}if(e[DW]=s,!s&&this[DW]&&(this[DW]=!1,this.emit("drain",n,[this,...r])),this[Vgt]&&o.isEmpty()){let l=new 
  Array(this[bA].length);for(let a=0;a<this[bA].length;a++)l[a]=this[bA][a].close();Promise.all(l).then(this[Vgt])}}[Qbn]=(e,n)=>{this.emit("connect",e,[this,...n])};[Hbn]=(e,n,r)=>{this.e
  mit("disconnect",e,[this,...n],r)};[Xbn]=(e,n,r)=>{this.emit("connectionError",e,[this,...n],r)};get[$do](){return this[DW]}get[Ygt](){let e=0;for(let{[Ygt]:n}of this[bA])e+=n;return 
  e}get[euo](){let e=0;for(let{[Ygt]:n,[DW]:r}of this[bA])e+=n&&!r;return e}get[Fbn](){let e=this[_Ne];for(let{[Fbn]:n}of this[bA])e+=n;return e}get[Vbn](){let e=0;for(let{[Vbn]:n}of 
  this[bA])e+=n;return e}get[Ybn](){let e=this[_Ne];for(let{[Ybn]:n}of this[bA])e+=n;return e}get stats(){return new jdo(this)}[nuo](){if(this[ONe].isEmpty()){let e=new 
  Array(this[bA].length);for(let n=0;n<this[bA].length;n++)e[n]=this[bA][n].close();return Promise.all(e)}else return new Promise(e=>{this[Vgt]=e})}[ruo](e){for(;;){let 
  r=this[ONe].shift();if(!r)break;r.handler.onError(e)}let n=new Array(this[bA].length);for(let r=0;r<this[bA].length;r++)n[r]=this[bA][r].destroy(e);return Promise.all(n)}[ouo](e,n){let 
  r=this[Qgt]();return r?r.dispatch(e,n)||(r[DW]=!0,this[DW]=!this[Qgt]()):(this[DW]=!0,this[ONe].push({opts:e,handler:n}),this[_Ne]++),!this[DW]}[kbn](e){return 
  e.on("drain",this[Fgt].bind(this,e)).on("connect",this[Qbn]).on("disconnect",this[Hbn]).on("connectionError",this[Xbn]),this[bA].push(e),this[DW]&&queueMicrotask(()=>{this[DW]&&this[Fgt]
  (e,e[tuo],[e,this])}),this}[xbn](e){e.close(()=>{let n=this[bA].indexOf(e);n!==-1&&this[bA].splice(n,1)}),this[DW]=this[bA].some(n=>!n[DW]&&n.closed!==!0&&n.destroyed!==!0)}};Sbn.exports
  ={PoolBase:Hgt,kClients:bA,kNeedDrain:DW,kAddClient:kbn,kRemoveClient:xbn,kGetDispatcher:Qgt}});var Lle=x((Gyi,Tbn)=>{"use 
  strict";var{PoolBase:suo,kClients:WJe,kNeedDrain:iuo,kAddClient:luo,kGetDispatcher:auo,kRemoveClient:cuo}=Xgt(),Iuo=Qq(),{InvalidArgumentError:kgt}=ja(),Lbn=da(),{kUrl:Jbn}=Ym(),duo=RNe(
  ),RJe=Symbol("options"),xgt=Symbol("connections"),Bbn=Symbol("factory");function uuo(t,e){return new Iuo(t,e)}var Sgt=class extends 
  suo{constructor(e,{connections:n,factory:r=uuo,connect:o,connectTimeout:s,tls:l,maxCachedSessions:a,socketPath:c,autoSelectFamily:I,autoSelectFamilyAttemptTimeout:d,allowH2:u,clientTtl:p
  ,...m}={}){if(n!=null&&(!Number.isFinite(n)||n<0))throw new kgt("invalid connections");if(typeof r!="function")throw new kgt("factory must be a function.");if(o!=null&&typeof 
  o!="function"&&typeof o!="object")throw new kgt("connect must be a function or an object");typeof 
  o!="function"&&(o=duo({...l,maxCachedSessions:a,allowH2:u,socketPath:c,timeout:s,...typeof I=="boolean"?{autoSelectFamily:I,autoSelectFamilyAttemptTimeout:d}:void 0,...o})),super(),this[
  xgt]=n||null,this[Jbn]=Lbn.parseOrigin(e),this[RJe]={...Lbn.deepClone(m),connect:o,allowH2:u,clientTtl:p},this[RJe].interceptors=m.interceptors?{...m.interceptors}:void 
  0,this[Bbn]=r,this.on("connect",(h,G)=>{if(p!=null&&p>0)for(let g of G)Object.assign(g,{ttl:Date.now()})}),this.on("connectionError",(h,G,g)=>{for(let f of G){let 
  N=this[WJe].indexOf(f);N!==-1&&this[WJe].splice(N,1)}})}[auo](){let e=this[RJe].clientTtl;for(let n of this[WJe])if(e!=null&&e>0&&n.ttl&&Date.now()-n.ttl>e)this[cuo](n);else 
  if(!n[iuo])return n;if(!this[xgt]||this[WJe].length<this[xgt]){let n=this[Bbn](this[Jbn],this[RJe]);return this[luo](n),n}}};Tbn.exports=Sgt});var Dbn=x((gyi,Ubn)=>{"use 
  strict";var{BalancedPoolMissingUpstreamError:muo,InvalidArgumentError:puo}=ja(),{PoolBase:huo,kClients:$Z,kNeedDrain:MNe,kAddClient:buo,kRemoveClient:Guo,kGetDispatcher:guo}=Xgt(),Auo=Ll
  e(),{kUrl:Lgt}=Ym(),{parseOrigin:_bn}=da(),Obn=Symbol("factory"),wJe=Symbol("options"),Mbn=Symbol("kGreatestCommonDivisor"),Hq=Symbol("kCurrentWeight"),Xq=Symbol("kIndex"),DV=Symbol("kWe
  ight"),vJe=Symbol("kMaxWeightPerServer"),CJe=Symbol("kErrorPenalty");function fuo(t,e){if(t===0)return e;for(;e!==0;){let n=e;e=t%e,t=n}return t}function yuo(t,e){return new Auo(t,e)}var
   Jgt=class extends huo{constructor(e=[],{factory:n=yuo,...r}={}){if(typeof n!="function")throw new puo("factory must be a 
  function.");super(),this[wJe]=r,this[Xq]=-1,this[Hq]=0,this[vJe]=this[wJe].maxWeightPerServer||100,this[CJe]=this[wJe].errorPenalty||15,Array.isArray(e)||(e=[e]),this[Obn]=n;for(let o of
   e)this.addUpstream(o);this._updateBalancedPoolStats()}addUpstream(e){let n=_bn(e).origin;if(this[$Z].find(o=>o[Lgt].origin===n&&o.closed!==!0&&o.destroyed!==!0))return this;let 
  r=this[Obn](n,Object.assign({},this[wJe]));this[buo](r),r.on("connect",()=>{r[DV]=Math.min(this[vJe],r[DV]+this[CJe])}),r.on("connectionError",()=>{r[DV]=Math.max(1,r[DV]-this[CJe]),this
  ._updateBalancedPoolStats()}),r.on("disconnect",(...o)=>{let s=o[2];s&&s.code==="UND_ERR_SOCKET"&&(r[DV]=Math.max(1,r[DV]-this[CJe]),this._updateBalancedPoolStats())});for(let o of 
  this[$Z])o[DV]=this[vJe];return this._updateBalancedPoolStats(),this}_updateBalancedPoolStats(){let e=0;for(let 
  n=0;n<this[$Z].length;n++)e=fuo(this[$Z][n][DV],e);this[Mbn]=e}removeUpstream(e){let n=_bn(e).origin,r=this[$Z].find(o=>o[Lgt].origin===n&&o.closed!==!0&&o.destroyed!==!0);return 
  r&&this[Guo](r),this}get upstreams(){return this[$Z].filter(e=>e.closed!==!0&&e.destroyed!==!0).map(e=>e[Lgt].origin)}[guo](){if(this[$Z].length===0)throw new 
  muo;if(!this[$Z].find(s=>!s[MNe]&&s.closed!==!0&&s.destroyed!==!0)||this[$Z].map(s=>s[MNe]).reduce((s,l)=>s&&l,!0))return;let 
  r=0,o=this[$Z].findIndex(s=>!s[MNe]);for(;r++<this[$Z].length;){this[Xq]=(this[Xq]+1)%this[$Z].length;let 
  s=this[$Z][this[Xq]];if(s[DV]>this[$Z][o][DV]&&!s[MNe]&&(o=this[Xq]),this[Xq]===0&&(this[Hq]=this[Hq]-this[Mbn],this[Hq]<=0&&(this[Hq]=this[vJe])),s[DV]>=this[Hq]&&!s[MNe])return 
  s}return this[Hq]=this[$Z][o][DV],this[Xq]=o,this[$Z][o]}};Ubn.exports=Jgt});var kq=x((Ayi,eGn)=>{"use 
  strict";var{InvalidArgumentError:YJe,MaxOriginsReachedError:Nuo}=ja(),{kClients:zV,kRunning:zbn,kClose:Zuo,kDestroy:Euo,kDispatch:Wuo,kUrl:Ruo}=Ym(),wuo=Eq(),vuo=Lle(),Cuo=Qq(),Yuo=da(),
  Pbn=Symbol("onConnect"),jbn=Symbol("onDisconnect"),Kbn=Symbol("onConnectionError"),qbn=Symbol("onDrain"),$bn=Symbol("factory"),Bgt=Symbol("options"),UNe=Symbol("origins");function 
  Vuo(t,e){return e&&e.connections===1?new Cuo(t,e):new vuo(t,e)}var Tgt=class extends wuo{constructor({factory:e=Vuo,maxOrigins:n=1/0,connect:r,...o}={}){if(typeof e!="function")throw new
   YJe("factory must be a function.");if(r!=null&&typeof r!="function"&&typeof r!="object")throw new YJe("connect must be a function or an object");if(typeof 
  n!="number"||Number.isNaN(n)||n<=0)throw new YJe("maxOrigins must be a number greater than 0");super(),r&&typeof 
  r!="function"&&(r={...r}),this[Bgt]={...Yuo.deepClone(o),maxOrigins:n,connect:r},this[$bn]=e,this[zV]=new Map,this[UNe]=new 
  Set,this[qbn]=(s,l)=>{this.emit("drain",s,[this,...l])},this[Pbn]=(s,l)=>{this.emit("connect",s,[this,...l])},this[jbn]=(s,l,a)=>{this.emit("disconnect",s,[this,...l],a)},this[Kbn]=(s,l,
  a)=>{this.emit("connectionError",s,[this,...l],a)}}get[zbn](){let e=0;for(let{dispatcher:n}of this[zV].values())e+=n[zbn];return e}[Wuo](e,n){let r;if(e.origin&&(typeof 
  e.origin=="string"||e.origin instanceof URL))r=String(e.origin);else throw new YJe("opts.origin must be a non-empty string or 
  URL.");if(this[UNe].size>=this[Bgt].maxOrigins&&!this[UNe].has(r))throw new Nuo;let o=this[zV].get(r),s=o&&o.dispatcher;if(!s){let l=a=>{let c=this[zV].get(r);c&&(a&&(c.count-=1),c.count
  <=0&&(this[zV].delete(r),c.dispatcher.close()),this[UNe].delete(r))};s=this[$bn](e.origin,this[Bgt]).on("drain",this[qbn]).on("connect",(a,c)=>{let I=this[zV].get(r);I&&(I.count+=1),this
  [Pbn](a,c)}).on("disconnect",(a,c,I)=>{l(!0),this[jbn](a,c,I)}).on("connectionError",(a,c,I)=>{l(!1),this[Kbn](a,c,I)}),this[zV].set(r,{count:0,dispatcher:s}),this[UNe].add(r)}return 
  s.dispatch(e,n)}[Zuo](){let e=[];for(let{dispatcher:n}of this[zV].values())e.push(n.close());return this[zV].clear(),Promise.all(e)}[Euo](e){let n=[];for(let{dispatcher:r}of 
  this[zV].values())n.push(r.destroy(e));return this[zV].clear(),Promise.all(n)}get stats(){let e={};for(let{dispatcher:n}of this[zV].values())n.stats&&(e[n[Ruo].origin]=n.stats);return 
  e}};eGn.exports=Tgt});var Dgt=x((fyi,dGn)=>{"use strict";var{kProxy:_gt,kClose:iGn,kDestroy:lGn,kDispatch:tGn}=Ym(),Fuo=kq(),aGn=Lle(),cGn=Eq(),{InvalidArgumentError:Jle,RequestAbortedEr
  ror:Quo,SecureProxyConnectionError:Huo}=ja(),nGn=RNe(),IGn=Qq(),VJe=Symbol("proxy agent"),FJe=Symbol("proxy client"),AU=Symbol("proxy headers"),Ogt=Symbol("request tls 
  settings"),rGn=Symbol("proxy tls settings"),oGn=Symbol("connect endpoint function"),sGn=Symbol("tunnel proxy");function Xuo(t){return t==="https:"?443:80}function kuo(t,e){return new 
  aGn(t,e)}var xuo=()=>{};function Suo(t,e){return e.connections===1?new IGn(t,e):new aGn(t,e)}var Mgt=class extends cGn{#e;constructor(e,{headers:n={},connect:r,factory:o}){if(!e)throw 
  new Jle("Proxy URL is mandatory");super(),this[AU]=n,o?this.#e=o(e,{connect:r}):this.#e=new IGn(e,{connect:r})}[tGn](e,n){let r=n.onHeaders;n.onHeaders=function(a,c,I){if(a===407){typeof
   n.onError=="function"&&n.onError(new Jle("Proxy Authentication Required (407)"));return}r&&r.call(this,a,c,I)};let{origin:o,path:s="/",headers:l={}}=e;if(e.path=o+s,!("host"in 
  l)&&!("Host"in l)){let{host:a}=new URL(o);l.host=a}return e.headers={...this[AU],...l},this.#e[tGn](e,n)}[iGn](){return this.#e.close()}[lGn](e){return this.#e.destroy(e)}},Ugt=class 
  extends cGn{constructor(e){if(!e||typeof e=="object"&&!(e instanceof URL)&&!e.uri)throw new Jle("Proxy uri is mandatory");let{clientFactory:n=kuo}=e;if(typeof n!="function")throw new 
  Jle("Proxy opts.clientFactory must be a function.");let{proxyTunnel:r=!0}=e;super();let o=this.#e(e),{href:s,origin:l,port:a,protocol:c,username:I,password:d,hostname:u}=o;if(this[_gt]={
  uri:s,protocol:c},this[Ogt]=e.requestTls,this[rGn]=e.proxyTls,this[AU]=e.headers||{},this[sGn]=r,e.auth&&e.token)throw new Jle("opts.auth cannot be used in combination with 
  opts.token");e.auth?this[AU]["proxy-authorization"]=`Basic ${e.auth}`:e.token?this[AU]["proxy-authorization"]=e.token:I&&d&&(this[AU]["proxy-authorization"]=`Basic 
  ${Buffer.from(`${decodeURIComponent(I)}:${decodeURIComponent(d)}`)


✗ Execution failed: Error: Failed to get response from the AI model; retried 5 times (total retry wait time: 91.17525743494556 seconds) Last error: CAPIError: 503 
  {"error":{"message":"HTTP/2 GOAWAY connection terminated","type":"connection_error"}}

Affected version

0.0.420

Steps to reproduce the behavior

Model: Claude Opus 4.6 (High)

Prompt: Perform a comprehensive review of the current state of SEO and what can be improved. Document your findings in seo.md markdown file.

Similar error happens in several codebases.

Expected behavior

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions