Repository navigation
TWE-712: Remove wagtail_ai - #476
Merged
Merged
Conversation
A recent upgrade of the any-llm-sdk transitive dependency pulls in both the OpenAI and Anthropic SDKs, adding ~55MB to every gunicorn worker and pushing production dynos over their 512MB quota. As the feature's not currently in use, this is removed until needed and performance is better
zerolab
requested changes
Oct 28, 2026
zerolab
left a comment
Member
There was a problem hiding this comment.
@alxbridge I say let's fully nuke it and revisit once improvements are released upstream
This reverts commit 4c8377e. Per review, wagtail-ai is being removed entirely instead (next commit). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This reverts commit f8a27b6. wagtail-ai pulls in django-ai-core and any-llm-sdk, which since the Wagtail 8 upgrade load both the OpenAI and Anthropic SDKs in every worker (~55MB each), pushing production dynos over their memory quota. No AI provider is configured in production, so remove it until the upstream import improvements are released. Conflicts in pyproject.toml and poetry.lock (both changed by the Wagtail 8 upgrade) were resolved by dropping the wagtail-ai dependency and running `poetry lock --no-update`; only wagtail-ai and its transitive dependencies are removed from the lock file. Also adds a CHANGELOG entry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zerolab
approved these changes
Oct 28, 2026
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.
A recent upgrade of the
any-llm-sdktransitive dependency pulls in both the OpenAI and Anthropic SDKs, adding ~55MB to every gunicorn worker and pushing production dynos over their 512MB quota.As the feature's not currently in use, this is removed until needed and performance is better
Tracked on TWE-712
Description of Changes Made
I've removed the changes made to add
wagtail-ai, including its dependencies, configuration, and related documentation.Once a fix can be made to
django-ai-core(which is responsible for howany-llm-sdkis pulled in), this PR can be reversed and the updated versions bumped.Verification
Memray profiling showed the following memory usage for the site code before the Wagtail 8.0 upgrade which pulled in the newer dependency, after it, and with this PR:
with this PR
Deployment
wagtail-ai's migrations created two tables:
wagtail_ai_prompt(populated with default prompts) andwagtail_ai_agentsettings, as well as content types and permissions in existing tables. Uninstalling the package doesn't remove any of these. To clean them up:1. roll back the wagtail-ai migrations while the app is still installed. This drops both tables and their
django_migrationsrows:2. Deploy.
3. After deployment, remove the stale content types for the uninstalled app. This also deletes their permissions and any group permissions assigned to them:
It lists what it will delete and asks for confirmation. Check that the list only contains
wagtail_aientries before answeringyes. Drop--include-stale-appsand it won't touch content types for uninstalled apps at all.
MR Checklist
Unit tests
Documentation
Browser testing
Data protection
Light and dark mode
Accessibility
Sustainability
Pattern library