pullfrog 0.1.91 → 0.1.92

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/cli.mjs CHANGED
@@ -107103,7 +107103,7 @@ var import_picocolors = __toESM(require_picocolors(), 1);
107103
107103
  // package.json
107104
107104
  var package_default = {
107105
107105
  name: "pullfrog",
107106
- version: "0.1.91",
107106
+ version: "0.1.92",
107107
107107
  cliContractVersion: "1",
107108
107108
  type: "module",
107109
107109
  bin: {
@@ -110397,6 +110397,9 @@ function stripProviderPrefix(specifier) {
110397
110397
  const slashIndex = specifier.indexOf("/");
110398
110398
  return slashIndex > 0 ? specifier.slice(slashIndex + 1) : specifier;
110399
110399
  }
110400
+ function modelIdLabel(specifier) {
110401
+ return specifier.slice(specifier.lastIndexOf("/") + 1).replace(/^~/, "");
110402
+ }
110400
110403
  function getModelEnvVars(slug2) {
110401
110404
  const parsed2 = parseModel(slug2);
110402
110405
  const providerConfig = providers[parsed2.provider];
@@ -113559,6 +113562,7 @@ function installCodexAuth() {
113559
113562
  if (isRejectedChain(body)) return null;
113560
113563
  const expiresMs = decodeJwtExpMs(body.tokens.access_token) ?? 0;
113561
113564
  const xdgDataHome = resolveDataHome();
113565
+ if (!xdgDataHome) return null;
113562
113566
  const opencodeDir = join6(xdgDataHome, "opencode");
113563
113567
  const authPath = join6(opencodeDir, "auth.json");
113564
113568
  writeOpenCodeAuthEntry({
@@ -113608,6 +113612,7 @@ function installXaiAuth() {
113608
113612
  }
113609
113613
  if (isXaiRejectedChain(body)) return null;
113610
113614
  const xdgDataHome = resolveDataHome();
113615
+ if (!xdgDataHome) return null;
113611
113616
  const opencodeDir = join6(xdgDataHome, "opencode");
113612
113617
  const authPath = join6(opencodeDir, "auth.json");
113613
113618
  writeOpenCodeAuthEntry({
@@ -113652,17 +113657,23 @@ function installCodexHome() {
113652
113657
  );
113653
113658
  return null;
113654
113659
  }
113655
- const codexHome = join6(resolveDataHome(), "codex");
113660
+ const root = resolveDataHome();
113661
+ if (!root) return null;
113662
+ const codexHome = join6(root, "codex");
113656
113663
  const authPath = join6(codexHome, "auth.json");
113657
113664
  mkdirSync5(codexHome, { recursive: true });
113658
113665
  writeFileSync5(authPath, stringifyCodexAuthBody(body), { mode: 384 });
113659
113666
  log2.info(`\xBB installed Codex auth at ${authPath}`);
113660
113667
  return { codexHome, authPath, originalRefresh: body.tokens.refresh_token };
113661
113668
  }
113669
+ var dataHome;
113670
+ function canInstallSubscription(name) {
113671
+ return name !== CODEX_AUTH_ENV && name !== XAI_AUTH_ENV || resolveDataHome() !== null;
113672
+ }
113662
113673
  function resolveDataHome() {
113663
113674
  if (process.env.CI !== "true") return join6(homedir2(), ".local", "share");
113664
- bootstrapPullfrogDataDir();
113665
- return PULLFROG_DATA_DIR;
113675
+ if (dataHome === void 0) dataHome = bootstrapPullfrogDataDir();
113676
+ return dataHome;
113666
113677
  }
113667
113678
  function bootstrapPullfrogDataDir() {
113668
113679
  const user = userInfo().username;
@@ -113679,10 +113690,14 @@ function bootstrapPullfrogDataDir() {
113679
113690
  });
113680
113691
  execFileSync4("sudo", ["-n", "chmod", "700", PULLFROG_DATA_DIR], { stdio: "pipe" });
113681
113692
  } catch (err) {
113682
- throw new Error(
113683
- `failed to bootstrap ${PULLFROG_DATA_DIR} (required for codex auth in CI): ${err instanceof Error ? err.message : String(err)}. the MCP shell's mount-namespace sandbox cannot protect the auth file when it lives under $HOME, and silently falling back would contradict the "three independent layers" claim in wiki/codex-auth.md. passwordless sudo is required for codex auth on this runner \u2014 either configure it, or remove CODEX_AUTH_JSON from the run.`
113693
+ log2.warning(
113694
+ `\xBB subscription auth skipped: could not create ${PULLFROG_DATA_DIR} (${err instanceof Error ? err.message : String(err)}). it must live outside the agent sandbox's reach, which needs passwordless sudo on this runner; runs on a model that needs the subscription will report no key.`
113684
113695
  );
113696
+ delete process.env[CODEX_AUTH_ENV];
113697
+ delete process.env[XAI_AUTH_ENV];
113698
+ return null;
113685
113699
  }
113700
+ return PULLFROG_DATA_DIR;
113686
113701
  }
113687
113702
 
113688
113703
  // utils/oauthWriteback.ts
@@ -192292,19 +192307,19 @@ function PushTagsTool(ctx) {
192292
192307
  var PULLFROG_DIVIDER = "<!-- PULLFROG_DIVIDER_DO_NOT_REMOVE_PLZ -->";
192293
192308
  var FROG_LOGO = `<a href="https://pullfrog.com"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pullfrog.com/logos/frog-white-full-18px.png"><img src="https://pullfrog.com/logos/frog-green-full-18px.png" width="9px" height="9px" style="vertical-align: middle; " alt="Pullfrog"></picture></a>`;
192294
192309
  function formatModelLabel(params) {
192295
- const alias = resolveDisplayAlias(params.model) ?? // reverse-lookup: when the caller passes an effective model (proxy or
192310
+ const slugAlias = resolveDisplayAlias(params.model);
192311
+ const alias = slugAlias ?? // reverse-lookup: when the caller passes an effective model (proxy or
192296
192312
  // resolved target like "openrouter/anthropic/claude-opus-4.7") instead of
192297
- // a stored alias slug, find the alias whose resolve target matches so we
192298
- // still render a friendly display name.
192313
+ // a stored alias slug, find the alias whose resolve target matches.
192299
192314
  modelAliases.find((a2) => a2.resolve === params.model || a2.openRouterResolve === params.model);
192300
- const displayName = alias?.displayName ?? params.model;
192315
+ const modelName = slugAlias?.routing ? slugAlias.displayName : modelIdLabel(slugAlias?.resolve ?? params.model);
192301
192316
  if (params.oss) {
192302
- const ossBase = `\`${displayName}\` (free via [Pullfrog for OSS](https://pullfrog.com/for-oss))`;
192317
+ const ossBase = `\`${modelName}\` (free via [Pullfrog for OSS](https://pullfrog.com/for-oss))`;
192303
192318
  if (params.clamped?.reason !== "oss") return ossBase;
192304
192319
  const configured = isAutoTier(params.clamped.from) ? "the intelligent tier" : `\`${resolveDisplayAlias(params.clamped.from)?.displayName ?? params.clamped.from}\``;
192305
192320
  return `${ossBase} (${configured} not used \u2014 pick one of the [funded models](https://docs.pullfrog.com/models#pullfrog-for-oss) or add a [provider key](https://docs.pullfrog.com/keys) to run your own)`;
192306
192321
  }
192307
- const base = alias?.isFree ? `\`${displayName}\` (free)` : `\`${displayName}\``;
192322
+ const base = alias?.isFree ? `\`${modelName}\` (free)` : `\`${modelName}\``;
192308
192323
  if (params.clamped?.reason === "trial") {
192309
192324
  return `${base} (model usage covered by Pullfrog)`;
192310
192325
  }
@@ -198405,10 +198420,14 @@ async function selectConfiguredCredential(input) {
198405
198420
  const subscription = subscriptionForModel(model);
198406
198421
  const names = getModelEnvVars(model).filter((name) => name !== subscription);
198407
198422
  if (subscription) names.unshift(subscription);
198408
- const candidates = access.candidates.filter((candidate) => names.includes(candidate.name));
198423
+ const candidates = access.candidates.filter(
198424
+ (candidate) => names.includes(candidate.name) && canInstallSubscription(candidate.name)
198425
+ );
198409
198426
  if (!candidates.length) return false;
198410
198427
  const refused = [];
198411
- for (const name of names.filter((item) => workflowCredentials[item])) {
198428
+ for (const name of names.filter(
198429
+ (item) => workflowCredentials[item] && canInstallSubscription(item)
198430
+ )) {
198412
198431
  const value2 = workflowCredentials[name];
198413
198432
  const verdict = await probe({ name, value: value2, model });
198414
198433
  if (usable(verdict)) {
@@ -202508,7 +202527,7 @@ function resolveTarget2(repo) {
202508
202527
  return { owner: match3[1], repo: match3[2] };
202509
202528
  }
202510
202529
  function cliVersion() {
202511
- const parts = /^(\d+)\.(\d+)\.(\d+)$/.exec("0.1.91");
202530
+ const parts = /^(\d+)\.(\d+)\.(\d+)$/.exec("0.1.92");
202512
202531
  if (!parts) return "0.0.0";
202513
202532
  return `${Number(parts[1])}.${Number(parts[2])}.${Number(parts[3])}`;
202514
202533
  }
@@ -202675,7 +202694,7 @@ async function runCli8(input) {
202675
202694
  }
202676
202695
 
202677
202696
  // cli.ts
202678
- var VERSION10 = "0.1.91";
202697
+ var VERSION10 = "0.1.92";
202679
202698
  var bin = basename2(process.argv[1] || "");
202680
202699
  var PROG = bin === "pf" || bin === "pullfrog" ? bin : "pullfrog";
202681
202700
  var rawArgs = process.argv.slice(2);
@@ -53,7 +53,7 @@ export declare function findDanglingPromptToolRefs(params: {
53
53
  export type { EffortPosition } from "./effort.ts";
54
54
  export { DEFAULT_EFFORT_POSITION, EFFORT_ALIASES, isEffortPosition, offeredRungs, parseEffortPosition, resolveRung, rungLabel, rungPosition, SUBSIDY_RUNG, } from "./effort.ts";
55
55
  export type { AutoTier, ModelAlias, ModelProvider, ProviderConfig, RouterTier, } from "./models.ts";
56
- export { AUTO_EFFICIENT, AUTO_INTELLIGENT, AUTO_ROUTER, autoLadder, autoRoutedSlug, DEFAULT_PROXY_MODEL, defaultAutoTier, getAutoSelectHintModel, getModelEffortLevels, getModelEnvVars, getModelManagedCredentials, getModelProvider, getProviderDisplayName, isAutoRouted, isAutoSlug, isAutoTier, isCardGatedModel, isOssAllowedModel, isRouterTier, ladderRungs, modelAliases, modelHasStoredAuth, OSS_MODEL_ALLOWLIST, OSS_RECOMMENDED_MODEL, ossFundedModelNames, PROVIDER_GATEWAY_URL_ENV, parseModel, providers, ROUTED_PROVIDERS, ROUTER_LADDER, ROUTER_TIERS, resolveAutoTier, resolveCliModel, resolveDisplayAlias, resolveModelRung, resolveModelSlug, resolveOpenRouterModel, resolveRoutedModel, } from "./models.ts";
56
+ export { AUTO_EFFICIENT, AUTO_INTELLIGENT, AUTO_ROUTER, autoLadder, autoRoutedSlug, DEFAULT_PROXY_MODEL, defaultAutoTier, getAutoSelectHintModel, getModelEffortLevels, getModelEnvVars, getModelManagedCredentials, getModelProvider, getProviderDisplayName, isAutoRouted, isAutoSlug, isAutoTier, isCardGatedModel, isOssAllowedModel, isRouterTier, ladderRungs, modelAliases, modelHasStoredAuth, modelIdLabel, OSS_MODEL_ALLOWLIST, OSS_RECOMMENDED_MODEL, ossFundedModelNames, PROVIDER_GATEWAY_URL_ENV, parseModel, pickUsesOpenRouter, providers, ROUTED_PROVIDERS, ROUTER_LADDER, ROUTER_TIERS, resolveAutoTier, resolveCliModel, resolveDisplayAlias, resolveModelRung, resolveModelSlug, resolveOpenRouterModel, resolveRoutedModel, routerProxyOptOut, } from "./models.ts";
57
57
  export type ToolPermission = "disabled" | "enabled";
58
58
  export type ShellPermission = "disabled" | "restricted" | "enabled";
59
59
  export type PushPermission = "disabled" | "restricted" | "enabled";
package/dist/index.js CHANGED
@@ -104680,6 +104680,9 @@ function stripProviderPrefix(specifier) {
104680
104680
  const slashIndex = specifier.indexOf("/");
104681
104681
  return slashIndex > 0 ? specifier.slice(slashIndex + 1) : specifier;
104682
104682
  }
104683
+ function modelIdLabel(specifier) {
104684
+ return specifier.slice(specifier.lastIndexOf("/") + 1).replace(/^~/, "");
104685
+ }
104683
104686
  function getModelEnvVars(slug2) {
104684
104687
  const parsed2 = parseModel(slug2);
104685
104688
  const providerConfig = providers[parsed2.provider];
@@ -105731,7 +105734,7 @@ var import_semver = __toESM(require_semver2(), 1);
105731
105734
  // package.json
105732
105735
  var package_default = {
105733
105736
  name: "pullfrog",
105734
- version: "0.1.91",
105737
+ version: "0.1.92",
105735
105738
  cliContractVersion: "1",
105736
105739
  type: "module",
105737
105740
  bin: {
@@ -108033,6 +108036,7 @@ function installCodexAuth() {
108033
108036
  if (isRejectedChain(body)) return null;
108034
108037
  const expiresMs = decodeJwtExpMs(body.tokens.access_token) ?? 0;
108035
108038
  const xdgDataHome = resolveDataHome();
108039
+ if (!xdgDataHome) return null;
108036
108040
  const opencodeDir = join5(xdgDataHome, "opencode");
108037
108041
  const authPath = join5(opencodeDir, "auth.json");
108038
108042
  writeOpenCodeAuthEntry({
@@ -108082,6 +108086,7 @@ function installXaiAuth() {
108082
108086
  }
108083
108087
  if (isXaiRejectedChain(body)) return null;
108084
108088
  const xdgDataHome = resolveDataHome();
108089
+ if (!xdgDataHome) return null;
108085
108090
  const opencodeDir = join5(xdgDataHome, "opencode");
108086
108091
  const authPath = join5(opencodeDir, "auth.json");
108087
108092
  writeOpenCodeAuthEntry({
@@ -108126,17 +108131,23 @@ function installCodexHome() {
108126
108131
  );
108127
108132
  return null;
108128
108133
  }
108129
- const codexHome = join5(resolveDataHome(), "codex");
108134
+ const root = resolveDataHome();
108135
+ if (!root) return null;
108136
+ const codexHome = join5(root, "codex");
108130
108137
  const authPath = join5(codexHome, "auth.json");
108131
108138
  mkdirSync5(codexHome, { recursive: true });
108132
108139
  writeFileSync4(authPath, stringifyCodexAuthBody(body), { mode: 384 });
108133
108140
  log.info(`\xBB installed Codex auth at ${authPath}`);
108134
108141
  return { codexHome, authPath, originalRefresh: body.tokens.refresh_token };
108135
108142
  }
108143
+ var dataHome;
108144
+ function canInstallSubscription(name) {
108145
+ return name !== CODEX_AUTH_ENV && name !== XAI_AUTH_ENV || resolveDataHome() !== null;
108146
+ }
108136
108147
  function resolveDataHome() {
108137
108148
  if (process.env.CI !== "true") return join5(homedir2(), ".local", "share");
108138
- bootstrapPullfrogDataDir();
108139
- return PULLFROG_DATA_DIR;
108149
+ if (dataHome === void 0) dataHome = bootstrapPullfrogDataDir();
108150
+ return dataHome;
108140
108151
  }
108141
108152
  function bootstrapPullfrogDataDir() {
108142
108153
  const user = userInfo().username;
@@ -108153,10 +108164,14 @@ function bootstrapPullfrogDataDir() {
108153
108164
  });
108154
108165
  execFileSync3("sudo", ["-n", "chmod", "700", PULLFROG_DATA_DIR], { stdio: "pipe" });
108155
108166
  } catch (err) {
108156
- throw new Error(
108157
- `failed to bootstrap ${PULLFROG_DATA_DIR} (required for codex auth in CI): ${err instanceof Error ? err.message : String(err)}. the MCP shell's mount-namespace sandbox cannot protect the auth file when it lives under $HOME, and silently falling back would contradict the "three independent layers" claim in wiki/codex-auth.md. passwordless sudo is required for codex auth on this runner \u2014 either configure it, or remove CODEX_AUTH_JSON from the run.`
108167
+ log.warning(
108168
+ `\xBB subscription auth skipped: could not create ${PULLFROG_DATA_DIR} (${err instanceof Error ? err.message : String(err)}). it must live outside the agent sandbox's reach, which needs passwordless sudo on this runner; runs on a model that needs the subscription will report no key.`
108158
108169
  );
108170
+ delete process.env[CODEX_AUTH_ENV];
108171
+ delete process.env[XAI_AUTH_ENV];
108172
+ return null;
108159
108173
  }
108174
+ return PULLFROG_DATA_DIR;
108160
108175
  }
108161
108176
 
108162
108177
  // utils/oauthWriteback.ts
@@ -188782,19 +188797,19 @@ function PushTagsTool(ctx) {
188782
188797
  var PULLFROG_DIVIDER = "<!-- PULLFROG_DIVIDER_DO_NOT_REMOVE_PLZ -->";
188783
188798
  var FROG_LOGO = `<a href="https://pullfrog.com"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pullfrog.com/logos/frog-white-full-18px.png"><img src="https://pullfrog.com/logos/frog-green-full-18px.png" width="9px" height="9px" style="vertical-align: middle; " alt="Pullfrog"></picture></a>`;
188784
188799
  function formatModelLabel(params) {
188785
- const alias = resolveDisplayAlias(params.model) ?? // reverse-lookup: when the caller passes an effective model (proxy or
188800
+ const slugAlias = resolveDisplayAlias(params.model);
188801
+ const alias = slugAlias ?? // reverse-lookup: when the caller passes an effective model (proxy or
188786
188802
  // resolved target like "openrouter/anthropic/claude-opus-4.7") instead of
188787
- // a stored alias slug, find the alias whose resolve target matches so we
188788
- // still render a friendly display name.
188803
+ // a stored alias slug, find the alias whose resolve target matches.
188789
188804
  modelAliases.find((a) => a.resolve === params.model || a.openRouterResolve === params.model);
188790
- const displayName = alias?.displayName ?? params.model;
188805
+ const modelName = slugAlias?.routing ? slugAlias.displayName : modelIdLabel(slugAlias?.resolve ?? params.model);
188791
188806
  if (params.oss) {
188792
- const ossBase = `\`${displayName}\` (free via [Pullfrog for OSS](https://pullfrog.com/for-oss))`;
188807
+ const ossBase = `\`${modelName}\` (free via [Pullfrog for OSS](https://pullfrog.com/for-oss))`;
188793
188808
  if (params.clamped?.reason !== "oss") return ossBase;
188794
188809
  const configured = isAutoTier(params.clamped.from) ? "the intelligent tier" : `\`${resolveDisplayAlias(params.clamped.from)?.displayName ?? params.clamped.from}\``;
188795
188810
  return `${ossBase} (${configured} not used \u2014 pick one of the [funded models](https://docs.pullfrog.com/models#pullfrog-for-oss) or add a [provider key](https://docs.pullfrog.com/keys) to run your own)`;
188796
188811
  }
188797
- const base = alias?.isFree ? `\`${displayName}\` (free)` : `\`${displayName}\``;
188812
+ const base = alias?.isFree ? `\`${modelName}\` (free)` : `\`${modelName}\``;
188798
188813
  if (params.clamped?.reason === "trial") {
188799
188814
  return `${base} (model usage covered by Pullfrog)`;
188800
188815
  }
@@ -194938,10 +194953,14 @@ async function selectConfiguredCredential(input) {
194938
194953
  const subscription = subscriptionForModel(model);
194939
194954
  const names = getModelEnvVars(model).filter((name) => name !== subscription);
194940
194955
  if (subscription) names.unshift(subscription);
194941
- const candidates = access.candidates.filter((candidate) => names.includes(candidate.name));
194956
+ const candidates = access.candidates.filter(
194957
+ (candidate) => names.includes(candidate.name) && canInstallSubscription(candidate.name)
194958
+ );
194942
194959
  if (!candidates.length) return false;
194943
194960
  const refused = [];
194944
- for (const name of names.filter((item) => workflowCredentials[item])) {
194961
+ for (const name of names.filter(
194962
+ (item) => workflowCredentials[item] && canInstallSubscription(item)
194963
+ )) {
194945
194964
  const value2 = workflowCredentials[name];
194946
194965
  const verdict = await probe({ name, value: value2, model });
194947
194966
  if (usable(verdict)) {
@@ -6,7 +6,7 @@ export { CLI_CONTRACT_HEADER, CLI_CONTRACT_VERSION, CLI_UPGRADE_MESSAGE } from "
6
6
  export type { ConfigField, ConfigScope, ConfigValue } from "../configuration.ts";
7
7
  export { configEntrySchema, configFields, configResponseSchema, configValueSchema, } from "../configuration.ts";
8
8
  export type { AuthorPermission, AutoTier, EffortPosition, ModelAlias, ModelProvider, Payload, PayloadEvent, PayloadRouting, ProviderConfig, PushPermission, RouterSource, RouterTier, ShellPermission, ToolPermission, WriteablePayload, XrepoConfig, } from "../external.ts";
9
- export { AUTO_EFFICIENT, AUTO_INTELLIGENT, AUTO_ROUTER, autoLadder, autoRoutedSlug, DEFAULT_EFFORT_POSITION, DEFAULT_PROXY_MODEL, defaultAutoTier, EFFORT_ALIASES, getAutoSelectHintModel, getModelEffortLevels, getModelEnvVars, getModelManagedCredentials, getModelProvider, getProviderDisplayName, isAutoRouted, isAutoSlug, isAutoTier, isCardGatedModel, isEffortPosition, isOssAllowedModel, isRouterTier, ladderRungs, modelAliases, modelHasStoredAuth, OSS_MODEL_ALLOWLIST, OSS_RECOMMENDED_MODEL, offeredRungs, ossFundedModelNames, PROVIDER_GATEWAY_URL_ENV, parseEffortPosition, parseModel, providers, pullfrogMcpName, ROUTED_PROVIDERS, ROUTER_LADDER, ROUTER_TIERS, resolveAutoTier, resolveCliModel, resolveDisplayAlias, resolveModelRung, resolveModelSlug, resolveOpenRouterModel, resolveRoutedModel, resolveRung, rungLabel, rungPosition, SUBSIDY_RUNG, } from "../external.ts";
9
+ export { AUTO_EFFICIENT, AUTO_INTELLIGENT, AUTO_ROUTER, autoLadder, autoRoutedSlug, DEFAULT_EFFORT_POSITION, DEFAULT_PROXY_MODEL, defaultAutoTier, EFFORT_ALIASES, getAutoSelectHintModel, getModelEffortLevels, getModelEnvVars, getModelManagedCredentials, getModelProvider, getProviderDisplayName, isAutoRouted, isAutoSlug, isAutoTier, isCardGatedModel, isEffortPosition, isOssAllowedModel, isRouterTier, ladderRungs, modelAliases, modelHasStoredAuth, modelIdLabel, OSS_MODEL_ALLOWLIST, OSS_RECOMMENDED_MODEL, offeredRungs, ossFundedModelNames, PROVIDER_GATEWAY_URL_ENV, parseEffortPosition, parseModel, pickUsesOpenRouter, providers, pullfrogMcpName, ROUTED_PROVIDERS, ROUTER_LADDER, ROUTER_TIERS, resolveAutoTier, resolveCliModel, resolveDisplayAlias, resolveModelRung, resolveModelSlug, resolveOpenRouterModel, resolveRoutedModel, resolveRung, routerProxyOptOut, rungLabel, rungPosition, SUBSIDY_RUNG, } from "../external.ts";
10
10
  export type { Mode } from "../modes.ts";
11
11
  export { modes } from "../modes.ts";
12
12
  export { type CommercialRefusal, commercialPaywallBody } from "../utils/billingErrors.ts";
package/dist/internal.js CHANGED
@@ -8,7 +8,7 @@ var __export = (target, all) => {
8
8
  // package.json
9
9
  var package_default = {
10
10
  name: "pullfrog",
11
- version: "0.1.91",
11
+ version: "0.1.92",
12
12
  cliContractVersion: "1",
13
13
  type: "module",
14
14
  bin: {
@@ -15571,6 +15571,9 @@ function getProviderDisplayName(slug) {
15571
15571
  const parsed = parseModel(slug);
15572
15572
  return providers[parsed.provider]?.displayName;
15573
15573
  }
15574
+ function modelIdLabel(specifier) {
15575
+ return specifier.slice(specifier.lastIndexOf("/") + 1).replace(/^~/, "");
15576
+ }
15574
15577
  function getModelEnvVars(slug) {
15575
15578
  const parsed = parseModel(slug);
15576
15579
  const providerConfig = providers[parsed.provider];
@@ -15601,6 +15604,13 @@ function modelHasStoredAuth(params) {
15601
15604
  ];
15602
15605
  return authVars.some((v) => params.secretNames.includes(v));
15603
15606
  }
15607
+ function routerProxyOptOut(ctx) {
15608
+ if (ctx.slug === null) return false;
15609
+ return resolveDisplayAlias(ctx.slug)?.isFree === true || modelHasStoredAuth({ model: ctx.slug, secretNames: ctx.secretNames });
15610
+ }
15611
+ function pickUsesOpenRouter(params) {
15612
+ return params.proxied && !routerProxyOptOut(params);
15613
+ }
15604
15614
  var modelAliases = Object.entries(providers).flatMap(
15605
15615
  ([providerKey, config2]) => Object.entries(config2.models).map(([modelId, def]) => ({
15606
15616
  slug: `${providerKey}/${modelId}`,
@@ -16247,19 +16257,19 @@ function commercialPaywallBody(params) {
16247
16257
  var PULLFROG_DIVIDER = "<!-- PULLFROG_DIVIDER_DO_NOT_REMOVE_PLZ -->";
16248
16258
  var FROG_LOGO = `<a href="https://pullfrog.com"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pullfrog.com/logos/frog-white-full-18px.png"><img src="https://pullfrog.com/logos/frog-green-full-18px.png" width="9px" height="9px" style="vertical-align: middle; " alt="Pullfrog"></picture></a>`;
16249
16259
  function formatModelLabel(params) {
16250
- const alias = resolveDisplayAlias(params.model) ?? // reverse-lookup: when the caller passes an effective model (proxy or
16260
+ const slugAlias = resolveDisplayAlias(params.model);
16261
+ const alias = slugAlias ?? // reverse-lookup: when the caller passes an effective model (proxy or
16251
16262
  // resolved target like "openrouter/anthropic/claude-opus-4.7") instead of
16252
- // a stored alias slug, find the alias whose resolve target matches so we
16253
- // still render a friendly display name.
16263
+ // a stored alias slug, find the alias whose resolve target matches.
16254
16264
  modelAliases.find((a) => a.resolve === params.model || a.openRouterResolve === params.model);
16255
- const displayName = alias?.displayName ?? params.model;
16265
+ const modelName = slugAlias?.routing ? slugAlias.displayName : modelIdLabel(slugAlias?.resolve ?? params.model);
16256
16266
  if (params.oss) {
16257
- const ossBase = `\`${displayName}\` (free via [Pullfrog for OSS](https://pullfrog.com/for-oss))`;
16267
+ const ossBase = `\`${modelName}\` (free via [Pullfrog for OSS](https://pullfrog.com/for-oss))`;
16258
16268
  if (params.clamped?.reason !== "oss") return ossBase;
16259
16269
  const configured = isAutoTier(params.clamped.from) ? "the intelligent tier" : `\`${resolveDisplayAlias(params.clamped.from)?.displayName ?? params.clamped.from}\``;
16260
16270
  return `${ossBase} (${configured} not used \u2014 pick one of the [funded models](https://docs.pullfrog.com/models#pullfrog-for-oss) or add a [provider key](https://docs.pullfrog.com/keys) to run your own)`;
16261
16271
  }
16262
- const base = alias?.isFree ? `\`${displayName}\` (free)` : `\`${displayName}\``;
16272
+ const base = alias?.isFree ? `\`${modelName}\` (free)` : `\`${modelName}\``;
16263
16273
  if (params.clamped?.reason === "trial") {
16264
16274
  return `${base} (model usage covered by Pullfrog)`;
16265
16275
  }
@@ -17396,6 +17406,7 @@ export {
17396
17406
  ladderRungs,
17397
17407
  modelAliases,
17398
17408
  modelHasStoredAuth,
17409
+ modelIdLabel,
17399
17410
  modes,
17400
17411
  offeredRungs,
17401
17412
  ossFundedModelNames,
@@ -17404,6 +17415,7 @@ export {
17404
17415
  parseModel,
17405
17416
  parseTimeString,
17406
17417
  parseXaiAuthBody,
17418
+ pickUsesOpenRouter,
17407
17419
  probeSubscription,
17408
17420
  providers,
17409
17421
  pullfrogMcpName,
@@ -17417,6 +17429,7 @@ export {
17417
17429
  resolveOpenRouterModel,
17418
17430
  resolveRoutedModel,
17419
17431
  resolveRung,
17432
+ routerProxyOptOut,
17420
17433
  runStatusCheckNeedsFinalizing,
17421
17434
  rungLabel,
17422
17435
  rungPosition,
package/dist/models.d.ts CHANGED
@@ -140,6 +140,9 @@ export declare function getModelProvider(slug: string): string;
140
140
  export declare function getProviderDisplayName(slug: string): string | undefined;
141
141
  /** provider-prefixed specifier → bare model id (`anthropic/claude-opus-5` → `claude-opus-5`). */
142
142
  export declare function stripProviderPrefix(specifier: string): string;
143
+ /** specifier → the model's own id, for display: `openrouter/~anthropic/claude-opus-latest` →
144
+ * `claude-opus-latest`. names what an alias points at today, which its name does not. */
145
+ export declare function modelIdLabel(specifier: string): string;
143
146
  export declare function getModelEnvVars(slug: string): string[];
144
147
  /** managed credentials are authored only via `pullfrog auth <provider>` — they
145
148
  * count as "configured" for hasAnyKey-style UI checks but are never offered as
@@ -180,6 +183,28 @@ export declare function modelHasStoredAuth(params: {
180
183
  model: string;
181
184
  secretNames: string[];
182
185
  }): boolean;
186
+ /**
187
+ * `proxyOptOut`, spelled the way run-context spells it: a Router run skips the
188
+ * mint when the pick is FREE or a Pullfrog-stored key covers it, and then runs
189
+ * as-configured rather than clamping to the auto tier.
190
+ *
191
+ * one predicate for every reader — the console picker's `customLocked`, the
192
+ * effort ladder's `resolveRunning` and `pickUsesOpenRouter`. they held two
193
+ * copies and the free half was missing from both, which put the whole `opencode/*` free tier (`opencode/big-pickle`
194
+ * is `preferred`, so the most-picked model there is) behind "add a payment
195
+ * method to run it" on a card-less Router repo, against a server that ran it.
196
+ */
197
+ export declare function routerProxyOptOut(ctx: {
198
+ slug: string | null;
199
+ secretNames: string[];
200
+ }): boolean;
201
+ /** whether a pick runs as its OpenRouter target: a proxied account (Router, the OSS subsidy)
202
+ * mints for every pick `routerProxyOptOut` does not exempt. */
203
+ export declare function pickUsesOpenRouter(params: {
204
+ slug: string;
205
+ proxied: boolean;
206
+ secretNames: string[];
207
+ }): boolean;
183
208
  export declare const modelAliases: ModelAlias[];
184
209
  /**
185
210
  * `repo.model` sentinels for the two managed auto tiers. stored verbatim in
@@ -15,14 +15,14 @@ export interface BuildPullfrogFooterParams {
15
15
  workflowRunUrl?: string | undefined;
16
16
  /** arbitrary custom parts (e.g., action links) */
17
17
  customParts?: string[] | undefined;
18
- /** model slug from payload (e.g., "anthropic/claude-opus"). shown in footer as "Using `Model Name`" */
18
+ /** model slug from payload (e.g., "anthropic/claude-opus"). shown in footer as the model it runs: "Using `claude-opus-5-5`" */
19
19
  model?: string | undefined;
20
20
  /**
21
21
  * When a Router account had a model (or the intelligent tier) selected that
22
22
  * the server clamped to the efficient default — custom picks are card-gated
23
23
  * wholesale. `from` is the configured slug (e.g. "anthropic/claude-opus");
24
24
  * `reason` names the binding constraint — "card" (no card on file) renders
25
- * `Using <Kimi K2> (<Claude Opus> needs a card on file)`, "noRouterPath"
25
+ * `Using <kimi-k2> (<Claude Opus> needs a card on file)`, "noRouterPath"
26
26
  * (no openRouterResolve yet and no stored provider key) renders a
27
27
  * provider-key nudge — so the downgrade is visible rather than silently
28
28
  * presenting Kimi as the pick.
@@ -26,7 +26,8 @@ export interface InstalledCodexAuth {
26
26
  originalIdToken: string | undefined;
27
27
  }
28
28
  /** materialize CODEX_AUTH_JSON from env into a disk path OpenCode reads from.
29
- * returns null when the env var is absent, malformed, or wrong auth mode —
29
+ * returns null when the env var is absent, malformed, or wrong auth mode, or
30
+ * when this runner cannot host it (`resolveDataHome`) —
30
31
  * caller treats null as "no codex auth, fall through to API key flow".
31
32
  *
32
33
  * The env value is server-side guaranteed fresh by `maybeRotateCodexSecret`
@@ -52,7 +53,8 @@ export interface InstalledXaiAuth {
52
53
  * The plugin sends the token to `api.x.ai/v1` — it deliberately sets no
53
54
  * baseURL — so there is no CLI proxy and no client-version header in play.
54
55
  *
55
- * returns null when the env var is absent or malformed; caller treats null as
56
+ * returns null when the env var is absent or malformed, or when this runner
57
+ * cannot host it (`resolveDataHome`); caller treats null as
56
58
  * "no grok subscription auth, fall through to XAI_API_KEY". */
57
59
  export declare function installXaiAuth(): InstalledXaiAuth | null;
58
60
  export interface InstalledCodexHome {
@@ -76,3 +78,5 @@ export interface InstalledCodexHome {
76
78
  * call. callers treat null as "codex CLI can't use this credential".
77
79
  */
78
80
  export declare function installCodexHome(): InstalledCodexHome | null;
81
+ /** false for a Codex or Grok subscription on a runner that cannot host it (`resolveDataHome`). */
82
+ export declare function canInstallSubscription(name: string): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pullfrog",
3
- "version": "0.1.91",
3
+ "version": "0.1.92",
4
4
  "cliContractVersion": "1",
5
5
  "type": "module",
6
6
  "bin": {