Skip to content

feat: add ModelsLab as LLM provider#2290

Open
adhikjoshi wants to merge 1 commit intoarc53:mainfrom
adhikjoshi:feat/add-modelslab-provider
Open

feat: add ModelsLab as LLM provider#2290
adhikjoshi wants to merge 1 commit intoarc53:mainfrom
adhikjoshi:feat/add-modelslab-provider

Conversation

@adhikjoshi
Copy link
Copy Markdown

Summary

Adds ModelsLab as an OpenAI-compatible LLM provider, following the same pattern as the existing OpenRouter and Novita integrations.

ModelsLab provides access to 10,000+ open-source models (Llama 3, Mistral, DeepSeek, and more) through an OpenAI-compatible chat endpoint.

API docs: https://docs.modelslab.com
API key: https://modelslab.com/account/api-key
Endpoint: https://modelslab.com/api/uncensored-chat/v1

Changes

File What
application/llm/modelslab.py ModelsLabLLM class extending OpenAILLM
application/llm/llm_creator.py Register "modelslab" provider
application/core/settings.py Add MODELSLAB_API_KEY env var
application/core/model_settings.py ModelProvider.MODELSLAB + _add_modelslab_models()
application/core/model_configs.py MODELSLAB_MODELS (Llama 3 8B/70B, Mistral 7B)
application/core/model_utils.py Add modelslab to provider_key_map
tests/llm/test_modelslab_llm.py Pytest tests (7 cases)

Usage

LLM_PROVIDER=modelslab
LLM_NAME=meta-llama/Meta-Llama-3-8B-Instruct
MODELSLAB_API_KEY=your_key_here

Why ModelsLab?

  • 300K+ developers using the API
  • 10,000+ hosted open-source models on their own datacenter (vertically integrated with GPULab)
  • OpenAI-compatible endpoint — zero friction to add
  • Same integration pattern as the existing Novita provider in this repo

Checklist

  • Follows existing OpenRouter/Novita provider pattern
  • MODELSLAB_API_KEY wired through settings + model_utils provider_key_map
  • Models added to registry with proper capabilities
  • Pytest tests added covering instantiation, URL defaults, key fallback, and registration
  • PEP 8 / ruff-compatible code

Adds ModelsLab as an OpenAI-compatible LLM provider, following the
existing OpenRouter/Novita pattern.

ModelsLab exposes 10,000+ open-source models (Llama, Mistral, DeepSeek,
etc.) via an OpenAI-compatible endpoint:
  https://modelslab.com/api/uncensored-chat/v1

Changes:
- application/llm/modelslab.py: ModelsLabLLM class (extends OpenAILLM)
- application/llm/llm_creator.py: register 'modelslab' provider
- application/core/settings.py: add MODELSLAB_API_KEY env var
- application/core/model_settings.py: ModelProvider.MODELSLAB enum +
  _add_modelslab_models() registry method
- application/core/model_configs.py: MODELSLAB_MODELS list with
  Llama 3 8B/70B and Mistral 7B models
- application/core/model_utils.py: add modelslab to provider_key_map
- tests/llm/test_modelslab_llm.py: pytest tests

Usage:
  LLM_PROVIDER=modelslab
  LLM_NAME=meta-llama/Meta-Llama-3-8B-Instruct
  MODELSLAB_API_KEY=your_key

API key: https://modelslab.com/account/api-key
Docs: https://docs.modelslab.com
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 6, 2026

@adhikjoshi is attempting to deploy a commit to the Arc53 Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions bot added application Application tests Tests labels Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

application Application tests Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant