-
-
Notifications
You must be signed in to change notification settings - Fork 11.5k
Revert "feat: add model_cost aliases expansion support" #23313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -64,10 +64,12 @@ def duration_in_seconds(duration: str) -> int: | |
| now = time.time() | ||
| current_time = datetime.fromtimestamp(now) | ||
|
|
||
| # Calculate target month and year, handling overflow past December | ||
| total_months = current_time.month - 1 + value # 0-indexed months | ||
| target_year = current_time.year + total_months // 12 | ||
| target_month = total_months % 12 + 1 # back to 1-indexed | ||
| if current_time.month == 12: | ||
| target_year = current_time.year + 1 | ||
| target_month = 1 | ||
| else: | ||
| target_year = current_time.year | ||
| target_month = current_time.month + value | ||
|
Comment on lines
+67
to
+72
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Month overflow not handled for The reverted code only handles overflow when The code removed by this revert handled this correctly using modular arithmetic: total_months = current_time.month - 1 + value # 0-indexed months
target_year = current_time.year + total_months // 12
target_month = total_months % 12 + 1 # back to 1-indexedWith the current reverted code, any duration string like |
||
|
|
||
| # Determine the day to set for next month | ||
| target_day = current_time.day | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default_in_memory_ttlno longer applied inasync_set_cacheandasync_set_cache_pipelineThe revert removes these lines from both
async_set_cache(line 346) andasync_set_cache_pipeline(line 367):Any caller that relies on
DualCache.default_in_memory_ttlbeing automatically applied when no explicit TTL is passed will now store entries in the in-memory cache without a TTL, causing them to never expire. This is a silent behavioral regression — entries that should have been evicted after the default TTL will now persist indefinitely in memory.