@johpaz/hive-agents 1.0.0 → 1.0.1

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 (159) hide show
  1. package/README.md +25 -11
  2. package/dist/hive.js +22245 -6788
  3. package/dist/tool-worker.js +6 -2
  4. package/dist/ui/assets/{A2UIPage-D4nUFe5q.js → A2UIPage-D4nzp5NV.js} +1 -1
  5. package/dist/ui/assets/{AgentCreateForm-g1mQnIoJ.js → AgentCreateForm-M2RhjeA1.js} +1 -1
  6. package/dist/ui/assets/{AgentDetailPage-C3XkU4Ll.js → AgentDetailPage-DkFRtj8g.js} +1 -1
  7. package/dist/ui/assets/AgentNewPage-CfBU7puz.js +1 -0
  8. package/dist/ui/assets/{AgentsPage-CNA778Eo.js → AgentsPage-Ctzq2LWx.js} +1 -1
  9. package/dist/ui/assets/{ApiClientPage-t5DpKhmA.js → ApiClientPage-DKbGO1QW.js} +1 -1
  10. package/dist/ui/assets/{ChannelsPage-yY6t0YTU.js → ChannelsPage-H6rgr8DQ.js} +2 -2
  11. package/dist/ui/assets/{DashboardPage-BSeNSYg5.js → DashboardPage-BIjYGf4m.js} +2 -2
  12. package/dist/ui/assets/{LoginPage-eT5zDRDa.js → LoginPage-DazoxtBJ.js} +1 -1
  13. package/dist/ui/assets/{LogsPage-Gczzzsdh.js → LogsPage-DMZ6KtQ3.js} +1 -1
  14. package/dist/ui/assets/{MeetingPage-Bu4aMMNR.js → MeetingPage-CSLFvHL7.js} +1 -1
  15. package/dist/ui/assets/{ModelSelector-nNOrW3te.js → ModelSelector-BCfvugHB.js} +1 -1
  16. package/dist/ui/assets/{Office3DPage-B_iXEbyv.js → Office3DPage-BE6Epe0d.js} +2 -2
  17. package/dist/ui/assets/ProvidersPage-D0cApfM1.js +1 -0
  18. package/dist/ui/assets/{RecoverPage-DMqSasKk.js → RecoverPage-BVUPHG9z.js} +1 -1
  19. package/dist/ui/assets/{SettingsPage-B6FTSkOn.js → SettingsPage-DCZ4nql4.js} +1 -1
  20. package/dist/ui/assets/{SetupPage-DhcRbGgg.js → SetupPage-In19p30M.js} +1 -1
  21. package/dist/ui/assets/{WebChatPage-CWXjW4Hn.js → WebChatPage-ByVBSzxL.js} +1 -1
  22. package/dist/ui/assets/{activity-CQuPevhB.js → activity-BIIli7ET.js} +1 -1
  23. package/dist/ui/assets/{agentCapabilities-CDC6y91E.js → agentCapabilities-D1PD9yFH.js} +1 -1
  24. package/dist/ui/assets/arrow-left-BfcnX8Er.js +1 -0
  25. package/dist/ui/assets/arrow-right-Q-dzAn8k.js +1 -0
  26. package/dist/ui/assets/arrow-up-right-Bf-8wrUQ.js +1 -0
  27. package/dist/ui/assets/{calendar-Be23hQGc.js → calendar-S9-_Q6QR.js} +1 -1
  28. package/dist/ui/assets/check-CryV78SQ.js +1 -0
  29. package/dist/ui/assets/chevron-down-QCtMs-Af.js +1 -0
  30. package/dist/ui/assets/chevron-left-dTGbyl5G.js +1 -0
  31. package/dist/ui/assets/chevron-right-D0GjXbnO.js +1 -0
  32. package/dist/ui/assets/chevron-up-Cg0jO8uT.js +1 -0
  33. package/dist/ui/assets/{circle-alert-BDVHxmAz.js → circle-alert-DTVW4R94.js} +1 -1
  34. package/dist/ui/assets/circle-check-BAolxswA.js +1 -0
  35. package/dist/ui/assets/{circle-x-Cb2Yer4s.js → circle-x-CJXbXzRh.js} +1 -1
  36. package/dist/ui/assets/{copy-33tZrzc9.js → copy-X_TPpA-A.js} +1 -1
  37. package/dist/ui/assets/{dialog-KOZKWbib.js → dialog-uUBz_NIB.js} +1 -1
  38. package/dist/ui/assets/{download-CiQqqXyz.js → download-C-fXu08w.js} +1 -1
  39. package/dist/ui/assets/{earth-DCvN7ynm.js → earth-CTsVjCmp.js} +1 -1
  40. package/dist/ui/assets/{ellipsis-vertical-BybFZDk2.js → ellipsis-vertical-5zBh5yzc.js} +1 -1
  41. package/dist/ui/assets/{external-link-0iNNBvZm.js → external-link-CvpRhwC_.js} +1 -1
  42. package/dist/ui/assets/{eye-C8sKSSkg.js → eye-CM-HQEWU.js} +1 -1
  43. package/dist/ui/assets/{file-text-DO8jqiJK.js → file-text-lwkvYGtA.js} +1 -1
  44. package/dist/ui/assets/gauge-CB-cas-h.js +1 -0
  45. package/dist/ui/assets/{history-BtTD1kDo.js → history-eSHspWRr.js} +1 -1
  46. package/dist/ui/assets/index-D489S18g.css +2 -0
  47. package/dist/ui/assets/{index-Bejlp-R1.js → index-ZjAc-KQS.js} +4 -4
  48. package/dist/ui/assets/{info-mpk1tsNC.js → info-DTgFQ_jA.js} +1 -1
  49. package/dist/ui/assets/{key-CoQ0qtXt.js → key-CeM9JJkq.js} +1 -1
  50. package/dist/ui/assets/loader-circle-Dtfz4FWw.js +1 -0
  51. package/dist/ui/assets/{lock-open-Cd2aqwOd.js → lock-open-B089GUAJ.js} +1 -1
  52. package/dist/ui/assets/{mail-BG0RYSkL.js → mail--gNFIe4M.js} +1 -1
  53. package/dist/ui/assets/{pause-Cme88_9s.js → pause-DjT1nwQM.js} +1 -1
  54. package/dist/ui/assets/{pencil-f1nJ1xhs.js → pencil-6PRgdjiU.js} +1 -1
  55. package/dist/ui/assets/play-tOrP0xUJ.js +1 -0
  56. package/dist/ui/assets/plus-Cnom3j47.js +1 -0
  57. package/dist/ui/assets/{radio-B5SpKJ-J.js → radio-D-joO9J0.js} +1 -1
  58. package/dist/ui/assets/{refresh-cw-CroGQY62.js → refresh-cw-BRrzoHQW.js} +1 -1
  59. package/dist/ui/assets/search-D277MUP0.js +1 -0
  60. package/dist/ui/assets/{select-BhbW0stK.js → select-BOR8MsSL.js} +1 -1
  61. package/dist/ui/assets/{send-D6whYpw-.js → send-DIlj81PT.js} +1 -1
  62. package/dist/ui/assets/{settings-BX6q3MGB.js → settings-CkBjgAEm.js} +1 -1
  63. package/dist/ui/assets/{shield-BnGyu1xf.js → shield-U0hIjGzm.js} +1 -1
  64. package/dist/ui/assets/{sparkles-BcaOs_Jk.js → sparkles-VXHGDbNh.js} +1 -1
  65. package/dist/ui/assets/{square-ju5H8nrT.js → square-OHeetvN3.js} +1 -1
  66. package/dist/ui/assets/terminal-C6YPcJl_.js +1 -0
  67. package/dist/ui/assets/{trash-2-DjQXac_0.js → trash-2-DQxm7DUM.js} +1 -1
  68. package/dist/ui/assets/{triangle-alert-B04mgMcg.js → triangle-alert-Dj8ZhmWj.js} +1 -1
  69. package/dist/ui/assets/{useHiveAgentsModelLoad-DT5-4CCj.js → useHiveAgentsModelLoad-COLvs-Ho.js} +1 -1
  70. package/dist/ui/assets/{useProviders-DSX7eVsz.js → useProviders-q6iROeWE.js} +1 -1
  71. package/dist/ui/assets/{volume-x-qnVxkRSM.js → volume-x-Bm735CXN.js} +1 -1
  72. package/dist/ui/assets/{wifi-BA1m2dGO.js → wifi-DklBfOZ6.js} +1 -1
  73. package/dist/ui/assets/{zap-DT7cM7YS.js → zap-BEZNJ0i0.js} +1 -1
  74. package/dist/ui/index.html +8 -6
  75. package/dist/ui/logoblack.png +0 -0
  76. package/dist/ui/logocolor-dark.png +0 -0
  77. package/dist/ui/logocolorbg.png +0 -0
  78. package/dist/ui/logodoradobg.png +0 -0
  79. package/package.json +12 -8
  80. package/packages/cli/src/commands/doctor.ts +111 -0
  81. package/packages/cli/src/commands/onboard.ts +126 -59
  82. package/packages/cli/src/ui-bundle.generated.ts +9 -92
  83. package/packages/core/src/agent/acceptance-checks.ts +172 -0
  84. package/packages/core/src/agent/agent-catalog.ts +1 -37
  85. package/packages/core/src/agent/agent-loop.ts +21 -2
  86. package/packages/core/src/agent/catalog-selector.ts +0 -1
  87. package/packages/core/src/agent/compaction.ts +16 -1
  88. package/packages/core/src/agent/context-compiler.ts +3 -1
  89. package/packages/core/src/agent/conversation-store.ts +1 -1
  90. package/packages/core/src/agent/delegation-runtime.ts +1 -8
  91. package/packages/core/src/agent/goal-runner.ts +111 -32
  92. package/packages/core/src/agent/index.ts +1 -1
  93. package/packages/core/src/agent/llm-client.ts +34 -2
  94. package/packages/core/src/agent/llm-providers/anthropic.ts +10 -7
  95. package/packages/core/src/agent/llm-providers/interface.ts +13 -2
  96. package/packages/core/src/agent/llm-providers/modelscope.ts +5 -0
  97. package/packages/core/src/agent/llm-providers/z-ai.ts +5 -0
  98. package/packages/core/src/agent/minimal-loadout.ts +1 -0
  99. package/packages/core/src/agent/proof-packet.ts +2 -11
  100. package/packages/core/src/agent/providers/index.ts +1 -1
  101. package/packages/core/src/agent/tool-selector.ts +25 -1
  102. package/packages/core/src/canvas/emitter.ts +0 -44
  103. package/packages/core/src/channels/manager.ts +117 -25
  104. package/packages/core/src/channels/whatsapp.ts +6 -1
  105. package/packages/core/src/config/loader.ts +13 -1
  106. package/packages/core/src/events/channel-narration.ts +150 -0
  107. package/packages/core/src/events/tool-narration.ts +62 -0
  108. package/packages/core/src/gateway/channel-notify.ts +11 -7
  109. package/packages/core/src/gateway/delegation-groups.ts +24 -11
  110. package/packages/core/src/gateway/helpers/narration.ts +4 -62
  111. package/packages/core/src/gateway/helpers/ui-source.ts +67 -0
  112. package/packages/core/src/gateway/job-executors.ts +29 -67
  113. package/packages/core/src/gateway/resolver.ts +10 -2
  114. package/packages/core/src/gateway/routes/agents.ts +6 -6
  115. package/packages/core/src/gateway/routes/channels.ts +15 -1
  116. package/packages/core/src/gateway/routes/models.ts +69 -12
  117. package/packages/core/src/gateway/routes/providers.ts +110 -28
  118. package/packages/core/src/gateway/routes/setup.ts +63 -11
  119. package/packages/core/src/gateway/routes/system.ts +8 -5
  120. package/packages/core/src/gateway/routes/voice.ts +3 -0
  121. package/packages/core/src/gateway/server.ts +58 -28
  122. package/packages/core/src/gateway/webchat-turn.ts +29 -5
  123. package/packages/core/src/index.ts +1 -1
  124. package/packages/core/src/storage/bootstrap.ts +13 -9
  125. package/packages/core/src/storage/collections.ts +12 -46
  126. package/packages/core/src/storage/crypto.ts +147 -58
  127. package/packages/core/src/storage/hivedb.ts +9 -0
  128. package/packages/core/src/storage/model-id.ts +53 -0
  129. package/packages/core/src/storage/onboarding.ts +15 -4
  130. package/packages/core/src/storage/seed.ts +254 -138
  131. package/packages/core/src/storage/usage.ts +61 -123
  132. package/packages/core/src/tools/agents/index.ts +199 -27
  133. package/packages/core/src/tools/index.ts +2 -1
  134. package/packages/core/src/tools/web/browser-backend.ts +129 -0
  135. package/packages/core/src/tools/web/browser-service.ts +75 -35
  136. package/packages/core/src/tools/web/webview-backend.ts +412 -0
  137. package/packages/core/src/voice/index.ts +108 -17
  138. package/packages/skills/src/bundled/agents/task_orchestrator/SKILL.md +2 -1
  139. package/packages/skills/src/bundled-data.generated.ts +2 -23
  140. package/dist/ui/assets/AgentNewPage-CEkLeA79.js +0 -1
  141. package/dist/ui/assets/ProvidersPage-BupHs5yO.js +0 -1
  142. package/dist/ui/assets/arrow-left-0EBE7nsF.js +0 -1
  143. package/dist/ui/assets/arrow-right-5QIaph-z.js +0 -1
  144. package/dist/ui/assets/arrow-up-right-DQQCY007.js +0 -1
  145. package/dist/ui/assets/check-Dp6tzwax.js +0 -1
  146. package/dist/ui/assets/chevron-down-33N886NY.js +0 -1
  147. package/dist/ui/assets/chevron-left-C6itJXh3.js +0 -1
  148. package/dist/ui/assets/chevron-right-CFodBS-b.js +0 -1
  149. package/dist/ui/assets/chevron-up-BvSmyBEs.js +0 -1
  150. package/dist/ui/assets/circle-check-BJWNbLuF.js +0 -1
  151. package/dist/ui/assets/gauge-BRGwuN8G.js +0 -1
  152. package/dist/ui/assets/index-XoTT41Hr.css +0 -2
  153. package/dist/ui/assets/loader-circle-BhqRN2nO.js +0 -1
  154. package/dist/ui/assets/play-CfYDHD6h.js +0 -1
  155. package/dist/ui/assets/plus-C5BxJeOX.js +0 -1
  156. package/dist/ui/assets/search-rfBcmohK.js +0 -1
  157. package/dist/ui/assets/terminal-Bjfu-TkS.js +0 -1
  158. package/packages/core/src/agent/acceptance-verifier.ts +0 -300
  159. package/packages/skills/src/bundled/agents/acceptance_verification/SKILL.md +0 -26
