mirror of
https://github.com/nesquena/hermes-webui.git
synced 2026-05-25 19:20:16 +00:00
dc2334c5a3
The original fix preserved full IDs only when config_provider == 'custom', which broke existing tests expecting prefix-stripping for known namespaces like 'openai/' and 'google/'. The correct heuristic: strip the prefix only when it is a known provider namespace (i.e. prefix in _PROVIDER_MODELS — 'openai', 'google', 'anthropic', etc.). Unknown prefixes like 'zai-org' are intrinsic to the model ID and must be preserved. This satisfies both the DeepInfra use case (#548) and the existing #433 regression tests.