Skip to content

Open WebUI as LLM provider #427

Closed

Description

@bsulyok

Hi!

I have been trying to use Open WebUI as an LLM provider with no luck. I have set the following parameters in the config.yaml file and exported the API key of course:

llm:
  api_base: "http://localhost:3000/api/" 
  model: "glm-ocr"

When attempting to run one of the examples (function_minimization) instead of getting the expected result I receive heaps of failed attempts at parsing the LLMs output:

2026-03-03 03:48:11,747 - ERROR - LLM generation failed: list index out of range
2026-03-03 03:48:11,747 - ERROR - LLM generation failed: list index out of range
2026-03-03 03:48:11,756 - WARNING - Iteration 39 error: LLM generation failed: list index out of range
2026-03-03 03:48:11,757 - WARNING - Iteration 40 error: LLM generation failed: list index out of range

The same endpoint, key and model results in the expected behaviour when making API calls via the openai python interface.

I was unable to identify the problem beyond what is seen in the logs.
Any idea what the problem is? Is Open WebUI simply not supported?

Activity

  1. codelion commented on Mar 3, 2026

    @codelion
    Member

    Can you try with base url http://localhost:3000/api/v1

  2. bsulyok commented on Mar 3, 2026

    @bsulyok
    Author

    Can you try with base url http://localhost:3000/api/v1

    I have tried that already, same results!

  3. bsulyok commented on Mar 3, 2026

    @bsulyok
    Author

    I identified the issue after some debugging. It seemed to be an important distinction to specify the model as "primary_model" as such:

    llm:
      api_base: "http://localhost:3000/api/" 
      primary_model: "glm-ocr"
    

    Without this the model is not recognized and an empty list is loaded as the model ensemble. I must have missed this detail in the documentation!

  4. akushonkamen commented on Oct 8, 2026

    @akushonkamen
    Contributor

    Working on this. Plan: (1) raise an explicit ValueError in Config.from_dict when the invalid llm.model key is present, pointing at llm.primary_model / the llm.models array instead of letting dacite silently drop it and blow up later with IndexError in LLMEnsemble._sample_model; (2) fix the three README provider examples (Gemini, Ollama/vLLM, OptiLLM) that currently teach the broken model: spelling. PR with tests shortly.

  5. akushonkamen commented on Oct 8, 2026

    @akushonkamen
    Contributor

    PR up: #503 — explicit ValueError for the llm.model key in Config.from_dict, plus all three README provider examples corrected to primary_model:. Full suite green.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions