graphiti/graphiti_core/llm_client
claude[bot] 93ab7375cd
feat: eliminate ghost variables with configurable provider defaults system
Replace hardcoded DEFAULT_MODEL and DEFAULT_SMALL_MODEL constants across all LLM clients with a centralized, configurable provider defaults system.

Key changes:
- Created provider_defaults.py with centralized configuration for all providers
- Added environment variable support for easy customization (e.g., GEMINI_DEFAULT_MODEL)
- Updated all LLM clients to use configurable defaults instead of hardcoded constants
- Made edge operations max_tokens configurable via EXTRACT_EDGES_MAX_TOKENS
- Updated cross-encoder reranker clients to use provider defaults
- Maintained full backward compatibility with existing configurations

This resolves the issue where Gemini's flash-lite model has location constraints in Vertex AI that differ from the regular flash model, and users couldn't easily override these without editing source code.

Environment variables now supported:
- {PROVIDER}_DEFAULT_MODEL
- {PROVIDER}_DEFAULT_SMALL_MODEL  
- {PROVIDER}_DEFAULT_MAX_TOKENS
- {PROVIDER}_DEFAULT_TEMPERATURE
- {PROVIDER}_EXTRACT_EDGES_MAX_TOKENS
- EXTRACT_EDGES_MAX_TOKENS (global fallback)

Fixes #681

Co-authored-by: Daniel Chalef <danielchalef@users.noreply.github.com>
2025-07-09 14:59:17 +00:00
..
__init__.py Add support for falkordb (#575) 2025-06-13 12:06:57 -04:00
anthropic_client.py feat: eliminate ghost variables with configurable provider defaults system 2025-07-09 14:59:17 +00:00
azure_openai_client.py Azure OpenAI improvements and fixes; Improve Graphiti Azure OpenAI config (#620) 2025-06-25 14:48:12 -04:00
client.py small model fix (#432) 2025-05-02 10:08:25 -04:00
config.py small model fix (#432) 2025-05-02 10:08:25 -04:00
errors.py Anthropic client (#361) 2025-04-16 12:35:07 -07:00
gemini_client.py feat: eliminate ghost variables with configurable provider defaults system 2025-07-09 14:59:17 +00:00
groq_client.py feat: eliminate ghost variables with configurable provider defaults system 2025-07-09 14:59:17 +00:00
openai_base_client.py feat: eliminate ghost variables with configurable provider defaults system 2025-07-09 14:59:17 +00:00
openai_client.py Azure OpenAI improvements and fixes; Improve Graphiti Azure OpenAI config (#620) 2025-06-25 14:48:12 -04:00
openai_generic_client.py feat: eliminate ghost variables with configurable provider defaults system 2025-07-09 14:59:17 +00:00
provider_defaults.py feat: eliminate ghost variables with configurable provider defaults system 2025-07-09 14:59:17 +00:00
utils.py update new names with input_data (#204) 2024-10-29 11:03:31 -04:00