Skip to content

Fix provider-aware /model picker catalogs#1201

Closed
eng2007 wants to merge 2 commits into
Hmbown:mainfrom
eng2007:fix/provider-model-picker-catalog
Closed

Fix provider-aware /model picker catalogs#1201
eng2007 wants to merge 2 commits into
Hmbown:mainfrom
eng2007:fix/provider-model-picker-catalog

Conversation

@eng2007

@eng2007 eng2007 commented May 8, 2026

Copy link
Copy Markdown

Summary

Fixes the /model picker so it reflects the currently selected provider instead of always showing the static DeepSeek Pro/Flash list.

Changes:

  • fetch live model IDs from the active provider when opening /model
  • fall back to provider-specific defaults when live discovery fails or returns no models
  • normalize /model <id> through the active provider, so short DeepSeek IDs map to provider IDs such as deepseek-ai/deepseek-v4-flash for NVIDIA NIM
  • keep custom/current model IDs visible when they are not present in the picker list
  • make the picker scrollable for long model catalogs
  • size picker columns from rendered content: the model pane follows the longest model ID, and the thinking pane keeps high (thinking enabled) readable with one trailing cell before the border
  • add an Unreleased changelog entry
  • silence dead-code warnings for schema migration registry marker structs so strict clippy can pass with -D warnings

Testing

  • cargo test --workspace --all-features --locked
  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
  • cargo build

Local environment note:

  • cargo run -p deepseek-tui --all-features -- eval fails on Windows because the offline eval harness runs printf, which is not available under cmd.exe.

Checklist

  • Updated docs or comments as needed
  • Added or updated tests where relevant
  • Verified TUI behavior manually if UI changes

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a33d4351c4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/tui/src/tui/ui.rs
@eng2007

eng2007 commented May 8, 2026

Copy link
Copy Markdown
Author

Addressed in 8026420.

Provider-native IDs returned by live catalogs now pass settings validation and survive restart, while DeepSeek aliases still normalize. The picker persistence path also surfaces Settings::set failures instead of ignoring them. Added coverage for meta/... and ft:gpt-... model IDs plus unsafe ID rejection.

Validated locally:

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
  • cargo test --workspace --all-features --locked

@Hmbown

Hmbown commented May 14, 2026

Copy link
Copy Markdown
Owner

The provider-aware /model picker catalog fix was harvested into #1649 and merged to main with contributor credit. For v0.8.38, that narrow bug-fix slice is covered; leaving this PR open for maintainer judgment on any remaining scope.

aimlyo pushed a commit to aimlyo/DeepSeek-TUI that referenced this pull request May 17, 2026
…ouping

The v0.8.38 upgrade dramatically changed two user-visible behaviors that
were not intended as regressions:

- The /model picker was reworked (Hmbown#1201/Hmbown#1632) to make a blocking network
  fetch on open and replace the curated tier list with the raw provider
  catalog. Revert model_picker.rs and the OpenModelPicker handler to the
  v0.8.37 instant curated picker. The /models command still lists the live
  catalog.

- Hmbown#1617 rekeyed the approval cache to an exact full-argument fingerprint,
  which also dropped the v0.8.37 arity-aware command-family grouping for
  "approve for session". Reintroduce build_approval_grouping_key (the lossy
  v0.8.37 logic) for approvals while keeping the exact key for denials, so
  denying one call no longer over-blocks later differing calls.

https://claude.ai/code/session_01NDuRxM56o17SE7SDLcTFYT
ZZZping pushed a commit to ZZZping/DeepSeek-TUI that referenced this pull request May 17, 2026
…ouping

The v0.8.38 upgrade dramatically changed two user-visible behaviors that
were not intended as regressions:

- The /model picker was reworked (Hmbown#1201/Hmbown#1632) to make a blocking network
  fetch on open and replace the curated tier list with the raw provider
  catalog. Revert model_picker.rs and the OpenModelPicker handler to the
  v0.8.37 instant curated picker. The /models command still lists the live
  catalog.

- Hmbown#1617 rekeyed the approval cache to an exact full-argument fingerprint,
  which also dropped the v0.8.37 arity-aware command-family grouping for
  "approve for session". Reintroduce build_approval_grouping_key (the lossy
  v0.8.37 logic) for approvals while keeping the exact key for denials, so
  denying one call no longer over-blocks later differing calls.

https://claude.ai/code/session_01NDuRxM56o17SE7SDLcTFYT
@Hmbown

Hmbown commented May 17, 2026

Copy link
Copy Markdown
Owner

Thanks for the provider/model picker work. We harvested the narrow provider-selected-model preservation pieces into #1649, but the live catalog behavior in /model caused a v0.8.38 regression: a common picker path could block on provider network calls and lost the curated DeepSeek tier list. v0.8.39 reverted that path. Closing this PR so it is not accidentally revived; future provider catalog work should target explicit /models behavior or an async/cached picker design with regression tests.

@Hmbown Hmbown closed this May 17, 2026
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