Skip to content

armgit / mem0

Public Imported from GitHub
0

The Memory Layer for AI Agents - Drop-in memory infrastructure for AI agents and apps. Context that persists. Built for production.

Remove redundant check for api_key attribute (#6460)

krishna soni2af3a72f73d7
diff --git a/mem0/llms/base.py b/mem0/llms/base.py
index 817e4da2f..8f5c887e3 100644
--- a/mem0/llms/base.py
+++ b/mem0/llms/base.py
@@ -35,11 +35,6 @@ class LLMBase(ABC):
if not hasattr(self.config, "model"):
raise ValueError("Configuration must have a 'model' attribute")
- if not hasattr(self.config, "api_key") and not hasattr(self.config, "api_key"):
- # Check if API key is available via environment variable
- # This will be handled by individual providers
- pass
-
def _is_reasoning_model(self, model: str) -> bool:
"""
Check if the model is a reasoning model or GPT-5 series that doesn't support certain parameters.