Skip to content

[Bug] BYOK Provider Configuration Missing Model Selection Option #4942

@lizhi199308

Description

@lizhi199308

Platform

Desktop - Windows

Describe the bug

[Bug] BYOK Provider Configuration Missing Model Selection Option

Describe the bug

When adding a custom AI provider (e.g., OpenRouter, etc.) in Settings → AI → Bring Your Own Key (BYOK) section, the configuration modal only provides fields for:

  • Base URL
  • API Key

However, there is no model selection or configuration option available. This prevents users from switching to models from their custom providers even after successfully adding the provider credentials.

To Reproduce

Steps to reproduce the behavior:

  1. Go to Settings → AI → Bring Your Own Key (BYOK)
  2. Click "Add Provider" button
  3. Select a provider like "OpenRouter" from the dropdown
  4. Enter the Base URL and API Key
  5. Save the configuration
  6. Try to use the custom provider in AI chat - no model option is available to select

Expected behavior

After adding a custom BYOK provider, users should be able to:

  1. See available models from the configured provider (via API auto-discovery)
  2. OR manually specify which model endpoint to use
  3. Select the custom provider's model from the AI chat model selector dropdown

Current behavior

The BYOK provider configuration only saves the base URL and API key, but doesn't provide any way to:

  • Fetch available models from the custom provider
  • Specify which model to use
  • Switch to the custom provider's model in the chat interface

Additional context

Looking at the code in ByokProviderModalContent.tsx, the form only contains:

  • Provider selection dropdown (OpenAI, Google, Vercel AI Gateway, OpenRouter)
  • Base URL input field
  • API Key input field

There's no model configuration field or automatic model discovery mechanism implemented.

Environment

  • Platform: Desktop/Mobile
  • Version: Latest

Suggested solution

Add one of the following solutions:

  1. Auto-discovery: Automatically fetch available models from the custom provider's API using the provided credentials
  2. Manual model specification: Add a "Model Name/Endpoint" field in the BYOK provider configuration form
  3. Both: Allow users to either auto-discover models or manually specify the model identifier

This is critical for BYOK functionality as different providers have different model endpoints (e.g., OpenRouter has multiple models like openai/gpt-4, anthropic/claude-3, etc.)

Entry ID

No response

Relevant Information

lizhi199308

Reproduction Video

No response

Environment

Image

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • This issue is valid

Contributions

  • I am willing to submit a PR to fix this issue
  • I am willing to submit a PR with failing tests (actually just go ahead and do it, thanks!)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions