mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-08 03:08:45 +00:00
fix(mcp): include scrypt p factor in the maxmem ceiling so it scales with every work factor
This commit is contained in:
parent
ef9637035b
commit
9d87527671
1 changed files with 3 additions and 1 deletions
|
|
@ -38,7 +38,9 @@ _BEARER_PREFIX = "bearer "
|
|||
_SCRYPT_N = 2**15
|
||||
_SCRYPT_R = 8
|
||||
_SCRYPT_P = 1
|
||||
_SCRYPT_MAXMEM = 128 * _SCRYPT_N * _SCRYPT_R * 2
|
||||
# scrypt's working-set is ~128 * N * r * p bytes; cap at twice that so the maxmem ceiling scales
|
||||
# with every work factor and a future p or r bump does not trip "memory limit exceeded".
|
||||
_SCRYPT_MAXMEM = 128 * _SCRYPT_N * _SCRYPT_R * _SCRYPT_P * 2
|
||||
_DERIVED_KEY_BYTES = 32
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue