[GH-ISSUE #946] OpenAI 配置项 Model 填入带有 / 的模型名时无法通过验证 #6278

Closed
opened 2026-03-01 17:10:49 +03:00 by kerem · 1 comment
Owner

Originally created by @Jerry-FaGe on GitHub (Apr 8, 2025).
Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/946

Describe the bug
OpenAI 配置项 Model 填入带有 / 的模型名时无法通过验证

To Reproduce
Steps to reproduce the behavior:
偏好设置 -> OpenAI -> 模型输入框
输入 deepseek/deepseek-v3-base:free 这类带有 / 的 OpenRouter 风格模型名会导致保存时报错

Expected behavior
可以正确校验带有 / 的模型名

Screenshots

Image

Info (please complete the following information):

  • Server OS: Ubuntu 24.04
  • Server Arch: x86_64
  • Nginx UI Version: 2.0.0-rc.5
  • Your Browser: Chrome

Additional context
原因是 safetyText 验证规则的两个正则表达式均未包含 / 符号,而有些聚合服务(如 OpenRouter )的模型名是需要的,改动太小就不提 pr 了。

Originally created by @Jerry-FaGe on GitHub (Apr 8, 2025). Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/946 **Describe the bug** OpenAI 配置项 Model 填入带有 / 的模型名时无法通过验证 **To Reproduce** Steps to reproduce the behavior: 偏好设置 -> OpenAI -> 模型输入框 输入 `deepseek/deepseek-v3-base:free` 这类带有 `/` 的 OpenRouter 风格模型名会导致保存时报错 **Expected behavior** 可以正确校验带有 `/` 的模型名 **Screenshots** ![Image](https://github.com/user-attachments/assets/0229eb3b-cdbd-4c23-aa36-2b52fba31a4a) **Info (please complete the following information):** - Server OS: Ubuntu 24.04 - Server Arch: x86_64 - Nginx UI Version: 2.0.0-rc.5 - Your Browser: Chrome **Additional context** 原因是 `safetyText` 验证规则的两个正则表达式均未包含 `/` 符号,而有些聚合服务(如 OpenRouter )的模型名是需要的,改动太小就不提 pr 了。
kerem 2026-03-01 17:10:49 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@0xJacky commented on GitHub (Apr 8, 2025):

已修复,下个版本发布,感谢反馈

<!-- gh-comment-id:2785580489 --> @0xJacky commented on GitHub (Apr 8, 2025): 已修复,下个版本发布,感谢反馈
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-ui#6278
No description provided.