[GH-ISSUE #3931] [Engine] Native-instance /v1/models sends no context window, so OpenAI-compatible clients fall back to defaults #1682

Closed
opened 2026-11-04 01:53:09 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @nier-miss on GitHub (Oct 24, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3931

Problem and result

The native-instance path of GET /v1/models (apps/host/server/index.mjs, the owned_by: "strata" response) returns only instanceId, gpus, label and aliases. There is no context key, not even meta.n_ctx, so any client that sizes its context window from the model list falls back to its own default. The control-server path (serve/server.py) reports meta.n_ctx, and #1882 adds max_model_len/context_length there, but the native path is untouched by both.

The instance already holds the configured context, so this looks like a serialization gap rather than missing data.

Live response (v0.2.4.1, engine 0.1.47, Gyro-M configured at 512K):

{"id": "gyro-gyro-m", "object": "model", "owned_by": "strata",
 "meta": {"instanceId": "...", "gpus": [0], "label": "...", "aliases": ["gyro-gyro-m"]}}

Request

Add the loaded instance's context window to the native /v1/models entries, primary and aliases, ideally under the same names #1882 uses (max_model_len and context_length) plus meta.n_ctx, so all client conventions are covered by one shape.

Repro

curl http://127.0.0.1:<port>/v1/models with a native model loaded. No context field in any entry.

Environment

Strata 0.2.4.1, Control 0.1.49.1, engine 0.1.47/0.1.48, Windows 11, RTX 5080, Hermes as the affected client.

#1882 (covers serve/server.py only; the author confirmed there that the native path needs the same treatment).

Originally created by @nier-miss on GitHub (Oct 24, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/3931 ### Problem and result The native-instance path of `GET /v1/models` (`apps/host/server/index.mjs`, the `owned_by: "strata"` response) returns only `instanceId`, `gpus`, `label` and `aliases`. There is no context key, not even `meta.n_ctx`, so any client that sizes its context window from the model list falls back to its own default. The control-server path (`serve/server.py`) reports `meta.n_ctx`, and #1882 adds `max_model_len`/`context_length` there, but the native path is untouched by both. The instance already holds the configured context, so this looks like a serialization gap rather than missing data. Live response (v0.2.4.1, engine 0.1.47, Gyro-M configured at 512K): ```json {"id": "gyro-gyro-m", "object": "model", "owned_by": "strata", "meta": {"instanceId": "...", "gpus": [0], "label": "...", "aliases": ["gyro-gyro-m"]}} ``` ### Request Add the loaded instance's context window to the native `/v1/models` entries, primary and aliases, ideally under the same names #1882 uses (`max_model_len` and `context_length`) plus `meta.n_ctx`, so all client conventions are covered by one shape. ### Repro `curl http://127.0.0.1:<port>/v1/models` with a native model loaded. No context field in any entry. ### Environment Strata 0.2.4.1, Control 0.1.49.1, engine 0.1.47/0.1.48, Windows 11, RTX 5080, Hermes as the affected client. ### Related #1882 (covers `serve/server.py` only; the author confirmed there that the native path needs the same treatment).
Author
Owner

@msalsas commented on GitHub (Oct 27, 2026):

Hit this from the monitoring side. An external tool sized its context budget off the shared model list: GET http://<host>:47832/v1/models against a shared instance (app 0.2.6, engine 0.1.50, Windows) returns a meta with exactly instanceId, gpus, label and aliases, so the tool fell back to its default context.

One thing worth noting while this is open, because it decides where the fix can live: the share listener (apps/host/server/local-share.mjs) admits only /v1/models, /v1/chat/completions and /v1/messages, so the models reply is the only channel on the shared port where a client can learn the context size at all.

If nobody has it in flight I'll send a small PR that puts meta.n_ctx (and n_ctx_train if it's at hand) into the native models reply. Reproduction status: reproduced locally against my own shared instance, output as above.

<!-- gh-comment-id:6452782193 --> @msalsas commented on GitHub (Oct 27, 2026): Hit this from the monitoring side. An external tool sized its context budget off the shared model list: `GET http://<host>:47832/v1/models` against a shared instance (app 0.2.6, engine 0.1.50, Windows) returns a `meta` with exactly `instanceId`, `gpus`, `label` and `aliases`, so the tool fell back to its default context. One thing worth noting while this is open, because it decides where the fix can live: the share listener (`apps/host/server/local-share.mjs`) admits only `/v1/models`, `/v1/chat/completions` and `/v1/messages`, so the models reply is the only channel on the shared port where a client can learn the context size at all. If nobody has it in flight I'll send a small PR that puts `meta.n_ctx` (and `n_ctx_train` if it's at hand) into the native models reply. Reproduction status: reproduced locally against my own shared instance, output as above.
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:6659813266 --> @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).
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#1682
No description provided.