fix: make local AI providers model-agnostic#270
Merged
Conversation
deucebucket
marked this pull request as ready for review
July 15, 2026 11:02
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.
Summary
config.json, and enforce0600onsecrets.jsonRoot Cause
Library Manager exposed only Gemini, OpenRouter, and Ollama. The Ollama UI and runtime supplied specific fallback model IDs, while model parsing accepted only one response shape. Skaldleita transcript-only results returned before a configured AI fallback could consume them. Native Ollama generation was also unbounded, and JSON object mode allowed a multi-book prompt to stop after
ITEM_1.User Impact
Users can point Library Manager at their own llama.cpp or other OpenAI-compatible server, load that server's actual model list, select any completion model, and use it without replacing Skaldleita. Skaldleita remains the hosted metadata/audio service and can hand its transcript to the user's selected local AI.
Stored API tokens remain server-side: blank Settings fields preserve existing values, explicit removal still works, raw values are not rendered into HTML, and the secrets file is owner-only.
Validation
python test-env/test-naming-issues.py(290 passed)python test-env/test-ai-providers.py(11 passed)python test-env/test-ai-provider-integration.py(4 passed)python test-env/test-ui-features.py(22 passed)python test-env/test-audio-tagging.py(5 passed)git diff --checkllama-serverdiscovery and chat-completion inferencecall_aibatch returning bothITEM_1andITEM_2through native Ollamaconfig.json, preserved server-side, mode0600