Skip to main content
Glama

AI Stupid Level SDKs

Official clients for the AI Stupid Level Smart Router, an OpenAI-compatible endpoint. Each request goes to the model measuring best for that kind of work, based on benchmarks that are re-run continuously. You call it with your own provider keys.

Package

Install

Source

TypeScript / JavaScript

npm install @aistupidlevel/router

packages/router

Python

pip install aistupidlevel

python

Vercel AI SDK provider

npm install @aistupidlevel/ai-sdk-provider

packages/ai-sdk-provider

MCP server (Claude, Cursor, VS Code, …)

npx -y @aistupidlevel/mcp

packages/mcp

n8n community node

n8n Cloud: search "AI Stupid Level" on the canvas (verified); self-hosted: Settings → Community Nodes → n8n-nodes-aistupidlevel

StudioPlatforms/n8n-nodes-aistupidlevel (own repository, as n8n verification requires)

Raycast extension

Raycast Store (in review)

integrations/raycast/aistupidlevel

LangChain chat model (ChatAISL)

pip install langchain-aistupidlevel

langchain-python

Hermes Agent provider plugin

hermes plugins install aistupidlevel

integrations/hermes/aistupidlevel

DeepSeek Harness plugin bundle

dsh plugin --profile web add @aistupidlevel/dsh-provider

packages/dsh-provider

OpenClaw provider plugin

openclaw plugins install clawhub:@aistupidlevel/openclaw-provider

packages/openclaw-provider

Pi provider extension

pi install npm:@aistupidlevel/pi-provider

packages/pi-provider

Langflow model provider + component

pip install lfx-aistupidlevel, then restart Langflow

langflow-python

Open WebUI Function (manifold pipe)

Admin Panel → Functions → Import from URL

integrations/open-webui

openapi/router-v1.json describes the API in OpenAPI 3.1, for generating a client in any other language. The live copy is at https://aistupidlevel.info/v1/openapi.json.

Quick start

import { ASLRouter } from '@aistupidlevel/router';

const router = new ASLRouter(); // ASL_ROUTER_KEY
const r = await router.chat.completions.create({ model: 'auto-coding', messages: [{ role: 'user', content: 'Fix this bug: ...' }] });
console.log(r.choices[0].message.content, r.routing.model, r.routing.reasoning);
from aistupidlevel import ASLRouter

router = ASLRouter()  # ASL_ROUTER_KEY
r = router.chat.completions.create(model="auto-coding", messages=[{"role": "user", "content": "Fix this bug: ..."}])
print(r.choices[0].message.content, r.routing.model, r.routing.reasoning)

Related MCP server: AgentLayer MCP Server

Why use an SDK instead of an OpenAI client

Any OpenAI client works against https://aistupidlevel.info/v1. The SDKs add:

  • Routing info on every answer and stream: the model and provider that answered, why they were chosen, and whether a fallback answered.

  • Safe retries. An automatic Idempotency-Key means a request is answered once, even if it is retried.

  • Typed errors with party and retryable. An app can tell its user to top up, to fix a provider key, or simply to try again.

  • runTools / run_tools, a tool-calling loop that stays on one model.

  • Sandbox mode (mock answers through real routing, at no cost), route previews, and usage.

See the API documentation.

Development

# TypeScript (the router package runs on Node 18+; the AI SDK provider needs Node 22+)
cd packages/router && npm ci && npm run build && npm test
cd packages/ai-sdk-provider && npm ci && npm run build && npm test
cd packages/mcp && npm ci && npm run build && npm test
cd packages/openclaw-provider && npm ci && npm test   # Node 24.16+, like OpenClaw
cd packages/pi-provider && npm ci && npm test         # Node 22.19+, like Pi

# Python
cd python && pip install -e . && python -m unittest discover -s tests
cd langflow-python && pip install -e . pytest && pytest tests   # in a venv with Langflow 1.12+

The live tests run against the real router in sandbox mode, so nothing is spent. They need a router key and are skipped without one:

ASL_ROUTER_KEY=aism_... npm test
ASL_ROUTER_KEY=aism_... python -m unittest discover -s tests

