Skip to content

Add feature-profile endpoint and env-driven optional router profiles#461

Open
AJaySi wants to merge 1 commit intomainfrom
codex/add-api-feature-profile-status-endpoint
Open

Add feature-profile endpoint and env-driven optional router profiles#461
AJaySi wants to merge 1 commit intomainfrom
codex/add-api-feature-profile-status-endpoint

Conversation

@AJaySi
Copy link
Copy Markdown
Owner

@AJaySi AJaySi commented Mar 31, 2026

Motivation

  • Provide runtime visibility and a simple opt-in mechanism to control which optional routers are mounted at startup, while preserving existing behavior when the env var is not provided.
  • Allow a lean deployment profile to reduce startup surface area for constrained environments without changing existing route contracts or API paths.

Description

  • Added ALWRITY_FEATURE_PROFILE handling to RouterManager with a default of all and an _optional_module_matrix that defines all and default profiles.
  • Updated include_optional_routers to conditionally mount optional routers based on the active profile and added a get_feature_profile_status() helper that reports the active profile and enabled modules.
  • Exposed GET /api/feature-profile/status in both backend entrypoints (backend/main.py and backend/app.py) to return the active profile and enabled optional modules.
  • Documented the new ALWRITY_FEATURE_PROFILE environment variable in backend/README.md and preserved existing route contracts and paths.

Testing

  • Ran python -m py_compile backend/alwrity_utils/router_manager.py backend/main.py backend/app.py and compilation succeeded.
  • No new automated tests were added; existing behavior is preserved for the default profile all.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant