cecli-dev 0.93.1__py3-none-any.whl

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 (366) hide show
  1. cecli/__init__.py +20 -0
  2. cecli/__main__.py +4 -0
  3. cecli/_version.py +34 -0
  4. cecli/args.py +1092 -0
  5. cecli/args_formatter.py +228 -0
  6. cecli/change_tracker.py +133 -0
  7. cecli/coders/__init__.py +38 -0
  8. cecli/coders/agent_coder.py +1872 -0
  9. cecli/coders/architect_coder.py +63 -0
  10. cecli/coders/ask_coder.py +8 -0
  11. cecli/coders/base_coder.py +3993 -0
  12. cecli/coders/chat_chunks.py +116 -0
  13. cecli/coders/context_coder.py +52 -0
  14. cecli/coders/copypaste_coder.py +269 -0
  15. cecli/coders/editblock_coder.py +656 -0
  16. cecli/coders/editblock_fenced_coder.py +9 -0
  17. cecli/coders/editblock_func_coder.py +140 -0
  18. cecli/coders/editor_diff_fenced_coder.py +8 -0
  19. cecli/coders/editor_editblock_coder.py +8 -0
  20. cecli/coders/editor_whole_coder.py +8 -0
  21. cecli/coders/help_coder.py +15 -0
  22. cecli/coders/patch_coder.py +705 -0
  23. cecli/coders/search_replace.py +757 -0
  24. cecli/coders/shell.py +37 -0
  25. cecli/coders/single_wholefile_func_coder.py +101 -0
  26. cecli/coders/udiff_coder.py +428 -0
  27. cecli/coders/udiff_simple.py +12 -0
  28. cecli/coders/wholefile_coder.py +143 -0
  29. cecli/coders/wholefile_func_coder.py +133 -0
  30. cecli/commands/__init__.py +192 -0
  31. cecli/commands/add.py +226 -0
  32. cecli/commands/agent.py +51 -0
  33. cecli/commands/architect.py +46 -0
  34. cecli/commands/ask.py +44 -0
  35. cecli/commands/chat_mode.py +0 -0
  36. cecli/commands/clear.py +37 -0
  37. cecli/commands/code.py +46 -0
  38. cecli/commands/command_prefix.py +44 -0
  39. cecli/commands/commit.py +52 -0
  40. cecli/commands/context.py +47 -0
  41. cecli/commands/context_blocks.py +124 -0
  42. cecli/commands/context_management.py +51 -0
  43. cecli/commands/copy.py +62 -0
  44. cecli/commands/copy_context.py +81 -0
  45. cecli/commands/core.py +287 -0
  46. cecli/commands/diff.py +68 -0
  47. cecli/commands/drop.py +217 -0
  48. cecli/commands/editor.py +78 -0
  49. cecli/commands/exit.py +55 -0
  50. cecli/commands/git.py +57 -0
  51. cecli/commands/help.py +140 -0
  52. cecli/commands/history_search.py +40 -0
  53. cecli/commands/lint.py +109 -0
  54. cecli/commands/list_sessions.py +56 -0
  55. cecli/commands/load.py +85 -0
  56. cecli/commands/load_session.py +48 -0
  57. cecli/commands/load_skill.py +68 -0
  58. cecli/commands/ls.py +75 -0
  59. cecli/commands/map.py +37 -0
  60. cecli/commands/map_refresh.py +35 -0
  61. cecli/commands/model.py +118 -0
  62. cecli/commands/models.py +41 -0
  63. cecli/commands/multiline_mode.py +38 -0
  64. cecli/commands/paste.py +91 -0
  65. cecli/commands/quit.py +32 -0
  66. cecli/commands/read_only.py +267 -0
  67. cecli/commands/read_only_stub.py +270 -0
  68. cecli/commands/reasoning_effort.py +70 -0
  69. cecli/commands/remove_skill.py +68 -0
  70. cecli/commands/report.py +40 -0
  71. cecli/commands/reset.py +88 -0
  72. cecli/commands/run.py +99 -0
  73. cecli/commands/save.py +49 -0
  74. cecli/commands/save_session.py +43 -0
  75. cecli/commands/settings.py +69 -0
  76. cecli/commands/test.py +58 -0
  77. cecli/commands/think_tokens.py +74 -0
  78. cecli/commands/tokens.py +207 -0
  79. cecli/commands/undo.py +145 -0
  80. cecli/commands/utils/__init__.py +0 -0
  81. cecli/commands/utils/base_command.py +131 -0
  82. cecli/commands/utils/helpers.py +142 -0
  83. cecli/commands/utils/registry.py +53 -0
  84. cecli/commands/utils/save_load_manager.py +98 -0
  85. cecli/commands/voice.py +78 -0
  86. cecli/commands/weak_model.py +123 -0
  87. cecli/commands/web.py +87 -0
  88. cecli/deprecated_args.py +185 -0
  89. cecli/diffs.py +129 -0
  90. cecli/dump.py +29 -0
  91. cecli/editor.py +147 -0
  92. cecli/exceptions.py +115 -0
  93. cecli/format_settings.py +26 -0
  94. cecli/help.py +119 -0
  95. cecli/help_pats.py +19 -0
  96. cecli/helpers/__init__.py +9 -0
  97. cecli/helpers/copypaste.py +123 -0
  98. cecli/helpers/coroutines.py +8 -0
  99. cecli/helpers/file_searcher.py +142 -0
  100. cecli/helpers/model_providers.py +552 -0
  101. cecli/helpers/plugin_manager.py +81 -0
  102. cecli/helpers/profiler.py +162 -0
  103. cecli/helpers/requests.py +77 -0
  104. cecli/helpers/similarity.py +98 -0
  105. cecli/helpers/skills.py +577 -0
  106. cecli/history.py +186 -0
  107. cecli/io.py +1782 -0
  108. cecli/linter.py +304 -0
  109. cecli/llm.py +101 -0
  110. cecli/main.py +1280 -0
  111. cecli/mcp/__init__.py +154 -0
  112. cecli/mcp/oauth.py +250 -0
  113. cecli/mcp/server.py +278 -0
  114. cecli/mdstream.py +243 -0
  115. cecli/models.py +1255 -0
  116. cecli/onboarding.py +301 -0
  117. cecli/prompts/__init__.py +0 -0
  118. cecli/prompts/agent.yml +71 -0
  119. cecli/prompts/architect.yml +35 -0
  120. cecli/prompts/ask.yml +31 -0
  121. cecli/prompts/base.yml +99 -0
  122. cecli/prompts/context.yml +60 -0
  123. cecli/prompts/copypaste.yml +5 -0
  124. cecli/prompts/editblock.yml +143 -0
  125. cecli/prompts/editblock_fenced.yml +106 -0
  126. cecli/prompts/editblock_func.yml +25 -0
  127. cecli/prompts/editor_diff_fenced.yml +115 -0
  128. cecli/prompts/editor_editblock.yml +121 -0
  129. cecli/prompts/editor_whole.yml +46 -0
  130. cecli/prompts/help.yml +37 -0
  131. cecli/prompts/patch.yml +110 -0
  132. cecli/prompts/single_wholefile_func.yml +24 -0
  133. cecli/prompts/udiff.yml +106 -0
  134. cecli/prompts/udiff_simple.yml +13 -0
  135. cecli/prompts/utils/__init__.py +0 -0
  136. cecli/prompts/utils/prompt_registry.py +167 -0
  137. cecli/prompts/utils/system.py +56 -0
  138. cecli/prompts/wholefile.yml +50 -0
  139. cecli/prompts/wholefile_func.yml +24 -0
  140. cecli/queries/tree-sitter-language-pack/README.md +7 -0
  141. cecli/queries/tree-sitter-language-pack/arduino-tags.scm +5 -0
  142. cecli/queries/tree-sitter-language-pack/c-tags.scm +12 -0
  143. cecli/queries/tree-sitter-language-pack/chatito-tags.scm +16 -0
  144. cecli/queries/tree-sitter-language-pack/clojure-tags.scm +12 -0
  145. cecli/queries/tree-sitter-language-pack/commonlisp-tags.scm +127 -0
  146. cecli/queries/tree-sitter-language-pack/cpp-tags.scm +18 -0
  147. cecli/queries/tree-sitter-language-pack/csharp-tags.scm +32 -0
  148. cecli/queries/tree-sitter-language-pack/d-tags.scm +26 -0
  149. cecli/queries/tree-sitter-language-pack/dart-tags.scm +97 -0
  150. cecli/queries/tree-sitter-language-pack/elisp-tags.scm +5 -0
  151. cecli/queries/tree-sitter-language-pack/elixir-tags.scm +59 -0
  152. cecli/queries/tree-sitter-language-pack/elm-tags.scm +22 -0
  153. cecli/queries/tree-sitter-language-pack/gleam-tags.scm +41 -0
  154. cecli/queries/tree-sitter-language-pack/go-tags.scm +49 -0
  155. cecli/queries/tree-sitter-language-pack/java-tags.scm +26 -0
  156. cecli/queries/tree-sitter-language-pack/javascript-tags.scm +96 -0
  157. cecli/queries/tree-sitter-language-pack/lua-tags.scm +39 -0
  158. cecli/queries/tree-sitter-language-pack/matlab-tags.scm +10 -0
  159. cecli/queries/tree-sitter-language-pack/ocaml-tags.scm +115 -0
  160. cecli/queries/tree-sitter-language-pack/ocaml_interface-tags.scm +101 -0
  161. cecli/queries/tree-sitter-language-pack/pony-tags.scm +39 -0
  162. cecli/queries/tree-sitter-language-pack/properties-tags.scm +5 -0
  163. cecli/queries/tree-sitter-language-pack/python-tags.scm +24 -0
  164. cecli/queries/tree-sitter-language-pack/r-tags.scm +27 -0
  165. cecli/queries/tree-sitter-language-pack/racket-tags.scm +12 -0
  166. cecli/queries/tree-sitter-language-pack/ruby-tags.scm +69 -0
  167. cecli/queries/tree-sitter-language-pack/rust-tags.scm +63 -0
  168. cecli/queries/tree-sitter-language-pack/solidity-tags.scm +43 -0
  169. cecli/queries/tree-sitter-language-pack/swift-tags.scm +54 -0
  170. cecli/queries/tree-sitter-language-pack/udev-tags.scm +20 -0
  171. cecli/queries/tree-sitter-languages/README.md +24 -0
  172. cecli/queries/tree-sitter-languages/c-tags.scm +12 -0
  173. cecli/queries/tree-sitter-languages/c_sharp-tags.scm +52 -0
  174. cecli/queries/tree-sitter-languages/cpp-tags.scm +18 -0
  175. cecli/queries/tree-sitter-languages/dart-tags.scm +92 -0
  176. cecli/queries/tree-sitter-languages/elisp-tags.scm +8 -0
  177. cecli/queries/tree-sitter-languages/elixir-tags.scm +59 -0
  178. cecli/queries/tree-sitter-languages/elm-tags.scm +22 -0
  179. cecli/queries/tree-sitter-languages/fortran-tags.scm +18 -0
  180. cecli/queries/tree-sitter-languages/go-tags.scm +36 -0
  181. cecli/queries/tree-sitter-languages/haskell-tags.scm +5 -0
  182. cecli/queries/tree-sitter-languages/hcl-tags.scm +77 -0
  183. cecli/queries/tree-sitter-languages/java-tags.scm +26 -0
  184. cecli/queries/tree-sitter-languages/javascript-tags.scm +96 -0
  185. cecli/queries/tree-sitter-languages/julia-tags.scm +60 -0
  186. cecli/queries/tree-sitter-languages/kotlin-tags.scm +30 -0
  187. cecli/queries/tree-sitter-languages/matlab-tags.scm +10 -0
  188. cecli/queries/tree-sitter-languages/ocaml-tags.scm +115 -0
  189. cecli/queries/tree-sitter-languages/ocaml_interface-tags.scm +104 -0
  190. cecli/queries/tree-sitter-languages/php-tags.scm +32 -0
  191. cecli/queries/tree-sitter-languages/python-tags.scm +22 -0
  192. cecli/queries/tree-sitter-languages/ql-tags.scm +26 -0
  193. cecli/queries/tree-sitter-languages/ruby-tags.scm +69 -0
  194. cecli/queries/tree-sitter-languages/rust-tags.scm +63 -0
  195. cecli/queries/tree-sitter-languages/scala-tags.scm +64 -0
  196. cecli/queries/tree-sitter-languages/typescript-tags.scm +44 -0
  197. cecli/queries/tree-sitter-languages/zig-tags.scm +20 -0
  198. cecli/reasoning_tags.py +82 -0
  199. cecli/repo.py +626 -0
  200. cecli/repomap.py +1368 -0
  201. cecli/report.py +260 -0
  202. cecli/resources/__init__.py +3 -0
  203. cecli/resources/model-metadata.json +25751 -0
  204. cecli/resources/model-settings.yml +2394 -0
  205. cecli/resources/providers.json +67 -0
  206. cecli/run_cmd.py +143 -0
  207. cecli/scrape.py +295 -0
  208. cecli/sendchat.py +250 -0
  209. cecli/sessions.py +281 -0
  210. cecli/special.py +203 -0
  211. cecli/tools/__init__.py +72 -0
  212. cecli/tools/command.py +103 -0
  213. cecli/tools/command_interactive.py +113 -0
  214. cecli/tools/context_manager.py +175 -0
  215. cecli/tools/delete_block.py +154 -0
  216. cecli/tools/delete_line.py +120 -0
  217. cecli/tools/delete_lines.py +144 -0
  218. cecli/tools/extract_lines.py +281 -0
  219. cecli/tools/finished.py +35 -0
  220. cecli/tools/git_branch.py +132 -0
  221. cecli/tools/git_diff.py +49 -0
  222. cecli/tools/git_log.py +43 -0
  223. cecli/tools/git_remote.py +39 -0
  224. cecli/tools/git_show.py +37 -0
  225. cecli/tools/git_status.py +32 -0
  226. cecli/tools/grep.py +242 -0
  227. cecli/tools/indent_lines.py +195 -0
  228. cecli/tools/insert_block.py +263 -0
  229. cecli/tools/list_changes.py +71 -0
  230. cecli/tools/load_skill.py +51 -0
  231. cecli/tools/ls.py +77 -0
  232. cecli/tools/remove_skill.py +51 -0
  233. cecli/tools/replace_all.py +113 -0
  234. cecli/tools/replace_line.py +135 -0
  235. cecli/tools/replace_lines.py +180 -0
  236. cecli/tools/replace_text.py +186 -0
  237. cecli/tools/show_numbered_context.py +137 -0
  238. cecli/tools/thinking.py +52 -0
  239. cecli/tools/undo_change.py +82 -0
  240. cecli/tools/update_todo_list.py +148 -0
  241. cecli/tools/utils/base_tool.py +64 -0
  242. cecli/tools/utils/helpers.py +359 -0
  243. cecli/tools/utils/output.py +119 -0
  244. cecli/tools/utils/registry.py +145 -0
  245. cecli/tools/view_files_matching.py +138 -0
  246. cecli/tools/view_files_with_symbol.py +117 -0
  247. cecli/tui/__init__.py +83 -0
  248. cecli/tui/app.py +971 -0
  249. cecli/tui/io.py +566 -0
  250. cecli/tui/styles.tcss +117 -0
  251. cecli/tui/widgets/__init__.py +19 -0
  252. cecli/tui/widgets/completion_bar.py +331 -0
  253. cecli/tui/widgets/file_list.py +76 -0
  254. cecli/tui/widgets/footer.py +165 -0
  255. cecli/tui/widgets/input_area.py +320 -0
  256. cecli/tui/widgets/key_hints.py +16 -0
  257. cecli/tui/widgets/output.py +354 -0
  258. cecli/tui/widgets/status_bar.py +279 -0
  259. cecli/tui/worker.py +160 -0
  260. cecli/urls.py +16 -0
  261. cecli/utils.py +499 -0
  262. cecli/versioncheck.py +90 -0
  263. cecli/voice.py +90 -0
  264. cecli/waiting.py +38 -0
  265. cecli/watch.py +316 -0
  266. cecli/watch_prompts.py +12 -0
  267. cecli/website/Gemfile +8 -0
  268. cecli/website/_includes/blame.md +162 -0
  269. cecli/website/_includes/get-started.md +22 -0
  270. cecli/website/_includes/help-tip.md +5 -0
  271. cecli/website/_includes/help.md +24 -0
  272. cecli/website/_includes/install.md +5 -0
  273. cecli/website/_includes/keys.md +4 -0
  274. cecli/website/_includes/model-warnings.md +67 -0
  275. cecli/website/_includes/multi-line.md +22 -0
  276. cecli/website/_includes/python-m-aider.md +5 -0
  277. cecli/website/_includes/recording.css +228 -0
  278. cecli/website/_includes/recording.md +34 -0
  279. cecli/website/_includes/replit-pipx.md +9 -0
  280. cecli/website/_includes/works-best.md +1 -0
  281. cecli/website/_sass/custom/custom.scss +103 -0
  282. cecli/website/docs/config/adv-model-settings.md +2498 -0
  283. cecli/website/docs/config/agent-mode.md +320 -0
  284. cecli/website/docs/config/aider_conf.md +548 -0
  285. cecli/website/docs/config/api-keys.md +90 -0
  286. cecli/website/docs/config/custom-commands.md +187 -0
  287. cecli/website/docs/config/dotenv.md +493 -0
  288. cecli/website/docs/config/editor.md +127 -0
  289. cecli/website/docs/config/mcp.md +210 -0
  290. cecli/website/docs/config/model-aliases.md +173 -0
  291. cecli/website/docs/config/options.md +890 -0
  292. cecli/website/docs/config/reasoning.md +210 -0
  293. cecli/website/docs/config/skills.md +172 -0
  294. cecli/website/docs/config/tui.md +126 -0
  295. cecli/website/docs/config.md +44 -0
  296. cecli/website/docs/faq.md +379 -0
  297. cecli/website/docs/git.md +76 -0
  298. cecli/website/docs/index.md +47 -0
  299. cecli/website/docs/install/codespaces.md +39 -0
  300. cecli/website/docs/install/docker.md +48 -0
  301. cecli/website/docs/install/optional.md +100 -0
  302. cecli/website/docs/install/replit.md +8 -0
  303. cecli/website/docs/install.md +115 -0
  304. cecli/website/docs/languages.md +264 -0
  305. cecli/website/docs/legal/contributor-agreement.md +111 -0
  306. cecli/website/docs/legal/privacy.md +104 -0
  307. cecli/website/docs/llms/anthropic.md +77 -0
  308. cecli/website/docs/llms/azure.md +48 -0
  309. cecli/website/docs/llms/bedrock.md +132 -0
  310. cecli/website/docs/llms/cohere.md +34 -0
  311. cecli/website/docs/llms/deepseek.md +32 -0
  312. cecli/website/docs/llms/gemini.md +49 -0
  313. cecli/website/docs/llms/github.md +111 -0
  314. cecli/website/docs/llms/groq.md +36 -0
  315. cecli/website/docs/llms/lm-studio.md +39 -0
  316. cecli/website/docs/llms/ollama.md +75 -0
  317. cecli/website/docs/llms/openai-compat.md +39 -0
  318. cecli/website/docs/llms/openai.md +58 -0
  319. cecli/website/docs/llms/openrouter.md +78 -0
  320. cecli/website/docs/llms/other.md +117 -0
  321. cecli/website/docs/llms/vertex.md +50 -0
  322. cecli/website/docs/llms/warnings.md +10 -0
  323. cecli/website/docs/llms/xai.md +53 -0
  324. cecli/website/docs/llms.md +54 -0
  325. cecli/website/docs/more/analytics.md +127 -0
  326. cecli/website/docs/more/edit-formats.md +116 -0
  327. cecli/website/docs/more/infinite-output.md +192 -0
  328. cecli/website/docs/more-info.md +8 -0
  329. cecli/website/docs/recordings/auto-accept-architect.md +31 -0
  330. cecli/website/docs/recordings/dont-drop-original-read-files.md +35 -0
  331. cecli/website/docs/recordings/index.md +21 -0
  332. cecli/website/docs/recordings/model-accepts-settings.md +69 -0
  333. cecli/website/docs/recordings/tree-sitter-language-pack.md +80 -0
  334. cecli/website/docs/repomap.md +112 -0
  335. cecli/website/docs/scripting.md +100 -0
  336. cecli/website/docs/sessions.md +213 -0
  337. cecli/website/docs/troubleshooting/aider-not-found.md +24 -0
  338. cecli/website/docs/troubleshooting/edit-errors.md +76 -0
  339. cecli/website/docs/troubleshooting/imports.md +62 -0
  340. cecli/website/docs/troubleshooting/models-and-keys.md +54 -0
  341. cecli/website/docs/troubleshooting/support.md +79 -0
  342. cecli/website/docs/troubleshooting/token-limits.md +96 -0
  343. cecli/website/docs/troubleshooting/warnings.md +12 -0
  344. cecli/website/docs/troubleshooting.md +11 -0
  345. cecli/website/docs/usage/browser.md +57 -0
  346. cecli/website/docs/usage/caching.md +49 -0
  347. cecli/website/docs/usage/commands.md +133 -0
  348. cecli/website/docs/usage/conventions.md +119 -0
  349. cecli/website/docs/usage/copypaste.md +136 -0
  350. cecli/website/docs/usage/images-urls.md +48 -0
  351. cecli/website/docs/usage/lint-test.md +118 -0
  352. cecli/website/docs/usage/modes.md +211 -0
  353. cecli/website/docs/usage/not-code.md +179 -0
  354. cecli/website/docs/usage/notifications.md +87 -0
  355. cecli/website/docs/usage/tips.md +79 -0
  356. cecli/website/docs/usage/tutorials.md +30 -0
  357. cecli/website/docs/usage/voice.md +121 -0
  358. cecli/website/docs/usage/watch.md +294 -0
  359. cecli/website/docs/usage.md +102 -0
  360. cecli/website/share/index.md +101 -0
  361. cecli_dev-0.93.1.dist-info/METADATA +549 -0
  362. cecli_dev-0.93.1.dist-info/RECORD +366 -0
  363. cecli_dev-0.93.1.dist-info/WHEEL +5 -0
  364. cecli_dev-0.93.1.dist-info/entry_points.txt +4 -0
  365. cecli_dev-0.93.1.dist-info/licenses/LICENSE.txt +202 -0
  366. cecli_dev-0.93.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,58 @@
