@@ -2497,9 +2497,6 @@ async def test_get_config_callbacks_with_all_types(client_no_auth):
24972497
24982498 with patch .object (
24992499 proxy_config , "get_config" , new = AsyncMock (return_value = mock_config_data )
2500- ), patch (
2501- "litellm.proxy.common_utils.callback_utils.decrypt_value_helper" ,
2502- side_effect = lambda value , key = None : value
25032500 ):
25042501 response = client_no_auth .get ("/get/config/callbacks" )
25052502
@@ -2549,7 +2546,7 @@ async def test_get_config_callbacks_with_all_types(client_no_auth):
25492546async def test_get_config_callbacks_environment_variables (client_no_auth ):
25502547 """
25512548 Test that /get/config/callbacks correctly includes environment variables
2552- for each callback type with proper decryption.
2549+ for each callback type. Values are returned as-is from the config (no decryption) .
25532550 """
25542551 from litellm .proxy .proxy_server import ProxyConfig
25552552
@@ -2561,8 +2558,8 @@ async def test_get_config_callbacks_environment_variables(client_no_auth):
25612558 "callbacks" : ["otel" ]
25622559 },
25632560 "environment_variables" : {
2564- "LANGFUSE_PUBLIC_KEY" : "encrypted -public-key" ,
2565- "LANGFUSE_SECRET_KEY" : "encrypted -secret-key" ,
2561+ "LANGFUSE_PUBLIC_KEY" : "test -public-key" ,
2562+ "LANGFUSE_SECRET_KEY" : "test -secret-key" ,
25662563 "LANGFUSE_HOST" : "https://cloud.langfuse.com" ,
25672564 "OTEL_EXPORTER" : "otlp" ,
25682565 "OTEL_ENDPOINT" : "http://localhost:4317" ,
@@ -2571,19 +2568,10 @@ async def test_get_config_callbacks_environment_variables(client_no_auth):
25712568 "general_settings" : {}
25722569 }
25732570
2574- # Mock decrypt to prepend "decrypted-" to values
2575- def mock_decrypt (value , key = None ):
2576- if value and isinstance (value , str ) and "encrypted" in value :
2577- return f"decrypted-{ value } "
2578- return value
2579-
25802571 proxy_config = getattr (litellm .proxy .proxy_server , "proxy_config" )
25812572
25822573 with patch .object (
25832574 proxy_config , "get_config" , new = AsyncMock (return_value = mock_config_data )
2584- ), patch (
2585- "litellm.proxy.common_utils.callback_utils.decrypt_value_helper" ,
2586- side_effect = mock_decrypt
25872575 ):
25882576 response = client_no_auth .get ("/get/config/callbacks" )
25892577
@@ -2600,12 +2588,12 @@ def mock_decrypt(value, key=None):
26002588 assert langfuse_callback ["type" ] == "success"
26012589 assert "variables" in langfuse_callback
26022590
2603- # Verify langfuse env vars are present and decrypted
2591+ # Verify langfuse env vars are present (values returned as-is, no decryption)
26042592 langfuse_vars = langfuse_callback ["variables" ]
26052593 assert "LANGFUSE_PUBLIC_KEY" in langfuse_vars
2606- assert langfuse_vars ["LANGFUSE_PUBLIC_KEY" ] == "decrypted-encrypted -public-key"
2594+ assert langfuse_vars ["LANGFUSE_PUBLIC_KEY" ] == "test -public-key"
26072595 assert "LANGFUSE_SECRET_KEY" in langfuse_vars
2608- assert langfuse_vars ["LANGFUSE_SECRET_KEY" ] == "decrypted-encrypted -secret-key"
2596+ assert langfuse_vars ["LANGFUSE_SECRET_KEY" ] == "test -secret-key"
26092597 assert "LANGFUSE_HOST" in langfuse_vars
26102598 assert langfuse_vars ["LANGFUSE_HOST" ] == "https://cloud.langfuse.com"
26112599
0 commit comments