mirror of
https://github.com/nesquena/hermes-webui.git
synced 2026-05-24 18:50:15 +00:00
stage-350: fix #2178 CI — update Ollama test assertion to match new allowOllamaFormat guard
PR #2178 added an 'allowOllamaFormat' guard (resolves to false for non-ollama @-provider prefixes like '@custom:ai_gateway') to stop the ollama label formatter from reformatting custom-provider model IDs with dashes. The existing test asserted on the pre-PR code shape and didn't pick up the new guard. Updated the assertion to match the actual post-PR code at static/ui.js:2202, with an extended docstring explaining the bug class the guard fixes (bare custom-provider model IDs like 'Qwen3.6-35B-A3B' had hyphens stripped to spaces + last letter lowercased by the formatter).
This commit is contained in:
@@ -40,9 +40,14 @@ def test_get_model_label_formats_bare_ollama_ids():
|
||||
"to avoid reformatting generic bare model IDs."
|
||||
)
|
||||
assert "const ollamaLabel = _fmtOllamaLabel(_last);" in src
|
||||
assert "if ((modelId.startsWith('ollama/') || modelId.startsWith('@ollama') || looksLikeOllamaTag || looksLikeBareOllamaId) && ollamaLabel !== _last) {" in src, (
|
||||
assert "if (allowOllamaFormat && (modelId.startsWith('ollama/') || modelId.startsWith('@ollama') || looksLikeOllamaTag || looksLikeBareOllamaId) && ollamaLabel !== _last) {" in src, (
|
||||
"Ollama-tagged ids like 'kimi-k2.6:3b' should still pass through _fmtOllamaLabel() "
|
||||
"when the formatter produces a friendlier label."
|
||||
"when the formatter produces a friendlier label, but ONLY when the resolved "
|
||||
"atProvider is empty or starts with 'ollama' (allowOllamaFormat guard added in "
|
||||
"PR #2178 to stop reformatting non-ollama custom-provider models like "
|
||||
"'custom:ai_gateway/Qwen3.6-35B-A3B'). The guard fixes the bug where bare "
|
||||
"custom-provider model IDs containing dashes had their hyphens stripped to "
|
||||
"spaces and their last letter lowercased by the ollama formatter."
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user