Answer: You need to set LM_STUDIO_API_KEY (to a dummy value like dummy-api-key) and LM_STUDIO_API_BASE (default http://localhost:1234/v1). Status: Confirmed Entry: tool/aider/settings/lm-studio-env-vars Revision: 1 Digest: sha256:a793cd22ee053c99 (changes whenever the content changes) Timeline: Created: 2026-11-13T02:56:28Z Last changed: 2026-11-13T02:56:28Z Last verified: 2026-11-20T11:43:07Z Next check: 2026-11-21T11:43:07Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of API key variable | LM_STUDIO_API_KEY | [1] | 2026-11-20 API key value | dummy-api-key | [1] | 2026-11-20 API base variable | LM_STUDIO_API_BASE | [1] | 2026-11-20 API base URL | http://localhost:1234/v1 | [1] | 2026-11-20 Sources: [1] Aider. "aider.chat/docs/llms/lm-studio.html". https://aider.chat/docs/llms/lm-studio.html Role: primary. Accessed: 2026-11-20T11:43:07Z Quote: "export LM_STUDIO_API_KEY=dummy-api-key" (Supports: API key variable) Quote: "the LM_STUDIO_API_KEY must have a dummy value like dummy-api-key set" (Supports: API key value) Quote: "export LM_STUDIO_API_BASE=http://localhost:1234/v1" (Supports: API base variable) Quote: "LM Studio default server URL is http://localhost:1234/v1" (Supports: API base URL) Published: 2026-04-25T16:45:23Z Snapshot SHA-256: 4760c6367a56b80343e4b305b8871e408291e24c71c53451a63e771908a148ca (captured 2026-11-13T02:56:28Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-13T02:56:28Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T11:43:07Z. No independent second source is configured for this entry Last successful check: 2026-11-20T11:43:07Z Last attempt: 2026-11-20T11:43:07Z Notes and limitations: Extracted automatically from a single official source (section "LM Studio"). Related: https://latestn.com/tool/aider/settings/model-alias-priority How does Aider resolve conflicts when multiple model aliases match? https://latestn.com/tool/aider/settings/model-settings-config-file-locations Where are Aider's model settings configuration files located? https://latestn.com/tool/aider/settings/notification-configuration How do I configure Aider notifications in the config file? https://latestn.com/tool/aider/settings/enable-repository-map How do I turn on the repository map in Aider? https://latestn.com/tool/aider/settings/env-var-config How do I set Aider options using environment variables or a .env file? https://latestn.com/tool/aider/settings/grok-reasoning-effort How do I set the reasoning effort for Grok 3 Mini in Aider? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T02:56:28Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/aider/settings/lm-studio-env-vars/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/aider/settings/lm-studio-env-vars POST: https://latestn.com/dispute/tool/aider/settings/lm-studio-env-vars with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/aider/settings/lm-studio-env-vars?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). What environment variables do I need to set for Aider to use LM Studio? Revision 1, last verified 2026-11-20T11:43:07Z. https://latestn.com/tool/aider/settings/lm-studio-env-vars (accessed 2026-11-21T10:01:49Z). @misc{LatestN_tool_aider_settings_lm_studio_env_vars_r1, title = {What environment variables do I need to set for Aider to use LM Studio?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/aider/settings/lm-studio-env-vars}}, note = {Revision 1; digest sha256:a793cd22ee053c99; last verified 2026-11-20T11:43:07Z; accessed 2026-11-21T10:01:49Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/aider/settings/lm-studio-env-vars