🐛 fix: Stop guessing URL fields from key names in config form#38
Merged
danny-avila merged 1 commit intomainfrom May 3, 2026
Merged
🐛 fix: Stop guessing URL fields from key names in config form#38danny-avila merged 1 commit intomainfrom
danny-avila merged 1 commit intomainfrom
Conversation
The admin panel's text-field renderer was inferring URL-ness from a substring match on the field key (`url`, `endpoint`). The `endpoint` substring matched the modelSpec preset `endpoint` field — which is a categorical enum like `openAI`, not a URL. Rendering it as `<input type="url">` triggered browser autofill that swallowed uppercase keystrokes, making `openAI` and other camel-cased endpoint values impossible to type. Removes the keyword heuristic outright. LibreChat's configSchema today declares zero `.url()` validations, so no field in the form should be rendered as `type="url"`. If the schema ever tags a field with `.url()`, detection can be added at the schema-extraction layer at that point. Linear: AI-895
Contributor
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
danny-avila
approved these changes
May 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Capital letters cannot be typed into the modelSpec preset
endpointfield, only lowercase works, Shift-letter is swallowed. Makes valid endpoint values likeopenAI,azureOpenAI,azureAssistantsimpossible to enter from the admin panel.FieldRendererwas inferring URL-ness from a substring match on the field key (url,endpoint). The'endpoint'substring matchedmodelSpecs.list[].preset.endpoint— a categorical enum (openAI,anthropic, etc.), not a URL. The form rendered it as<input type="url">, and browser autofill on URL-typed inputs swallowed shifted keystrokes.Fix:
configSchemadeclares zero.url()validations today, so no field in the form should be rendered astype="url". If the schema ever tags a field with.url(), detection can be added at the schema-extraction layer (extractSchemaTreeinsrc/server/config.ts) at that point.Change Type
Testing
openAIinConfiguration → Model specs → list[0] → Preset → Endpointnow producesopenAI(capital A registers).baseURL,iconURL,searxngInstanceUrl, etc.) lose theirplaceholder="https://..."andtype="url"rendering — they're plain text inputs now. Cosmetic only; no validation change because the schema didn't enforce URL-ness in the first place.bun run lintclean.bunx tsc --noEmitclean. 528/528 tests pass.Checklist