feat: add openai-compatible provider for custom OpenAI API endpoints#79
feat: add openai-compatible provider for custom OpenAI API endpoints#79simcop2387 wants to merge 1 commit into
Conversation
Add support for any OpenAI-compatible LLM API (e.g. LM Studio, Ollama with OpenAI API, LiteLLM, Azure OpenAI). Users configure a base URL and optional API key via the settings UI, or via OPENAI_COMPAT_BASE_URL and OPENAI_COMPAT_API_KEY env vars. - Added OPENAI_COMPATIBLE to AiProvider enum - Added registry entry with base-url credential type - Added dual-credential resolution (base URL + optional API key) - Added models API route and verifier - Added second input in settings UI for API key - Added helper functions for credential resolution
ReviewThanks for the contribution — the registry-driven design (reusing That said, a few things need addressing before this can be merged. Contribution guideline compliance (
|
Disclosure: coding done by Qwen3.6-27B running locally to my machines.
This adds support for any openai compatible api such as LM Studio, Llama.cpp, DwarfStar/DS4, VLLM, LiteLLM, Azure OpenAI (not tested but should work), etc.
I've reviewed the changes myself and they look reasonable and pretty isolated to just the places that make sense but I'm not sure if there's anything that isn't in line with the project's style guidelines or anything.
Commit message from Qwen:
Add support for any OpenAI-compatible LLM API (e.g. LM Studio, Ollama with OpenAI API, LiteLLM, Azure OpenAI). Users configure a base URL and optional API key via the settings UI, or via OPENAI_COMPAT_BASE_URL and OPENAI_COMPAT_API_KEY env vars.