@@ -1,6 +1,8 @@
1
1
  import { col, toIndexable, nextId } from "./hive"
2
2
  import type { Collection } from "@johpaz/hive-db"
3
3
  import { logger } from "../utils/logger"
4
+ import { catalogModelKey } from "./model-id"
5
+ import { invalidateModelPricingCache } from "./usage"
4
6
 
5
7
  /**
6
8
  * Seed de datos predeterminados para Hive
@@ -11,7 +13,20 @@ import { logger } from "../utils/logger"
11
13
  export interface SeedData {
12
14
  tools: Array<{ id: string; name: string; category: string; description: string; enabled?: boolean }>
13
15
  providers: Array<{ id: string; name: string; baseUrl?: string; category?: string }>
14
- models: Array<{ id: string; providerId: string; name: string; modelType: string; contextWindow?: number; capabilities?: string }>
16
+ /**
17
+ * Catálogo de modelos — única fuente de verdad, incluidos los precios.
18
+ *
19
+ * `id` es el nombre del modelo tal como lo llama su propietario. La clave real
20
+ * en la BD la deriva `catalogModelKey()` (storage/model-id.ts), que prefija a
21
+ * los providers revendedores para que dos servicios puedan ofrecer el mismo
22
+ * modelo sin pisarse.
23
+ *
24
+ * `inputPer1M` / `outputPer1M` son USD por millón de tokens y alimentan el
25
+ * costo del dashboard. Obligatorios en los modelos `llm`: omitirlos hace que
26
+ * el modelo aparezca gratis, que es indistinguible de un endpoint sin costo.
27
+ * Los endpoints realmente gratuitos (NVIDIA NIM, Ollama, HiveAgents) van con 0.
28
+ */
29
+ models: Array<{ id: string; providerId: string; name: string; modelType: string; contextWindow?: number; capabilities?: string; inputPer1M?: number; outputPer1M?: number }>
15
30
  mcpServers: Array<{ id: string; name: string; transport: string; command?: string; args?: string[]; builtin: boolean }>
16
31
  channels: Array<{ id: string; type: string }>
17
32
  ethics: Array<{ id: string; name: string; description: string; content: string; isDefault: boolean }>
