@blockrun/franklin 3.34.1 → 3.34.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.
@@ -1604,11 +1604,12 @@ export async function interactiveSession(config, getUserInput, onEvent, onAbortR
1604
1604
  .join('\n');
1605
1605
  if (looksLikeStalledIntent(tailText)) {
1606
1606
  // Tool-use-strong fallbacks. Ordered cheap → premium so a free
1607
- // tier still gets a Kimi/Haiku attempt before paying for GPT-5.
1607
+ // tier still gets a Haiku attempt before paying for GPT-5.
1608
1608
  // Excludes nvidia/* and *-coder-* — they're the source population.
1609
+ // (Kimi dropped 2026-07: retired K2.x, and K3 is premium-priced —
1610
+ // Haiku already fills the cheap tool-use slot here.)
1609
1611
  const TOOL_USE_FALLBACK_MODELS = [
1610
1612
  'anthropic/claude-haiku-4.5',
1611
- 'moonshot/kimi-k2.7',
1612
1613
  'openai/gpt-5.4',
1613
1614
  'anthropic/claude-sonnet-4.6',
1614
1615
  ];
@@ -50,10 +50,11 @@ const MODEL_MAX_OUTPUT = {
50
50
  'deepseek/deepseek-chat': 65_536,
51
51
  'deepseek/deepseek-reasoner': 65_536,
52
52
  'deepseek/deepseek-v4-pro': 65_536,
53
- // Kimi K2.7 (flagship) + K2.6 support 65K output per the BlockRun gateway
53
+ // Kimi K3 (flagship, 2026-07) supports 65K output per the BlockRun gateway
54
54
  // model entry (max_output: 65536). Without this entry the default 16K cap
55
55
  // left users with 4× headroom on the table for long-form coding outputs
56
56
  // and dashboard scaffolds the model can otherwise emit in a single response.
57
+ 'moonshot/kimi-k3': 65_536,
57
58
  'moonshot/kimi-k2.7': 65_536,
58
59
  'moonshot/kimi-k2.6': 65_536,
59
60
  };
@@ -249,6 +249,7 @@ const MODEL_CONTEXT_WINDOWS = {
249
249
  // Others
250
250
  'zai/glm-5.2': 1_000_000, // flagship bump 2026-06 — context jumped 200K → 1M
251
251
  'zai/glm-5.1': 200_000,
252
+ 'moonshot/kimi-k3': 1_048_576,
252
253
  'moonshot/kimi-k2.7': 256_000,
253
254
  'moonshot/kimi-k2.6': 256_000,
254
255
  'moonshot/kimi-k2.5': 128_000,
package/dist/pricing.js CHANGED
@@ -105,12 +105,14 @@ export const MODEL_PRICING = {
105
105
  'minimax/minimax-m3': { input: 0.3, output: 1.2 },
106
106
  'minimax/minimax-m2.7': { input: 0.3, output: 1.2 },
107
107
  'minimax/minimax-m2.5': { input: 0.3, output: 1.2 },
108
- // Moonshot — K2.7 is the gateway flagship (2026-06); K2.6 demoted but still
109
- // routes, kept for the `k2.6` pin + legacy session-cost records.
108
+ // Moonshot — K3 is the gateway flagship (2026-07): 2.8T open MoE, 1M
109
+ // context, multimodal (image+text), returns reasoning_content. Pricier
110
+ // than the K2.x line it replaced ($3/$15 vs K2.7's $0.95/$4).
111
+ 'moonshot/kimi-k3': { input: 3.0, output: 15.0 },
112
+ // Retired K2.x line (kept for legacy session-cost records; the gateway no
113
+ // longer serves these and the `kimi`/`k2.*` shortcuts now resolve to K3).
110
114
  'moonshot/kimi-k2.7': { input: 0.95, output: 4.0 },
111
115
  'moonshot/kimi-k2.6': { input: 0.95, output: 4.0 },
112
- // Retired (kept for legacy session-cost records; the gateway no longer
113
- // serves these and the picker shortcuts now resolve to the current flagship).
114
116
  'moonshot/kimi-k2.5': { input: 0.6, output: 3.0 },
115
117
  'nvidia/kimi-k2.5': { input: 0.55, output: 2.5 },
116
118
  // PROMOTION (active ~2026-04): flat $0.001/call for all GLM models
@@ -45,7 +45,10 @@ function loadLearnedWeights() {
45
45
  const AUTO_TIERS = {
46
46
  SIMPLE: {
47
47
  primary: 'deepseek/deepseek-v4-pro',
48
- fallback: ['google/gemini-2.5-flash', 'moonshot/kimi-k2.7', 'deepseek/deepseek-chat'],
48
+ // Cheap-tier fallbacks only. Kimi dropped here 2026-07: the K2.x line was
49
+ // retired and its replacement K3 is premium-priced ($3/$15) — it doesn't
50
+ // belong in a cost-saving fallback chain.
51
+ fallback: ['google/gemini-2.5-flash', 'deepseek/deepseek-chat'],
49
52
  },
50
53
  MEDIUM: {
51
54
  primary: 'deepseek/deepseek-v4-pro',
@@ -51,9 +51,10 @@ const VISION_MODELS = new Set([
51
51
  // xAI — only Grok 4 base supports vision; grok-4-1-fast-reasoning is text-only
52
52
  'xai/grok-4-0709',
53
53
  'xai/grok-3',
54
- // Moonshot — K2.7 (flagship) + K2.6 are multimodal (image + video input)
55
- 'moonshot/kimi-k2.7',
56
- 'moonshot/kimi-k2.6',
54
+ // Moonshot — K3 (flagship, 2026-07) is multimodal (image + text input);
55
+ // gateway catalog lists it under the "vision" category. Replaced the
56
+ // retired K2.7/K2.6 line.
57
+ 'moonshot/kimi-k3',
57
58
  // NVIDIA inference — Nemotron Nano VL is multimodal; deepseek/qwen-coder are
58
59
  // not. Llama 4 Maverick dropped 2026-07-14: it left the gateway catalog, and
59
60
  // listing it here contradicted routeRequest()'s own "maverick is text-only"
@@ -141,15 +141,15 @@ export const MODEL_SHORTCUTS = {
141
141
  'glm-5.1': 'zai/glm-5.1',
142
142
  'glm-turbo': 'zai/glm-5-turbo',
143
143
  'glm5': 'zai/glm-5.2',
144
- kimi: 'moonshot/kimi-k2.7',
145
- 'k2.7': 'moonshot/kimi-k2.7',
146
- // K2.6 demoted 2026-06 (gateway flagship is K2.7) but still routes — the
147
- // `k2.6` pin keeps working for anyone who wants it explicitly.
148
- 'k2.6': 'moonshot/kimi-k2.6',
149
- // K2.5 was retired by the gateway. Aliases stay so muscle memory keeps
150
- // working but resolve to the current Kimi flagship (K2.7).
151
- 'kimi-k2.5': 'moonshot/kimi-k2.7',
152
- 'k2.5': 'moonshot/kimi-k2.7',
144
+ kimi: 'moonshot/kimi-k3',
145
+ k3: 'moonshot/kimi-k3',
146
+ // The K2.x line was retired by the gateway (2026-07, replaced by K3).
147
+ // These pins stay so muscle memory keeps working but resolve to the
148
+ // current Kimi flagship (K3).
149
+ 'k2.7': 'moonshot/kimi-k3',
150
+ 'k2.6': 'moonshot/kimi-k3',
151
+ 'kimi-k2.5': 'moonshot/kimi-k3',
152
+ 'k2.5': 'moonshot/kimi-k3',
153
153
  };
154
154
  /**
155
155
  * Resolve a model name — supports shortcuts. Returns the canonical model id.
@@ -237,6 +237,9 @@ export const PICKER_CATEGORIES = [
237
237
  { id: 'google/gemini-3.1-pro', shortcut: 'gemini-3', label: 'Gemini 3.1 Pro', price: '$2/$12' },
238
238
  { id: 'google/gemini-2.5-pro', shortcut: 'gemini', label: 'Gemini 2.5 Pro', price: '$1.25/$10' },
239
239
  { id: 'xai/grok-4.5', shortcut: 'grok', label: 'Grok 4.5', price: '$2.5/$9' },
240
+ // Kimi K3 (2026-07): 2.8T open MoE, 1M context, multimodal + reasoning.
241
+ // Replaced the budget K2.7 line — now premium-priced ($3/$15).
242
+ { id: 'moonshot/kimi-k3', shortcut: 'kimi', label: 'Kimi K3', price: '$3/$15' },
240
243
  ],
241
244
  },
242
245
  {
@@ -263,7 +266,6 @@ export const PICKER_CATEGORIES = [
263
266
  { id: 'google/gemini-2.5-flash', shortcut: 'flash', label: 'Gemini 2.5 Flash', price: '$0.3/$2.5' },
264
267
  // Re-aliased to V4 Flash Chat upstream — context 1M, price 30% lower.
265
268
  { id: 'deepseek/deepseek-chat', shortcut: 'deepseek', label: 'DeepSeek V4 Flash Chat', price: '$0.2/$0.4' },
266
- { id: 'moonshot/kimi-k2.7', shortcut: 'kimi', label: 'Kimi K2.7', price: '$0.95/$4' },
267
269
  // GLM flat-rate promos fully ended 2026-06-06 — whole family per-token
268
270
  // now (glm-5 $0.60/$1.92; `glm` shortcut pins flagship glm-5.2, listed
269
271
  // in Reasoning above).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blockrun/franklin",
3
- "version": "3.34.1",
3
+ "version": "3.34.2",
4
4
  "description": "Franklin Agent — The AI agent with a wallet. Spends USDC autonomously to get real work done. Pay per action, no subscriptions.",
5
5
  "type": "module",
6
6
  "exports": {