Highlights
Valen.llm(provider, model)answers the same Decisions and SystemOne requests with an OpenAI-compatible, Anthropic or Gemini model and returns the same typed responses, so Valen and an LLM can be compared on the same questions with the same decision code. See "Compare with an LLM" in the README.- Usage counts tokens across retries and latency; every provider request and response is kept in
debug["llm_attempts"]. - Malformed output is corrected; truncation and refusals raise
ValenAPIErrorwitherror.debug.
Changes
- Video inputs are sent to LLMs as frames;
valen-sdk[video]now includes Pillow. Usagetoken counts may beNonewhen a provider omits them.- No new base dependencies and no request/response schema change.
Validation
Published through PyPI Trusted Publishing from tag v0.3.0; the files attached to the GitHub release are the PyPI files. The downloaded wheel passed SHA256 verification, its Python source matched the tag, and installed in a clean environment it passed 42 contract tests (tests/test_server.py needs the server extra).
Install
Terminal
python -m pip install valen-sdk==0.3.0 # HTTP clients
python -m pip install "valen-sdk[onnx]==0.3.0" # local CPU inference