import os DEFAULT_MODEL = "x-ai/grok-code-fast-1" DEFAULT_API_URL = "https://openrouter.ai/api/v1/chat/completions" MODEL_LIST_URL = "https://openrouter.ai/api/v1/models" DB_PATH = os.path.expanduser("~/.assistant_db.sqlite") LOG_FILE = os.path.expanduser("~/.assistant_error.log") CONTEXT_FILE = ".rcontext.txt" GLOBAL_CONTEXT_FILE = os.path.expanduser("~/.rcontext.txt") HISTORY_FILE = os.path.expanduser("~/.assistant_history") DEFAULT_TEMPERATURE = 0.1 DEFAULT_MAX_TOKENS = 4096 MAX_AUTONOMOUS_ITERATIONS = 50 CONTEXT_COMPRESSION_THRESHOLD = 15 RECENT_MESSAGES_TO_KEEP = 20 API_TOTAL_TOKEN_LIMIT = 256000 MAX_OUTPUT_TOKENS = 30000 SAFETY_BUFFER_TOKENS = 30000 MAX_TOKENS_LIMIT = API_TOTAL_TOKEN_LIMIT - MAX_OUTPUT_TOKENS - SAFETY_BUFFER_TOKENS CHARS_PER_TOKEN = 2.0 EMERGENCY_MESSAGES_TO_KEEP = 3 CONTENT_TRIM_LENGTH = 30000 MAX_TOOL_RESULT_LENGTH = 30000 LANGUAGE_KEYWORDS = { 'python': ['def', 'class', 'import', 'from', 'if', 'else', 'elif', 'for', 'while', 'return', 'try', 'except', 'finally', 'with', 'as', 'lambda', 'yield', 'None', 'True', 'False', 'and', 'or', 'not', 'in', 'is'], 'javascript': ['function', 'var', 'let', 'const', 'if', 'else', 'for', 'while', 'return', 'try', 'catch', 'finally', 'class', 'extends', 'new', 'this', 'null', 'undefined', 'true', 'false'], 'java': ['public', 'private', 'protected', 'class', 'interface', 'extends', 'implements', 'static', 'final', 'void', 'int', 'String', 'boolean', 'if', 'else', 'for', 'while', 'return', 'try', 'catch', 'finally'], } CACHE_ENABLED = True API_CACHE_TTL = 3600 TOOL_CACHE_TTL = 300 WORKFLOW_MAX_RETRIES = 3 WORKFLOW_DEFAULT_TIMEOUT = 300 WORKFLOW_EXECUTOR_MAX_WORKERS = 5 AGENT_DEFAULT_TEMPERATURE = 0.7 AGENT_MAX_WORKERS = 3 AGENT_SESSION_TIMEOUT = 7200 KNOWLEDGE_IMPORTANCE_THRESHOLD = 0.5 KNOWLEDGE_SEARCH_LIMIT = 5 MEMORY_AUTO_SUMMARIZE = True CONVERSATION_SUMMARY_THRESHOLD = 20 ADVANCED_CONTEXT_ENABLED = True CONTEXT_RELEVANCE_THRESHOLD = 0.3 ADAPTIVE_CONTEXT_MIN = 10 ADAPTIVE_CONTEXT_MAX = 50