[GH-ISSUE #4100] [Engine] openapi models endpoint not fully implemented #1791

Closed
opened 2026-11-04 01:54:05 +07:00 by bsakaguchi · 6 comments
Owner

Originally created by @pessimism on GitHub (Oct 25, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4100

when calling /models it correctly returns the full models list. openapi specs that when you go to /models/modelid, it returns details about that model. visual studio professional requires the individual models endpoint to respond to register and use BYOM with openapi

5060ti 16gb, 64gb ram, win11 26h2

PS C:> Invoke-RestMethod -Uri "http://127.0.0.1:8080/v1/models" -Method Get | ConvertTo-Json -Depth 4
{
"object": "list",
"data": [
{
"id": "qwen3.8-flash-next-iq3_xxs",
"object": "model",
"status": {
"value": "loaded"
},
"meta": {
"n_ctx": 128000
},
"architecture": {
"input_modalities": [
"text"
],
"output_modalities": [
"text"
]
}
}
]
}

PS C:> Invoke-RestMethod -Uri "http://127.0.0.1:8080/v1/models/qwen3.8-flash-next-iq3_xxs" -Method Get
Invoke-RestMethod : {"error": {"message": "not found"}}
At line:1 char:1

  • Invoke-RestMethod -Uri "http://127.0.0.1:8080/v1/models/qwen3.8-flash ...
  •   + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebExc
     eption
      + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
    
    
Originally created by @pessimism on GitHub (Oct 25, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/4100 when calling /models it correctly returns the full models list. openapi specs that when you go to /models/modelid, it returns details about that model. visual studio professional requires the individual models endpoint to respond to register and use BYOM with openapi 5060ti 16gb, 64gb ram, win11 26h2 PS C:\> Invoke-RestMethod -Uri "http://127.0.0.1:8080/v1/models" -Method Get | ConvertTo-Json -Depth 4 { "object": "list", "data": [ { "id": "qwen3.8-flash-next-iq3_xxs", "object": "model", "status": { "value": "loaded" }, "meta": { "n_ctx": 128000 }, "architecture": { "input_modalities": [ "text" ], "output_modalities": [ "text" ] } } ] } PS C:\> Invoke-RestMethod -Uri "http://127.0.0.1:8080/v1/models/qwen3.8-flash-next-iq3_xxs" -Method Get Invoke-RestMethod : {"error": {"message": "not found"}} At line:1 char:1 + Invoke-RestMethod -Uri "http://127.0.0.1:8080/v1/models/qwen3.8-flash ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebExc eption + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
Author
Owner

@github-actions[bot] commented on GitHub (Oct 25, 2026):

Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:

  • Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes".
  • Add your graphics card with its VRAM, your RAM and your operating system.

Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment /reopen.

Details: CONTRIBUTING.md

<!-- gh-comment-id:6398136669 --> @github-actions[bot] commented on GitHub (Oct 25, 2026): Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing: - [ ] Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes". - [ ] Add your graphics card with its VRAM, your RAM and your operating system. Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment `/reopen`. Details: [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md)
Author
Owner

@github-actions[bot] commented on GitHub (Oct 25, 2026):

Thanks, this follows the format now.

<!-- gh-comment-id:6398156216 --> @github-actions[bot] commented on GitHub (Oct 25, 2026): Thanks, this follows the format now.
Author
Owner

@pessimism commented on GitHub (Oct 25, 2026):

0001-single-model-endpoint.patch

This was enough to satisfy vs community/pro

<!-- gh-comment-id:6404907835 --> @pessimism commented on GitHub (Oct 25, 2026): [0001-single-model-endpoint.patch](https://github.com/user-attachments/files/33941040/0001-single-model-endpoint.patch) This was enough to satisfy vs community/pro
Author
Owner

@Niko1221 commented on GitHub (Nov 5, 2026):

Thanks for taking the time to report this.

Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected.

To reopen it takes about two minutes:

  1. Re-test on 0.2.11. It may already be fixed. Write down what you see.
  2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other].
  3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system.
  4. Comment /reopen. A check runs and either reopens the issue or lists what is still missing.

The rules are in CONTRIBUTING.md.

<!-- gh-comment-id:6659994475 --> @Niko1221 commented on GitHub (Nov 5, 2026): Thanks for taking the time to report this. Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected. To reopen it takes about two minutes: 1. Re-test on 0.2.11. It may already be fixed. Write down what you see. 2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other]. 3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system. 4. Comment `/reopen`. A check runs and either reopens the issue or lists what is still missing. The rules are in [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md).
Author
Owner

@tengdahuang commented on GitHub (Nov 7, 2026):

Re-tested on Strata 0.2.11 (build 0.1.57) with a running model, Windows 11, 2x RTX 3090 24 GB, 128 GB RAM: the route is still missing.

GET /v1/models                                → 200  {"data":[{"id":"qwen3.8-flash-next-iq3_s", ..., "status":{"value":"loaded"}}, ...]}
GET /v1/models/qwen3.8-flash-next-iq3_s       → 404  {"error":{"message":"not found"}}
GET /v1/models/bogus-model-xyz                → 404  {"error":{"message":"not found"}}

This is the only thing blocking Visual Studio 2026's BYOK custom OpenAI provider (18.10 preview): its "Add model" flow probes the OpenAI model-retrieve endpoint before accepting a model, and a 404 there surfaces to the user as "the model is unavailable or the model ID is invalid". Everything else about the endpoint is fine — it is exactly the probe that keeps a working local model from being addable at all.

The same VS dialog accepts Ollama and LM Studio on the same port, because both implement the retrieve endpoint: Ollama since ollama/ollama#5007 (GET /v1/models/:model, mapped to /api/show), and LM Studio registers GET /v1/models/:model(*) (verified against its shipped server bundle). Another project hit exactly this probe and fixed it server-side: Soju06/codex-lb#2038.

Suggested behavior (which is what @pessimism's patch does): return exactly the item GET /v1/models emits for that id — the list branch already builds entries for aliases and for the image model — and answer unknown ids with the OpenAI-shaped 404 ("code": "model_not_found") so a client can tell "unknown model" from "server down". Percent-decode the id: OpenAI-style ids may contain slashes and dots, which is why LM Studio's route is :model(*).

Verified: a 17-line addition in make_handler's do_GET (serve/server.py @ 54828c7e) that reuses the list branch's own data makes VS add the model, and it chats normally through it:

elif path in ("/v1/models", "/models") or path.startswith(("/v1/models/", "/models/")):
    ...  # the existing list branch, unchanged, builds `data`
    if path in ("/v1/models", "/models"):
        self._json(200, {"object": "list", "data": data})
    else:
        head = "/v1/models/" if path.startswith("/v1/models/") else "/models/"
        asked = unquote(path[len(head):])
        item = next((m for m in data if m["id"] == asked), None)
        if item is None:
            self._json(404, {"error": {"message": f"The model `{asked}` does not exist",
                                       "type": "invalid_request_error", "param": "model",
                                       "code": "model_not_found"}})
        else:
            self._json(200, item)
<!-- gh-comment-id:6703739213 --> @tengdahuang commented on GitHub (Nov 7, 2026): Re-tested on **Strata 0.2.11 (build 0.1.57)** with a running model, Windows 11, 2x RTX 3090 24 GB, 128 GB RAM: the route is still missing. ``` GET /v1/models → 200 {"data":[{"id":"qwen3.8-flash-next-iq3_s", ..., "status":{"value":"loaded"}}, ...]} GET /v1/models/qwen3.8-flash-next-iq3_s → 404 {"error":{"message":"not found"}} GET /v1/models/bogus-model-xyz → 404 {"error":{"message":"not found"}} ``` This is the only thing blocking Visual Studio 2026's BYOK custom OpenAI provider (18.10 preview): its "Add model" flow probes the OpenAI [model-retrieve](https://platform.openai.com/docs/api-reference/models/retrieve) endpoint before accepting a model, and a 404 there surfaces to the user as "the model is unavailable or the model ID is invalid". Everything else about the endpoint is fine — it is exactly the probe that keeps a working local model from being addable at all. The same VS dialog accepts Ollama and LM Studio on the same port, because both implement the retrieve endpoint: Ollama since ollama/ollama#5007 (`GET /v1/models/:model`, mapped to `/api/show`), and LM Studio registers `GET /v1/models/:model(*)` (verified against its shipped server bundle). Another project hit exactly this probe and fixed it server-side: Soju06/codex-lb#2038. Suggested behavior (which is what @pessimism's patch does): return exactly the item `GET /v1/models` emits for that id — the list branch already builds entries for aliases and for the image model — and answer unknown ids with the OpenAI-shaped 404 (`"code": "model_not_found"`) so a client can tell "unknown model" from "server down". Percent-decode the id: OpenAI-style ids may contain slashes and dots, which is why LM Studio's route is `:model(*)`. Verified: a 17-line addition in `make_handler`'s `do_GET` (serve/server.py @ `54828c7e`) that reuses the list branch's own `data` makes VS add the model, and it chats normally through it: ```python elif path in ("/v1/models", "/models") or path.startswith(("/v1/models/", "/models/")): ... # the existing list branch, unchanged, builds `data` if path in ("/v1/models", "/models"): self._json(200, {"object": "list", "data": data}) else: head = "/v1/models/" if path.startswith("/v1/models/") else "/models/" asked = unquote(path[len(head):]) item = next((m for m in data if m["id"] == asked), None) if item is None: self._json(404, {"error": {"message": f"The model `{asked}` does not exist", "type": "invalid_request_error", "param": "model", "code": "model_not_found"}}) else: self._json(200, item) ```
Author
Owner

@tengdahuang commented on GitHub (Nov 7, 2026):

/reopen

<!-- gh-comment-id:6703739495 --> @tengdahuang commented on GitHub (Nov 7, 2026): /reopen
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#1791
No description provided.