Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zu_providers-0.2.0.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zu_providers-0.2.0-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

Details for the file zu_providers-0.2.0.tar.gz.

File metadata

  • Download URL: zu_providers-0.2.0.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for zu_providers-0.2.0.tar.gz
Algorithm Hash digest
SHA256 fc784b1480c532fc3358a49c052c75e41445e2ec61c6e67d470ac7888aa465f3
MD5 57bbb5ccb284043450811546fc623c81
BLAKE2b-256 b76812e3c327b821e2d1105076f9a4a97c7fbb7d2c8b4a5f92be23eba0295cb0

See more details on using hashes here.

File details

Details for the file zu_providers-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: zu_providers-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 14.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for zu_providers-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 045614e8a64a54d9bab731073509aca7d6734e0e3606539cf5ec79ed77dd02c5
MD5 e844962d9296bc9b53b4db4c6c580b93
BLAKE2b-256 c34274fc0fae8bf4552161d9da3ac5555871fbd2d334dcc1c459a628fc597b4a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page