@@ -76,6 +91,7 @@ export const SEED_DATA: SeedData = {
76
91
  { id: "agent_find", name: "agent_find", category: "agents", description: "Descubrir agentes worker disponibles: catálogo global del sistema y workers privados del usuario. No indica ejecución; para eso usar task_list. Sinónimos: buscar agente, encontrar worker, localizar agente" },
77
92
  { id: "agent_archive", name: "agent_archive", category: "agents", description: "Archivar o terminar un agente worker. Sinónimos: archivar agente, terminar worker, desactivar agente" },
78
93
  { id: "task_delegate", name: "task_delegate", category: "agents", description: "Delegar una tarea general a un agente worker específico. Sinónimos: delegar tarea, asignar worker, ejecutar por agente" },
94
+ { id: "task_revise", name: "task_revise", category: "agents", description: "Devolver una tarea delegada a su worker con feedback cuando no cumple sus criterios de aceptación. Sinónimos: corregir tarea, devolver al worker, pedir corrección, reencolar tarea" },
79
95
  { id: "task_list", name: "task_list", category: "agents", description: "Listar ejecuciones reales de tareas delegadas del usuario, consultando tareas y jobs persistidos. Sinónimos: listar tareas activas, ver subagentes trabajando, ejecuciones reales" },
80
96
  { id: "task_status", name: "task_status", category: "agents", description: "Obtener estado de ejecución de tareas delegadas. Sinónimos: estado tarea delegada, verificar progreso, consultar tarea" },
81
97
  { id: "bus_publish", name: "bus_publish", category: "agents", description: "Publicar mensaje en el Agent Bus para comunicación worker-to-worker. Sinónimos: publicar mensaje, comunicar workers, enviar bus" },
@@ -125,26 +141,32 @@ export const SEED_DATA: SeedData = {
125
141
  { id: "qwen", name: "Qwen (Alibaba)", baseUrl: "https://dashscope-intl.aliyuncs.com/compatible-mode/v1", category: "llm" },
126
142
  { id: "nvidia", name: "NVIDIA NIM", baseUrl: "https://integrate.api.nvidia.com/v1" },
127
143
  { id: "minimax", name: "MiniMax", baseUrl: "https://api.minimaxi.com/v1" },
144
+ { id: "z-ai", name: "Z.ai (GLM)", baseUrl: "https://api.z.ai/api/paas/v4" },
145
+ // `.ai` (internacional), NO `.cn`. Son plataformas separadas con cuentas y
146
+ // tokens propios: un token internacional responde 401 en el endpoint chino.
147
+ // Confunde porque GET /v1/models da 200 en ambos — ese listado es público y
148
+ // no valida la key; el 401 recién aparece al invocar el modelo.
149
+ { id: "modelscope", name: "ModelScope Qwen", baseUrl: "https://api-inference.modelscope.ai/v1" },
128
150
  { id: "opencode-go", name: "OpenCode Go", baseUrl: "https://opencode.ai/zen/go/v1" },
129
151
  { id: "piper", name: "Piper (Local TTS)", category: "tts" },
130
152
  { id: "hiveagents", name: "HiveAgents LLM (Cloudflare)", baseUrl: "https://llm.hiveagents.io/v1", category: "llm" },
131
153
  ],
132
154
 
133
155
  models: [
134
- // ── Anthropic (fuente: docs.anthropic.com/en/docs/about-claude/models) ──
135
- { id: "claude-opus-4-6", providerId: "anthropic", name: "Claude Opus 4.6", modelType: "llm", contextWindow: 200000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code", "reasoning"]) },
136
- { id: "claude-sonnet-4-6", providerId: "anthropic", name: "Claude Sonnet 4.6", modelType: "llm", contextWindow: 200000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code"]) },
137
- { id: "claude-haiku-4-5-20251001", providerId: "anthropic", name: "Claude Haiku 4.5", modelType: "llm", contextWindow: 200000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]) },
138
-
139
- // ── OpenAI (fuente: openrouter.ai/openai) ──
140
- // Chat / Reasoning
141
- { id: "gpt-4o", providerId: "openai", name: "GPT-4o", modelType: "llm", contextWindow: 128000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code"]) },
142
- { id: "gpt-4o-mini", providerId: "openai", name: "GPT-4o Mini", modelType: "llm", contextWindow: 128000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]) },
143
- { id: "gpt-5.4", providerId: "openai", name: "GPT-5.4", modelType: "llm", contextWindow: 1050000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code"]) },
144
- { id: "gpt-5.4-pro", providerId: "openai", name: "GPT-5.4 Pro", modelType: "llm", contextWindow: 1050000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code", "reasoning"]) },
145
- { id: "gpt-5.3", providerId: "openai", name: "GPT-5.3", modelType: "llm", contextWindow: 128000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]) },
146
- { id: "gpt-5.2", providerId: "openai", name: "GPT-5.2", modelType: "llm", contextWindow: 400000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code"]) },
147
- { id: "o4-mini", providerId: "openai", name: "o4-mini", modelType: "llm", contextWindow: 200000, capabilities: JSON.stringify(["chat", "reasoning", "streaming"]) },
156
+ // ── Anthropic (fuente: platform.claude.com/docs/en/about-claude/models/overview) ──
157
+ // Generación actual (4.6/4.7/4.8 pasaron a "legacy"). Los IDs sin fecha ya son
158
+ // snapshots fijos, no alias evergreen.
159
+ { id: "claude-opus-5", providerId: "anthropic", name: "Claude Opus 5", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code", "reasoning"]), inputPer1M: 5, outputPer1M: 25 },
160
+ { id: "claude-sonnet-5", providerId: "anthropic", name: "Claude Sonnet 5", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code", "reasoning"]), inputPer1M: 3, outputPer1M: 15 },
161
+ { id: "claude-fable-5", providerId: "anthropic", name: "Claude Fable 5", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code", "reasoning"]), inputPer1M: 10, outputPer1M: 50 },
162
+ { id: "claude-haiku-4-5-20251001", providerId: "anthropic", name: "Claude Haiku 4.5", modelType: "llm", contextWindow: 200000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 1, outputPer1M: 5 },
163
+
164
+ // ── OpenAI (fuente: developers.openai.com/api/docs/models) ──
165
+ // Serie 5.6: Sol (frontier), Terra (equilibrio) y Luna (alto volumen / bajo costo).
166
+ // Las tres comparten 1.05M de contexto; se quitó la familia GPT-4o (2024).
167
+ { id: "gpt-5.6-luna", providerId: "openai", name: "GPT-5.6 Luna", modelType: "llm", contextWindow: 1050000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code", "reasoning"]), inputPer1M: 0.1, outputPer1M: 0.6 },
168
+ { id: "gpt-5.6-terra", providerId: "openai", name: "GPT-5.6 Terra", modelType: "llm", contextWindow: 1050000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code", "reasoning"]), inputPer1M: 1, outputPer1M: 6 },
169
+ { id: "gpt-5.6-sol", providerId: "openai", name: "GPT-5.6 Sol", modelType: "llm", contextWindow: 1050000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code", "reasoning"]), inputPer1M: 5, outputPer1M: 30 },
148
170
  // STT / TTS
149
171
  { id: "whisper-1", providerId: "openai", name: "Whisper 1", modelType: "stt", contextWindow: 0, capabilities: JSON.stringify(["transcription", "translation"]) },
150
172
  { id: "tts-1", providerId: "openai", name: "TTS-1", modelType: "tts", contextWindow: 0, capabilities: JSON.stringify(["tts", "speech"]) },
@@ -152,86 +174,94 @@ export const SEED_DATA: SeedData = {
152
174
  { id: "gpt-4o-mini-tts", providerId: "openai", name: "GPT-4o Mini TTS", modelType: "tts", contextWindow: 0, capabilities: JSON.stringify(["tts", "speech"]) },
153
175
  { id: "es_MX-claude-14947-epoch-high", providerId: "piper", name: "Piper Spanish (Claude)", modelType: "tts", contextWindow: 0, capabilities: JSON.stringify(["tts", "speech", "local"]) },
154
176
 
155
- // ── Google Gemini (fuente: openrouter.ai/google + ai.google.dev) ──
156
- { id: "gemini-3.6-flash", name: "Gemini 3.6 Flash", providerId: "gemini", modelType: "llm", contextWindow: 1048576, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "reasoning"]) },
157
- { id: "gemini-3.5-pro", providerId: "gemini", name: "Gemini 3.5 Pro", modelType: "llm", contextWindow: 1048576, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "reasoning"]) },
158
- { id: "gemini-3.5-flash", providerId: "gemini", name: "Gemini 3.5 Flash", modelType: "llm", contextWindow: 1048576, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "reasoning"]) },
159
- { id: "gemini-3.1-pro-preview", providerId: "gemini", name: "Gemini 3.1 Pro Preview", modelType: "llm", contextWindow: 1048576, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "reasoning"]) },
160
- { id: "gemini-3.1-flash-lite-preview", providerId: "gemini", name: "Gemini 3.1 Flash Lite Preview", modelType: "llm", contextWindow: 1048576, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]) },
161
- { id: "gemini-3-flash-preview", providerId: "gemini", name: "Gemini 3 Flash Preview", modelType: "llm", contextWindow: 1048576, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]) },
162
- { id: "gemini-2.5-pro", providerId: "gemini", name: "Gemini 2.5 Pro", modelType: "llm", contextWindow: 1048576, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "reasoning"]) },
163
- { id: "gemini-2.5-flash", providerId: "gemini", name: "Gemini 2.5 Flash", modelType: "llm", contextWindow: 1048576, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "reasoning"]) },
164
- { id: "gemini-3-flash-preview", providerId: "gemini", name: "Gemini 3 Flash Preview", modelType: "llm", contextWindow: 1048576, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]) },
165
-
177
+ // ── Google Gemini (fuente: ai.google.dev/gemini-api/docs/models) ──
178
+ // Solo la generación 3.x: la familia 2.0 ya está apagada y la 2.5 quedó
179
+ // superada. `gemini-3.5-pro` y `gemini-3.1-flash-lite-preview` se quitaron:
180
+ // el primero no existe en el catálogo y el segundo ya salió de preview.
181
+ { id: "gemini-3.6-flash", providerId: "gemini", name: "Gemini 3.6 Flash", modelType: "llm", contextWindow: 1048576, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 1.5, outputPer1M: 7.5 },
182
+ { id: "gemini-3.5-flash", providerId: "gemini", name: "Gemini 3.5 Flash", modelType: "llm", contextWindow: 1048576, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 1.5, outputPer1M: 9 },
183
+ { id: "gemini-3.5-flash-lite", providerId: "gemini", name: "Gemini 3.5 Flash Lite", modelType: "llm", contextWindow: 1048576, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]), inputPer1M: 0.3, outputPer1M: 2.5 },
184
+ { id: "gemini-3.1-pro-preview", providerId: "gemini", name: "Gemini 3.1 Pro Preview", modelType: "llm", contextWindow: 1048576, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 2, outputPer1M: 12 },
185
+ { id: "gemini-3.1-flash-lite", providerId: "gemini", name: "Gemini 3.1 Flash Lite", modelType: "llm", contextWindow: 1048576, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]), inputPer1M: 0.25, outputPer1M: 1.5 },
166
186
 
167
187
  // TTS
168
188
  { id: "gemini-2.5-flash-preview-tts", providerId: "gemini", name: "Gemini 2.5 Flash TTS", modelType: "tts", contextWindow: 0, capabilities: JSON.stringify(["tts", "speech"]) },
169
189
  { id: "gemini-2.5-pro-preview-tts", providerId: "gemini", name: "Gemini 2.5 Pro TTS", modelType: "tts", contextWindow: 0, capabilities: JSON.stringify(["tts", "speech", "high_quality"]) },
170
190
 
171
191
  // ── Mistral (fuente: openrouter.ai/mistralai + docs.mistral.ai) ──
