计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
optillm【效率与协作】Use OptiLLM as an OpenAI-compatible optimizing inference proxy with approach routing, plugins, local inference, decoding, and safe troubleshooting guidance.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this skill when a task involves OptiLLM: starting or configuring the proxy, routing OpenAI-compatible chat requests through inference-time optimization approaches, enabling plugins/tools, using built-in local model inference, or diagnosing OptiLLM API/config/runtime failures.
OptiLLM is a Python package and Flask service that exposes OpenAI-compatible endpoints while applying reasoning, search, voting, planning, plugin, and local decoding techniques at inference time.
n, Docker, /health, /v1/models, or /v1/chat/completions, read sub-skills/proxy-server/SKILL.md.moa, bon, mcts, cepo, mars, z3, re2, or cot_reflection, read sub-skills/optimization-approaches/SKILL.md.OPTILLM_API_KEY, CUDA/MPS/MLX, logprobs, reasoning tokens, or decoding methods such as cot_decoding, entropy_decoding, thinkdeeper, deepconf, or autothink, read sub-skills/local-inference-decoding/SKILL.md.For cross-cutting install/import/provider failures, read references/troubleshooting.md. For shared CLI/environment settings, read references/configuration.md. For source/version staleness checks, read references/repo-provenance.md.
For normal package use:
pip install optillm
optillm --version
For source checkout work:
python -m pip install -e .
python - <<'PY'
import optillm
from optillm import parse_combined_approach, known_approaches
print(optillm.__version__)
print(parse_combined_approach("moa-gpt-4o-mini", known_approaches, {}))
PY
A healthy import exposes optillm.__version__, server helpers such as parse_combined_approach, and approach slugs including none, mcts, bon, moa, rto, z3, self_consistency, pvg, rstar, cot_reflection, plansearch, leap, re2, cepo, and mars.
Start the server with a provider key or local inference key, then point any OpenAI client at http://localhost:8000/v1:
export OPENAI_API_KEY="..."
optillm --approach auto --model gpt-4o-mini
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8000/v1", api_key="...")
response = client.chat.completions.create(
model="moa-gpt-4o-mini",
messages=[{"role": "user", "content": "Solve the problem."}],
)
Read sub-skills/proxy-server/SKILL.md before changing auth, SSL, host binding, batching, streaming, or provider fallback behavior.
OptiLLM can select approaches by model prefix (moa-gpt-4o-mini), request body (optillm_approach), or prompt tag (<optillm_approach>re2</optillm_approach>). Use & for pipeline composition and | for parallel alternatives. Read sub-skills/optimization-approaches/SKILL.md before composing expensive multi-call methods.
Plugins are discovered from optillm/plugins when the server loads them. Plugin slugs include memory, privacy, mcp, json, proxy, spl, longcepo, deepthink, deep_research, web_search, executecode, compact, coc, genselect, majority_voting, readurls, and router. Read sub-skills/plugins-and-tools/SKILL.md before enabling plugins with browser automation, code execution, external tools, or model downloads.
Setting OPTILLM_API_KEY enables the built-in local inference client. Model strings can include LoRAs separated by +, and extra_body can request decoding methods. Read sub-skills/local-inference-decoding/SKILL.md before relying on CUDA/MPS/MLX, HuggingFace cache, private models, bitsandbytes, PEFT adapters, logprobs, or reasoning token accounting.
python scripts/inspect_optillm.py --help to inspect an installed OptiLLM package, known approaches, plugin importability, and optional backend status without making provider calls.bash scripts/run_safe_native_checks.sh --help only when you are working in an OptiLLM source checkout and want a bounded set of safe native checks.--host 0.0.0.0 unless auth and network boundaries are intentionally configured.