[GH-ISSUE #4295] [BUG]: v1/openapi/models returns invalid input #2732

Closed
opened 2026-02-22 18:31:00 -05:00 by yindo · 2 comments
Owner

Originally created by @rsov on GitHub (Aug 15, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4295

How are you running AnythingLLM?

Docker (local)

What happened?

LiteLLM and OpenWEB UI both crash when adding AnythingLLM as a backend via API

Are there known steps to reproduce?

According to https://platform.openai.com/docs/api-reference/models/list
Response from /models should look like this

{
  "object": "list",
  "data": [
    {
      "id": "model-id-0",
      "object": "model",
      "created": 1686935002,
      "owned_by": "organization-owner"
    },
    {
      "id": "model-id-1",
      "object": "model",
      "created": 1686935002,
      "owned_by": "organization-owner",
    },
    {
      "id": "model-id-2",
      "object": "model",
      "created": 1686935002,
      "owned_by": "openai"
    },
  ],
  "object": "list"
}

But /api/v1/openai/models returns this

{
  "models": [
    {
      "name": "Sample workspace",
      "model": "sample-workspace",
      "llm": {
        "provider": "ollama",
        "model": "llama3:8b"
      }
    },
    {
      "name": "Second workspace",
      "model": "workspace-2",
      "llm": {
        "provider": "openai",
        "model": "gpt-3.5-turbo"
      }
    }
  ]
}
Originally created by @rsov on GitHub (Aug 15, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4295 ### How are you running AnythingLLM? Docker (local) ### What happened? LiteLLM and OpenWEB UI both crash when adding AnythingLLM as a backend via API ### Are there known steps to reproduce? According to https://platform.openai.com/docs/api-reference/models/list Response from `/models` should look like this ``` { "object": "list", "data": [ { "id": "model-id-0", "object": "model", "created": 1686935002, "owned_by": "organization-owner" }, { "id": "model-id-1", "object": "model", "created": 1686935002, "owned_by": "organization-owner", }, { "id": "model-id-2", "object": "model", "created": 1686935002, "owned_by": "openai" }, ], "object": "list" } ``` But `/api/v1/openai/models` returns this ``` { "models": [ { "name": "Sample workspace", "model": "sample-workspace", "llm": { "provider": "ollama", "model": "llama3:8b" } }, { "name": "Second workspace", "model": "workspace-2", "llm": { "provider": "openai", "model": "gpt-3.5-turbo" } } ] } ```
yindo added the possible bug label 2026-02-22 18:31:00 -05:00
yindo closed this issue 2026-02-22 18:31:00 -05:00
Author
Owner

@timothycarambat commented on GitHub (Aug 15, 2025):

Got it 👍
Image

@timothycarambat commented on GitHub (Aug 15, 2025): Got it 👍 <img width="1485" height="632" alt="Image" src="https://github.com/user-attachments/assets/5421efab-07d9-4761-8a97-8555b1128387" />
Author
Owner

@rsov commented on GitHub (Aug 16, 2025):

@timothycarambat Absolute legend, thank you

@rsov commented on GitHub (Aug 16, 2025): @timothycarambat Absolute legend, thank you
yindo changed title from [BUG]: v1/openapi/models returns invalid input to [GH-ISSUE #4295] [BUG]: v1/openapi/models returns invalid input 2026-06-05 14:48:14 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#2732