Skip to content

Credentials: show a typed value on request; save values trimmed - #488

Closed
wmobley wants to merge 1 commit into
developfrom
feat/credential-show-and-trim
Closed

wmobley wants to merge 1 commit into
developfrom
feat/credential-show-and-trim

Conversation

@wmobley

@wmobley wmobley commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Seen on dev: a runner's Narrative run failed at the first embedding call with 401 LiteLLM Virtual Key expected ... expected to start with 'sk-', while the key worked elsewhere. LiteLLM masks the received key as sk-… plus its last four characters, so what reached it did not start with sk-. The likely cause is a pasted leading space or quote mark, which DYNAMO accepted and the step sent as is.

Saved credentials form (CredentialsPage.tsx, user-secrets.ts):

  • A show/hide button beside each value reveals only what is typed in the form, so the runner can check it before saving. A stored value is still never read back. Each value is shown on its own and the state resets with the form.
  • A warning under the box when a value starts or ends with a space ("removed when it is saved") or with a quote mark ("remove it unless it is part of the value").
  • Values are trimmed before sending, and a value of only spaces counts as empty.

Adapter (secrets.py): validate_fields returns the fields with spaces at either end of each value removed, and the store saves what it returns, so a value is trimmed whatever client sent it. Spaces inside a value are kept. A value of only spaces is refused. Quote marks are not changed, since a value may legitimately contain them.

Checks: ui-react 162 files pass (1 new page test: show/hide, both warnings, the trimmed save); tsc -b, prettier and eslint clean on the changed files. Adapter 1524 passed; 4 pre-existing local test_demo_api failures. New tests cover trimming and a spaces-only value being refused.

For the runner already affected: re-enter the model_server credential once this is live (or now, with care), and check embedding_base_url is the same Tejas address as chat_base_url.

🤖 Generated with Claude Code

A pasted key with a space at either end reached the model server as a key
that does not start with sk-, and was refused with a 401 though it looked
right. The Saved credentials form now has a show/hide button for each typed
value and warns when a value starts or ends with a space or a quote mark.
The adapter stores every field with spaces at either end removed, and the
form trims too. Stored values are still never read back.
@vercel

vercel Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
monorepo Ready Ready Preview Nov 20, 2026 9:56pm UTC

@wmobley

wmobley commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

Combined into #489 so all three build and deploy together.

This branch was successfully deployed

1 active deployment
Preview — 5e474fb6 Deployed Nov 20, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant