Update api/config.py

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
Charles 2026-06-30 23:25:43 -05:00 committed by GitHub
parent b84832e999
commit 26fb3745f9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3355,8 +3355,10 @@ def resolve_model_reasoning_efforts(
if isinstance(_prov_entry, dict):
_re_list = _prov_entry.get("reasoning_efforts")
if isinstance(_re_list, list) and _re_list:
return [str(x).strip().lower() for x in _re_list
if str(x).strip().lower() in {*VALID_REASONING_EFFORTS, "none"}]
_filtered = [str(x).strip().lower() for x in _re_list
if str(x).strip().lower() in {*VALID_REASONING_EFFORTS, "none"}]
if _filtered:
return _filtered
except Exception:
pass