Skip to content

feat: Universal Local LLM & Custom Endpoint Support (Ollama, LM Studio, vLLM, etc.)#228

Open
sreenivas134 wants to merge 1 commit intoVectifyAI:mainfrom
sreenivas134:main
Open

feat: Universal Local LLM & Custom Endpoint Support (Ollama, LM Studio, vLLM, etc.)#228
sreenivas134 wants to merge 1 commit intoVectifyAI:mainfrom
sreenivas134:main

Conversation

@sreenivas134
Copy link
Copy Markdown

This PR introduces comprehensive support for local LLMs and custom API endpoints. While existing proposals often focus on specific providers (like Ollama), this implementation leverages LiteLLM's full capabilities to provide a universal, config-driven interface that works with any OpenAI-compatible or local provider (LM Studio, vLLM, LocalAI, Ollama, etc.) with minimal configuration.

✨ Key Features

  • Universal api_base Support: Adds a global api_base attribute that can be configured via config.yaml, environment variables, or directly through the CLI.
  • Automated Provider Normalization: Implements intelligent model-name routing. If a custom endpoint is detected (like LM Studio at localhost:1234), the system automatically ensures the correct openai/ prefix is applied, removing the need for users to manually prefix their models for most local inference servers.
  • Robust Direct Parameter Passing: Unlike implementations that rely solely on environment variables, this PR passes the api_base directly to LiteLLM's completion calls, ensuring reliability across multi-provider sessions and preventing environment pollution.
  • Centralized Configuration: All LLM setup logic is consolidated into a new setup_litellm helper in utils.py, making the codebase cleaner and easier to maintain.

Verification

  • Tested with LM Studio and Ollama local endpoints.
  • Verified environment variable isolation (no cross-contamination between different base_url settings).
  • Confirmed recursive support for both PDF and Markdown processing flows.

Copy link
Copy Markdown

@claude claude bot left a comment

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

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