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
- Add a custom OpenAI-compatible provider.
- Set its base URL to the full endpoint, e.g.
https://<host>/v1/chat/completions.
- 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.
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.fetchModelsappends/modelsverbatim, producing…/v1/chat/completions/models, which 404s and never populates the model dropdown. Chat requests are unaffected becauseLLMClientalready normalizes the endpoint, so the two paths behave inconsistently.Steps to Reproduce
https://<host>/v1/chat/completions.Expected Behavior
The model list loads from
https://<host>/v1/models.Actual Behavior
The dropdown stays empty.
Environment
Notes
Fix incoming: normalize the base URL (strip a trailing
/chat/completionsor/responses) before appending/models.