Skip to content

feat: custom provider support with persistent storage and scrolling UI - #19

Open
deyoyk wants to merge 1 commit into
PentesterFlow:mainfrom
deyoyk:openai-compat-provider-setup
Open

feat: custom provider support with persistent storage and scrolling UI#19
deyoyk wants to merge 1 commit into
PentesterFlow:mainfrom
deyoyk:openai-compat-provider-setup

Conversation

@deyoyk

@deyoyk deyoyk commented Aug 5, 2026

Copy link
Copy Markdown

Custom provider support + scrolling UI

What changed

  • /provider now has a + Add custom provider... option at the bottom of the list
  • Pick it → prompts for a name, base URL, and API key interactively
  • Defaults to https://opencode.ai/zen/v1 and public (just hit Enter to accept)
  • Saved providers show up in the /provider list by name and persist across restarts in ~/.pentesterflow/config.json
  • Selecting a saved provider skips the URL/key prompts and goes straight to model selection
  • Model picker no longer caps at 12 — all available models are shown
  • Long lists (providers + models) now scroll with a viewport of 12 items

Why

The old openai-compat flow required manually editing config.json or passing CLI flags. Now it works like every other provider — pick it, enter your details, done.

Files changed

  • src/config/config.tsCustomProvider schema, custom_providers array in config
  • src/ui/App.tsx — rewrote provider picker, removed model cap
  • src/ui/AskModal.tsx — scrolling for long lists
  • src/ui/SecretInputModal.tsxmasked and defaultValue options
  • src/cli/index.ts — wired custom providers into config read/save
  • src/ui/App.commands.test.tsx — updated test mocks

- Add CustomProvider schema (name, base_url, api_key) to config, persisted in config.json
- Add '+ Add custom provider...' option in /provider picker with interactive name/URL/key prompts
- Saved custom providers appear in /provider list and can be switched like built-in providers
- Default URL: https://opencode.ai/zen/v1, default key: public
- Remove MODEL_PICKER_CAP (12 model limit) — all models now shown
- Add viewport-based scrolling to AskModal (12 visible items, up/down navigation)
- SecretInputModal supports masked=false for plain text and defaultValue for pre-fill
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