ulysses/static
Shaw 8115cb01a2
Models: allow API keys for local endpoints
Self-hosted endpoints on a LAN are sometimes protected by an API key. The admin
"Local" add/test form only sent base_url (+ model_type), so such an endpoint
could not be added — it just errored out — even though the backend
POST /api/model-endpoints and /model-endpoints/test already accept an optional
api_key form field (the cloud "API" form already uses it).

Adds an optional masked "API key" input (adm-epLocalApiKey) to the Local form
and wires it into the local Test and Add handlers, sending api_key only when
filled (an empty value is omitted so we never send a blank Bearer). The field
is cleared after a successful add, matching the cloud form.

Tested: tests/test_local_endpoint_api_key_js.py extracts the two click handlers
and runs them under node with mocked DOM/FormData/fetch, asserting api_key is
sent when the field is filled and omitted when blank, plus that the input
exists as a password field. `node --check static/js/admin.js` passes.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 20:36:54 +09:00
..
fonts Odysseus v1.0 2026-05-31 23:58:26 +09:00
js Models: allow API keys for local endpoints 2026-06-02 20:36:54 +09:00
lib Odysseus v1.0 2026-05-31 23:58:26 +09:00
app.js Fix drag-and-drop files landing behind the panes in Compare (#818) 2026-06-02 11:14:59 +09:00
index.html Models: allow API keys for local endpoints 2026-06-02 20:36:54 +09:00
landing.html feat: Add mobile hamburger navigation menu and toggle functionality 2026-06-01 15:57:01 +04:00
login.html Improve accessibility across core flows (#86) 2026-06-01 22:04:00 +02:00
manifest.json Odysseus v1.0 2026-05-31 23:58:26 +09:00
style.css Model picker: group models by provider 2026-06-02 13:14:22 +09:00
sw.js Odysseus v1.0 2026-05-31 23:58:26 +09:00