Skip to content

5080deploy: merge upstream #476, --default-thinking-mode server flag - #52

Open
gdevenyi wants to merge 2 commits into
5080/13-admission-clamp-118from
5080/14-default-thinking-mode-476
Open

gdevenyi wants to merge 2 commits into
5080/13-admission-clamp-118from
5080/14-default-thinking-mode-476

Conversation

@gdevenyi

@gdevenyi gdevenyi commented Sep 18, 2026

Copy link
Copy Markdown
Owner

Stacked on #51. Merges upstream FlashML-org#476 (head 7a15be2) into 5080deploy, rebuilt on upstream main cac247a (v0.1.3).

Why it is in scope for this deployment: Generic, opt-in: a server-wide default for enable_thinking; nothing changes unless the flag is passed (the production script does not pass it).

Merge: Clean merge.

Testing (RTX 5080 16 GB, production flags: FTW-fp8, nvfp4 KV, 262,144 tokens, 1,280 expert slots):

  • Live with the default (flag not passed): the existing behaviour holds -- chat_template_kwargs.enable_thinking=false requests answer directly, the 250K recall request with reasoning on still returns reasoning_content.
  • pytest tests/ -m "not slow" at 69a5efa (the tip before the middleware commit 8adde91, which touches only server/api_server.py and adds one test; tests/server rerun at 8adde91: 871 passed): 2412 passed, 206 skipped; the 4 failures are environment-only (3x test_muse_glimmer_vision.py fail identically on pristine upstream cac247a with transformers 5.15.1, and test_async_pull_coalesced is an async def test that needs pytest-asyncio, which the project does not declare).

Rebased 2026-09-19 onto upstream main cc1f5c2 (4 commits past cac247a: FlashML-org#471 greedy sampling in mixed batches, FlashML-org#518 WeightLoadError, FlashML-org#521 tvm-ffi jit arch, FlashML-org#524 install index). Same replay as before via git rerere; the replayed stack differs from the previous tip 8adde91 by exactly the cac247a..cc1f5c2 file set. This PR's head is now bc13040.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Bu6LgoxLR4wETqb7RPR2vt

…ng default

OpenAI-compatible clients that never send chat_template_kwargs (Vercel AI
SDK openai-compatible provider, llama-swap, LiteLLM proxies) currently get
the model's template default, which for reasoning models like Qwen3.6 means
thinking is always on — the token budget goes to reasoning_content and
content comes back empty.

--default-thinking-mode {auto,chat,thinking} lets the operator pick the
server-wide default:

- auto (default): current behavior, template decides
- chat: fills enable_thinking=False into every request that does not set
  any explicit thinking control
- thinking: fills enable_thinking=True the same way

An explicit per-request value (enable_thinking / thinking / thinking_mode
in chat_template_kwargs, or the DeepSeek thinking.type wire toggle) always
wins over the server default.

Applied to all three frontends: OpenAI chat completions, Anthropic
messages, and Responses API.

Closes FlashML-org#472
@gdevenyi
gdevenyi force-pushed the 5080/13-admission-clamp-118 branch from 4584957 to 0ab1764 Compare September 19, 2026 21:31
@gdevenyi
gdevenyi force-pushed the 5080/14-default-thinking-mode-476 branch from fd37df5 to bc13040 Compare September 19, 2026 21:31
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.

2 participants