Skip to content

feat: Add ModelsLab provider for uncensored AI models#2132

Open
adhikjoshi wants to merge 1 commit intostackblitz-labs:mainfrom
adhikjoshi:ml
Open

feat: Add ModelsLab provider for uncensored AI models#2132
adhikjoshi wants to merge 1 commit intostackblitz-labs:mainfrom
adhikjoshi:ml

Conversation

@adhikjoshi
Copy link
Copy Markdown

feat: Add ModelsLab provider for uncensored AI models

Summary

Adds ModelsLab as a new LLM provider to bolt.diy, following the existing provider pattern exactly.

ModelsLab provides access to powerful uncensored AI models (Llama 3.1 8B/70B Uncensored) via an OpenAI-compatible API — making it a seamless drop-in addition.

What's Added

New file: app/lib/modules/llm/providers/modelslab.ts

  • Extends BaseProvider following the same pattern as TogetherProvider, GroqProvider, etc.
  • Uses getOpenAILikeModel() — ModelsLab's API is fully OpenAI-compatible
  • Static models: Llama 3.1 8B Uncensored, Llama 3.1 70B Uncensored
  • Dynamic model listing via /models endpoint
  • Docker URL resolution support

Modified: app/lib/modules/llm/registry.ts

  • Added ModelsLabProvider import and export (2 lines)

Setup

Users add to their .env.local:

MODELSLAB_API_KEY=your_key_here
# Optional custom base URL:
# MODELSLAB_API_BASE_URL=https://modelslab.com/api/uncensored-chat/v1

Then select ModelsLab from the provider dropdown and choose a model.

Get an API key: https://modelslab.com/dashboard/settings

Why ModelsLab?

  • Uncensored models: Llama 3.1 Uncensored — useful for creative, research, and unrestricted coding tasks
  • Cost-effective: Competitive pricing vs other providers
  • OpenAI-compatible: Zero friction integration using existing getOpenAILikeModel helper
  • Aligns with bolt.diy's mission: More provider choice = more freedom for users

Testing

# Set env var
echo "MODELSLAB_API_KEY=your_key" >> .env.local

# Run bolt.diy
pnpm run dev

# Select ModelsLab from provider dropdown
# Choose a Llama 3.1 Uncensored model
# Start building!

Checklist

  • Follows existing provider pattern (BaseProvider extension)
  • Uses getOpenAILikeModel helper (no new dependencies)
  • Static models defined
  • Dynamic model fetching implemented
  • Docker URL resolution support
  • Registered in registry.ts
  • API key link provided for users
  • No breaking changes
  • Consistent code style with existing providers

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.

1 participant