You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9e48f78
Browse filesBrowse the repository at this point in the historyBrowse files
authored
feat(providers): add AI Stupid Level API-key preset (lidge-jun#7623)
* feat(providers): add AI Stupid Level API-key preset
Adds AI Stupid Level's Smart Router as an ordinary API-key preset:
openai-chat at https://aistupidlevel.info/v1, live discovery from the
key-gated GET /v1/models (which also validates the key), and the 15
routing modes seeded with auto-coding as the default. Each routing mode
declares a 262,144-token window, 64,000 output tokens and text-only
input, limits that hold for any model the router picks. Every inbound
stays on Chat: the router's /v1/messages is a passthrough to Anthropic
without routing.
Preset counts are recounted to 106 total and 85 key-based in all 8
guides, all 8 quickstarts and structure/ops/docs-and-release.md.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(providers): keep every AI Stupid Level model text-only, pinned ids included
The preset declared text-only input for its 15 routing modes only. A
pinned id from live discovery, such as claude-sonnet-4-6, had no
modality evidence, so an attached image was forwarded to the router,
which answers 400 unsupported_content.
Add a provider-wide inputModalities declaration, the modality
counterpart of contextWindow and supportsVerbosity. The registry seeds
it, and enrichProviderFromRegistry and routedProviderConfig backfill it
for rows saved earlier. isModelVisionSidecarConsumer,
requiresVisionPreprocessing, modelAcceptsImageInput and the routing
capability evidence fall back to it when no per-model entry lists the
id; a per-model entry still wins. The AI Stupid Level preset declares
["text"].
Regression tests: a pinned live id needs vision preprocessing, also for
a row saved before the declaration, and an image sent to
aistupidlevel/claude-sonnet-4-6 through the proxy never reaches the
router.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(providers): read provider-wide modalities only from the routed provider
Review follow-up on the provider-wide inputModalities declaration:
- Declare inputModalities on DerivedKeyLoginProvider, and copy it in
providerConfigFromKeyLoginProvider, so a dashboard key login saves it
like a CLI provider add does.
- Drop the name-only registry fallback from the routing capability
evidence. It applied the preset's ["text"] to a same-named custom
destination; the routed provider already carries the declaration,
backfilled for the preset destination only.
Regression test: a same-named custom destination keeps its own modality
evidence and needs no vision preprocessing.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* docs(providers): record the 2026-10-26 re-verification of the AI Stupid Level preset
The contract (router docs, terms, key-gated GET /v1/models) was checked
again on 2026-10-26: the 15 routing modes are unchanged. The pool of
pinnable models has changed since 2026-10-23 (Kimi K2.7 Code is no longer
listed), so the limits comment now calls 262,144 a conservative window
rather than the current pool minimum.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(providers): keep provider-wide modalities registry-only
Review follow-up: a row seeded from the AI Stupid Level preset kept
inputModalities: ["text"] after its baseUrl was pointed elsewhere, so a
custom image-capable endpoint would have had its images stripped.
The declaration is now registry-only, like other destination-bound
registry defaults: it is no longer seeded into saved config (CLI add or
key login), and enrichProviderFromRegistry and routedProviderConfig fill
it only while the provider points at the preset destination. This also
drops the src/oauth/login-cli.ts change.
The custom-destination test now covers a seeded row moved to another
URL as well as a hand-written custom row.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(providers): apply provider-wide modalities at runtime only
Review follow-up: enrichProviderFromRegistry copied the preset's
inputModalities onto the provider object, and init and management
writes persist that object, so a saved copy could still follow a row
to another URL.
Enrichment no longer copies it. registryInputModalitiesForDestination()
returns the registry value only while the row points at the preset
destination; vision eligibility applies it to its private copy, and
routedProviderConfig applies it to the routed provider.
Regression test: enrichment leaves the saved provider without the
field, while the runtime classification still holds at the preset
destination and not at another URL.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(providers): validate runtime modality overrides for AI Stupid Level
Reject malformed provider-wide modalities at schema and management boundaries, repair tolerant loads to text, and preserve exact model declaration precedence. Cover destination-bound runtime backfill without persisting registry defaults; derive the active key-login test roster from the registry.
Co-authored-by: Studio Platforms <[email protected]>
* fix(providers): retain text-only fallback for renamed presets
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: JUN <[email protected]>
Copy file name to clipboardExpand all lines: docs-site/src/content/docs/guides/providers.md
+27-1Lines changed: 27 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -694,7 +694,7 @@ On upgrade, startup adds Pro to a saved model list only when it exactly matches
694
694
695
695
## 3. API-key catalog
696
696
697
-
opencodex ships 105 built-in presets: 84 key-based, 17 OAuth, three local, and one default
697
+
opencodex ships 106 built-in presets: 85 key-based, 17 OAuth, three local, and one default
698
698
ChatGPT-forward preset. The dashboard's **Add provider** picker opens a key provider's dashboard,
699
699
validates the key, and stores it; validation is provider-specific. Notable entries:
700
700
@@ -786,6 +786,7 @@ region-pinned EU routes, is at [opper.ai/models](https://opper.ai/models). Opper
| GitLab Duo |`https://cloud.gitlab.com/ai/v1/proxy/openai/v1`|
791
792
| Cloudflare AI Gateway |`https://gateway.ai.cloudflare.com/v1/{account-id}/{gateway}/anthropic`|
@@ -880,6 +881,31 @@ can call only that group's models, so use a Smart key for the full seeded set, o
880
881
`deepseek-v4.1-flash` is listed upstream but currently answers 503, so the preset leaves it out.
881
882
Upstream latency varies from a few seconds to about 30 seconds, with occasional transient 503s.
882
883
884
+
**AI Stupid Level** is a Smart Router at `https://aistupidlevel.info/v1`, operated by S.C. Studio
885
+
Platforms S.R.L. Create a router key at [aistupidlevel.info/router/keys](https://aistupidlevel.info/router/keys)
886
+
and add your own OpenAI, Anthropic, Google, DeepSeek, Kimi or GLM keys to the same account. Then select
887
+
**AI Stupid Level** in `ocx init` or the dashboard's **Add provider** picker, or run
888
+
`ocx provider add aistupidlevel`, and give it the router key directly or as the reference
889
+
`${AISTUPIDLEVEL_API_KEY}`. The router calls each model with your own provider key, so the provider
890
+
bills you directly and AI Stupid Level adds no markup ([terms](https://aistupidlevel.info/terms#router)).
891
+
The preset uses Chat Completions for every client, Claude Code included, and discovers models from the
892
+
authenticated `GET /v1/models`. Its seeded models are the
893
+
[routing modes](https://aistupidlevel.info/router/docs#strategies): `auto-coding` (the default) sends
894
+
each request to the model with the best measured score on AI Stupid Level's coding benchmark,
895
+
`auto-tooling` and `auto-reasoning` do the same for tool use and reasoning, and `auto-value-coding` or
896
+
`auto-fastest-quality` pick the best-value or fastest model within 5 points of the best. A real model id
897
+
from the live list, such as `aistupidlevel/claude-opus-5-5`, pins one model, and the `X-AISM-Model`
898
+
response header names the model that answered. Routing modes declare a 262,144-token window and 64,000
899
+
output tokens, which hold for any model the router picks. The router accepts text only, so for a
900
+
routing mode or pinned model at the preset destination the proxy hands images to the vision sidecar instead of sending them. Its Anthropic
901
+
Messages endpoint is a passthrough to Anthropic without routing, so the preset does not use it.
902
+
903
+
The provider editor also accepts an optional `inputModalities` fallback: a nonempty array containing
904
+
`text`, `image`, `audio`, or `video`. Exact per-model declarations take precedence. Invalid values
905
+
are rejected on save; a malformed value in a hand-edited config loads as `["text"]` with a warning.
906
+
The preset's text-only fallback is applied at runtime, including when saved under another provider
907
+
name at the same URL and Chat adapter. It does not follow a custom URL or another adapter.
908
+
883
909
The MiniMax and MiniMax (CN) provider cards can also show Coding Plan quota when the configured
884
910
key has an active plan. The dashboard reads the plan's 5-hour window and, when present, weekly
885
911
window; these are display observations and do not change model routing.
0 commit comments