Skip to content

feat: custom providers and model picker overhaul (rebase of #386) - #410

Open
alecuba16 wants to merge 1 commit into
Kuberwastaken:mainfrom
alecuba16:pr386-providers
Open

alecuba16 wants to merge 1 commit into
Kuberwastaken:mainfrom
alecuba16:pr386-providers

Conversation

@alecuba16

@alecuba16 alecuba16 commented Sep 3, 2026

Copy link
Copy Markdown

Summary

Rebased version of #386 — custom providers and model picker overhaul. Carries the full review-response rework addressing all points from the #386 review threads.

Changes

  • Custom OpenAI-compatible providers via settings.json customProviders; resolved once into Config.custom_providers at load time (no per-request/per-frame Settings::load_sync()).
  • Model picker overhaul: grouped by provider, connected filter, Tab nav, favorites (matched via ModelEntry.provider_id, so free/auto works), default selection.
  • All picker keys routed through keybindings.rs: new KeyContext::ModelPicker with 13 default bindings (prevModel...toggleFavorite, toggleShowAllProviders). Typing "claude"/"haiku"/"flash" in the filter works.
  • Id-collision check: custom provider ids colliding with any of the 47 builtin ids are skipped with a tracing::warn!.
  • requestTimeoutSecs applied via OpenAiCompatProvider::with_request_timeout().
  • resolve_api_key uses substitute_env_vars so {env:FOO} and embedded Bearer patterns work; empty-after-substitution yields None (picker no longer marks unset providers connected).
  • contextWindow defaults to 128k with a warning when unset.
  • In-memory tests only: no reads of real ~/.claurst/settings.json, no internal gateway ids in fixtures.

Rebase notes

Validation

  • cargo check --workspace — clean
  • cargo clippy --workspace --all-targets -- -D warnings — clean
  • cargo test --workspace — 678 passed, 1 pre-existing failure (settings_screen, fails on main too)

Supersedes #386.

- Custom OpenAI-compatible providers via settings.json customProviders
- ModelRegistry.apply_custom_providers for dynamic provider registration
- Model picker: grouped providers, connected filter, Tab nav, favorites
- Provider picker dynamically lists custom providers
- Keybinding entries for picker keys (f, *, a) in keybindings.rs
- is_provider_connected helper for connection status checks
- open_model_picker_all_providers for cross-provider model browsing
- Custom provider tests

Rebased from Kuberwastaken#386. Excludes Cursor ACP (separate PR) and bang command payload.
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