@cortexkit/opencode-antigravity-auth 3.0.33 → 3.0.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/server.js CHANGED
@@ -53102,7 +53102,7 @@ function isGaOwnedRequest(event) {
53102
53102
  return event.request.headers.get("x-goog-api-key") === placeholderSecret("google");
53103
53103
  }
53104
53104
  var GA_RETRY_OWNERSHIP_LIMIT = 512;
53105
- var GA_UNSUPPORTED_REQUEST_MESSAGE = "This request cannot use Antigravity. Choose a supported Antigravity model.";
53105
+ var GA_NON_CONTENT_REQUEST_MESSAGE = "This Google request isn't a model reply that Antigravity can serve.";
53106
53106
  var GA_CUSTOM_GOOGLE_ORIGIN_MESSAGE = "Antigravity pool requests need the default Google base URL. Remove the custom baseURL from the Google provider settings.";
53107
53107
  var GaRequestOwnership = class {
53108
53108
  latest = /* @__PURE__ */ new Map();
@@ -53131,13 +53131,18 @@ async function rewriteGaHttpRequest(event, input2) {
53131
53131
  if (!owned) return;
53132
53132
  const original = event.request;
53133
53133
  if (!isGaGoogleContentRequest(original)) {
53134
- throw new Error(GA_UNSUPPORTED_REQUEST_MESSAGE);
53134
+ throw new Error(GA_NON_CONTENT_REQUEST_MESSAGE);
53135
53135
  }
53136
53136
  if (!isCanonicalGoogleOrigin(original.url)) {
53137
53137
  throw new Error(GA_CUSTOM_GOOGLE_ORIGIN_MESSAGE);
53138
53138
  }
53139
53139
  if (event.kind !== "title" && !input2.isRegisteredModel(event.model.id) && !isRetiredAgyModel(event.model.id)) {
53140
- throw new Error(GA_UNSUPPORTED_REQUEST_MESSAGE);
53140
+ const modelID = event.model.id;
53141
+ const antigravityModelID = modelID.startsWith("antigravity-") ? null : `antigravity-${modelID}`;
53142
+ const suggestion = antigravityModelID !== null && input2.isRegisteredModel(antigravityModelID) ? `Use google/${antigravityModelID}.` : "Choose a google/antigravity- model.";
53143
+ throw new Error(
53144
+ `This request cannot use Antigravity: google/${modelID} is not an Antigravity model. ${suggestion}`
53145
+ );
53141
53146
  }
53142
53147
  const job = {
53143
53148
  sessionID: event.sessionID,