Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.
fix: erase 'oauth2_extra' setting on 'crewai config reset' command
Heitor Carvalho5239dc98597d
diff --git a/lib/crewai/src/crewai/cli/config.py b/lib/crewai/src/crewai/cli/config.pyindex aec32bfd4..9f2d203f9 100644--- a/lib/crewai/src/crewai/cli/config.py+++ b/lib/crewai/src/crewai/cli/config.py@@ -73,6 +73,7 @@ CLI_SETTINGS_KEYS = ["oauth2_audience","oauth2_client_id","oauth2_domain",+ "oauth2_extra",]# Default values for CLI settings@@ -82,6 +83,7 @@ DEFAULT_CLI_SETTINGS = {"oauth2_audience": CREWAI_ENTERPRISE_DEFAULT_OAUTH2_AUDIENCE,"oauth2_client_id": CREWAI_ENTERPRISE_DEFAULT_OAUTH2_CLIENT_ID,"oauth2_domain": CREWAI_ENTERPRISE_DEFAULT_OAUTH2_DOMAIN,+ "oauth2_extra": {},}# Readonly settings - cannot be set by the userdiff --git a/lib/crewai/tests/cli/test_config.py b/lib/crewai/tests/cli/test_config.pyindex 4db005e78..4dec94ee3 100644--- a/lib/crewai/tests/cli/test_config.py+++ b/lib/crewai/tests/cli/test_config.py@@ -72,7 +72,8 @@ class TestSettings(unittest.TestCase):@patch("crewai.cli.config.TokenManager")def test_reset_settings(self, mock_token_manager):user_settings = {key: f"value_for_{key}" for key in USER_SETTINGS_KEYS}- cli_settings = {key: f"value_for_{key}" for key in CLI_SETTINGS_KEYS}+ cli_settings = {key: f"value_for_{key}" for key in CLI_SETTINGS_KEYS if key != "oauth2_extra"}+ cli_settings["oauth2_extra"] = {"scope": "xxx", "other": "yyy"}settings = Settings(config_path=self.config_path, **user_settings, **cli_settings