Use new lighter taskProcessingManager::getAvailableTaskTypeIds method#15842
Merged
Conversation
β¦Ids method to check what is available Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
miaulalala
approved these changes
Sep 8, 2025
miaulalala
left a comment
Contributor
There was a problem hiding this comment.
Nice! Let me see what can be done about ocp.
Backporting it seems like a good idea from a performance perspective.
Contributor
|
/backport to stable32 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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