fedec65 wires Mike for the Swiss bar

A sprawling second-phase commit turns one fork into a localised, role-aware legal assistant - with a twist on where the model actually runs.

chat-uipersonas

fedec65 has bundled a lot into one move. The fork now speaks to Ollama, a tool for running language models on your own machine rather than calling out to a cloud provider - handy when the matter file is privileged and the client would rather it never leave the building. The user picks a local model from a live list; no API key, no round-trip to OpenAI.

On top of that, fedec65 has built out a roster of twenty named personas - litigator, drafter, strategist, citation verifier, a Court of Arbitration for Sport specialist, tax and employment advisors, and an adversarial trio that argues both sides plus a judge. Each chat picks an agent and a Swiss canton, and the interface is being translated into German, French, and Italian alongside English.

So what Worth a look for anyone building a privacy-first legal assistant or thinking about how to specialise one generalist chatbot into a bench of named experts.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?

Commits in this thread

1 commit from fedec65/bettercallmitch, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
aa9c3724 feat: dynamic Ollama model discovery + second phase features Federico Cesconi 2026-05-06 ↗ GitHub
commit body
Backend:
- Add GET /chat/models/ollama endpoint for dynamic local model discovery
- Add preferred_ollama_model column to user_profiles
- Fix privacy strict mode to use preferred/detected Ollama model
- Accept any ollama-* model ID in resolveModel()
- Export getOllamaHost() and listOllamaModels() from ollama.ts
- Add CORS support for 127.0.0.1:3000 origin
- Copy second_phase migration to supabase/migrations/

Frontend:
- ModelToggle: dynamically fetch and display local Ollama models
- modelAvailability: add ollama provider (no API key needed)
- useSelectedModel: accept dynamic ollama-* IDs
- UserProfileContext: expose ollamaHost and preferredOllamaModel
- Account models page: add Ollama host + preferred model config UI
- Skip API-key modal for Ollama models in chat/TabularReview

Also includes prior second phase work:
- i18n (de/fr/it/en) with next-intl, localePrefix: never
- Canton selector per-chat with canton context injection
- Agent/persona system (20 agents) with per-chat agent selection
- Privacy scanner for privilege detection
- Ollama provider for local LLM inference
- Backend tests (43 passing) + Playwright E2E tests (3 passing)
- Local Supabase dev setup with .env config

Capture this thread into my fork

Download a single Markdown prompt that tells Claude how to port every commit above into your working tree — adapting paths and structure to match your repo. Run it via claude -p < capture-thread-64.md from inside the repo you want the changes in.

⬇ Download capture-thread-64.md