milaidy 1.0.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 (253) hide show
  1. package/LICENSE +8 -0
  2. package/README.md +538 -0
  3. package/dist/argv-CfSowvEA.js +63 -0
  4. package/dist/config-B-mboG4v.js +4 -0
  5. package/dist/eliza-CPJjgw-e.js +1491 -0
  6. package/dist/eliza.js +2192 -0
  7. package/dist/entry.js +232 -0
  8. package/dist/index.js +209 -0
  9. package/dist/links-BFKlWqSe.js +15 -0
  10. package/dist/paths-D_yh1DEJ.js +69 -0
  11. package/dist/plugins-cli-B7kSre2c.js +134 -0
  12. package/dist/program-6KwWwKKh.js +510 -0
  13. package/dist/register.agents-CPVmSjMG.js +17 -0
  14. package/dist/register.browser-B2ooXxNx.js +15 -0
  15. package/dist/register.channels-CMYQ6K6Y.js +42 -0
  16. package/dist/register.cron-D91lY1_Y.js +9 -0
  17. package/dist/register.devices-rU5I5L_y.js +13 -0
  18. package/dist/register.gateway-82SLAvw3.js +22 -0
  19. package/dist/register.hooks-B_XTBEkt.js +9 -0
  20. package/dist/register.logs-BgEGcPd8.js +10 -0
  21. package/dist/register.models-BJt9eVgZ.js +26 -0
  22. package/dist/register.nodes-B5xY1s8a.js +9 -0
  23. package/dist/register.skills-SFQqYIhg.js +10 -0
  24. package/dist/register.subclis-uF_AsbWR.js +187 -0
  25. package/dist/run-main-XODklzS-.js +56 -0
  26. package/dist/theme-DBvtuGeq.js +36 -0
  27. package/dist/utils-C1AUpp_V.js +42 -0
  28. package/dist/version-Cpn3yr5D.js +26 -0
  29. package/dist/workspace-Co3Wul2D.js +206 -0
  30. package/dist/workspace-DCA6MNVK.js +350 -0
  31. package/docs/.i18n/README.md +31 -0
  32. package/docs/.i18n/glossary.zh-CN.json +210 -0
  33. package/docs/.i18n/zh-CN.tm.jsonl +1329 -0
  34. package/docs/CNAME +1 -0
  35. package/docs/automation/cron-jobs.md +468 -0
  36. package/docs/automation/cron-vs-heartbeat.md +254 -0
  37. package/docs/automation/gmail-pubsub.md +256 -0
  38. package/docs/automation/poll.md +69 -0
  39. package/docs/automation/webhook.md +163 -0
  40. package/docs/bedrock.md +176 -0
  41. package/docs/brave-search.md +41 -0
  42. package/docs/broadcast-groups.md +442 -0
  43. package/docs/cli/acp.md +170 -0
  44. package/docs/cli/agent.md +24 -0
  45. package/docs/cli/agents.md +75 -0
  46. package/docs/cli/approvals.md +50 -0
  47. package/docs/cli/browser.md +107 -0
  48. package/docs/cli/channels.md +79 -0
  49. package/docs/cli/config.md +50 -0
  50. package/docs/cli/configure.md +33 -0
  51. package/docs/cli/cron.md +42 -0
  52. package/docs/cli/dashboard.md +16 -0
  53. package/docs/cli/devices.md +67 -0
  54. package/docs/cli/directory.md +63 -0
  55. package/docs/cli/dns.md +23 -0
  56. package/docs/cli/docs.md +15 -0
  57. package/docs/cli/doctor.md +41 -0
  58. package/docs/cli/gateway.md +199 -0
  59. package/docs/cli/health.md +21 -0
  60. package/docs/cli/hooks.md +291 -0
  61. package/docs/cli/index.md +1029 -0
  62. package/docs/cli/logs.md +24 -0
  63. package/docs/cli/memory.md +45 -0
  64. package/docs/cli/message.md +239 -0
  65. package/docs/cli/models.md +79 -0
  66. package/docs/cli/node.md +112 -0
  67. package/docs/cli/nodes.md +73 -0
  68. package/docs/cli/onboard.md +29 -0
  69. package/docs/cli/pairing.md +21 -0
  70. package/docs/cli/plugins.md +62 -0
  71. package/docs/cli/reset.md +17 -0
  72. package/docs/cli/sandbox.md +152 -0
  73. package/docs/cli/security.md +26 -0
  74. package/docs/cli/sessions.md +16 -0
  75. package/docs/cli/setup.md +29 -0
  76. package/docs/cli/skills.md +26 -0
  77. package/docs/cli/status.md +26 -0
  78. package/docs/cli/system.md +60 -0
  79. package/docs/cli/tui.md +23 -0
  80. package/docs/cli/uninstall.md +17 -0
  81. package/docs/cli/update.md +98 -0
  82. package/docs/cli/voicecall.md +34 -0
  83. package/docs/cli/webhooks.md +25 -0
  84. package/docs/concepts/agent-loop.md +146 -0
  85. package/docs/concepts/agent-workspace.md +229 -0
  86. package/docs/concepts/agent.md +122 -0
  87. package/docs/concepts/architecture.md +129 -0
  88. package/docs/concepts/channel-routing.md +114 -0
  89. package/docs/concepts/compaction.md +61 -0
  90. package/docs/concepts/context.md +159 -0
  91. package/docs/concepts/features.md +53 -0
  92. package/docs/concepts/group-messages.md +84 -0
  93. package/docs/concepts/groups.md +373 -0
  94. package/docs/concepts/markdown-formatting.md +130 -0
  95. package/docs/concepts/memory.md +546 -0
  96. package/docs/concepts/messages.md +154 -0
  97. package/docs/concepts/model-failover.md +149 -0
  98. package/docs/concepts/model-providers.md +315 -0
  99. package/docs/concepts/models.md +208 -0
  100. package/docs/concepts/multi-agent.md +376 -0
  101. package/docs/concepts/oauth.md +145 -0
  102. package/docs/concepts/plugins.md +454 -0
  103. package/docs/concepts/presence.md +102 -0
  104. package/docs/concepts/queue.md +89 -0
  105. package/docs/concepts/retry.md +69 -0
  106. package/docs/concepts/secrets.md +300 -0
  107. package/docs/concepts/session-pruning.md +122 -0
  108. package/docs/concepts/session-tool.md +193 -0
  109. package/docs/concepts/session.md +188 -0
  110. package/docs/concepts/sessions.md +10 -0
  111. package/docs/concepts/skills.md +392 -0
  112. package/docs/concepts/streaming.md +135 -0
  113. package/docs/concepts/system-prompt.md +114 -0
  114. package/docs/concepts/timezone.md +91 -0
  115. package/docs/concepts/typebox.md +289 -0
  116. package/docs/concepts/typing-indicators.md +68 -0
  117. package/docs/concepts/usage-tracking.md +35 -0
  118. package/docs/custom.css +4 -0
  119. package/docs/date-time.md +128 -0
  120. package/docs/debugging.md +162 -0
  121. package/docs/docs.json +1599 -0
  122. package/docs/environment.md +81 -0
  123. package/docs/hooks.md +876 -0
  124. package/docs/index.md +179 -0
  125. package/docs/install/ansible.md +208 -0
  126. package/docs/install/bun.md +59 -0
  127. package/docs/install/development-channels.md +75 -0
  128. package/docs/install/docker.md +567 -0
  129. package/docs/install/index.md +185 -0
  130. package/docs/install/installer.md +123 -0
  131. package/docs/install/migrating.md +192 -0
  132. package/docs/install/nix.md +96 -0
  133. package/docs/install/node.md +78 -0
  134. package/docs/install/uninstall.md +128 -0
  135. package/docs/install/updating.md +228 -0
  136. package/docs/logging.md +350 -0
  137. package/docs/multi-agent-sandbox-tools.md +395 -0
  138. package/docs/network.md +54 -0
  139. package/docs/nodes/audio.md +114 -0
  140. package/docs/nodes/camera.md +156 -0
  141. package/docs/nodes/images.md +72 -0
  142. package/docs/nodes/index.md +341 -0
  143. package/docs/nodes/location-command.md +113 -0
  144. package/docs/nodes/media-understanding.md +379 -0
  145. package/docs/nodes/talk.md +90 -0
  146. package/docs/nodes/voicewake.md +65 -0
  147. package/docs/northflank.mdx +53 -0
  148. package/docs/perplexity.md +80 -0
  149. package/docs/platforms/android.md +129 -0
  150. package/docs/platforms/digitalocean.md +262 -0
  151. package/docs/platforms/exe-dev.md +125 -0
  152. package/docs/platforms/fly.md +486 -0
  153. package/docs/platforms/gcp.md +503 -0
  154. package/docs/platforms/hetzner.md +330 -0
  155. package/docs/platforms/index.md +53 -0
  156. package/docs/platforms/ios.md +106 -0
  157. package/docs/platforms/linux.md +94 -0
  158. package/docs/platforms/mac/bundled-gateway.md +73 -0
  159. package/docs/platforms/mac/canvas.md +125 -0
  160. package/docs/platforms/mac/child-process.md +69 -0
  161. package/docs/platforms/mac/dev-setup.md +102 -0
  162. package/docs/platforms/mac/health.md +34 -0
  163. package/docs/platforms/mac/icon.md +31 -0
  164. package/docs/platforms/mac/logging.md +57 -0
  165. package/docs/platforms/mac/menu-bar.md +81 -0
  166. package/docs/platforms/mac/peekaboo.md +65 -0
  167. package/docs/platforms/mac/permissions.md +44 -0
  168. package/docs/platforms/mac/release.md +85 -0
  169. package/docs/platforms/mac/remote.md +83 -0
  170. package/docs/platforms/mac/signing.md +47 -0
  171. package/docs/platforms/mac/skills.md +33 -0
  172. package/docs/platforms/mac/voice-overlay.md +60 -0
  173. package/docs/platforms/mac/voicewake.md +67 -0
  174. package/docs/platforms/mac/webchat.md +41 -0
  175. package/docs/platforms/mac/xpc.md +61 -0
  176. package/docs/platforms/macos-vm.md +281 -0
  177. package/docs/platforms/macos.md +203 -0
  178. package/docs/platforms/oracle.md +303 -0
  179. package/docs/platforms/raspberry-pi.md +358 -0
  180. package/docs/platforms/windows.md +159 -0
  181. package/docs/plugin.md +651 -0
  182. package/docs/plugins/agent-tools.md +99 -0
  183. package/docs/plugins/manifest.md +71 -0
  184. package/docs/plugins/voice-call.md +273 -0
  185. package/docs/plugins/zalouser.md +70 -0
  186. package/docs/providers/anthropic.md +152 -0
  187. package/docs/providers/claude-max-api-proxy.md +148 -0
  188. package/docs/providers/cloudflare-ai-gateway.md +71 -0
  189. package/docs/providers/deepgram.md +93 -0
  190. package/docs/providers/glm.md +33 -0
  191. package/docs/providers/index.md +63 -0
  192. package/docs/providers/minimax.md +208 -0
  193. package/docs/providers/models.md +51 -0
  194. package/docs/providers/moonshot.md +142 -0
  195. package/docs/providers/ollama.md +223 -0
  196. package/docs/providers/openai.md +62 -0
  197. package/docs/providers/opencode.md +36 -0
  198. package/docs/providers/openrouter.md +37 -0
  199. package/docs/providers/qwen.md +53 -0
  200. package/docs/providers/synthetic.md +99 -0
  201. package/docs/providers/venice.md +267 -0
  202. package/docs/providers/vercel-ai-gateway.md +50 -0
  203. package/docs/providers/xiaomi.md +64 -0
  204. package/docs/providers/zai.md +36 -0
  205. package/docs/railway.mdx +99 -0
  206. package/docs/reference/templates/AGENTS.md +9 -0
  207. package/docs/reference/templates/BOOTSTRAP.md +3 -0
  208. package/docs/reference/templates/HEARTBEAT.md +3 -0
  209. package/docs/reference/templates/IDENTITY.md +3 -0
  210. package/docs/reference/templates/TOOLS.md +3 -0
  211. package/docs/reference/templates/USER.md +3 -0
  212. package/docs/render.mdx +165 -0
  213. package/docs/start/docs-directory.md +63 -0
  214. package/docs/start/getting-started.md +212 -0
  215. package/docs/start/milaidy.md +247 -0
  216. package/docs/start/onboarding.md +258 -0
  217. package/docs/start/pairing.md +86 -0
  218. package/docs/start/quickstart.md +81 -0
  219. package/docs/start/setup.md +149 -0
  220. package/docs/start/showcase.md +416 -0
  221. package/docs/start/wizard.md +418 -0
  222. package/docs/testing.md +368 -0
  223. package/docs/token-use.md +112 -0
  224. package/docs/tools/agent-send.md +53 -0
  225. package/docs/tools/apply-patch.md +50 -0
  226. package/docs/tools/browser-linux-troubleshooting.md +139 -0
  227. package/docs/tools/browser-login.md +68 -0
  228. package/docs/tools/browser.md +576 -0
  229. package/docs/tools/chrome-extension.md +178 -0
  230. package/docs/tools/clawhub.md +257 -0
  231. package/docs/tools/creating-skills.md +54 -0
  232. package/docs/tools/elevated.md +57 -0
  233. package/docs/tools/exec-approvals.md +246 -0
  234. package/docs/tools/exec.md +179 -0
  235. package/docs/tools/firecrawl.md +61 -0
  236. package/docs/tools/index.md +508 -0
  237. package/docs/tools/llm-task.md +115 -0
  238. package/docs/tools/reactions.md +22 -0
  239. package/docs/tools/skills-config.md +76 -0
  240. package/docs/tools/skills.md +300 -0
  241. package/docs/tools/slash-commands.md +196 -0
  242. package/docs/tools/subagents.md +151 -0
  243. package/docs/tools/thinking.md +73 -0
  244. package/docs/tools/web.md +261 -0
  245. package/docs/tui.md +159 -0
  246. package/docs/vps.md +43 -0
  247. package/docs/web/control-ui.md +221 -0
  248. package/docs/web/dashboard.md +46 -0
  249. package/docs/web/index.md +116 -0
  250. package/docs/web/webchat.md +49 -0
  251. package/milaidy.mjs +14 -0
  252. package/package.json +271 -0
  253. package/skills/.cache/catalog.json +88519 -0
@@ -0,0 +1,142 @@
1
+ ---
2
+ summary: "Configure Moonshot K2 vs Kimi Coding (separate providers + keys)"
3
+ read_when:
4
+ - You want Moonshot K2 (Moonshot Open Platform) vs Kimi Coding setup
5
+ - You need to understand separate endpoints, keys, and model refs
6
+ - You want copy/paste config for either provider
7
+ title: "Moonshot AI"
8
+ ---
9
+
10
+ # Moonshot AI (Kimi)
11
+
12
+ Moonshot provides the Kimi API with OpenAI-compatible endpoints. Configure the
13
+ provider and set the default model to `moonshot/kimi-k2.5`, or use
14
+ Kimi Coding with `kimi-coding/k2p5`.
15
+
16
+ Current Kimi K2 model IDs:
17
+
18
+ {/_ moonshot-kimi-k2-ids:start _/ && null}
19
+
20
+ - `kimi-k2.5`
21
+ - `kimi-k2-0905-preview`
22
+ - `kimi-k2-turbo-preview`
23
+ - `kimi-k2-thinking`
24
+ - `kimi-k2-thinking-turbo`
25
+ {/_ moonshot-kimi-k2-ids:end _/ && null}
26
+
27
+ ```bash
28
+ milaidy onboard --auth-choice moonshot-api-key
29
+ ```
30
+
31
+ Kimi Coding:
32
+
33
+ ```bash
34
+ milaidy onboard --auth-choice kimi-code-api-key
35
+ ```
36
+
37
+ Note: Moonshot and Kimi Coding are separate providers. Keys are not interchangeable, endpoints differ, and model refs differ (Moonshot uses `moonshot/...`, Kimi Coding uses `kimi-coding/...`).
38
+
39
+ ## Config snippet (Moonshot API)
40
+
41
+ ```json5
42
+ {
43
+ env: { MOONSHOT_API_KEY: "sk-..." },
44
+ agents: {
45
+ defaults: {
46
+ model: { primary: "moonshot/kimi-k2.5" },
47
+ models: {
48
+ // moonshot-kimi-k2-aliases:start
49
+ "moonshot/kimi-k2.5": { alias: "Kimi K2.5" },
50
+ "moonshot/kimi-k2-0905-preview": { alias: "Kimi K2" },
51
+ "moonshot/kimi-k2-turbo-preview": { alias: "Kimi K2 Turbo" },
52
+ "moonshot/kimi-k2-thinking": { alias: "Kimi K2 Thinking" },
53
+ "moonshot/kimi-k2-thinking-turbo": { alias: "Kimi K2 Thinking Turbo" },
54
+ // moonshot-kimi-k2-aliases:end
55
+ },
56
+ },
57
+ },
58
+ models: {
59
+ mode: "merge",
60
+ providers: {
61
+ moonshot: {
62
+ baseUrl: "https://api.moonshot.ai/v1",
63
+ apiKey: "${MOONSHOT_API_KEY}",
64
+ api: "openai-completions",
65
+ models: [
66
+ // moonshot-kimi-k2-models:start
67
+ {
68
+ id: "kimi-k2.5",
69
+ name: "Kimi K2.5",
70
+ reasoning: false,
71
+ input: ["text"],
72
+ cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
73
+ contextWindow: 256000,
74
+ maxTokens: 8192,
75
+ },
76
+ {
77
+ id: "kimi-k2-0905-preview",
78
+ name: "Kimi K2 0905 Preview",
79
+ reasoning: false,
80
+ input: ["text"],
81
+ cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
82
+ contextWindow: 256000,
83
+ maxTokens: 8192,
84
+ },
85
+ {
86
+ id: "kimi-k2-turbo-preview",
87
+ name: "Kimi K2 Turbo",
88
+ reasoning: false,
89
+ input: ["text"],
90
+ cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
91
+ contextWindow: 256000,
92
+ maxTokens: 8192,
93
+ },
94
+ {
95
+ id: "kimi-k2-thinking",
96
+ name: "Kimi K2 Thinking",
97
+ reasoning: true,
98
+ input: ["text"],
99
+ cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
100
+ contextWindow: 256000,
101
+ maxTokens: 8192,
102
+ },
103
+ {
104
+ id: "kimi-k2-thinking-turbo",
105
+ name: "Kimi K2 Thinking Turbo",
106
+ reasoning: true,
107
+ input: ["text"],
108
+ cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
109
+ contextWindow: 256000,
110
+ maxTokens: 8192,
111
+ },
112
+ // moonshot-kimi-k2-models:end
113
+ ],
114
+ },
115
+ },
116
+ },
117
+ }
118
+ ```
119
+
120
+ ## Kimi Coding
121
+
122
+ ```json5
123
+ {
124
+ env: { KIMI_API_KEY: "sk-..." },
125
+ agents: {
126
+ defaults: {
127
+ model: { primary: "kimi-coding/k2p5" },
128
+ models: {
129
+ "kimi-coding/k2p5": { alias: "Kimi K2.5" },
130
+ },
131
+ },
132
+ },
133
+ }
134
+ ```
135
+
136
+ ## Notes
137
+
138
+ - Moonshot model refs use `moonshot/<modelId>`. Kimi Coding model refs use `kimi-coding/<modelId>`.
139
+ - Override pricing and context metadata in `models.providers` if needed.
140
+ - If Moonshot publishes different context limits for a model, adjust
141
+ `contextWindow` accordingly.
142
+ - Use `https://api.moonshot.ai/v1` for the international endpoint, and `https://api.moonshot.cn/v1` for the China endpoint.
@@ -0,0 +1,223 @@
1
+ ---
2
+ summary: "Run Milaidy with Ollama (local LLM runtime)"
3
+ read_when:
4
+ - You want to run Milaidy with local models via Ollama
5
+ - You need Ollama setup and configuration guidance
6
+ title: "Ollama"
7
+ ---
8
+
9
+ # Ollama
10
+
11
+ Ollama is a local LLM runtime that makes it easy to run open-source models on your machine. Milaidy integrates with Ollama's OpenAI-compatible API and can **auto-discover tool-capable models** when you opt in with `OLLAMA_API_KEY` (or an auth profile) and do not define an explicit `models.providers.ollama` entry.
12
+
13
+ ## Quick start
14
+
15
+ 1. Install Ollama: https://ollama.ai
16
+
17
+ 2. Pull a model:
18
+
19
+ ```bash
20
+ ollama pull llama3.3
21
+ # or
22
+ ollama pull qwen2.5-coder:32b
23
+ # or
24
+ ollama pull deepseek-r1:32b
25
+ ```
26
+
27
+ 3. Enable Ollama for Milaidy (any value works; Ollama doesn't require a real key):
28
+
29
+ ```bash
30
+ # Set environment variable
31
+ export OLLAMA_API_KEY="ollama-local"
32
+
33
+ # Or configure in your config file
34
+ milaidy config set models.providers.ollama.apiKey "ollama-local"
35
+ ```
36
+
37
+ 4. Use Ollama models:
38
+
39
+ ```json5
40
+ {
41
+ agents: {
42
+ defaults: {
43
+ model: { primary: "ollama/llama3.3" },
44
+ },
45
+ },
46
+ }
47
+ ```
48
+
49
+ ## Model discovery (implicit provider)
50
+
51
+ When you set `OLLAMA_API_KEY` (or an auth profile) and **do not** define `models.providers.ollama`, Milaidy discovers models from the local Ollama instance at `http://127.0.0.1:11434`:
52
+
53
+ - Queries `/api/tags` and `/api/show`
54
+ - Keeps only models that report `tools` capability
55
+ - Marks `reasoning` when the model reports `thinking`
56
+ - Reads `contextWindow` from `model_info["<arch>.context_length"]` when available
57
+ - Sets `maxTokens` to 10× the context window
58
+ - Sets all costs to `0`
59
+
60
+ This avoids manual model entries while keeping the catalog aligned with Ollama's capabilities.
61
+
62
+ To see what models are available:
63
+
64
+ ```bash
65
+ ollama list
66
+ milaidy models list
67
+ ```
68
+
69
+ To add a new model, simply pull it with Ollama:
70
+
71
+ ```bash
72
+ ollama pull mistral
73
+ ```
74
+
75
+ The new model will be automatically discovered and available to use.
76
+
77
+ If you set `models.providers.ollama` explicitly, auto-discovery is skipped and you must define models manually (see below).
78
+
79
+ ## Configuration
80
+
81
+ ### Basic setup (implicit discovery)
82
+
83
+ The simplest way to enable Ollama is via environment variable:
84
+
85
+ ```bash
86
+ export OLLAMA_API_KEY="ollama-local"
87
+ ```
88
+
89
+ ### Explicit setup (manual models)
90
+
91
+ Use explicit config when:
92
+
93
+ - Ollama runs on another host/port.
94
+ - You want to force specific context windows or model lists.
95
+ - You want to include models that do not report tool support.
96
+
97
+ ```json5
98
+ {
99
+ models: {
100
+ providers: {
101
+ ollama: {
102
+ // Use a host that includes /v1 for OpenAI-compatible APIs
103
+ baseUrl: "http://ollama-host:11434/v1",
104
+ apiKey: "ollama-local",
105
+ api: "openai-completions",
106
+ models: [
107
+ {
108
+ id: "llama3.3",
109
+ name: "Llama 3.3",
110
+ reasoning: false,
111
+ input: ["text"],
112
+ cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
113
+ contextWindow: 8192,
114
+ maxTokens: 8192 * 10
115
+ }
116
+ ]
117
+ }
118
+ }
119
+ }
120
+ }
121
+ ```
122
+
123
+ If `OLLAMA_API_KEY` is set, you can omit `apiKey` in the provider entry and Milaidy will fill it for availability checks.
124
+
125
+ ### Custom base URL (explicit config)
126
+
127
+ If Ollama is running on a different host or port (explicit config disables auto-discovery, so define models manually):
128
+
129
+ ```json5
130
+ {
131
+ models: {
132
+ providers: {
133
+ ollama: {
134
+ apiKey: "ollama-local",
135
+ baseUrl: "http://ollama-host:11434/v1",
136
+ },
137
+ },
138
+ },
139
+ }
140
+ ```
141
+
142
+ ### Model selection
143
+
144
+ Once configured, all your Ollama models are available:
145
+
146
+ ```json5
147
+ {
148
+ agents: {
149
+ defaults: {
150
+ model: {
151
+ primary: "ollama/llama3.3",
152
+ fallback: ["ollama/qwen2.5-coder:32b"],
153
+ },
154
+ },
155
+ },
156
+ }
157
+ ```
158
+
159
+ ## Advanced
160
+
161
+ ### Reasoning models
162
+
163
+ Milaidy marks models as reasoning-capable when Ollama reports `thinking` in `/api/show`:
164
+
165
+ ```bash
166
+ ollama pull deepseek-r1:32b
167
+ ```
168
+
169
+ ### Model Costs
170
+
171
+ Ollama is free and runs locally, so all model costs are set to $0.
172
+
173
+ ### Context windows
174
+
175
+ For auto-discovered models, Milaidy uses the context window reported by Ollama when available, otherwise it defaults to `8192`. You can override `contextWindow` and `maxTokens` in explicit provider config.
176
+
177
+ ## Troubleshooting
178
+
179
+ ### Ollama not detected
180
+
181
+ Make sure Ollama is running and that you set `OLLAMA_API_KEY` (or an auth profile), and that you did **not** define an explicit `models.providers.ollama` entry:
182
+
183
+ ```bash
184
+ ollama serve
185
+ ```
186
+
187
+ And that the API is accessible:
188
+
189
+ ```bash
190
+ curl http://localhost:11434/api/tags
191
+ ```
192
+
193
+ ### No models available
194
+
195
+ Milaidy only auto-discovers models that report tool support. If your model isn't listed, either:
196
+
197
+ - Pull a tool-capable model, or
198
+ - Define the model explicitly in `models.providers.ollama`.
199
+
200
+ To add models:
201
+
202
+ ```bash
203
+ ollama list # See what's installed
204
+ ollama pull llama3.3 # Pull a model
205
+ ```
206
+
207
+ ### Connection refused
208
+
209
+ Check that Ollama is running on the correct port:
210
+
211
+ ```bash
212
+ # Check if Ollama is running
213
+ ps aux | grep ollama
214
+
215
+ # Or restart Ollama
216
+ ollama serve
217
+ ```
218
+
219
+ ## See Also
220
+
221
+ - [Model Providers](/concepts/model-providers) - Overview of all providers
222
+ - [Model Selection](/concepts/models) - How to choose models
223
+ - [Configuration](/gateway/configuration) - Full config reference
@@ -0,0 +1,62 @@
1
+ ---
2
+ summary: "Use OpenAI via API keys or Codex subscription in Milaidy"
3
+ read_when:
4
+ - You want to use OpenAI models in Milaidy
5
+ - You want Codex subscription auth instead of API keys
6
+ title: "OpenAI"
7
+ ---
8
+
9
+ # OpenAI
10
+
11
+ OpenAI provides developer APIs for GPT models. Codex supports **ChatGPT sign-in** for subscription
12
+ access or **API key** sign-in for usage-based access. Codex cloud requires ChatGPT sign-in.
13
+
14
+ ## Option A: OpenAI API key (OpenAI Platform)
15
+
16
+ **Best for:** direct API access and usage-based billing.
17
+ Get your API key from the OpenAI dashboard.
18
+
19
+ ### CLI setup
20
+
21
+ ```bash
22
+ milaidy onboard --auth-choice openai-api-key
23
+ # or non-interactive
24
+ milaidy onboard --openai-api-key "$OPENAI_API_KEY"
25
+ ```
26
+
27
+ ### Config snippet
28
+
29
+ ```json5
30
+ {
31
+ env: { OPENAI_API_KEY: "sk-..." },
32
+ agents: { defaults: { model: { primary: "openai/gpt-5.2" } } },
33
+ }
34
+ ```
35
+
36
+ ## Option B: OpenAI Code (Codex) subscription
37
+
38
+ **Best for:** using ChatGPT/Codex subscription access instead of an API key.
39
+ Codex cloud requires ChatGPT sign-in, while the Codex CLI supports ChatGPT or API key sign-in.
40
+
41
+ ### CLI setup
42
+
43
+ ```bash
44
+ # Run Codex OAuth in the wizard
45
+ milaidy onboard --auth-choice openai-codex
46
+
47
+ # Or run OAuth directly
48
+ milaidy models auth login --provider openai-codex
49
+ ```
50
+
51
+ ### Config snippet
52
+
53
+ ```json5
54
+ {
55
+ agents: { defaults: { model: { primary: "openai-codex/gpt-5.2" } } },
56
+ }
57
+ ```
58
+
59
+ ## Notes
60
+
61
+ - Model refs always use `provider/model` (see [/concepts/models](/concepts/models)).
62
+ - Auth details + reuse rules are in [/concepts/oauth](/concepts/oauth).
@@ -0,0 +1,36 @@
1
+ ---
2
+ summary: "Use OpenCode Zen (curated models) with Milaidy"
3
+ read_when:
4
+ - You want OpenCode Zen for model access
5
+ - You want a curated list of coding-friendly models
6
+ title: "OpenCode Zen"
7
+ ---
8
+
9
+ # OpenCode Zen
10
+
11
+ OpenCode Zen is a **curated list of models** recommended by the OpenCode team for coding agents.
12
+ It is an optional, hosted model access path that uses an API key and the `opencode` provider.
13
+ Zen is currently in beta.
14
+
15
+ ## CLI setup
16
+
17
+ ```bash
18
+ milaidy onboard --auth-choice opencode-zen
19
+ # or non-interactive
20
+ milaidy onboard --opencode-zen-api-key "$OPENCODE_API_KEY"
21
+ ```
22
+
23
+ ## Config snippet
24
+
25
+ ```json5
26
+ {
27
+ env: { OPENCODE_API_KEY: "sk-..." },
28
+ agents: { defaults: { model: { primary: "opencode/claude-opus-4-5" } } },
29
+ }
30
+ ```
31
+
32
+ ## Notes
33
+
34
+ - `OPENCODE_ZEN_API_KEY` is also supported.
35
+ - You sign in to Zen, add billing details, and copy your API key.
36
+ - OpenCode Zen bills per request; check the OpenCode dashboard for details.
@@ -0,0 +1,37 @@
1
+ ---
2
+ summary: "Use OpenRouter's unified API to access many models in Milaidy"
3
+ read_when:
4
+ - You want a single API key for many LLMs
5
+ - You want to run models via OpenRouter in Milaidy
6
+ title: "OpenRouter"
7
+ ---
8
+
9
+ # OpenRouter
10
+
11
+ OpenRouter provides a **unified API** that routes requests to many models behind a single
12
+ endpoint and API key. It is OpenAI-compatible, so most OpenAI SDKs work by switching the base URL.
13
+
14
+ ## CLI setup
15
+
16
+ ```bash
17
+ milaidy onboard --auth-choice apiKey --token-provider openrouter --token "$OPENROUTER_API_KEY"
18
+ ```
19
+
20
+ ## Config snippet
21
+
22
+ ```json5
23
+ {
24
+ env: { OPENROUTER_API_KEY: "sk-or-..." },
25
+ agents: {
26
+ defaults: {
27
+ model: { primary: "openrouter/anthropic/claude-sonnet-4-5" },
28
+ },
29
+ },
30
+ }
31
+ ```
32
+
33
+ ## Notes
34
+
35
+ - Model refs are `openrouter/<provider>/<model>`.
36
+ - For more model/provider options, see [/concepts/model-providers](/concepts/model-providers).
37
+ - OpenRouter uses a Bearer token with your API key under the hood.
@@ -0,0 +1,53 @@
1
+ ---
2
+ summary: "Use Qwen OAuth (free tier) in Milaidy"
3
+ read_when:
4
+ - You want to use Qwen with Milaidy
5
+ - You want free-tier OAuth access to Qwen Coder
6
+ title: "Qwen"
7
+ ---
8
+
9
+ # Qwen
10
+
11
+ Qwen provides a free-tier OAuth flow for Qwen Coder and Qwen Vision models
12
+ (2,000 requests/day, subject to Qwen rate limits).
13
+
14
+ ## Enable the plugin
15
+
16
+ ```bash
17
+ milaidy plugins enable qwen-portal-auth
18
+ ```
19
+
20
+ Restart the Gateway after enabling.
21
+
22
+ ## Authenticate
23
+
24
+ ```bash
25
+ milaidy models auth login --provider qwen-portal --set-default
26
+ ```
27
+
28
+ This runs the Qwen device-code OAuth flow and writes a provider entry to your
29
+ `models.json` (plus a `qwen` alias for quick switching).
30
+
31
+ ## Model IDs
32
+
33
+ - `qwen-portal/coder-model`
34
+ - `qwen-portal/vision-model`
35
+
36
+ Switch models with:
37
+
38
+ ```bash
39
+ milaidy models set qwen-portal/coder-model
40
+ ```
41
+
42
+ ## Reuse Qwen Code CLI login
43
+
44
+ If you already logged in with the Qwen Code CLI, Milaidy will sync credentials
45
+ from `~/.qwen/oauth_creds.json` when it loads the auth store. You still need a
46
+ `models.providers.qwen-portal` entry (use the login command above to create one).
47
+
48
+ ## Notes
49
+
50
+ - Tokens auto-refresh; re-run the login command if refresh fails or access is revoked.
51
+ - Default base URL: `https://portal.qwen.ai/v1` (override with
52
+ `models.providers.qwen-portal.baseUrl` if Qwen provides a different endpoint).
53
+ - See [Model providers](/concepts/model-providers) for provider-wide rules.
@@ -0,0 +1,99 @@
1
+ ---
2
+ summary: "Use Synthetic's Anthropic-compatible API in Milaidy"
3
+ read_when:
4
+ - You want to use Synthetic as a model provider
5
+ - You need a Synthetic API key or base URL setup
6
+ title: "Synthetic"
7
+ ---
8
+
9
+ # Synthetic
10
+
11
+ Synthetic exposes Anthropic-compatible endpoints. Milaidy registers it as the
12
+ `synthetic` provider and uses the Anthropic Messages API.
13
+
14
+ ## Quick setup
15
+
16
+ 1. Set `SYNTHETIC_API_KEY` (or run the wizard below).
17
+ 2. Run onboarding:
18
+
19
+ ```bash
20
+ milaidy onboard --auth-choice synthetic-api-key
21
+ ```
22
+
23
+ The default model is set to:
24
+
25
+ ```
26
+ synthetic/hf:MiniMaxAI/MiniMax-M2.1
27
+ ```
28
+
29
+ ## Config example
30
+
31
+ ```json5
32
+ {
33
+ env: { SYNTHETIC_API_KEY: "sk-..." },
34
+ agents: {
35
+ defaults: {
36
+ model: { primary: "synthetic/hf:MiniMaxAI/MiniMax-M2.1" },
37
+ models: { "synthetic/hf:MiniMaxAI/MiniMax-M2.1": { alias: "MiniMax M2.1" } },
38
+ },
39
+ },
40
+ models: {
41
+ mode: "merge",
42
+ providers: {
43
+ synthetic: {
44
+ baseUrl: "https://api.synthetic.new/anthropic",
45
+ apiKey: "${SYNTHETIC_API_KEY}",
46
+ api: "anthropic-messages",
47
+ models: [
48
+ {
49
+ id: "hf:MiniMaxAI/MiniMax-M2.1",
50
+ name: "MiniMax M2.1",
51
+ reasoning: false,
52
+ input: ["text"],
53
+ cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
54
+ contextWindow: 192000,
55
+ maxTokens: 65536,
56
+ },
57
+ ],
58
+ },
59
+ },
60
+ },
61
+ }
62
+ ```
63
+
64
+ Note: Milaidy's Anthropic client appends `/v1` to the base URL, so use
65
+ `https://api.synthetic.new/anthropic` (not `/anthropic/v1`). If Synthetic changes
66
+ its base URL, override `models.providers.synthetic.baseUrl`.
67
+
68
+ ## Model catalog
69
+
70
+ All models below use cost `0` (input/output/cache).
71
+
72
+ | Model ID | Context window | Max tokens | Reasoning | Input |
73
+ | ------------------------------------------------------ | -------------- | ---------- | --------- | ------------ |
74
+ | `hf:MiniMaxAI/MiniMax-M2.1` | 192000 | 65536 | false | text |
75
+ | `hf:moonshotai/Kimi-K2-Thinking` | 256000 | 8192 | true | text |
76
+ | `hf:zai-org/GLM-4.7` | 198000 | 128000 | false | text |
77
+ | `hf:deepseek-ai/DeepSeek-R1-0528` | 128000 | 8192 | false | text |
78
+ | `hf:deepseek-ai/DeepSeek-V3-0324` | 128000 | 8192 | false | text |
79
+ | `hf:deepseek-ai/DeepSeek-V3.1` | 128000 | 8192 | false | text |
80
+ | `hf:deepseek-ai/DeepSeek-V3.1-Terminus` | 128000 | 8192 | false | text |
81
+ | `hf:deepseek-ai/DeepSeek-V3.2` | 159000 | 8192 | false | text |
82
+ | `hf:meta-llama/Llama-3.3-70B-Instruct` | 128000 | 8192 | false | text |
83
+ | `hf:meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8` | 524000 | 8192 | false | text |
84
+ | `hf:moonshotai/Kimi-K2-Instruct-0905` | 256000 | 8192 | false | text |
85
+ | `hf:openai/gpt-oss-120b` | 128000 | 8192 | false | text |
86
+ | `hf:Qwen/Qwen3-235B-A22B-Instruct-2507` | 256000 | 8192 | false | text |
87
+ | `hf:Qwen/Qwen3-Coder-480B-A35B-Instruct` | 256000 | 8192 | false | text |
88
+ | `hf:Qwen/Qwen3-VL-235B-A22B-Instruct` | 250000 | 8192 | false | text + image |
89
+ | `hf:zai-org/GLM-4.5` | 128000 | 128000 | false | text |
90
+ | `hf:zai-org/GLM-4.6` | 198000 | 128000 | false | text |
91
+ | `hf:deepseek-ai/DeepSeek-V3` | 128000 | 8192 | false | text |
92
+ | `hf:Qwen/Qwen3-235B-A22B-Thinking-2507` | 256000 | 8192 | true | text |
93
+
94
+ ## Notes
95
+
96
+ - Model refs use `synthetic/<modelId>`.
97
+ - If you enable a model allowlist (`agents.defaults.models`), add every model you
98
+ plan to use.
99
+ - See [Model providers](/concepts/model-providers) for provider rules.