#3507·forgecode

[Bug]: LlamaCpp and LmStudio login fails to get models

Author: imrehgCreated Jun 13, 2026Updated Sep 16, 2026
Labelstype: bug

Bug Description

When logging in with either LlamaCpp or LmStudio providers, forge connects to the backend, but fails to parse the returned model list, due to an apparent schema error.

Steps to Reproduce

  1. Run /model
  2. Select either LlamaCpp or LmStudio as a provider; either set it up at the first time, or try to select a model if it was already set up
  3. forge tries to connect to the provider as OpenAI compatible, but fails

Expected Behavior

Model list is correctly parsed (since I can see in the server logs that the data is returned).

Actual Behavior

I'm getting errors like:

● [22:02:09] ERROR: Failed to fetch models from OpenAI-compatible provider

Caused by:
    0: Failed to deserialize models response
    1: GET http://127.0.0.1:8080/v1/models
    2: missing field `modality` at line 1 column 668

I'm using LMStudio 0.4.16 (Build 2) and llama-server version: 9601 (2c00efc).

An actual LlamaCpp models endpoint response
json
{
  "data": [
    {
      "id": "GLM-4.7-Flash-GGUF",
      "aliases": [],
      "tags": [],
      "object": "model",
      "owned_by": "llamacpp",
      "created": 1781360984,
      "status": {
        "value": "unloaded",
        "args": [
          "/usr/bin/llama-server",
          "--host",
          "127.0.0.1",
          "--port",
          "0",
          "--ui-mcp-proxy",
          "--alias",
          "GLM-4.7-Flash-GGUF",
          "--ctx-size",
          "135000",
          "--model",
          "/home/greg/.lmstudio/models/lmstudio-community/GLM-4.7-Flash-GGUF/GLM-4.7-Flash-Q4_K_M.gguf",
          "--parallel",
          "1"
        ],
        "preset": "[GLM-4.7-Flash-GGUF]\nui-mcp-proxy = 1\nctx-size = 135000\nmodel = /home/greg/.lmstudio/models/lmstudio-community/GLM-4.7-Flash-GGUF/GLM-4.7-Flash-Q4_K_M.gguf\nparallel = 1\n\n"
      },
      "architecture": {
        "input_modalities": [
          "text"
        ],
        "output_modalities": [
          "text"
        ]
      },
      "need_download": false
    },
    {
      "id": "Qwen3.6-35B-A3B-GGUF",
      "aliases": [],
      "tags": [],
      "object": "model",
      "owned_by": "llamacpp",
      "created": 1781360984,
      "status": {
        "value": "loaded",
        "args": [
          "/usr/bin/llama-server",
          "--host",
          "127.0.0.1",
          "--port",
          "49759",
          "--ui-mcp-proxy",
          "--alias",
          "Qwen3.6-35B-A3B-GGUF",
          "--ctx-size",
          "135000",
          "--model",
          "/home/greg/.lmstudio/models/lmstudio-community/Qwen3.6-35B-A3B-GGUF/Qwen3.6-35B-A3B-Q8_0.gguf",
          "--mmproj",
          "/home/greg/.lmstudio/models/lmstudio-community/Qwen3.6-35B-A3B-GGUF/mmproj-Qwen3.6-35B-A3B-BF16.gguf",
          "--parallel",
          "1"
        ],
        "preset": "[Qwen3.6-35B-A3B-GGUF]\nui-mcp-proxy = 1\nctx-size = 135000\nmodel = /home/greg/.lmstudio/models/lmstudio-community/Qwen3.6-35B-A3B-GGUF/Qwen3.6-35B-A3B-Q8_0.gguf\nmmproj = /home/greg/.lmstudio/models/lmstudio-community/Qwen3.6-35B-A3B-GGUF/mmproj-Qwen3.6-35B-A3B-BF16.gguf\nparallel = 1\n\n"
      },
      "architecture": {
        "input_modalities": [
          "text",
          "image"
        ],
        "output_modalities": [
          "text"
        ]
      },
      "need_download": false,
      "meta": {
        "vocab_type": 2,
        "n_vocab": 248320,
        "n_ctx": 135168,
        "n_ctx_train": 262144,
        "n_embd": 2048,
        "n_params": 34660610688,
        "size": 36892150272
      }
    }
  ],
  "object": "list"
}
An actual LMStudio models endpoint response
json
{
  "data": [
    {
      "id": "nvidia/nemotron-3-nano-omni",
      "object": "model",
      "owned_by": "organization_owner"
    },
    {
      "id": "qwen/qwen3.6-35b-a3b",
      "object": "model",
      "owned_by": "organization_owner"
    },
    {
      "id": "glm-4.7-flash@q8_0",
      "object": "model",
      "owned_by": "organization_owner"
    },
    {
      "id": "text-embedding-nomic-embed-text-v1.5",
      "object": "model",
      "owned_by": "organization_owner"
    }
  ],
  "object": "list"
}

Forge Version

2.13.6

Operating System & Version

Archlinux (rolling)

AI Provider

OpenAI-compatible

Model

N/A

Installation Method

Built from source

Configuration

yaml
Default settings, haven't changed anything yet.