feat: allow setting LETTA_BASE_URL

This commit is contained in:
cpacker
2025-10-27 17:37:37 -07:00
parent 78ddbd499d
commit c4b6dbc555

View File

@@ -6,6 +6,8 @@ export function getClient() {
console.error("Missing LETTA_API_KEY");
process.exit(1);
}
// add baseUrl if youre not hitting the default
return new LettaClient({ token /*, baseUrl: "http://localhost:8283"*/ });
const baseUrl = process.env.LETTA_BASE_URL || "https://api.letta.com";
return new LettaClient({ token, baseUrl });
}