IDE & Client Integration Guide 💻¶
How to connect mini-infer to Cursor, VS Code Continue, Aider, Cline, and custom OpenAI clients.
Overview¶
mini-infer implements standard OpenAI-compatible endpoints:
* POST /v1/chat/completions (Server-Sent Events streaming)
* GET /v1/models
Any tool that works with OpenAI, vLLM, or Ollama works with mini-infer.
1. VS Code (Continue Extension)¶
- Install the Continue extension from the VS Code Marketplace.
- Open
~/.continue/config.json(or click the gear icon in Continue). - Add
mini-inferas a model provider:
{
"models": [
{
"title": "mini-infer Local",
"provider": "openai",
"model": "Qwen/Qwen2.5-Coder-1.5B-Instruct",
"apiBase": "http://127.0.0.1:8000/v1",
"apiKey": "not-needed"
}
]
}
2. Cursor IDE¶
- Open Cursor Settings (
Ctrl + Shift + JorCmd + Shift + J). - Navigate to Models.
- Under OpenAI API Key, toggle Override OpenAI Base URL:
- Base URL:
http://127.0.0.1:8000/v1 - API Key:
dummy(or any string) - Add model name:
Qwen/Qwen2.5-Coder-1.5B-Instruct(orQwen/Qwen2.5-0.5B-Instruct).
3. Aider (Autonomous Terminal Pair Programmer)¶
Aider is an AI pair programmer in your terminal that automatically edits files and creates git commits for you.
Launch Aider:¶
On Windows (PowerShell):
$env:OPENAI_API_BASE = "http://127.0.0.1:8000/v1"
$env:OPENAI_API_KEY = "dummy"
aider --model openai/Qwen/Qwen2.5-Coder-1.5B-Instruct
On Linux / macOS (bash/zsh):
export OPENAI_API_BASE=http://127.0.0.1:8000/v1
export OPENAI_API_KEY=dummy
aider --model openai/Qwen/Qwen2.5-Coder-1.5B-Instruct
4. Zero-File-Selection Prompting (Direct Instructions)¶
Developers often ask: "How do I prompt without selecting/pasting files or typing @filename every time?"
Here is how each tool handles zero-file selection:
A. In Aider (Autonomous Codebase Navigation)¶
You do not need to type /add src/api/app.py. Aider automatically reads the repository map:
1. Simply type your goal in natural language:
src/api/app.py, asks Add src/api/app.py to the chat? (Y/n), applies the change directly to disk, and commits it.
B. In mini-infer chat -c ./src (Zero Configuration)¶
Because you passed -c ./src, the entire architectural skeleton is already resident in the model's KV-cache:
1. Type your prompt:
C. In VS Code Continue (@Codebase)¶
Instead of typing @app.py, use the @Codebase context provider in the Continue sidebar:
5. Python OpenAI Client¶
from openai import OpenAI
client = OpenAI(
base_url="http://127.0.0.1:8000/v1",
api_key="not-needed",
)
response = client.chat.completions.create(
model="Qwen/Qwen2.5-Coder-1.5B-Instruct",
messages=[
{"role": "system", "content": "You are a helpful software engineer."},
{"role": "user", "content": "Write a Python decorator that retries on exception."},
],
stream=True,
)
for chunk in response:
if chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="", flush=True)
print()