Metadata-Version: 2.4
Name: wzrd-client
Version: 0.1.0
Summary: Signal feed client for model selection.
License-Expression: MIT
Project-URL: Homepage, https://twzrd.xyz
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# wzrd-client

Tiny Python client for WZRD model selection priors.

The goal is deliberately small:

- call `wzrd.pick()` before an LLM request
- optionally pass candidate model names from your framework or router
- use the result as the next execution choice

This is an attention prior, not a full router.
If you pass candidate model names, `pick()` scores them against the live feed.
If you do not, it returns the strongest live signal it can find for the task hint.

## Router wrapper

If you want a thin client wrapper, use `WZRDRouter` from `wzrd.router`.
It only wraps clients that expose `client.chat.completions.create(...)`.
Explicit model names pass through unchanged. To trigger WZRD routing, pass
`model=None` or a task sentinel like `model="code"` or `model="chat"`.

## Install

```bash
pip install wzrd-client
```

## Quick start

```python
import wzrd

model = wzrd.pick("code")
print(model)
```

Candidate-aware routing:

```python
import wzrd

model = wzrd.pick(
    "code",
    candidates=[
        "openrouter/qwen/qwen3.5-9b",
        "openrouter/qwen/qwen3.5-35b-a3b",
        "anthropic/claude-sonnet-4.6",
    ],
)
```

If you want the metadata for logging or telemetry, use:

```python
choice = wzrd.pick_details("code")
print(choice.model, choice.score, choice.trend, choice.confidence)
```

## Environment variables

- `WZRD_API_URL`: signal endpoint override
- `WZRD_TIMEOUT_SECONDS`: request timeout
- `WZRD_CACHE_TTL_SECONDS`: cache TTL for fetched signals
- `WZRD_FEED_LIMIT`: number of feed rows to request

## What it returns

- `pick()` returns a model name string
- `pick_details()` returns a structured record
- `shortlist()` returns ranked records
- `compare()` explains the relative signal strength between two models
