@anthonyhaussman/opencode-agy-auth 1.2.3-alpha.1 → 1.2.3-alpha.2

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
@@ -20679,11 +20679,21 @@ Do not call other tools.
20679
20679
  async function setupOpenCodeV2(ctx) {
20680
20680
  ctx.catalog.transform(async (editor) => {
20681
20681
  if (!editor) return;
20682
+ const resolveVariants = (modelId) => {
20683
+ const mapping = TIER_MAPPING[modelId];
20684
+ if (!mapping) return void 0;
20685
+ const variants = [];
20686
+ if (mapping.minimal !== void 0) variants.push({ id: "minimal" });
20687
+ if (mapping.low !== void 0) variants.push({ id: "low" });
20688
+ if (mapping.medium !== void 0) variants.push({ id: "medium" });
20689
+ if (mapping.high !== void 0) variants.push({ id: "high" });
20690
+ return variants.length > 0 ? variants : void 0;
20691
+ };
20682
20692
  if (typeof editor?.provider?.update === "function") {
20683
20693
  editor.provider.update(AGY_PROVIDER_ID, (p) => {
20684
20694
  p.name = "Antigravity CLI";
20685
20695
  p.activation = "enabled";
20686
- p.package = "@ai-sdk/google";
20696
+ p.package = "aisdk:@ai-sdk/google";
20687
20697
  p.description = "Google Gemini Antigravity Code Assist OAuth provider";
20688
20698
  });
20689
20699
  if (typeof editor?.model?.update === "function") {
@@ -20703,6 +20713,10 @@ async function setupOpenCodeV2(ctx) {
20703
20713
  if (simple.cost) {
20704
20714
  m.cost = simple.cost;
20705
20715
  }
20716
+ const variants = resolveVariants(modelId);
20717
+ if (variants) {
20718
+ m.variants = variants;
20719
+ }
20706
20720
  });
20707
20721
  }
20708
20722
  }
@@ -20713,7 +20727,7 @@ async function setupOpenCodeV2(ctx) {
20713
20727
  catalog.providers[AGY_PROVIDER_ID] = {
20714
20728
  id: AGY_PROVIDER_ID,
20715
20729
  name: "Antigravity CLI",
20716
- npm: "@ai-sdk/google",
20730
+ npm: "aisdk:@ai-sdk/google",
20717
20731
  models: { ...catalog.providers[AGY_PROVIDER_ID]?.models || {} },
20718
20732
  ...catalog.providers[AGY_PROVIDER_ID]
20719
20733
  };
@@ -20721,6 +20735,7 @@ async function setupOpenCodeV2(ctx) {
20721
20735
  for (const [modelId, simple] of Object.entries(STATIC_MODELS_SIMPLE)) {
20722
20736
  const isClaude = modelId.startsWith("claude-");
20723
20737
  const isGpt = modelId.startsWith("gpt-");
20738
+ const variants = resolveVariants(modelId);
20724
20739
  targetModels[modelId] = {
20725
20740
  id: modelId,
20726
20741
  providerID: AGY_PROVIDER_ID,
@@ -20735,6 +20750,7 @@ async function setupOpenCodeV2(ctx) {
20735
20750
  output: simple.maxOutputTokens
20736
20751
  },
20737
20752
  cost: simple.cost || { input: 0, output: 0 },
20753
+ ...variants ? { variants } : {},
20738
20754
  ...targetModels[modelId] || {}
20739
20755
  };
20740
20756
  }