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(core): add GPT-5.4 mini and nano model support (#10043)

Kevin Lin1210b2ba07e1
diff --git a/letta/constants.py b/letta/constants.py
index dbf037096..cd2a9f08d 100644
--- a/letta/constants.py
+++ b/letta/constants.py
@@ -284,6 +284,8 @@ LLM_MAX_CONTEXT_WINDOW = {
"gpt-5.4": 1050000,
"gpt-5.4-fast": 1050000,
"gpt-5.4-2026-03-05": 1050000,
+ "gpt-5.4-mini": 400000,
+ "gpt-5.4-nano": 400000,
# reasoners
"o1": 200000,
# "o1-pro": 200000, # responses API only
diff --git a/letta/model_specs/model_prices_and_context_window.json b/letta/model_specs/model_prices_and_context_window.json
index 3049ab6cc..0cd47fb10 100644
--- a/letta/model_specs/model_prices_and_context_window.json
+++ b/letta/model_specs/model_prices_and_context_window.json
@@ -17403,6 +17403,62 @@
"supports_service_tier": true,
"supports_vision": true
},
+ "gpt-5.4-mini": {
+ "cache_read_input_token_cost": 9.375e-8,
+ "input_cost_per_token": 7.5e-7,
+ "litellm_provider": "openai",
+ "max_input_tokens": 400000,
+ "max_output_tokens": 128000,
+ "max_tokens": 128000,
+ "mode": "chat",
+ "output_cost_per_token": 4.5e-6,
+ "supported_endpoints": [
+ "/v1/chat/completions",
+ "/v1/batch",
+ "/v1/responses"
+ ],
+ "supported_modalities": ["text", "image"],
+ "supported_output_modalities": ["text"],
+ "supports_function_calling": true,
+ "supports_native_streaming": true,
+ "supports_parallel_function_calling": true,
+ "supports_pdf_input": true,
+ "supports_prompt_caching": true,
+ "supports_reasoning": true,
+ "supports_response_schema": true,
+ "supports_system_messages": true,
+ "supports_tool_choice": true,
+ "supports_service_tier": true,
+ "supports_vision": true
+ },
+ "gpt-5.4-nano": {
+ "cache_read_input_token_cost": 2.5e-8,
+ "input_cost_per_token": 2e-7,
+ "litellm_provider": "openai",
+ "max_input_tokens": 400000,
+ "max_output_tokens": 128000,
+ "max_tokens": 128000,
+ "mode": "chat",
+ "output_cost_per_token": 1.25e-6,
+ "supported_endpoints": [
+ "/v1/chat/completions",
+ "/v1/batch",
+ "/v1/responses"
+ ],
+ "supported_modalities": ["text", "image"],
+ "supported_output_modalities": ["text"],
+ "supports_function_calling": true,
+ "supports_native_streaming": true,
+ "supports_parallel_function_calling": true,
+ "supports_pdf_input": true,
+ "supports_prompt_caching": true,
+ "supports_reasoning": true,
+ "supports_response_schema": true,
+ "supports_system_messages": true,
+ "supports_tool_choice": true,
+ "supports_service_tier": true,
+ "supports_vision": true
+ },
"gpt-5-mini": {
"cache_read_input_token_cost": 2.5e-8,
"cache_read_input_token_cost_flex": 1.25e-8,
diff --git a/letta/schemas/providers/chatgpt_oauth.py b/letta/schemas/providers/chatgpt_oauth.py
index 2bee986aa..0802c4118 100644
--- a/letta/schemas/providers/chatgpt_oauth.py
+++ b/letta/schemas/providers/chatgpt_oauth.py
@@ -40,6 +40,7 @@ CHATGPT_MODELS = [
{"name": "gpt-5.4", "context_window": 272000},
{"name": "gpt-5.4-pro", "context_window": 272000},
{"name": "gpt-5.4-fast", "context_window": 272000},
+ {"name": "gpt-5.4-mini", "context_window": 400000},
# GPT-5.3 codex
{"name": "gpt-5.3-codex", "context_window": 272000},
{"name": "gpt-5.3-codex-spark", "context_window": 128000},