debug: add logging to trace parameter injection

This commit is contained in:
2025-11-02 20:29:35 -05:00
parent a16bac5d08
commit 6b4dd56928
2 changed files with 5 additions and 0 deletions

View File

@@ -51,5 +51,8 @@ class ContextInjector:
if "today_date" not in request.args:
request.args["today_date"] = self.today_date
# Debug logging
print(f"[ContextInjector] Tool: {request.name}, Args after injection: {request.args}")
# Call the actual tool handler
return await handler(request)

View File

@@ -44,8 +44,10 @@ def buy(symbol: str, amount: int, signature: str = None, today_date: str = None)
"""
# Step 1: Get environment variables and basic information
# Get signature (model name) from parameter or fallback to config/env
print(f"[buy] Received signature parameter: {signature}")
if signature is None:
signature = get_config_value("SIGNATURE")
print(f"[buy] Signature from config: {signature}")
if signature is None:
raise ValueError("SIGNATURE not provided and environment variable is not set")