1
+ ---
2
+ parent: Connecting to LLMs
3
+ nav_order: 100
4
+ ---
5
+
6
+ # OpenAI
7
+
8
+ To work with OpenAI's models, you need to provide your
9
+ [OpenAI API key](https://help.openai.com/en/articles/4936850-where-do-i-find-my-secret-api-key)
10
+ either in the `OPENAI_API_KEY` environment variable or
11
+ via the `--api-key openai=<key>` command line switch.
12
+
13
+ First, install aider:
14
+
15
+ {% include install.md %}
16
+
17
+ Then configure your API keys:
18
+
19
+ ```
20
+ export OPENAI_API_KEY=<key> # Mac/Linux
21
+ setx OPENAI_API_KEY <key> # Windows, restart shell after setx
22
+ ```
23
+
24
+ Start working with aider and OpenAI on your codebase:
25
+
26
+ ```bash
27
+ # Change directory into your codebase
28
+ cd /to/your/project
29
+
30
+ # o3-mini
31
+ aider --model o3-mini
32
+
33
+ # o1-mini
34
+ aider --model o1-mini
35
+
36
+ # GPT-4o
37
+ aider --model gpt-4o
38
+
39
+ # List models available from OpenAI
40
+ aider --list-models openai/
41
+ ```
42
+
43
+ You can use `aider --model <model-name>` to use any other OpenAI model.
44
+ For example, if you want to use a specific version of GPT-4 Turbo
45
+ you could do `aider --model gpt-4-0125-preview`.
46
+
47
+ ## Reasoning models from other providers
48
+
49
+ Many of OpenAI's
50
+ "reasoning" models have restrictions on streaming and setting the temperature parameter.
51
+ Some also support different levels of "reasoning effort".
52
+ Aider is configured to work properly with these models
53
+ when served through major provider APIs and
54
+ has a `--reasoning-effort` setting.
55
+
56
+ You may need to [configure reasoning model settings](/docs/config/reasoning.html)
57
+ if you are using them through another provider
58
+ and see errors related to temperature or system prompt.
@@ -0,0 +1,78 @@
1
+ ---
2
+ parent: Connecting to LLMs
3
+ nav_order: 500
4
+ ---
5
+
6
+ # OpenRouter
7
+
8
+ Aider can connect to [models provided by OpenRouter](https://openrouter.ai/models?o=top-weekly):
9
+ You'll need an [OpenRouter API key](https://openrouter.ai/keys).
10
+
11
+ First, install aider:
12
+
13
+ {% include install.md %}
14
+
15
+ Then configure your API keys:
16
+
17
+ ```
18
+ export OPENROUTER_API_KEY=<key> # Mac/Linux
19
+ setx OPENROUTER_API_KEY <key> # Windows, restart shell after setx
20
+ ```
21
+
22
+ Start working with aider and OpenRouter on your codebase:
23
+
24
+ ```bash
25
+ # Change directory into your codebase
26
+ cd /to/your/project
27
+
28
+ # Or any other open router model
29
+ aider --model openrouter/<provider>/<model>
30
+
31
+ # List models available from OpenRouter
32
+ aider --list-models openrouter/
33
+ ```
34
+
35
+ In particular, many aider users access Sonnet via OpenRouter:
36
+
37
+ {: .tip }
38
+ If you get errors, check your
39
+ [OpenRouter privacy settings](https://openrouter.ai/settings/privacy).
40
+ Be sure to "enable providers that may train on inputs"
41
+ to allow use of all models.
42
+
43
+ ## Controlling provider selection
44
+
45
+ OpenRouter often has multiple providers serving each model.
46
+ You can control which OpenRouter providers are used for your requests in two ways:
47
+
48
+ 1. By "ignoring" certain providers in your
49
+ [OpenRouter account settings](https://openrouter.ai/settings/preferences).
50
+ This disables those named providers across all the models that you access via OpenRouter.
51
+
52
+ 2. By configuring "provider routing" in a `.aider.model.settings.yml` file.
53
+
54
+ Place that file in your home directory or the root of your git project, with
55
+ entries like this:
56
+
57
+ ```yaml
58
+ - name: openrouter/anthropic/claude-3.7-sonnet
59
+ extra_params:
60
+ extra_body:
61
+ provider:
62
+ # Only use these providers, in this order
63
+ order: ["Anthropic", "Together"]
64
+ # Don't fall back to other providers
65
+ allow_fallbacks: false
66
+ # Skip providers that may train on inputs
67
+ data_collection: "deny"
68
+ # Only use providers supporting all parameters
69
+ require_parameters: true
70
+ ```
71
+
72
+ See [OpenRouter's provider routing docs](https://openrouter.ai/docs/provider-routing) for full details on these settings.
73
+
74
+ See [Advanced model settings](https://aider.chat/docs/config/adv-model-settings.html#model-settings)
75
+ for more details about model settings files.
76
+
77
+
78
+
@@ -0,0 +1,117 @@
1
+ ---
2
+ parent: Connecting to LLMs
3
+ nav_order: 800
4
+ ---
5
+
6
+ # Other LLMs
7
+
8
+ Aider uses the [litellm](https://docs.litellm.ai/docs/providers) package
9
+ to connect to hundreds of other models.
10
+ You can use `aider --model <model-name>` to use any supported model.
11
+
12
+ To explore the list of supported models you can run `aider --list-models <model-name>`
13
+ with a partial model name.
14
+ If the supplied name is not an exact match for a known model, aider will
15
+ return a list of possible matching models.
16
+ For example:
17
+
18
+ ```
19
+ $ aider --list-models turbo
20
+
21
+ Aider v0.29.3-dev
22
+ Models which match "turbo":
23
+ - gpt-4-turbo-preview (openai/gpt-4-turbo-preview)
24
+ - gpt-4-turbo (openai/gpt-4-turbo)
25
+ - gpt-4-turbo-2024-04-09 (openai/gpt-4-turbo-2024-04-09)
26
+ - gpt-3.5-turbo (openai/gpt-3.5-turbo)
27
+ - ...
28
+ ```
29
+
30
+ See the [model warnings](warnings.html)
31
+ section for information on warnings which will occur
32
+ when working with models that aider is not familiar with.
33
+
34
+ ## LiteLLM
35
+
36
+ Aider uses the LiteLLM package to connect to LLM providers.
37
+ The [LiteLLM provider docs](https://docs.litellm.ai/docs/providers)
38
+ contain more detail on all the supported providers,
39
+ their models and any required environment variables.
40
+
41
+
42
+ ## Other API key variables
43
+
44
+ Here are the API key environment variables that are supported
45
+ by litellm. See their docs for more info.
46
+
47
+ <!--[[[cog
48
+ from subprocess import run
49
+ lines = run(
50
+ "egrep -ho '[A-Z_]+_API_KEY' ../litellm/litellm/*py | sort -u",
51
+ shell=True,
52
+ capture_output=True,
53
+ text=True,
54
+ ).stdout
55
+ lines = ['- ' + line for line in lines.splitlines(keepends=True)]
56
+ cog.out(''.join(lines))
57
+ ]]]-->
58
+ - ALEPH_ALPHA_API_KEY
59
+ - ALEPHALPHA_API_KEY
60
+ - ANTHROPIC_API_KEY
61
+ - ANYSCALE_API_KEY
62
+ - ARK_API_KEY
63
+ - AZURE_AI_API_KEY
64
+ - AZURE_API_KEY
65
+ - AZURE_OPENAI_API_KEY
66
+ - BASETEN_API_KEY
67
+ - BYTEZ_API_KEY
68
+ - CEREBRAS_API_KEY
69
+ - CLARIFAI_API_KEY
70
+ - CLOUDFLARE_API_KEY
71
+ - CO_API_KEY
72
+ - CODESTRAL_API_KEY
73
+ - COHERE_API_KEY
74
+ - COMPACTIFAI_API_KEY
75
+ - DASHSCOPE_API_KEY
76
+ - DATABRICKS_API_KEY
77
+ - DEEPINFRA_API_KEY
78
+ - DEEPSEEK_API_KEY
79
+ - FEATHERLESS_AI_API_KEY
80
+ - FIREWORKS_AI_API_KEY
81
+ - FIREWORKS_API_KEY
82
+ - FIREWORKSAI_API_KEY
83
+ - GEMINI_API_KEY
84
+ - GOOGLE_API_KEY
85
+ - GROQ_API_KEY
86
+ - HUGGINGFACE_API_KEY
87
+ - INFINITY_API_KEY
88
+ - MARITALK_API_KEY
89
+ - MISTRAL_API_KEY
90
+ - MOONSHOT_API_KEY
91
+ - NEBIUS_API_KEY
92
+ - NLP_CLOUD_API_KEY
93
+ - NOVITA_API_KEY
94
+ - NVIDIA_NIM_API_KEY
95
+ - OLLAMA_API_KEY
96
+ - OPENAI_API_KEY
97
+ - OPENAI_LIKE_API_KEY
98
+ - OPENROUTER_API_KEY
99
+ - OR_API_KEY
100
+ - OVHCLOUD_API_KEY
101
+ - PALM_API_KEY
102
+ - PERPLEXITYAI_API_KEY
103
+ - PREDIBASE_API_KEY
104
+ - PROVIDER_API_KEY
105
+ - REPLICATE_API_KEY
106
+ - SAMBANOVA_API_KEY
107
+ - TOGETHERAI_API_KEY
108
+ - USER_API_KEY
109
+ - VERCEL_AI_GATEWAY_API_KEY
110
+ - VOLCENGINE_API_KEY
111
+ - VOYAGE_API_KEY
112
+ - WANDB_API_KEY
113
+ - WATSONX_API_KEY
114
+ - WX_API_KEY
115
+ - XAI_API_KEY
116
+ - XINFERENCE_API_KEY
117
+ <!--[[[end]]]-->
@@ -0,0 +1,50 @@
1
+ ---
2
+ parent: Connecting to LLMs
3
+ nav_order: 550
4
+ ---
5
+
6
+ # Vertex AI
7
+
8
+ Aider can connect to models provided by Google Vertex AI.
9
+ You will need to install the
10
+ [gcloud CLI](https://cloud.google.com/sdk/docs/install) and [login](https://cloud.google.com/sdk/docs/initializing) with a GCP account
11
+ or service account with permission to use the Vertex AI API.
12
+
13
+ With your chosen login method, the gcloud CLI should automatically set the
14
+ `GOOGLE_APPLICATION_CREDENTIALS` environment variable which points to the credentials file.
15
+
16
+ First, install aider:
17
+
18
+ {% include install.md %}
19
+
20
+ To configure Aider to use the Vertex AI API, you need to set `VERTEXAI_PROJECT` (the GCP project ID)
21
+ and `VERTEXAI_LOCATION` (the GCP region) [environment variables for Aider](/docs/config/dotenv.html).
22
+
23
+ Note that Claude on Vertex AI is only available in certain GCP regions,
24
+ check [the model card](https://console.cloud.google.com/vertex-ai/publishers/anthropic/model-garden/claude-3-5-sonnet)
25
+ for your model to see which regions are supported.
26
+
27
+ Example `.env` file:
28
+
29
+ ```
30
+ VERTEXAI_PROJECT=my-project
31
+ VERTEXAI_LOCATION=us-east5
32
+ ```
33
+
34
+ Start working with aider and Vertex AI on your codebase:
35
+
36
+ ```
37
+ # Change directory into your codebase
38
+ cd /to/your/project
39
+
40
+ aider --model vertex_ai/claude-3-5-sonnet@20240620
41
+ ```
42
+
43
+ Or you can use the [YAML config](/docs/config/aider_conf.html) to set the model to any of the
44
+ models supported by Vertex AI.
45
+
46
+ Example `.aider.conf.yml` file:
47
+
48
+ ```yaml
49
+ model: vertex_ai/claude-3-5-sonnet@20240620
50
+ ```
@@ -0,0 +1,10 @@
1
+ ---
2
+ parent: Connecting to LLMs
3
+ nav_order: 900
4
+ ---
5
+
6
+ # Model warnings
7
+
8
+ {% include model-warnings.md %}
9
+
10
+
@@ -0,0 +1,53 @@
1
+ ---
2
+ parent: Connecting to LLMs
3
+ nav_order: 400
4
+ ---
5
+
6
+ # xAI
7
+
8
+ You'll need a [xAI API key](https://console.x.ai.).
9
+
10
+ First, install aider:
11
+
12
+ {% include install.md %}
13
+
14
+ Then configure your API keys:
15
+
16
+ ```bash
17
+ export XAI_API_KEY=<key> # Mac/Linux
18
+ setx XAI_API_KEY <key> # Windows, restart shell after setx
19
+ ```
20
+
21
+ Start working with aider and xAI on your codebase:
22
+
23
+ ```bash
24
+ # Change directory into your codebase
25
+ cd /to/your/project
26
+
27
+ # Grok 3
28
+ aider --model xai/grok-3-beta
29
+
30
+ # Grok 3 fast (faster, more expensive)
31
+ aider --model xai/grok-3-fast-beta
32
+
33
+ # Grok 3 Mini
34
+ aider --model xai/grok-3-mini-beta
35
+
36
+ # Grok 3 Mini fast (faster, more expensive)
37
+ aider --model xai/grok-3-mini-fast-beta
38
+
39
+ # List models available from xAI
40
+ aider --list-models xai/
41
+ ```
42
+
43
+ The Grok 3 Mini models support the `--reasoning-effort` flag.
44
+ See the [reasoning settings documentation](../config/reasoning.md) for details.
45
+ Example:
46
+
47
+ ```bash
48
+ aider --model xai/grok-3-mini-beta --reasoning-effort high
49
+ ```
50
+
51
+
52
+
53
+
@@ -0,0 +1,54 @@
1
+ ---
2
+ title: Connecting to LLMs
3
+ nav_order: 40
4
+ has_children: true
5
+ description: Aider can connect to most LLMs for AI pair programming.
6
+ ---
7
+
8
+ # Aider can connect to most LLMs
9
+ {: .no_toc }
10
+
11
+ [![connecting to many LLMs](/assets/llms.jpg)](https://aider.chat/assets/llms.jpg)
12
+
13
+
14
+ ## Best models
15
+ {: .no_toc }
16
+
17
+ Aider works best with these models, which are skilled at editing code:
18
+
19
+ - [Gemini 2.5 Pro](/docs/llms/gemini.html)
20
+ - [DeepSeek R1 and V3](/docs/llms/deepseek.html)
21
+ - [Claude 3.7 Sonnet](/docs/llms/anthropic.html)
22
+ - [OpenAI o3, o4-mini and GPT-4.1](/docs/llms/openai.html)
23
+
24
+
25
+ ## Free models
26
+ {: .no_toc }
27
+
28
+ Aider works with a number of **free** API providers:
29
+
30
+ - [OpenRouter offers free access to many models](https://openrouter.ai/models/?q=free), with limitations on daily usage.
31
+ - Google's [Gemini 2.5 Pro Exp](/docs/llms/gemini.html) works very well with aider.
32
+
33
+ ## Local models
34
+ {: .no_toc }
35
+
36
+ Aider can work also with local models, for example using [Ollama](/docs/llms/ollama.html).
37
+ It can also access
38
+ local models that provide an
39
+ [Open AI compatible API](/docs/llms/openai-compat.html).
40
+
41
+ ## Use a capable model
42
+ {: .no_toc }
43
+
44
+ Check
45
+ [Aider's LLM leaderboards](https://aider.chat/docs/leaderboards/)
46
+ to see which models work best with aider.
47
+
48
+ Be aware that aider may not work well with less capable models.
49
+ If you see the model returning code, but aider isn't able to edit your files
50
+ and commit the changes...
51
+ this is usually because the model isn't capable of properly
52
+ returning "code edits".
53
+ Models weaker than GPT 3.5 may have problems working well with aider.
54
+
@@ -0,0 +1,127 @@
1
+ ---
2
+ parent: More info
3
+ nav_order: 500
4
+ description: Opt-in, anonymous, no personal info.
5
+ ---
6
+
7
+ # Analytics
8
+
9
+ Aider can collect anonymous analytics to help
10
+ improve aider's ability to work with LLMs, edit code and complete user requests.
11
+
12
+ ## Opt-in, anonymous, no personal info
13
+
14
+ Analytics are only collected if you agree and opt-in.
15
+ Aider respects your privacy and never collects your code, chat messages, keys or
16
+ personal info.
17
+
18
+ Aider collects information on:
19
+
20
+ - which LLMs are used and with how many tokens,
21
+ - which of aider's edit formats are used,
22
+ - how often features and commands are used,
23
+ - information about exceptions and errors,
24
+ - etc
25
+
26
+ These analytics are associated with an anonymous,
27
+ randomly generated UUID4 user identifier.
28
+
29
+ This information helps improve aider by identifying which models, edit formats,
30
+ features and commands are most used.
31
+ It also helps uncover bugs that users are experiencing, so that they can be fixed
32
+ in upcoming releases.
33
+
34
+ ## Disabling analytics
35
+
36
+ You can opt out of analytics forever by running this command one time:
37
+
38
+ ```
39
+ aider --analytics-disable
40
+ ```
41
+
42
+ ## Enabling analytics
43
+
44
+ The `--[no-]analytics` switch controls whether analytics are enabled for the
45
+ current session:
46
+
47
+ - `--analytics` will turn on analytics for the current session.
48
+ This will *not* have any effect if you have permanently disabled analytics
49
+ with `--analytics-disable`.
50
+ If this is the first time you have enabled analytics, aider
51
+ will confirm you wish to opt-in to analytics.
52
+ - `--no-analytics` will turn off analytics for the current session.
53
+ - By default, if you don't provide `--analytics` or `--no-analytics`,
54
+ aider will enable analytics for a random subset of users.
55
+ Such randomly selected users will be asked if they wish to opt-in to analytics.
56
+ This will never happen if you have permanently disabled analytics
57
+ with `--analytics-disable`.
58
+
59
+ ## Opting in
60
+
61
+ The first time analytics are enabled, you will need to agree to opt-in.
62
+
63
+ ```
64
+ aider --analytics
65
+
66
+ Aider respects your privacy and never collects your code, prompts, chats, keys or any personal
67
+ info.
68
+ For more info: https://aider.chat/docs/more/analytics.html
69
+ Allow collection of anonymous analytics to help improve aider? (Y)es/(N)o [Yes]:
70
+ ```
71
+
72
+ If you say "no", analytics will be permanently disabled.
73
+
74
+
75
+ ## Details about data being collected
76
+
77
+ ### Sample analytics data
78
+
79
+ To get a better sense of what type of data is collected, you can review some
80
+ [sample analytics logs](https://github.com/aider-ai/aider/blob/main/aider/website/assets/sample-analytics.jsonl).
81
+ These are the last 1,000 analytics events from the author's
82
+ personal use of aider, updated regularly.
83
+
84
+
85
+ ### Analytics code
86
+
87
+ Since aider is open source, all the places where aider collects analytics
88
+ are visible in the source code.
89
+ They can be viewed using
90
+ [GitHub search](https://github.com/search?q=repo%3Aaider-ai%2Faider+%22.event%28%22&type=code).
91
+
92
+
93
+ ### Logging and inspecting analytics
94
+
95
+ You can get a full log of the analytics that aider is collecting,
96
+ in case you would like to audit or inspect this data.
97
+
98
+ ```
99
+ aider --analytics-log filename.jsonl
100
+ ```
101
+
102
+ If you want to just log analytics without reporting them, you can do:
103
+
104
+ ```
105
+ aider --analytics-log filename.jsonl --no-analytics
106
+ ```
107
+
108
+ ### Sending analytics to custom PostHog project or installation
109
+
110
+ Aider uses PostHog for analytics collection. You can configure aider to send analytics to your own PostHog project or a custom PostHog installation using these parameters:
111
+
112
+ - `--analytics-posthog-project-api-key KEY` - Set a custom PostHog project API key
113
+ - `--analytics-posthog-host HOST` - Set a custom PostHog host (default is app.posthog.com)
114
+
115
+ ## Reporting issues
116
+
117
+ If you have concerns about any of the analytics that aider is collecting
118
+ or our data practices
119
+ please contact us by opening a
120
+ [GitHub Issue](https://github.com/aider-ai/aider/issues).
121
+
122
+ ## Privacy policy
123
+
124
+ Please see aider's
125
+ [privacy policy](/docs/legal/privacy.html)
126
+ for more details.
127
+
@@ -0,0 +1,116 @@
1
+ ---
2
+ parent: More info
3
+ nav_order: 490
4
+ description: Aider uses various "edit formats" to let LLMs edit source files.
5
+ ---
6
+
7
+ # Edit formats
8
+
9
+ Aider uses various "edit formats" to let LLMs edit source files.
10
+ Different models work better or worse with different edit formats.
11
+ Aider is configured to use the optimal format for most popular, common models.
12
+ You can always force use of a specific edit format with
13
+ the `--edit-format` switch.
14
+
15
+ ## whole
16
+
17
+ The "whole" edit format is the simplest possible editing format.
18
+ The LLM is instructed to return a full, updated
19
+ copy of each source file that needs changes.
20
+ While simple, it can be slow and costly because the LLM has to return
21
+ the *entire file* even if just a few lines are edited.
22
+
23
+ The whole format expects the file path just before the fenced file content:
24
+
25
+ ````
26
+ show_greeting.py
27
+ ```
28
+ import sys
29
+
30
+ def greeting(name):
31
+ print("Hey", name)
32
+
33
+ if __name__ == '__main__':
34
+ greeting(sys.argv[1])
35
+ ```
36
+ ````
37
+
38
+
39
+ ## diff
40
+
41
+ The "diff" edit format asks the LLM to specify file edits as a series of search/replace blocks.
42
+ This is an efficient format, because the model only needs to return parts of the file
43
+ which have changes.
44
+
45
+ Edits are formatted using a syntax similar to the git merge conflict resolution markings,
46
+ with the file path right before a fenced block:
47
+
48
+ ````
49
+ mathweb/flask/app.py
50
+ ```
51
+ <<<<<<< SEARCH
52
+ from flask import Flask
53
+ =======
54
+ import math
55
+ from flask import Flask
56
+ >>>>>>> REPLACE
57
+ ```
58
+ ````
59
+
60
+ ## diff-fenced
61
+
62
+ The "diff-fenced" edit format is based on the diff format, but
63
+ the file path is placed inside the fence.
64
+ It is primarily used with the Gemini family of models,
65
+ which often fail to conform to the fencing approach specified in the diff format.
66
+
67
+ ````
68
+ ```
69
+ mathweb/flask/app.py
70
+ <<<<<<< SEARCH
71
+ from flask import Flask
72
+ =======
73
+ import math
74
+ from flask import Flask
75
+ >>>>>>> REPLACE
76
+ ```
77
+ ````
78
+
79
+ ## udiff
80
+
81
+ The "udiff" edit format is based on the widely used unified diff format,
82
+ but [modified and simplified](/2023/12/21/unified-diffs.html).
83
+ This is an efficient format, because the model only needs to return parts of the file
84
+ which have changes.
85
+
86
+ It was mainly used to the GPT-4 Turbo family of models,
87
+ because it reduced their "lazy coding" tendencies.
88
+ With other edit formats the GPT-4 Turbo models tended to elide
89
+ large sections of code and replace them with "# ... original code here ..."
90
+ style comments.
91
+
92
+
93
+ ````
94
+ ```diff
95
+ --- mathweb/flask/app.py
96
+ +++ mathweb/flask/app.py
97
+ @@ ... @@
98
+ -class MathWeb:
99
+ +import sympy
100
+ +
101
+ +class MathWeb:
102
+ ```
103
+ ````
104
+
105
+ ## editor-diff and editor-whole
106
+
107
+ These are streamlined versions of the diff and whole formats, intended to be used
108
+ with `--editor-edit-format` when using
109
+ [architect mode](/docs/usage/modes.html).
110
+ The actual edit format is the same, but aider uses a simpler prompt that
111
+ is more narrowly focused on just editing the file as opposed to
112
+ solving the coding task.
113
+ The architect model resolves the coding task and
114
+ provides plain text instructions about which file changes need to be made.
115
+ The editor interprets those instructions to produce the
116
+ syntactically correct diff or whole edits.