fix: always populate user-agent (#708)
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
* Unified module for managing custom LLM provider connections
|
||||
*/
|
||||
|
||||
import { getLettaCodeHeaders } from "../agent/http-headers";
|
||||
import { LETTA_CLOUD_API_URL } from "../auth/oauth";
|
||||
import { settingsManager } from "../settings-manager";
|
||||
|
||||
@@ -113,11 +114,7 @@ async function providersRequest<T>(
|
||||
|
||||
const response = await fetch(url, {
|
||||
method,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Authorization: `Bearer ${apiKey}`,
|
||||
"X-Letta-Source": "letta-code",
|
||||
},
|
||||
headers: getLettaCodeHeaders(apiKey),
|
||||
...(body && { body: JSON.stringify(body) }),
|
||||
});
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
* Direct API calls to Letta for managing MiniMax provider
|
||||
*/
|
||||
|
||||
import { getLettaCodeHeaders } from "../agent/http-headers";
|
||||
import { LETTA_CLOUD_API_URL } from "../auth/oauth";
|
||||
import { settingsManager } from "../settings-manager";
|
||||
|
||||
@@ -42,11 +43,7 @@ async function providersRequest<T>(
|
||||
|
||||
const response = await fetch(url, {
|
||||
method,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Authorization: `Bearer ${apiKey}`,
|
||||
"X-Letta-Source": "letta-code",
|
||||
},
|
||||
headers: getLettaCodeHeaders(apiKey),
|
||||
...(body && { body: JSON.stringify(body) }),
|
||||
});
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
* (transforms OpenAI API format → ChatGPT backend API format)
|
||||
*/
|
||||
|
||||
import { getLettaCodeHeaders } from "../agent/http-headers";
|
||||
import { LETTA_CLOUD_API_URL } from "../auth/oauth";
|
||||
import { settingsManager } from "../settings-manager";
|
||||
|
||||
@@ -72,11 +73,7 @@ async function providersRequest<T>(
|
||||
|
||||
const response = await fetch(url, {
|
||||
method,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Authorization: `Bearer ${apiKey}`,
|
||||
"X-Letta-Source": "letta-code",
|
||||
},
|
||||
headers: getLettaCodeHeaders(apiKey),
|
||||
...(body && { body: JSON.stringify(body) }),
|
||||
});
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
* Direct API calls to Letta for managing Zai provider
|
||||
*/
|
||||
|
||||
import { getLettaCodeHeaders } from "../agent/http-headers";
|
||||
import { LETTA_CLOUD_API_URL } from "../auth/oauth";
|
||||
import { settingsManager } from "../settings-manager";
|
||||
|
||||
@@ -42,11 +43,7 @@ async function providersRequest<T>(
|
||||
|
||||
const response = await fetch(url, {
|
||||
method,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Authorization: `Bearer ${apiKey}`,
|
||||
"X-Letta-Source": "letta-code",
|
||||
},
|
||||
headers: getLettaCodeHeaders(apiKey),
|
||||
...(body && { body: JSON.stringify(body) }),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user