remote-providers
Operate Outlines server and black-box provider integrations without invoking live models.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- remote-providers
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Operate Outlines server and black-box provider integrations without invoking live models.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/api-reference.md9.1 KB
- 参考文档references/provider-matrix.md9.1 KB
- 参考文档references/troubleshooting.md6.7 KB
- 参考文档references/workflows.md6.1 KB
- 脚本scripts/check_provider_prereqs.py9.1 KB
03 SKILL.md 正文
remote-providers
Use this sub-skill when the task involves Outlines model loaders for server-based or black-box clients: OpenAI/Azure OpenAI, Anthropic, Gemini, Mistral, Ollama, LM Studio, SGLang, TGI, vLLM server mode, or Dottxt.
This skill is for configuration, routing, capability checks, and error recovery. Do not call provider services, do not validate real credentials, and do not print secret values.
Read First
- Provider matrix for loader signatures, supported modes, output types, credentials/endpoints, and exclusions.
- API reference for safe loader patterns, output-type compatibility, and normalized exceptions.
- Workflows for provider selection, async/stream routing, no-network prerequisite checks, and retry/backoff decisions.
- Troubleshooting for install/import, auth, rate limits, unsupported structured outputs, endpoint mismatches, refusals, and mock-vs-live verification.
- scripts/check_provider_prereqs.py for a read-only import/env/endpoint probe that never calls a model service.
Use This When
- Choosing the correct
from_*loader for a provider client object. - Deciding whether a task can use sync, async, streaming, or batch calls.
- Checking whether an
output_typecan run on a black-box provider. - Diagnosing provider SDK import errors, missing API-key variables, endpoint
configuration, or normalized
outlines.exceptionserrors. - Handling OpenAI-compatible servers while preserving SGLang/TGI/vLLM-specific structured-output behavior.
Route Elsewhere
- Output-type design, schema shaping, regex/CFG conversion, or local constrained
decoding strategy ->
../structured-generation/SKILL.md. - Prompt, chat, multimodal input construction, reusable generators, or call
orchestration ->
../prompt-workflows/SKILL.md. - Local/offline engines (
Transformers,LlamaCpp,MLXLM,VLLMOffline) -> the local model/runtime route, not this server-provider route.
Operating Rules
- Select the loader from the actual client class.
from_openai,from_sglang, andfrom_vllmall accept OpenAI SDK clients, but they build different request bodies for structured output. Do not treat them as interchangeable. - Reject unsupported output types before retrying. For example, an OpenAI
RegexorCFGrequest is a capability mismatch; route to a local/supported provider instead of retrying the same OpenAI request. - Batch is unavailable for all providers in this skill. Server wrappers here
raise
NotImplementedErrorforbatch; use caller-side bounded concurrency only when the provider wrapper has an async model and the provider limits permit it. - Retry only normalized transient errors.
RateLimitError,ServerError,APITimeoutError, andAPIConnectionErrorexposeretryable=True. Authentication, permission, not-found, malformed request/schema, and refusal errors require configuration or request changes. - Preserve request IDs and providers. When catching
APIError, surfaceprovider,status_code,request_id,retryable, andhintwithout exposing secrets. - No credentials or live probes. Use placeholders in examples and the bundled prerequisite script for import/env checks only.
Fast Capability Snapshot
| Provider route | Loader | Async | Stream | Batch | Structured-output support |
|---|---|---|---|---|---|
| OpenAI / Azure | from_openai(client, model_name=None) |
yes | yes | no | JSON schema strict + JSON mode; no Regex/CFG/simple choice |
| Anthropic | from_anthropic(client, model_name=None) |
no | yes | no | none through Outlines output_type |
| Gemini | from_gemini(client, model_name=None) |
no | yes | no | JSON schema subset, homogeneous lists, enum/choice; no Regex/CFG |
| Mistral | from_mistral(client, model_name=None, async_client=False) |
opt-in | yes | no | strict JSON schema + JSON mode; no Regex/CFG |
| Ollama | from_ollama(client, model_name=None) |
yes | yes | no | JSON schema only; no Regex/CFG |
| LM Studio | from_lmstudio(client, model_name=None) |
yes | yes | no | JSON schema only; local SDK errors are not normalized |
| SGLang | from_sglang(client, model_name=None) |
yes | yes | no | JSON/schema/regex/simple/choice; CFG only as SGLang-compatible EBNF |
| TGI | from_tgi(client) |
yes | yes | no | JSON/schema/regex/simple/choice; no CFG |
| vLLM server | from_vllm(client, model_name=None) |
yes | yes | no | JSON/schema/regex/simple/choice/CFG if server supports structured outputs |
| Dottxt | from_dottxt(client, model=None) |
yes | no | no | JSON schema only; output type and model id required |
Keep provider-specific caveats in provider-matrix.md in front of any implementation or recovery plan.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).