mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[PR #21258] [CLOSED] Fix GitHub Models model-list endpoint mapping (/catalog/models) #25996
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/21258
Author: @tall27
Created: 2/8/2026
Status: ❌ Closed
Base:
main← Head:codex/github-models-catalog-endpoint📝 Commits (1)
31e01d0Fix GitHub Models listing endpoint for OpenAI-compatible connections📊 Changes
1 file changed (+14 additions, -4 deletions)
View changed files
📝
backend/open_webui/routers/openai.py(+14 -4)📄 Description
Summary
Fix model listing for GitHub Models in OpenAI-compatible connections.
Open WebUI currently requests
<base_url>/modelsfor provider model refresh. For GitHub Models, this fails when base URL ishttps://models.github.ai/inference, because model catalog is exposed at:https://models.github.ai/catalog/modelsThis PR adds provider-aware endpoint resolution for model listing while preserving existing behavior for other providers.
Changes
get_models_endpoint(url: str)helper inbackend/open_webui/routers/openai.pymodels.github.ai, model list endpoint is mapped to:https://models.github.ai/catalog/modelsf"{url}/models"calls withget_models_endpoint(url)in:get_all_models_responsesget_modelsverify_connectionWhy
Without this mapping, model refresh fails with 404/content-type parsing errors against
.../inference/models.Validation
python3 -m py_compile backend/open_webui/routers/openai.pyCloses #21257
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.