Architect8999 commited on
Commit
dd4ccce
·
verified ·
1 Parent(s): a913714

Install aider --no-deps to escape pillow/litellm pin conflicts

Browse files

Aider 0.86.2 hard-pins pillow==12.1.1 (conflicts with gradio<12) and litellm==1.75.0 (broken module surface). Move aider out of requirements.txt and into a Dockerfile --no-deps install, then provide a curated set of runtime deps and a patched litellm.

Files changed (2) hide show
  1. Dockerfile +16 -6
  2. requirements.txt +5 -6
Dockerfile CHANGED
@@ -20,12 +20,22 @@ COPY requirements.txt .
20
  # that require special compile-time tooling (e.g. atheris/libFuzzer).
21
  # atheris has been removed from requirements.txt; Hypothesis is the fallback.
22
  RUN pip install --no-cache-dir -r requirements.txt mcp-server-fetch && \
23
- # Aider 0.86.2 hard-pins litellm==1.75.0 which has a broken module
24
- # surface (missing APIConnectionError, _logging, encode, token_counter
25
- # at module level). Force-upgrade to a patched litellm after aider
26
- # is installed pip's --no-deps lets us override aider's pin, and
27
- # aider only uses litellm via getattr so a newer release works fine.
28
- pip install --no-cache-dir --upgrade --no-deps "litellm==1.78.5"
 
 
 
 
 
 
 
 
 
 
29
 
30
 
31
  # Stage 2: Runtime — inherits installed packages from base
 
20
  # that require special compile-time tooling (e.g. atheris/libFuzzer).
21
  # atheris has been removed from requirements.txt; Hypothesis is the fallback.
22
  RUN pip install --no-cache-dir -r requirements.txt mcp-server-fetch && \
23
+ # Aider's strict pins (pillow==12.1.1, litellm==1.75.0) conflict with
24
+ # gradio (pillow<12) and ship a broken litellm module surface
25
+ # (missing APIConnectionError, _logging, encode, token_counter).
26
+ # We install aider WITHOUT its deps and then provide a known-good
27
+ # set of its actual runtime imports letting gradio's pillow 11
28
+ # win, and a patched litellm replace the broken 1.75.0.
29
+ pip install --no-cache-dir --no-deps "aider-chat==0.86.2" && \
30
+ pip install --no-cache-dir --upgrade --no-deps "litellm==1.78.5" && \
31
+ pip install --no-cache-dir \
32
+ "configargparse" "jsonschema" "rich" "prompt_toolkit" "pyyaml" \
33
+ "packaging" "pathspec" "diskcache" "networkx" "scipy" \
34
+ "beautifulsoup4" "pypandoc" "flake8" "importlib_resources" \
35
+ "pyperclip" "pexpect" "json5" "psutil" "watchfiles" "socksio" \
36
+ "mixpanel" "posthog" "tree-sitter" "grep_ast" "oslex" \
37
+ "tokenizers" "google-generativeai" "openai" "diff-match-patch" \
38
+ "soundfile" "sounddevice"
39
 
40
 
41
  # Stage 2: Runtime — inherits installed packages from base
requirements.txt CHANGED
@@ -4,12 +4,11 @@ uv>=0.7.0
4
  gitpython==3.1.46
5
  gradio>=5.49.0,<6
6
  jinja2==3.1.6
7
- # aider 0.86.2 is the latest published version. It hard-pins
8
- # litellm==1.75.0, but that release has a broken module surface — every
9
- # call dies with `module 'litellm' has no attribute 'APIConnectionError'`
10
- # (and `_logging`). The Dockerfile force-upgrades litellm AFTER aider so
11
- # the runtime gets a litellm with the missing attributes restored.
12
- aider-chat==0.86.2
13
  ruff
14
  tenacity
15
  bandit[toml]
 
4
  gitpython==3.1.46
5
  gradio>=5.49.0,<6
6
  jinja2==3.1.6
7
+ # aider-chat is intentionally NOT listed here it hard-pins
8
+ # pillow==12.1.1 which conflicts with gradio (pillow<12) and litellm==1.75.0
9
+ # which has a broken module surface (missing APIConnectionError, _logging).
10
+ # The Dockerfile installs aider with --no-deps after this requirements file
11
+ # resolves, plus a patched litellm and aider's actual runtime deps.
 
12
  ruff
13
  tenacity
14
  bandit[toml]