@blockrun/franklin 3.30.1 → 3.32.0

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.
Files changed (43) hide show
  1. package/dist/agent/commands.js +72 -2
  2. package/dist/agent/compact.js +1 -1
  3. package/dist/agent/evaluator.js +1 -1
  4. package/dist/agent/llm.d.ts +1 -1
  5. package/dist/agent/llm.js +64 -19
  6. package/dist/agent/loop.js +23 -4
  7. package/dist/agent/optimize.js +10 -0
  8. package/dist/agent/permissions.js +17 -0
  9. package/dist/agent/tokens.js +23 -2
  10. package/dist/agent/turn-analyzer.js +1 -1
  11. package/dist/agent/types.d.ts +24 -0
  12. package/dist/agent/verification.js +1 -1
  13. package/dist/commands/predict.d.ts +10 -0
  14. package/dist/commands/predict.js +143 -0
  15. package/dist/commands/slack.js +1 -1
  16. package/dist/commands/social.js +1 -1
  17. package/dist/commands/start.js +24 -7
  18. package/dist/commands/telegram.js +1 -1
  19. package/dist/config.d.ts +1 -0
  20. package/dist/config.js +6 -0
  21. package/dist/index.js +12 -0
  22. package/dist/learnings/extractor.js +2 -2
  23. package/dist/market/client.d.ts +69 -0
  24. package/dist/market/client.js +230 -0
  25. package/dist/plugin-sdk/workflow.js +3 -3
  26. package/dist/pricing.js +27 -6
  27. package/dist/proxy/fallback.js +1 -1
  28. package/dist/proxy/server.js +6 -86
  29. package/dist/router/index.js +14 -13
  30. package/dist/router/vision.js +15 -3
  31. package/dist/serve/server.js +4 -1
  32. package/dist/tools/agent-talent.d.ts +15 -0
  33. package/dist/tools/agent-talent.js +116 -0
  34. package/dist/tools/defillama.js +6 -5
  35. package/dist/tools/index.d.ts +15 -0
  36. package/dist/tools/index.js +28 -0
  37. package/dist/tools/moa.js +3 -3
  38. package/dist/tools/prediction.js +11 -10
  39. package/dist/tools/subagent.js +1 -1
  40. package/dist/tools/trading.js +3 -2
  41. package/dist/ui/model-picker.d.ts +26 -1
  42. package/dist/ui/model-picker.js +107 -38
  43. package/package.json +2 -2
@@ -37,6 +37,7 @@ import { loadChain, API_URLS, VERSION } from '../config.js';
37
37
  import { logger } from '../logger.js';
38
38
  import { recordFetch } from '../trading/providers/telemetry.js';
39
39
  import { recordUsage } from '../stats/tracker.js';
40
+ import { frameUntrusted } from './untrusted.js';
40
41
  const TIMEOUT_MS = 30_000;
41
42
  const DEFAULT_LIMIT = 20;
42
43
  const MAX_LIMIT = 50;
@@ -395,7 +396,7 @@ async function execute(input, ctx) {
395
396
  });
396
397
  }
397
398
  lines.push(`_$0.005 paid via x402._`);
398
- return { output: lines.join('\n') };
399
+ return { output: frameUntrusted('Prediction-market data (untrusted)', lines.join('\n')) };
399
400
  }
400
401
  case 'leaderboard': {
401
402
  // Global top-wallet ranking. Cheap ($0.001) — the right answer to
@@ -443,7 +444,7 @@ async function execute(input, ctx) {
443
444
  lines.push(`${i + 1}. \`${w}\`${handle}` + (parts.length > 0 ? ` — ${parts.join(' · ')}` : ''));
444
445
  });
445
446
  lines.push('', `_$0.001 paid via x402._`);
446
- return { output: lines.join('\n') };
447
+ return { output: frameUntrusted('Prediction-market data (untrusted)', lines.join('\n')) };
447
448
  }
