aider-ce 0.88.20__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 (279) hide show
  1. aider/__init__.py +20 -0
  2. aider/__main__.py +4 -0
  3. aider/_version.py +34 -0
  4. aider/analytics.py +258 -0
  5. aider/args.py +1056 -0
  6. aider/args_formatter.py +228 -0
  7. aider/change_tracker.py +133 -0
  8. aider/coders/__init__.py +36 -0
  9. aider/coders/agent_coder.py +2166 -0
  10. aider/coders/agent_prompts.py +104 -0
  11. aider/coders/architect_coder.py +48 -0
  12. aider/coders/architect_prompts.py +40 -0
  13. aider/coders/ask_coder.py +9 -0
  14. aider/coders/ask_prompts.py +35 -0
  15. aider/coders/base_coder.py +3613 -0
  16. aider/coders/base_prompts.py +87 -0
  17. aider/coders/chat_chunks.py +64 -0
  18. aider/coders/context_coder.py +53 -0
  19. aider/coders/context_prompts.py +75 -0
  20. aider/coders/editblock_coder.py +657 -0
  21. aider/coders/editblock_fenced_coder.py +10 -0
  22. aider/coders/editblock_fenced_prompts.py +143 -0
  23. aider/coders/editblock_func_coder.py +141 -0
  24. aider/coders/editblock_func_prompts.py +27 -0
  25. aider/coders/editblock_prompts.py +175 -0
  26. aider/coders/editor_diff_fenced_coder.py +9 -0
  27. aider/coders/editor_diff_fenced_prompts.py +11 -0
  28. aider/coders/editor_editblock_coder.py +9 -0
  29. aider/coders/editor_editblock_prompts.py +21 -0
  30. aider/coders/editor_whole_coder.py +9 -0
  31. aider/coders/editor_whole_prompts.py +12 -0
  32. aider/coders/help_coder.py +16 -0
  33. aider/coders/help_prompts.py +46 -0
  34. aider/coders/patch_coder.py +706 -0
  35. aider/coders/patch_prompts.py +159 -0
  36. aider/coders/search_replace.py +757 -0
  37. aider/coders/shell.py +37 -0
  38. aider/coders/single_wholefile_func_coder.py +102 -0
  39. aider/coders/single_wholefile_func_prompts.py +27 -0
  40. aider/coders/udiff_coder.py +429 -0
  41. aider/coders/udiff_prompts.py +115 -0
  42. aider/coders/udiff_simple.py +14 -0
  43. aider/coders/udiff_simple_prompts.py +25 -0
  44. aider/coders/wholefile_coder.py +144 -0
  45. aider/coders/wholefile_func_coder.py +134 -0
  46. aider/coders/wholefile_func_prompts.py +27 -0
  47. aider/coders/wholefile_prompts.py +65 -0
  48. aider/commands.py +2173 -0
  49. aider/copypaste.py +72 -0
  50. aider/deprecated.py +126 -0
  51. aider/diffs.py +128 -0
  52. aider/dump.py +29 -0
  53. aider/editor.py +147 -0
  54. aider/exceptions.py +115 -0
  55. aider/format_settings.py +26 -0
  56. aider/gui.py +545 -0
  57. aider/help.py +163 -0
  58. aider/help_pats.py +19 -0
  59. aider/helpers/__init__.py +9 -0
  60. aider/helpers/similarity.py +98 -0
  61. aider/history.py +180 -0
  62. aider/io.py +1608 -0
  63. aider/linter.py +304 -0
  64. aider/llm.py +55 -0
  65. aider/main.py +1415 -0
  66. aider/mcp/__init__.py +174 -0
  67. aider/mcp/server.py +149 -0
  68. aider/mdstream.py +243 -0
  69. aider/models.py +1313 -0
  70. aider/onboarding.py +429 -0
  71. aider/openrouter.py +129 -0
  72. aider/prompts.py +56 -0
  73. aider/queries/tree-sitter-language-pack/README.md +7 -0
  74. aider/queries/tree-sitter-language-pack/arduino-tags.scm +5 -0
  75. aider/queries/tree-sitter-language-pack/c-tags.scm +9 -0
  76. aider/queries/tree-sitter-language-pack/chatito-tags.scm +16 -0
  77. aider/queries/tree-sitter-language-pack/clojure-tags.scm +7 -0
  78. aider/queries/tree-sitter-language-pack/commonlisp-tags.scm +122 -0
  79. aider/queries/tree-sitter-language-pack/cpp-tags.scm +15 -0
  80. aider/queries/tree-sitter-language-pack/csharp-tags.scm +26 -0
  81. aider/queries/tree-sitter-language-pack/d-tags.scm +26 -0
  82. aider/queries/tree-sitter-language-pack/dart-tags.scm +92 -0
  83. aider/queries/tree-sitter-language-pack/elisp-tags.scm +5 -0
  84. aider/queries/tree-sitter-language-pack/elixir-tags.scm +54 -0
  85. aider/queries/tree-sitter-language-pack/elm-tags.scm +19 -0
  86. aider/queries/tree-sitter-language-pack/gleam-tags.scm +41 -0
  87. aider/queries/tree-sitter-language-pack/go-tags.scm +42 -0
  88. aider/queries/tree-sitter-language-pack/java-tags.scm +20 -0
  89. aider/queries/tree-sitter-language-pack/javascript-tags.scm +88 -0
  90. aider/queries/tree-sitter-language-pack/lua-tags.scm +34 -0
  91. aider/queries/tree-sitter-language-pack/matlab-tags.scm +10 -0
  92. aider/queries/tree-sitter-language-pack/ocaml-tags.scm +115 -0
  93. aider/queries/tree-sitter-language-pack/ocaml_interface-tags.scm +98 -0
  94. aider/queries/tree-sitter-language-pack/pony-tags.scm +39 -0
  95. aider/queries/tree-sitter-language-pack/properties-tags.scm +5 -0
  96. aider/queries/tree-sitter-language-pack/python-tags.scm +14 -0
  97. aider/queries/tree-sitter-language-pack/r-tags.scm +21 -0
  98. aider/queries/tree-sitter-language-pack/racket-tags.scm +12 -0
  99. aider/queries/tree-sitter-language-pack/ruby-tags.scm +64 -0
  100. aider/queries/tree-sitter-language-pack/rust-tags.scm +60 -0
  101. aider/queries/tree-sitter-language-pack/solidity-tags.scm +43 -0
  102. aider/queries/tree-sitter-language-pack/swift-tags.scm +51 -0
  103. aider/queries/tree-sitter-language-pack/udev-tags.scm +20 -0
  104. aider/queries/tree-sitter-languages/README.md +24 -0
  105. aider/queries/tree-sitter-languages/c-tags.scm +9 -0
  106. aider/queries/tree-sitter-languages/c_sharp-tags.scm +46 -0
  107. aider/queries/tree-sitter-languages/cpp-tags.scm +15 -0
  108. aider/queries/tree-sitter-languages/dart-tags.scm +91 -0
  109. aider/queries/tree-sitter-languages/elisp-tags.scm +8 -0
  110. aider/queries/tree-sitter-languages/elixir-tags.scm +54 -0
  111. aider/queries/tree-sitter-languages/elm-tags.scm +19 -0
  112. aider/queries/tree-sitter-languages/fortran-tags.scm +15 -0
  113. aider/queries/tree-sitter-languages/go-tags.scm +30 -0
  114. aider/queries/tree-sitter-languages/haskell-tags.scm +3 -0
  115. aider/queries/tree-sitter-languages/hcl-tags.scm +77 -0
  116. aider/queries/tree-sitter-languages/java-tags.scm +20 -0
  117. aider/queries/tree-sitter-languages/javascript-tags.scm +88 -0
  118. aider/queries/tree-sitter-languages/julia-tags.scm +60 -0
  119. aider/queries/tree-sitter-languages/kotlin-tags.scm +27 -0
  120. aider/queries/tree-sitter-languages/matlab-tags.scm +10 -0
  121. aider/queries/tree-sitter-languages/ocaml-tags.scm +115 -0
  122. aider/queries/tree-sitter-languages/ocaml_interface-tags.scm +98 -0
  123. aider/queries/tree-sitter-languages/php-tags.scm +26 -0
  124. aider/queries/tree-sitter-languages/python-tags.scm +12 -0
  125. aider/queries/tree-sitter-languages/ql-tags.scm +26 -0
  126. aider/queries/tree-sitter-languages/ruby-tags.scm +64 -0
  127. aider/queries/tree-sitter-languages/rust-tags.scm +60 -0
  128. aider/queries/tree-sitter-languages/scala-tags.scm +65 -0
  129. aider/queries/tree-sitter-languages/typescript-tags.scm +41 -0
  130. aider/queries/tree-sitter-languages/zig-tags.scm +3 -0
  131. aider/reasoning_tags.py +82 -0
  132. aider/repo.py +621 -0
  133. aider/repomap.py +1174 -0
  134. aider/report.py +260 -0
  135. aider/resources/__init__.py +3 -0
  136. aider/resources/model-metadata.json +776 -0
  137. aider/resources/model-settings.yml +2068 -0
  138. aider/run_cmd.py +133 -0
  139. aider/scrape.py +293 -0
  140. aider/sendchat.py +242 -0
  141. aider/sessions.py +256 -0
  142. aider/special.py +203 -0
  143. aider/tools/__init__.py +72 -0
  144. aider/tools/command.py +105 -0
  145. aider/tools/command_interactive.py +122 -0
  146. aider/tools/delete_block.py +182 -0
  147. aider/tools/delete_line.py +155 -0
  148. aider/tools/delete_lines.py +184 -0
  149. aider/tools/extract_lines.py +341 -0
  150. aider/tools/finished.py +48 -0
  151. aider/tools/git_branch.py +129 -0
  152. aider/tools/git_diff.py +60 -0
  153. aider/tools/git_log.py +57 -0
  154. aider/tools/git_remote.py +53 -0
  155. aider/tools/git_show.py +51 -0
  156. aider/tools/git_status.py +46 -0
  157. aider/tools/grep.py +256 -0
  158. aider/tools/indent_lines.py +221 -0
  159. aider/tools/insert_block.py +288 -0
  160. aider/tools/list_changes.py +86 -0
  161. aider/tools/ls.py +93 -0
  162. aider/tools/make_editable.py +85 -0
  163. aider/tools/make_readonly.py +69 -0
  164. aider/tools/remove.py +91 -0
  165. aider/tools/replace_all.py +126 -0
  166. aider/tools/replace_line.py +173 -0
  167. aider/tools/replace_lines.py +217 -0
  168. aider/tools/replace_text.py +187 -0
  169. aider/tools/show_numbered_context.py +147 -0
  170. aider/tools/tool_utils.py +313 -0
  171. aider/tools/undo_change.py +95 -0
  172. aider/tools/update_todo_list.py +156 -0
  173. aider/tools/view.py +57 -0
  174. aider/tools/view_files_matching.py +141 -0
  175. aider/tools/view_files_with_symbol.py +129 -0
  176. aider/urls.py +17 -0
  177. aider/utils.py +456 -0
  178. aider/versioncheck.py +113 -0
  179. aider/voice.py +205 -0
  180. aider/waiting.py +38 -0
  181. aider/watch.py +318 -0
  182. aider/watch_prompts.py +12 -0
  183. aider/website/Gemfile +8 -0
  184. aider/website/_includes/blame.md +162 -0
  185. aider/website/_includes/get-started.md +22 -0
  186. aider/website/_includes/help-tip.md +5 -0
  187. aider/website/_includes/help.md +24 -0
  188. aider/website/_includes/install.md +5 -0
  189. aider/website/_includes/keys.md +4 -0
  190. aider/website/_includes/model-warnings.md +67 -0
  191. aider/website/_includes/multi-line.md +22 -0
  192. aider/website/_includes/python-m-aider.md +5 -0
  193. aider/website/_includes/recording.css +228 -0
  194. aider/website/_includes/recording.md +34 -0
  195. aider/website/_includes/replit-pipx.md +9 -0
  196. aider/website/_includes/works-best.md +1 -0
  197. aider/website/_sass/custom/custom.scss +103 -0
  198. aider/website/docs/config/adv-model-settings.md +2261 -0
  199. aider/website/docs/config/agent-mode.md +194 -0
  200. aider/website/docs/config/aider_conf.md +548 -0
  201. aider/website/docs/config/api-keys.md +90 -0
  202. aider/website/docs/config/dotenv.md +493 -0
  203. aider/website/docs/config/editor.md +127 -0
  204. aider/website/docs/config/mcp.md +95 -0
  205. aider/website/docs/config/model-aliases.md +104 -0
  206. aider/website/docs/config/options.md +890 -0
  207. aider/website/docs/config/reasoning.md +210 -0
  208. aider/website/docs/config.md +44 -0
  209. aider/website/docs/faq.md +384 -0
  210. aider/website/docs/git.md +76 -0
  211. aider/website/docs/index.md +47 -0
  212. aider/website/docs/install/codespaces.md +39 -0
  213. aider/website/docs/install/docker.md +57 -0
  214. aider/website/docs/install/optional.md +100 -0
  215. aider/website/docs/install/replit.md +8 -0
  216. aider/website/docs/install.md +115 -0
  217. aider/website/docs/languages.md +264 -0
  218. aider/website/docs/legal/contributor-agreement.md +111 -0
  219. aider/website/docs/legal/privacy.md +104 -0
  220. aider/website/docs/llms/anthropic.md +77 -0
  221. aider/website/docs/llms/azure.md +48 -0
  222. aider/website/docs/llms/bedrock.md +132 -0
  223. aider/website/docs/llms/cohere.md +34 -0
  224. aider/website/docs/llms/deepseek.md +32 -0
  225. aider/website/docs/llms/gemini.md +49 -0
  226. aider/website/docs/llms/github.md +111 -0
  227. aider/website/docs/llms/groq.md +36 -0
  228. aider/website/docs/llms/lm-studio.md +39 -0
  229. aider/website/docs/llms/ollama.md +75 -0
  230. aider/website/docs/llms/openai-compat.md +39 -0
  231. aider/website/docs/llms/openai.md +58 -0
  232. aider/website/docs/llms/openrouter.md +78 -0
  233. aider/website/docs/llms/other.md +117 -0
  234. aider/website/docs/llms/vertex.md +50 -0
  235. aider/website/docs/llms/warnings.md +10 -0
  236. aider/website/docs/llms/xai.md +53 -0
  237. aider/website/docs/llms.md +54 -0
  238. aider/website/docs/more/analytics.md +127 -0
  239. aider/website/docs/more/edit-formats.md +116 -0
  240. aider/website/docs/more/infinite-output.md +165 -0
  241. aider/website/docs/more-info.md +8 -0
  242. aider/website/docs/recordings/auto-accept-architect.md +31 -0
  243. aider/website/docs/recordings/dont-drop-original-read-files.md +35 -0
  244. aider/website/docs/recordings/index.md +21 -0
  245. aider/website/docs/recordings/model-accepts-settings.md +69 -0
  246. aider/website/docs/recordings/tree-sitter-language-pack.md +80 -0
  247. aider/website/docs/repomap.md +112 -0
  248. aider/website/docs/scripting.md +100 -0
  249. aider/website/docs/sessions.md +203 -0
  250. aider/website/docs/troubleshooting/aider-not-found.md +24 -0
  251. aider/website/docs/troubleshooting/edit-errors.md +76 -0
  252. aider/website/docs/troubleshooting/imports.md +62 -0
  253. aider/website/docs/troubleshooting/models-and-keys.md +54 -0
  254. aider/website/docs/troubleshooting/support.md +79 -0
  255. aider/website/docs/troubleshooting/token-limits.md +96 -0
  256. aider/website/docs/troubleshooting/warnings.md +12 -0
  257. aider/website/docs/troubleshooting.md +11 -0
  258. aider/website/docs/usage/browser.md +57 -0
  259. aider/website/docs/usage/caching.md +49 -0
  260. aider/website/docs/usage/commands.md +133 -0
  261. aider/website/docs/usage/conventions.md +119 -0
  262. aider/website/docs/usage/copypaste.md +121 -0
  263. aider/website/docs/usage/images-urls.md +48 -0
  264. aider/website/docs/usage/lint-test.md +118 -0
  265. aider/website/docs/usage/modes.md +211 -0
  266. aider/website/docs/usage/not-code.md +179 -0
  267. aider/website/docs/usage/notifications.md +87 -0
  268. aider/website/docs/usage/tips.md +79 -0
  269. aider/website/docs/usage/tutorials.md +30 -0
  270. aider/website/docs/usage/voice.md +121 -0
  271. aider/website/docs/usage/watch.md +294 -0
  272. aider/website/docs/usage.md +102 -0
  273. aider/website/share/index.md +101 -0
  274. aider_ce-0.88.20.dist-info/METADATA +187 -0
  275. aider_ce-0.88.20.dist-info/RECORD +279 -0
  276. aider_ce-0.88.20.dist-info/WHEEL +5 -0
  277. aider_ce-0.88.20.dist-info/entry_points.txt +2 -0
  278. aider_ce-0.88.20.dist-info/licenses/LICENSE.txt +202 -0
  279. aider_ce-0.88.20.dist-info/top_level.txt +1 -0
