Short path: Cheap LLM API · Cheap OpenAI API · AI agent API · Usage logs · AI API pricing · Models
Last verified: July 26, 2026
A SWE-agent issue run calculates to about $0.105 for a short Terra trajectory, $0.69 for a medium Sol trajectory or $1.62 for a long Sol trajectory under the scenarios below. A failed run repeated from scratch roughly doubles model cost. SWE-agent’s current official documentation also says the project is maintenance-only and recommends evaluating mini-swe-agent for new deployments.
Quick answer
| Issue type | Token assumption | Candidate route | Calculated LumeAPI cost |
|---|---|---|---|
| Localized fix | 80k input / 10k output | GPT-5.6 Terra | $0.105 |
| Reproduce, patch and test | 250k / 35k | GPT-5.6 Sol | $0.690 |
| Long multi-file investigation | 600k / 80k | GPT-5.6 Sol | $1.620 |
| Long Claude route | 600k / 80k | Claude Sonnet 4.6 | $1.500 |
These are cost models, not observed SWE-agent success rates.
In short
A SWE-agent issue run calculates to about $0.105 for a short Terra trajectory, $0.69 for a medium Sol trajectory or $1.62 for a long Sol trajectory under the scenarios below.
What SWE-agent does
SWE-agent converts a GitHub issue or problem statement into an agent trajectory over a repository environment. The model searches files, executes terminal-oriented tools, edits code, runs reproduction steps or tests and submits a patch. Its configuration controls prompts, tools, parsers, model settings, retries and per-instance limits.
GitHub issue
↓
Repository environment
↓
Search → inspect → edit → test → revise
↓
Submitted patch and trajectoryThe official docs now place SWE-agent in maintenance mode and point new users to mini-swe-agent. Existing benchmark or CI pipelines may still justify a pinned SWE-agent version; a new project should compare both.
Candidate LumeAPI configuration
SWE-agent documents OpenAI-compatible endpoints through its LiteLLM-based model configuration:
agent:
model:
name: openai/gpt-5.6-sol
api_base: https://api.lumeapi.site/v1
api_key: $LUMEAPI_API_KEY
per_instance_call_limit: 80
per_instance_cost_limit: 0Use the exact LumeAPI model id after the openai/ client prefix. Unknown model metadata may require a custom LiteLLM registry for internal cost tracking. Do not enter the Research publishing secret as the model key.
This is a candidate configuration. Test function calling, streaming, tool parsing and the installed SWE-agent version before batch execution.
Medium-issue cost breakdown
Assume a 250k-input/35k-output issue. The stages below sum to that total.
| Stage | Input/output tokens | Terra cost | Sol cost |
|---|---|---|---|
| Clone context and understand issue | 60k / 5k | $0.0675 | $0.1350 |
| Search and inspect repository | 80k / 8k | $0.0960 | $0.1920 |
| Edit and reason about patch | 60k / 12k | $0.0990 | $0.1980 |
| Run tests and repair failure | 50k / 10k | $0.0825 | $0.1650 |
| Total | 250k / 35k | $0.3450 | $0.6900 |
The phase labels are analytical allocations. Actual API records will show requests, not “search-stage dollars,” unless the application tags each round.
Failed-run economics
If one medium Sol attempt costs $0.69 and fails, then a second identical attempt makes total spend $1.38. If only the second patch is accepted, cost per accepted issue is $1.38—not $0.69.
Common failure multipliers are:
- Incorrect reproduction environment.
- Repeated test timeouts.
- Tool-call parser mismatch.
- Oversized terminal observations.
- Wrong base commit or stale issue description.
- Automatic API retries followed by a full semantic rerun.
Set both call and wall-time limits. SWE-agent’s reference exposes per_instance_call_limit, cost controls and retry settings; LumeAPI usage records should be reconciled independently.
Production scenario: 100 issues
Assume 60 short Terra runs, 30 medium Sol runs and 10 long Sol runs:
- 60 × $0.105 = $6.30
- 30 × $0.69 = $20.70
- 10 × $1.62 = $16.20
Calculated model spend is $43.20 before failures. With 20% retry overhead it becomes $51.84. If only 40 patches are accepted, model cost per accepted patch is $1.30 after that overhead.
This should be compared with reviewer time and regression risk, not used as a claim that an agent replaces a developer. A fast rejected patch has no delivery value.
How to control issue-level spend
- Triage issue reproducibility before starting the coding agent.
- Pin repository revision and agent configuration.
- Limit call count, elapsed time and test output.
- Use Terra for bounded issues and Sol only under an explicit complexity rule.
- Stop identical failures rather than resetting blindly.
- Attach trajectory id and LumeAPI request ids to the issue.
- Measure accepted patches and reviewer corrections.
Compare the architecture with OpenHands versus SWE-agent, the PR denominator in coding-agent cost per pull request, and the long-session model in 100 tool-call cost.
What most guides get wrong
The usual mistake on How Much Does SWE-agent Cost to Fix One GitHub Issue? is to chase the lowest posted per-million-token rate while ignoring orchestration: repeated context, oversized tool output, silent retries, and premium-model defaults often dominate the invoice.
A cheaper list price does not help when every agent hop resends the same repository map or when failed tests trigger unbounded re-runs. Optimize cost per successful task—not the price of a single completion—before you renegotiate vendor contracts or swap gateways.
A realistic production scenario
A six-person platform team standardized on one premium model for How Much Does SWE-agent Cost to Fix One GitHub Issue? after a strong demo score. Early invoices looked fine; by week three, failing test loops had doubled input tokens without more accepted output.
They kept the orchestrator but tightened routing: a lower-cost catalog model handled exploration, a mid-tier model handled implementation, and premium routes required a logged failure condition. They truncated test logs and stopped attaching full diffs on every retry.
The breakthrough was reconciling LumeAPI usage records with task ids. Token list price mattered less than eliminating duplicate context across retries.
Expert take
LumeAPI is an independent third-party OpenAI-compatible gateway—not OpenAI, Anthropic, or Google. Published catalog rates can be materially below official reference pricing, but compatibility does not guarantee identical behavior for every native feature, streaming edge case, tool schema, Batch workflow, or prompt-cache semantics.
Follow this advice when you control prompts, retries, and routing and need auditable USD billing across GPT, Claude, and Gemini on one key. Do not cut over blindly if you depend on provider-native capabilities your stack has not tested end to end.
Run a bounded smoke test on your exact SDK, model id, streaming mode, and tool path; reconcile usage logs with orchestrator task ids; and keep a fallback route until error rates and latency are acceptable.
FAQ
Is SWE-agent still maintained?
Its repository remains active, but its official documentation describes SWE-agent as maintenance-only and recommends mini-swe-agent for new work.
Can SWE-agent use an OpenAI-compatible API?
Its current documentation supports OpenAI-compatible endpoints through model configuration. Verify the exact model and tool parser.
Which LumeAPI model should fix issues?
Start with Terra for bounded work and evaluate Sol or Sonnet for harder trajectories. Use your accepted-patch data rather than a universal recommendation.
Does the calculation include GitHub Actions or sandbox cost?
No. It covers model tokens only. Compute, storage, network and review are separate.
Sources and methodology
- SWE-agent models and API keys
- SWE-agent model configuration
- SWE-agent repository — 19,914 stars observed July 26, 2026
- LumeAPI model catalog
No customer issue data or success-rate benchmark is represented as a LumeAPI result.