Zu model-provider adapters: scripted, anthropic, openai-compatible
Project description
zu-providers
Model adapters — the ModelProvider port (the any-model seam). An adapter
turns the harness's one normalized ModelRequest into a ModelResponse (text +
tool calls + usage + finish reason) and declares its Capabilities. The core
never special-cases a provider; it reads capabilities and proceeds.
Credentials are resolved from the environment inside the adapter — never placed in the model's context or in a config file.
Registered plugins (zu.providers)
| Name | Class | Notes |
|---|---|---|
scripted |
ScriptedProvider |
The fake model: replays fixed moves in order. Deterministic; the basis of every offline test. No key, no network. |
anthropic |
AnthropicProvider |
The Anthropic Messages API. Needs [anthropic] SDK extra + an API key. |
openai-compatible |
OpenAICompatibleProvider |
Any OpenAI-compatible endpoint (OpenAI, OpenRouter, Ollama, vLLM) via a base URL. Needs [openai] SDK extra. |
_messages.py holds the shared request/response translation both real adapters
build on, so they behave identically against the neutral contract.
Extend
Implement the ModelProvider shape, register it under zu.providers in
pyproject.toml, and add a deterministic test (the contract test asserts every
adapter behaves identically on the neutral surface).
Tests
uv run pytest packages/zu-providers — offline. Live-API smoke tests are opt-in
behind ZU_LIVE_* env flags.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zu_providers-0.2.2.tar.gz.
File metadata
- Download URL: zu_providers-0.2.2.tar.gz
- Upload date:
- Size: 16.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc1bb2224ed756882e422e11a91354a0a9a9910f48c0e63b2a2400a1d89eb08a
|
|
| MD5 |
db6afcb8e66e05f5639f5c768d76a8ab
|
|
| BLAKE2b-256 |
02f8143c6babbf18d4da9c45ba54bd3f37ee5c321e60cbe36fd4cbf42f362c78
|
File details
Details for the file zu_providers-0.2.2-py3-none-any.whl.
File metadata
- Download URL: zu_providers-0.2.2-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
464694c2b3d06d30f2aad81ee12aff979da41978b22cacf93ab0eb045c1b0163
|
|
| MD5 |
564c275672415ee1d8e94b1ff8b0f073
|
|
| BLAKE2b-256 |
06c71c02a35b450ac640eee48d33beb5a5b5b301b77548648a4feac8696c4140
|