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.

fix: patch gpt-5 max context window in constants (#3843)

Charles Packer60efd9824802
diff --git a/letta/constants.py b/letta/constants.py
index 384641d49..65984d68a 100644
--- a/letta/constants.py
+++ b/letta/constants.py
@@ -205,6 +205,13 @@ LLM_MAX_TOKENS = {
"deepseek-chat": 64000,
"deepseek-reasoner": 64000,
## OpenAI models: https://platform.openai.com/docs/models/overview
+ # gpt-5
+ "gpt-5": 400000,
+ "gpt-5-2025-08-07": 400000,
+ "gpt-5-mini": 400000,
+ "gpt-5-mini-2025-08-07": 400000,
+ "gpt-5-nano": 400000,
+ "gpt-5-nano-2025-08-07": 400000,
# reasoners
"o1": 200000,
# "o1-pro": 200000, # responses API only