Profanity filtering users can't bypass.
The plugin hardcodes GOOGLE_API_DOMAIN. The move is a one-line fork, a container rebuild and the key setting.
Tested with Discourse 2026.10.0-latest itself, run on October 13, 2026. How
Remove: GOOGLE_API_DOMAIN = "https://commentanalyzer.googleapis.com"Add: GOOGLE_API_DOMAIN = "https://api.unprofane.com"perspective_enabled: trueRemove: perspective_google_api_key: YOUR_GOOGLE_KEYAdd: perspective_google_api_key: up_test_YOUR_KEYperspective_toxicity_model: standard2 lines change. The discourse-perspective-api plugin hardcodes Google’s host and has no endpoint setting. Fork it, change one line, rebuild, and put an Unprofane key in perspective_google_api_key. A Discourse you cannot add plugins to cannot run the fork.
Tested with Discourse 2026.10.0-latest itself, run on October 13, 2026.
This needs an install where you choose the plugins: a self-hosted one built with discourse_docker, where you list them in containers/app.yml and rebuild, or a host that installs plugins from your own repository. Discourse’s own hosting lists unofficial and custom plugins on its Enterprise plan only, after its staff review the code; other hosts set their own rules (Communiteq, for one, takes a plugin from your GitHub repository on its Business and Enterprise plans). If your host will not run the fork, plan to turn the plugin off when Google’s service ends; Discourse’s team points to the AI triage in its Discourse AI plugin instead.
Sign in and make two keys on the keys page of the dashboard: a test key (up_test_…) for staging and a live key (up_live_…) for production. A test key is free and answers 100 checks a month across the account; a live key needs a plan. Keep your Google key: it is your way back until Google’s service ends on December 31, 2026.
Fork github.com/discourse/discourse-perspective-api and change lib/discourse_perspective.rb. Leave ANALYZE_COMMENT_ENDPOINT as it is: the plugin sends /v1alpha1/comments:analyze to the domain, and that is our path. Fork from the commit your Discourse version uses: the plugin’s .discourse-compatibility pins older Discourse versions to older commits, and each of them hardcodes the same line.
- GOOGLE_API_DOMAIN = "https://commentanalyzer.googleapis.com"
+ GOOGLE_API_DOMAIN = "https://api.unprofane.com"In containers/app.yml, replace the plugin’s clone line with your fork. Your fork no longer receives upstream fixes; watch the upstream repository and rebase onto it.
hooks:
after_code:
- exec:
cd: $home/plugins
cmd:
- git clone https://github.com/discourse/docker_manager.git
- git clone https://github.com/YOUR_ORG/discourse-perspective-api.gitThe site is offline while the container rebuilds. Then look at the file inside the container: it should name the Unprofane host.
cd /var/discourse && ./launcher rebuild app
./launcher enter app
grep GOOGLE_API_DOMAIN /var/www/discourse/plugins/discourse-perspective-api/lib/discourse_perspective.rbThe key setting keeps Google’s name and holds your Unprofane key, which the plugin sends as ?key=. There is no base URL setting.
perspective_enabled: true
perspective_google_api_key: up_test_YOUR_KEY
perspective_toxicity_model: standardRun this from the Discourse host, then post a reply with a plain insult on staging and look for the moderator flag. Both checks matter: when the answer is not a score (a wrong key, a 404, an error), the plugin reads it as 0.0 and flags nothing, with no error. Only a network failure or a read longer than 3 seconds raises a NetworkError in /logs.
curl -s -X POST "https://api.unprofane.com/v1alpha1/comments:analyze?key=up_test_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"comment":{"text":"you are a clown"},"requestedAttributes":{"TOXICITY":{}},"languages":["en"],"doNotStore":true}'perspective_flag_post_min_toxicity (0.9 by default) flags a post scoring above it; perspective_notify_posting_min_toxicity (0.85 by default) warns in the composer when that check is on. Both are between 0 and 1. Do not carry the old number over: the scores come from a different engine, so 0.8 there is not 0.8 here. The replay tool takes a CSV of recent texts with the scores Perspective gave them and shows, for each old threshold, the threshold here that flags the same share, and how often the two flags agree. A queue of the same size is not proof of the same accuracy: two thresholds can flag the same number of comments and disagree on which ones, and agreement with Perspective repeats its mistakes. Before production, run a sample your moderators have already decided (approved and removed) through staging, and for each candidate threshold count the removed items it catches and the approved items it flags. Read the disagreements, then choose.
Rebuild production from the same fork and commit, and set the live key.
perspective_google_api_key: up_live_YOUR_KEYPoint app.yml back at github.com/discourse/discourse-perspective-api, rebuild, and put your Google key back in perspective_google_api_key. This works until Google’s service ends on December 31, 2026; after that, rolling back means turning perspective_enabled off.
- git clone https://github.com/discourse/discourse-perspective-api.gitTested with Discourse 2026.10.0-latest itself (commit a329d97, Ruby 3.4.11) and the plugin at commit 53ece46 with this one-line change and these site settings, run in Discourse’s development image against a local Unprofane API on October 13, 2026. The plugin’s own jobs flagged an insult and not a thanks, flagged an edit, left private messages and a secured category alone until their settings were on, its composer endpoint warned, backfill recorded the scores, and a wrong key flagged nothing without an error. The same run passed against the real model on October 13, 2026, and the rollback below against Google’s own API on October 13, 2026. The snippet checks run the plugin’s own Ruby, with this change, on every run.