Releasing

  1. Bump the version in every place it appears:

    • packages/router/package.json and packages/router/src/core.ts;

    • packages/ai-sdk-provider/package.json and packages/ai-sdk-provider/src/index.ts;

    • packages/mcp/package.json, packages/mcp/src/config.ts and both versions in packages/mcp/server.json;

    • python/src/aistupidlevel/_version.py.

  2. npm: npm publish --access public in each package directory. prepublishOnly builds the package and runs its tests first.

  3. PyPI: cd python && python -m build && twine upload dist/*.

  4. MCP Registry, after the npm release of @aistupidlevel/mcp: cd packages/mcp && mcp-publisher login github && mcp-publisher publish.

  5. n8n node: released from its own repository, StudioPlatforms/n8n-nodes-aistupidlevel, by a v<version> tag.

  6. Raycast: from integrations/raycast/aistupidlevel, npm run publish opens a pull request to raycast/extensions.

  7. Pi: cd packages/pi-provider && npm publish (Node 22.19+). Push first: the pi.dev gallery image is read from main. The pi-package keyword lists it on pi.dev/packages; there is nothing to submit.

  8. Langflow: bump langflow-python/pyproject.toml, src/lfx_aistupidlevel/__init__.py and src/lfx_aistupidlevel/extension.json (a test checks they match), then cd langflow-python && uv build && twine upload dist/* with twine 7 or later.

Licence

MIT

Available Tools

11 tools
ask_routerAsk via Smart RouterA

Send a prompt through the AI Stupid Level Smart Router and return the answer, together with which model answered, its provider, why the router chose it and the latency. The router calls the model with the provider keys saved in the user's ASL account, so a real call is billed by that provider and counts against the router plan; set sandbox: true for a free mock answer. Needs a router key (ASL_ROUTER_KEY).

Inputs: prompt (required), mode, system, sandbox, +3 more.

get_drift_statusModel drift statusA
Read-onlyIdempotent

Whether an LLM's measured performance has shifted: AI Stupid Level's drift signature for one model, with its regime (stable, degrading, …), current score against its baseline, the change-point detector per benchmark suite, the last significant change and which axes moved. Use it to answer "has model X got worse?" or "is X being nerfed?".

Inputs: model (required).

get_global_indexGlobal AI indexA
Read-onlyIdempotent

AI Stupid Level's global index: one 0-100 number for the tracked models together, now and over the last 24 hours, with its trend and how many models are performing well. Use it for "are AI models worse today?".

Inputs: no named parameters.

get_incidentsRecent incidentsB
Read-onlyIdempotent

Recent incidents AI Stupid Level recorded: provider-wide degradations and model-level problems, with severity, the models affected, when each was detected and whether and when it was resolved.

Inputs: limit, provider, open_only.

get_leaderboardLLM leaderboardA
Read-onlyIdempotent

Ranking of the LLM APIs AI Stupid Level tracks (OpenAI, Anthropic, Google, DeepSeek, Kimi, GLM models) by benchmark score, 0-100. Use it to find the best model overall or for coding, reasoning or tool use, to compare models, and to get the model ids the other tools accept. Each row has the score, trend, status, stability and when it was last updated.

Inputs: limit, period, vendor, sort_by.

get_modelModel detailsA
Read-onlyIdempotent

Details AI Stupid Level holds on one tracked LLM: vendor, version, notes on how it is called and priced, tool-calling support, how long it has been tracked, and its leaderboard row when one has been fetched.

Inputs: model (required).

get_model_historyModel score historyA
Read-onlyIdempotent

Score history of one LLM on AI Stupid Level: each benchmark run in the window with its score, plus the newest run's per-axis results (correctness, code quality, efficiency, …). Use it to see whether a model got better or worse over time.

Inputs: model (required), period, max_points.

get_provider_statusProvider statusA
Read-onlyIdempotent

Current status of each LLM provider's API as AI Stupid Level's health probes see it (OpenAI, Anthropic, Google, DeepSeek, Kimi, GLM): operational or not, probe response time, the last error and when it was checked. For past outages use get_incidents.

Inputs: no named parameters.

get_recommendationsModel recommendationsA
Read-onlyIdempotent

AI Stupid Level's current picks: the best model for coding, the most reliable (steadiest score), the fastest, the best value (most points per measured dollar among near-top models), models that cost far more than an equally good alternative, and models to avoid right now. Each pick comes with the reason and the evidence it rests on. Use it for "which model should I use?".

Inputs: period.

get_usageASL usage and limitsA
Read-onlyIdempotent

This month's Smart Router usage for the configured router key (requests used and left, prepaid credits, the key's budget), and the Data API requests left today for the configured data key. Use it when a tool reports a limit, or to check the keys work.

Inputs: no named parameters.

preview_routePreview Smart Router choiceA
Read-onlyIdempotent

Which model the AI Stupid Level Smart Router would send a prompt to, and why: the routing strategy, the chosen model and provider with its benchmark score and estimated cost, and the fallback chain. Nothing is sent to a model and nothing is counted. Needs a router key (ASL_ROUTER_KEY).

Inputs: prompt (required), mode, system, sandbox, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

    TDQS

    A3.9/5.0

    Scored across 11 tools

    Disambiguation4/5

    Most tools target clearly distinct concerns, and descriptions actively disambiguate overlapping clusters (e.g. leaderboard vs recommendations vs global_index, and provider_status vs incidents vs drift_status). There is some residual overlap among the three 'model quality' tools and the three 'health' tools, but each states a specific use case that keeps selection reliable.

    Naming Consistency4/5

    Nine tools follow a clean get_<noun> read-only convention (get_leaderboard, get_model, get_incidents, etc.), and the two router tools use action verbs (preview_route, ask_router) that correctly signal they perform a route/action. The mix is minor and semantically motivated rather than chaotic.

    Tool Count5/5

    Eleven tools is well within the sweet spot for a model-intelligence service, and each maps to a distinct data surface (status, leaderboard, model detail, usage, history, drift, incidents, recommendations, index, routing preview, routing). No tool feels redundant or padded.

    Completeness4/5

    The surface covers the full lifecycle well: discovery (leaderboard/model), health (status/incidents/drift), trends (history/global_index), guidance (recommendations), usage/quota, and both dry-run and live routing. Minor gaps like an explicit model search-by-name or head-to-head compare tool exist but are workable via the leaderboard and get_model.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers