@anthonyhaussman/opencode-agy-auth 1.1.10-alpha.0 → 1.1.10
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 +13 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -17149,7 +17149,15 @@ function parseRetryDelayValue2(value) {
|
|
|
17149
17149
|
import { randomUUID as randomUUID2 } from "crypto";
|
|
17150
17150
|
|
|
17151
17151
|
// src/sdk/request/shared.ts
|
|
17152
|
-
var REQUEST_MODEL_FALLBACKS = {
|
|
17152
|
+
var REQUEST_MODEL_FALLBACKS = {
|
|
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"
|
|
17160
|
+
};
|
|
17153
17161
|
var GENERATIVE_LANGUAGE_HOST = new URL(AGY_GENERATIVE_LANGUAGE_ENDPOINT).host;
|
|
17154
17162
|
var CODE_ASSIST_HOST_SUFFIX = "cloudcode-pa.googleapis.com";
|
|
17155
17163
|
var MODEL_ACTION_PATTERN = /\/models\/[^:]+:\w+/;
|
|
@@ -17447,11 +17455,14 @@ function prepareAgyRequest(input, init, accessToken, projectId, thinkingConfigDe
|
|
|
17447
17455
|
};
|
|
17448
17456
|
}
|
|
17449
17457
|
function getModelEnum(modelName) {
|
|
17458
|
+
const deprecated = models_default.deprecatedModelIds;
|
|
17459
|
+
if (deprecated && deprecated[modelName] && deprecated[modelName].newModelEnum) {
|
|
17460
|
+
return deprecated[modelName].newModelEnum;
|
|
17461
|
+
}
|
|
17450
17462
|
const models = models_default.models;
|
|
17451
17463
|
if (models && models[modelName] && models[modelName].model) {
|
|
17452
17464
|
return models[modelName].model;
|
|
17453
17465
|
}
|
|
17454
|
-
const deprecated = models_default.deprecatedModelIds;
|
|
17455
17466
|
if (deprecated && deprecated[modelName] && deprecated[modelName].oldModelEnum) {
|
|
17456
17467
|
return deprecated[modelName].oldModelEnum;
|
|
17457
17468
|
}
|