lfx-aistupidlevel
Stop choosing AI models manually. Let live benchmarks choose the best model for coding, reasoning, or agent tasks—using your own provider keys, with zero token markup.
This package adds the AI Stupid Level Smart Router to Langflow in two forms: a model provider for the Language Model and Agent components, and an AI Stupid Level component that shows which model answered.
Install
pip install lfx-aistupidlevel
Install it in the same Python environment as Langflow (uv pip install lfx-aistupidlevel works too), then restart Langflow. Langflow loads installed extensions when it starts, so there is nothing to enable. It needs Langflow 1.12 or later.
You also need a router key (aism_...) from https://aistupidlevel.info/router/keys, and your provider keys (OpenAI, Anthropic, Google, DeepSeek, Kimi, GLM) added to your AI Stupid Level account.
Where it appears in Langflow
- Settings → Model Providers → AI Stupid Level. Paste the router key and save; Langflow checks it against the router. Instead, you can set
AISTUPIDLEVEL_API_KEYin Langflow's environment. Five routing modes are enabled by default (auto-coding,auto-tooling,auto-reasoning,auto-best,auto-value). You can switch on the other modes and the pinnable models in the same pane. - Language Model and Agent components. Choose an AI Stupid Level mode, such as
auto-coding, in the model picker. Every mode supports tool calling, so all of them appear in the Agent's picker too. - AI Stupid Level component, in the components sidebar. It is a chat model with a Model dropdown, which defaults to
auto-coding; click refresh to load every mode and model from the router. After each answer, the Chat Output message names the model that answered (the flow editor's chat shows it beside the sender), and the component's Routing log gives the router's reason for choosing it. Its Language Model output can drive an Agent. Leave its key field empty to use the key saved in Model Providers (orAISTUPIDLEVEL_API_KEY); it also acceptsASL_ROUTER_KEY, the variable the other AI Stupid Level SDKs read.
Routing modes
| Mode | What it picks |
|---|---|
auto-coding, auto-reasoning, auto-tooling, auto-best |
The best measured score on AI Stupid Level's coding, reasoning, tool-use or combined benchmarks. When the leaders are statistically tied, the cheapest by default. |
auto-value, auto-value-coding, auto-value-reasoning, auto-value-tooling |
The most benchmark points per measured dollar, among models within 5 points of the best |
auto-fastest-quality |
The fastest model within 5 points of the best |
auto-cheapest, auto-fastest, auto-consistent |
The cheapest, fastest or steadiest model |
auto-task |
A strategy picked from the request's content |
auto-split |
A custom split |
auto |
The strategy saved in your account's preferences |
A model id such as claude-opus-5-5 instead of a mode pins that model. Langflow reads the list from the router's GET /v1/models. If the router can't be reached, it falls back to the routing modes. The modes are described at https://aistupidlevel.info/router/docs#strategies.
Your keys, zero markup
The router calls the chosen model with your own provider key, so the provider bills you directly, and AI Stupid Level adds nothing to token prices. It routes text and tool calls; image input is not supported.
Configuration
| Setting | Where | Default |
|---|---|---|
| API key | Settings → Model Providers, or AISTUPIDLEVEL_API_KEY in Langflow's environment; the component's own field overrides both |
none |
ASL_ROUTER_KEY |
Environment; read by the AI Stupid Level component when no other key is set | none |
ASL_BASE_URL |
Environment | https://aistupidlevel.info/v1 |
Documentation: https://aistupidlevel.info/router/docs
Development
pip install -e ".[test]" # in an environment with Langflow installed
pytest
lfx extension validate src/lfx_aistupidlevel
MIT licence.
Metadata
Release files for lfx-aistupidlevel 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lfx_aistupidlevel-0.1.0.tar.gz | 14.0 kB | Without provenance | Details for lfx_aistupidlevel-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lfx_aistupidlevel-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for lfx_aistupidlevel-0.1.0-py3-none-any.whl |
Total release size: 25.5 kB
Release files / lfx_aistupidlevel-0.1.0.tar.gz
| Download URL | lfx_aistupidlevel-0.1.0.tar.gz |
|---|---|
| Size | 14.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7ce7bfd35f55be1f3bcc3ed6ff6ffdb619bac4d89d5e4cad4e35fcaecfba890a
|
|
BLAKE2b-256 checksum How to use checksums |
4774788116b52d1343bf8e5db46d391c788463652e756b51ff0bd61a755c42b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|
Release files / lfx_aistupidlevel-0.1.0-py3-none-any.whl
| Download URL | lfx_aistupidlevel-0.1.0-py3-none-any.whl |
|---|---|
| Size | 11.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
51f26bb4c22c297f64771602414c4ab38ce7fc641b06e72f686e53af7127ad7b
|
|
BLAKE2b-256 checksum How to use checksums |
c5c7826471e324f3f9a3c54d894b3ff92db3a36771737b708c2271e1d200eee3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|
Security for lfx-aistupidlevel 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.