fix(llm): stop the browser autofilling the LLM base URL (#1301)

The AI-parsing base URL and model inputs had no autoComplete, so a
browser password manager could drop the saved login email into the
base URL field. In the admin addon config onBlur then fired a model
lookup against e.g. "admin@trek.local", which the server rejected
with 400. Mark the base URL and model inputs as type=url /
autoComplete=off in both the admin addon config and the per-user
connection section.
This commit is contained in:
Maurice
2026-06-28 21:38:46 +02:00
parent 6f42e84183
commit d6bba454e0
2 changed files with 4 additions and 2 deletions
+2 -2
View File
@@ -435,7 +435,7 @@ function LlmParsingConfig({ addon }: { addon: Addon }) {
{provider !== 'anthropic' && (
<label className="block">
<span className={labelCls}>Base URL</span>
<input className={fieldCls} value={baseUrl} onChange={e => setBaseUrl(e.target.value)} onBlur={loadModels} placeholder={provider === 'local' ? 'http://localhost:11434/v1' : 'https://api.openai.com/v1'} />
<input type="url" autoComplete="off" className={fieldCls} value={baseUrl} onChange={e => setBaseUrl(e.target.value)} onBlur={loadModels} placeholder={provider === 'local' ? 'http://localhost:11434/v1' : 'https://api.openai.com/v1'} />
</label>
)}
<label className="block">
@@ -451,7 +451,7 @@ function LlmParsingConfig({ addon }: { addon: Addon }) {
<section className="space-y-3">
<div className={sectionCls}>Model</div>
<label className="block">
<input className={fieldCls} value={model} onChange={e => setModel(e.target.value)} placeholder={provider === 'anthropic' ? 'claude-opus-4-8' : provider === 'openai' ? 'gpt-4o' : 'select or pull below'} />
<input autoComplete="off" className={fieldCls} value={model} onChange={e => setModel(e.target.value)} placeholder={provider === 'anthropic' ? 'claude-opus-4-8' : provider === 'openai' ? 'gpt-4o' : 'select or pull below'} />
</label>
{/* Local model management (Ollama) */}
@@ -92,6 +92,7 @@ export default function LlmConnectionSection(): React.ReactElement {
<label className="block text-sm font-medium mb-1.5 text-content-secondary">{t('settings.aiParsing.model')}</label>
<input
type="text"
autoComplete="off"
value={model}
onChange={e => setModel(e.target.value)}
placeholder="qwen3:8b"
@@ -104,6 +105,7 @@ export default function LlmConnectionSection(): React.ReactElement {
<label className="block text-sm font-medium mb-1.5 text-content-secondary">{t('settings.aiParsing.baseUrl')}</label>
<input
type="url"
autoComplete="off"
value={baseUrl}
onChange={e => setBaseUrl(e.target.value)}
placeholder="http://localhost:11434"