172
- { id: "mistral-large-2512", providerId: "mistral", name: "Mistral Large 2512", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]) },
173
- { id: "devstral-2512", providerId: "mistral", name: "Devstral 2512", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "code", "function_calling", "streaming"]) },
174
- { id: "ministral-14b-2512", providerId: "mistral", name: "Ministral 14B", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]) },
175
- { id: "ministral-8b-2512", providerId: "mistral", name: "Ministral 8B", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]) },
176
- { id: "codestral-2508", providerId: "mistral", name: "Codestral 2508", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "code", "function_calling", "streaming"]) },
177
- { id: "mistral-small-3.2-24b-instruct", providerId: "mistral", name: "Mistral Small 3.2 24B", modelType: "llm", contextWindow: 131072, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]) },
192
+ { id: "mistral-large-2512", providerId: "mistral", name: "Mistral Large 2512", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]), inputPer1M: 0.5, outputPer1M: 1.5 },
193
+ { id: "devstral-2512", providerId: "mistral", name: "Devstral 2512", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "code", "function_calling", "streaming"]), inputPer1M: 0.4, outputPer1M: 2 },
194
+ { id: "ministral-14b-2512", providerId: "mistral", name: "Ministral 14B", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]), inputPer1M: 0.2, outputPer1M: 0.2 },
195
+ { id: "ministral-8b-2512", providerId: "mistral", name: "Ministral 8B", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]), inputPer1M: 0.15, outputPer1M: 0.15 },
196
+ { id: "codestral-2508", providerId: "mistral", name: "Codestral 2508", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "code", "function_calling", "streaming"]), inputPer1M: 0.2, outputPer1M: 0.6 },
197
+ { id: "mistral-small-3.2-24b-instruct", providerId: "mistral", name: "Mistral Small 3.2 24B", modelType: "llm", contextWindow: 131072, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]), inputPer1M: 0.1, outputPer1M: 0.3 },
178
198
  // Aliases (siguen funcionando en la API de Mistral)
179
- { id: "mistral-large-latest", providerId: "mistral", name: "Mistral Large (latest)", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]) },
180
- { id: "codestral-latest", providerId: "mistral", name: "Codestral (latest)", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "code", "function_calling", "streaming"]) },
199
+ { id: "mistral-large-latest", providerId: "mistral", name: "Mistral Large (latest)", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]), inputPer1M: 0.5, outputPer1M: 1.5 },
200
+ { id: "codestral-latest", providerId: "mistral", name: "Codestral (latest)", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "code", "function_calling", "streaming"]), inputPer1M: 0.2, outputPer1M: 0.6 },
181
201
 
182
202
  // ── DeepSeek (fuente: api-docs.deepseek.com/quick_start/pricing) ──
183
- // deepseek-chat = DeepSeek-V3.2, deepseek-reasoner = V3.2 thinking mode
184
- { id: "deepseek-chat", providerId: "deepseek", name: "DeepSeek-V3.2", modelType: "llm", contextWindow: 128000, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming", "code"]) },
185
- { id: "deepseek-reasoner", providerId: "deepseek", name: "DeepSeek-V3.2 Thinking", modelType: "llm", contextWindow: 128000, capabilities: JSON.stringify(["chat", "reasoning", "streaming"]) },
186
-
187
- // ── Kimi / Moonshot (fuente: openrouter.ai/moonshotai + platform.moonshot.cn) ──
188
- { id: "kimi-k2.5", providerId: "kimi", name: "Kimi K2.5", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code"]) },
189
- { id: "kimi-k2", providerId: "kimi", name: "Kimi K2", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code"]) },
190
- { id: "moonshot-v1-8k", providerId: "kimi", name: "Moonshot V1 8K", modelType: "llm", contextWindow: 8000, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]) },
191
- { id: "moonshot-v1-32k", providerId: "kimi", name: "Moonshot V1 32K", modelType: "llm", contextWindow: 32000, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]) },
192
- { id: "moonshot-v1-128k", providerId: "kimi", name: "Moonshot V1 128K", modelType: "llm", contextWindow: 128000, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]) },
193
-
194
- // ── OpenRouter — selección de modelos populares ──
203
+ // V4 reemplazó a deepseek-chat/deepseek-reasoner (V3.2): 1M de contexto,
204
+ // 384K de salida máxima y tool calling en ambos.
205
+ { id: "deepseek-v4-pro", providerId: "deepseek", name: "DeepSeek V4 Pro", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming", "code", "reasoning"]), inputPer1M: 0.435, outputPer1M: 0.87 },
206
+ { id: "deepseek-v4-flash", providerId: "deepseek", name: "DeepSeek V4 Flash", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming", "code", "reasoning"]), inputPer1M: 0.14, outputPer1M: 0.28 },
207
+
208
+ // ── Kimi / Moonshot (fuente: platform.kimi.ai/docs/pricing/chat) ──
209
+ // La serie moonshot-v1-* se apaga el 2026-08-31; K2/K2.5 quedaron superadas.
210
+ { id: "kimi-k3", providerId: "kimi", name: "Kimi K3", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code", "reasoning"]), inputPer1M: 3, outputPer1M: 15 },
211
+ { id: "kimi-k2.7-code", providerId: "kimi", name: "Kimi K2.7 Code", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code"]), inputPer1M: 0.73, outputPer1M: 3.5 },
212
+ { id: "kimi-k2.6", providerId: "kimi", name: "Kimi K2.6", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code"]), inputPer1M: 0.6, outputPer1M: 3.41 },
213
+
214
+ // ── OpenRouter (fuente: GET https://openrouter.ai/api/v1/models) ──
215
+ // Solo modelos vivos con `tools` en supported_parameters y publicados desde
216
+ // 2025-07. contextWindow = context_length reportado por el propio catálogo.
195
217
  // Anthropic
196
- { id: "anthropic/claude-opus-4-6", providerId: "openrouter", name: "Claude Opus 4.6 (OR)", modelType: "llm", contextWindow: 200000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code", "reasoning"]) },
197
- { id: "anthropic/claude-sonnet-4-6", providerId: "openrouter", name: "Claude Sonnet 4.6 (OR)", modelType: "llm", contextWindow: 200000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]) },
198
- // OpenAI
199
- { id: "openai/gpt-5.4", providerId: "openrouter", name: "GPT-5.4 (OR)", modelType: "llm", contextWindow: 1050000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code"]) },
200
- { id: "openai/gpt-5.4-pro", providerId: "openrouter", name: "GPT-5.4 Pro (OR)", modelType: "llm", contextWindow: 1050000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code", "reasoning"]) },
201
- { id: "openai/gpt-5.2", providerId: "openrouter", name: "GPT-5.2 (OR)", modelType: "llm", contextWindow: 400000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]) },
218
+ { id: "anthropic/claude-opus-5", providerId: "openrouter", name: "Claude Opus 5 (OR)", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code", "reasoning"]), inputPer1M: 5, outputPer1M: 25 },
219
+ { id: "anthropic/claude-sonnet-5", providerId: "openrouter", name: "Claude Sonnet 5 (OR)", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code", "reasoning"]), inputPer1M: 2, outputPer1M: 10 },
220
+ // OpenAI — la serie 5.6 se divide en Sol (flagship), Terra (equilibrado) y Luna (económico)
221
+ { id: "openai/gpt-5.6-sol", providerId: "openrouter", name: "GPT-5.6 Sol (OR)", modelType: "llm", contextWindow: 1050000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code", "reasoning"]), inputPer1M: 5, outputPer1M: 30 },
222
+ { id: "openai/gpt-5.6-terra", providerId: "openrouter", name: "GPT-5.6 Terra (OR)", modelType: "llm", contextWindow: 1050000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code"]), inputPer1M: 1, outputPer1M: 6 },
223
+ { id: "openai/gpt-5.6-luna", providerId: "openrouter", name: "GPT-5.6 Luna (OR)", modelType: "llm", contextWindow: 1050000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]), inputPer1M: 0.1, outputPer1M: 0.6 },
202
224
  // Google
203
- { id: "google/gemini-3.1-pro-preview", providerId: "openrouter", name: "Gemini 3.1 Pro (OR)", modelType: "llm", contextWindow: 1048576, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "reasoning"]) },
204
- { id: "google/gemini-3.1-flash-lite-preview", providerId: "openrouter", name: "Gemini 3.1 Flash Lite (OR)", modelType: "llm", contextWindow: 1048576, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]) },
205
- { id: "google/gemini-3-flash-preview", providerId: "openrouter", name: "Gemini 3 Flash (OR)", modelType: "llm", contextWindow: 1048576, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]) },
206
- { id: "google/gemini-2.5-flash", providerId: "openrouter", name: "Gemini 2.5 Flash (OR)", modelType: "llm", contextWindow: 1048576, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]) },
207
- { id: "google/gemini-3-flash-preview", providerId: "openrouter", name: "Gemini 3 Flash (OR)", modelType: "llm", contextWindow: 1048576, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]) },
208
- // Meta Llama
209
- { id: "meta-llama/llama-3.3-70b-instruct", providerId: "openrouter", name: "Llama 3.3 70B", modelType: "llm", contextWindow: 128000, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]) },
210
- { id: "meta-llama/llama-4-maverick", providerId: "openrouter", name: "Llama 4 Maverick", modelType: "llm", contextWindow: 524288, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]) },
225
+ { id: "google/gemini-3.6-flash", providerId: "openrouter", name: "Gemini 3.6 Flash (OR)", modelType: "llm", contextWindow: 1048576, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 1.5, outputPer1M: 7.5 },
226
+ { id: "google/gemini-3.5-flash", providerId: "openrouter", name: "Gemini 3.5 Flash (OR)", modelType: "llm", contextWindow: 1048576, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 1.5, outputPer1M: 9 },
227
+ { id: "google/gemini-3.1-pro-preview", providerId: "openrouter", name: "Gemini 3.1 Pro (OR)", modelType: "llm", contextWindow: 1048576, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 2, outputPer1M: 12 },
211
228
  // DeepSeek
