Skip to content

Allow a custom API base URL for the built-in Gemini provider #832

Description

@elpinguinofrio

✨ Feature Request

Describe the feature you'd like

On the Verify API Key provider setup screen, allow users to enter an optional custom API base URL in addition to the API key when selecting Gemini. Ideally, the same option could be available for other built-in providers as well.

The official Gemini URL should remain the default, so the current setup continues to work without extra configuration.

Problem it solves

Some users route Gemini requests through a self-hosted or local proxy that implements the native Gemini API protocol. Today, selecting Gemini appears to use VoiceInk's fixed standard endpoint, so there is no way to direct requests to a proxy such as http://127.0.0.1:<port>.

The existing custom-model/provider configuration does not cover this use case when the proxy is Gemini-compatible rather than OpenAI-compatible.

This would also help users with company gateways, privacy proxies, regional routing, and other Gemini-compatible endpoints.

Proposed solution

  • Add an optional Base URL / API endpoint field next to the API key for Gemini.
  • Leave it blank (or show the official URL as the default) to preserve current behavior.
  • Use the custom URL for both Test connection and subsequent AI requests.
  • Accept local URLs such as http://localhost:<port> and provide a clear validation error for malformed or unreachable endpoints.
  • Store the URL per provider so switching providers does not overwrite it.

Example acceptance case: I can select Gemini, enter my API key and a local Gemini-compatible proxy URL, test the connection, and continue; subsequent Gemini actions are sent through that proxy instead of directly to Google's standard endpoint.

Additional context

This request is for the onboarding/provider setup shown on the Verify API Key screen. It is specifically about preserving the native Gemini request format while allowing its destination URL to be configured.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions