Skip to content

fix: update model selector when a model is added in settings - #118

Open
robotyaga-gigachain[bot] wants to merge 2 commits into
mainfrom
open-swe/model-selector-refresh
Open

fix: update model selector when a model is added in settings#118
robotyaga-gigachain[bot] wants to merge 2 commits into
mainfrom
open-swe/model-selector-refresh

Conversation

@robotyaga-gigachain

Copy link
Copy Markdown

Description

Adding, editing, or deleting an LLM in Settings only refreshed the local list on the settings page, so the model selector in the chat input kept a stale list until the page was reloaded. The settings page now also refreshes the shared LLM list held by the auth provider (the same source the selector reads), so the selector updates reactively. Fixes issue #12.

Release Note

Newly added models now appear in the model selector immediately, without needing a page refresh.

Test Plan

  • Add a new model in Settings and confirm it appears in the chat model selector without reloading the page.
  • Delete a model and confirm it disappears from the selector without reloading.

Made by Open SWE

Sync the auth provider's shared LLM list after create/update/delete in
LLM settings so the model selector updates without a page refresh.

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
@Qessia
Qessia marked this pull request as ready for review July 8, 2026 06:47

@robotyaga-gigachain robotyaga-gigachain Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Open SWE Review: No issues found

Open SWE reviewed this PR and found no potential bugs to report.

Open in WebView Open SWE trace

@Mikelarg

Mikelarg commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

@open-swe Нужно также при обновлении текущей модели в настройках у пользователя, обновлять профиль, чтобы в ModelSelector подтягивалась текущая модель.

Also call refreshUser after create/update/delete in LLM settings so the
model selector reflects the current model without a page refresh.

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
@robotyaga-gigachain

Copy link
Copy Markdown
Author

Готово. Добавил вызов refreshUser() после создания/обновления/удаления модели в настройках LLM (front/src/components/settings-page/llms.tsx), в дополнение к refreshLLMs().

Теперь при изменении текущей модели пользователя обновляется и профиль (user.llm_id), поэтому ModelPicker (селектор модели) сразу подтягивает актуальную текущую модель без перезагрузки страницы.

Коммит: a8c6819

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.

2 participants