[GH-ISSUE #5384] GetModelById API returns all models #29495

Closed
opened 2026-04-25 03:53:37 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @c9482 on GitHub (Sep 12, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/5384

Bug Report

Installation Method

Manual installation from Github clone.

Environment

  • Open WebUI Version: v0.3.21

  • Ollama (if applicable): v0.3.10

  • Operating System: MacOS Sonoma Version 14.5 (23F79)

  • Browser (if applicable): Chrome

Confirmation:

  • I have read and followed all the instructions provided in the README.md.
  • I am on the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below.

Expected Behavior:

Model for specified id should be returned

Actual Behavior:

All models were returned

Description

Bug Summary:
Per documentation, Get Model By Id endpoint should return a specific model. Regardless of the model id specified, all models are returned.

Reproduction Details

Steps to Reproduce:
Go to http://localhost:8080/api/v1/docs#/models/get_model_by_id_models__get

OR

Use the following command:

curl -X 'GET' \
  'http://localhost:8080/api/v1/models/?id=my-model' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer sk-xxxxxxxx'

Logs and Screenshots

Browser Console Logs:
Response:

[
  {
    "id": "the-best-money-cant-buy",
    "name": "The Best Money Can't Buy",
    "meta": {
      "profile_image_url": "/static/favicon.png",
      "description": "The Best Money Can't Buy expert",
      "capabilities": {
        "vision": false
      },
      "suggestion_prompts": [
        {
          "content": "Who wrote this book?"
        },
        {
          "content": "What is this book about?"
        }
      ],
      "knowledge": [
        {
          "collection_name": "8b1c97a64ecc95c7107f57b41d6f7c223977de6696914c9712ca99492c442e4",
          "name": "thebestthatmoneycantbuypdf",
          "title": "The-Best-That-Money-Cant-Buy.pdf",
          "filename": "The-Best-That-Money-Cant-Buy.pdf",
          "content": {},
          "user_id": "6651ce6f-8cfe-419d-a6b0-1097ada4b3fd",
          "timestamp": 1725566285,
          "type": "doc"
        }
      ]
    },
    "updated_at": 1725566436,
    "created_at": 1725566436
  },
  {
    "id": "my-model",
    "name": "xxx xxx xxx",
    "meta": {
      "profile_image_url": "/static/favicon.png",
      "description": "xxxx xxx xxx xxx. xxx expert",
      "capabilities": {
        "vision": false,
        "usage": false
      },
      "suggestion_prompts": [],
      "knowledge": [
        {
          "collection_name": "6bfc0cf3644d6a4aa911dba1c9b8cf14c4a4efcd7ef110ef32b2c6582cb7e56",
          "name": "xxxxx",
          "title": "xxxx.md",
          "filename": "xxxx.md",
          "content": {},
          "user_id": "6651ce6f-8cfe-419d-a6b0-1097ada4b3fd",
          "timestamp": 1725830422,
          "type": "doc"
        }
      ]
    },
    "updated_at": 1725651337,
    "created_at": 1725651337
  }
]

Docker Container Logs:
n/a

Screenshots/Screen Recordings (if applicable):
n/a

Additional Information

[Include any additional details that may help in understanding and reproducing the issue. This could include specific configurations, error messages, or anything else relevant to the bug.]

Note

If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!

Originally created by @c9482 on GitHub (Sep 12, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/5384 # Bug Report ## Installation Method Manual installation from Github clone. ## Environment - **Open WebUI Version:** v0.3.21 - **Ollama (if applicable):** v0.3.10 - **Operating System:** MacOS Sonoma Version 14.5 (23F79) - **Browser (if applicable):** Chrome **Confirmation:** - [x] I have read and followed all the instructions provided in the README.md. - [x] I am on the latest version of both Open WebUI and Ollama. - [ ] I have included the browser console logs. - [ ] I have included the Docker container logs. - [x] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below. ## Expected Behavior: Model for specified id should be returned ## Actual Behavior: All models were returned ## Description **Bug Summary:** Per documentation, Get Model By Id endpoint should return a specific model. Regardless of the model id specified, all models are returned. ## Reproduction Details **Steps to Reproduce:** Go to http://localhost:8080/api/v1/docs#/models/get_model_by_id_models__get OR Use the following command: ``` curl -X 'GET' \ 'http://localhost:8080/api/v1/models/?id=my-model' \ -H 'accept: application/json' \ -H 'Authorization: Bearer sk-xxxxxxxx' ``` ## Logs and Screenshots **Browser Console Logs:** Response: ``` [ { "id": "the-best-money-cant-buy", "name": "The Best Money Can't Buy", "meta": { "profile_image_url": "/static/favicon.png", "description": "The Best Money Can't Buy expert", "capabilities": { "vision": false }, "suggestion_prompts": [ { "content": "Who wrote this book?" }, { "content": "What is this book about?" } ], "knowledge": [ { "collection_name": "8b1c97a64ecc95c7107f57b41d6f7c223977de6696914c9712ca99492c442e4", "name": "thebestthatmoneycantbuypdf", "title": "The-Best-That-Money-Cant-Buy.pdf", "filename": "The-Best-That-Money-Cant-Buy.pdf", "content": {}, "user_id": "6651ce6f-8cfe-419d-a6b0-1097ada4b3fd", "timestamp": 1725566285, "type": "doc" } ] }, "updated_at": 1725566436, "created_at": 1725566436 }, { "id": "my-model", "name": "xxx xxx xxx", "meta": { "profile_image_url": "/static/favicon.png", "description": "xxxx xxx xxx xxx. xxx expert", "capabilities": { "vision": false, "usage": false }, "suggestion_prompts": [], "knowledge": [ { "collection_name": "6bfc0cf3644d6a4aa911dba1c9b8cf14c4a4efcd7ef110ef32b2c6582cb7e56", "name": "xxxxx", "title": "xxxx.md", "filename": "xxxx.md", "content": {}, "user_id": "6651ce6f-8cfe-419d-a6b0-1097ada4b3fd", "timestamp": 1725830422, "type": "doc" } ] }, "updated_at": 1725651337, "created_at": 1725651337 } ] ``` **Docker Container Logs:** n/a **Screenshots/Screen Recordings (if applicable):** n/a ## Additional Information [Include any additional details that may help in understanding and reproducing the issue. This could include specific configurations, error messages, or anything else relevant to the bug.] ## Note If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!
Author
Owner

@tjbck commented on GitHub (Sep 12, 2024):

Deprecated the endpoint in dev.

<!-- gh-comment-id:2347122046 --> @tjbck commented on GitHub (Sep 12, 2024): Deprecated the endpoint in dev.
Author
Owner

@c9482 commented on GitHub (Sep 12, 2024):

Hello,

Why deprecate it? Seem like a useful endpoint. I am trying to get model's base model id. Is there an alternative to achieve this?

<!-- gh-comment-id:2347126822 --> @c9482 commented on GitHub (Sep 12, 2024): Hello, Why deprecate it? Seem like a useful endpoint. I am trying to get model's base model id. Is there an alternative to achieve this?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#29495