mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-01-09 07:08:09 -05:00
### Changes 🏗️ This PR improves the `/integrations/providers` endpoint to dynamically determine supported authentication types from the SDK registry instead of using hardcoded values. **What changed:** - The `list_providers` function now looks up each provider in the `AutoRegistry` to get its `supported_auth_types` - If a provider has defined auth types in the SDK registry, those are used to set `supports_api_key`, `supports_user_password`, and `supports_host_scoped` flags - Falls back to legacy hardcoded behavior for providers not registered in the SDK (maintains backwards compatibility) **Why:** - Providers can now correctly declare their supported authentication methods via the SDK - Removes brittle hardcoded checks like `name in ("smtp",)` for specific providers - Makes the credential type system more extensible and maintainable ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Verified providers with SDK-defined auth types return correct flags - [x] Verified legacy providers still work with fallback behavior - [x] Tested the `/integrations/providers` endpoint returns expected data #### For configuration changes: - [x] `.env.default` is updated or already compatible with my changes - [x] `docker-compose.yml` is updated or already compatible with my changes - [x] I have included a list of my configuration changes in the PR description (under **Changes**) No configuration changes required for this PR.