Use new lighter taskProcessingManager::getAvailableTaskTypeIds method #15842
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Use new lighter
taskProcessingManager::getAvailableTaskTypeIds()method to check which feature is available.When calling
taskProcessingManager::getAvailableTaskTypes()the manager gets a full description of the task types. This description includes some data that is provided by the preferred providers for the task types like the default values and the multiselect values. Those values are cached but when there is no cache hit (task processing cache and provider-specific cache), some of them are obtained with a network request (like the model list in integration_openai). So if one just needs to know the list of available task types without any extra detail, one can now usetaskProcessingManager::getAvailableTaskTypeIds()which returns a list of strings and does not get any extra info from the providers.This method is fairly recent so it's not included yet in nextcloud/ocp. Should we adjust the psalm baseline or wait until nextcloud/ocp is up-to-date? Or even ignore the psalm failure?
This can be backported to stable32 as the new method is there. See nextcloud/server#54917 and nextcloud/documentation#13608
☑️ Resolves
🏁 Checklist