WZRD velocity-aware model selection for LangChain.
Project description
langchain-wzrd
WZRD velocity-aware model selection for LangChain.
Every call picks the best model based on live adoption velocity from WZRD — HuggingFace downloads, GitHub stars, OpenRouter inference, and ArtificialAnalysis benchmarks, scored every 300 seconds.
Install
pip install langchain-wzrd
Quick start
from langchain_wzrd import ChatWZRD
llm = ChatWZRD(task="code", openai_api_key="sk-or-...")
response = llm.invoke("Write a Python sort function")
print(response.content)
The model is selected per call. If Qwen3.5-9B is accelerating right now, that's what you get. If Llama-70B takes the lead tomorrow, you get that instead.
Earn CCM while routing
llm = ChatWZRD(
task="code",
openai_api_key="sk-or-...",
wzrd_report=True,
wzrd_keypair="~/.config/solana/id.json",
)
Every routed call auto-reports to WZRD in a background thread. Your agent earns CCM for contributing signal quality. No manual step needed.
Options
| Parameter | Default | Description |
|---|---|---|
task |
"general" |
"code", "chat", "reasoning", "general" |
fallback |
"meta-llama/llama-3.3-70b-instruct" |
Model if WZRD is unavailable |
candidates |
None |
Allowlist of model names to consider |
temperature |
0.7 |
Passed to underlying model |
max_tokens |
None |
Passed to underlying model |
wzrd_report |
False |
Auto-report routing decisions to earn CCM |
wzrd_keypair |
None |
Solana keypair path for agent auth |
How it works
wzrd.pick_details(task)queries the live signal API- Best model is selected by trend, confidence, and task fit
ChatOpenAIis instantiated with that model via OpenRouter- Response is returned — caller sees a normal LangChain ChatModel
No custom scoring. No duplicate routing logic. Thin wrapper around wzrd-client.
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
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 langchain_wzrd-0.1.0.tar.gz.
File metadata
- Download URL: langchain_wzrd-0.1.0.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2cd77ebdd9a5905c4334019f04e9d1875b5cd22b9abfba7fa88a74d493c7668f
|
|
| MD5 |
4d57bd5baab9b23f971031f1c68b6dd5
|
|
| BLAKE2b-256 |
7751a6da93855b44260a4ddbceb85d6674cb90286433b5feeecba78298538a84
|
File details
Details for the file langchain_wzrd-0.1.0-py3-none-any.whl.
File metadata
- Download URL: langchain_wzrd-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19fb051e22145c1db40119ae6d3fd026b868b42a9a934ef5797a1afc181a57a5
|
|
| MD5 |
64853f20ce8b59adae5e3332fe1684cd
|
|
| BLAKE2b-256 |
222c78302cdea4a1b044bc38682150ad00fa1ec2a12a36ffb0ad72239693949b
|