Skip to content

armgit / letta

Public Imported from GitHub
0

Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.

feat: add hack for byok (#9946)

cthomas6981d0bf7406
diff --git a/letta/schemas/providers/openai.py b/letta/schemas/providers/openai.py
index 6817a38cf..250594a2a 100644
--- a/letta/schemas/providers/openai.py
+++ b/letta/schemas/providers/openai.py
@@ -198,7 +198,9 @@ class OpenAIProvider(Provider):
# We'll set the model endpoint based on the base URL
# Note: openai-proxy just means that the model is using the OpenAIProvider
- if self.base_url != "https://api.openai.com/v1":
+ if self.base_url.endswith("api.baseten.co/environments/production/sync/v1"):
+ handle = self.get_handle(model_name, base_name="baseten")
+ elif self.base_url != "https://api.openai.com/v1":
handle = self.get_handle(model_name, base_name="openai-proxy")
else:
handle = self.get_handle(model_name)