dsh-plugin-subscription-oauth 0.8.10 → 0.8.11

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.
@@ -14,6 +14,10 @@
14
14
  */
15
15
  import type { UsageWindow } from '../protocol.js';
16
16
  import type { CatalogEntry } from './catalog.js';
17
+ /** True when a model id names a specific tier of a family, not a model with a ladder. */
18
+ export declare function isTierSuffixed(id: string): boolean;
19
+ /** The base family a tier-suffixed id belongs to (`gemini-3.5-flash-low` → `gemini-3.5-flash`). */
20
+ export declare function baseFamilyOf(id: string): string;
17
21
  /** Antigravity's own reasoning ladder, per model family. */
18
22
  export declare function antigravityEffortsFor(model: string): readonly string[];
19
23
  /**
@@ -48,6 +48,16 @@ function modelInfo(raw) {
48
48
  ...raw.supportsImages === true ? { supportsImages: true } : {},
49
49
  };
50
50
  }
51
+ /** A model id whose suffix fixes its reasoning tier, not a ladder the picker offers. */
52
+ const TIER_SUFFIXED = /-(?:low|medium|high|extra-low|max)$/i;
53
+ /** True when a model id names a specific tier of a family, not a model with a ladder. */
54
+ export function isTierSuffixed(id) {
55
+ return TIER_SUFFIXED.test(id);
56
+ }
57
+ /** The base family a tier-suffixed id belongs to (`gemini-3.5-flash-low` → `gemini-3.5-flash`). */
58
+ export function baseFamilyOf(id) {
59
+ return id.replace(/-(?:extra-low|low|medium|high|max)$/i, '');
60
+ }
51
61
  /** Antigravity's own reasoning ladder, per model family. */
52
62
  export function antigravityEffortsFor(model) {
53
63
  if (/^claude-/.test(model))
@@ -166,8 +176,28 @@ export function parseAntigravityModels(payload) {
166
176
  }
167
177
  catch { /* diagnostics never break parsing */ }
168
178
  const entries = [];
179
+ const seenBase = new Set();
169
180
  for (const wireId of agentIds(payload)) {
170
181
  const info = modelInfo(models[wireId]);
182
+ // Tier-suffixed ids (gemini-3.5-flash-low, …-high) are the family's fixed tiers;
183
+ // they fold into the base family row so the picker shows one entry with a ladder,
184
+ // not one row per tier. The base row is inserted the first time a tier of it is seen.
185
+ if (isTierSuffixed(wireId)) {
186
+ const base = baseFamilyOf(wireId);
187
+ if (seenBase.has(base))
188
+ continue;
189
+ seenBase.add(base);
190
+ const baseInfo = modelInfo(models[base]) ?? info;
191
+ entries.push({
192
+ id: base,
193
+ name: displayNameOf(base, models[base] ?? {}),
194
+ contextWindow: baseInfo.maxTokens ?? baseInfo.maxInputTokens ?? baseInfo.inputTokenLimit ?? 1_048_576,
195
+ inputModalities: baseInfo.supportsImages === true ? ['text', 'image'] : ['text'],
196
+ reasoningEfforts: antigravityEffortsFor(base),
197
+ });
198
+ continue;
199
+ }
200
+ seenBase.add(wireId);
171
201
  const tiers = /-(?:low|medium|high)$/.test(wireId);
172
202
  const efforts = tiers ? [] : antigravityEffortsFor(wireId);
173
203
  const contextWindow = info.maxTokens ?? info.maxInputTokens ?? info.inputTokenLimit ?? 1_048_576;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-plugin-subscription-oauth",
3
- "version": "0.8.10",
3
+ "version": "0.8.11",
4
4
  "description": "Use subscription accounts as DeepSeek Harness LLM providers — Kimi Code (OAuth device flow), Grok / X Premium (OIDC + PKCE), Google Antigravity (Google OAuth + Cloud Code Assist) and GLM / BigModel (ZCode's browser sign-in) — with per-model visibility, drag-to-reorder Auto fallback and plan quotas from the web Settings page",
5
5
  "license": "MIT",
6
6
  "author": "EricFL1998",