[GH-ISSUE #5460] [Engine] GET /v1/models/{model_id} (OpenAI model retrieve) is still missing in 0.2.11 - blocks Visual Studio 2026 BYOK custom models #3260

Open
opened 2026-11-07 14:39:14 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @tengdahuang on GitHub (Nov 7, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5460

Follows https://github.com/Niko1221/Strata/issues/4100 — same request; @pessimism already attached a working patch there (0001-single-model-endpoint.patch). #4100 was taken by the old-issue sweep, and the /reopen check only accepts the original author or a maintainer (ignored /reopen from tengdahuang), so this is a fresh report with a re-test on the current release. My evidence comment from #4100: https://github.com/Niko1221/Strata/issues/4100#issuecomment-6703739213

Area

Engine (the OpenAI-compatible API server).

Desktop app, Terminal or source?

From source (git clone of main, started via run-<model>.bat → serve/server.py).

What happened

serve/server.py answers GET /v1/models and GET /models, but anything below them — GET /v1/models/{model_id} — falls through to the generic 404. That is the OpenAI model-retrieve endpoint, and it is the one gate that keeps an otherwise perfectly working local model from being addable in Visual Studio 2026's BYOK custom-OpenAI provider (18.10 preview): its "Add model" flow probes GET {base}/v1/models/{model id} before accepting a model, and a 404 there surfaces to the user as "the model is unavailable or the model ID is invalid". Chat, tool calls and vision on the very same base URL work fine — only the validation probe fails, which is what makes this a dead end that is invisible from Strata's side.

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); LM Studio registers GET /v1/models/:model(*) (verified against its shipped server bundle, and live-tested on this machine). Another project hit exactly this probe and fixed it server-side: Soju06/codex-lb#2038.

Smallest steps or command that reproduce it

# with any model served
curl -i http://127.0.0.1:11434/v1/models                    → 200, the model is listed under its id
curl -i http://127.0.0.1:11434/v1/models/<that same id>    → 404 {"error":{"message":"not found"}}

GUI path: Chat → Model picker → Manage models → Add custom model → OpenAI → Base URL http://127.0.0.1:11434/v1 + the exact listed model id → the error above.

Reproduction status

Always (every attempt; after the route was added locally, the same dialog succeeds — see "Verified" below).

Strata version

0.2.11 (build 0.1.57), from source: serve/server.py @ 54828c7e (main, 2026-11-06).

Graphics card, memory and system

2x RTX 3090 24 GB, 128 GB RAM, Windows 11.

Model, size and settings

Qwen3.8-Flash-Next (abliterated GSQ) IQ3_S, --max-context 262144, pictures on (/health says images: true), no API key, bound to 127.0.0.1:11434.

Logs

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"}}

Proposed behavior

This is what @pessimism's patch in #4100 does, so treat this as a +1 with a fresh 0.2.11 test: 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:

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)

With that route, VS 2026 adds the model and chats through it normally (confirmed today).

Originally created by @tengdahuang on GitHub (Nov 7, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/5460 **Follows https://github.com/Niko1221/Strata/issues/4100** — same request; @pessimism already attached a working patch there (`0001-single-model-endpoint.patch`). #4100 was taken by the old-issue sweep, and the `/reopen` check only accepts the original author or a maintainer (`ignored /reopen from tengdahuang`), so this is a fresh report with a re-test on the current release. My evidence comment from #4100: https://github.com/Niko1221/Strata/issues/4100#issuecomment-6703739213 ### Area Engine (the OpenAI-compatible API server). ### Desktop app, Terminal or source? From source (`git` clone of `main`, started via `run-<model>.bat` → `serve/server.py`). ### What happened `serve/server.py` answers `GET /v1/models` and `GET /models`, but anything below them — `GET /v1/models/{model_id}` — falls through to the generic 404. That is the OpenAI [model-retrieve](https://platform.openai.com/docs/api-reference/models/retrieve) endpoint, and it is the one gate that keeps an otherwise perfectly working local model from being addable in **Visual Studio 2026's BYOK custom-OpenAI provider (18.10 preview)**: its "Add model" flow probes `GET {base}/v1/models/{model id}` before accepting a model, and a 404 there surfaces to the user as "the model is unavailable or the model ID is invalid". Chat, tool calls and vision on the very same base URL work fine — only the validation probe fails, which is what makes this a dead end that is invisible from Strata's side. 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`); LM Studio registers `GET /v1/models/:model(*)` (verified against its shipped server bundle, and live-tested on this machine). Another project hit exactly this probe and fixed it server-side: Soju06/codex-lb#2038. ### Smallest steps or command that reproduce it ``` # with any model served curl -i http://127.0.0.1:11434/v1/models → 200, the model is listed under its id curl -i http://127.0.0.1:11434/v1/models/<that same id> → 404 {"error":{"message":"not found"}} ``` GUI path: Chat → Model picker → Manage models → Add custom model → OpenAI → Base URL `http://127.0.0.1:11434/v1` + the exact listed model id → the error above. ### Reproduction status Always (every attempt; after the route was added locally, the same dialog succeeds — see "Verified" below). ### Strata version 0.2.11 (build 0.1.57), from source: `serve/server.py` @ `54828c7e` (main, 2026-11-06). ### Graphics card, memory and system 2x RTX 3090 24 GB, 128 GB RAM, Windows 11. ### Model, size and settings Qwen3.8-Flash-Next (abliterated GSQ) IQ3_S, `--max-context 262144`, pictures on (`/health` says `images: true`), no API key, bound to 127.0.0.1:11434. ### Logs ``` 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"}} ``` ### Proposed behavior This is what @pessimism's patch in #4100 does, so treat this as a +1 with a fresh 0.2.11 test: 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`: ```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) ``` With that route, VS 2026 adds the model and chats through it normally (confirmed today).
Author
Owner

@github-actions[bot] commented on GitHub (Nov 7, 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:

  • Fill in "Area".
  • Fill in "Desktop app, Terminal or source?".
  • Fill in "Reproduction status".
  • Fill in "Strata version".
  • Fill in "Graphics card, memory and 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:6703767568 --> @github-actions[bot] commented on GitHub (Nov 7, 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: - [ ] Fill in "Area". - [ ] Fill in "Desktop app, Terminal or source?". - [ ] Fill in "Reproduction status". - [ ] Fill in "Strata version". - [ ] Fill in "Graphics card, memory and 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 (Nov 7, 2026):

Thanks, this follows the format now.

<!-- gh-comment-id:6703783906 --> @github-actions[bot] commented on GitHub (Nov 7, 2026): Thanks, this follows the format now.
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#3260
No description provided.