The GitHub Models /models API end point returns models info in a slightly different format than what Open WebUI expects.
It looks like the id value provides the full path (ex: azureml://registries/azureml/models/Phi-3-small-8k-instruct/versions/3) of the model in the Azure registry where as the /chat/completions api requires the model's short name (ex: Phi-3-small-8k-instruct). The name attribute has the model short name.
May be below code can be modified to handle what GitHub Models /models endpoint returns. Something like, .map((model) => ({ id: model.id.find('://') > 0 ? model.name : model.id, name: model.name ?? model.id, external: true })) ??
Originally created by @gunamata on GitHub (Nov 13, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/6892
# Feature Request
Support [GitHub Models](https://github.com/marketplace/models) in Open WebUI
The GitHub Models `/models` API end point returns models info in a slightly different format than what Open WebUI expects.
It looks like the `id` value provides the full path (ex: `azureml://registries/azureml/models/Phi-3-small-8k-instruct/versions/3`) of the model in the Azure registry where as the `/chat/completions` api requires the model's short name (ex: `Phi-3-small-8k-instruct`). The `name` attribute has the model short name.
May be below code can be modified to handle what GitHub Models `/models` endpoint returns. Something like, `.map((model) => ({ id: model.id.find('://') > 0 ? model.name : model.id, name: model.name ?? model.id, external: true }))` ??
https://github.com/open-webui/open-webui/blob/main/src/lib/apis/openai/index.ts#L264C3-L264C4
@tjbck , It doesn't work when I tried with the dev image. It still complains about the full model path.
<!-- gh-comment-id:2474301170 -->
@gunamata commented on GitHub (Nov 13, 2024):
@tjbck , It doesn't work when I tried with the dev image. It still complains about the full model path.

Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @gunamata on GitHub (Nov 13, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/6892
Feature Request
Support GitHub Models in Open WebUI
The GitHub Models
/modelsAPI end point returns models info in a slightly different format than what Open WebUI expects.It looks like the
idvalue provides the full path (ex:azureml://registries/azureml/models/Phi-3-small-8k-instruct/versions/3) of the model in the Azure registry where as the/chat/completionsapi requires the model's short name (ex:Phi-3-small-8k-instruct). Thenameattribute has the model short name.May be below code can be modified to handle what GitHub Models
/modelsendpoint returns. Something like,.map((model) => ({ id: model.id.find('://') > 0 ? model.name : model.id, name: model.name ?? model.id, external: true }))??https://github.com/open-webui/open-webui/blob/main/src/lib/apis/openai/index.ts#L264C3-L264C4
@tjbck commented on GitHub (Nov 13, 2024):
Should be supported on dev, testing wanted here.
@gunamata commented on GitHub (Nov 13, 2024):
@tjbck , It doesn't work when I tried with the dev image. It still complains about the full model path.