212
- { id: "deepseek/deepseek-v3.2", providerId: "openrouter", name: "DeepSeek V3.2 (OR)", modelType: "llm", contextWindow: 163840, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming", "code"]) },
213
- { id: "deepseek/deepseek-r1:free", providerId: "openrouter", name: "DeepSeek R1 (Free)", modelType: "llm", contextWindow: 64000, capabilities: JSON.stringify(["chat", "reasoning", "streaming"]) },
229
+ { id: "deepseek/deepseek-v4-pro", providerId: "openrouter", name: "DeepSeek V4 Pro (OR)", modelType: "llm", contextWindow: 1048576, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming", "code", "reasoning"]), inputPer1M: 0.435, outputPer1M: 0.87 },
230
+ { id: "deepseek/deepseek-v4-flash", providerId: "openrouter", name: "DeepSeek V4 Flash (OR)", modelType: "llm", contextWindow: 1048576, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming", "code"]), inputPer1M: 0.14, outputPer1M: 0.28 },
214
231
  // Kimi
215
- { id: "moonshotai/kimi-k2.5", providerId: "openrouter", name: "Kimi K2.5 (OR)", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code"]) },
232
+ { id: "moonshotai/kimi-k3", providerId: "openrouter", name: "Kimi K3 (OR)", modelType: "llm", contextWindow: 1048576, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code", "reasoning"]), inputPer1M: 3, outputPer1M: 15 },
233
+ { id: "moonshotai/kimi-k2.7-code", providerId: "openrouter", name: "Kimi K2.7 Code (OR)", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code"]), inputPer1M: 0.73, outputPer1M: 3.5 },
234
+ // MiniMax
235
+ { id: "minimax/minimax-m3", providerId: "openrouter", name: "MiniMax M3 (OR)", modelType: "llm", contextWindow: 1048576, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "code", "reasoning"]), inputPer1M: 0.3, outputPer1M: 1.2 },
236
+ // Z.ai / GLM
237
+ { id: "z-ai/glm-5.2", providerId: "openrouter", name: "GLM 5.2 (OR)", modelType: "llm", contextWindow: 1048576, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming", "code", "reasoning"]), inputPer1M: 0.63, outputPer1M: 1.98 },
216
238
  // Qwen
217
- { id: "qwen/qwen3.5-plus-02-15", providerId: "openrouter", name: "Qwen3.5 Plus", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming", "reasoning"]) },
218
- { id: "qwen/qwen3.5-flash-02-23", providerId: "openrouter", name: "Qwen3.5 Flash", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]) },
219
- { id: "qwen/qwen3-next-80b-a3b-instruct:free", providerId: "openrouter", name: "Qwen3 Next 80B", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]) },
220
- { id: "qwen/qwen3-coder:free", providerId: "openrouter", name: "Qwen3 Coder", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]) },
239
+ { id: "qwen/qwen3.8-max", providerId: "openrouter", name: "Qwen3.8 Max (OR)", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 2, outputPer1M: 6 },
240
+ { id: "qwen/qwen3.7-flash", providerId: "openrouter", name: "Qwen3.7 Flash (OR)", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]), inputPer1M: 0.03, outputPer1M: 0.13 },
241
+ // xAI
242
+ { id: "x-ai/grok-4.5", providerId: "openrouter", name: "Grok 4.5 (OR)", modelType: "llm", contextWindow: 500000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 2, outputPer1M: 6 },
243
+ // Mistral
244
+ { id: "mistralai/mistral-medium-3-5", providerId: "openrouter", name: "Mistral Medium 3.5 (OR)", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming", "code"]), inputPer1M: 1.5, outputPer1M: 7.5 },
221
245
 
222
246
 
223
247
  // ── Groq (fuente: console.groq.com/docs/models) ──
224
- { id: "llama-3.3-70b-versatile", providerId: "groq", name: "Llama 3.3 70B", modelType: "llm", contextWindow: 131072, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]) },
225
- { id: "llama-3.1-8b-instant", providerId: "groq", name: "Llama 3.1 8B Instant", modelType: "llm", contextWindow: 131072, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]) },
226
- { id: "openai/gpt-oss-120b", providerId: "groq", name: "GPT OSS 120B", modelType: "llm", contextWindow: 131072, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming", "code"]) },
227
- { id: "openai/gpt-oss-20b", providerId: "groq", name: "GPT OSS 20B", modelType: "llm", contextWindow: 131072, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]) },
228
- { id: "groq/compound", providerId: "groq", name: "Groq Compound", modelType: "llm", contextWindow: 131072, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]) },
229
- { id: "groq/compound-mini", providerId: "groq", name: "Groq Compound Mini", modelType: "llm", contextWindow: 131072, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]) },
230
- { id: "moonshotai/kimi-k2-instruct-0905", providerId: "groq", name: "Kimi K2 (Groq)", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming", "code"]) },
231
- { id: "qwen/qwen3-32b", providerId: "groq", name: "Qwen3 32B (Groq)", modelType: "llm", contextWindow: 128000, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming", "reasoning"]) },
248
+ { id: "llama-3.3-70b-versatile", providerId: "groq", name: "Llama 3.3 70B", modelType: "llm", contextWindow: 131072, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]), inputPer1M: 0.59, outputPer1M: 0.79 },
249
+ { id: "llama-3.1-8b-instant", providerId: "groq", name: "Llama 3.1 8B Instant", modelType: "llm", contextWindow: 131072, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]), inputPer1M: 0.05, outputPer1M: 0.08 },
250
+ { id: "openai/gpt-oss-120b", providerId: "groq", name: "GPT OSS 120B", modelType: "llm", contextWindow: 131072, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming", "code"]), inputPer1M: 0.15, outputPer1M: 0.6 },
251
+ { id: "openai/gpt-oss-20b", providerId: "groq", name: "GPT OSS 20B", modelType: "llm", contextWindow: 131072, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]), inputPer1M: 0.075, outputPer1M: 0.3 },
252
+ { id: "groq/compound", providerId: "groq", name: "Groq Compound", modelType: "llm", contextWindow: 131072, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]), inputPer1M: 0, outputPer1M: 0 },
253
+ { id: "groq/compound-mini", providerId: "groq", name: "Groq Compound Mini", modelType: "llm", contextWindow: 131072, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]), inputPer1M: 0, outputPer1M: 0 },
254
+ { id: "moonshotai/kimi-k2-instruct-0905", providerId: "groq", name: "Kimi K2 (Groq)", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming", "code"]), inputPer1M: 0.45, outputPer1M: 2.2 },
255
+ { id: "qwen/qwen3-32b", providerId: "groq", name: "Qwen3 32B (Groq)", modelType: "llm", contextWindow: 128000, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 0, outputPer1M: 0 },
232
256
  { id: "whisper-large-v3", providerId: "groq", name: "Whisper Large V3", modelType: "stt", contextWindow: 0, capabilities: JSON.stringify(["transcription"]) },
233
257
  { id: "whisper-large-v3-turbo", providerId: "groq", name: "Whisper Large V3 Turbo", modelType: "stt", contextWindow: 0, capabilities: JSON.stringify(["transcription"]) },
234
- { id: "distil-whisper-large-v3-en", providerId: "groq", name: "Distil Whisper V3 EN", modelType: "stt", contextWindow: 0, capabilities: JSON.stringify(["transcription", "english"]) },
258
+ // Orpheus de Canopy Labs: reemplazan a playai-tts / playai-tts-arabic, que
259
+ // Groq deprecó en diciembre de 2025. Sólo aceptan response_format "wav".
260
+ { id: "canopylabs/orpheus-v1-english", providerId: "groq", name: "Orpheus V1 English (Groq)", modelType: "tts", contextWindow: 0, capabilities: JSON.stringify(["tts", "speech", "expressive", "english"]) },
261
+ { id: "canopylabs/orpheus-arabic-saudi", providerId: "groq", name: "Orpheus Arabic Saudi (Groq)", modelType: "tts", contextWindow: 0, capabilities: JSON.stringify(["tts", "speech", "arabic"]) },
262
+ // distil-whisper-large-v3-en salió del catálogo: Groq lo deprecó en favor de
263
+ // whisper-large-v3-turbo, así que la fila sólo servía para que el selector de
264
+ // STT del canal ofreciera un modelo que falla contra la API al transcribir.
235
265
 
236
266
  // ── Ollama: models are detected at runtime via /api/setup/ollama-models and inserted dynamically ──
237
267
 
@@ -242,58 +272,89 @@ export const SEED_DATA: SeedData = {
242
272
  { id: "eleven_multilingual_v2", providerId: "elevenlabs", name: "Eleven Multilingual V2", modelType: "tts", contextWindow: 0, capabilities: JSON.stringify(["tts", "multilingual"]) },
243
273
  { id: "eleven_v3", providerId: "elevenlabs", name: "Eleven V3", modelType: "tts", contextWindow: 0, capabilities: JSON.stringify(["tts", "speech", "expressive"]) },
244
274
 
245
- // ── Qwen (Alibaba DashScope) ──
246
- { id: "qwen3.6-max-preview", providerId: "qwen", name: "Qwen 3.6 Max", modelType: "llm", contextWindow: 32768, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]) },
247
- { id: "qwen3.6-plus", providerId: "qwen", name: "Qwen 3.6 Plus", modelType: "llm", contextWindow: 131072, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]) },
248
- { id: "qwen3.5-omni-plus", providerId: "qwen", name: "Qwen 3.5 Omni Plus", modelType: "llm", contextWindow: 131072, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]) },
249
- { id: "qwen3.5-plus", providerId: "qwen", name: "Qwen 3.5 Plus", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "json_mode", "streaming"]) },
275
+ // ── Qwen (Alibaba DashScope / Model Studio) ──
276
+ // Serie 3.7 = generación actual. Los contextWindow salen del catálogo de
277
+ // OpenRouter, que enruta a los mismos modelos: el `qwen3.6-max-preview` que
278
+ // estaba sembrado con 32768 en realidad tiene 262144.
279
+ { id: "qwen3.7-max", providerId: "qwen", name: "Qwen 3.7 Max", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 1.475, outputPer1M: 4.425 },
280
+ { id: "qwen3.7-plus", providerId: "qwen", name: "Qwen 3.7 Plus", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 0.32, outputPer1M: 1.28 },
281
+ { id: "qwen3.6-flash", providerId: "qwen", name: "Qwen 3.6 Flash", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]), inputPer1M: 0.1875, outputPer1M: 1.125 },
282
+ { id: "qwen3.5-omni-plus", providerId: "qwen", name: "Qwen 3.5 Omni Plus", modelType: "llm", contextWindow: 131072, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]), inputPer1M: 0.32, outputPer1M: 1.28 },
250
283
 
