Skip to content

/v1/models: each model lists what it supports, from the same facts the refusals read - #2157

Merged
ashhart merged 3 commits into
mainfrom
lead/models-capabilities
Nov 7, 2026
Merged

ashhart merged 3 commits into
mainfrom
lead/models-capabilities

Conversation

@ashhart

@ashhart ashhart commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Part of #2139.

Clients could only learn what a model supports by trying it and reading a 400. Each /v1/models entry now carries the booleans (logprobs, structures, vision, greedy-only, penalties) from the function the refusals read, so the two can't disagree.

Only new fields, and no replies change. A host test fails on main and passes here. No device run.

@ashhart
ashhart marked this pull request as ready for review November 4, 2026 19:59
@ashhart
ashhart force-pushed the lead/models-capabilities branch from ae054eb to dfd63d8 Compare November 5, 2026 17:38
ashhart added a commit that referenced this pull request Nov 6, 2026
@ashhart
ashhart force-pushed the lead/models-capabilities branch from dfd63d8 to 8195734 Compare November 6, 2026 03:37
ashhart added a commit that referenced this pull request Nov 6, 2026
@ashhart
ashhart force-pushed the lead/models-capabilities branch from 8195734 to 36466ae Compare November 6, 2026 08:36
@ashhart

ashhart commented Nov 6, 2026

Copy link
Copy Markdown
Owner Author

/atc exchange be08bebca2cc32d17b0be2448ad40f57a57684d55baaff16a5f3ef650f9f9e92

@ashhart
ashhart force-pushed the lead/models-capabilities branch from a92328c to b250445 Compare November 7, 2026 02:19
@ashhart
ashhart merged commit 86e1312 into main Nov 7, 2026
0 of 7 checks passed
ashhart added a commit that referenced this pull request Nov 8, 2026
…sed, on main's capability source (#2170)

#2170 (its commits c66c50e, d9a6676, e6daa05 and 7d078c1) brought onto
main 221aca5 with the two held conflicts resolved:

- #2157's one capability source: thinking_switch and thinking_applicable are Info flags and the last two
  Capability entries, so /v1/models keeps one capabilities object with its fields and order and appends the
  two; the server sets them once at start-up (the off probe renders through the same refusal as a request)
  and an idle reload keeps them; the request refusal reads applicability through Info.capability.
- main's DeepSeek native path in prompt.zig is kept as is: its encoder has a real switch (the synthetic
  source names enable_thinking and thinking_mode) and writes <|Assistant|></think> itself, so it is never refused.

Tests beyond #2170's: raw completions, a switched template whose off render ends without </think>, DeepSeek
off through the OpenAI route, the listing shape and the reload. The 17 /v1/models goldens gain only the two
fields and their Content-Length.

Part of #2139.
ashhart added a commit that referenced this pull request Nov 8, 2026
…sed, on main's capability source (#2170)

main 221aca5 with the two held conflicts resolved:

- #2157's one capability source: thinking_switch and thinking_applicable are Info flags and the last two
  Capability entries, so /v1/models keeps one capabilities object with its fields and order and appends the
  two; the server sets them once at start-up (the off probe renders through the same refusal as a request)
  and an idle reload keeps them; the request refusal reads applicability through Info.capability.
- main's DeepSeek native path in prompt.zig is kept as is: its encoder has a real switch (the synthetic
  source names enable_thinking and thinking_mode) and writes <|Assistant|></think> itself, so it is never refused.

Tests beyond #2170's: raw completions, a switched template whose off render ends without </think>, DeepSeek
off through the OpenAI route, the listing shape and the reload. The 17 /v1/models goldens gain only the two
fields and their Content-Length.

Part of #2139.
ashhart added a commit that referenced this pull request Nov 8, 2026
…sed, on main's capability source (#2170)

main 221aca5 with the two held conflicts resolved:

- #2157's one capability source: thinking_switch and thinking_applicable are Info flags and the last two
  Capability entries, so /v1/models keeps one capabilities object with its fields and order and appends the
  two; the server sets them once at start-up (the off probe renders through the same refusal as a request)
  and an idle reload keeps them; the request refusal reads applicability through Info.capability.
- main's DeepSeek native path in prompt.zig is kept as is: its encoder has a real switch (the synthetic
  source names enable_thinking and thinking_mode) and writes <|Assistant|></think> itself, so it is never refused.

Tests beyond #2170's: raw completions, a switched template whose off render ends without </think>, DeepSeek
off through the OpenAI route, the listing shape and the reload. The 17 /v1/models goldens gain only the two
fields and their Content-Length.

Part of #2139.
@ashhart
ashhart deleted the lead/models-capabilities branch November 10, 2026 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant