pullfrog 0.1.76 → 0.1.78

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
@@ -107941,26 +107941,34 @@ var providers = {
107941
107941
  models: {
107942
107942
  grok: {
107943
107943
  displayName: "Grok",
107944
- resolve: "xai/grok-4.5",
107945
- effort: ["low", "medium", "high"],
107946
- openRouterResolve: "openrouter/x-ai/grok-4.5",
107944
+ resolve: "xai/grok-4.6",
107945
+ effort: ["low", "medium", "high", "xhigh"],
107946
+ openRouterResolve: "openrouter/x-ai/grok-4.6",
107947
107947
  preferred: true
107948
107948
  },
107949
+ // the Smart ladder's cheap rung: 1.25/2.5 against 4.6's 2/6, and a 0.2
107950
+ // cache read against 0.5 — the only live xAI model a rung can save on.
107951
+ "grok-4.3": {
107952
+ displayName: "Grok 4.3",
107953
+ resolve: "xai/grok-4.3",
107954
+ effort: ["none", "low", "medium", "high"],
107955
+ openRouterResolve: "openrouter/x-ai/grok-4.3"
107956
+ },
107949
107957
  // legacy aliases — xAI retired the entire fast/code-fast line on
107950
107958
  // 2026-05-15 (https://docs.x.ai/developers/migration/may-15-deprecation)
107951
107959
  // and now redirects every deprecated text-model slug to grok-4.3 at
107952
107960
  // standard pricing. fall back to the live `xai/grok` so the alias
107953
- // chain resolves to grok-4.5 for both direct-key and OpenRouter users.
107961
+ // chain resolves to grok-4.6 for both direct-key and OpenRouter users.
107954
107962
  "grok-fast": {
107955
107963
  displayName: "Grok Fast",
107956
107964
  resolve: "xai/grok-4-1-fast",
107957
- openRouterResolve: "openrouter/x-ai/grok-4.5",
107965
+ openRouterResolve: "openrouter/x-ai/grok-4.6",
107958
107966
  fallback: "xai/grok"
107959
107967
  },
107960
107968
  "grok-code-fast": {
107961
107969
  displayName: "Grok Code Fast",
107962
107970
  resolve: "xai/grok-code-fast-1",
107963
- openRouterResolve: "openrouter/x-ai/grok-4.5",
107971
+ openRouterResolve: "openrouter/x-ai/grok-4.6",
107964
107972
  fallback: "xai/grok"
107965
107973
  }
107966
107974
  }
@@ -107979,6 +107987,12 @@ var providers = {
107979
107987
  // $0.0405. there is no `~deepseek/*-pro-latest` pointer to track, so this
107980
107988
  // one has to be a dated pin; the `models-catalog` drift test is what
107981
107989
  // catches the next release.
107990
+ // from 2026-09-14 DeepSeek serves every direct `deepseek-v4-pro` call with
107991
+ // V4.1-Flash at Flash rates until V4.1-Pro ships. it is still the only Pro
107992
+ // id the vendor lists, and the OpenRouter 0813 pin is third-party-hosted
107993
+ // and unaffected — so no `fallback` to Flash, which would drag the Router
107994
+ // route down with it. the OSS program dropped Pro from its menu instead;
107995
+ // see `OSS_MODEL_ALLOWLIST`.
107982
107996
  "deepseek-pro": {
107983
107997
  displayName: "DeepSeek Pro",
107984
107998
  resolve: "deepseek/deepseek-v4-pro",
@@ -107987,30 +108001,24 @@ var providers = {
107987
108001
  openRouterResolve: "openrouter/deepseek/deepseek-v4-pro-0813",
107988
108002
  preferred: true
107989
108003
  },
107990
- // DeepSeek upgrades the `deepseek-v4-flash` API model in place, so the
107991
- // direct `resolve` needs no version. OpenRouter instead forked the 0731
107992
- // release into its own id and left the April preview live under the
107993
- // unversioned one at a HIGHER price ($0.14/$0.28 vs $0.09/$0.18) — so the
107994
- // OpenRouter route can never use the bare id. it tracks the rolling
107995
- // `~deepseek/*-latest` pointer (rule 4), which follows the next in-place
107996
- // upgrade on its own rather than pinning a dated snapshot that goes stale
107997
- // every release. that pointer is NOT priced like 0731 — its listed rates
107998
- // run +40% on output and +57.5% on cache read, and it costs 12% more per
107999
- // run on authoritative spend ($0.0405 vs $0.0361). kept anyway: ~$45/yr
108000
- // buys auto-following the upgrade, and the listed gap overstates the real
108001
- // one because a rolling alias prices at its routing ceiling.
108002
- // 0731 gained a `low` rung and renamed the top to `max`, and that ladder
108003
- // now reads the same on BOTH routes — the in-place direct upgrade caught
108004
- // up to the fork. so `low`, not `high`, is position 0 either way, which is
108005
- // why the OSS effort floor in `main.ts` pins the `high` rung by name. Pro
108006
- // is the same shape via OpenRouter since 0813; only its direct route still
108007
- // starts at `high`.
108004
+ // V4.1-Flash (2026-09-10) retired `deepseek-v4-flash`; DeepSeek's /models
108005
+ // now lists the unversioned `deepseek-flash`, so the direct resolve is the
108006
+ // rolling id at the same price. OpenRouter treats V4.1 as its own id
108007
+ // (`deepseek/deepseek-v4.1-flash`, $0.15/$0.6, cache $0.003) and its
108008
+ // `~deepseek/deepseek-v4-flash-latest` pointer still served 0731 on
108009
+ // 2026-09-11, so this is a pinned id rather than the pointer and the next
108010
+ // Flash release is a catalog edit (the bump cron flags it). this target is
108011
+ // the funded OSS default: priced on the measured OSS token mix at x1.34
108012
+ // the pointer's $0.0531/run on the DeepSeek-hosted endpoint — see
108013
+ // wiki/oss-model-allowlist.md. the bare `deepseek-v4-flash` on OpenRouter
108014
+ // is still the April preview, so that route can never use it. both routes
108015
+ // publish `low, high, max`; the OSS effort floor pins `high` by name.
108008
108016
  "deepseek-flash": {
108009
108017
  displayName: "DeepSeek Flash",
108010
- resolve: "deepseek/deepseek-v4-flash",
108018
+ resolve: "deepseek/deepseek-flash",
108011
108019
  effort: ["low", "high", "max"],
108012
108020
  openRouterEffort: ["low", "high", "max"],
108013
- openRouterResolve: "openrouter/~deepseek/deepseek-v4-flash-latest"
108021
+ openRouterResolve: "openrouter/deepseek/deepseek-v4.1-flash"
108014
108022
  },
108015
108023
  // legacy aliases — deepseek retires these on 2026-07-24; transparently
108016
108024
  // upgrade existing users to the v4 family via the fallback chain.
@@ -108113,6 +108121,40 @@ var providers = {
108113
108121
  }
108114
108122
  }
108115
108123
  }),
108124
+ // Meta Model API — the direct route to Muse Spark. a registry entry, like
108125
+ // kimi-for-coding: models.dev carries `meta` (`https://api.meta.ai/v1`, npm
108126
+ // `@ai-sdk/openai`) and opencode 1.18.29 enables it from a bare
108127
+ // META_MODEL_API_KEY — all five ids list in `opencode models`, and a bogus key
108128
+ // reaches Meta's own auth check (`invalid_api_key`). see wiki/muse-spark.md.
108129
+ meta: provider({
108130
+ displayName: "Meta",
108131
+ envVars: ["META_MODEL_API_KEY"],
108132
+ models: {
108133
+ // the Standard tier. no `subagentModel`: the contributor tier below is
108134
+ // the same model, not a cheaper sibling.
108135
+ "muse-spark": {
108136
+ displayName: "Muse Spark",
108137
+ resolve: "meta/muse-spark-1.3",
108138
+ effort: ["minimal", "low", "medium", "high", "xhigh", "max"],
108139
+ openRouterResolve: "openrouter/meta/muse-spark-1.3",
108140
+ preferred: true
108141
+ },
108142
+ // the Contributor tier: the same model at $0.10 / $0.20 (cache read
108143
+ // $0.002) because Meta trains on the prompts and completions. an opt-in
108144
+ // pick on the OSS menu (public code, headless runs), never the default.
108145
+ // OpenRouter only serves it when the account allows paid-model training,
108146
+ // so the runtime opens data collection for this id alone — see
108147
+ // `openRouterProvider` in opencodeShared.ts.
108148
+ "muse-spark-contributor": {
108149
+ displayName: "Muse Spark Contributor",
108150
+ description: "Meta trains on prompts and completions",
108151
+ resolve: "meta/muse-spark-1.3-contributor",
108152
+ effort: ["minimal", "low", "medium", "high", "xhigh"],
108153
+ openRouterEffort: ["minimal", "low", "medium", "high", "xhigh", "max"],
108154
+ openRouterResolve: "openrouter/meta/muse-spark-1.3-contributor"
108155
+ }
108156
+ }
108157
+ }),
108116
108158
  opencode: provider({
108117
108159
  displayName: "OpenCode Zen",
108118
108160
  envVars: ["OPENCODE_API_KEY"],
@@ -108313,6 +108355,17 @@ var providers = {
108313
108355
  effort: ["minimal", "low", "medium", "high"],
108314
108356
  openRouterResolve: "openrouter/openai/gpt-5-nano"
108315
108357
  },
108358
+ // Zen's PAID Muse Spark, priced like Meta's own Standard tier. not the
108359
+ // `-contributor-free` id beside it, which is the data-collection variant
108360
+ // Go refuses with DataPolicyError. unverified through the harness on
108361
+ // 2026-09-11: the workspace was out of balance and a claude-sonnet-5
108362
+ // control failed identically. see wiki/muse-spark.md.
108363
+ "muse-spark": {
108364
+ displayName: "Muse Spark",
108365
+ resolve: "opencode/muse-spark-1.3",
108366
+ effort: ["minimal", "low", "medium", "high", "xhigh", "max"],
108367
+ openRouterResolve: "openrouter/meta/muse-spark-1.3"
108368
+ },
108316
108369
  // Zen's live free MiMo, and the second free row in a menu that big-pickle
108317
108370
  // was alone in since `mimo-v2-pro-free` lost its model.
108318
108371
  mimo: {
@@ -108692,9 +108745,9 @@ var providers = {
108692
108745
  },
108693
108746
  grok: {
108694
108747
  displayName: "Grok",
108695
- resolve: "openrouter/x-ai/grok-4.5",
108696
- effort: ["low", "medium", "high"],
108697
- openRouterResolve: "openrouter/x-ai/grok-4.5"
108748
+ resolve: "openrouter/x-ai/grok-4.6",
108749
+ effort: ["low", "medium", "high", "xhigh"],
108750
+ openRouterResolve: "openrouter/x-ai/grok-4.6"
108698
108751
  },
108699
108752
  // dated pin, not the bare id — see `deepseek/deepseek-pro` for why
108700
108753
  // OpenRouter's unversioned `deepseek-v4-pro` is the stale April preview.
@@ -108704,13 +108757,14 @@ var providers = {
108704
108757
  effort: ["low", "high", "max"],
108705
108758
  openRouterResolve: "openrouter/deepseek/deepseek-v4-pro-0813"
108706
108759
  },
108707
- // rolling pointer, not the bare id — see `deepseek/deepseek-flash` for why
108708
- // OpenRouter's unversioned `deepseek-v4-flash` is the stale April preview.
108760
+ // the V4.1 id, not the bare one — see `deepseek/deepseek-flash` for why
108761
+ // OpenRouter's unversioned `deepseek-v4-flash` is the stale April preview
108762
+ // and why the `~deepseek/*-latest` pointer is no longer the target.
108709
108763
  "deepseek-flash": {
108710
108764
  displayName: "DeepSeek Flash",
108711
- resolve: "openrouter/~deepseek/deepseek-v4-flash-latest",
108765
+ resolve: "openrouter/deepseek/deepseek-v4.1-flash",
108712
108766
  effort: ["low", "high", "max"],
108713
- openRouterResolve: "openrouter/~deepseek/deepseek-v4-flash-latest"
108767
+ openRouterResolve: "openrouter/deepseek/deepseek-v4.1-flash"
108714
108768
  },
108715
108769
  // legacy alias — deepseek retires this on 2026-07-24; transparently
108716
108770
  // upgrade existing users to the v4 family via the fallback chain.
@@ -108741,6 +108795,23 @@ var providers = {
108741
108795
  displayName: "MiniMax M3",
108742
108796
  resolve: "openrouter/minimax/minimax-m3",
108743
108797
  openRouterResolve: "openrouter/minimax/minimax-m3"
108798
+ },
108799
+ // OpenRouter gates Meta models on an ACCOUNT-level 18+ confirmation
108800
+ // (openrouter.ai/settings/preferences). Pullfrog's account has it, so the
108801
+ // Router path runs; a BYOK OpenRouter key without it refuses with that
108802
+ // link before the request reaches Meta. see wiki/muse-spark.md.
108803
+ "muse-spark": {
108804
+ displayName: "Muse Spark",
108805
+ resolve: "openrouter/meta/muse-spark-1.3",
108806
+ effort: ["minimal", "low", "medium", "high", "xhigh", "max"],
108807
+ openRouterResolve: "openrouter/meta/muse-spark-1.3"
108808
+ },
108809
+ "muse-spark-contributor": {
108810
+ displayName: "Muse Spark Contributor",
108811
+ description: "Meta trains on prompts and completions",
108812
+ resolve: "openrouter/meta/muse-spark-1.3-contributor",
108813
+ effort: ["minimal", "low", "medium", "high", "xhigh", "max"],
108814
+ openRouterResolve: "openrouter/meta/muse-spark-1.3-contributor"
108744
108815
  }
108745
108816
  }
108746
108817
  }),
@@ -108808,10 +108879,13 @@ var providers = {
108808
108879
  resolve: "vercel/deepseek/deepseek-v4-pro-0813",
108809
108880
  effort: ["high", "xhigh"]
108810
108881
  },
108882
+ // the gateway's bare `deepseek-v4-flash` is the April preview — the same
108883
+ // fork trap as OpenRouter, with `deepseek-v4-flash-0731` beside it — so
108884
+ // this entry sat on the preview until V4.1. the gateway publishes no
108885
+ // effort ladder for the V4.1 id.
108811
108886
  "deepseek-flash": {
108812
108887
  displayName: "DeepSeek Flash",
108813
- resolve: "vercel/deepseek/deepseek-v4-flash",
108814
- effort: ["high", "xhigh"]
108888
+ resolve: "vercel/deepseek/deepseek-v4.1-flash"
108815
108889
  },
108816
108890
  glm: {
108817
108891
  displayName: "GLM",
@@ -108822,6 +108896,11 @@ var providers = {
108822
108896
  displayName: "Kimi K3",
108823
108897
  resolve: "vercel/moonshotai/kimi-k3",
108824
108898
  effort: ["low", "high", "max"]
108899
+ },
108900
+ // the gateway publishes no effort ladder for this id.
108901
+ "muse-spark": {
108902
+ displayName: "Muse Spark",
108903
+ resolve: "vercel/meta/muse-spark-1.3"
108825
108904
  }
108826
108905
  }
108827
108906
  })
@@ -108891,6 +108970,71 @@ var AUTO_TIER_TARGET = {
108891
108970
  function isAutoTier(slug2) {
108892
108971
  return slug2 === AUTO_EFFICIENT || slug2 === AUTO_INTELLIGENT;
108893
108972
  }
108973
+ var PROVIDER_LADDERS = {
108974
+ anthropic: {
108975
+ minimal: "anthropic/claude-haiku",
108976
+ light: "anthropic/claude-sonnet",
108977
+ standard: "anthropic/claude-opus",
108978
+ deep: "anthropic/claude-opus"
108979
+ },
108980
+ openai: {
108981
+ minimal: "openai/gpt-luna",
108982
+ light: "openai/gpt-terra",
108983
+ standard: "openai/gpt-sol",
108984
+ deep: "openai/gpt-astra"
108985
+ },
108986
+ google: {
108987
+ minimal: "google/gemini-flash",
108988
+ light: "google/gemini-flash",
108989
+ standard: "google/gemini-pro",
108990
+ deep: "google/gemini-pro"
108991
+ },
108992
+ deepseek: {
108993
+ minimal: "deepseek/deepseek-flash",
108994
+ light: "deepseek/deepseek-flash",
108995
+ standard: "deepseek/deepseek-pro",
108996
+ deep: "deepseek/deepseek-pro"
108997
+ },
108998
+ xai: {
108999
+ minimal: "xai/grok-4.3",
109000
+ light: "xai/grok-4.3",
109001
+ standard: "xai/grok",
109002
+ deep: "xai/grok"
109003
+ },
109004
+ moonshotai: {
109005
+ minimal: "moonshotai/kimi-k2",
109006
+ light: "moonshotai/kimi-k2",
109007
+ standard: "moonshotai/kimi-k3",
109008
+ deep: "moonshotai/kimi-k3"
109009
+ },
109010
+ openrouter: {
109011
+ minimal: "openrouter/deepseek-flash",
109012
+ light: "openrouter/gpt-luna",
109013
+ standard: "openrouter/gpt-sol",
109014
+ deep: "openrouter/claude-opus"
109015
+ },
109016
+ opencode: {
109017
+ minimal: "opencode/gpt-luna",
109018
+ light: "opencode/gpt-luna",
109019
+ standard: "opencode/gpt-sol",
109020
+ deep: "opencode/claude-opus"
109021
+ }
109022
+ };
109023
+ var ROUTER_LADDER = {
109024
+ minimal: "deepseek/deepseek-flash",
109025
+ light: "openai/gpt-luna",
109026
+ standard: "openai/gpt-sol",
109027
+ deep: "anthropic/claude-opus"
109028
+ };
109029
+ var AUTO_PREFIX = "auto/";
109030
+ function autoLadder(slug2) {
109031
+ if (!slug2 || !slug2.startsWith(AUTO_PREFIX) || isAutoTier(slug2)) return void 0;
109032
+ const target = slug2.slice(AUTO_PREFIX.length);
109033
+ return target === "router" ? ROUTER_LADDER : PROVIDER_LADDERS[target];
109034
+ }
109035
+ var ROUTED_PROVIDERS = Object.keys(
109036
+ PROVIDER_LADDERS
109037
+ ).map((key) => ({ key, displayName: providers[key].displayName }));
108894
109038
  function isCardGatedModel(slug2) {
108895
109039
  return resolveOpenRouterModel(slug2) !== void 0;
108896
109040
  }
@@ -108899,7 +109043,7 @@ function resolveModelSlug(slug2) {
108899
109043
  }
108900
109044
  var MAX_FALLBACK_DEPTH = 10;
108901
109045
  function resolveDisplayAlias(slug2) {
108902
- let current = isAutoTier(slug2) ? AUTO_TIER_TARGET[slug2] : slug2;
109046
+ let current = isAutoTier(slug2) ? AUTO_TIER_TARGET[slug2] : autoLadder(slug2)?.standard ?? slug2;
108903
109047
  const visited = /* @__PURE__ */ new Set();
108904
109048
  for (let i = 0; i < MAX_FALLBACK_DEPTH; i++) {
108905
109049
  if (visited.has(current)) return void 0;
@@ -108934,11 +109078,23 @@ if (!defaultProxyAlias?.openRouterResolve) {
108934
109078
  }
108935
109079
  var DEFAULT_PROXY_MODEL = defaultProxyAlias.openRouterResolve;
108936
109080
  var defaultProxyDisplayName = defaultProxyAlias.displayName;
109081
+ for (const [name, ladder] of Object.entries({ ...PROVIDER_LADDERS, router: ROUTER_LADDER })) {
109082
+ const terminal = /* @__PURE__ */ new Set();
109083
+ for (const slug2 of Object.values(ladder)) {
109084
+ const alias = resolveDisplayAlias(slug2);
109085
+ if (!alias) throw new Error(`${name} ladder names unknown alias ${slug2}`);
109086
+ terminal.add(alias.slug);
109087
+ }
109088
+ if (terminal.size < 2) throw new Error(`${name} ladder runs every tier on ${[...terminal][0]}`);
109089
+ }
108937
109090
  var OSS_MODEL_ALLOWLIST = [
108938
109091
  "deepseek/deepseek-flash",
108939
- "deepseek/deepseek-pro",
108940
109092
  "openai/gpt-luna",
108941
- "openrouter/minimax-m2.5"
109093
+ "openrouter/minimax-m2.5",
109094
+ // opt-in: 0.86x the old default on the measured mix, and Meta trains on the
109095
+ // traffic — fine for public code on headless runs, the human decided
109096
+ // 2026-09-11. unmeasured on a real run; not the default until it is.
109097
+ "meta/muse-spark-contributor"
108942
109098
  ];
108943
109099
  var OSS_RECOMMENDED_MODEL = AUTO_TIER_TARGET[AUTO_EFFICIENT];
108944
109100
  function ossFundedModelNames() {
@@ -109806,7 +109962,7 @@ var import_semver = __toESM(require_semver2(), 1);
109806
109962
  // package.json
109807
109963
  var package_default = {
109808
109964
  name: "pullfrog",
109809
- version: "0.1.76",
109965
+ version: "0.1.78",
109810
109966
  cliContractVersion: "1",
109811
109967
  type: "module",
109812
109968
  bin: {
@@ -118655,13 +118811,29 @@ function azureProvider(model) {
118655
118811
  };
118656
118812
  }
118657
118813
  var KIMI_ENFORCERLESS_PROVIDERS = ["siliconflow", "together"];
118658
- function kimiOpenRouterProviderOverrides() {
118659
- return Object.fromEntries(
118660
- modelAliases.map((a) => a.openRouterResolve).filter((r) => r?.includes("kimi") ?? false).map((r) => [
118661
- r.replace(/^openrouter\//, ""),
118662
- { options: { provider: { ignore: KIMI_ENFORCERLESS_PROVIDERS } } }
118663
- ])
118664
- );
118814
+ function openRouterDataCollection(ctx) {
118815
+ if (!ctx.payload.proxyModel) return void 0;
118816
+ return ctx.toolState.oss ? "allow" : "deny";
118817
+ }
118818
+ function dataCollectionPreference(policy) {
118819
+ if (!policy) return {};
118820
+ return { data_collection: policy };
118821
+ }
118822
+ function openRouterProvider(policy) {
118823
+ const models = {};
118824
+ for (const alias of modelAliases) {
118825
+ const id = alias.openRouterResolve?.replace(/^openrouter\//, "");
118826
+ if (!id) continue;
118827
+ if (id.endsWith("-contributor")) {
118828
+ models[id] = { options: { provider: { data_collection: "allow" } } };
118829
+ }
118830
+ if (id.includes("kimi")) {
118831
+ const provider2 = { ...dataCollectionPreference(policy), ignore: KIMI_ENFORCERLESS_PROVIDERS };
118832
+ models[id] = { options: { provider: provider2 } };
118833
+ }
118834
+ }
118835
+ if (!policy) return { models };
118836
+ return { options: { extraBody: { provider: { data_collection: policy } } }, models };
118665
118837
  }
118666
118838
  function buildReviewerAgentConfig(orchestratorModel) {
118667
118839
  const overrides = deriveSubagentModels(orchestratorModel);
@@ -118737,13 +118909,12 @@ function buildSecurityConfig(ctx, model) {
118737
118909
  log.info(`\xBB subagent models: reviewfrog=${reviewerModel}`);
118738
118910
  return cfg;
118739
118911
  })(),
118740
- // kimi pinned away from Enforcer-less openrouter providers (siliconflow /
118741
- // together) that drop optional tool-call params — per-model on the
118742
- // openrouter route, so other models are unaffected. this is routing, not
118743
- // reasoning: every model's effort now rides the per-prompt `variant`.
118744
- // see opencodeShared.ts.
118912
+ // openrouter routing, not reasoning (every model's effort rides the
118913
+ // per-prompt `variant`): the run's data-collection policy, kimi pinned
118914
+ // away from Enforcer-less providers, the Muse Spark contributor tier
118915
+ // opened to training hosts. see opencodeShared.ts.
118745
118916
  provider: {
118746
- openrouter: { models: kimiOpenRouterProviderOverrides() },
118917
+ openrouter: openRouterProvider(openRouterDataCollection(ctx)),
118747
118918
  ...openAICompatibleProvider(model),
118748
118919
  ...azureProvider(model),
118749
118920
  ...providerGatewayOverride(model)
@@ -199476,6 +199647,15 @@ var JsonPayload = type({
199476
199647
  "type?": "string | undefined",
199477
199648
  "model?": "string | undefined",
199478
199649
  "modelExplicit?": "boolean | undefined",
199650
+ // optional so a payload from a pre-router server build still parses against a
199651
+ // newer action across a rolling deploy.
199652
+ "routing?": type({
199653
+ tier: "'minimal' | 'light' | 'standard' | 'deep'",
199654
+ stakes: "number",
199655
+ workload: "number",
199656
+ source: "'scorer' | 'heuristic' | 'fixed'",
199657
+ rationale: "string"
199658
+ }).or("undefined"),
199479
199659
  "effort?": "number | string | undefined",
199480
199660
  "debug?": "boolean | undefined",
199481
199661
  prompt: "string",
@@ -199657,6 +199837,7 @@ function resolvePayload(resolvedPromptInput, repoSettings) {
199657
199837
  // explicit only when the model came from a per-run override flag (carried on
199658
199838
  // the JSON payload). a GHA `model` input or the repo default is not explicit.
199659
199839
  modelExplicit: jsonPayload?.modelExplicit ?? false,
199840
+ routing: jsonPayload?.routing,
199660
199841
  effort,
199661
199842
  debug: debug3 || void 0,
199662
199843
  prompt,
@@ -200343,9 +200524,12 @@ async function fetchRunContext(params) {
200343
200524
  if (params.oidcToken) {
200344
200525
  headers["X-GitHub-OIDC-Token"] = params.oidcToken;
200345
200526
  }
200346
- const query = params.runType ? `?type=${encodeURIComponent(params.runType)}` : "";
200527
+ const query = new URLSearchParams();
200528
+ if (params.runType) query.set("type", params.runType);
200529
+ if (params.routedTier) query.set("tier", params.routedTier);
200530
+ const search2 = query.toString();
200347
200531
  const response = await apiFetch({
200348
- path: `/api/repo/${params.repoContext.owner}/${params.repoContext.name}/run-context${query}`,
200532
+ path: `/api/repo/${params.repoContext.owner}/${params.repoContext.name}/run-context${search2 ? `?${search2}` : ""}`,
200349
200533
  headers,
200350
200534
  signal: controller.signal
200351
200535
  });
@@ -200412,7 +200596,13 @@ async function resolveRunContextData(params) {
200412
200596
  retries: [100, 500],
200413
200597
  bail: (error62) => !isTransientOctokitError(error62)
200414
200598
  })(),
200415
- fetchRunContext({ token: params.token, repoContext, oidcToken, runType: params.runType })
200599
+ fetchRunContext({
200600
+ token: params.token,
200601
+ repoContext,
200602
+ oidcToken,
200603
+ runType: params.runType,
200604
+ routedTier: params.routedTier
200605
+ })
200416
200606
  ]);
200417
200607
  return {
200418
200608
  repo: {
@@ -201320,6 +201510,12 @@ function logRunStartup(ctx) {
201320
201510
  log.info(
201321
201511
  `\xBB effort: ${resolveEffortForLog({ payload: ctx.payload, resolvedModel: ctx.resolvedModel })}`
201322
201512
  );
201513
+ const routing = ctx.payload.routing;
201514
+ if (routing) {
201515
+ log.info(
201516
+ `\xBB routed: ${routing.tier} (${routing.source}: stakes ${routing.stakes}, workload ${routing.workload}) \u2014 ${routing.rationale}`
201517
+ );
201518
+ }
201323
201519
  log.info(
201324
201520
  `\xBB agent: ${resolveAgentForLog({ agentName: ctx.agentName, resolvedModel: ctx.resolvedModel })}`
201325
201521
  );
@@ -201514,7 +201710,8 @@ async function main() {
201514
201710
  const runContext = await resolveRunContextData({
201515
201711
  octokit: initialOctokit,
201516
201712
  token: jobToken,
201517
- runType: typeof resolvedPromptInput === "string" ? void 0 : resolvedPromptInput.type
201713
+ runType: typeof resolvedPromptInput === "string" ? void 0 : resolvedPromptInput.type,
201714
+ routedTier: typeof resolvedPromptInput === "string" ? void 0 : resolvedPromptInput.routing?.tier
201518
201715
  });
201519
201716
  timer.checkpoint("runContextData");
201520
201717
  const payload = resolvePayload(resolvedPromptInput, runContext.repoSettings);
@@ -5,8 +5,8 @@
5
5
  export { CLI_CONTRACT_HEADER, CLI_CONTRACT_VERSION, CLI_UPGRADE_MESSAGE } from "../cliContract.ts";
6
6
  export type { ConfigField, ConfigScope, ConfigValue } from "../configuration.ts";
7
7
  export { configEntrySchema, configFields, configResponseSchema, configValueSchema, } from "../configuration.ts";
8
- export type { AuthorPermission, AutoTier, EffortPosition, ModelAlias, ModelProvider, Payload, PayloadEvent, ProviderConfig, PushPermission, ShellPermission, ToolPermission, WriteablePayload, XrepoConfig, } from "../external.ts";
9
- export { AUTO_EFFICIENT, AUTO_INTELLIGENT, DEFAULT_EFFORT_POSITION, DEFAULT_PROXY_MODEL, defaultAutoTier, EFFORT_ALIASES, getAutoSelectHintModel, getModelEffortLevels, getModelEnvVars, getModelManagedCredentials, getModelProvider, getProviderDisplayName, isAutoTier, isCardGatedModel, isEffortPosition, isOssAllowedModel, modelAliases, modelHasStoredAuth, OSS_MODEL_ALLOWLIST, OSS_RECOMMENDED_MODEL, offeredRungs, ossFundedModelNames, PROVIDER_GATEWAY_URL_ENV, parseEffortPosition, parseModel, providers, pullfrogMcpName, resolveAutoTier, resolveCliModel, resolveDisplayAlias, resolveModelRung, resolveModelSlug, resolveOpenRouterModel, resolveRung, rungLabel, rungPosition, SUBSIDY_RUNG, } from "../external.ts";
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";
10
10
  export type { Mode } from "../modes.ts";
11
11
  export { modes } from "../modes.ts";
12
12
  export { commercialPaywallBody } from "../utils/billingErrors.ts";