Skip to content

Commit 3d9e1d8

Browse files
committed
release: v1.10.2 — function ID openrouter_pipe -> openrouter-pipe
The openwebui.com community portal slugifies the listing title ("OpenRouter Pipe" -> "openrouter-pipe") and rejected the underscored manifest with an 'undefined' error on upload. Renaming the function ID to match the portal-generated slug fixes the publishing flow. function.json - id: openrouter_pipe -> openrouter-pipe - version: 1.10.1 -> 1.10.2 - updated_at: 2026-05-31T15:00:00.000Z - content field unchanged (openrouter_pipe.py is the Python filename / module name, which cannot contain dashes) openrouter_pipe.py - docstring examples in _clean_model_id() and _sync_model_icons() now show the dash form (openrouter-pipe.openai/gpt-4o) test_pipe.py - 5 _function_id simulations and 2 prefix-assertion strings updated to openrouter-pipe.* form. All 939 tests still green. Breaking note for existing Admin-Panel installs: Open WebUI keys functions by ID in its DB. The old openrouter_pipe row remains active; the new openrouter-pipe ID creates a fresh function row on re-install. To migrate: copy Valves config, uninstall old, install new from portal, paste config back. Chat history is tied to the model selector entry, not the function row, so no chat data is lost.
1 parent 4aa7a52 commit 3d9e1d8

4 files changed

Lines changed: 27 additions & 12 deletions

File tree

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [1.10.2] — 2026-05-31
11+
12+
### Changed
13+
14+
- **Function ID renamed `openrouter_pipe``openrouter-pipe`** (dash, not underscore). The openwebui.com community portal slugifies the listing title (`OpenRouter Pipe``openrouter-pipe`) and rejected the underscored manifest with an "undefined" error on upload. The new ID matches the portal-generated slug, so the published listing now installs cleanly. Internal Python module name (`openrouter_pipe.py`, `import openrouter_pipe`) is unchanged — Python identifiers cannot contain dashes.
15+
16+
### Breaking
17+
18+
- **Existing Admin-Panel installs that registered under the old `openrouter_pipe` ID are not auto-migrated** — Open WebUI keys functions by ID in its database. After updating, the old function row remains active under the old ID; the new `openrouter-pipe` ID will create a fresh function row when re-installed via the portal. To migrate cleanly: copy your Valves config, uninstall the old function, install the new one, paste the config back. No data loss — chat history is tied to the model selector entry, not the function row.
19+
20+
### Docs
21+
22+
- Updated docstring references in `_clean_model_id` and `_sync_model_icons` to use the new dash form when illustrating the OWUI manifold prefix (e.g. `openrouter-pipe.openai/gpt-4o`).
23+
- Updated 5 `test_pipe.py` simulations of `_function_id` and the prefix-assertion strings to match the new ID.
24+
1025
## [1.10.1] — 2026-05-31
1126

1227
### Added

function.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"id": "openrouter_pipe",
2+
"id": "openrouter-pipe",
33
"name": "OpenRouter Pipe",
44
"type": "manifold",
55
"meta": {
@@ -9,7 +9,7 @@
99
"author": "Sena Labs",
1010
"author_url": "https://github.com/sena-labs",
1111
"funding_url": "https://github.com/sponsors/sena-labs",
12-
"version": "1.10.1",
12+
"version": "1.10.2",
1313
"license": "MIT",
1414
"required_open_webui_version": "0.4.0",
1515
"requirements": ["requests>=2.32.4", "pydantic>=2.0"]
@@ -36,6 +36,6 @@
3636
"content": "openrouter_pipe.py",
3737
"is_active": true,
3838
"is_global": true,
39-
"updated_at": "2026-05-31T00:00:00.000Z",
39+
"updated_at": "2026-05-31T15:00:00.000Z",
4040
"created_at": "2026-01-21T00:00:00.000Z"
4141
}

openrouter_pipe.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1368,7 +1368,7 @@ def _clean_model_id(model_id: str) -> str:
13681368
13691369
OpenRouter model IDs use the format ``provider/model`` (e.g.
13701370
``anthropic/claude-3.5-sonnet``). The manifold prefix added by Open
1371-
WebUI is a function id without ``/`` (e.g. ``openrouter_pipe``). We
1371+
WebUI is a function id without ``/`` (e.g. ``openrouter-pipe``). We
13721372
only strip when the text before the first ``.`` contains no ``/`` —
13731373
otherwise the dot is part of the model version (e.g.
13741374
``claude-3.5-sonnet``) and must be preserved.
@@ -1686,7 +1686,7 @@ def _sync_model_icons(self, models: List[dict]) -> None:
16861686
16871687
Open WebUI serves model icons from its database, not from the dicts
16881688
returned by ``pipes()``. OWUI prefixes every pipe model ID with
1689-
``{function_id}.`` (e.g. ``openrouter_pipe.openai/gpt-4o``) and the
1689+
``{function_id}.`` (e.g. ``openrouter-pipe.openai/gpt-4o``) and the
16901690
frontend requests icons using that prefixed ID.
16911691
16921692
Called both on cache miss and on subsequent cache hits (until all

test_pipe.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1927,7 +1927,7 @@ async def _test_pipe_no_msgs_key():
19271927
# (OWUI may overwrite the record after pipes() returns; confirmed on next call)
19281928
_pipe_func = Pipe()
19291929
_pipe_func.valves = Pipe.Valves(OPENROUTER_API_KEY="k", SYNC_PROVIDER_ICONS=True)
1930-
_pipe_func._function_id = "openrouter_pipe" # simulate OWUI module naming
1930+
_pipe_func._function_id = "openrouter-pipe" # simulate OWUI module naming
19311931
_mock_Models_f = MagicMock()
19321932
_mock_Models_f.get_model_by_id.return_value = None # No existing record yet
19331933
_mock_ModelForm_f = MagicMock()
@@ -1947,11 +1947,11 @@ async def _test_pipe_no_msgs_key():
19471947
# Verify DB lookups used prefixed IDs
19481948
_lookup_ids = [c.args[0] for c in _mock_Models_f.get_model_by_id.call_args_list]
19491949
_assert(
1950-
"openrouter_pipe.openai/gpt-4o" in _lookup_ids,
1950+
"openrouter-pipe.openai/gpt-4o" in _lookup_ids,
19511951
"_sync_model_icons: DB lookup uses prefixed ID (openai)",
19521952
)
19531953
_assert(
1954-
"openrouter_pipe.anthropic/claude-3.5-sonnet" in _lookup_ids,
1954+
"openrouter-pipe.anthropic/claude-3.5-sonnet" in _lookup_ids,
19551955
"_sync_model_icons: DB lookup uses prefixed ID (anthropic)",
19561956
)
19571957
# Verify insert_new_model was called (since get_model_by_id returned None)
@@ -1963,11 +1963,11 @@ async def _test_pipe_no_msgs_key():
19631963
_form_calls = _mock_ModelForm_f.call_args_list
19641964
_form_ids = [c.kwargs.get("id", "") for c in _form_calls]
19651965
_assert(
1966-
"openrouter_pipe.openai/gpt-4o" in _form_ids,
1966+
"openrouter-pipe.openai/gpt-4o" in _form_ids,
19671967
"_sync_model_icons: ModelForm uses prefixed ID (openai)",
19681968
)
19691969
_assert(
1970-
"openrouter_pipe.anthropic/claude-3.5-sonnet" in _form_ids,
1970+
"openrouter-pipe.anthropic/claude-3.5-sonnet" in _form_ids,
19711971
"_sync_model_icons: ModelForm uses prefixed ID (anthropic)",
19721972
)
19731973
# After insert (model not yet registered by OWUI), _icons_synced must NOT be updated.
@@ -1982,7 +1982,7 @@ async def _test_pipe_no_msgs_key():
19821982
# 25g. Existing model with user custom icon → skips overwrite
19831983
_pipe_skip = Pipe()
19841984
_pipe_skip.valves = Pipe.Valves(OPENROUTER_API_KEY="k", SYNC_PROVIDER_ICONS=True)
1985-
_pipe_skip._function_id = "openrouter_pipe" # simulate OWUI module naming
1985+
_pipe_skip._function_id = "openrouter-pipe" # simulate OWUI module naming
19861986
_mock_Models_s = MagicMock()
19871987
_existing_model = MagicMock()
19881988
_existing_model.meta.profile_image_url = "https://custom-icon.example.com/icon.png"
@@ -2015,7 +2015,7 @@ async def _test_pipe_no_msgs_key():
20152015
# 25h. Existing model with OWUI default (data: URL) icon → updates with provider icon
20162016
_pipe_update = Pipe()
20172017
_pipe_update.valves = Pipe.Valves(OPENROUTER_API_KEY="k", SYNC_PROVIDER_ICONS=True)
2018-
_pipe_update._function_id = "openrouter_pipe" # simulate OWUI module naming
2018+
_pipe_update._function_id = "openrouter-pipe" # simulate OWUI module naming
20192019
_mock_Models_u = MagicMock()
20202020
_existing_default = MagicMock()
20212021
_existing_default.name = "GPT-4o"

0 commit comments

Comments
 (0)