graphiti/graphiti_core/utils/maintenance
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 Gemini support (#324) 2025-04-06 09:27:04 -07:00
community_operations.py migrate to pyright (#646) 2025-06-30 12:04:21 -07:00
edge_operations.py feat: eliminate ghost variables with configurable provider defaults system 2025-07-09 14:59:17 +00:00
graph_data_operations.py reformat (#655) 2025-07-01 12:26:15 -04:00
node_operations.py Excluded entity type filtering (#624) 2025-06-26 20:54:43 -07:00
temporal_operations.py small model fix (#432) 2025-05-02 10:08:25 -04:00
utils.py chore: Fix packaging (#38) 2024-08-25 10:07:50 -07:00