# BF51.2 — Texposit-style user-side Ollama workflow

## Objective

Make TeXise's Ollama experience match the workflow documented by Texposit while keeping Ollama entirely on the user's computer and preserving BF51.1's verification that "Local Ollama" is genuinely local.

## User workflow

1. The user installs Ollama on their own computer.
2. The user starts a model with `ollama run <model>`.
3. Opening the TeXise AI Assistant automatically probes `http://localhost:11434`.
4. When a local Ollama model is detected, the Assistant exposes **Use Local Ollama**.
5. The user selects the discovered model from the Assistant/model dropdown and chats normally.
6. The same configured provider is reused by supported AI Suggest, Review and Paper Memory flows.
7. If Ollama stops, TeXise automatically falls back to the last configured BYOK AI provider when one is available and Privacy Mode is off.
8. Privacy Mode disables cloud fallback and remains fail-closed.

## Server boundary

The TeXise server does not install, launch, proxy or depend on Ollama. The web browser connects directly to the Ollama service running on the user's own computer. Server-side release CI uses mocked browser endpoints only.

## Local-model verification

BF51.1's privacy boundary is preserved. A localhost Ollama daemon can expose remote/cloud-backed models, so TeXise continues to inspect `remote_model`, `remote_host` and `/api/show` before manuscript context is sent. Remote/cloud-backed models are unavailable in Local Ollama mode.

## Cloud fallback

The fallback uses the user's most recently configured browser-held BYOK AI profile. TeXise does not provide a server-funded fallback credential. If there is no usable BYOK profile, the request fails with guidance to restart Ollama or configure BYOK AI.

## Documentation

Migration 22 updates untouched canonical AI/Ollama/Paper Memory documentation with the full local setup: system requirements, install/run steps, common model examples, `OLLAMA_ORIGINS`, automatic detection, model selection, fallback behavior, custom academic `Modelfile`, resource tips and troubleshooting.
