chore: Feature flag refactor (#7393)

This commit is contained in:
sp.wack
2025-03-22 01:45:59 +04:00
committed by GitHub
parent 8532c94d8e
commit 7d0e2265f7
19 changed files with 143 additions and 73 deletions

View File

@@ -10,6 +10,8 @@ class ServerConfig(ServerConfigInterface):
app_mode = AppMode.OSS
posthog_client_key = 'phc_3ESMmY9SgqEAGBB6sMGK5ayYHkeUuknH2vP6FmWH9RA'
github_client_id = os.environ.get('GITHUB_APP_CLIENT_ID', '')
enable_billing = os.environ.get('ENABLE_BILLING', 'false') == 'true'
hide_llm_settings = os.environ.get('HIDE_LLM_SETTINGS', 'false') == 'true'
settings_store_class: str = (
'openhands.storage.settings.file_settings_store.FileSettingsStore'
)
@@ -28,6 +30,10 @@ class ServerConfig(ServerConfigInterface):
'APP_MODE': self.app_mode,
'GITHUB_CLIENT_ID': self.github_client_id,
'POSTHOG_CLIENT_KEY': self.posthog_client_key,
'FEATURE_FLAGS': {
'ENABLE_BILLING': self.enable_billing,
'HIDE_LLM_SETTINGS': self.hide_llm_settings,
},
}
return config