Skip to content

docs: correct the pipe and action pages against functions.py and actions.py - #1401

Merged
Classic298 merged 1 commit into
open-webui:mainfrom
silentoplayz:docs/pipe-action-functions
Sep 18, 2026
Merged

Classic298 merged 1 commit into
open-webui:mainfrom
silentoplayz:docs/pipe-action-functions

Conversation

@silentoplayz

Copy link
Copy Markdown
Collaborator

Summary

I compared the Pipe and Action pages with functions.py, utils/actions.py, utils/plugin.py and utils/models.py on dev.

Action page:

  • The multi-action example declared actions and action() at module level. The loader only reads actions off the Action instance, so the example is now a class with actions as a class attribute, and the page says a module-level list is never read.
  • Buttons appear in the toolbar beneath the message, not above it.
  • The page said actions can integrate with the task system and process uploaded files. An action runs inline inside the button's HTTP request with no task hook, and the payload carries no attachments, so both sections now say so.
  • __id__ is the sub-action id alone for a sub-action, __user__ is a plain dict with valves when UserValves exists, body.messages entries also carry info and sources, an escaping exception becomes an HTTP 400 with a toast, and actions are gated on is_active, model access, chat ownership and ENABLE_PLUGINS.

Pipe page:

  • pipe() now lists every reserved argument it can declare, notes that the two event callables are None for plain API calls, and documents what each return type does on the streaming and non-streaming paths.
  • Manifold rules the page omitted: pipes may be a list or an async function, the model id is <function id>.<sub id> split on the first dot, a class name attribute prefixes every sub-model name, a raising pipes() contributes no models, a malformed entry skips the function, and the function id must be a Python identifier and is lowercased.
  • UserValves and the per-request reload of admin valves were missing. The FAQ now says what an escaping exception renders as, and that requirements: frontmatter is installed unless ENABLE_PIP_INSTALL_FRONTMATTER_REQUIREMENTS is off or OFFLINE_MODE is on.
  • "model name" corrected to "model id" where body["model"] is meant.

Related issue or discussion

None.

Checklist

  • I have reviewed the relevant documentation and matched the existing style.
  • This PR meets Open WebUI's contribution standards: it is accurate, relevant to users, narrowly scoped, maintainable, and not promotional content, advertising, lead generation, SEO placement, or a request to list a product, service, provider, integration, gateway, tool, or company primarily for visibility.
  • I understand that PRs that do not meet these standards may be closed without review and will not be merged. Repeated, low-quality, off-topic, promotional, or intentionally misleading submissions may result in the contributor being blocked from future participation in Open WebUI repositories.

Notes for reviewers

Every claim maps to a line on dev: return handling in functions.py (stream and non-stream branches), manifold id construction in get_function_models, get_function_params for the signature filter and UserValves, utils/actions.py for __id__, gating and the exception path, utils/models.py for sub-action names and icons, and routers/functions.py for the id rule.

@Classic298
Classic298 merged commit d713ea0 into open-webui:main Sep 18, 2026
1 check failed
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