fix: let self-hosted servers handle images in tool returns
The Read tool was gated behind isLettaCloud() for image support, but self-hosted servers can handle base64 images too with the right server-side patches (converters.py + message.py). Removed the cloud-only gate — if the server can't handle it, it'll error gracefully. Better to try than to silently omit.
This commit is contained in:
@@ -18,12 +18,10 @@ import { validateRequiredParams } from "./validation.js";
|
|||||||
* Currently only api.letta.com supports this feature.
|
* Currently only api.letta.com supports this feature.
|
||||||
*/
|
*/
|
||||||
function serverSupportsImageToolReturns(): boolean {
|
function serverSupportsImageToolReturns(): boolean {
|
||||||
const settings = settingsManager.getSettings();
|
// TODO: replace with server capability discovery when available
|
||||||
const baseURL =
|
// Selfhosted servers with the message.py image patch support images
|
||||||
process.env.LETTA_BASE_URL ||
|
// in tool returns via the Chat Completions path.
|
||||||
settings.env?.LETTA_BASE_URL ||
|
return true;
|
||||||
LETTA_CLOUD_API_URL;
|
|
||||||
return baseURL === LETTA_CLOUD_API_URL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ReadArgs {
|
interface ReadArgs {
|
||||||
|
|||||||
Reference in New Issue
Block a user