@@ -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.
@@ -0,0 +1,165 @@
1
+ ---
2
+ parent: More info
3
+ nav_order: 480
4
+ description: Aider can handle "infinite output" from models that support prefill.
5
+ ---
6
+
7
+ # Infinite output
8
+
9
+ LLM providers limit how much output a model can generate from a single request.
10
+ This is usually called the output token limit.
11
+
12
+ Aider is able to work around this limit with models that support
13
+ "prefilling" the assistant response.
14
+ When you use aider with a model that supports prefill, you will see
15
+ "infinite output" noted in the announcement lines displayed at launch:
16
+
17
+ ```
18
+ Aider v0.58.0
19
+ Main model: claude-3-5-sonnet-20240620 with diff edit format, prompt cache, infinite output
20
+ ```
21
+
22
+ Models that support prefill can be primed to think they started their response
23
+ with a specific piece of text.
24
+ You can put words in their mouth, and they will continue generating
25
+ text from that point forward.
26
+
27
+ When aider is collecting code edits from a model and
28
+ it hits the output token limit,
29
+ aider simply initiates another LLM request with the partial
30
+ response prefilled.
31
+ This prompts the model to continue where it left off,
32
+ generating more of the desired response.
33
+ This prefilling of the partially completed response can be repeated,
34
+ allowing for very long outputs.
35
+ Joining the text across these output limit boundaries
36
+ requires some heuristics, but is typically fairly reliable.
37
+
38
+ Aider supports "infinite output" for models that support "prefill",
39
+ such as:
40
+
41
+ <!--[[[cog
42
+ import requests
43
+ import json
44
+
45
+ # Fetch the JSON data
46
+ url = "https://raw.githubusercontent.com/BerriAI/litellm/refs/heads/main/model_prices_and_context_window.json"
47
+ response = requests.get(url)
48
+ data = json.loads(response.text)
49
+
50
+ # Process the JSON to find models with supports_assistant_prefill=true
51
+ prefill_models = [model for model, info in data.items() if info.get('supports_assistant_prefill') == True]
52
+
53
+ # Generate the list of models
54
+ model_list = "\n".join(f"- {model}" for model in sorted(prefill_models))
55
+
56
+ cog.out(model_list)
57
+ ]]]-->
58
+ - anthropic.claude-3-5-haiku-20241022-v1:0
59
+ - anthropic.claude-3-5-sonnet-20241022-v2:0
60
+ - anthropic.claude-3-7-sonnet-20250219-v1:0
61
+ - anthropic.claude-opus-4-1-20250805-v1:0
62
+ - anthropic.claude-opus-4-20250514-v1:0
63
+ - anthropic.claude-sonnet-4-20250514-v1:0
64
+ - apac.anthropic.claude-3-5-sonnet-20241022-v2:0
65
+ - apac.anthropic.claude-sonnet-4-20250514-v1:0
66
+ - azure_ai/mistral-medium-2505
67
+ - bedrock/us.anthropic.claude-3-5-haiku-20241022-v1:0
68
+ - claude-3-5-haiku-20241022
69
+ - claude-3-5-haiku-latest
70
+ - claude-3-5-sonnet-20240620
71
+ - claude-3-5-sonnet-20241022
72
+ - claude-3-5-sonnet-latest
73
+ - claude-3-7-sonnet-20250219
74
+ - claude-3-7-sonnet-latest
75
+ - claude-3-haiku-20240307
76
+ - claude-3-opus-20240229
77
+ - claude-3-opus-latest
78
+ - claude-4-opus-20250514
79
+ - claude-4-sonnet-20250514
80
+ - claude-opus-4-1
81
+ - claude-opus-4-1-20250805
82
+ - claude-opus-4-20250514
83
+ - claude-sonnet-4-20250514
84
+ - codestral/codestral-2405
85
+ - codestral/codestral-latest
86
+ - databricks/databricks-claude-3-7-sonnet
87
+ - deepseek/deepseek-chat
88
+ - deepseek/deepseek-coder
89
+ - deepseek/deepseek-r1
90
+ - deepseek/deepseek-reasoner
91
+ - deepseek/deepseek-v3
92
+ - eu.anthropic.claude-3-5-haiku-20241022-v1:0
93
+ - eu.anthropic.claude-3-5-sonnet-20241022-v2:0
94
+ - eu.anthropic.claude-3-7-sonnet-20250219-v1:0
95
+ - eu.anthropic.claude-opus-4-1-20250805-v1:0
96
+ - eu.anthropic.claude-opus-4-20250514-v1:0
97
+ - eu.anthropic.claude-sonnet-4-20250514-v1:0
98
+ - mistral/codestral-2405
99
+ - mistral/codestral-latest
100
+ - mistral/codestral-mamba-latest
101
+ - mistral/devstral-medium-2507
102
+ - mistral/devstral-small-2505
103
+ - mistral/devstral-small-2507
104
+ - mistral/magistral-medium-2506
105
+ - mistral/magistral-medium-latest
106
+ - mistral/magistral-small-2506
107
+ - mistral/magistral-small-latest
108
+ - mistral/mistral-large-2402
109
+ - mistral/mistral-large-2407
110
+ - mistral/mistral-large-2411
111
+ - mistral/mistral-large-latest
112
+ - mistral/mistral-medium
113
+ - mistral/mistral-medium-2312
114
+ - mistral/mistral-medium-2505
115
+ - mistral/mistral-medium-latest
116
+ - mistral/mistral-small
117
+ - mistral/mistral-small-latest
118
+ - mistral/mistral-tiny
119
+ - mistral/open-codestral-mamba
120
+ - mistral/open-mistral-7b
121
+ - mistral/open-mistral-nemo
122
+ - mistral/open-mistral-nemo-2407
123
+ - mistral/open-mixtral-8x22b
124
+ - mistral/open-mixtral-8x7b
125
+ - mistral/pixtral-12b-2409
126
+ - mistral/pixtral-large-2411
127
+ - mistral/pixtral-large-latest
128
+ - openrouter/anthropic/claude-3.5-sonnet
129
+ - openrouter/anthropic/claude-3.7-sonnet
130
+ - openrouter/anthropic/claude-opus-4
131
+ - openrouter/anthropic/claude-opus-4.1
132
+ - openrouter/anthropic/claude-sonnet-4
133
+ - openrouter/deepseek/deepseek-chat-v3.1
134
+ - openrouter/deepseek/deepseek-r1
135
+ - openrouter/deepseek/deepseek-r1-0528
136
+ - us.anthropic.claude-3-5-haiku-20241022-v1:0
137
+ - us.anthropic.claude-3-5-sonnet-20241022-v2:0
138
+ - us.anthropic.claude-3-7-sonnet-20250219-v1:0
139
+ - us.anthropic.claude-opus-4-1-20250805-v1:0
140
+ - us.anthropic.claude-opus-4-20250514-v1:0
141
+ - us.anthropic.claude-sonnet-4-20250514-v1:0
142
+ - vertex_ai/claude-3-5-haiku
143
+ - vertex_ai/claude-3-5-haiku@20241022
144
+ - vertex_ai/claude-3-5-sonnet
145
+ - vertex_ai/claude-3-5-sonnet-v2
146
+ - vertex_ai/claude-3-5-sonnet-v2@20241022
147
+ - vertex_ai/claude-3-5-sonnet@20240620
148
+ - vertex_ai/claude-3-7-sonnet@20250219
149
+ - vertex_ai/claude-3-haiku
150
+ - vertex_ai/claude-3-haiku@20240307
151
+ - vertex_ai/claude-3-opus
152
+ - vertex_ai/claude-3-opus@20240229
153
+ - vertex_ai/claude-3-sonnet
154
+ - vertex_ai/claude-3-sonnet@20240229
155
+ - vertex_ai/claude-opus-4
156
+ - vertex_ai/claude-opus-4-1
157
+ - vertex_ai/claude-opus-4-1@20250805
158
+ - vertex_ai/claude-opus-4@20250514
159
+ - vertex_ai/claude-sonnet-4
160
+ - vertex_ai/claude-sonnet-4@20250514
161
+ - vertex_ai/deepseek-ai/deepseek-r1-0528-maas
162
+ - vertex_ai/deepseek-ai/deepseek-v3.1-maas
163
+ <!--[[[end]]]-->
164
+
165
+
@@ -0,0 +1,8 @@
1
+ ---
2
+ has_children: true
3
+ nav_order: 85
4
+ ---
5
+
6
+ # More info
7
+
8
+ See below for more info about aider, including some advanced topics.