Skip to content

fix(ai): migrate AiIntegrationsService off deprecated TextProcessing API#13151

Draft
hamza221 wants to merge 3 commits into
mainfrom
fix/ai-taskprocessing-deprecation
Draft

fix(ai): migrate AiIntegrationsService off deprecated TextProcessing API#13151
hamza221 wants to merge 3 commits into
mainfrom
fix/ai-taskprocessing-deprecation

Conversation

@hamza221

@hamza221 hamza221 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor
  • Replace the OCP\TextProcessing API (deprecated since Nextcloud 30.0.0) with OCP\TaskProcessing
  • extract prompts into lib/Service/AiIntegrations/DefaultPrompts.php

Assisted-by: ClaudeCode:claude-opus-4-8
Signed-off-by: Hamza hamzamahjoubi221@gmail.com

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Replace the OCP\TextProcessing API (deprecated since Nextcloud 30.0.0) with
OCP\TaskProcessing throughout the AI integrations:

- FreePromptTaskType -> TextToText (core:text2text)
- SummaryTaskType -> TextToTextSummary (core:text2text:summary)
- task input/output now use the ['input' => ...] / getOutput()['output'] shape
- availability checks switch from in_array(class, list) to isset(types[id])
- drop the now-unused TextProcessingManager constructor dependency

Callers that fed the old class constants to isLlmAvailable (AdminSettings,
PageController, FollowUpClassifierListener) and the unit tests are updated to
the new task type IDs. Two now-obsolete psalm-baseline entries are removed.

Assisted-by: ClaudeCode:claude-opus-4-8
Signed-off-by: Hamza <hamzamahjoubi221@gmail.com>
Move the inline prompt templates out of AiIntegrationsService into a dedicated
DefaultPrompts class. Templates use sprintf placeholders; the argument order is
documented on each constant.

Assisted-by: ClaudeCode:claude-opus-4-8
Signed-off-by: Hamza <hamzamahjoubi221@gmail.com>
@hamza221 hamza221 force-pushed the fix/ai-taskprocessing-deprecation branch from d1f8c04 to d8de3c0 Compare June 23, 2026 17:54
Signed-off-by: Hamza <hamzamahjoubi221@gmail.com>
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.

1 participant