fix: update default date range for Google Calendar events and improve query parameter handling

This commit is contained in:
Anish Sarkar 2026-01-30 19:55:48 +05:30
parent 6fb656fd8f
commit 4526b656a4
3 changed files with 28 additions and 16 deletions

View file

@ -191,10 +191,10 @@ async def index_google_calendar_events(
)
else:
calculated_start_date = datetime.now() - timedelta(
days=30
) # Use 30 days as default for calendar events
days=365
) # Use 365 days as default for calendar events (matches frontend)
logger.info(
f"No last_indexed_at found, using {calculated_start_date.strftime('%Y-%m-%d')} (30 days ago) as start date"
f"No last_indexed_at found, using {calculated_start_date.strftime('%Y-%m-%d')} (365 days ago) as start date"
)
# Use calculated dates if not provided

View file

@ -11,7 +11,13 @@ def get_model_context_window(model_name: str) -> int:
"""Get the total context window size for a model (input + output tokens)."""
try:
model_info = get_model_info(model_name)
context_window = model_info.get("max_input_tokens", 4096) # Default fallback
context_window = model_info.get("max_input_tokens")
# Handle case where key exists but value is None
if context_window is None:
print(
f"Warning: max_input_tokens is None for {model_name}, using default 4096 tokens."
)
return 4096 # Conservative fallback
return context_window
except Exception as e:
print(