448
449
  case 'walletProfile': {
449
450
  if (!wallets || !wallets.trim()) {
@@ -558,7 +559,7 @@ async function execute(input, ctx) {
558
559
  lines.push(` ${recent.join(' · ')}`);
559
560
  });
560
561
  lines.push('', `_$0.005 paid via x402._`);
561
- return { output: lines.join('\n') };
562
+ return { output: frameUntrusted('Prediction-market data (untrusted)', lines.join('\n')) };
562
563
  }
563
564
  case 'walletPnl': {
564
565
  // Single-wallet P&L summary + time series.
@@ -634,7 +635,7 @@ async function execute(input, ctx) {
634
635
  }
635
636
  }
636
637
  lines.push('', `_$0.005 paid via x402._`);
637
- return { output: lines.join('\n') };
638
+ return { output: frameUntrusted('Prediction-market data (untrusted)', lines.join('\n')) };
638
639
  }
639
640
  case 'walletPositions': {
640
641
  // Single-wallet positions (open + historical).
@@ -700,7 +701,7 @@ async function execute(input, ctx) {
700
701
  lines.push(`${i + 1}. **${title}** — ${parts.join(' · ')}`);
701
702
  });
702
703
  lines.push('', `_$0.005 paid via x402._`);
703
- return { output: lines.join('\n') };
704
+ return { output: frameUntrusted('Prediction-market data (untrusted)', lines.join('\n')) };
704
705
  }
705
706
  case 'smartActivity': {
706
707
  // "Discover markets where high-performing wallets are active right now."
@@ -741,7 +742,7 @@ async function execute(input, ctx) {
741
742
  lines.push(`${i + 1}. **${title}**${cidTag}` + (stats.length > 0 ? `\n ${stats.join(' · ')}` : ''));
742
743
  });
743
744
  lines.push('', `_$0.005 paid via x402._`);
744
- return { output: lines.join('\n') };
745
+ return { output: frameUntrusted('Prediction-market data (untrusted)', lines.join('\n')) };
745
746
  }
