litellm-wzrd-momentum
Velocity-aware model routing callback for LiteLLM. Routes to the model the ecosystem is converging on using real-time WZRD attention signals. Optionally earns CCM tokens by reporting inference outcomes.
Install
pip install litellm-wzrd-momentum
Usage
import litellm
from litellm_wzrd_momentum import WzrdCallback
litellm.callbacks = [WzrdCallback()]
Every LiteLLM completion call now fetches the latest velocity signal, ranks models by momentum, and exposes the top pick via kwargs["wzrd_signal"]. No config required -- works out of the box with the free signal tier.
Standalone (no LiteLLM)
from litellm_wzrd_momentum import pick_model
signal = {"models": [{"model": "gpt-4o", "trend": "surging", "score": 0.9, "confidence": "normal"}]}
print(pick_model(signal)) # "gpt-4o"
Earn CCM
Install with the earn extra and point to your agent keypair:
pip install 'litellm-wzrd-momentum[earn]'
export WZRD_AGENT_KEYPAIR_PATH=~/.config/wzrd/keypair.json
The callback reports inference outcomes to the WZRD protocol. Reports accumulate into merkle roots and become claimable CCM.
Environment Variables
| Variable | Default | Description |
|---|---|---|
WZRD_PREMIUM |
false |
Set true for enriched signal (trend, confidence, score) |
WZRD_CAPABILITY |
- | Filter models by capability: code, chat, reasoning, vision |
WZRD_AGENT_KEYPAIR_PATH |
- | Ed25519 keypair path for CCM earning via inference reports |
WZRD_EARN_ENABLED |
true |
Set false to disable reporting (signal routing still works) |
Signal API
Live velocity signals powering the router:
- Free:
GET https://api.twzrd.xyz/v1/signals/momentum - Premium:
GET https://api.twzrd.xyz/v1/signals/momentum/premium - Filtered: append
?capability=code(orchat,reasoning,vision)
Signals refresh every 300s from 4-platform ingestion (HuggingFace, GitHub, ArtificialAnalysis, OpenRouter).
How Ranking Works
Models are scored by a composite of:
- Trend -- surging (+3), accelerating (+2), stable (0), decelerating (-1), cooling (-2)
- Score -- normalized velocity (0-1), weighted at 0.3x
- Confidence -- normal (1x), low (0.5x), insufficient (0x)
The top-ranked model is surfaced as kwargs["wzrd_signal"]["top_model"] in LiteLLM callbacks.
License
MIT
Release files for litellm-wzrd-momentum 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| litellm_wzrd_momentum-0.3.1.tar.gz | 5.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| litellm_wzrd_momentum-0.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.0 kB
Release files / litellm_wzrd_momentum-0.3.1.tar.gz
| Download URL | litellm_wzrd_momentum-0.3.1.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4ed8aa086096bcc37ab1e047c0f70fb3977a2086f885ea4fe3ab4b96510602bd
|
|
BLAKE2b-256 checksum How to use checksums |
1992b1b791b0839ce1e544157b976f0dc608d326413f74dc0521b83ba529a3bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Release files / litellm_wzrd_momentum-0.3.1-py3-none-any.whl
| Download URL | litellm_wzrd_momentum-0.3.1-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7305ec1c4cda61bc32e6c4989925a18aefcc4aebac48a68201f3567a87e65c33
|
|
BLAKE2b-256 checksum How to use checksums |
ee44f2692e4599310dc6252831ed9a36a0ed68d4ef9a82294abb7f46c8d42f19
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|