Skip to content

feat: add AI Stupid Level as a model provider - #21185

Merged
JinHai-CN merged 2 commits into
infiniflow:mainfrom
StudioPlatforms:feat/aistupidlevel-provider
Oct 20, 2026
Merged

JinHai-CN merged 2 commits into
infiniflow:mainfrom
StudioPlatforms:feat/aistupidlevel-provider

Conversation

@StudioPlatforms

Copy link
Copy Markdown
Contributor

Summary

Adds AI Stupid Level as a model provider. AI Stupid Level's Smart Router is an OpenAI-compatible API at https://aistupidlevel.info/v1. Its model ids are routing modes such as auto-coding, auto-reasoning, auto-tooling, auto-value and auto-task, and each request goes to the model that currently scores best on continuously re-run benchmarks, called with the user's own provider keys. A real model id (for example claude-opus-5-5) pins one model.

Follows the TrustedRouter / Demon Route / Opper pattern:

  • conf/models/aistupidlevel.json: chat and models suffixes, and eight routing modes as chat models with tool support. Context 262,144 is the smallest across the models the router can choose. They are marked text only, because the router rejects image input.
  • internal/entity/models/aistupidlevel.go: AIStupidLevelModel embeds OpenAIAPICompatibleModel. factory.go dispatches the ai stupid level case, which is the lower-cased provider name.
  • internal/entity/models/aistupidlevel_test.go: these tests run against httptest servers:
    • the driver name and factory dispatch by provider name;
    • the shipped config resolving to AIStupidLevelModel;
    • chat with bearer auth, with the routing mode passed through unchanged as the model id;
    • model listing plus the connection check.
  • conf/llm_factories.json: entry next to TrustedRouter, tagged LLM.
  • Web: LLMFactory.AIStupidLevel, the icon, and the key link (https://aistupidlevel.info/router/keys).
  • conf/model.md: one row in the aggregators table.

No Python changes, per AGENTS.md.

Testing:

  • go test ./internal/entity/models/ -run 'TestAIStupidLevel|TestTrustedRouter|TestDemonRoute' passes. That is the 5 new tests plus the existing TrustedRouter ones, built against librag_tokenizer_c_api.a from internal/binding/cpp.
  • gofmt -l is clean, and both JSON files parse.

Reviewers can try it at no cost: any router key plus the header X-ASL-Sandbox: true runs real routing with a mock answer.

Disclosure: I work at AI Stupid Level. Prepared with AI assistance (Claude Code) and reviewed before submitting.

Type of change

  • New Feature (non-breaking change which adds functionality)

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⛔ Files ignored due to path filters: 1
  • web/src/assets/svg/llm/aistupidlevel.svg is excluded by !**/*.svg
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 034b341e-371c-4f4f-b239-c74045a42a60
📥 Commits

Reviewing files that changed from the base of the PR and between 4a851a4 and 897b0e9.

⛔ Files ignored due to path filters: 1
  • web/src/assets/svg/llm/aistupidlevel.svg is excluded by !**/*.svg

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 603b7d9f-a11d-4102-bd1b-77273bc87555
📥 Commits

Reviewing files that changed from the base of the PR and between ef06d8c and 4a851a4.

⛔ Files ignored due to path filters: 1
  • web/src/assets/svg/llm/aistupidlevel.svg is excluded by !**/*.svg
📒 Files selected for processing: 3
  • conf/model.md
  • web/src/components/svg-icon.tsx
  • web/src/constants/llm.ts
🚧 Files skipped from review as they are similar to previous changes: 1
  • conf/model.md

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

📝 Walkthrough

This change adds AI Stupid Level to provider configuration, backend model-driver creation, backend validation tests, and frontend provider metadata. It defines configured chat models, API endpoints, authentication checks, response parsing, model listing, and connection checks.

Changes: AI Stupid Level provider integration

Layer / File(s) Summary
Provider configuration and model catalog
conf/llm_factories.json, conf/models/aistupidlevel.json, conf/model.md
Adds AI Stupid Level to the provider list and aggregator documentation. Defines configured chat models with tool support, a context length of 262144, and API endpoints.
Backend model driver and validation
internal/entity/models/aistupidlevel.go, internal/entity/models/factory.go, internal/entity/models/aistupidlevel_test.go
Adds an OpenAI-compatible driver and registers it in the model factory. Tests cover driver creation, provider configuration, authenticated chat requests, parsed results, model listing, and connection checks.
Frontend provider metadata and icon
web/src/constants/llm.ts, web/src/components/svg-icon.tsx
Adds the provider identifier, icon mapping, API key URL, and SVG-icon rendering registration.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant ModelFactory
  participant AIStupidLevelModel
  participant AIStupidLevelAPI
  ModelFactory->>AIStupidLevelModel: Create provider driver
  AIStupidLevelModel->>AIStupidLevelAPI: Send authenticated chat request
  AIStupidLevelAPI-->>AIStupidLevelModel: Return chat response
  AIStupidLevelModel-->>ModelFactory: Parse answer and token usage
Loading

Suggested reviewers: jay77721

Merge Risk: ⚪ Minimal · up to 4a851

No concrete merge-blocking defect is established by the inspected changes.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: adding AI Stupid Level as a model provider.
Description check Passed The description includes the required Summary section, explains the provider and implementation, documents testing, and identifies the change as a new feature.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 5 files. (1 skipped: 1 …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 5 files. (1 skipped: 1 unsupported.)

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit hops where new models gleam
Provider paths now join the stream
Keys guide requests through the night
Tests check answers, tools, and flight
Icons bloom in frontend light

Comment @coderabbitai help to get the list of available commands.

@JinHai-CN JinHai-CN added the ci Continue Integration label Oct 20, 2026
@JinHai-CN

Copy link
Copy Markdown
Member

@StudioPlatforms would you please resolve the conflicts?

@StudioPlatforms

Copy link
Copy Markdown
Contributor Author

@JinHai-CN Done. The branch is rebased on the current main. The only conflicts were next to the newly added EmpirioLabs entries in web/src/components/svg-icon.tsx and web/src/constants/llm.ts; both entries are kept. go test ./internal/entity/models/ -run "TestAIStupidLevel|TestTrustedRouter|TestEmpirio" passes again and gofmt is clean.

@StudioPlatforms
StudioPlatforms force-pushed the feat/aistupidlevel-provider branch from ef06d8c to 4a851a4 Compare October 20, 2026 06:07
@JinHai-CN
JinHai-CN merged commit e2afaaf into infiniflow:main Oct 20, 2026
6 checks passed
@StudioPlatforms
StudioPlatforms deleted the feat/aistupidlevel-provider branch October 20, 2026 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continue Integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants