Skip to content

webui: fix ?model= URL param race in router mode#22771

Merged
allozaur merged 2 commits intoggml-org:masterfrom
ServeurpersoCom:webui/fix-model-url-param-race
May 7, 2026
Merged

webui: fix ?model= URL param race in router mode#22771
allozaur merged 2 commits intoggml-org:masterfrom
ServeurpersoCom:webui/fix-model-url-param-race

Conversation

@ServeurpersoCom
Copy link
Copy Markdown
Contributor

@ServeurpersoCom ServeurpersoCom commented May 6, 2026

Overview

Fixes automatic model selection with the URL query parameter ?model=xxx

Additional information

Initial fix without refactoring, cc @alek, This is just the race fix and I tested it in router mode.
But I'm sure we can do better in terms of architecture so as not to have any race at all. And we can also add alias support.

fix-model-url-param-race.mp4

Solve #22324

Requirements

  • I have read and agree with the contributing guidelines
  • AI usage disclosure: YES Opus 4.7 + local MCP rootless disposable pod with shared GPU

@ServeurpersoCom ServeurpersoCom requested a review from a team as a code owner May 6, 2026 16:59
@ServeurpersoCom
Copy link
Copy Markdown
Contributor Author

We could assign the store sole responsibility for fetching at startup, and it would be the source of truth for everything else. This applies to both the query parameter and the automatic selection of the currently loaded model.

@allozaur allozaur requested a review from ggerganov May 6, 2026 22:08
@allozaur
Copy link
Copy Markdown
Contributor

allozaur commented May 7, 2026

We could assign the store sole responsibility for fetching at startup, and it would be the source of truth for everything else. This applies to both the query parameter and the automatic selection of the currently loaded model.

yeah, in general i am re-reviewing some of the ways we initialize some of the stores/services and i'd consider doing what u suggest as well. but for this PR let's focus only on solving the race condition

@allozaur allozaur merged commit f4b5a2e into ggml-org:master May 7, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants