This repository was archived by the owner on Mar 29, 2026. It is now read-only.
feat: Add ModelsLab LLM for text-to-SQL#1097
Open
adhikjoshi wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: Add ModelsLab LLM integration
Summary
Adds ModelsLab as a new LLM integration in
src/vanna/integrations/modelslab/, giving Vanna users access to ModelsLab'suncensored Llama-based models for SQL generation, explanation, and chart code.
ModelsLab's chat API is fully OpenAI-compatible, so
ModelsLabLlmServiceextends
OpenAILlmServiceand inherits all streaming, tool-calling, andstructured-output features — zero code duplication.
Files changed
src/vanna/integrations/modelslab/__init__.pysrc/vanna/integrations/modelslab/llm.pyModelsLabLlmService(OpenAILlmService)tests/integrations/test_modelslab_llm.pyUsage
Implementation
Supported models
llama-3.1-8b-uncensored(default)llama-3.1-70b-uncensoredEnvironment variables
MODELSLAB_API_KEYMODELSLAB_MODELMODELSLAB_BASE_URLTesting
pip install pytest pytest-asyncio pytest tests/integrations/test_modelslab_llm.py -v # 12 tests — all passChecklist
src/vanna/integrations/modelslab/following existing structureModelsLabLlmServiceextendsOpenAILlmService(no code duplication)MODELSLAB_API_KEYenv var; clear error when missing__init__.pywith__all__exports(arg + env + missing), base URL (arg + env + default), constants
About ModelsLab
ModelsLab provides API access to uncensored Llama,
Flux, SDXL, video, audio, and 3D models. Their uncensored LLMs are useful for
Vanna when SQL generation requires reasoning about sensitive data topics without
content filters.
API docs: docs.modelslab.com
API keys: modelslab.com/api-keys