chore: add letta source header (#139)

This commit is contained in:
cthomas
2025-12-01 16:18:30 -08:00
committed by GitHub
parent 50c0564460
commit edd173cf34
3 changed files with 14 additions and 3 deletions

View File

@@ -201,7 +201,11 @@ export async function validateCredentials(
): Promise<boolean> {
try {
// Create a temporary client to test authentication
const client = new Letta({ apiKey, baseURL: baseUrl });
const client = new Letta({
apiKey,
baseURL: baseUrl,
defaultHeaders: { "X-Letta-Source": "letta-code" },
});
// Try to list agents - this requires valid authentication
await client.agents.list({ limit: 1 });