Skip to content

Fix service APIs#29

Open
bvanessen wants to merge 1 commit into
FLASK-LLNL:mainfrom
bvanessen:bugfix_service_api
Open

Fix service APIs#29
bvanessen wants to merge 1 commit into
FLASK-LLNL:mainfrom
bvanessen:bugfix_service_api

Conversation

@bvanessen

Copy link
Copy Markdown
Collaborator

Fix model discovery cache and settings modal selection races

Cache discovered models by backend, endpoint URL, and API key so model lists from one endpoint are not reused for another. Prevent async initial settings validation from overwriting in-progress modal edits, which could cause the selected model to differ from what was saved or sent to the backend.

When saving a changed API key, choose the model deterministically from the newly discovered list: keep the current model if valid, otherwise use the configured default model if available, otherwise fall back to the first discovered model.

Cache discovered models by backend, endpoint URL, and API key so model
lists from one endpoint are not reused for another. Prevent async initial
settings validation from overwriting in-progress modal edits, which could
cause the selected model to differ from what was saved or sent to the
backend.

When saving a changed API key, choose the model deterministically from the
newly discovered list: keep the current model if valid, otherwise use the
configured default model if available, otherwise fall back to the first
discovered model.
@bvanessen bvanessen requested a review from tbennun June 6, 2026 05:00
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