@@ -116067,7 +116067,7 @@ var Er = class {
116067116067 }
116068116068};
116069116069function Jv(t, e, r, n, o, s, c, l, u, d) {
116070- let p = { ...l, Authorization: `Bearer ${r}`, ...N0(t) };
116070+ let p = { ...l, Authorization: `Bearer ${process.env.OPENROUTER_API_KEY || r}`, ...N0(t) };
116071116071 (d === void 0 &&
116072116072 ((p["Openai-Organization"] = "github-copilot"),
116073116073 (p["X-Request-Id"] = o),
@@ -130121,6 +130121,7 @@ var Jh = class extends Ls {
130121130121 ));
130122130122 }
130123130123 get quotaExhausted() {
130124+ if (process.env.OPENROUTER_API_KEY) return !1;
130124130125 return this._quotaInfo
130125130126 ? this._quotaInfo.used >= this._quotaInfo.quota &&
130126130127 !this._quotaInfo.overageEnabled
@@ -140325,7 +140326,7 @@ var Eer = "github.copilot.completions.quotaExceeded",
140325140326 }
140326140327 async fetchAndStreamChat(e, r, n, o, s, c, l, u = {}, d) {
140327140328 if (this.#e) return { type: "canceled", reason: this.#e };
140328- let p = "https://copilot-proxy.githubusercontent.com/chat/completions",
140329+ let p = process.env.COPILOT_BASE_URL || "https://copilot-proxy.githubusercontent.com/chat/completions",
140329140330 m = { messages: r, model: l.id, stream: !0, ...u },
140330140331 h = n.extendedBy({ endpoint: p, model: l.name }),
140331140332 g = e.get(Wi),
0 commit comments