Skip to content

Keep model catalog loads out of settings TUI repaints - #703

Open
breedx wants to merge 2 commits into
mpfaffenberger:mainfrom
breedx:upstream/model-settings-repaint
Open

Keep model catalog loads out of settings TUI repaints#703
breedx wants to merge 2 commits into
mpfaffenberger:mainfrom
breedx:upstream/model-settings-repaint

Conversation

@breedx

@breedx breedx commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • snapshot model configuration once per /model_settings session
  • reuse the snapshot for names, descriptions, capability checks, defaults, and choices
  • keep model-picker render and keypress paths free of config callbacks
  • let model_supports_setting accept an optional preloaded catalog

Reproduction

The model picker called ModelFactory.load_config() 16 times per repaint: once in the list and 15 times while deriving capabilities for the details panel. For network-backed model catalogs, a 0.9s config load made each arrow/Enter/Esc repaint take 14.89s. The inner settings view remained responsive because it reused its supported-settings list.

Verification

  • regression tests assert repeated picker repaints perform zero additional catalog loads
  • internal TypeError propagation is covered (no exception-driven retry)
  • focused model-settings suites: 131 passed on current upstream main
  • Ruff and formatting clean

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