SweBenchEvaluate._SUBSET_MAP mapped the "multimodal" subset to
"swe-bench_multimodal", but sb-cli's Subset enum only accepts
swe-bench_lite, swe-bench_verified and swe-bench-m. Submitting
"swe-bench_multimodal" is rejected at the sb-cli argument boundary, so
--evaluate=True on a multimodal run always failed.
Map "multimodal" to "swe-bench-m" instead. The "full" and
"multilingual" subsets are valid for loading instances but have no
sb-cli equivalent, so building the call now raises a clear ValueError
naming the supported subsets rather than a bare KeyError.
Add regression tests covering the subset mapping and the unsupported
subsets.
Signed-off-by: Anas Khan <83116240+anxkhn@users.noreply.github.com>
The "Problem statements and union types" section of the command line
tutorial listed `--problem_statement.data_path` and
`--problem_statement.repo_path` as examples of how to specify the problem
to solve. Neither flag exists: the problem statement types only expose
`text`, `path`, and `github_url`, and `data_path`/`repo_path` are the
pre-1.0 names that the CLI now explicitly rejects (see the auto-correct
entries in run_single.py). Running either flag fails with an
"unrecognized arguments" error, and `repo_path` also belonged to the
environment, not the problem statement.
Replace them with the three flags that map to the union members shown
right below (GithubIssue, FileProblemStatement, TextProblemStatement):
`--problem_statement.github_url`, `--problem_statement.path`, and
`--problem_statement.text`.
Signed-off-by: Anas Khan <83116240+anxkhn@users.noreply.github.com>
The demonstrations guide documents the conversion command as
`sweagent traj-to-demo --traj_path<path to trajectory file.traj>`, but
copying it verbatim fails argument parsing:
sweagent: error: the following arguments are required: traj_path
`traj-to-demo` is argparse-based and declares `traj_path` as a positional
argument (sweagent/run/run_traj_to_demo.py), not a `--traj_path` option, so
the `--traj_path` form is unrecognized. The documented string also glues the
flag to the placeholder with no space.
Use the positional form `sweagent traj-to-demo <path to trajectory file.traj>`
so the command runs as written. The following run-replay step is left
unchanged: run-replay is pydantic-settings based and does expose a real
`--traj_path` field.
Signed-off-by: Anas Khan <83116240+anxkhn@users.noreply.github.com>
SWEBenchMultimodalProblemStatement._download_and_convert_image compared the
full lowercased Content-Type header against VALID_IMAGE_MIME_TYPES. When a
server returns a valid image with media type parameters (for example
"Content-Type: image/png; charset=utf-8", which is legal per RFC 9110), the
string "image/png; charset=utf-8" is not in the allowed set, so the image is
logged as an unsupported MIME type and silently dropped from the problem
statement.
Strip the media type parameters (split on ";", strip, lowercase) before the
existing image/jpg -> image/jpeg normalization and the membership check, so the
bare media type is validated and used in the encoded data URI. Behavior for
unsupported types, size limits, empty images, and network failures is
unchanged.
Add a regression test covering a Content-Type header with a charset parameter.
Closes#1441
Signed-off-by: Anas Khan <83116240+anxkhn@users.noreply.github.com>
The multimodal docs told users to run
`--templates.disable_image_processing=true` to disable image processing.
That flag is rejected by the CLI: `disable_image_processing` lives on
TemplateConfig, which is only reachable under `agent.templates`, and the
top-level run config sets `extra="forbid"`, so the unprefixed flag fails
parsing with `unrecognized arguments`.
Add the missing `agent.` prefix so the documented command matches the
config hierarchy (and the correct YAML shown earlier on the same page):
`--agent.templates.disable_image_processing=true`.
_parse_gh_repo_url left a trailing .git on the repo name, so a clone
URL like https://github.com/SWE-agent/SWE-agent.git produced
repo_name SWE-agent__SWE-agent.git, polluting instance ids and output
dir names. Strip it off the repo group and extend the test.
LiteLLM sometimes delivers parsed arguments as a dict instead of a
JSON string; assign values in that branch before validation.
Co-authored-by: Cursor <cursoragent@cursor.com>
Require litellm>=1.44.12 to avoid resolving to versions with known
CVEs while keeping existing exclusions for broken releases.
Fixes#1429.
Co-authored-by: Cursor <cursoragent@cursor.com>
The shared_invite link (zt-36pj9bu5s) expired — Slack kills these
after 30 days. Pointed all three occurrences at the workspace URL
instead, which doesn't expire.
Fixes#1383
Root cause: on_instance_start stored env and problem_statement as plain instance attributes. With ThreadPoolExecutor, a shared hook instance was written by worker B before worker A's on_instance_completed ran, causing the wrong instance_id to be used and patches saved to the wrong directory.
Fix: store per-instance state in threading.local() so each worker thread gets an isolated copy.
Adds a `User-Agent: swe-agent/<version>` header to all LLM API calls
made via litellm. This helps API providers identify traffic from
SWE-agent for analytics and debugging.
- Uses copy.deepcopy() for completion_kwargs to avoid mutating the
original config when extra_headers are present
- Respects user-provided User-Agent headers (no override)
- Adds tests for default header, preserved custom header, and
coexistence with other extra_headers
* Doc: Improve reference documentation with descriptions and fix links
- Add page titles and descriptions to reference docs
- Document ShellAgentConfig in agent configuration
- Add missing model configuration classes
- Fix relative link syntax in bundle and tools config
- Improve documentation consistency across reference pages
Signed-off-by: Joshua Shanks <jjshanks@gmail.com>
* Doc: Address review comments on reference documentation
- Update ShellAgent description to clarify it's invoked with `sweagent sh` for interactive workflows
- Move model config classes (HumanModelConfig, HumanThoughtModelConfig, ReplayModelConfig, InstantEmptySubmitModelConfig) from API LMs section to group with their corresponding model classes in testing sections
- Simplify parsers.md description to concisely explain action parser functionality
- Update template_config.md to better describe how templates format inputs/outputs for LM queries
---------
Signed-off-by: Joshua Shanks <jjshanks@gmail.com>