@maincode-ai/matilda-code 0.21.12 → 0.21.13-nightly.20261027.e00306cd3

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 (269) hide show
  1. package/chunks/agent-H5JE3RJQ.js +3 -0
  2. package/chunks/agent-headless-H2JZZ7UV.js +3 -0
  3. package/chunks/{askUserQuestion-2QI4NSFJ.js → askUserQuestion-L3WDL2T4.js} +3 -3
  4. package/chunks/ca-UBWUTZVZ.js +25 -0
  5. package/chunks/chunk-4CVGYUEL.js +3 -0
  6. package/chunks/{chunk-RNKDFE2S.js → chunk-5B2QERWR.js} +1 -1
  7. package/chunks/chunk-62GTGPTP.js +8 -0
  8. package/chunks/chunk-6365AZBW.js +56 -0
  9. package/chunks/chunk-6PFK4XTH.js +207 -0
  10. package/chunks/chunk-7ZODGQO6.js +4 -0
  11. package/chunks/chunk-DB5LMKXU.js +31 -0
  12. package/chunks/chunk-EYZPVR7N.js +13 -0
  13. package/chunks/chunk-FKHUEFMK.js +8 -0
  14. package/chunks/{chunk-6T2GIM76.js → chunk-GILXFDEG.js} +1 -1
  15. package/chunks/{chunk-VTGICC67.js → chunk-GKEUZTOB.js} +1 -1
  16. package/chunks/chunk-GSRXW64P.js +120 -0
  17. package/chunks/chunk-GT6MSEK4.js +3 -0
  18. package/chunks/chunk-HEJO7OBH.js +3 -0
  19. package/chunks/chunk-HPO2YWG4.js +78 -0
  20. package/chunks/chunk-I3CV4LOD.js +8 -0
  21. package/chunks/{chunk-DOOFGSRV.js → chunk-J3AMKDX6.js} +1 -1
  22. package/chunks/chunk-JU7QTSKS.js +14 -0
  23. package/chunks/chunk-LBQNFSZ2.js +9 -0
  24. package/chunks/chunk-LOB42ODE.js +9 -0
  25. package/chunks/chunk-LVDDFAK4.js +89 -0
  26. package/chunks/{chunk-27Q5KW3A.js → chunk-NK2QMGCC.js} +13 -13
  27. package/chunks/{chunk-YRQP3SLC.js → chunk-O7VPFJ3R.js} +1 -1
  28. package/chunks/chunk-OBE5S4GG.js +9 -0
  29. package/chunks/{chunk-CZGZ3KK7.js → chunk-ONANBLIE.js} +1 -1
  30. package/chunks/chunk-QXSBPCBA.js +8 -0
  31. package/chunks/chunk-TUKNB5CQ.js +33 -0
  32. package/chunks/chunk-UM6CLO7D.js +7 -0
  33. package/chunks/chunk-V4D3LER3.js +2615 -0
  34. package/chunks/{chunk-HYVP4472.js → chunk-V6UPUMP3.js} +1 -1
  35. package/chunks/chunk-VUJRLLGL.js +8 -0
  36. package/chunks/{chunk-MCQUPLRE.js → chunk-WTU6GSZH.js} +1 -1
  37. package/chunks/chunk-XBTBZHRC.js +8 -0
  38. package/chunks/{chunk-WV3IUPZS.js → chunk-YTB3OFTT.js} +1 -1
  39. package/chunks/chunk-ZQKABJBB.js +8 -0
  40. package/chunks/chunk-ZSGBDQXU.js +11 -0
  41. package/chunks/{computer-use-WKDNUTLD.js → computer-use-N6KGNST6.js} +1 -1
  42. package/chunks/{cron-create-F2LXM2OA.js → cron-create-4XBY5RVI.js} +1 -1
  43. package/chunks/cron-delete-BH4VP3LX.js +3 -0
  44. package/chunks/cron-list-XXRFKNGM.js +5 -0
  45. package/chunks/de-LEEHWWJ2.js +25 -0
  46. package/chunks/{devtools-5JRKK3E7.js → devtools-7YNCRYZV.js} +1 -1
  47. package/chunks/{chunk-OOEH6ZSV.js → dist-UWUWLWTO.js} +2 -2
  48. package/chunks/{edit-QQNJZ55P.js → edit-6ULTLTJQ.js} +1 -1
  49. package/chunks/{en-EJLDYIBM.js → en-LNOIHFSQ.js} +4 -4
  50. package/chunks/{enter-worktree-5X5SAMBJ.js → enter-worktree-V2VANZYJ.js} +1 -1
  51. package/chunks/enterPlanMode-75H54S3Z.js +18 -0
  52. package/chunks/{exit-worktree-SRKZBEYF.js → exit-worktree-KPB32K6P.js} +1 -1
  53. package/chunks/{exitPlanMode-WSPTGGVN.js → exitPlanMode-K7JRP22Y.js} +2 -2
  54. package/chunks/fr-4TA2AIU6.js +25 -0
  55. package/chunks/{getMachineId-bsd-ZYBNK2JG.js → getMachineId-bsd-ETKQTB6C.js} +1 -1
  56. package/chunks/{getMachineId-darwin-CM2MQGUI.js → getMachineId-darwin-AKNRWOWB.js} +1 -1
  57. package/chunks/{getMachineId-linux-SYE2KMCW.js → getMachineId-linux-2QSD7FTP.js} +1 -1
  58. package/chunks/{getMachineId-unsupported-6IHVG2XO.js → getMachineId-unsupported-UXSV7I24.js} +1 -1
  59. package/chunks/{getMachineId-win-S3J3JSUM.js → getMachineId-win-4MTFXGP3.js} +1 -1
  60. package/chunks/glob-ACAIHWST.js +22 -0
  61. package/chunks/{goal-tools-C6BSBHCF.js → goal-tools-VPFXBI6M.js} +3 -3
  62. package/chunks/{grep-MVCOBUYW.js → grep-R4K75RXS.js} +1 -1
  63. package/chunks/{ja-GGNJR7AR.js → ja-VXDMQKRW.js} +5 -5
  64. package/chunks/keychain-token-storage-7VYNARRB.js +3 -0
  65. package/chunks/ls-4ZEICYPK.js +15 -0
  66. package/chunks/{lsp-DYDK6XCS.js → lsp-4US2RIIV.js} +1 -1
  67. package/chunks/mcp-client-ZKQFYCFN.js +3 -0
  68. package/chunks/monitor-KSNFIY54.js +32 -0
  69. package/chunks/{multipart-parser-JI75T2O5.js → multipart-parser-FKHYAVGR.js} +1 -1
  70. package/chunks/notebook-edit-655ZNV6Q.js +17 -0
  71. package/chunks/openaiContentGenerator-BG3OM453.js +52 -0
  72. package/chunks/pt-WEIMCOKI.js +25 -0
  73. package/chunks/read-file-4VSUKSRB.js +3 -0
  74. package/chunks/ripGrep-PNALN2GG.js +3 -0
  75. package/chunks/ru-WFLK34ZL.js +25 -0
  76. package/chunks/scheduler-AVYCIBEK.js +8 -0
  77. package/chunks/send-message-ND2SRKX5.js +8 -0
  78. package/chunks/shell-GUHQNOMZ.js +3 -0
  79. package/chunks/{skill-HZPFEAPF.js → skill-AB2X2DTC.js} +1 -1
  80. package/chunks/src-LZEU4AYF.js +5 -0
  81. package/chunks/symbol-search-VICSUEZH.js +19 -0
  82. package/chunks/{syntheticOutput-432LXITX.js → syntheticOutput-Z7DQKMRI.js} +1 -1
  83. package/chunks/task-create-BQ73FRTH.js +3 -0
  84. package/chunks/{task-detach-XMSJ3HBM.js → task-detach-JCHSLUOR.js} +1 -1
  85. package/chunks/task-list-6ESRFO5F.js +9 -0
  86. package/chunks/{task-stop-NTS62FLG.js → task-stop-74H2CPAJ.js} +1 -1
  87. package/chunks/{task-update-AR26UFYZ.js → task-update-R3BN6KPQ.js} +1 -1
  88. package/chunks/{team-create-PYXFVIR5.js → team-create-UTKRPUPZ.js} +3 -3
  89. package/chunks/team-delete-PCCGTLGL.js +8 -0
  90. package/chunks/todoWrite-BZI75DFV.js +3 -0
  91. package/chunks/{tool-search-RKZDSRYS.js → tool-search-FJ5MAPQ6.js} +1 -1
  92. package/chunks/{web-fetch-VW3SVDQ6.js → web-fetch-DEUGZQZS.js} +17 -17
  93. package/chunks/{web-search-XQUIZARL.js → web-search-PUUIEFJO.js} +3 -3
  94. package/chunks/{workflow-YXNXDRWZ.js → workflow-CBADL3IM.js} +2 -2
  95. package/chunks/write-file-QGCL2AJL.js +15 -0
  96. package/cli.js +644 -679
  97. package/examples/starter/README.md +0 -3
  98. package/locales/ca.js +1 -37
  99. package/locales/de.js +1 -42
  100. package/locales/en.js +1 -43
  101. package/locales/fr.js +1 -39
  102. package/locales/ja.js +1 -42
  103. package/locales/pt.js +1 -42
  104. package/locales/ru.js +1 -42
  105. package/package.json +2 -2
  106. package/sandbox-macos-permissive-closed.sb +0 -1
  107. package/sandbox-macos-permissive-open.sb +0 -1
  108. package/sandbox-macos-permissive-proxied.sb +1 -2
  109. package/sandbox-macos-restrictive-closed.sb +14 -2
  110. package/sandbox-macos-restrictive-open.sb +14 -2
  111. package/sandbox-macos-restrictive-proxied.sb +15 -3
  112. package/bundled/mainy/SKILL.md +0 -157
  113. package/bundled/mainy/docs/_meta.ts +0 -32
  114. package/bundled/mainy/docs/common-workflow.md +0 -571
  115. package/bundled/mainy/docs/configuration/_meta.ts +0 -7
  116. package/bundled/mainy/docs/configuration/auth.md +0 -82
  117. package/bundled/mainy/docs/configuration/matilda-ignore.md +0 -55
  118. package/bundled/mainy/docs/configuration/model-providers.md +0 -598
  119. package/bundled/mainy/docs/configuration/settings.md +0 -790
  120. package/bundled/mainy/docs/configuration/themes.md +0 -199
  121. package/bundled/mainy/docs/configuration/trusted-folders.md +0 -67
  122. package/bundled/mainy/docs/extension/_meta.ts +0 -9
  123. package/bundled/mainy/docs/extension/extension-releasing.md +0 -204
  124. package/bundled/mainy/docs/extension/getting-started-extensions.md +0 -299
  125. package/bundled/mainy/docs/extension/introduction.md +0 -338
  126. package/bundled/mainy/docs/features/_meta.ts +0 -27
  127. package/bundled/mainy/docs/features/approval-mode.md +0 -388
  128. package/bundled/mainy/docs/features/arena.md +0 -219
  129. package/bundled/mainy/docs/features/auto-mode.md +0 -308
  130. package/bundled/mainy/docs/features/channels/_meta.ts +0 -8
  131. package/bundled/mainy/docs/features/channels/dingtalk.md +0 -134
  132. package/bundled/mainy/docs/features/channels/feishu.md +0 -186
  133. package/bundled/mainy/docs/features/channels/overview.md +0 -336
  134. package/bundled/mainy/docs/features/channels/plugins.md +0 -87
  135. package/bundled/mainy/docs/features/channels/telegram.md +0 -120
  136. package/bundled/mainy/docs/features/channels/weixin.md +0 -106
  137. package/bundled/mainy/docs/features/code-review.md +0 -291
  138. package/bundled/mainy/docs/features/commands.md +0 -528
  139. package/bundled/mainy/docs/features/dual-output.md +0 -627
  140. package/bundled/mainy/docs/features/followup-suggestions.md +0 -109
  141. package/bundled/mainy/docs/features/headless.md +0 -448
  142. package/bundled/mainy/docs/features/hooks.md +0 -1306
  143. package/bundled/mainy/docs/features/language.md +0 -171
  144. package/bundled/mainy/docs/features/lsp.md +0 -496
  145. package/bundled/mainy/docs/features/markdown-rendering.md +0 -183
  146. package/bundled/mainy/docs/features/mcp.md +0 -423
  147. package/bundled/mainy/docs/features/memory.md +0 -185
  148. package/bundled/mainy/docs/features/sandbox.md +0 -249
  149. package/bundled/mainy/docs/features/scheduled-tasks.md +0 -139
  150. package/bundled/mainy/docs/features/skills.md +0 -347
  151. package/bundled/mainy/docs/features/status-line.md +0 -397
  152. package/bundled/mainy/docs/features/structured-output.md +0 -309
  153. package/bundled/mainy/docs/features/sub-agents.md +0 -737
  154. package/bundled/mainy/docs/features/tips.md +0 -54
  155. package/bundled/mainy/docs/features/token-caching.md +0 -29
  156. package/bundled/mainy/docs/features/tool-use-summaries.md +0 -178
  157. package/bundled/mainy/docs/features/worktree.md +0 -345
  158. package/bundled/mainy/docs/ide-integration/_meta.ts +0 -4
  159. package/bundled/mainy/docs/ide-integration/ide-companion-spec.md +0 -182
  160. package/bundled/mainy/docs/ide-integration/ide-integration.md +0 -144
  161. package/bundled/mainy/docs/integration-github-action.md +0 -241
  162. package/bundled/mainy/docs/integration-jetbrains.md +0 -81
  163. package/bundled/mainy/docs/integration-vscode.md +0 -39
  164. package/bundled/mainy/docs/integration-zed.md +0 -72
  165. package/bundled/mainy/docs/matilda-serve-deploy-local.md +0 -221
  166. package/bundled/mainy/docs/matilda-serve.md +0 -661
  167. package/bundled/mainy/docs/overview.md +0 -64
  168. package/bundled/mainy/docs/quickstart.md +0 -234
  169. package/bundled/mainy/docs/reference/_meta.ts +0 -3
  170. package/bundled/mainy/docs/reference/keyboard-shortcuts.md +0 -91
  171. package/bundled/mainy/docs/support/Uninstall.md +0 -65
  172. package/bundled/mainy/docs/support/_meta.ts +0 -6
  173. package/bundled/mainy/docs/support/tos-privacy.md +0 -94
  174. package/bundled/mainy/docs/support/troubleshooting.md +0 -127
  175. package/chunks/agent-WM63A6NK.js +0 -3
  176. package/chunks/agent-headless-QIUBDKPW.js +0 -3
  177. package/chunks/anthropicContentGenerator-VKFTAIU3.js +0 -39
  178. package/chunks/ca-I2HEEIL7.js +0 -25
  179. package/chunks/chunk-2HTPVSGT.js +0 -3
  180. package/chunks/chunk-2MOGYHWM.js +0 -8
  181. package/chunks/chunk-3IRGBRSP.js +0 -113
  182. package/chunks/chunk-3YLXGE6T.js +0 -8
  183. package/chunks/chunk-47XR7IMP.js +0 -8
  184. package/chunks/chunk-4F4DA5UI.js +0 -8
  185. package/chunks/chunk-4J6DC24J.js +0 -59
  186. package/chunks/chunk-4Q2SNBUH.js +0 -18
  187. package/chunks/chunk-5C2RJ5RR.js +0 -37
  188. package/chunks/chunk-6E766NPX.js +0 -31
  189. package/chunks/chunk-6EQMZNIY.js +0 -8
  190. package/chunks/chunk-6GBNB5Z2.js +0 -3
  191. package/chunks/chunk-6Z2MV7ZY.js +0 -186
  192. package/chunks/chunk-BVOCFLC4.js +0 -56
  193. package/chunks/chunk-CSJTA7NE.js +0 -101
  194. package/chunks/chunk-DC7LAFZZ.js +0 -8
  195. package/chunks/chunk-DE3HKC2W.js +0 -9
  196. package/chunks/chunk-EQGA7LH7.js +0 -30
  197. package/chunks/chunk-FPO57O66.js +0 -39
  198. package/chunks/chunk-FWDMPRKU.js +0 -3
  199. package/chunks/chunk-G7R2XEEF.js +0 -7
  200. package/chunks/chunk-GOJCMVJJ.js +0 -8
  201. package/chunks/chunk-GTVCJCHR.js +0 -8
  202. package/chunks/chunk-JCE3JAVC.js +0 -25
  203. package/chunks/chunk-JRECUFB3.js +0 -2630
  204. package/chunks/chunk-KHHJYBR5.js +0 -9
  205. package/chunks/chunk-LJR4RZZ2.js +0 -3
  206. package/chunks/chunk-LUNDTQ3G.js +0 -8
  207. package/chunks/chunk-M53RP3YP.js +0 -31
  208. package/chunks/chunk-MO2HXJG5.js +0 -9
  209. package/chunks/chunk-MTMU7JYZ.js +0 -11
  210. package/chunks/chunk-O44XK65C.js +0 -8
  211. package/chunks/chunk-OA56BXPD.js +0 -3
  212. package/chunks/chunk-PA6532AY.js +0 -6
  213. package/chunks/chunk-PGXQZVLX.js +0 -8
  214. package/chunks/chunk-QKYGQLWC.js +0 -8
  215. package/chunks/chunk-QN6Y6NPA.js +0 -3
  216. package/chunks/chunk-QVCGLQCI.js +0 -32
  217. package/chunks/chunk-S3CWEVTS.js +0 -15
  218. package/chunks/chunk-SDTWBD62.js +0 -8
  219. package/chunks/chunk-T2T2UEPY.js +0 -4
  220. package/chunks/chunk-TISQNFB5.js +0 -3
  221. package/chunks/chunk-U347OO7S.js +0 -9
  222. package/chunks/chunk-UIRBHC5X.js +0 -3
  223. package/chunks/chunk-VI74YQQO.js +0 -8
  224. package/chunks/chunk-VYZOOSMP.js +0 -30
  225. package/chunks/chunk-WC2VTVCE.js +0 -27
  226. package/chunks/chunk-WVY2P6WH.js +0 -26
  227. package/chunks/chunk-WZ75OGYY.js +0 -14
  228. package/chunks/chunk-XMZIY7XX.js +0 -13
  229. package/chunks/chunk-YJAKOETP.js +0 -22
  230. package/chunks/chunk-YV3PUOBU.js +0 -65
  231. package/chunks/contextCommand-DAB3HOHY.js +0 -3
  232. package/chunks/cron-delete-DE6Q2S2L.js +0 -3
  233. package/chunks/cron-list-IAQEJVV7.js +0 -5
  234. package/chunks/de-AQXFJYZI.js +0 -25
  235. package/chunks/dist-7UYRLSLE.js +0 -3
  236. package/chunks/dist-ME6647DQ.js +0 -195
  237. package/chunks/dist-P6SLWL5V.js +0 -42
  238. package/chunks/dist-VG3ZDJ2A.js +0 -28
  239. package/chunks/dist-YTCHM57U.js +0 -23
  240. package/chunks/enterPlanMode-HP35SPLN.js +0 -18
  241. package/chunks/fileFromPath-7UCWPD4W.js +0 -3
  242. package/chunks/fr-6TDHK7F2.js +0 -25
  243. package/chunks/geminiContentGenerator-RJ73DQAP.js +0 -8
  244. package/chunks/glob-QQ6LGKDX.js +0 -22
  245. package/chunks/keychain-token-storage-KQK6MNOJ.js +0 -3
  246. package/chunks/ls-JYJXFSXN.js +0 -15
  247. package/chunks/matildaAgentContentGenerator-YUYS4336.js +0 -8
  248. package/chunks/matildaContentGenerator-O4Z2QPCP.js +0 -8
  249. package/chunks/matildaOAuth2-7COTQQR2.js +0 -3
  250. package/chunks/mcp-client-RXVQU5VI.js +0 -3
  251. package/chunks/monitor-77KXDXPR.js +0 -32
  252. package/chunks/notebook-edit-TKJD2EQZ.js +0 -17
  253. package/chunks/openaiContentGenerator-2EALAM3U.js +0 -3
  254. package/chunks/pt-D6L2QTDM.js +0 -25
  255. package/chunks/read-file-3KUAH6ND.js +0 -3
  256. package/chunks/ripGrep-U2PLKXMY.js +0 -3
  257. package/chunks/ru-BNJCHDYO.js +0 -25
  258. package/chunks/scheduler-J7VU2V5Y.js +0 -8
  259. package/chunks/send-message-P3SMWNEE.js +0 -8
  260. package/chunks/serve-FXH6EBQ6.js +0 -1015
  261. package/chunks/shell-PXR2AXDD.js +0 -3
  262. package/chunks/src-RFAEPLY7.js +0 -3
  263. package/chunks/src-WZTRMETQ.js +0 -5
  264. package/chunks/symbol-search-EAIZPWN7.js +0 -19
  265. package/chunks/task-create-Z3QRCMX4.js +0 -3
  266. package/chunks/task-list-GXAJW3JP.js +0 -9
  267. package/chunks/team-delete-OMYVUAQU.js +0 -8
  268. package/chunks/todoWrite-5NZ7CHTC.js +0 -3
  269. package/chunks/write-file-XDDLTGSG.js +0 -15
