mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-20 21:18:13 +02:00
Some OpenAI-compatible image backends (e.g. Xinference) return a relative URL like /files/image.png in data[0].url instead of an absolute one. Browsers cannot resolve these, causing images to fail to load. Track the provider's api_base after resolving model config via to_litellm(). When the returned URL starts with "/", extract the origin (scheme + host + port) from api_base and prepend it to produce a full absolute URL. No behaviour change for providers that return absolute URLs (OpenAI, Azure, etc). Closes #1496 |
||
|---|---|---|
| .. | ||
| alembic | ||
| app | ||
| scripts | ||
| tests | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| .python-version | ||
| alembic.ini | ||
| celery_worker.py | ||
| Dockerfile | ||
| main.py | ||
| pyproject.toml | ||
| uv.lock | ||