Skip to content

chore: remove the retired Appwrite Assistant - #14167

Merged
ChiragAgg5k merged 2 commits into
mainfrom
chore/remove-legacy-assistant
Oct 6, 2026
Merged

ChiragAgg5k merged 2 commits into
mainfrom
chore/remove-legacy-assistant

Conversation

@ChiragAgg5k

Copy link
Copy Markdown
Member

What

Removes the legacy Appwrite Assistant (appwrite/assistant). Appwrite Agent replaced it, Cloud no longer runs the container, and no console calls POST /v1/console/assistant (vibes cleanup: appwrite/vibes#547).

Part of appwrite-labs/cloud#6319.

API

  • Delete Console/Http/Assistant/Create.php (POST /v1/console/assistant) and docs/references/assistant/.
  • Drop the assistant.read scope from roles.php, scopes/project.php and the benchmark scope list, plus the assistant CLI SDK exclude entry.
  • Drop _APP_ASSISTANT_ENABLED from GET /v1/console/variables and the ConsoleVariables model.
  • V25 now strips assistant.read from keys, functions and sites, next to the retired devKeys.* scopes, so existing keys don't keep a scope the whitelist no longer accepts.

Self-hosting

  • Remove the appwrite-assistant service and _APP_ASSISTANT_OPENAI_API_KEY from docker-compose.yml, .env and app/config/variables.php.
  • CLI installer: drop the "Add Appwrite Assistant?" prompt and key handling. Compose Generator: drop the enableAssistant optional service.
  • Web installer: drop the OpenAI key field, review badge, payload field and tooltip styles.
  • Upgrades run docker compose up --remove-orphans, so an existing appwrite-assistant container is removed on upgrade.

SDK task

  • sdks no longer uses _APP_ASSISTANT_OPENAI_API_KEY to generate changelogs and bump versions. SDK releases go through the release-sdk skill in cloud. Removes the --ai flag, generateVersionAndChangelog(), updateSdkVersion(), updateChangelogFile() and getSdkConfigPath(). Utopia CLI ignores unknown args, so existing --ai=no invocations keep working.

Housekeeping

  • Remove the product / assistant label rule.

Breaking

  • POST /v1/console/assistant is gone, along with the assistant.read key scope (ProjectKeyScopes enum loses assistant.read).
  • ConsoleVariables loses _APP_ASSISTANT_ENABLED.

Testing

  • pint --test and PHPStan on every changed PHP file: clean.
  • tests/unit/Docker/Compose/GeneratorTest.php and tests/unit/Migration: pass.
  • No remaining references to console/assistant, assistant.read or _APP_ASSISTANT_* outside the V25 cleanup.

Follow-ups

  • appwrite-labs/cloud: drop the assistant.read roles/oauth2 entries, the getSdkConfigPath() override, the compose/Kind chart entries and --ai=no in the release-sdk skill.
  • appwrite/vibes: once this lands, drop the temporary appwrite-assistant omission in scripts/generate-compose-data.ts.

Appwrite Agent replaced the Assistant, Cloud no longer runs the appwrite/assistant container, and no console calls POST /v1/console/assistant any more.

Drop the endpoint, its reference docs, the assistant.read scope and the _APP_ASSISTANT_ENABLED console variable. Stop shipping the appwrite-assistant container and _APP_ASSISTANT_OPENAI_API_KEY in the compose file, .env, variables config and both installers. Upgrades run compose with --remove-orphans, so existing assistant containers are cleaned up. V25 strips assistant.read from keys, functions and sites, as it already does for the retired devKeys scopes.

The sdks task also read _APP_ASSISTANT_OPENAI_API_KEY to write AI changelogs and bump versions. SDK releases go through the release-sdk skill now, so remove that path and the --ai flag.
@ChiragAgg5k ChiragAgg5k self-assigned this Oct 6, 2026
@ghost

ghost commented Oct 6, 2026 •

Copy link
Copy Markdown

🔵 Tier A · Mergeable after minor fixes

The Compose issue is fixed, but the previously reported missing migration scope-cleanup tests remain outstanding.

Removes the retired Appwrite Assistant endpoint, scope, configuration, container, and installer UI. It also removes AI-driven SDK version/changelog generation and extends V25 to strip the retired scope from existing documents. The latest commit fixes the leftover duplicate environment key in Docker Compose.

Latest changes: The latest commit removes the stray environment mapping left behind by the Assistant service deletion, preserving the message scheduler's existing configuration.

Verdict New comments Fixed Still open
✅ Approved 0 1 1
Fix with agent prompt
### Issue 1
src/Appwrite/Migration/Version/V25.php:336-339
**Cover retired Assistant scope cleanup in the migration tests**

`tests/unit/Migration/Version/V25Test.php` already exercises document migration, but none of its cases covers the new scope cleanup. Please add coverage for keys, functions, and sites that verifies `assistant.read` is removed while active scopes are preserved, including rerunning the migration.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
📂 Walkthrough · 15
File Change
.env, app/config/variables.php Remove the Assistant OpenAI key defaults and variable metadata.
.github/labeler.yml Remove the Assistant product label rule.
app/config/roles.php, app/config/scopes/project.php, tests/benchmarks/http.js Remove assistant.read from role, scope, and benchmark lists.
app/config/sdks.php Remove the obsolete CLI Assistant exclusion.
app/views/install/installer.phtml, app/views/install/installer/css/styles.css Remove Assistant defaults and tooltip styling.
app/views/install/installer/js/modules/progress.js, app/views/install/installer/js/modules/state.js, app/views/install/installer/js/modules/ui.js, app/views/install/installer/js/steps.js Remove Assistant state, payload handling, and review badge updates.
app/views/install/installer/templates/steps/step-1.phtml, app/views/install/installer/templates/steps/step-4.phtml Remove the OpenAI key field and Assistant review row.
docker-compose.yml Remove the Assistant service and key forwarding, including the stray environment mapping.
src/Appwrite/Docker/Compose/Generator.php, tests/unit/Docker/Compose/GeneratorTest.php Remove optional Assistant service generation and its toggle test.
src/Appwrite/Migration/Version/V25.php Strip assistant.read alongside retired developer-key scopes.
src/Appwrite/Platform/Installer/Http/Installer/Install.php, src/Appwrite/Platform/Installer/Http/Installer/Status.php Remove Assistant input and sensitive-field handling.
src/Appwrite/Platform/Tasks/Install.php Remove the Assistant prompt, key handling, and generator option; remove orphan containers on upgrades.
src/Appwrite/Platform/Tasks/SDKs.php Remove AI version/changelog generation and simplify SDK pull request creation.
src/Appwrite/Platform/Modules/Console/Http/Assistant/Create.php, docs/references/assistant/chat.md, src/Appwrite/Platform/Modules/Console/Services/Http.php Delete the Assistant endpoint and reference documentation and unregister its action.
src/Appwrite/Platform/Modules/Console/Http/Variables/Get.php, src/Appwrite/Utopia/Response/Model/ConsoleVariables.php, tests/e2e/Services/Console/ConsoleConsoleClientTest.php Remove the Assistant-enabled console variable and its assertion.
⏳ Still open from earlier reviews · 1
✅ Fixed since the last review · 1
  • Remove the leftover Assistant environment key · docker-compose.yml:1664

Reviewed the commits since 1cc7968 · Details · Comment @hansi-codes review to re-run, or mention @hansi-codes with a question.

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Tier B · 1 blocking finding to address. Summary

Comment thread docker-compose.yml Resolved
Comment thread src/Appwrite/Migration/Version/V25.php Resolved
@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

✨ Benchmark results

Comparing main (before) → chore/remove-legacy-assistant (after).

Metric Before After Change
🚀 Requests/sec 176.05 199.88 🟢 +13.5%
⏱️ Latency P50 97.67 ms 86.32 ms 🟢 -11.6%
⏱️ Latency P95 232.45 ms 204.39 ms 🟢 -12.1%
Per-scenario breakdown & investigation details

Metrics below reflect the current branch (after). Δ P95 compares against the base.

Scenario P50 (ms) P95 (ms) Requests RPS Δ P95 (ms)
API total 86.32 204.39 12,540 199.88 -28.05
Account 167.7 344.09 660 11.19 -27.23
TablesDB 83.49 156.79 6,820 111.07 -29.08
Storage 79.33 167.77 3,300 55.2 -27.99
Functions 125.02 252.3 1,760 30.21 -33.2

Top API waits (after)

API request Max wait (ms)
account.name.update 529.14
functions.create 455.22
account.prefs.update 443.81
functions.variables.update 403.15
tablesdb.rows.list 398.64

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Tier A · Looks good to merge. Summary

@ChiragAgg5k
ChiragAgg5k merged commit 3a08617 into main Oct 6, 2026
59 checks passed
Naz-Ovh pushed a commit to 0x-fork/appwrite that referenced this pull request Oct 7, 2026
Removing the Assistant (appwrite#14167) also removed the assistant.read scope. OAuth2 clients registered while it existed, such as the ChatGPT app, still request project:assistant.read, and Cloud now rejects their authorization with invalid_scope. Bring the scope back as deprecated so it stays a known scope without granting anything.
Naz-Ovh pushed a commit to 0x-fork/appwrite that referenced this pull request Oct 7, 2026
Keys, functions, sites and OAuth2 clients store scopes, and MCP hosts such as ChatGPT keep requesting the list they registered with. Removing assistant.read (appwrite#14167) broke those clients with invalid_scope until appwrite#14200 restored it. Record every shipped scope in app/config/scopes/lock.json and fail the unit suite when one disappears from the catalogs or a new one is not locked, so retiring a scope means deprecating it.
imtia33 pushed a commit to imtia33/appwrite that referenced this pull request Oct 8, 2026
…ript

appwrite#14167 removed the appwrite-assistant service and _APP_ASSISTANT_OPENAI_API_KEY from the upstream compose file and .env, so the script no longer needs to filter them out.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants