Skip to content

Custom provider model refresh 404s when base URL is the full /chat/completions endpoint #581

Description

@hoishing

Description

In AI Enhancement settings, the model-refresh button fails for a custom provider when the base URL is entered as the full chat endpoint (…/v1/chat/completions). ModelRepository.fetchModels appends /models verbatim, producing …/v1/chat/completions/models, which 404s and never populates the model dropdown. Chat requests are unaffected because LLMClient already normalizes the endpoint, so the two paths behave inconsistently.

Steps to Reproduce

  1. Add a custom OpenAI-compatible provider.
  2. Set its base URL to the full endpoint, e.g. https://<host>/v1/chat/completions.
  3. Click the refresh icon next to the model dropdown.

Expected Behavior

The model list loads from https://<host>/v1/models.

Actual Behavior

API error (HTTP 404): <!DOCTYPE html> … Not Found …

The dropdown stays empty.

Environment

  • FluidVoice: 1.6.2
  • macOS: 26.5.2
  • Architecture: Apple Silicon (arm64)

Notes

Fix incoming: normalize the base URL (strip a trailing /chat/completions or /responses) before appending /models.

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