@@ -1,598 +0,0 @@
1
- # Model Providers
2
-
3
- Matilda Code allows you to configure multiple model providers through the `modelProviders` setting in your `settings.json`. This enables you to switch between different AI models and providers using the `/model` command.
4
-
5
- ## Overview
6
-
7
- Use `modelProviders` to declare curated model lists per auth type that the `/model` picker can switch between. Keys must be valid auth types (`openai`, `anthropic`, `gemini`, etc.). Each entry requires an `id` and **must include `envKey`**, with optional `name`, `description`, `baseUrl`, and `generationConfig`. Credentials are never persisted in settings; the runtime reads them from `process.env[envKey]`. Matilda OAuth models remain hard-coded and cannot be overridden.
8
-
9
- > [!note]
10
-
11
- > [!note]
12
- >
13
- > **Model uniqueness:** Models within the same `authType` are uniquely identified by the combination of `id` + `baseUrl`. This means you can define the same model ID (e.g., `"gpt-4o"`) multiple times under a single `authType` as long as each entry has a different `baseUrl` — for example, one pointing to OpenAI directly and another to a proxy endpoint. If two entries share both the same `id` and the same `baseUrl` (or both omit `baseUrl`), the first occurrence wins and subsequent duplicates are skipped with a warning.
14
-
15
- ## Configuration Examples by Auth Type
16
-
17
- Below are comprehensive configuration examples for different authentication types, showing the available parameters and their combinations.
18
-
19
- ### Supported Auth Types
20
-
21
- The `modelProviders` object keys must be valid `authType` values. Currently supported auth types are:
22
-
23
- | Auth Type | Description |
24
- | --------------- | --------------------------------------------------------------------------------------- |
25
- | `openai` | OpenAI-compatible APIs (OpenAI, Azure OpenAI, local inference servers like vLLM/Ollama) |
26
- | `anthropic` | Anthropic Claude API |
27
- | `gemini` | Google Gemini API |
28
- | `matilda-oauth` | Matilda OAuth (hard-coded, cannot be overridden in `modelProviders`) |
29
-
30
- > [!warning]
31
- > If an invalid auth type key is used (e.g., a typo like `"openai-custom"`), the configuration will be **silently skipped** and the models will not appear in the `/model` picker. Always use one of the supported auth type values listed above.
32
-
33
- ### SDKs Used for API Requests
34
-
35
- Matilda Code uses the following official SDKs to send requests to each provider:
36
-
37
- | Auth Type | SDK Package |
38
- | --------------- | ----------------------------------------------------------------------------------------------------- |
39
- | `openai` | [`openai`](https://www.npmjs.com/package/openai) - Official OpenAI Node.js SDK |
40
- | `anthropic` | [`@anthropic-ai/sdk`](https://www.npmjs.com/package/@anthropic-ai/sdk) - Official Anthropic SDK |
41
- | `gemini` | [`@google/genai`](https://www.npmjs.com/package/@google/genai) - Official Google GenAI SDK |
42
- | `matilda-oauth` | [`openai`](https://www.npmjs.com/package/openai) with custom provider (Matilda-compatible-compatible) |
43
-
44
- This means the `baseUrl` you configure should be compatible with the corresponding SDK's expected API format. For example, when using `openai` auth type, the endpoint must accept OpenAI API format requests.
45
-
46
- ### OpenAI-compatible providers (`openai`)
47
-
48
- This auth type supports not only OpenAI's official API but also any OpenAI-compatible endpoint, including aggregated model providers like OpenRouter.
49
-
50
- ```json
51
- {
52
- "env": {
53
- "OPENAI_API_KEY": "sk-your-actual-openai-key-here",
54
- "OPENROUTER_API_KEY": "sk-or-your-actual-openrouter-key-here"
55
- },
56
- "modelProviders": {
57
- "openai": [
58
- {
59
- "id": "gpt-4o",
60
- "name": "GPT-4o",
61
- "envKey": "OPENAI_API_KEY",
62
- "baseUrl": "https://api.openai.com/v1",
63
- "generationConfig": {
64
- "timeout": 60000,
65
- "maxRetries": 3,
66
- "enableCacheControl": true,
67
- "contextWindowSize": 128000,
68
- "modalities": {
69
- "image": true
70
- },
71
- "customHeaders": {
72
- "X-Client-Request-ID": "req-123"
73
- },
74
- "extra_body": {
75
- "enable_thinking": true,
76
- "service_tier": "priority"
77
- },
78
- "samplingParams": {
79
- "temperature": 0.2,
80
- "top_p": 0.8,
81
- "max_tokens": 4096,
82
- "presence_penalty": 0.1,
83
- "frequency_penalty": 0.1
84
- }
85
- }
86
- },
87
- {
88
- "id": "gpt-4o-mini",
89
- "name": "GPT-4o Mini",
90
- "envKey": "OPENAI_API_KEY",
91
- "baseUrl": "https://api.openai.com/v1",
92
- "generationConfig": {
93
- "timeout": 30000,
94
- "samplingParams": {
95
- "temperature": 0.5,
96
- "max_tokens": 2048
97
- }
98
- }
99
- },
100
- {
101
- "id": "openai/gpt-4o",
102
- "name": "GPT-4o (via OpenRouter)",
103
- "envKey": "OPENROUTER_API_KEY",
104
- "baseUrl": "https://openrouter.ai/api/v1",
105
- "generationConfig": {
106
- "timeout": 120000,
107
- "maxRetries": 3,
108
- "samplingParams": {
109
- "temperature": 0.7
110
- }
111
- }
112
- }
113
- ]
114
- }
115
- }
116
- ```
117
-
118
- ### Anthropic (`anthropic`)
119
-
120
- ```json
121
- {
122
- "env": {
123
- "ANTHROPIC_API_KEY": "sk-ant-your-actual-anthropic-key-here"
124
- },
125
- "modelProviders": {
126
- "anthropic": [
127
- {
128
- "id": "claude-3-5-sonnet",
129
- "name": "Claude 3.5 Sonnet",
130
- "envKey": "ANTHROPIC_API_KEY",
131
- "baseUrl": "https://api.anthropic.com/v1",
132
- "generationConfig": {
133
- "timeout": 120000,
134
- "maxRetries": 3,
135
- "contextWindowSize": 200000,
136
- "samplingParams": {
137
- "temperature": 0.7,
138
- "max_tokens": 8192,
139
- "top_p": 0.9
140
- }
141
- }
142
- },
143
- {
144
- "id": "claude-3-opus",
145
- "name": "Claude 3 Opus",
146
- "envKey": "ANTHROPIC_API_KEY",
147
- "baseUrl": "https://api.anthropic.com/v1",
148
- "generationConfig": {
149
- "timeout": 180000,
150
- "samplingParams": {
151
- "temperature": 0.3,
152
- "max_tokens": 4096
153
- }
154
- }
155
- }
156
- ]
157
- }
158
- }
159
- ```
160
-
161
- ### Google Gemini (`gemini`)
162
-
163
- ```json
164
- {
165
- "env": {
166
- "GEMINI_API_KEY": "AIza-your-actual-gemini-key-here"
167
- },
168
- "modelProviders": {
169
- "gemini": [
170
- {
171
- "id": "gemini-2.0-flash",
172
- "name": "Gemini 2.0 Flash",
173
- "envKey": "GEMINI_API_KEY",
174
- "baseUrl": "https://generativelanguage.googleapis.com",
175
- "capabilities": {
176
- "vision": true
177
- },
178
- "generationConfig": {
179
- "timeout": 60000,
180
- "maxRetries": 2,
181
- "contextWindowSize": 1000000,
182
- "schemaCompliance": "auto",
183
- "samplingParams": {
184
- "temperature": 0.4,
185
- "top_p": 0.95,
186
- "max_tokens": 8192,
187
- "top_k": 40
188
- }
189
- }
190
- }
191
- ]
192
- }
193
- }
194
- ```
195
-
196
- ### Local Self-Hosted Models (via OpenAI-compatible API)
197
-
198
- Most local inference servers (vLLM, Ollama, LM Studio, etc.) provide an OpenAI-compatible API endpoint. Configure them using the `openai` auth type with a local `baseUrl`:
199
-
200
- ```json
201
- {
202
- "env": {
203
- "OLLAMA_API_KEY": "ollama",
204
- "VLLM_API_KEY": "not-needed",
205
- "LMSTUDIO_API_KEY": "lm-studio"
206
- },
207
- "modelProviders": {
208
- "openai": [
209
- {
210
- "id": "matilda2.5-7b",
211
- "name": "Matilda2.5 7B (Ollama)",
212
- "envKey": "OLLAMA_API_KEY",
213
- "baseUrl": "http://localhost:11434/v1",
214
- "generationConfig": {
215
- "timeout": 300000,
216
- "maxRetries": 1,
217
- "contextWindowSize": 32768,
218
- "samplingParams": {
219
- "temperature": 0.7,
220
- "top_p": 0.9,
221
- "max_tokens": 4096
222
- }
223
- }
224
- },
225
- {
226
- "id": "llama-3.1-8b",
227
- "name": "Llama 3.1 8B (vLLM)",
228
- "envKey": "VLLM_API_KEY",
229
- "baseUrl": "http://localhost:8000/v1",
230
- "generationConfig": {
231
- "timeout": 120000,
232
- "maxRetries": 2,
233
- "contextWindowSize": 128000,
234
- "samplingParams": {
235
- "temperature": 0.6,
236
- "max_tokens": 8192
237
- }
238
- }
239
- },
240
- {
241
- "id": "local-model",
242
- "name": "Local Model (LM Studio)",
243
- "envKey": "LMSTUDIO_API_KEY",
244
- "baseUrl": "http://localhost:1234/v1",
245
- "generationConfig": {
246
- "timeout": 60000,
247
- "samplingParams": {
248
- "temperature": 0.5
249
- }
250
- }
251
- }
252
- ]
253
- }
254
- }
255
- ```
256
-
257
- For local servers that don't require authentication, you can use any placeholder value for the API key:
258
-
259
- ```bash
260
- # For Ollama (no auth required)
261
- export OLLAMA_API_KEY="ollama"
262
-
263
- # For vLLM (if no auth is configured)
264
- export VLLM_API_KEY="not-needed"
265
- ```
266
-
267
- > [!note]
268
- >
269
- > The `extra_body` parameter is **only supported for OpenAI-compatible providers** (`openai`, `matilda-oauth`). It is ignored for Anthropic, and Gemini providers.
270
-
271
- > [!note]
272
- >
273
- > **About `envKey`**: The `envKey` field specifies the **name of an environment variable**, not the actual API key value. For the configuration to work, you need to ensure the corresponding environment variable is set with your real API key. There are two ways to do this:
274
- >
275
- > - **Option 1: Using a `.env` file** (recommended for security):
276
- > ```bash
277
- > # ~/.matilda/.env (or project root)
278
- > OPENAI_API_KEY=sk-your-actual-key-here
279
- > ```
280
- > Be sure to add `.env` to your `.gitignore` to prevent accidentally committing secrets.
281
- > - **Option 2: Using the `env` field in `settings.json`** (as shown in the examples above):
282
- > ```json
283
- > {
284
- > "env": {
285
- > "OPENAI_API_KEY": "sk-your-actual-key-here"
286
- > }
287
- > }
288
- > ```
289
- >
290
- > Each provider example includes an `env` field to illustrate how the API key should be configured.
291
-
292
- ### Overview
293
-
294
- | Model ID | Name | Description |
295
- | ------------------------- | ----------------------- | --------------------------------------------------------- |
296
- | `matilda3.5-plus` | matilda3.5-plus | Advanced model with thinking enabled |
297
- | `matilda3.6-plus` | matilda3.6-plus | Latest model with thinking enabled (Pro subscribers only) |
298
- | `matilda3.7-plus` | matilda3.7-plus | Advanced model with thinking enabled |
299
- | `matilda3-coder-plus` | matilda3-coder-plus | Optimized for coding tasks |
300
- | `matilda3-coder-next` | matilda3-coder-next | Experimental coding model |
301
- | `matilda3-max-2026-01-23` | matilda3-max-2026-01-23 | Latest max model with thinking enabled |
302
- | `glm-5` | glm-5 | GLM model with thinking enabled |
303
- | `glm-4.7` | glm-4.7 | GLM model with thinking enabled |
304
- | `kimi-k2.5` | kimi-k2.5 | Kimi model with thinking and vision/video support |
305
- | `MiniMax-M2.5` | MiniMax-M2.5 | MiniMax model with thinking enabled |
306
-
307
- ### Setup
308
-
309
- 2. Run the `/auth` command in Matilda Code
310
- 3. Select your region
311
- 4. Enter your API key when prompted
312
-
313
- The models will be automatically configured and added to your `/model` picker.
314
-
315
- ### Regions
316
-
317
- | Region | Endpoint | Description |
318
- | ------ | -------- | ----------- |
319
-
320
- The region is selected during authentication and stored in `settings.json` under the `modelProviders` configuration. To switch regions, re-run the `/auth` command and select a different region.
321
-
322
- ### API Key Storage
323
-
324
- > [!warning]
325
- >
326
- > **Security Recommendation**: For better security, it is recommended to move the API key from `settings.json` to a separate `.env` file and load it as an environment variable. For example:
327
- >
328
- > ```bash
329
- > # ~/.matilda/.env
330
- > ```
331
- >
332
- > Then ensure this file is added to your `.gitignore` if you're using project-level settings.
333
-
334
- ### Automatic Updates
335
-
336
- Coding Plan model configurations are versioned. When Matilda Code detects a newer version of the model template, you will be prompted to update. Accepting the update will:
337
-
338
- - Replace the existing Coding Plan model configurations with the latest versions
339
- - Preserve any custom model configurations you've added manually
340
- - Automatically switch to the first model in the updated configuration
341
-
342
- The update process ensures you always have access to the latest model configurations and features without manual intervention.
343
-
344
- ### Manual Configuration (Advanced)
345
-
346
- If you prefer to manually configure Coding Plan models, you can add them to your `settings.json` like any OpenAI-compatible provider:
347
-
348
- ```json
349
- {
350
- "modelProviders": {
351
- "openai": [
352
- {
353
- "id": "matilda3-coder-plus",
354
- "name": "matilda3-coder-plus",
355
- "envKey": "YOUR_CUSTOM_ENV_KEY"
356
- }
357
- ]
358
- }
359
- }
360
- ```
361
-
362
- > [!note]
363
- >
364
- > When using manual configuration:
365
- >
366
- > - You can use any environment variable name for `envKey`
367
- > - You do not need to configure `codingPlan.*`
368
- > - **Automatic updates will not apply** to manually configured Coding Plan models
369
-
370
- > [!warning]
371
- >
372
- > If you also use automatic Coding Plan configuration, automatic updates may overwrite your manual configurations if they use the same `envKey` and `baseUrl` as the automatic configuration. To avoid this, ensure your manual configuration uses a different `envKey` if possible.
373
-
374
- ## Resolution Layers and Atomicity
375
-
376
- The effective auth/model/credential values are chosen per field using the following precedence (first present wins). You can combine `--auth-type` with `--model` to point directly at a provider entry; these CLI flags run before other layers.
377
-
378
- | Layer (highest → lowest) | authType | model | apiKey | baseUrl | apiKeyEnvKey | proxy |
379
- | -------------------------- | -------------------------------------- | ------------------------------------------------- | --------------------------------------------------- | ---------------------------------------------------- | ---------------------- | --------------------------------- |
380
- | Programmatic overrides | `/auth` | `/auth` input | `/auth` input | `/auth` input | — | — |
381
- | Model provider selection | — | `modelProvider.id` | `env[modelProvider.envKey]` | `modelProvider.baseUrl` | `modelProvider.envKey` | — |
382
- | CLI arguments | `--auth-type` | `--model` | `--openaiApiKey` (or provider-specific equivalents) | `--openaiBaseUrl` (or provider-specific equivalents) | — | — |
383
- | Environment variables | — | Provider-specific mapping (e.g. `OPENAI_MODEL`) | Provider-specific mapping (e.g. `OPENAI_API_KEY`) | Provider-specific mapping (e.g. `OPENAI_BASE_URL`) | — | — |
384
- | Settings (`settings.json`) | `security.auth.selectedType` | `model.name` | `security.auth.apiKey` | `security.auth.baseUrl` | — | — |
385
- | Default / computed | Falls back to `AuthType.MATILDA_OAUTH` | Built-in default (OpenAI ⇒ `matilda3-coder-plus`) | — | — | — | `Config.getProxy()` if configured |
386
-
387
- \*When present, CLI auth flags override settings. Otherwise, `security.auth.selectedType` or the implicit default determine the auth type. Matilda OAuth and OpenAI are the only auth types surfaced without extra configuration.
388
-
389
- > [!warning]
390
- >
391
- > **Deprecation of `security.auth.apiKey` and `security.auth.baseUrl`:** Directly configuring API credentials via `security.auth.apiKey` and `security.auth.baseUrl` in `settings.json` is deprecated. These settings were used in historical versions for credentials entered through the UI, but the credential input flow was removed in version 0.10.1. These fields will be fully removed in a future release. **It is strongly recommended to migrate to `modelProviders`** for all model and credential configurations. Use `envKey` in `modelProviders` to reference environment variables for secure credential management instead of hardcoding credentials in settings files.
392
-
393
- ## Generation Config Layering: The Impermeable Provider Layer
394
-
395
- The configuration resolution follows a strict layering model with one crucial rule: **the modelProvider layer is impermeable**.
396
-
397
- ### How it works
398
-
399
- 1. **When a modelProvider model IS selected** (e.g., via `/model` command choosing a provider-configured model):
400
- - The entire `generationConfig` from the provider is applied **atomically**
401
- - **The provider layer is completely impermeable** — lower layers (CLI, env, settings) do not participate in generationConfig resolution at all
402
- - All fields defined in `modelProviders[].generationConfig` use the provider's values
403
- - All fields **not defined** by the provider are set to `undefined` (not inherited from settings)
404
- - This ensures provider configurations act as a complete, self-contained "sealed package"
405
-
406
- If a model is listed in `modelProviders`, put all model-specific
407
- generation settings for that model in the matching provider entry. Top-level
408
- `model.generationConfig` values, including `contextWindowSize`,
409
- `modalities`, `customHeaders`, and `extra_body`, are ignored for provider
410
- models. Configure those fields under
411
- `modelProviders[authType][].generationConfig` for them to apply.
412
-
413
- 2. **When NO modelProvider model is selected** (e.g., using `--model` with a raw model ID, or using CLI/env/settings directly):
414
- - The resolution falls through to lower layers
415
- - Fields are populated from CLI → env → settings → defaults
416
- - This creates a **Runtime Model** (see next section)
417
-
418
- ### Per-field precedence for `generationConfig`
419
-
420
- | Priority | Source | Behavior |
421
- | -------- | --------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
422
- | 1 | Programmatic overrides | Runtime `/model`, `/auth` changes |
423
- | 2 | `modelProviders[authType][].generationConfig` | **Impermeable layer** - completely replaces all generationConfig fields; lower layers do not participate |
424
- | 3 | `settings.model.generationConfig` | Only used for **Runtime Models** (when no provider model is selected) |
425
- | 4 | Content-generator defaults | Provider-specific defaults (e.g., OpenAI vs Gemini) - only for Runtime Models |
426
-
427
- ### Atomic field treatment
428
-
429
- The following fields are treated as atomic objects - provider values completely replace the entire object, no merging occurs:
430
-
431
- - `samplingParams` - Temperature, top_p, max_tokens, etc.
432
- - `customHeaders` - Custom HTTP headers
433
- - `extra_body` - Extra request body parameters
434
-
435
- ### Example
436
-
437
- ```json
438
- // User settings (~/.matilda/settings.json)
439
- {
440
- "model": {
441
- "generationConfig": {
442
- "timeout": 30000,
443
- "samplingParams": { "temperature": 0.5, "max_tokens": 1000 }
444
- }
445
- }
446
- }
447
-
448
- // modelProviders configuration
449
- {
450
- "modelProviders": {
451
- "openai": [{
452
- "id": "gpt-4o",
453
- "envKey": "OPENAI_API_KEY",
454
- "generationConfig": {
455
- "timeout": 60000,
456
- "samplingParams": { "temperature": 0.2 }
457
- }
458
- }]
459
- }
460
- }
461
- ```
462
-
463
- When `gpt-4o` is selected from modelProviders:
464
-
465
- - `timeout` = 60000 (from provider, overrides settings)
466
- - `samplingParams.temperature` = 0.2 (from provider, completely replaces settings object)
467
- - `samplingParams.max_tokens` = **undefined** (not defined in provider, and provider layer does not inherit from settings — fields are explicitly set to undefined if not provided)
468
-
469
- When using a raw model via `--model gpt-4` (not from modelProviders, creates a Runtime Model):
470
-
471
- - `timeout` = 30000 (from settings)
472
- - `samplingParams.temperature` = 0.5 (from settings)
473
- - `samplingParams.max_tokens` = 1000 (from settings)
474
-
475
- The merge strategy for `modelProviders` itself is REPLACE: the entire `modelProviders` from project settings will override the corresponding section in user settings, rather than merging the two.
476
-
477
- ## Reasoning / thinking configuration
478
-
479
- The optional `reasoning` field under `generationConfig` controls how aggressively the model reasons before responding. The Anthropic and Gemini converters always honor it. The OpenAI-compatible pipeline honors it **unless** `generationConfig.samplingParams` is set — see the "Interaction with `samplingParams`" caveat below.
480
-
481
- ```jsonc
482
- {
483
- "modelProviders": {
484
- "openai": [
485
- {
486
- "id": "deepseek-v4-pro",
487
- "name": "DeepSeek V4 Pro",
488
- "baseUrl": "https://api.deepseek.com/v1",
489
- "envKey": "DEEPSEEK_API_KEY",
490
- "generationConfig": {
491
- // The four-tier scale:
492
- // 'low' | 'medium' — server-mapped to 'high' on DeepSeek
493
- // 'high' — default reasoning intensity
494
- // 'max' — DeepSeek-specific extra-strong tier
495
- // Or set `false` to disable reasoning entirely.
496
- "reasoning": { "effort": "max" },
497
- },
498
- },
499
- ],
500
- },
501
- }
502
- ```
503
-
504
- ### Per-provider behavior
505
-
506
- | Protocol / provider | Wire shape | Notes |
507
- | -------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
508
- | **OpenAI / DeepSeek** (`api.deepseek.com`) | Flat `reasoning_effort: <effort>` body parameter | When `reasoning.effort` is set in the nested config shape, it's rewritten to flat `reasoning_effort` and `'low'`/`'medium'` are normalized to `'high'`, `'xhigh'` to `'max'` — mirroring DeepSeek's [server-side back-compat](https://api-docs.deepseek.com/zh-cn/api/create-chat-completion). Top-level `samplingParams.reasoning_effort` or `extra_body.reasoning_effort` overrides skip this normalization and ship verbatim. |
509
- | **OpenAI** (other compatible servers) | `reasoning: { effort, ... }` passed through verbatim | Set via `samplingParams` (e.g. `samplingParams.reasoning_effort` for GPT-5/o-series) when the provider expects a different shape. |
510
- | **Anthropic** (real `api.anthropic.com`) | `output_config: { effort }` plus the `effort-2025-11-24` beta header | Real Anthropic accepts `'low'`/`'medium'`/`'high'` only. `'max'` is **clamped to `'high'`** with a `debugLogger.warn` line (once per generator); if you want max effort, switch the baseURL to a DeepSeek-compatible endpoint that supports it. |
511
- | **Anthropic** (`api.deepseek.com/anthropic`) | Same `output_config: { effort }` + beta header | `'max'` is passed through unchanged. |
512
- | **Gemini** (`@google/genai`) | `thinkingConfig: { includeThoughts: true, thinkingLevel }` | `'low'` → `LOW`, `'high'`/`'max'` → `HIGH`, others → `THINKING_LEVEL_UNSPECIFIED` (Gemini has no `MAX` tier). |
513
-
514
- ### `reasoning: false`
515
-
516
- Setting `reasoning: false` (the literal boolean) explicitly disables thinking on every provider — useful for cheap side queries that don't benefit from reasoning. This is honored at the request level too via `request.config.thinkingConfig.includeThoughts: false` for one-off calls (e.g. suggestion generation).
517
-
518
- On a `api.deepseek.com` baseURL, the OpenAI pipeline emits the explicit `thinking: { type: 'disabled' }` field that DeepSeek V4+ requires — the server-side default is `'enabled'`, so simply omitting `reasoning_effort` would still pay thinking latency/cost. Self-hosted DeepSeek backends (sglang/vllm) and other OpenAI-compatible servers do **not** receive this field; if you need to disable thinking on those, inject `thinking: { type: 'disabled' }` (or whatever knob your inference framework exposes) via `samplingParams`/`extra_body`.
519
-
520
- ### Interaction with `samplingParams` (OpenAI-compatible only)
521
-
522
- > [!warning]
523
- >
524
- > When `generationConfig.samplingParams` is set on an OpenAI-compatible provider, the pipeline ships those keys to the wire **verbatim** and skips the separate `reasoning` injection entirely. So a config like `{ samplingParams: { temperature: 0.5 }, reasoning: { effort: 'max' } }` will silently drop the reasoning field on OpenAI/DeepSeek requests.
525
- >
526
- > If you set `samplingParams`, include the reasoning knob inside it directly — for DeepSeek that's `samplingParams.reasoning_effort`, for GPT-5/o-series it's `samplingParams.reasoning_effort` (their flat field) or `samplingParams.reasoning` (the nested object). For OpenRouter and other providers the field name varies; consult the provider docs.
527
- >
528
- > The Anthropic and Gemini converters are unaffected — they always read `reasoning.effort` directly regardless of `samplingParams`.
529
-
530
- ### `budget_tokens`
531
-
532
- You can pin an exact thinking-token budget by including `budget_tokens` alongside `effort`:
533
-
534
- ```jsonc
535
- "reasoning": { "effort": "high", "budget_tokens": 50000 }
536
- ```
537
-
538
- For Anthropic this becomes `thinking.budget_tokens`. For OpenAI/DeepSeek the field is preserved but currently ignored by the server — `reasoning_effort` is the load-bearing knob.
539
-
540
- ## Provider Models vs Runtime Models
541
-
542
- Matilda Code distinguishes between two types of model configurations:
543
-
544
- ### Provider Model
545
-
546
- - Defined in `modelProviders` configuration
547
- - Has a complete, atomic configuration package
548
- - When selected, its configuration is applied as an impermeable layer
549
- - Appears in `/model` command list with full metadata (name, description, capabilities)
550
- - Recommended for multi-model workflows and team consistency
551
-
552
- ### Runtime Model
553
-
554
- - Created dynamically when using raw model IDs via CLI (`--model`), environment variables, or settings
555
- - Not defined in `modelProviders`
556
- - Configuration is built by "projecting" through resolution layers (CLI → env → settings → defaults)
557
- - Automatically captured as a **RuntimeModelSnapshot** when a complete configuration is detected
558
- - Allows reuse without re-entering credentials
559
-
560
- ### RuntimeModelSnapshot lifecycle
561
-
562
- When you configure a model without using `modelProviders`, Matilda Code automatically creates a RuntimeModelSnapshot to preserve your configuration:
563
-
564
- ```bash
565
- # This creates a RuntimeModelSnapshot with ID: $runtime|openai|my-custom-model
566
- matilda --auth-type openai --model my-custom-model --openaiApiKey $KEY --openaiBaseUrl https://api.example.com/v1
567
- ```
568
-
569
- The snapshot:
570
-
571
- - Captures model ID, API key, base URL, and generation config
572
- - Persists across sessions (stored in memory during runtime)
573
- - Appears in the `/model` command list as a runtime option
574
- - Can be switched to using `/model $runtime|openai|my-custom-model`
575
-
576
- ### Key differences
577
-
578
- | Aspect | Provider Model | Runtime Model |
579
- | ----------------------- | --------------------------------- | ------------------------------------------ |
580
- | Configuration source | `modelProviders` in settings | CLI, env, settings layers |
581
- | Configuration atomicity | Complete, impermeable package | Layered, each field resolved independently |
582
- | Reusability | Always available in `/model` list | Captured as snapshot, appears if complete |
583
- | Team sharing | Yes (via committed settings) | No (user-local) |
584
- | Credential storage | Reference via `envKey` only | May capture actual key in snapshot |
585
-
586
- ### When to use each
587
-
588
- - **Use Provider Models** when: You have standard models shared across a team, need consistent configurations, or want to prevent accidental overrides
589
- - **Use Runtime Models** when: Quickly testing a new model, using temporary credentials, or working with ad-hoc endpoints
590
-
591
- ## Selection Persistence and Recommendations
592
-
593
- > [!important]
594
- >
595
- > Define `modelProviders` in the user-scope `~/.matilda/settings.json` whenever possible and avoid persisting credential overrides in any scope. Keeping the provider catalog in user settings prevents merge/override conflicts between project and user scopes and ensures `/auth` and `/model` updates always write back to a consistent scope.
596
-
597
- - `/model` and `/auth` persist `model.name` (where applicable) and `security.auth.selectedType` to the closest writable scope that already defines `modelProviders`; otherwise they fall back to the user scope. This keeps workspace/user files in sync with the active provider catalog.
598
- - Without `modelProviders`, the resolver mixes CLI/env/settings layers, creating Runtime Models. This is fine for single-provider setups but cumbersome when frequently switching. Define provider catalogs whenever multi-model workflows are common so that switches stay atomic, source-attributed, and debuggable.