Skip to content

Conversation

@julien-nc
Copy link
Member

@julien-nc julien-nc commented Sep 5, 2025

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 use taskProcessingManager::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

  • Slow capabilities computation

🏁 Checklist

  • 🌏 Tested with different browsers / clients:
    • Chromium (Chrome / Edge / Opera / Brave)
    • Firefox
    • Safari
    • Talk Desktop
    • Integrations with Files sidebar and other apps
    • Not risky to browser differences / client
  • 🖌️ Design was reviewed, approved or inspired by the design team
  • ⛑️ Tests are included or not possible
  • 📗 User documentation in https://github.com/nextcloud/documentation/tree/master/user_manual/talk has been updated or is not required

…Ids method to check what is available

Signed-off-by: Julien Veyssier <[email protected]>
Copy link
Contributor

@miaulalala miaulalala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Let me see what can be done about ocp.

Backporting it seems like a good idea from a performance perspective.

@miaulalala
Copy link
Contributor

/backport to stable32

@miaulalala miaulalala merged commit 453e760 into main Sep 8, 2025
82 of 83 checks passed
@miaulalala miaulalala deleted the enh/noid/faster-available-tasktype-check branch September 8, 2025 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants