File tree Expand file tree Collapse file tree 3 files changed +5
-7
lines changed
Expand file tree Collapse file tree 3 files changed +5
-7
lines changed Original file line number Diff line number Diff line change 11"""Module to expose version information.
2-
3- Resilient to running from source without an installed distribution.
42"""
53from importlib import metadata
64
Original file line number Diff line number Diff line change 2323# Default max context window tokens
2424DEFAULT_MAX_CONTEXT_TOKENS_ENV_VAR = "DEFAULT_MAX_CONTEXT_TOKENS"
2525try :
26- DEFAULT_MAX_CONTEXT_TOKENS = int (os .getenv (DEFAULT_MAX_CONTEXT_TOKENS_ENV_VAR , "20000 " ))
26+ DEFAULT_MAX_CONTEXT_TOKENS = int (os .getenv (DEFAULT_MAX_CONTEXT_TOKENS_ENV_VAR , "100000 " ))
2727except ValueError :
2828 logging .getLogger (__name__ ).warning (
2929 f"Environment variable { DEFAULT_MAX_CONTEXT_TOKENS_ENV_VAR } must be an integer. "
30- "Falling back to 20 ,000 tokens." )
31- DEFAULT_MAX_CONTEXT_TOKENS = 20_000
30+ "Falling back to 100 ,000 tokens." )
31+ DEFAULT_MAX_CONTEXT_TOKENS = 100_000
3232
3333
3434class APIClient :
Original file line number Diff line number Diff line change @@ -11,10 +11,10 @@ def test_get_max_context_tokens_fallback_on_error(mock_get_model_info):
1111 mock_get_model_info .side_effect = RuntimeError ("boom" )
1212 client = APIClient ()
1313
14- # When litellm raises, the client should fall back to default env value (20_000 )
14+ # When litellm raises, the client should fall back to default env value (100_000 )
1515 max_tokens = client .get_max_context_tokens ("any-model" )
1616 assert isinstance (max_tokens , int )
17- assert max_tokens >= 10_000 # conservative lower bound; default is 20k
17+ assert max_tokens >= 100_000
1818
1919
2020@patch ("litellm.token_counter" )
You can’t perform that action at this time.
0 commit comments