dsh-plugin-subscription-oauth 0.8.11 → 0.8.12

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.
@@ -15,8 +15,8 @@
15
15
  import type { UsageWindow } from '../protocol.js';
16
16
  import type { CatalogEntry } from './catalog.js';
17
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`). */
18
+ export declare function isTierMarked(id: string): boolean;
19
+ /** The base family a tier-marked id belongs to (`gemini-3-flash-agent` → `gemini-3-flash`). */
20
20
  export declare function baseFamilyOf(id: string): string;
21
21
  /** Antigravity's own reasoning ladder, per model family. */
22
22
  export declare function antigravityEffortsFor(model: string): readonly string[];
@@ -48,15 +48,19 @@ 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;
51
+ /** A model id whose suffix or infix names a fixed reasoning tier, folded into its base family. */
52
+ const TIER_MARKED = /(?:^|[-_])(?:extra-low|low|medium|high|max)(?:$|[-_])/i;
53
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);
54
+ export function isTierMarked(id) {
55
+ return TIER_MARKED.test(id);
56
56
  }
57
- /** The base family a tier-suffixed id belongs to (`gemini-3.5-flash-low` → `gemini-3.5-flash`). */
57
+ /** The base family a tier-marked id belongs to (`gemini-3-flash-agent` → `gemini-3-flash`). */
58
58
  export function baseFamilyOf(id) {
59
- return id.replace(/-(?:extra-low|low|medium|high|max)$/i, '');
59
+ // Remove the tier token wherever it sits (suffix or infix), then tidy any trailing
60
+ // separator the removal left behind.
61
+ return id
62
+ .replace(/[-_](?:extra-low|low|medium|high|max)(?=[-_]|$)/i, '')
63
+ .replace(/[-_]$/, '');
60
64
  }
61
65
  /** Antigravity's own reasoning ladder, per model family. */
62
66
  export function antigravityEffortsFor(model) {
@@ -179,10 +183,11 @@ export function parseAntigravityModels(payload) {
179
183
  const seenBase = new Set();
180
184
  for (const wireId of agentIds(payload)) {
181
185
  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
+ // Tier-marked ids (gemini-3.5-flash-low, gemini-3-flash-agent, …) are the family's
187
+ // fixed tiers; they fold into the base family row so the picker shows one entry with
188
+ // a ladder, not one row per tier. The base row is inserted the first time a tier of
189
+ // it is seen.
190
+ if (isTierMarked(wireId)) {
186
191
  const base = baseFamilyOf(wireId);
187
192
  if (seenBase.has(base))
188
193
  continue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-plugin-subscription-oauth",
3
- "version": "0.8.11",
3
+ "version": "0.8.12",
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",