746
747
  case 'smartMoney': {
747
748
  if (!conditionId) {
@@ -796,7 +797,7 @@ async function execute(input, ctx) {
796
797
  lines.push(`**Smart performance:** ${perf.join(' · ')}`);
797
798
  }
798
799
  lines.push('', `_$0.005 paid via x402._`);
799
- return { output: lines.join('\n') };
800
+ return { output: frameUntrusted('Prediction-market data (untrusted)', lines.join('\n')) };
800
801
  }
801
802
  case 'searchPolymarket': {
802
803
  const raw = await getWithPayment('/v1/pm/polymarket/markets', {
@@ -843,7 +844,7 @@ async function execute(input, ctx) {
843
844
  (end ? ` · ends ${String(end).slice(0, 10)}` : ''));
844
845
  });
845
846
  lines.push('', `_$0.001 paid via x402._`);
846
- return { output: lines.join('\n') };
847
+ return { output: frameUntrusted('Prediction-market data (untrusted)', lines.join('\n')) };
847
848
  }
848
849
  case 'searchKalshi': {
849
850
  const raw = await getWithPayment('/v1/pm/kalshi/markets', {
@@ -879,7 +880,7 @@ async function execute(input, ctx) {
879
880
  (m.close_time ? ` · closes ${String(m.close_time).slice(0, 10)}` : ''));
880
881
  });
881
882
  lines.push('', `_$0.001 paid via x402._`);
882
- return { output: lines.join('\n') };
883
+ return { output: frameUntrusted('Prediction-market data (untrusted)', lines.join('\n')) };
883
884
  }
884
885
  case 'crossPlatform': {
885
886
  const raw = await getWithPayment('/v1/pm/matching-markets/pairs', {
@@ -917,7 +918,7 @@ async function execute(input, ctx) {
917
918
  }
918
919
  });
919
920
  lines.push('', `_$0.005 paid via x402._`);
920
- return { output: lines.join('\n') };
921
+ return { output: frameUntrusted('Prediction-market data (untrusted)', lines.join('\n')) };
921
922
  }
922
923
  default:
923
924
  return {
@@ -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/llama-4-maverick';
21
+ const subModel = model || registeredParentModel || 'nvidia/qwen3-next-80b-a3b-instruct';
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)) {
@@ -4,6 +4,7 @@ const SUPPORTED_STOCK_MARKETS = [
4
4
  ];
5
5
  import { rsi, macd, bollingerBands, volatility } from '../trading/metrics.js';
6
6
  import { bus } from '../events/bus.js';
7
+ import { frameUntrusted } from './untrusted.js';
7
8
  import { makeEvent } from '../events/types.js';
8
9
  function formatUsd(n) {
9
10
  if (n >= 1e12)
@@ -292,7 +293,7 @@ async function executeMarket(input, _ctx) {
292
293
  return { output: `Error: ${result}`, isError: true };
293
294
  }
294
295
  const lines = result.map((c, i) => `${i + 1}. ${c.name} (${c.symbol.toUpperCase()})${c.marketCapRank ? ` — #${c.marketCapRank}` : ''}`);
295
- return { output: `Trending coins:\n${lines.join('\n')}` };
296
+ return { output: frameUntrusted('Trending coins (untrusted)', lines.join('\n')) };
296
297
  }
297
298
  case 'overview': {
298
299
  const result = await getMarketOverview();
@@ -302,7 +303,7 @@ async function executeMarket(input, _ctx) {
302
303
  const header = 'Rank | Coin | Price | 24h Change | Market Cap';
303
304
  const sep = '-----|------|-------|------------|----------';
304
305
  const rows = result.map((c, i) => `${i + 1} | ${c.name} (${c.symbol.toUpperCase()}) | $${c.price.toLocaleString()} | ${c.change24h > 0 ? '+' : ''}${c.change24h.toFixed(2)}% | ${formatUsd(c.marketCap)}`);
305
- return { output: `Top 20 by Market Cap:\n${header}\n${sep}\n${rows.join('\n')}` };
306
+ return { output: frameUntrusted('Top coins by market cap (untrusted)', `${header}\n${sep}\n${rows.join('\n')}`) };
306
307
  }
307
308
  default:
308
309
  return {
@@ -4,9 +4,34 @@
4
4
  */
5
5
  export declare const MODEL_SHORTCUTS: Record<string, string>;
6
6
  /**
7
- * Resolve a model name — supports shortcuts.
7
+ * Resolve a model name — supports shortcuts. Returns the canonical model id.
8
+ *
9
+ * If the input matches a shortcut, the shortcut's target is returned. If the
10
+ * input is already a fully-qualified `provider/model` id (contains a `/`), it
11
+ * is returned verbatim so the gateway can validate it. Bare, unknown aliases
12
+ * (e.g. `llama3`, `foo`) resolve to themselves too, but the gateway will
13
+ * reject them — callers that care about a clean error should branch on
14
+ * {@link resolveModelStrict} instead.
8
15
  */
9
16
  export declare function resolveModel(input: string): string;
17
+ /**
18
+ * Strict variant of {@link resolveModel} — used by the `/model` handler so
19
+ * an unknown bare alias surfaces a clean error in the UI instead of
20
+ * forwarding `llama` to the gateway and getting back `HTTP 400: Unknown
21
+ * model: llama` two turns later.
22
+ *
23
+ * Recognised:
24
+ * - Any entry in {@link MODEL_SHORTCUTS} (case-insensitive).
25
+ * - Any id of the form `provider/model` (e.g. `anthropic/claude-sonnet-4.6`).
26
+ */
27
+ export declare function resolveModelStrict(input: string): {
28
+ ok: true;
29
+ id: string;
30
+ viaShortcut: boolean;
31
+ } | {
32
+ ok: false;
33
+ suggestion: string;
34
+ };
10
35
  export interface ModelEntry {
11
36
  id: string;
12
37
  shortcut: string;
@@ -15,24 +15,36 @@ export const MODEL_SHORTCUTS = {
15
15
  smart: 'blockrun/auto',
16
16
  eco: 'blockrun/auto',
17
17
  premium: 'blockrun/auto',
18
- // Anthropic
19
- sonnet: 'anthropic/claude-sonnet-4.6',
20
- claude: 'anthropic/claude-sonnet-4.6',
18
+ // Anthropic — `sonnet`/`claude` follow the newest Sonnet (5); `fable` is the
19
+ // Mythos-class tier above Opus.
20
+ fable: 'anthropic/claude-fable-5',
21
+ 'fable-5': 'anthropic/claude-fable-5',
22
+ sonnet: 'anthropic/claude-sonnet-5',
23
+ claude: 'anthropic/claude-sonnet-5',
24
+ 'sonnet-5': 'anthropic/claude-sonnet-5',
21
25
  'sonnet-4.6': 'anthropic/claude-sonnet-4.6',
26
+ 'sonnet-4.5': 'anthropic/claude-sonnet-4.5',
22
27
  opus: 'anthropic/claude-opus-4.8',
23
28
  'opus-4.8': 'anthropic/claude-opus-4.8',
24
29
  'opus-4.7': 'anthropic/claude-opus-4.7',
25
30
  'opus-4.6': 'anthropic/claude-opus-4.6',
31
+ 'opus-4.5': 'anthropic/claude-opus-4.5',
26
32
  haiku: 'anthropic/claude-haiku-4.5-20251001',
27
33
  'haiku-4.5': 'anthropic/claude-haiku-4.5-20251001',
28
34
  // OpenAI
29
- // `gpt` / `gpt5` / `gpt-5` follow the gateway's flagship — currently 5.5.
30
- gpt: 'openai/gpt-5.5',
31
- gpt5: 'openai/gpt-5.5',
32
- 'gpt-5': 'openai/gpt-5.5',
35
+ // `gpt` / `gpt5` / `gpt-5` follow the gateway's flagship — currently 5.6 Sol.
36
+ gpt: 'openai/gpt-5.6-sol',
37
+ gpt5: 'openai/gpt-5.6-sol',
38
+ 'gpt-5': 'openai/gpt-5.6-sol',
39
+ 'gpt-5.6': 'openai/gpt-5.6-sol',
40
+ 'gpt-5.6-sol': 'openai/gpt-5.6-sol',
41
+ 'gpt-5.6-terra': 'openai/gpt-5.6-terra',
42
+ 'gpt-5.6-luna': 'openai/gpt-5.6-luna',
33
43
  'gpt-5.5': 'openai/gpt-5.5',
34
44
  'gpt-5.4': 'openai/gpt-5.4',
35
45
  'gpt-5.4-pro': 'openai/gpt-5.4-pro',
46
+ 'gpt-5.4-mini': 'openai/gpt-5.4-mini',
47
+ 'gpt-5.4-nano': 'openai/gpt-5.4-nano',
36
48
  'gpt-5.3': 'openai/gpt-5.3',
37
49
  'gpt-5.2': 'openai/gpt-5.2',
38
50
  'gpt-5.2-pro': 'openai/gpt-5.2-pro',
@@ -47,7 +59,9 @@ export const MODEL_SHORTCUTS = {
47
59
  // Google
48
60
  gemini: 'google/gemini-2.5-pro',
49
61
  'gemini-2.5': 'google/gemini-2.5-pro',
50
- flash: 'google/gemini-2.5-flash',
62
+ flash: 'google/gemini-3.5-flash',
63
+ 'gemini-flash': 'google/gemini-3.5-flash',
64
+ 'gemini-3.5-flash': 'google/gemini-3.5-flash',
51
65
  'gemini-3': 'google/gemini-3.1-pro',
52
66
  'gemini-3.1': 'google/gemini-3.1-pro',
53
67
  // xAI — grok-4.3 is the public flagship since 2026-06-04 (grok-3 and the
@@ -67,25 +81,38 @@ export const MODEL_SHORTCUTS = {
67
81
  'deepseek-v4-pro': 'deepseek/deepseek-v4-pro',
68
82
  'dsv4-pro': 'deepseek/deepseek-v4-pro',
69
83
  'v4-pro': 'deepseek/deepseek-v4-pro',
70
- // V4 Flash: free on NVIDIA inference. Bare `deepseek-v4` resolves here
71
- // since the paid V4 Flash SKU was dropped (overlapped with this free one).
72
- 'deepseek-v4': 'nvidia/deepseek-v4-flash',
73
- 'deepseek-v4-flash': 'nvidia/deepseek-v4-flash',
74
- dsv4: 'nvidia/deepseek-v4-flash',
75
- // V3.2 NVIDIA NIM hung (server redirects to V4 Flash) — point the aliases
76
- // straight at the live V4 Flash so the picker doesn't hand back a dead id.
77
- 'deepseek-v3.2': 'nvidia/deepseek-v4-flash',
78
- 'deepseek-v3': 'nvidia/deepseek-v4-flash',
79
- // Free (agent-tested BlockRun gateway free tier — refreshed 2026-04)
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',
84
+ // The free nvidia/deepseek-v4-flash SKU was EOL'd by the gateway (410).
85
+ // Point the deepseek-free aliases at the current free default so muscle
86
+ // memory keeps working without handing back a dead id.
87
+ 'deepseek-v4': 'nvidia/qwen3-next-80b-a3b-instruct',
88
+ 'deepseek-v4-flash': 'nvidia/qwen3-next-80b-a3b-instruct',
89
+ dsv4: 'nvidia/qwen3-next-80b-a3b-instruct',
90
+ 'deepseek-v3.2': 'nvidia/qwen3-next-80b-a3b-instruct',
91
+ 'deepseek-v3': 'nvidia/qwen3-next-80b-a3b-instruct',
92
+ // Free (agent-tested BlockRun gateway free tier — refreshed 2026-07-11).
93
+ // `free` follows the current free default (qwen3-next-instruct: cleanest
94
+ // free instruction-follower). NOTE: every free alias resolves to a $0 nvidia
95
+ // model — the free tier NEVER falls back to a paid model.
96
+ free: 'nvidia/qwen3-next-80b-a3b-instruct',
97
+ qwen: 'nvidia/qwen3-next-80b-a3b-instruct',
98
+ qwen3: 'nvidia/qwen3-next-80b-a3b-instruct',
99
+ 'qwen3-next': 'nvidia/qwen3-next-80b-a3b-instruct',
100
+ 'qwen3.5': 'nvidia/qwen3.5-122b-a10b',
85
101
  maverick: 'nvidia/llama-4-maverick',
86
- 'gpt-oss': 'nvidia/llama-4-maverick',
87
- 'gpt-oss-small': 'nvidia/llama-4-maverick',
88
- 'mistral-small': 'nvidia/llama-4-maverick',
102
+ glm4: 'nvidia/qwen3-next-80b-a3b-instruct',
103
+ 'deepseek-free': 'nvidia/qwen3-next-80b-a3b-instruct',
104
+ 'qwen-coder': 'nvidia/qwen3-next-80b-a3b-instruct',
105
+ 'qwen-think': 'nvidia/qwen3-next-80b-a3b-instruct',
106
+ 'gpt-oss': 'nvidia/qwen3-next-80b-a3b-instruct',
107
+ 'gpt-oss-small': 'nvidia/qwen3-next-80b-a3b-instruct',
108
+ 'mistral-small': 'nvidia/qwen3-next-80b-a3b-instruct',
109
+ 'mistral-nemotron': 'nvidia/mistral-nemotron',
110
+ // llama shortcuts point at the still-live free maverick model (not the free
111
+ // default — that's qwen3-next above). Kept as explicit aliases so the name
112
+ // resolves for users who type it.
113
+ llama: 'nvidia/llama-4-maverick',
114
+ 'llama-4': 'nvidia/llama-4-maverick',
115
+ 'llama-4-maverick': 'nvidia/llama-4-maverick',
89
116
  // Backward-compatibility aliases for models the gateway retired or exposes
90
117
  // unreliably on /v1/messages. Map to agent-tested free models so shortcuts
91
118
  // keep working without silent paid fallback or empty tool-use turns.
@@ -116,11 +143,51 @@ export const MODEL_SHORTCUTS = {
116
143
  'k2.5': 'moonshot/kimi-k2.7',
117
144
  };
118
145
  /**
119
- * Resolve a model name — supports shortcuts.
146
+ * Resolve a model name — supports shortcuts. Returns the canonical model id.
147
+ *
148
+ * If the input matches a shortcut, the shortcut's target is returned. If the
149
+ * input is already a fully-qualified `provider/model` id (contains a `/`), it
150
+ * is returned verbatim so the gateway can validate it. Bare, unknown aliases
151
+ * (e.g. `llama3`, `foo`) resolve to themselves too, but the gateway will
152
+ * reject them — callers that care about a clean error should branch on
153
+ * {@link resolveModelStrict} instead.
120
154
  */
121
155
  export function resolveModel(input) {
122
- const lower = input.trim().toLowerCase();
123
- return MODEL_SHORTCUTS[lower] || input.trim();
156
+ const trimmed = input.trim();
157
+ if (!trimmed)
158
+ return trimmed;
159
+ const lower = trimmed.toLowerCase();
160
+ return MODEL_SHORTCUTS[lower] || trimmed;
161
+ }
162
+ /**
163
+ * Strict variant of {@link resolveModel} — used by the `/model` handler so
164
+ * an unknown bare alias surfaces a clean error in the UI instead of
165
+ * forwarding `llama` to the gateway and getting back `HTTP 400: Unknown
166
+ * model: llama` two turns later.
167
+ *
168
+ * Recognised:
169
+ * - Any entry in {@link MODEL_SHORTCUTS} (case-insensitive).
170
+ * - Any id of the form `provider/model` (e.g. `anthropic/claude-sonnet-4.6`).
171
+ */
172
+ export function resolveModelStrict(input) {
173
+ const trimmed = input.trim();
174
+ if (!trimmed) {
175
+ return { ok: false, suggestion: 'Empty model name. Try /model sonnet or /model free.' };
176
+ }
177
+ const lower = trimmed.toLowerCase();
178
+ if (Object.prototype.hasOwnProperty.call(MODEL_SHORTCUTS, lower)) {
179
+ return { ok: true, id: MODEL_SHORTCUTS[lower], viaShortcut: true };
180
+ }
181
+ if (trimmed.includes('/')) {
182
+ return { ok: true, id: trimmed, viaShortcut: false };
183
+ }
184
+ const known = Object.keys(MODEL_SHORTCUTS).sort();
185
+ const head = known.slice(0, 6).join(', ');
186
+ return {
187
+ ok: false,
188
+ suggestion: `Unknown model alias: "${trimmed}". Use a shortcut like ${head}, ` +
189
+ `or a full id like anthropic/claude-sonnet-4.6.`,
190
+ };
124
191
  }
125
192
  /**
126
193
  * Single source of truth for the /model picker.
@@ -154,9 +221,10 @@ export const PICKER_CATEGORIES = [
154
221
  // free-tier entries and v3.9.2 used to retire Kimi K2.5.
155
222
  category: '✨ Premium frontier',
156
223
  models: [
224
+ { id: 'anthropic/claude-fable-5', shortcut: 'fable', label: 'Claude Fable 5', price: '$10/$50' },
157
225
  { id: 'anthropic/claude-opus-4.8', shortcut: 'opus', label: 'Claude Opus 4.8', price: '$5/$25', highlight: true },
158
- { id: 'anthropic/claude-sonnet-4.6', shortcut: 'sonnet', label: 'Claude Sonnet 4.6', price: '$3/$15' },
159
- { id: 'openai/gpt-5.5', shortcut: 'gpt', label: 'GPT-5.5', price: '$5/$30', highlight: true },
226
+ { id: 'anthropic/claude-sonnet-5', shortcut: 'sonnet', label: 'Claude Sonnet 5', price: '$3/$15' },
227
+ { id: 'openai/gpt-5.6-sol', shortcut: 'gpt', label: 'GPT-5.6 Sol', price: '$5/$30', highlight: true },
160
228
  { id: 'google/gemini-3.1-pro', shortcut: 'gemini-3', label: 'Gemini 3.1 Pro', price: '$2/$12' },
161
229
  { id: 'google/gemini-2.5-pro', shortcut: 'gemini', label: 'Gemini 2.5 Pro', price: '$1.25/$10' },
162
230
  { id: 'xai/grok-4.3', shortcut: 'grok', label: 'Grok 4.3', price: '$1.5/$4' },
@@ -199,13 +267,14 @@ export const PICKER_CATEGORIES = [
199
267
  {
200
268
  category: '🆓 Free (no USDC needed)',
201
269
  models: [
202
- // Maverick leads the section: the only reliably-healthy free model, and
203
- // the default the `free` shortcut + free routing profile resolve to.
204
- // V4 Flash (1M ctx) is the secondary — strong but occasionally times out
205
- // on the NVIDIA NIM upstream. (Qwen3 Coder 480B removed 2026-06-11: its
206
- // upstream reached EOL and the gateway 410s on it.)
207
- { id: 'nvidia/llama-4-maverick', shortcut: 'maverick', label: 'Llama 4 Maverick', price: 'FREE', highlight: true },
208
- { id: 'nvidia/deepseek-v4-flash', shortcut: 'deepseek-v4', label: 'DeepSeek V4 Flash', price: 'FREE' },
270
+ // Qwen3-Next 80B leads: cleanest free instruction-follower (no thinking
271
+ // leak / markdown fences — verified live 2026-07-11) and the default the
272
+ // `free` shortcut + free routing profile resolve to. Llama 4 Maverick is
273
+ // the diverse-family secondary. (nvidia/deepseek-v4-flash removed
274
+ // 2026-07-11: the gateway 410s on it.) Both are $0 — the free tier never
275
+ // falls back to a paid model.
276
+ { id: 'nvidia/qwen3-next-80b-a3b-instruct', shortcut: 'free', label: 'Qwen3-Next 80B', price: 'FREE', highlight: true },
277
+ { id: 'nvidia/llama-4-maverick', shortcut: 'maverick', label: 'Llama 4 Maverick', price: 'FREE' },
209
278
  ],
210
279
  },
211
280
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blockrun/franklin",
3
- "version": "3.30.1",
3
+ "version": "3.32.0",
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": {
@@ -31,7 +31,7 @@
31
31
  "build": "tsc && node scripts/copy-plugin-assets.mjs",
32
32
  "dev": "tsc --watch",
33
33
  "start": "node dist/index.js",
34
- "test": "npm run build && node --test --test-reporter=spec test/local.mjs test/skills.local.mjs test/repair.mjs test/exa.local.mjs test/audit-batch.local.mjs test/polymarket.local.mjs",
34
+ "test": "npm run build && node --test --test-reporter=spec test/local.mjs test/skills.local.mjs test/repair.mjs test/model-resolver.mjs test/exa.local.mjs test/audit-batch.local.mjs test/polymarket.local.mjs test/market.local.mjs",
35
35
  "test:e2e": "npm run build && node --test --test-reporter=spec test/e2e.mjs",
36
36
  "test:free-models": "npm run build && node --test --test-reporter=spec test/free-model-matrix.mjs",
37
37
  "test:all": "npm run test && npm run test:e2e",