251
284
  // ── Qwen (TTS) ──
252
285
  { id: "qwen3-tts-instruct-flash", providerId: "qwen", name: "Qwen TTS Instruct Flash", modelType: "tts", contextWindow: 0, capabilities: JSON.stringify(["tts", "speech"]) },
253
286
  { id: "qwen3-tts-flash", providerId: "qwen", name: "Qwen TTS Flash", modelType: "tts", contextWindow: 0, capabilities: JSON.stringify(["tts", "speech"]) },
254
287
  { id: "qwen-tts", providerId: "qwen", name: "Qwen TTS", modelType: "tts", contextWindow: 0, capabilities: JSON.stringify(["tts", "speech"]) },
255
288
 
256
- // ── NVIDIA NIM (fuente: build.nvidia.com — modelos con endpoint gratuito) ──
257
- { id: "meta/llama-3.3-70b-instruct", providerId: "nvidia", name: "Llama 3.3 70B (NVIDIA)", modelType: "llm", contextWindow: 131072, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]) },
258
- { id: "meta/llama-4-maverick-17b-128e-instruct", providerId: "nvidia", name: "Llama 4 Maverick (NVIDIA)", modelType: "llm", contextWindow: 1048576, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]) },
259
- { id: "nvidia/llama-3.1-nemotron-ultra-253b-v1", providerId: "nvidia", name: "Nemotron Ultra 253B", modelType: "llm", contextWindow: 131072, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming", "reasoning"]) },
260
- { id: "nvidia/llama-3.1-nemotron-70b-instruct", providerId: "nvidia", name: "Nemotron 70B", modelType: "llm", contextWindow: 131072, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]) },
261
- { id: "deepseek-ai/deepseek-v3.2", providerId: "nvidia", name: "DeepSeek V3.2 (NVIDIA)", modelType: "llm", contextWindow: 131072, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming", "code"]) },
262
- { id: "qwen/qwen3-coder-480b-a35b-instruct", providerId: "nvidia", name: "Qwen3 Coder 480B (NVIDIA)", modelType: "llm", contextWindow: 131072, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming", "code"]) },
263
- { id: "qwen/qwen3.5-397b-a17b", providerId: "nvidia", name: "Qwen3.5 397B (NVIDIA)", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]) },
264
- { id: "moonshotai/kimi-k2-thinking", providerId: "nvidia", name: "Kimi K2 Thinking (NVIDIA)", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "reasoning", "function_calling", "streaming"]) },
265
- { id: "mistralai/mistral-large-3-675b-instruct-2512", providerId: "nvidia", name: "Mistral Large 3 (NVIDIA)", modelType: "llm", contextWindow: 131072, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]) },
266
- { id: "google/gemma-4-31b-it", providerId: "nvidia", name: "Gemma 4 31B (NVIDIA)", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]) },
267
- { id: "google/gemma-3-27b-it", providerId: "nvidia", name: "Gemma 3 27B (NVIDIA)", modelType: "llm", contextWindow: 131072, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]) },
268
- { id: "z-ai/glm-5.1", providerId: "nvidia", name: "GLM 5.1 (NVIDIA)", modelType: "llm", contextWindow: 131072, capabilities: JSON.stringify(["chat", "json_mode", "function_calling", "streaming"]) },
289
+ // ── NVIDIA NIM (fuente: GET https://integrate.api.nvidia.com/v1/models) ──
290
+ // Solo los mejores modelos agénticos (tool calling) del catálogo vivo. NVIDIA
291
+ // retira modelos del endpoint sin avisar y responde 410 Gone al llamarlos, así
292
+ // que esta lista se valida contra /v1/models — no contra la web de build.nvidia.com,
293
+ // que sigue mostrando fichas de modelos ya retirados. Verificado 2026-08-03.
294
+ // Nota: Qwen ya no tiene ningún modelo en el catálogo NVIDIA (todos retirados);
295
+ // para Qwen usar el provider `qwen` (DashScope) directamente.
296
+ { id: "z-ai/glm-5.2", providerId: "nvidia", name: "GLM 5.2 (NVIDIA)", modelType: "llm", contextWindow: 200000, capabilities: JSON.stringify(["chat", "code", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 0, outputPer1M: 0 },
297
+ { id: "moonshotai/kimi-k2.6", providerId: "nvidia", name: "Kimi K2.6 (NVIDIA)", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "code", "vision", "function_calling", "streaming", "reasoning"]), inputPer1M: 0, outputPer1M: 0 },
298
+ { id: "minimaxai/minimax-m3", providerId: "nvidia", name: "MiniMax M3 (NVIDIA)", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "code", "vision", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 0, outputPer1M: 0 },
299
+ { id: "nvidia/nemotron-3-ultra-550b-a55b", providerId: "nvidia", name: "Nemotron 3 Ultra 550B", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "code", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 0, outputPer1M: 0 },
300
+ { id: "nvidia/nemotron-3-super-120b-a12b", providerId: "nvidia", name: "Nemotron 3 Super 120B", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "code", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 0, outputPer1M: 0 },
301
+ { id: "deepseek-ai/deepseek-v4-pro", providerId: "nvidia", name: "DeepSeek V4 Pro (NVIDIA)", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "code", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 0, outputPer1M: 0 },
302
+
303
+ // ── ModelScope Qwen (fuente: GET https://api-inference.modelscope.ai/v1/models) ──
304
+ // Endpoint gratuito dentro de cuota (2000 llamadas/día, ≤500 por modelo), por
305
+ // eso todos van con precio 0 explícito y no vacío.
306
+ //
307
+ // Los Qwen-Ambassador son modelos no-públicos: se listan para cualquiera pero
308
+ // sólo los invoca una cuenta del programa de embajadores. Con otra cuenta el
309
+ // provider devuelve un error de autorización, que ahora llega al usuario como
310
+ // mensaje accionable en vez de guardarse como respuesta del agente.
311
+ // Verificados contra la API: chat, tool calling y streaming los tres.
312
+ { id: "Qwen-Ambassador/Qwen3.8-Max", providerId: "modelscope", name: "Qwen3.8 Max (Embajador)", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "code", "vision", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 0, outputPer1M: 0 },
313
+ { id: "Qwen-Ambassador/Qwen3.7-Max", providerId: "modelscope", name: "Qwen3.7 Max (Embajador)", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "code", "vision", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 0, outputPer1M: 0 },
314
+ { id: "Qwen-Ambassador/Qwen3.7-Plus", providerId: "modelscope", name: "Qwen3.7 Plus (Embajador)", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "code", "vision", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 0, outputPer1M: 0 },
315
+ // Open-weight del mismo endpoint, para cuentas sin permiso de embajador.
316
+ { id: "Qwen/Qwen3.5-397B-A17B", providerId: "modelscope", name: "Qwen3.5 397B (ModelScope)", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "code", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 0, outputPer1M: 0 },
317
+ { id: "Qwen/Qwen3-Next-80B-A3B-Instruct", providerId: "modelscope", name: "Qwen3 Next 80B (ModelScope)", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "code", "json_mode", "function_calling", "streaming"]), inputPer1M: 0, outputPer1M: 0 },
318
+ { id: "Qwen/Qwen3-Coder-30B-A3B-Instruct", providerId: "modelscope", name: "Qwen3 Coder 30B (ModelScope)", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "code", "json_mode", "function_calling", "streaming"]), inputPer1M: 0, outputPer1M: 0 },
319
+ { id: "Qwen/Qwen3-VL-235B-A22B-Instruct", providerId: "modelscope", name: "Qwen3 VL 235B (ModelScope)", modelType: "llm", contextWindow: 131072, capabilities: JSON.stringify(["chat", "vision", "json_mode", "function_calling", "streaming"]), inputPer1M: 0, outputPer1M: 0 },
269
320
 
270
321
  // ── MiniMax (fuente: platform.minimaxi.com) — OpenAI-compatible endpoint ──
271
- { id: "MiniMax-M3", providerId: "minimax", name: "MiniMax M3", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "code", "vision", "function_calling", "streaming", "reasoning"]) },
272
- { id: "MiniMax-M2.7", providerId: "minimax", name: "MiniMax M2.7", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "code", "function_calling", "streaming"]) },
273
- { id: "MiniMax-M2.7-highspeed", providerId: "minimax", name: "MiniMax M2.7 Highspeed", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "code", "function_calling", "streaming"]) },
274
- { id: "MiniMax-M2.5", providerId: "minimax", name: "MiniMax M2.5", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "code", "function_calling", "streaming"]) },
275
- { id: "MiniMax-M2.5-highspeed", providerId: "minimax", name: "MiniMax M2.5 Highspeed", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "code", "function_calling", "streaming"]) },
322
+ // La M2.x tiene 204800 de contexto, no 1M: ese valor solo aplica a M3. Estaba
323
+ // mal y hacía que la compactación no disparara hasta muy pasado el límite real.
324
+ { id: "MiniMax-M3", providerId: "minimax", name: "MiniMax M3", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "code", "vision", "function_calling", "streaming", "reasoning"]), inputPer1M: 0.3, outputPer1M: 1.2 },
325
+ { id: "MiniMax-M2.7", providerId: "minimax", name: "MiniMax M2.7", modelType: "llm", contextWindow: 204800, capabilities: JSON.stringify(["chat", "code", "function_calling", "streaming"]), inputPer1M: 0.3, outputPer1M: 1.2 },
326
+ { id: "MiniMax-M2.7-highspeed", providerId: "minimax", name: "MiniMax M2.7 Highspeed", modelType: "llm", contextWindow: 204800, capabilities: JSON.stringify(["chat", "code", "function_calling", "streaming"]), inputPer1M: 0.3, outputPer1M: 1.2 },
327
+
328
+ // ── Z.ai / GLM (fuente: docs.z.ai/guides/llm) — OpenAI-compatible endpoint ──
329
+ { id: "glm-5.2", providerId: "z-ai", name: "GLM 5.2", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "code", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 0.63, outputPer1M: 1.98 },
330
+ { id: "glm-5.1", providerId: "z-ai", name: "GLM 5.1", modelType: "llm", contextWindow: 204800, capabilities: JSON.stringify(["chat", "code", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 0.97, outputPer1M: 3.04 },
331
+ { id: "glm-5", providerId: "z-ai", name: "GLM 5", modelType: "llm", contextWindow: 200000, capabilities: JSON.stringify(["chat", "code", "json_mode", "function_calling", "streaming", "reasoning"]), inputPer1M: 0.97, outputPer1M: 3.04 },
276
332
 
277
333
  // ── OpenCode Go (fuente: opencode.ai) — OpenAI-compatible endpoint ──
278
- { id: "opencode-go/minimax-m3", providerId: "opencode-go", name: "MiniMax M3", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "code", "vision", "function_calling", "streaming", "reasoning"]) },
279
- { id: "opencode-go/minimax-m2.7", providerId: "opencode-go", name: "MiniMax M2.7", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "code", "function_calling", "streaming"]) },
280
- { id: "opencode-go/minimax-m2.5", providerId: "opencode-go", name: "MiniMax M2.5", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "code", "function_calling", "streaming"]) },
281
- { id: "opencode-go/kimi-k2.6", providerId: "opencode-go", name: "Kimi K2.6", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "code", "function_calling", "streaming"]) },
282
- { id: "opencode-go/kimi-k2.5", providerId: "opencode-go", name: "Kimi K2.5", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "code", "function_calling", "streaming"]) },
283
- { id: "opencode-go/glm-5.1", providerId: "opencode-go", name: "GLM-5.1", modelType: "llm", contextWindow: 128000, capabilities: JSON.stringify(["chat", "code", "function_calling", "streaming"]) },
284
- { id: "opencode-go/glm-5", providerId: "opencode-go", name: "GLM-5", modelType: "llm", contextWindow: 128000, capabilities: JSON.stringify(["chat", "code", "function_calling", "streaming"]) },
285
- { id: "opencode-go/deepseek-v4-pro", providerId: "opencode-go", name: "DeepSeek V4 Pro", modelType: "llm", contextWindow: 128000, capabilities: JSON.stringify(["chat", "code", "function_calling", "streaming", "reasoning"]) },
286
- { id: "opencode-go/deepseek-v4-flash", providerId: "opencode-go", name: "DeepSeek V4 Flash", modelType: "llm", contextWindow: 128000, capabilities: JSON.stringify(["chat", "code", "function_calling", "streaming"]) },
287
- { id: "opencode-go/mimo-v2-pro", providerId: "opencode-go", name: "MiMo-V2 Pro", modelType: "llm", contextWindow: 128000, capabilities: JSON.stringify(["chat", "code", "function_calling", "streaming", "reasoning"]) },
288
- { id: "opencode-go/mimo-v2-omni", providerId: "opencode-go", name: "MiMo-V2 Omni", modelType: "llm", contextWindow: 128000, capabilities: JSON.stringify(["chat", "code", "function_calling", "streaming"]) },
289
- { id: "opencode-go/mimo-v2.5-pro", providerId: "opencode-go", name: "MiMo-V2.5 Pro", modelType: "llm", contextWindow: 128000, capabilities: JSON.stringify(["chat", "code", "function_calling", "streaming", "reasoning"]) },
290
- { id: "opencode-go/mimo-v2.5", providerId: "opencode-go", name: "MiMo-V2.5", modelType: "llm", contextWindow: 128000, capabilities: JSON.stringify(["chat", "code", "function_calling", "streaming"]) },
291
- { id: "opencode-go/hy3-preview", providerId: "opencode-go", name: "Hunyuan 3 Preview", modelType: "llm", contextWindow: 128000, capabilities: JSON.stringify(["chat", "code", "function_calling", "streaming"]) },
334
+ { id: "minimax-m3", providerId: "opencode-go", name: "MiniMax M3", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "code", "vision", "function_calling", "streaming", "reasoning"]), inputPer1M: 0, outputPer1M: 0 },
335
+ { id: "minimax-m2.7", providerId: "opencode-go", name: "MiniMax M2.7", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "code", "function_calling", "streaming"]), inputPer1M: 0, outputPer1M: 0 },
336
+ { id: "minimax-m2.5", providerId: "opencode-go", name: "MiniMax M2.5", modelType: "llm", contextWindow: 1000000, capabilities: JSON.stringify(["chat", "code", "function_calling", "streaming"]), inputPer1M: 0, outputPer1M: 0 },
337
+ { id: "kimi-k2.6", providerId: "opencode-go", name: "Kimi K2.6", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "code", "function_calling", "streaming"]), inputPer1M: 0, outputPer1M: 0 },
338
+ { id: "kimi-k2.5", providerId: "opencode-go", name: "Kimi K2.5", modelType: "llm", contextWindow: 262144, capabilities: JSON.stringify(["chat", "code", "function_calling", "streaming"]), inputPer1M: 0, outputPer1M: 0 },
339
+ { id: "glm-5.1", providerId: "opencode-go", name: "GLM-5.1", modelType: "llm", contextWindow: 128000, capabilities: JSON.stringify(["chat", "code", "function_calling", "streaming"]), inputPer1M: 0, outputPer1M: 0 },
340
+ { id: "glm-5", providerId: "opencode-go", name: "GLM-5", modelType: "llm", contextWindow: 128000, capabilities: JSON.stringify(["chat", "code", "function_calling", "streaming"]), inputPer1M: 0, outputPer1M: 0 },
341
+ { id: "deepseek-v4-pro", providerId: "opencode-go", name: "DeepSeek V4 Pro", modelType: "llm", contextWindow: 128000, capabilities: JSON.stringify(["chat", "code", "function_calling", "streaming", "reasoning"]), inputPer1M: 0, outputPer1M: 0 },
342
+ { id: "deepseek-v4-flash", providerId: "opencode-go", name: "DeepSeek V4 Flash", modelType: "llm", contextWindow: 128000, capabilities: JSON.stringify(["chat", "code", "function_calling", "streaming"]), inputPer1M: 0, outputPer1M: 0 },
343
+ { id: "mimo-v2-pro", providerId: "opencode-go", name: "MiMo-V2 Pro", modelType: "llm", contextWindow: 128000, capabilities: JSON.stringify(["chat", "code", "function_calling", "streaming", "reasoning"]), inputPer1M: 0, outputPer1M: 0 },
344
+ { id: "mimo-v2-omni", providerId: "opencode-go", name: "MiMo-V2 Omni", modelType: "llm", contextWindow: 128000, capabilities: JSON.stringify(["chat", "code", "function_calling", "streaming"]), inputPer1M: 0, outputPer1M: 0 },
345
+ { id: "mimo-v2.5-pro", providerId: "opencode-go", name: "MiMo-V2.5 Pro", modelType: "llm", contextWindow: 128000, capabilities: JSON.stringify(["chat", "code", "function_calling", "streaming", "reasoning"]), inputPer1M: 0, outputPer1M: 0 },
346
+ { id: "mimo-v2.5", providerId: "opencode-go", name: "MiMo-V2.5", modelType: "llm", contextWindow: 128000, capabilities: JSON.stringify(["chat", "code", "function_calling", "streaming"]), inputPer1M: 0, outputPer1M: 0 },
347
+ { id: "hy3-preview", providerId: "opencode-go", name: "Hunyuan 3 Preview", modelType: "llm", contextWindow: 128000, capabilities: JSON.stringify(["chat", "code", "function_calling", "streaming"]), inputPer1M: 0, outputPer1M: 0 },
292
348
 
293
349
  // ── HiveAgents (llama.cpp local servido vía Cloudflare) ──
294
350
  // Modelo único recomendado para distribución Hive single-machine.
295
351
  // Ver API.md para detalles de carga e inferencia.
