Add support for locally hosted LLM providers (e.g., Ollama)#197
Draft
tomvothecoder wants to merge 8 commits into
Draft
Add support for locally hosted LLM providers (e.g., Ollama)#197tomvothecoder wants to merge 8 commits into
tomvothecoder wants to merge 8 commits into
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 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.
Description
Add support for locally hosted LLM providers on top of
dev-ai, starting with Ollama, so simulation summaries can run against internal or self-hosted inference endpoints.This PR extends the assistant provider/configuration flow to support endpoint and model selection for local deployments, updates request handling and orchestration for local providers, adds backend test coverage for config and provider behavior, and documents local plus NERSC Spin setup.
It also narrows the assistant provider/configuration surface in the backend, keeps the internal OpenAI-compatible transport path needed by Ollama and LivAI, updates the frontend summary contract, removes unsupported environment variables from active templates, cleans up active setup/deployment docs, and refreshes backend dependency locking to drop Anthropic-specific dependency support.
Follow-up commits on this branch also harden LLM summary fallback behavior for local models by repairing missing follow-up fields and canonicalizing common shorthand citation paths, and improve the simulation summary UX by showing live generation runtime plus clearer deterministic-fallback messaging.
It also includes the implementation plan commit already present on this branch.
What Changed
Closes #196
ASSISTANT_LLM_PROVIDERtoollamaandlivaiollamageneration_providercontract in frontend/backend typesuv.locksource_typeto disambiguatenameChecklist
Deployment Notes (if any)
Configure local-provider environment variables for Ollama endpoint/model selection in environments that will use hosted local inference.
No database migration expected.
Environments that still set
ASSISTANT_OPENAI_*orASSISTANT_ANTHROPIC_*must remove those settings and use only the supportedollamaorlivaiassistant configuration.Validation
make backend-testuv run pytest tests/features/assistant/test_orchestrator.pymake frontend-lintpnpm --dir frontend run type-check