mirror of
https://github.com/open-webui/docs.git
synced 2026-11-05 01:38:13 +00:00
[PR #1469] [MERGED] docs: show plugin authors how to read their own id after v0.12.0's module rename #1429
Labels
No labels
bug
documentation
documentation
duplicate
enhancement
enhancement
good first issue
good first issue
good first issue
help wanted
help wanted
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
open-webui/docs#1429
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/docs/pull/1469
Author: @silentoplayz
Created: 10/16/2026
Status: ✅ Merged
Merged: 10/16/2026
Merged by: @silentoplayz
Base:
main← Head:docs/plugin-own-id📝 Commits (1)
496c9e9docs: show plugin authors how to read their own id after v0.12.0's module rename📊 Changes
1 file changed (+11 additions, -0 deletions)
View changed files
📝
docs/features/extensibility/plugin/development/under-the-hood.mdx(+11 -0)📄 Description
Summary
Since v0.12.0, Open WebUI loads each plugin as a module named
function_{id}_<32 hex characters>(ortool_{id}_<32 hex characters>) instead offunction_{id}(e6476928e, plugin.py#L277). A plugin that took its own id from__name__now gets the id with the hex suffix attached, so anything it looks up by that id misses. My own event functions did this, so, on v0.12.0, their old versions could not switch themselves off. I fixed 19 event functions by stripping the suffix at module load, as this tip shows.The Under the Hood page already documents the new module name. This adds a tip right below it with what to use instead. Inside a handler, that is the
__id__argument (Pipes do not receive it). For code that runs at module load, it is a one-linere.subthat strips the prefix and suffix and works on both the old and the new names.It is one tip on one page, with nothing to maintain unless the module naming changes again, and it applies to every deployment the same way. It sits next to step 2, which documents the name, and links to the existing Reserved Arguments entry for
__id__.Related issue or discussion
None.
Checklist
Notes for reviewers
What I checked:
function_{id}(ortool_{id}), ande6476928efirst shipped in v0.12.0.__id__is passed to Event, Action, Filter and Tool handlers, and not to Pipes.re.subline returns the plain id forfunction_<id>_<hex>,tool_<id>_<hex>,function_<id>andtool_<id>, including an id that itself starts withtool_.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.