[GH-ISSUE #23047] Admin model editor shows empty fields for pipe-generated models #58538

Closed
opened 2026-05-05 23:22:21 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @D43-GIT on GitHub (Mar 26, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/23047

Description

When a Pipe function generates models (manifold pipes), the admin model editor (/admin/workspace/models > click model > edit) shows empty fields for description, system prompt, and profile image — even when these values are stored in the model config database table and returned correctly by the API.

Steps to Reproduce

  1. Create a Pipe function with pipes() method that returns sub-models
  2. Set the function's meta with profile_image_url and description via the API
  3. Also create a model config entry via POST /api/v1/models/create with matching ID, description, system prompt, and profile image
  4. Open the admin model editor for the pipe-generated model
  5. Observe: description, system prompt, and profile image fields are all empty

Expected Behavior

The admin model editor should display the stored description, system prompt, and profile image for pipe-generated models.

Actual Behavior

All fields show placeholder text ("Add a short description...", "Write your model system prompt content here..."). The JSON Preview button shows the pipe's runtime model data with empty fields, not the stored config.

Root Cause

In functions.py, the get_function_models() function builds pipe model dicts with only id, name, object, created, owned_by, pipe, and has_user_valves. The function's meta (which contains profile_image_url and description) is NOT included in the pipe model dict.

Then in utils/models.py get_all_models(), the merge logic at line ~150 tries to match stored model configs with base models. For pipe models with base_model_id = NULL, the stored config IS merged into model['info']. However, the admin editor frontend appears to read from the pipe's raw model data rather than the merged info field.

Suggested Fix

Include the function's meta fields in the pipe model dict in get_function_models():

# In functions.py, when building pipe model dicts:
_pipe_meta = {}
if hasattr(pipe, 'meta') and pipe.meta:
    _pm = pipe.meta if isinstance(pipe.meta, dict) else {}
    if _pm.get('description') or _pm.get('profile_image_url'):
        _pipe_meta = {'meta': {k: v for k, v in _pm.items() 
                      if k in ('description', 'profile_image_url', 'capabilities')}}

pipe_models.append({
    'id': sub_pipe_id,
    'name': sub_pipe_name,
    'object': 'model',
    'created': pipe.created_at,
    'owned_by': 'openai',
    'pipe': pipe_flag,
    'has_user_valves': has_user_valves,
    **_pipe_meta,
})

Environment

  • Open WebUI v0.8.11
  • Docker deployment on macOS (M1 Max)
  • Custom Pipe functions with manifold sub-models

Workaround

Patching functions.py inside the Docker container to include pipe.meta in the pipe model dict. This requires re-patching after each container update.

Originally created by @D43-GIT on GitHub (Mar 26, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/23047 ## Description When a Pipe function generates models (manifold pipes), the admin model editor (`/admin/workspace/models > click model > edit`) shows empty fields for description, system prompt, and profile image — even when these values are stored in the model config database table and returned correctly by the API. ## Steps to Reproduce 1. Create a Pipe function with `pipes()` method that returns sub-models 2. Set the function's meta with `profile_image_url` and `description` via the API 3. Also create a model config entry via `POST /api/v1/models/create` with matching ID, description, system prompt, and profile image 4. Open the admin model editor for the pipe-generated model 5. Observe: description, system prompt, and profile image fields are all empty ## Expected Behavior The admin model editor should display the stored description, system prompt, and profile image for pipe-generated models. ## Actual Behavior All fields show placeholder text ("Add a short description...", "Write your model system prompt content here..."). The JSON Preview button shows the pipe's runtime model data with empty fields, not the stored config. ## Root Cause In `functions.py`, the `get_function_models()` function builds pipe model dicts with only `id`, `name`, `object`, `created`, `owned_by`, `pipe`, and `has_user_valves`. The function's `meta` (which contains `profile_image_url` and `description`) is NOT included in the pipe model dict. Then in `utils/models.py` `get_all_models()`, the merge logic at line ~150 tries to match stored model configs with base models. For pipe models with `base_model_id = NULL`, the stored config IS merged into `model['info']`. However, the admin editor frontend appears to read from the pipe's raw model data rather than the merged `info` field. ## Suggested Fix Include the function's `meta` fields in the pipe model dict in `get_function_models()`: ```python # In functions.py, when building pipe model dicts: _pipe_meta = {} if hasattr(pipe, 'meta') and pipe.meta: _pm = pipe.meta if isinstance(pipe.meta, dict) else {} if _pm.get('description') or _pm.get('profile_image_url'): _pipe_meta = {'meta': {k: v for k, v in _pm.items() if k in ('description', 'profile_image_url', 'capabilities')}} pipe_models.append({ 'id': sub_pipe_id, 'name': sub_pipe_name, 'object': 'model', 'created': pipe.created_at, 'owned_by': 'openai', 'pipe': pipe_flag, 'has_user_valves': has_user_valves, **_pipe_meta, }) ``` ## Environment - Open WebUI v0.8.11 - Docker deployment on macOS (M1 Max) - Custom Pipe functions with manifold sub-models ## Workaround Patching `functions.py` inside the Docker container to include `pipe.meta` in the pipe model dict. This requires re-patching after each container update.
Author
Owner

@pr-validator-bot commented on GitHub (Mar 26, 2026):

⚠️ Missing Issue Title Prefix

@D43-GIT, your issue title is missing a prefix (e.g., bug:, feat:, docs:).

Please update your issue title to include one of the following prefixes:

  • bug: Bug report or error you've encountered
  • feat: Feature request or enhancement suggestion
  • docs: Documentation issue or improvement request
  • question: Question about usage or functionality
  • help: Request for help or support

Example: bug: Login fails when using special characters in password

<!-- gh-comment-id:4130711424 --> @pr-validator-bot commented on GitHub (Mar 26, 2026): # ⚠️ Missing Issue Title Prefix @D43-GIT, your issue title is missing a prefix (e.g., `bug:`, `feat:`, `docs:`). Please update your issue title to include one of the following prefixes: - **bug**: Bug report or error you've encountered - **feat**: Feature request or enhancement suggestion - **docs**: Documentation issue or improvement request - **question**: Question about usage or functionality - **help**: Request for help or support Example: `bug: Login fails when using special characters in password`
Author
Owner

@tjbck commented on GitHub (Mar 26, 2026):

Intended and not supported.

<!-- gh-comment-id:4138754567 --> @tjbck commented on GitHub (Mar 26, 2026): Intended and not supported.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#58538