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

@ -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(