Problem
The channel create/edit dialog model filter pattern is applied by the backend during model sync, and backend regex handling supports a leading (?i) case-insensitive modifier. The frontend preview and validation path used browser RegExp syntax directly, so the same pattern could be rejected or fail to preview correctly in the dialog.
Expected behavior
Users should be able to enter a case-insensitive model filter pattern such as (?i)^gpt-4.*, preview fetched models consistently in the dialog, and sync models with the same rule on the backend.
Scope
- Accept the leading
(?i) modifier in the frontend channel model filter helper.
- Keep unsupported inline modifiers out of the frontend compatibility layer.
- Document the supported case-insensitive pattern in the channel dialog text.
- Add backend coverage for the existing case-insensitive matching behavior.
Problem
The channel create/edit dialog model filter pattern is applied by the backend during model sync, and backend regex handling supports a leading
(?i)case-insensitive modifier. The frontend preview and validation path used browserRegExpsyntax directly, so the same pattern could be rejected or fail to preview correctly in the dialog.Expected behavior
Users should be able to enter a case-insensitive model filter pattern such as
(?i)^gpt-4.*, preview fetched models consistently in the dialog, and sync models with the same rule on the backend.Scope
(?i)modifier in the frontend channel model filter helper.