Skip to content

feat: add AI Stupid Level smart router integration#11132

Open
StudioPlatforms wants to merge 2 commits intostackblitz:mainfrom
StudioPlatforms:feat/ai-stupid-level-integration
Open

feat: add AI Stupid Level smart router integration#11132
StudioPlatforms wants to merge 2 commits intostackblitz:mainfrom
StudioPlatforms:feat/ai-stupid-level-integration

Conversation

@StudioPlatforms
Copy link

Overview

Adds support for AI Stupid Level's intelligent model routing as an alternative LLM provider alongside Anthropic.

Features

  • Multi-provider architecture (Anthropic + AI Stupid Level)
  • 6 auto-routing models with intelligent selection
  • Environment-based configuration
  • Full backward compatibility
  • TypeScript errors fixed

Configuration

# Use AI Stupid Level
LLM_PROVIDER=aistupidlevel
AI_STUPID_LEVEL_API_KEY=your_key_from_https://aistupidlevel.info/router/keys
AI_STUPID_LEVEL_MODEL=auto-coding  # optional, defaults to auto-coding

Available Models

  • auto - Best overall model based on real-time benchmarks
  • auto-coding - Optimized for coding tasks (default)
  • auto-reasoning - Complex reasoning tasks
  • auto-creative - Creative writing
  • auto-fastest - Prioritizes speed
  • auto-cheapest - Cost optimization

Changes

  • Added @ai-sdk/openai package for OpenAI-compatible API support
  • Implemented getAIStupidLevelModel() function with custom baseURL
  • Added provider selection via LLM_PROVIDER environment variable
  • Added TypeScript types for new environment variables
  • Fixed pre-existing TypeScript errors in stream-text.ts
  • Maintains full backward compatibility with existing Anthropic integration

Testing

  • ✅ TypeScript compilation (0 errors)
  • ✅ Backward compatibility maintained
  • ✅ Provider routing verified

- Add @ai-sdk/openai package for OpenAI-compatible API support
- Implement multi-provider support (Anthropic + AI Stupid Level)
- Add getAIStupidLevelModel() function with custom baseURL
- Support 6 auto-routing models (auto, auto-coding, auto-reasoning, etc.)
- Add provider selection via LLM_PROVIDER environment variable
- Add TypeScript types for new environment variables
- Maintain backward compatibility with existing Anthropic integration
- Default model: auto-coding (optimized for software development)

Environment variables:
- LLM_PROVIDER: 'anthropic' | 'aistupidlevel' (default: anthropic)
- AI_STUPID_LEVEL_API_KEY: API key from https://aistupidlevel.info/router/keys
- AI_STUPID_LEVEL_MODEL: Model selection (default: auto-coding)
- Add type assertions to fix LanguageModelV2/V1 compatibility
- Fix Messages type compatibility with convertToCoreMessages
- Apply fixes to both Anthropic and AI Stupid Level code paths
@StudioPlatforms StudioPlatforms changed the title feat: Add AI Stupid Level smart router integration feat: add AI Stupid Level smart router integration Oct 16, 2025
Copy link

@Nephew209-oss Nephew209-oss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe that action with that certain language is appropriate in my opinion but I wouldn't approve these changes or that call

@StudioPlatforms
Copy link
Author

Thank you for reviewing this PR. I understand the name 'AI Stupid Level' might seem unconventional, but I want to clarify the intent behind it.

The name is intentionally ironic and self-aware - it's a playful reference to the common frustration when AI models produce incorrect responses. Rather than being disrespectful, it's a humble acknowledgment that no AI is perfect, and our platform helps users intelligently route between models to minimize those moments.

Despite the lighthearted name, this is serious production-grade technology with intelligent model selection, real-time benchmarks, and professional-grade reliability. The tech industry has a long tradition of playful names for serious projects (Git, Apache, etc.).

I'd encourage evaluating this PR on its technical merit: clean code, full backward compatibility, zero breaking changes, proper TypeScript typing, and comprehensive testing. The integration is optional and doesn't affect existing Anthropic users.

I respect that naming preferences are subjective, but there's no malicious intent here. If you have specific technical concerns about the implementation, I'm happy to address them.

@igun997
Copy link

igun997 commented Nov 17, 2025

hey https://aistupidlevel.info it's a platform brooooo. that a brand not just a word "stupid"

I don't believe that action with that certain language is appropriate in my opinion but I wouldn't approve these changes or that call

@ivanm696
Copy link

ivanm696 commented Dec 25, 2025

Skip to main content
Bolt home pagelight logodark logoHelp CenterHelp Center

Search...
Ctrl K
Get started with Bolt
Introduction to Bolt
QuickStart guide
Video tutorials
Working in Bolt
Agents and models
Backups and restore
Using the chatbox
Using Code View
Managing projects
Personal settings
Project settings
Supported technologies
Bolt Cloud
What is Bolt Cloud?

Database
Overview
Advanced settings
Authentication
File storage
Logs
Secrets
Security
Server functions
Tables
User Management
FAQs

Domains

Hosting
Best practices
Plan your app
Plan and Discussion Modes
Maximize token efficiency
Prompt effectively
Using Bolt with other tools
Expo for mobile apps
Figma for design
GitHub for version control
Google SSO for authentication
Import from Lovable
Netlify for hosting
Stripe for payments
Supabase for databases
Accounts and subscriptions
Accounts
Billing
Corporate and commercial
Tokens
Referral program
Teams
Overview
Plans and billing
Managing Teams
Project controls
Troubleshooting
Login issues
Integrations issues
Bolt issues
Additional help
Contact Support
Concepts and context
Introduction to databases
Introduction to LLMs
Version history, version control, and GitHub
Bolt home pagelight logodark logo

Search...
Ctrl K
Release Notes
Bolt Status

Search...

Navigation
Database
Database
Release Notes
Bolt Status

On this page
Database settings
Benefits of Bolt Database
Creating and Using Databases with Claude Agent
Ask Bolt not to create a database
Version history and database restores
Automatically paused databases
Projects with Supabase databases published prior to September 30, 2025
View Bolt Database limits
How Bolt provisions a database
Database
Database
Create and manage databases in Bolt without the need for third-party tools.

Bolt makes it easy to add database functionality to your app without the hassle of extra infrastructure. You get a ready-to-use database whenever your project needs one, helping you focus on building features rather than configuring servers.

Database settings
Screenshot of Database settings menu options in Bolt.
Bolt’s Project Settings include several sections that let you manage your project’s data and related features. Some are in the left Project Settings menu, while others are along the top of the Database (Tables) screen. Click any item below to learn more about that topic.
Advanced settings
Authentication
File Storage
Logs
Secrets
Security Audit
Server Functions
Tables
User Management
FAQs

Benefits of Bolt Database
Using a Bolt database helps you get more complicated web apps up and running quickly:
Unlimited databases: Create as many databases as needed.
No manual setup: Skip configuring servers or hosting, Bolt handles it for you.
Built-in authentication management: Easily add user sign-up capabilities to your project.
One place for monitoring: Keep track of security and logs without switching tools.
Future-proof connections: Easily connect external tools later for advanced control.
This setup is ideal for quickly building, testing, and scaling your app.
If you’re new to the concept of databases and their importance in web development, you can learn more in our Introduction to databases article.

Creating and Using Databases with Claude Agent
When working with Claude Agent, new Bolt databases are created automatically based on your project’s needs or when you explicitly ask the agent to create a database or a database-related feature. This makes it easy to get started without manually setting anything up. If you are using v1 Agent (legacy), you can inherit a Bolt database that was created with Claude Agent, but you cannot create new databases while working in v1 Agent. For new projects, Bolt strongly recommends using Claude Agent to create and manage Bolt databases for you. This approach ensures your projects stay up to date with the latest features and are easier to maintain.
See Agents to learn more about the differences between agents and how to switch.

Ask Bolt not to create a database
If you don’t want Bolt to provision a database, you can explicitly request that it not do so. For example, when submitting a prompt, add the instruction: Don't use a database, I want to use local storage for this app.

Version history and database restores
Bolt’s Version History feature currently does not support database restores.
Restoring to an earlier project version will not change your current databases.

Automatically paused databases
If your project’s Bolt database hasn’t been used for six days or more, it may be automatically paused to conserve resources. When you next open your project, you’ll see a message letting you know that the database is being restored. This process usually only takes a few minutes. This is a normal, routine operation. Please wait for the restoration to finish before making any changes to your project to avoid potential issues.

Projects with Supabase databases published prior to September 30, 2025
Before September 30, 2025, Bolt projects required you to use your own Supabase account for databases. After this date, new projects created with Claude Agent use Bolt databases by default. Bolt does not support switching existing projects from Supabase to Bolt Database.
If you have an existing project using Supabase databases:
Keep using Supabase for your databases.
Supabase databases cannot be converted into Bolt databases.
You can switch from v1 Agent (legacy) to Claude Agent at any time. Your Supabase databases will still work. The only change you may notice is that your chat history window will reset when you switch.
If you are starting a new project:
Claude Agent will create and use Bolt databases by default.
You can migrate a Bolt database to Supabase later if you want.
Projects created with v1 Agent (legacy) only support Supabase databases. These must be added after the initial build. The v1 Agent (legacy) cannot create Bolt databases.
See Agents to learn more about switching between Claude Agent and v1 Agent (legacy) in Bolt.

View Bolt Database limits
You can view database-related limits in the Cloud section of your Personal Settings. Bolt Cloud 1 Pn To view limits, follow these steps:
Click your profile icon in the top right of your screen, then click Settings.
Click Cloud.
Review the database-related rows in the table.

How Bolt provisions a database
When you create a project, Bolt can automatically create a database if your app requires one or if you explicitly request it. For example, if you create a trivia app, Bolt will set up a database to store questions and answers. Features like user authentication may not be added automatically, but you can prompt Bolt to include sign-up and log-in if your app requires them. For example: Create user accounts via email signup and login, then add account sign in/log out buttons in the top right corner of the home page.
Was this page helpful?

YesNo
What is Bolt Cloud?Advanced settings
Bolt home pagelight logodark logo
xgithubdiscordlinkedinyoutuberedditinstagram
Terms of ServicePrivacy Policy
xgithubdiscordlinkedinyoutuberedditinstagram
Assistant

Responses are generated using AI and may contain mistakes.
Ask a question...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants