Make reasoning budgets global for existing and future chat profiles
This commit is contained in:
1 parent
ad1c513f3c
commit
536d38b79e
11 files changed
+193
-125
No files matched your search
+2
-1
@@ -104,6 +104,7 @@ def normalize_chat(data):
|
||||
|
||||
|
||||
REASONING_LEVELS=('low','medium','high')
|
||||
GLOBAL_REASONING_DEFAULT={'enabled':True,'limits':{'low':4096,'medium':8192,'high':16384}}
|
||||
def reasoning_policy(value=None):
|
||||
"""Normalize persisted policy without sharing/mutating nested defaults."""
|
||||
if value is None:value={'enabled':False,'limits':dict.fromkeys(REASONING_LEVELS)}
|
||||
@@ -114,7 +115,7 @@ def reasoning_policy(value=None):
|
||||
return {'enabled':value['enabled'],'limits':dict(limits)}
|
||||
|
||||
def apply_reasoning_budget(request,parameters):
|
||||
"""Profile ceilings cannot be bypassed by a larger per-request budget.
|
||||
"""Configured ceilings cannot be bypassed by a larger per-request budget.
|
||||
Keep a smaller caller cap, and preserve the caller's total output limit.
|
||||
No positive cap is ever translated to 0 (Strata uses 0 for unlimited).
|
||||
"""
|
||||
|
||||
Reference in new issue
Block a user