@blockrun/franklin 3.28.3 → 3.28.5

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.
@@ -456,7 +456,7 @@ function formatCompactSummary(raw) {
456
456
  function pickCompactionModel(primaryModel) {
457
457
  // Free parent → free compaction (no silent charge)
458
458
  if (primaryModel.startsWith('nvidia/') || primaryModel === 'blockrun/free') {
459
- return 'nvidia/qwen3-coder-480b';
459
+ return 'nvidia/llama-4-maverick';
460
460
  }
461
461
  // Use cheapest capable model for summarization to save cost
462
462
  // Tier down: opus/pro → sonnet, sonnet → haiku, everything else → flash (cheapest capable)
@@ -242,7 +242,7 @@ You run on the BlockRun AI Gateway. When the user asks you to "test the BlockRun
242
242
  - \`GET /.well-known/x402\` — x402 resource list with prices
243
243
 
244
244
  **LLM (POST, x402-paid)**
245
- - \`POST /v1/chat/completions\` — OpenAI-compatible. Body: \`{ model, messages, stream?, tools?, max_tokens?, temperature? }\`. \`model\` MUST come from \`GET /v1/models\` (real frontier examples on the gateway as of 2026-05: \`anthropic/claude-sonnet-4.6\`, \`anthropic/claude-opus-4.8\`, \`deepseek/deepseek-v4-pro\`, \`zai/glm-5.1\`, \`nvidia/qwen3-coder-480b\`, \`openai/gpt-5-nano\`). Do NOT invent versions like \`openai/gpt-5.1\` or \`xai/grok-5\` — those don't exist; the gateway 400s with the valid list in the error body, so when in doubt fetch \`GET /v1/models\` first.
245
+ - \`POST /v1/chat/completions\` — OpenAI-compatible. Body: \`{ model, messages, stream?, tools?, max_tokens?, temperature? }\`. \`model\` MUST come from \`GET /v1/models\` (real frontier examples on the gateway as of 2026-06: \`anthropic/claude-sonnet-4.6\`, \`anthropic/claude-opus-4.8\`, \`deepseek/deepseek-v4-pro\`, \`zai/glm-5.1\`, \`nvidia/llama-4-maverick\`, \`openai/gpt-5-nano\`). Do NOT invent versions like \`openai/gpt-5.1\` or \`xai/grok-5\` — those don't exist; the gateway 400s with the valid list in the error body, so when in doubt fetch \`GET /v1/models\` first.
246
246
  - \`POST /v1/messages\` — Anthropic-compatible. Body: \`{ model, messages, max_tokens, system?, tools? }\`.
247
247
 
248
248
  **Media (POST, x402-paid; GET to poll async jobs)**
package/dist/agent/llm.js CHANGED
@@ -422,10 +422,10 @@ export class ModelClient {
422
422
  // strings (now retired routing profiles) end up at the same place
423
423
  // without needing dedicated entries.
424
424
  const FALLBACKS = {
425
- 'blockrun/auto': 'nvidia/qwen3-coder-480b',
426
- 'blockrun/free': 'nvidia/qwen3-coder-480b',
425
+ 'blockrun/auto': 'nvidia/llama-4-maverick',
426
+ 'blockrun/free': 'nvidia/llama-4-maverick',
427
427
  };
428
- return FALLBACKS[model] || 'nvidia/qwen3-coder-480b';
428
+ return FALLBACKS[model] || 'nvidia/llama-4-maverick';
429
429
  }
430
430
  /**
431
431
  * USDC actually charged for the most recent stream. 0 if no payment
@@ -1348,7 +1348,7 @@ export async function interactiveSession(config, getUserInput, onEvent, onAbortR
1348
1348
  const hasTools = responseParts.some(p => p.type === 'tool_use');
1349
1349
  const hasThinking = responseParts.some(p => p.type === 'thinking');
1350
1350
  if (!hasText && !hasTools && !hasThinking) {
1351
- const EMPTY_FALLBACK_MODELS = ['nvidia/qwen3-coder-480b', 'nvidia/llama-4-maverick', 'zai/glm-5.1'];
1351
+ const EMPTY_FALLBACK_MODELS = ['nvidia/llama-4-maverick', 'nvidia/deepseek-v4-flash', 'zai/glm-5.1'];
1352
1352
  const nextModel = EMPTY_FALLBACK_MODELS.find(m => m !== config.model && !turnFailedModels.has(m));
1353
1353
  if (nextModel && recoveryAttempts < 2) {
1354
1354
  recoveryAttempts++;
@@ -1390,7 +1390,7 @@ export async function interactiveSession(config, getUserInput, onEvent, onAbortR
1390
1390
  // Excludes nvidia/* and *-coder-* — they're the source population.
1391
1391
  const TOOL_USE_FALLBACK_MODELS = [
1392
1392
  'anthropic/claude-haiku-4.5',
1393
- 'moonshot/kimi-k2.6',
1393
+ 'moonshot/kimi-k2.7',
1394
1394
  'openai/gpt-5',
1395
1395
  'anthropic/claude-sonnet-4.6',
1396
1396
  ];
@@ -40,11 +40,11 @@ const MODEL_MAX_OUTPUT = {
40
40
  'deepseek/deepseek-chat': 65_536,
41
41
  'deepseek/deepseek-reasoner': 65_536,
42
42
  'deepseek/deepseek-v4-pro': 65_536,
43
- // Kimi K2.6 supports 65K output per the BlockRun gateway model entry
44
- // (moonshot/kimi-k2.6 max_output: 65536). Without this entry the default
45
- // 16K cap left users with 4× headroom on the table for long-form coding
46
- // outputs and dashboard scaffolds the model can otherwise emit in a
47
- // single response.
43
+ // Kimi K2.7 (flagship) + K2.6 support 65K output per the BlockRun gateway
44
+ // model entry (max_output: 65536). Without this entry the default 16K cap
45
+ // left users with 4× headroom on the table for long-form coding outputs
46
+ // and dashboard scaffolds the model can otherwise emit in a single response.
47
+ 'moonshot/kimi-k2.7': 65_536,
48
48
  'moonshot/kimi-k2.6': 65_536,
49
49
  };
50
50
  /** Get max output tokens for a model */
@@ -233,6 +233,7 @@ const MODEL_CONTEXT_WINDOWS = {
233
233
  'xai/grok-4-1-fast-reasoning': 131_072,
234
234
  // Others
235
235
  'zai/glm-5.1': 200_000,
236
+ 'moonshot/kimi-k2.7': 256_000,
236
237
  'moonshot/kimi-k2.6': 256_000,
237
238
  'moonshot/kimi-k2.5': 128_000,
238
239
  'minimax/minimax-m3': 1_000_000,
@@ -113,7 +113,7 @@ export async function runVerification(history, handlers, client, config) {
113
113
  ];
114
114
  config.onEvent?.({ kind: 'text_delta', text: '\n*Verifying...*\n' });
115
115
  // Use agent-tested free model for verification.
116
- const verificationModel = 'nvidia/qwen3-coder-480b';
116
+ const verificationModel = 'nvidia/llama-4-maverick';
117
117
  try {
118
118
  // Simple single-turn verification call
119
119
  const response = await client.complete({
@@ -41,7 +41,7 @@ export async function slackCommand(opts) {
41
41
  const config = loadConfig();
42
42
  const model = opts.model ||
43
43
  config['default-model'] ||
44
- 'nvidia/qwen3-coder-480b';
44
+ 'nvidia/llama-4-maverick';
45
45
  const workingDir = process.cwd();
46
46
  const systemInstructions = assembleInstructions(workingDir, model);
47
47
  // Connect MCP servers (Notion, etc.) so the bot exposes their tools — mirrors
@@ -159,7 +159,7 @@ async function runCommand(options) {
159
159
  const chain = loadChain();
160
160
  const apiUrl = API_URLS[chain];
161
161
  const appConfig = loadAppConfig();
162
- const model = options.model || appConfig['default-model'] || 'nvidia/qwen3-coder-480b';
162
+ const model = options.model || appConfig['default-model'] || 'nvidia/llama-4-maverick';
163
163
  console.log(chalk.dim(` Model: ${model}`));
164
164
  console.log('');
165
165
  let result;
@@ -44,7 +44,7 @@ export async function telegramCommand(opts) {
44
44
  // Model: --model flag > config default > free default.
45
45
  const model = opts.model ||
46
46
  config['default-model'] ||
47
- 'nvidia/qwen3-coder-480b';
47
+ 'nvidia/llama-4-maverick';
48
48
  const workingDir = process.cwd();
49
49
  const systemInstructions = assembleInstructions(workingDir, model);
50
50
  // Resume the most recent session tagged for THIS owner so a process
@@ -9,9 +9,8 @@ import { loadLearnings, mergeLearning, saveLearnings, loadSkills, saveSkill } fr
9
9
  // Free models for learning extraction — JSON extraction is simple enough.
10
10
  // Ordered by reliability: try the best free model first, fall back to others.
11
11
  const EXTRACTION_MODELS = [
12
- 'nvidia/qwen3-coder-480b', // Agent-tested free model; strong at JSON tasks
13
- 'nvidia/llama-4-maverick', // Agent-tested fallback
14
- 'nvidia/deepseek-v4-flash', // 1M-ctx fallback (was glm-4.7 — NVIDIA NIM hung 2026-06-07)
12
+ 'nvidia/llama-4-maverick', // Agent-tested free model; reliable for JSON tasks
13
+ 'nvidia/deepseek-v4-flash', // 1M-ctx fallback (qwen3-coder-480b EOL 2026-06-11)
15
14
  ];
16
15
  const VALID_CATEGORIES = new Set([
17
16
  'language', 'model_preference', 'tool_pattern', 'coding_style',
@@ -5,7 +5,7 @@
5
5
  * Plugins implement Workflow; core orchestrates execution and provides infrastructure.
6
6
  */
7
7
  export const DEFAULT_MODEL_TIERS = {
8
- free: 'nvidia/qwen3-coder-480b',
9
- cheap: 'nvidia/qwen3-coder-480b', // Free by default; opt-in to paid flat-rate via 'zai/glm-5.1'.
8
+ free: 'nvidia/llama-4-maverick',
9
+ cheap: 'nvidia/llama-4-maverick', // Free by default; opt-in to paid flat-rate via 'zai/glm-5.1'.
10
10
  premium: 'anthropic/claude-sonnet-4.6',
11
11
  };
package/dist/pricing.js CHANGED
@@ -81,10 +81,12 @@ export const MODEL_PRICING = {
81
81
  'minimax/minimax-m3': { input: 0.3, output: 1.2 },
82
82
  'minimax/minimax-m2.7': { input: 0.3, output: 1.2 },
83
83
  'minimax/minimax-m2.5': { input: 0.3, output: 1.2 },
84
- // Moonshot
84
+ // Moonshot — K2.7 is the gateway flagship (2026-06); K2.6 demoted but still
85
+ // routes, kept for the `k2.6` pin + legacy session-cost records.
86
+ 'moonshot/kimi-k2.7': { input: 0.95, output: 4.0 },
85
87
  'moonshot/kimi-k2.6': { input: 0.95, output: 4.0 },
86
88
  // Retired (kept for legacy session-cost records; the gateway no longer
87
- // serves these and the picker shortcuts now resolve to K2.6).
89
+ // serves these and the picker shortcuts now resolve to the current flagship).
88
90
  'moonshot/kimi-k2.5': { input: 0.6, output: 3.0 },
89
91
  'nvidia/kimi-k2.5': { input: 0.55, output: 2.5 },
90
92
  // PROMOTION (active ~2026-04): flat $0.001/call for all GLM models
@@ -7,7 +7,7 @@ export const DEFAULT_FALLBACK_CONFIG = {
7
7
  chain: [
8
8
  'deepseek/deepseek-chat', // Direct fallback — cheap & reliable
9
9
  'google/gemini-2.5-flash', // Fast & capable
10
- 'nvidia/qwen3-coder-480b', // Free model as ultimate fallback
10
+ 'nvidia/llama-4-maverick', // Free model as ultimate fallback
11
11
  ],
12
12
  retryOn: [429, 500, 502, 503, 504, 529],
13
13
  maxRetries: 5,
@@ -141,18 +141,18 @@ const MODEL_SHORTCUTS = {
141
141
  deepseek: 'deepseek/deepseek-chat',
142
142
  r1: 'deepseek/deepseek-reasoner',
143
143
  // Free models (agent-tested gateway free tier — refreshed 2026-04)
144
- free: 'nvidia/qwen3-coder-480b',
145
- glm4: 'nvidia/qwen3-coder-480b',
146
- 'deepseek-free': 'nvidia/qwen3-coder-480b',
147
- 'qwen-coder': 'nvidia/qwen3-coder-480b',
148
- 'qwen-think': 'nvidia/qwen3-coder-480b',
144
+ free: 'nvidia/llama-4-maverick',
145
+ glm4: 'nvidia/llama-4-maverick',
146
+ 'deepseek-free': 'nvidia/llama-4-maverick',
147
+ 'qwen-coder': 'nvidia/llama-4-maverick',
148
+ 'qwen-think': 'nvidia/llama-4-maverick',
149
149
  maverick: 'nvidia/llama-4-maverick',
150
- 'gpt-oss': 'nvidia/qwen3-coder-480b',
151
- 'gpt-oss-small': 'nvidia/qwen3-coder-480b',
150
+ 'gpt-oss': 'nvidia/llama-4-maverick',
151
+ 'gpt-oss-small': 'nvidia/llama-4-maverick',
152
152
  'mistral-small': 'nvidia/llama-4-maverick',
153
153
  // Retired/unreliable gateway-model aliases (map to closest agent-tested current).
154
- nemotron: 'nvidia/qwen3-coder-480b',
155
- devstral: 'nvidia/qwen3-coder-480b',
154
+ nemotron: 'nvidia/llama-4-maverick',
155
+ devstral: 'nvidia/llama-4-maverick',
156
156
  // Minimax
157
157
  minimax: 'minimax/minimax-m3',
158
158
  'm3': 'minimax/minimax-m3',
@@ -161,11 +161,13 @@ const MODEL_SHORTCUTS = {
161
161
  glm: 'zai/glm-5.1',
162
162
  'glm-turbo': 'zai/glm-5-turbo',
163
163
  'glm5': 'zai/glm-5.1',
164
- kimi: 'moonshot/kimi-k2.6',
164
+ kimi: 'moonshot/kimi-k2.7',
165
+ 'k2.7': 'moonshot/kimi-k2.7',
166
+ // K2.6 demoted 2026-06 (flagship is K2.7) but still routes — `k2.6` pins it.
165
167
  'k2.6': 'moonshot/kimi-k2.6',
166
- // K2.5 retired by the gateway — aliases resolve to K2.6 for muscle memory.
167
- 'kimi-k2.5': 'moonshot/kimi-k2.6',
168
- 'k2.5': 'moonshot/kimi-k2.6',
168
+ // K2.5 retired — aliases resolve to the current flagship for muscle memory.
169
+ 'kimi-k2.5': 'moonshot/kimi-k2.7',
170
+ 'k2.5': 'moonshot/kimi-k2.7',
169
171
  };
170
172
  // Model pricing now uses shared source from src/pricing.ts
171
173
  function detectModelSwitch(parsed) {
@@ -45,7 +45,7 @@ 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.6', 'deepseek/deepseek-chat'],
48
+ fallback: ['google/gemini-2.5-flash', 'moonshot/kimi-k2.7', 'deepseek/deepseek-chat'],
49
49
  },
50
50
  MEDIUM: {
51
51
  primary: 'deepseek/deepseek-v4-pro',
@@ -440,14 +440,14 @@ export async function routeRequestAsync(prompt, profile = 'auto', classify = llm
440
440
  */
441
441
  export function resolveTierToModel(tier, profile = 'auto', needsVision = false) {
442
442
  // Free profile short-circuits — everything routes to a single free model.
443
- // qwen3-coder-480b is text-only; on a vision turn the free profile can't
443
+ // llama-4-maverick is text-only; on a vision turn the free profile can't
444
444
  // help us. Caller should detect this and warn the user that Free won't
445
445
  // handle images — for now we just return the free pick and let the model
446
- // fail gracefully. (Open question: should we hard-fall to nvidia/llama-4-
447
- // maverick here? Skipped until we see a real user hit this path.)
446
+ // fail gracefully. (The only vision-capable free model is the Nemotron Omni
447
+ // line; revisit hard-falling to it if a real user hits this path.)
448
448
  if (profile === 'free') {
449
449
  return {
450
- model: 'nvidia/qwen3-coder-480b',
450
+ model: 'nvidia/llama-4-maverick',
451
451
  tier: 'SIMPLE',
452
452
  confidence: 1.0,
453
453
  signals: needsVision ? ['free-profile', 'vision-unsupported'] : ['free-profile'],
@@ -479,7 +479,7 @@ export function routeRequest(prompt, profile = 'auto', needsVision = false) {
479
479
  // Free profile — always use free model
480
480
  if (profile === 'free') {
481
481
  return {
482
- model: 'nvidia/qwen3-coder-480b',
482
+ model: 'nvidia/llama-4-maverick',
483
483
  tier: 'SIMPLE',
484
484
  confidence: 1.0,
485
485
  signals: needsVision ? ['free-profile', 'vision-unsupported'] : ['free-profile'],
@@ -569,27 +569,26 @@ export function getFallbackChain(tier, profile = 'auto') {
569
569
  // to keep the user moving without waiting for funding.
570
570
  //
571
571
  // The lists are ordered: best-fit free model first, then degraded fallbacks.
572
- // Coding goes to qwen3-coder; everything else (chat / trading / research /
573
- // reasoning / creative) prefers general-purpose free models that aren't
574
- // coder-tuned. Without this split, a BTC question that exhausted paid
575
- // models was being handed to qwen3-coder-480b — a coder model trying to
576
- // do technical analysis. Reported 2026-05-03 with a markets question
577
- // routed to a coder model on Sonnet failure.
572
+ // llama-4-maverick leads every category — it's the only reliably-healthy free
573
+ // model and covers chat / coding / reasoning. deepseek-v4-flash (1M ctx) is the
574
+ // secondary; it occasionally times out on the NVIDIA NIM upstream, so it sits
575
+ // behind maverick rather than leading.
578
576
  // 2026-06-07: nvidia/glm-4.7 dropped from every chain — NVIDIA NIM hung, the
579
- // gateway redirects it to qwen3-coder-480b (already present here), so routing to
580
- // it just wasted a slot and mislabeled the model. qwen3-coder-480b + llama-4-
581
- // maverick are both healthy and cover all categories.
577
+ // gateway redirected it to a now-dead model, so routing to it just wasted a slot.
578
+ // 2026-06-11: nvidia/qwen3-coder-480b removed — its upstream
579
+ // (qwen/qwen3-coder-480b-a35b-instruct) reached end-of-life and the gateway now
580
+ // 410s on it. maverick + deepseek-v4-flash cover all categories.
582
581
  const FREE_MODELS_BY_CATEGORY = {
583
- coding: ['nvidia/qwen3-coder-480b', 'nvidia/llama-4-maverick'],
584
- trading: ['nvidia/llama-4-maverick', 'nvidia/qwen3-coder-480b'],
585
- research: ['nvidia/llama-4-maverick', 'nvidia/qwen3-coder-480b'],
586
- reasoning: ['nvidia/llama-4-maverick', 'nvidia/qwen3-coder-480b'],
587
- chat: ['nvidia/llama-4-maverick', 'nvidia/qwen3-coder-480b'],
588
- creative: ['nvidia/llama-4-maverick', 'nvidia/qwen3-coder-480b'],
582
+ coding: ['nvidia/llama-4-maverick', 'nvidia/deepseek-v4-flash'],
583
+ trading: ['nvidia/llama-4-maverick', 'nvidia/deepseek-v4-flash'],
584
+ research: ['nvidia/llama-4-maverick', 'nvidia/deepseek-v4-flash'],
585
+ reasoning: ['nvidia/llama-4-maverick', 'nvidia/deepseek-v4-flash'],
586
+ chat: ['nvidia/llama-4-maverick', 'nvidia/deepseek-v4-flash'],
587
+ creative: ['nvidia/llama-4-maverick', 'nvidia/deepseek-v4-flash'],
589
588
  };
590
589
  const DEFAULT_FREE_CHAIN = [
591
590
  'nvidia/llama-4-maverick',
592
- 'nvidia/qwen3-coder-480b',
591
+ 'nvidia/deepseek-v4-flash',
593
592
  ];
594
593
  /**
595
594
  * Pick the next free model to try given the question category and which
@@ -41,7 +41,8 @@ const VISION_MODELS = new Set([
41
41
  // xAI — only Grok 4 base supports vision; grok-4-1-fast-reasoning is text-only
42
42
  'xai/grok-4-0709',
43
43
  'xai/grok-3',
44
- // Moonshot — K2.6 added vision + reasoning when it replaced K2.5
44
+ // Moonshot — K2.7 (flagship) + K2.6 are multimodal (image + video input)
45
+ 'moonshot/kimi-k2.7',
45
46
  'moonshot/kimi-k2.6',
46
47
  // NVIDIA inference — Llama 4 Maverick is multimodal; deepseek/qwen-coder are not
47
48
  'nvidia/llama-4-maverick',
package/dist/tools/moa.js CHANGED
@@ -14,14 +14,13 @@ import { ModelClient } from '../agent/llm.js';
14
14
  // ─── Configuration ────────────────────────────────────────────────────────
15
15
  /** Reference models — diverse, cheap/free models for parallel queries. */
16
16
  const REFERENCE_MODELS = [
17
- 'nvidia/qwen3-coder-480b', // Free, agent-tested coding
18
17
  'nvidia/llama-4-maverick', // Free, agent-tested general chat
19
- 'nvidia/deepseek-v4-flash', // Free, 1M ctx (was glm-4.7 — NVIDIA NIM hung 2026-06-07)
18
+ 'nvidia/deepseek-v4-flash', // Free, 1M ctx (qwen3-coder-480b EOL 2026-06-11)
20
19
  'google/gemini-2.5-flash', // Fast, cheap
21
20
  'deepseek/deepseek-chat', // Cheap, good reasoning
22
21
  ];
23
22
  /** Aggregator model — free by default. Users explicitly pass `aggregator` to upgrade. */
24
- const AGGREGATOR_MODEL = 'nvidia/qwen3-coder-480b';
23
+ const AGGREGATOR_MODEL = 'nvidia/llama-4-maverick';
25
24
  /** Max tokens per reference response. */
26
25
  const REFERENCE_MAX_TOKENS = 4096;
27
26
  /** Max tokens for aggregator. */
@@ -18,7 +18,7 @@ async function execute(input, ctx) {
18
18
  return { output: 'Error: prompt is required', isError: true };
19
19
  }
20
20
  // Resolve which model the sub-agent will actually run on
21
- const subModel = model || registeredParentModel || 'nvidia/qwen3-coder-480b';
21
+ const subModel = model || registeredParentModel || 'nvidia/llama-4-maverick';
22
22
  // Cost gate: if parent is free but sub-agent wants paid, ask user first.
23
23
  // Prevents silent charges when the agent decides to spawn a more capable sub-agent.
24
24
  if (isFreeModel(registeredParentModel) && !isFreeModel(subModel)) {
@@ -77,22 +77,22 @@ export const MODEL_SHORTCUTS = {
77
77
  'deepseek-v3.2': 'nvidia/deepseek-v4-flash',
78
78
  'deepseek-v3': 'nvidia/deepseek-v4-flash',
79
79
  // Free (agent-tested BlockRun gateway free tier — refreshed 2026-04)
80
- free: 'nvidia/qwen3-coder-480b',
81
- glm4: 'nvidia/qwen3-coder-480b',
82
- 'deepseek-free': 'nvidia/qwen3-coder-480b',
83
- 'qwen-coder': 'nvidia/qwen3-coder-480b',
84
- 'qwen-think': 'nvidia/qwen3-coder-480b',
80
+ free: 'nvidia/llama-4-maverick',
81
+ glm4: 'nvidia/llama-4-maverick',
82
+ 'deepseek-free': 'nvidia/llama-4-maverick',
83
+ 'qwen-coder': 'nvidia/llama-4-maverick',
84
+ 'qwen-think': 'nvidia/llama-4-maverick',
85
85
  maverick: 'nvidia/llama-4-maverick',
86
- 'gpt-oss': 'nvidia/qwen3-coder-480b',
87
- 'gpt-oss-small': 'nvidia/qwen3-coder-480b',
86
+ 'gpt-oss': 'nvidia/llama-4-maverick',
87
+ 'gpt-oss-small': 'nvidia/llama-4-maverick',
88
88
  'mistral-small': 'nvidia/llama-4-maverick',
89
89
  // Backward-compatibility aliases for models the gateway retired or exposes
90
90
  // unreliably on /v1/messages. Map to agent-tested free models so shortcuts
91
91
  // keep working without silent paid fallback or empty tool-use turns.
92
92
  // Map to the closest current free model so old session records + user
93
93
  // muscle memory keep working.
94
- nemotron: 'nvidia/qwen3-coder-480b',
95
- devstral: 'nvidia/qwen3-coder-480b',
94
+ nemotron: 'nvidia/llama-4-maverick',
95
+ devstral: 'nvidia/llama-4-maverick',
96
96
  // Others
97
97
  minimax: 'minimax/minimax-m3',
98
98
  'm3': 'minimax/minimax-m3',
@@ -101,13 +101,15 @@ export const MODEL_SHORTCUTS = {
101
101
  'glm-5': 'zai/glm-5',
102
102
  'glm-turbo': 'zai/glm-5-turbo',
103
103
  'glm5': 'zai/glm-5.1',
104
- kimi: 'moonshot/kimi-k2.6',
104
+ kimi: 'moonshot/kimi-k2.7',
105
+ 'k2.7': 'moonshot/kimi-k2.7',
106
+ // K2.6 demoted 2026-06 (gateway flagship is K2.7) but still routes — the
107
+ // `k2.6` pin keeps working for anyone who wants it explicitly.
105
108
  'k2.6': 'moonshot/kimi-k2.6',
106
- // K2.5 was retired by the gateway in favor of K2.6 (256K ctx, vision +
107
- // reasoning, $0.95 in / $4 out — strictly better in every dimension).
108
- // The aliases stay so muscle memory keeps working but resolve to K2.6.
109
- 'kimi-k2.5': 'moonshot/kimi-k2.6',
110
- 'k2.5': 'moonshot/kimi-k2.6',
109
+ // K2.5 was retired by the gateway. Aliases stay so muscle memory keeps
110
+ // working but resolve to the current Kimi flagship (K2.7).
111
+ 'kimi-k2.5': 'moonshot/kimi-k2.7',
112
+ 'k2.5': 'moonshot/kimi-k2.7',
111
113
  };
112
114
  /**
113
115
  * Resolve a model name — supports shortcuts.
@@ -177,7 +179,7 @@ export const PICKER_CATEGORIES = [
177
179
  { id: 'google/gemini-2.5-flash', shortcut: 'flash', label: 'Gemini 2.5 Flash', price: '$0.3/$2.5' },
178
180
  // Re-aliased to V4 Flash Chat upstream — context 1M, price 30% lower.
179
181
  { id: 'deepseek/deepseek-chat', shortcut: 'deepseek', label: 'DeepSeek V4 Flash Chat', price: '$0.2/$0.4' },
180
- { id: 'moonshot/kimi-k2.6', shortcut: 'kimi', label: 'Kimi K2.6', price: '$0.95/$4' },
182
+ { id: 'moonshot/kimi-k2.7', shortcut: 'kimi', label: 'Kimi K2.7', price: '$0.95/$4' },
181
183
  // GLM flat-rate promos fully ended 2026-06-06 — whole family per-token
182
184
  // now (glm-5 $0.60/$1.92; `glm` shortcut still pins flagship glm-5.1).
183
185
  { id: 'zai/glm-5', shortcut: 'glm-5', label: 'GLM-5', price: '$0.6/$1.92' },
@@ -189,13 +191,13 @@ export const PICKER_CATEGORIES = [
189
191
  {
190
192
  category: '🆓 Free (no USDC needed)',
191
193
  models: [
192
- // V4 Flash leads the section: newest gateway addition, general-purpose,
193
- // fast — better default for most users than the coder-specialized Qwen.
194
- // V3.2 hidden (shortcut `deepseek-v3` still works) since V4 Flash
195
- // supersedes it; keeping the picker tight.
196
- { id: 'nvidia/deepseek-v4-flash', shortcut: 'deepseek-v4', label: 'DeepSeek V4 Flash', price: 'FREE', highlight: true },
197
- { id: 'nvidia/qwen3-coder-480b', shortcut: 'free', label: 'Qwen3 Coder 480B', price: 'FREE' },
198
- { id: 'nvidia/llama-4-maverick', shortcut: 'maverick', label: 'Llama 4 Maverick', price: 'FREE' },
194
+ // Maverick leads the section: the only reliably-healthy free model, and
195
+ // the default the `free` shortcut + free routing profile resolve to.
196
+ // V4 Flash (1M ctx) is the secondary — strong but occasionally times out
197
+ // on the NVIDIA NIM upstream. (Qwen3 Coder 480B removed 2026-06-11: its
198
+ // upstream reached EOL and the gateway 410s on it.)
199
+ { id: 'nvidia/llama-4-maverick', shortcut: 'maverick', label: 'Llama 4 Maverick', price: 'FREE', highlight: true },
200
+ { id: 'nvidia/deepseek-v4-flash', shortcut: 'deepseek-v4', label: 'DeepSeek V4 Flash', price: 'FREE' },
199
201
  ],
200
202
  },
201
203
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blockrun/franklin",
3
- "version": "3.28.3",
3
+ "version": "3.28.5",
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": {