WIP major refactor and features
This commit is contained in:
27
config.py
27
config.py
@@ -21,7 +21,32 @@ __author__ = "Fahad Gilani" # Primary maintainer
|
||||
# DEFAULT_MODEL: The default model used for all AI operations
|
||||
# This should be a stable, high-performance model suitable for code analysis
|
||||
# Can be overridden by setting DEFAULT_MODEL environment variable
|
||||
DEFAULT_MODEL = os.getenv("DEFAULT_MODEL", "gemini-2.5-pro-preview-06-05")
|
||||
# Special value "auto" means Claude should pick the best model for each task
|
||||
DEFAULT_MODEL = os.getenv("DEFAULT_MODEL", "auto")
|
||||
|
||||
# Validate DEFAULT_MODEL and set to "auto" if invalid
|
||||
# Only include actually supported models from providers
|
||||
VALID_MODELS = ["auto", "flash", "pro", "o3", "o3-mini", "gemini-2.0-flash-exp", "gemini-2.5-pro-preview-06-05"]
|
||||
if DEFAULT_MODEL not in VALID_MODELS:
|
||||
import logging
|
||||
logger = logging.getLogger(__name__)
|
||||
logger.warning(f"Invalid DEFAULT_MODEL '{DEFAULT_MODEL}'. Setting to 'auto'. Valid options: {', '.join(VALID_MODELS)}")
|
||||
DEFAULT_MODEL = "auto"
|
||||
|
||||
# Auto mode detection - when DEFAULT_MODEL is "auto", Claude picks the model
|
||||
IS_AUTO_MODE = DEFAULT_MODEL.lower() == "auto"
|
||||
|
||||
# Model capabilities descriptions for auto mode
|
||||
# These help Claude choose the best model for each task
|
||||
MODEL_CAPABILITIES_DESC = {
|
||||
"flash": "Ultra-fast (1M context) - Quick analysis, simple queries, rapid iterations",
|
||||
"pro": "Deep reasoning + thinking mode (1M context) - Complex problems, architecture, deep analysis",
|
||||
"o3": "Strong reasoning (200K context) - Logical problems, code generation, systematic analysis",
|
||||
"o3-mini": "Fast O3 variant (200K context) - Balanced performance/speed, moderate complexity",
|
||||
# Full model names also supported
|
||||
"gemini-2.0-flash-exp": "Ultra-fast (1M context) - Quick analysis, simple queries, rapid iterations",
|
||||
"gemini-2.5-pro-preview-06-05": "Deep reasoning + thinking mode (1M context) - Complex problems, architecture, deep analysis"
|
||||
}
|
||||
|
||||
# Token allocation for Gemini Pro (1M total capacity)
|
||||
# MAX_CONTEXT_TOKENS: Total model capacity
|
||||
|
||||
Reference in New Issue
Block a user