More tests

This commit is contained in:
Fahad
2025-06-11 14:34:51 +04:00
parent 2e954b61ed
commit ac763e0213
9 changed files with 818 additions and 439 deletions

View File

@@ -346,9 +346,10 @@ async def reconstruct_thread_context(arguments: dict[str, Any]) -> dict[str, Any
# Update arguments with enhanced context and remaining token budget
enhanced_arguments = arguments.copy()
enhanced_arguments["prompt"] = enhanced_prompt
# Calculate remaining token budget for current request files/content
from config import MAX_CONTENT_TOKENS
remaining_tokens = MAX_CONTENT_TOKENS - conversation_tokens
enhanced_arguments["_remaining_tokens"] = max(0, remaining_tokens) # Ensure non-negative