skimpyclaw 0.1.3 → 0.1.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.
package/dist/api.js CHANGED
@@ -22,6 +22,16 @@ import { initHeartbeat, stopHeartbeat } from './heartbeat.js';
22
22
  import { initActiveChannel, stopActiveChannel, startActiveChannel } from './channels.js';
23
23
  import { setCodeAgentConfig } from './tools.js';
24
24
  import { resolveModelSelection } from './model-selection.js';
25
+ const DEFAULT_MODEL_ALIASES = {
26
+ 'claude-fast': 'anthropic/claude-haiku-4-5',
27
+ 'claude-think': 'anthropic/claude-sonnet-4-6',
28
+ 'claude-opus': 'anthropic/claude-opus-4-6',
29
+ 'codex5.1': 'codex/gpt-5.1-codex',
30
+ 'codex5.2': 'codex/gpt-5.2-codex',
31
+ 'codex5.3': 'codex/gpt-5.3-codex',
32
+ minimax: 'minimax/MiniMax-M2.5',
33
+ kimi: 'kimi/kimi-for-coding',
34
+ };
25
35
  function validateFilename(filename) {
26
36
  return !filename.includes('..') && filename === basename(filename);
27
37
  }
@@ -413,9 +423,16 @@ export function registerDashboardAPI(fastify, config) {
413
423
  });
414
424
  // --- Model ---
415
425
  fastify.get('/api/dashboard/model', async () => {
426
+ const aliases = runtimeConfig.models?.aliases || {};
427
+ const mergedAliases = Object.keys(aliases).length > 0
428
+ ? aliases
429
+ : DEFAULT_MODEL_ALIASES;
430
+ const currentModel = getCurrentModel()
431
+ || runtimeConfig.agents?.list?.[runtimeConfig.agents?.default]?.model
432
+ || 'claude-opus';
416
433
  return {
417
- current: getCurrentModel(),
418
- aliases: runtimeConfig.models.aliases,
434
+ current: currentModel,
435
+ aliases: mergedAliases,
419
436
  agents: Object.fromEntries(Object.entries(runtimeConfig.agents.list).map(([id, agent]) => [id, agent.model])),
420
437
  };
421
438
  });