dgtlmoon / dgtlmoon/changedetection.io

[feature] OpenAI-compatible LLM: allow customizing the completions path (not all gateways use `/v1/chat/completions`)

Open
#4,168 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
34.1k
Forks
2k
Avg merge
23h 38m
Merged PRs (30d)
67

Description

**Version and OS**
0.55.5 on linux/docker

**Is your feature request related to a problem? Please describe.**
With the OpenAI-compatible provider (PR #4117), the request path `/v1/chat/completions` is hardcoded (via litellm's "openai" provider). This breaks for gateways that expose OpenAI-compatible inference under a different path.

Concrete example: **Open WebUI** (open-webui/open-webui) exposes:
- `/openai/chat/completions` - internal OpenAI-style endpoint (always on, goes through auth + pipelines) - returns 200
- `/openai/v1/chat/completions` - direct passthrough to upstream returns 403 otherwise

There is no base URL that lets changedetection.io reach the working endpoint, because litellm always appends `/v1/chat/completions`.

**Describe the solution you'd like**
Add an optional **API path** field (default `/v1/chat/completions`) for the OpenAI-compatible provider so users can override the suffix. Alternative: if the base URL ends in `/chat/completions`, skip the auto-append and use it as-is.

**Additional context**
Error in changedetection: `Expecting value: line 1 column 1 (char 0)`

Contributor guide

Open the contributing guide

Research direction

Start by reading the OpenAI-compatible provider integration introduced in PR #4117 and trace where LiteLLM's openai provider constructs the request path. Identify the provider configuration and request entry points, then verify that the default remains /v1/chat/completions and that an optional API path can target alternatives such as /openai/chat/completions.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai, backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.