Catalog / LLM routing & guardrails
pydecide: one Python client and fallback chain for Jev, OpenRouter, Laya, cross-encoders
Choice, Score and Noul over any System One backend with a confidence policy: if a backend errors or is unsure, the next is tried. Ships a TypeSafe-compatible server.
pydecide</h1> <p><b>One Python client for typed decisions, with a confidence gate between the cheap model and the good one.</b></p> <p> <a href="https://github.com/gopaljigaur/decide/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/gopaljigaur/decide/actions/workflows/ci.yml/badge.svg"></a> <a href="https://pypi.org/project/pydecide/"><img alt="PyPI" src="https://img.shields.io/pypi/v/pydecide?color=blue"></a> <a href="https://pypi.org/project/pydecide/"><img alt="Python versions" src="https://img.shields.io/pypi/pyversions/pydecide"></a> <a href="https://pypi.org/project/pydecide/"><img alt="Downloads" src="https://img.shields.io/pypi/dm/pydecide?color=blue"></a> <a href="https://github.com/gopaljigaur/decide/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/pypi/l/pydecide?color=blue"></a> </p> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/gopaljigaur/decide/main/docs/chain-dark.svg"> <img alt="A state and three typed questions enter tier one, a 22M parameter cross-encoder. A confidence gate sends the questions it was not sure about to tier two, Laya. The response carries both the answers and the route." src="https://raw.githubusercontent.com/gopaljigaur/decide/main/docs/chain-light.svg" width="920"> </picture> </div> Routing, triage and guardrail calls do not need a chat model. A decision model takes a state and typed questions (pick one of these, score this, yes or no) and answers with probabilities, in milliseconds. `pydecide` speaks to all of them through one API: TypeSafe's hosted Jev, OpenRouter, OpenAI's Decisions endpoint, the open-weight laya family on PyTorch and MLX, any sentence-transformers CrossEncoder, and a JSON-prompted LLM as a last resort. The reason to use i