issue: OpenAPI spec empty operationId #4859

Closed
opened 2025-11-11 16:05:06 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @yiranlus on GitHub (Apr 15, 2025).

Originally assigned to: @tjbck on GitHub.

Check Existing Issues

  • I have searched the existing issues and discussions.
  • I am using the latest version of Open WebUI.

Installation Method

Pip Install

Open WebUI Version

0.6.5

Ollama Version (if applicable)

No response

Operating System

Windows 11

Browser (if applicable)

Edge 135.0.3179.73

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using 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 listed steps to reproduce the bug in detail.

Expected Behavior

The LLM gives some response related about the tool server.

Actual Behavior

The answer "name" error shows up after a very short time.

Steps to Reproduce

  1. Use the tool server an OpenAPI spec which can be found at Trilium ETAPI.
  2. Ensure the the tool server Trilium ETAPI is enabled.
  3. Write in prompt "Tell me the AppInfo of Trilium ETAPI".

Logs & Screenshots

Image

In the console, there is an error:

POST http://localhost:8080/api/chat/completions 400 (Bad Request)

The log of the console is terminal.log

The request body is payload.json

And the response body is

{"detail":"'name'"}

Additional Information

When converting OpenAPI specification to tool server, there are some entries in paths are writing in following form:

paths:
    /notes/{noteId}:
        parameters:
            - name: noteId
              in: path
              required: true
              schema:
                  $ref: "#/components/schemas/EntityId"
        get:
            description: Returns a note identified by its ID
            operationId: getNoteById
            responses:
                "200":
                    description: note response
                    content:
                        application/json; charset=utf-8:
                            schema:
                                $ref: "#/components/schemas/Note"

The parameters entry is interpreted as method, thus the operationId is null, which creates a following entry in specs the tool server:

{
	"type": "function",
	"description": "No description available.",
	"parameters": {
		"type": "object",
		"properties": {},
		"required": []
	}
}

Since there is no name, when trying to access this property, this raise error when using tool server.

Originally created by @yiranlus on GitHub (Apr 15, 2025). Originally assigned to: @tjbck on GitHub. ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Pip Install ### Open WebUI Version 0.6.5 ### Ollama Version (if applicable) _No response_ ### Operating System Windows 11 ### Browser (if applicable) Edge 135.0.3179.73 ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have listed steps to reproduce the bug in detail. ### Expected Behavior The LLM gives some response related about the tool server. ### Actual Behavior The answer "name" error shows up after a very short time. ### Steps to Reproduce 1. Use the tool server an OpenAPI spec which can be found at [Trilium ETAPI](https://github.com/TriliumNext/Notes/blob/master/src/etapi/etapi.openapi.yaml). 2. Ensure the the tool server Trilium ETAPI is enabled. 3. Write in prompt "Tell me the AppInfo of Trilium ETAPI". ### Logs & Screenshots ![Image](https://github.com/user-attachments/assets/deb17183-283b-41fa-8c04-a26ad111df33) In the console, there is an error: ``` POST http://localhost:8080/api/chat/completions 400 (Bad Request) ``` The log of the console is [terminal.log](https://github.com/user-attachments/files/19762222/terminal.log) The request body is [payload.json](https://github.com/user-attachments/files/19762141/payload.json) And the response body is ``` {"detail":"'name'"} ``` ### Additional Information When converting OpenAPI specification to tool server, there are some entries in paths are writing in following form: ```yaml paths: /notes/{noteId}: parameters: - name: noteId in: path required: true schema: $ref: "#/components/schemas/EntityId" get: description: Returns a note identified by its ID operationId: getNoteById responses: "200": description: note response content: application/json; charset=utf-8: schema: $ref: "#/components/schemas/Note" ``` The `parameters` entry is interpreted as method, thus the `operationId` is null, which creates a following entry in `specs` the tool server: ```json { "type": "function", "description": "No description available.", "parameters": { "type": "object", "properties": {}, "required": [] } } ``` Since there is no name, when trying to access this property, this raise error when using tool server.
GiteaMirror added the bug label 2025-11-11 16:05:06 -06:00
Author
Owner

@tjbck commented on GitHub (Apr 19, 2025):

Addressed with 463d7fb628

@tjbck commented on GitHub (Apr 19, 2025): Addressed with 463d7fb628a2f860b7949221390c6918d4cd8cd7
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#4859