From 187784a012632e2d1f7c70c613f7515752f6e951 Mon Sep 17 00:00:00 2001 From: GiggleLiu Date: Fri, 17 Jul 2026 21:46:03 +0800 Subject: [PATCH] Make the runner image actually runnable: litellm proxy-deps + cost-tracking hint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - requirements.txt: declare fastapi + orjson — litellm 1.92.0 (latest, pulled by mini-swe-agent 2.4.5) unconditionally imports proxy-only modules from completion() (litellm.responses.mcp → litellm.proxy.*), so every model call in the published image died with ModuleNotFoundError: fastapi (then orjson). litellm[proxy] is unusable (granian pin unresolvable). - submission.env.example: document MSWEA_COST_TRACKING=ignore_errors for models missing from litellm's price map — without it mini-swe aborts the session on the cost-calculation error (hit with openai/kimi-for-coding + API_BASE). Both failure modes were reproduced and the fixes validated end-to-end in the v0.6.0 image (preflight: pred 0.6.0 PASS, 262 rules PASS, live kimi-for-coding call PASS). --- benchmark/requirements.txt | 6 ++++++ submission.env.example | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/benchmark/requirements.txt b/benchmark/requirements.txt index b7d59af..0a787be 100644 --- a/benchmark/requirements.txt +++ b/benchmark/requirements.txt @@ -2,3 +2,9 @@ mini-swe-agent==2.4.5 pyyaml>=6.0.3 pytest>=9.1.1 pytest-timeout>=2.4.0 +# litellm 1.92.0 (pulled by mini-swe-agent) unconditionally imports proxy-only +# deps from completion() (litellm.responses.mcp → litellm.proxy.*). Declare them +# until a litellm release makes that import lazy; litellm[proxy] is NOT an +# option (its granian pin is unresolvable). +fastapi>=0.115 +orjson>=3.10 diff --git a/submission.env.example b/submission.env.example index bf78289..89821c2 100644 --- a/submission.env.example +++ b/submission.env.example @@ -26,6 +26,10 @@ MODEL_NAME=openai/gpt-5.4 # API_KEY=... # generic key when no PROVIDER_API_KEY name fits # MODEL_KWARGS={"custom_llm_provider":"openai","extra_headers":{"X-Org":"acme"}} # # ^ JSON of extra litellm.completion kwargs (api_version, temperature, …) +# MSWEA_COST_TRACKING=ignore_errors +# # ^ required when your model isn't in litellm's price map (typical for custom +# # endpoints) — mini-swe otherwise aborts the session on the cost-calculation +# # error. Token usage is still recorded from API responses. # ── LIMITS ──────────────────────────────────────────────────────────────────── # MAX_TOKENS=8192 # per-call output ceiling