573
this._mcpNotificationSubs.clearAndDisposeAll();
574
await this._stopClient();
575
>
// The model list came from the subprocess we just tore down, and the
copilotAgent.ts
576
>
// replacement may be pointed at a different CAPI endpoint entirely
577
>
// (`COPILOT_GH_HOST` routes through this same helper). Re-enumerate
578
>
// rather than serving the old client's catalog until the next token
579
>
// change. Not hooked in `_ensureClient`, since `_listModels` calls
580
>
// it and would recurse.
581
>
this._capiModels = [];
582
>
this._publishModels();
583
>
void this._scheduleModelRefresh();
584
>
}
585
}
586