Repository navigation
Conversation
Register an openai-compatible provider modeled on the existing local providers (OpenAI Chat Completions format) so any server exposing /v1/chat/completions works: vLLM, llama.cpp server, Ollama /v1, text-generation-webui, etc. - treat it as a local provider for UI grouping, longer timeouts, optional API key - add provider UI fields (base URL, model, transcription model, optional key) - route chat and voice transcription through the new provider - add tests for provider registration, routing, and transcription
openLightbox and closeLightbox call resetLibrarySplat(), which is defined in splat-workspace.js. If that script is stale or missing on a partial deploy, the call throws a ReferenceError and aborts before the lightbox shows, so clicking a Library card does nothing. Guard both call sites with a typeof check so the preview opens normally even when splat-workspace.js has not loaded. No behavior change when the function is present.
This branch has not been deployed
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add selectable OpenAI-compatible local provider
What
Adds a new selectable OpenAI-compatible local provider to the External LLM / prompt-AI settings, so Mix Studio can talk to any server that exposes the OpenAI Chat Completions API (
/v1/chat/completions) — vLLM, llama.cpp server, Ollama/v1, text-generation-webui, etc.Also includes a small defensive guard so a Library card click can't be killed by a missing
resetLibrarySplatdefinition (see second commit).Why
Users running local inference through OpenAI-compatible servers (not just ComfyUI/Ollama/LM Studio) had no first-class provider option. This wires that path through the existing local-provider plumbing without adding dependencies, keeping the server zero-dependency and the frontend build-free per
CONTRIBUTING.md.The guard commit is hardening only: in a clean clone
resetLibrarySplatis defined insplat-workspace.jsand the click works. The guard prevents a dead click when that script is stale/missing on a partial deploy or stale service-worker cache.How
lib/external-llm.js— registeropenai-compatibleprovider, modeled onlmstudio(OpenAI Chat Completions format); optionalAuthorization: Bearer <key>header, omitted when no key configured; transcription via/v1/audio/transcriptions(whisper-1default).server.js— route chat + voice transcription through the new provider; treat as local for grouping/longer timeouts.public/index.html— provider dropdown option + settings fields (base URL, model, transcription model, optional API key).public/app.js— UI wiring (mode classifier, settings apply/payload, clear-key, toggle). Guard commit:typeofcheck on bothresetLibrarySplat()call sites (openLightbox,closeLightbox).test/external-llm.test.js,test/local-prompt-ai-ui.test.js— tests for provider registration, routing, transcription, label-aware toggle, temperature-0 under schema, and the forced-tool-call path.Testing
node --check server.js public/app.js lib/external-llm.js— cleannode --test— 1339 pass / 0 fail/v1) — needs a live serverChecklist
lib/module with testsdata/Commits
feat(external-llm): add selectable OpenAI-compatible local providerfix(library): guard resetLibrarySplat call against missing definition