Before inserting, check if a near-identical memory exists (cosine > 0.85).
If found, skip insert. Prevents flooding the DB with repeated facts
from the same conversation.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Open WebUI sends the proxy model name to our endpoint; passing it
directly to Ollama caused 404. Now stripped before forwarding.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
DB saves were happening inside the generator after [DONE], causing
connection abort if any await failed. Moved to BackgroundTask.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Open WebUI requires this endpoint to discover and list available models
from OpenAI-compatible connections.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>