296
- { id: "Qwen-AgentWorld-35B-A3B-UD-Q4_K_M.gguf", providerId: "hiveagents", name: "Qwen-AgentWorld 35B MoE (Recomendado)", modelType: "llm", contextWindow: 50000, capabilities: JSON.stringify(["chat", "streaming", "reasoning", "function_calling"]) },
352
+ //
353
+ // El id ES el nombre del archivo .gguf que sirve llama.cpp, así que cambia
354
+ // con cada bump del modelo. Al renombrarlo, el re-seed borra la fila vieja y
355
+ // crea la nueva desactivada, y desvincula a los agentes que apuntaban a la
356
+ // anterior: hay que volver a elegir el modelo en la UI una vez.
357
+ { id: "Qwen3.6-35B-A3B-UD-Q4_K_M.gguf", providerId: "hiveagents", name: "Qwen3.6 35B MoE (Recomendado)", modelType: "llm", contextWindow: 50000, capabilities: JSON.stringify(["chat", "streaming", "reasoning", "function_calling"]), inputPer1M: 0, outputPer1M: 0 },
297
358
  ],
298
359
 
299
360
 
@@ -431,12 +492,25 @@ const RETIRED_SKILL_IDS = [
431
492
  "mcp_lazy_operator",
432
493
  ];
433
494
 
495
+ // Modelos de voz que salieron del catálogo, con su reemplazo. Borrar la fila del
496
+ // seed no alcanza: el canal guarda el id del modelo en stt_provider/tts_provider,
497
+ // así que quedaría apuntando a una fila que ya no existe y la transcripción
498
+ // fallaría igual, sólo que con otro mensaje. Mapear a null desactiva la voz.
499
+ const RETIRED_VOICE_MODELS: Record<string, string | null> = {
500
+ // Groq lo deprecó en favor de turbo, que además cubre más idiomas.
501
+ "groq/distil-whisper-large-v3-en": "groq/whisper-large-v3-turbo",
502
+ };
503
+
434
504
  const RETIRED_CATALOG_AGENT_IDS = [
435
505
  "canvas_presenter",
436
506
  // Kept only as an upgrade tombstone so existing installations remove the
437
507
  // former generic MCP worker. New MCP specialists are user-owned and scoped
438
508
  // persistently to one server.
439
509
  "mcp_integration_operator",
510
+ // The independent verifier agent was replaced by deterministic acceptance
511
+ // checks (agent/acceptance-checks.ts) plus the coordinator judging the
512
+ // delivery itself in the closing turn — no extra agent loop per task.
513
+ "acceptance_verifier",
440
514
  ];
441
515
 
442
516
  const LEGACY_CRON_PERSONA = {
@@ -504,6 +578,15 @@ async function pruneRetired(): Promise<void> {
504
578
  }
505
579
  }
506
580
 
581
+ // The independent-verifier agent's audit trail is gone with it — no reader
582
+ // exists for the `verifications` collection anymore.
583
+ const verificationsCol = await col<{ id: string }>("verifications");
584
+ const staleVerifications = await verificationsCol.scan({});
585
+ for (const entry of staleVerifications) {
586
+ await verificationsCol.delete(entry.id);
587
+ removed++;
588
+ }
589
+
507
590
  if (removed > 0) log.info(`[seed] 🗑️ Removed ${removed} retired capability row(s)`);
508
591
  }
509
592
 
@@ -614,39 +697,50 @@ export async function seedAllData(): Promise<void> {
614
697
  }
615
698
  log.info(`[seed] ✅ ${providerCount} providers procesados`);
616
699
 
617
- // 5️⃣ Models (re-seed: overwrite catalog fields in place, preserve the user's own
618
- // enabled/active activation state, remove entries no longer in the catalog)
619
- log.info("[seed] 🔄 Re-seeding models...");
700
+ // 5️⃣ Models — wipe & recreate.
701
+ //
702
+ // Actualizar el catálogo es editar SEED_DATA.models y arrancar: las filas de
703
+ // catálogo se borran enteras y se vuelven a crear, así ningún campo viejo
704
+ // (context_window, capabilities, precio) sobrevive a una entrada renombrada
705
+ // o corregida. Un upsert en sitio no daba esa garantía.
706
+ //
707
+ // Dos cosas sí se preservan a propósito:
708
+ // - enabled/active por id, para no desactivar el modelo que el usuario
709
+ // eligió cada vez que se publica un catálogo nuevo;
710
+ // - las filas source != "catalog" (Ollama tags, /v1/models), que no tienen
711
+ // origen canónico desde el que recrearse.
712
+ log.info("[seed] 🔄 Re-seeding models (wipe & recreate)...");
620
713
  const modelsCol = await col<ModelDoc>("models");
621
- const existingModels = new Map((await modelsCol.scan({})).map((e) => [e.id, e]));
714
+ const beforeWipe = await modelsCol.scan({});
715
+
716
+ const activationState = new Map(
717
+ beforeWipe.map((e) => [e.id, { enabled: e.doc.enabled, active: e.doc.active }])
718
+ );
719
+
720
+ let wipedModels = 0;
721
+ for (const row of beforeWipe) {
722
+ if (row.doc.source !== "catalog") continue;
723
+ await modelsCol.delete(row.id);
724
+ wipedModels++;
725
+ }
622
726
 
623
727
  let modelCount = 0;
624
728
  for (const model of SEED_DATA.models) {
625
- const existing = existingModels.get(model.id);
626
- await modelsCol.put(model.id, {
627
- id: model.id, provider_id: model.providerId, name: model.name,
729
+ const key = catalogModelKey(model.providerId, model.id);
730
+ const previous = activationState.get(key);
731
+ await modelsCol.put(key, {
732
+ id: key, provider_id: model.providerId, name: model.name,
628
733
  model_type: model.modelType as ModelDoc["model_type"],
629
734
  context_window: model.contextWindow || 0, capabilities: model.capabilities || null,
630
- enabled: existing?.doc.enabled ?? true, active: existing?.doc.active ?? false,
735
+ enabled: previous?.enabled ?? true, active: previous?.active ?? false,
631
736
  source: "catalog",
737
+ input_per_1m: model.inputPer1M ?? null,
738
+ output_per_1m: model.outputPer1M ?? null,
632
739
  });
633
- existingModels.delete(model.id);
634
740
  modelCount++;
635
741
  }
636
- // Whatever remains was either dropped from the catalog (e.g. a consolidated
637
- // HiveAgents GGUF variant) — remove it — or discovered at runtime from a
638
- // provider (Ollama tags, /v1/models). Discovered rows have no canonical
639
- // source to be re-created from, so they survive the reseed: purging them
640
- // would unlink the model of every install that runs on a local Ollama.
641
- let removedModels = 0;
642
- for (const [staleId, stale] of existingModels) {
643
- if (stale.doc.source !== "catalog") continue;
644
- await modelsCol.delete(staleId);
645
- removedModels++;
646
- }
647
- if (removedModels > 0) {
648
- log.info(`[seed] 🗑️ Removed ${removedModels} model(s) no longer in the catalog.`);
649
- }
742
+ log.info(`[seed] 🗑️ ${wipedModels} modelo(s) de catálogo borrados y recreados desde SEED_DATA`);
743
+ invalidateModelPricingCache();
650
744
 
651
745
  // An agent pointing at a model that just got removed would otherwise keep
652
746
  // a dangling model_id — unlink it so loadAgentConfigFromDB() falls back to
@@ -664,6 +758,28 @@ export async function seedAllData(): Promise<void> {
664
758
  if (unlinkedCount > 0) {
665
759
  log.info(`[seed] 🔗 Unlinked ${unlinkedCount} agent(s) from model(s) no longer in the catalog`);
666
760
  }
761
+
762
+ // Los canales guardan el id del modelo de voz, no una FK: si el modelo salió
763
+ // del catálogo hay que repuntarlos a mano o la voz queda rota en silencio.
764
+ const voiceChannelsCol = await col<ChannelDoc>("channels");
765
+ let migratedVoice = 0;
766
+ for (const c of await voiceChannelsCol.scan({})) {
767
+ const patch: Partial<ChannelDoc> = {};
768
+ for (const field of ["stt_provider", "tts_provider"] as const) {
769
+ const current = c.doc[field];
770
+ if (current && current in RETIRED_VOICE_MODELS) {
771
+ patch[field] = RETIRED_VOICE_MODELS[current];
772
+ }
773
+ }
774
+ if (Object.keys(patch).length === 0) continue;
775
+ await voiceChannelsCol.put(c.id, { ...c.doc, ...patch }, { expectedVersion: c.version });
776
+ migratedVoice++;
777
+ log.info(`[seed] 🎙️ Canal ${c.id}: modelo de voz deprecado migrado ${JSON.stringify(patch)}`);
778
+ }
779
+ if (migratedVoice > 0) {
780
+ log.info(`[seed] 🎙️ ${migratedVoice} canal(es) repuntados a modelos de voz vigentes`);
781
+ }
782
+
667
783
  log.info(`[seed] ✅ ${modelCount} models procesados`);
668
784
 
669
785
  // 6️⃣ MCP servers
@@ -737,7 +853,7 @@ export async function seedAllData(): Promise<void> {
737
853
  await putIfAbsent(channelsCol, channel.id, {
738
854
  id: channel.id, user_id: toIndexable(null), type: channel.type, enabled: true, active: false,
739
855
  status: "disconnected", last_active: null, voice_enabled: false, tts_enabled: false,
740
- stt_provider: null, tts_provider: null, tts_voice_id: null, step_delivery_mode: "new_messages",
856
+ stt_provider: null, tts_provider: null, tts_voice_id: null, step_delivery_mode: "milestones",
741
857
  vision_enabled: false, ocr_provider: null, vision_provider: null, vision_model_id: null,
742
858
  });
743
859
  channelCount++;