midtry
Query multiple LLM CLIs in parallel and compare their responses.
pip install midtry
midtry "Explain the tradeoffs between REST and GraphQL"
What it does
MidTry spawns parallel calls to available AI CLIs (Claude, Gemini, Codex, etc.), each with a different reasoning perspective, and returns all responses for comparison.
$ midtry "Debug this function"
╭─────────────────────── Task ───────────────────────╮
│ Debug this function │
╰────────────────────────────────────────────────────╯
CLIs available: claude, gemini, codex, qwen
Mode: ORDERED
Timeout: 120s per call
claude (conservative): done (12.3s)
gemini (analytical): done (18.1s)
codex (creative): done (15.7s)
qwen (adversarial): done (22.4s)
=== RESPONSES ===
--- Response 1: Conservative (claude) ---
[methodical step-by-step analysis]
--- Response 2: Analytical (gemini) ---
[edge case focused breakdown]
--- Response 3: Creative (codex) ---
[alternative framing]
--- Response 4: Adversarial (qwen) ---
[challenges assumptions]
=== END RESPONSES ===
Install
pip install midtry
Requires at least one supported CLI installed:
| CLI | Install |
|---|---|
| claude | Claude Code |
| gemini | Gemini CLI |
| codex | OpenAI Codex |
| qwen | Qwen CLI |
| opencode | OpenCode |
| copilot | GitHub Copilot CLI |
Check what's available:
midtry detect
Usage
# Basic usage
midtry "Your question or task"
# Select specific models
midtry --models claude,gemini "Question"
# Quick mode (2 models only)
midtry --quick "Question"
# Random perspective assignment
midtry --random "Question"
# Demo mode (no API calls)
midtry demo
Python API
import midtry
result = midtry.solve("Optimize this SQL query", clis=["claude", "gemini"])
for r in result.results:
print(f"{r.cli} ({r.perspective.value}): {r.output[:100]}...")
Perspectives
Each CLI receives the task with a different framing:
| Perspective | Prompt style |
|---|---|
| Conservative | Careful, methodical, prioritizes correctness |
| Analytical | Systematic, considers edge cases |
| Creative | Alternative approaches, simpler reframings |
| Adversarial | Challenges obvious answers, looks for tricks |
Configuration
Create config.toml in your working directory:
[midtry]
timeout_seconds = 120
max_parallel = 4
mode = "random" # or "ordered"
[perspectives]
sources = ["claude", "gemini", "codex", "qwen"]
[perspectives.prompts]
conservative = "Solve carefully. Double-check each step. Task: {task}"
analytical = "Break down systematically. Consider edge cases. Task: {task}"
creative = "Consider unconventional approaches. Task: {task}"
adversarial = "Challenge the obvious answer. Task: {task}"
Or use environment variables:
MIDTRY_TIMEOUT=60 midtry "Question"
MIDTRY_CLIS="claude gemini" midtry "Question"
Limitations
- Requires external CLI tools installed and authenticated
- Latency scales with slowest model
- No automatic synthesis of responses (you aggregate manually)
- Quality depends on underlying models
When to use
- Complex problems where multiple viewpoints help
- Code review, debugging, architectural decisions
- When you want to see how different models approach a problem
- Building confidence through diverse perspectives
When not to use
- Simple factual questions
- Time-sensitive queries
- Problems with obvious single solutions
Background
MidTry applies ideas from DeepSeek-R1 (structured reasoning with verification) and mHC (multi-stream exploration) at inference time. The diversity comes from querying different models, not from training-time optimization.
License
MIT
Built with multi-agent consensus.
Metadata
Release files for midtry 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| midtry-0.1.0.tar.gz | 15.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| midtry-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 29.4 kB
Release files / midtry-0.1.0.tar.gz
| Download URL | midtry-0.1.0.tar.gz |
|---|---|
| Size | 15.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
51281b964af4623b4578f2668241b6904759e9772e254190807940515de6c17d
|
|
BLAKE2b-256 checksum How to use checksums |
9001f51b71822a433dcde0b68952e429822939712542197d1c5cb8710d363d10
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 10, 2026.
Transparency logRelease files / midtry-0.1.0-py3-none-any.whl
| Download URL | midtry-0.1.0-py3-none-any.whl |
|---|---|
| Size | 14.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
96606e5e063541d2dc42643bbd369b4e1fbf5a484735ef9a29a1189e643b1ac3
|
|
BLAKE2b-256 checksum How to use checksums |
1885254afaf31410e38a21eacbc1c923714ec472fabec3e66bda7c5240e0f91a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 10, 2026.
Transparency log