@anthonyhaussman/opencode-agy-auth 1.1.6-alpha.0 → 1.1.6-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 +44 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -18095,6 +18095,19 @@ var buildModelFromSimple = (modelId, simple) => {
|
|
|
18095
18095
|
family: modelId.includes("gemini") ? "gemini" : isClaude ? "claude" : isGpt ? "gpt" : "unknown",
|
|
18096
18096
|
status: "active",
|
|
18097
18097
|
release_date: "2026-05-26",
|
|
18098
|
+
// Root-level properties for OpenCode v2 cache compatibility
|
|
18099
|
+
reasoning: simple.reasoning,
|
|
18100
|
+
attachment: simple.attachment,
|
|
18101
|
+
tool_call: simple.toolCall,
|
|
18102
|
+
temperature: true,
|
|
18103
|
+
modalities: {
|
|
18104
|
+
input: [
|
|
18105
|
+
"text",
|
|
18106
|
+
...simple.attachment ? ["image", "pdf"] : [],
|
|
18107
|
+
...!isClaude && !isGpt ? ["audio", "video"] : []
|
|
18108
|
+
],
|
|
18109
|
+
output: ["text"]
|
|
18110
|
+
},
|
|
18098
18111
|
capabilities: {
|
|
18099
18112
|
temperature: true,
|
|
18100
18113
|
reasoning: simple.reasoning,
|
|
@@ -18219,18 +18232,42 @@ function resolveModelTier(baseModelId, init) {
|
|
|
18219
18232
|
var AgyCLIOAuthPlugin = async ({ client }) => {
|
|
18220
18233
|
let latestConfig;
|
|
18221
18234
|
const getModelsList = (provider) => {
|
|
18222
|
-
|
|
18223
|
-
|
|
18224
|
-
|
|
18235
|
+
const userModels = provider.models || {};
|
|
18236
|
+
const clonedStaticModels = JSON.parse(JSON.stringify(STATIC_MODELS));
|
|
18237
|
+
const strictModels = {};
|
|
18238
|
+
for (const [modelId, modelDetails] of Object.entries(clonedStaticModels)) {
|
|
18239
|
+
const existing = userModels[modelId] || {};
|
|
18240
|
+
strictModels[modelId] = {
|
|
18225
18241
|
...modelDetails,
|
|
18226
|
-
...
|
|
18242
|
+
...existing,
|
|
18243
|
+
reasoning: existing.reasoning ?? modelDetails.reasoning,
|
|
18244
|
+
attachment: existing.attachment ?? modelDetails.attachment,
|
|
18245
|
+
tool_call: existing.tool_call ?? modelDetails.tool_call,
|
|
18246
|
+
temperature: existing.temperature ?? modelDetails.temperature,
|
|
18247
|
+
modalities: {
|
|
18248
|
+
...modelDetails.modalities || {},
|
|
18249
|
+
...existing.modalities || {}
|
|
18250
|
+
},
|
|
18251
|
+
capabilities: {
|
|
18252
|
+
...modelDetails.capabilities || {},
|
|
18253
|
+
...existing.capabilities || {},
|
|
18254
|
+
input: {
|
|
18255
|
+
...modelDetails.capabilities?.input || {},
|
|
18256
|
+
...existing.capabilities?.input || {}
|
|
18257
|
+
},
|
|
18258
|
+
output: {
|
|
18259
|
+
...modelDetails.capabilities?.output || {},
|
|
18260
|
+
...existing.capabilities?.output || {}
|
|
18261
|
+
}
|
|
18262
|
+
}
|
|
18227
18263
|
};
|
|
18228
18264
|
}
|
|
18265
|
+
provider.models = strictModels;
|
|
18229
18266
|
if (latestConfig && latestConfig.provider && latestConfig.provider[AGY_PROVIDER_ID]) {
|
|
18230
|
-
latestConfig.provider[AGY_PROVIDER_ID].models =
|
|
18267
|
+
latestConfig.provider[AGY_PROVIDER_ID].models = provider.models;
|
|
18231
18268
|
}
|
|
18232
18269
|
normalizeProviderModelCosts(provider);
|
|
18233
|
-
return
|
|
18270
|
+
return provider.models;
|
|
18234
18271
|
};
|
|
18235
18272
|
try {
|
|
18236
18273
|
initDiskSignatureCache({
|
|
@@ -18282,7 +18319,7 @@ var AgyCLIOAuthPlugin = async ({ client }) => {
|
|
|
18282
18319
|
models: {},
|
|
18283
18320
|
...config2.provider[AGY_PROVIDER_ID]
|
|
18284
18321
|
};
|
|
18285
|
-
config2.provider[AGY_PROVIDER_ID].models =
|
|
18322
|
+
config2.provider[AGY_PROVIDER_ID].models = getModelsList(config2.provider[AGY_PROVIDER_ID]);
|
|
18286
18323
|
},
|
|
18287
18324
|
tool: {
|
|
18288
18325
|
[AGY_QUOTA_TOOL_NAME]: createAgyQuotaTool({
|