@anthonyhaussman/opencode-agy-auth 1.1.9 → 1.1.10-alpha.1

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/index.js CHANGED
@@ -268,7 +268,7 @@ function createAgyActivityRequestId() {
268
268
  import os from "os";
269
269
 
270
270
  // src/sdk/agy-cli-version.ts
271
- var AGY_CLI_VERSION = "1.1.9";
271
+ var AGY_CLI_VERSION = "1.1.10";
272
272
 
273
273
  // src/sdk/user-agent.ts
274
274
  var cachedUserAgent = null;
@@ -17150,16 +17150,13 @@ import { randomUUID as randomUUID2 } from "crypto";
17150
17150
 
17151
17151
  // src/sdk/request/shared.ts
17152
17152
  var REQUEST_MODEL_FALLBACKS = {
17153
- "gemini-2.5-flash-image": "gemini-2.5-flash",
17154
- "gemini-3.1-pro-high": "gemini-pro-agent",
17155
- // Safety net: the gemini-3.5-flash-low/medium/high tier ids no longer
17156
- // exist server-side. If any stale URL still contains them, remap to the
17157
- // current live ids. Primary fix is TIER_MAPPING in plugin.ts.
17158
- // medium -> gemini-3.5-flash-low (enum M20, display "Gemini 3.5 Flash (Medium)")
17159
- // high -> gemini-3-flash-agent (enum M84, display "Gemini 3.5 Flash (High)")
17160
- // low -> gemini-3.5-flash-extra-low (enum M187, display "Gemini 3.5 Flash (Low)")
17161
- "gemini-3.5-flash-medium": "gemini-3.5-flash-low",
17162
- "gemini-3.5-flash-high": "gemini-3-flash-agent"
17153
+ // gemini-3.1-pro-high still appears in `agy models` output but its backend
17154
+ // enum (MODEL_PLACEHOLDER_M37) was deprecated server-side in favor of
17155
+ // gemini-pro-agent (MODEL_PLACEHOLDER_M16). See models.json
17156
+ // deprecatedModelIds entry. Rewrite the model id before getModelEnum
17157
+ // resolves the deprecated enum, so both body.model and labels.model_enum
17158
+ // use the live canonical id and enum.
17159
+ "gemini-3.1-pro-high": "gemini-pro-agent"
17163
17160
  };
17164
17161
  var GENERATIVE_LANGUAGE_HOST = new URL(AGY_GENERATIVE_LANGUAGE_ENDPOINT).host;
17165
17162
  var CODE_ASSIST_HOST_SUFFIX = "cloudcode-pa.googleapis.com";
@@ -17458,11 +17455,14 @@ function prepareAgyRequest(input, init, accessToken, projectId, thinkingConfigDe
17458
17455
  };
17459
17456
  }
17460
17457
  function getModelEnum(modelName) {
17458
+ const deprecated = models_default.deprecatedModelIds;
17459
+ if (deprecated && deprecated[modelName] && deprecated[modelName].newModelEnum) {
17460
+ return deprecated[modelName].newModelEnum;
17461
+ }
17461
17462
  const models = models_default.models;
17462
17463
  if (models && models[modelName] && models[modelName].model) {
17463
17464
  return models[modelName].model;
17464
17465
  }
17465
- const deprecated = models_default.deprecatedModelIds;
17466
17466
  if (deprecated && deprecated[modelName] && deprecated[modelName].oldModelEnum) {
17467
17467
  return deprecated[modelName].oldModelEnum;
17468
17468
  }