SurfSense/surfsense_backend/app/agents/chat
okxint a12cd21f2f fix(image-gen): resolve relative URLs returned by Xinference and compatible backends
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
2026-06-17 10:57:39 +05:30
..
anonymous_chat refactor(agents): introduce chat/ category; dissolve top-level agents/shared 2026-06-05 12:54:02 +02:00
multi_agent_chat fix(image-gen): resolve relative URLs returned by Xinference and compatible backends 2026-06-17 10:57:39 +05:30
runtime chore: ran linting 2026-06-13 21:59:35 +05:30
shared docs(agents): tighten docstrings and comments across agent module 2026-06-05 17:39:38 +02:00
__init__.py refactor(agents): introduce chat/ category; dissolve top-level agents/shared 2026-06-05 12:54:02 +02:00