[0.10.124/Linux] Thread distillation on DeepSeek fails with 400: ruling fold sent with a json_schema response_format
Describe the bug
With the built-in deepseek provider (deepseek-flash, https://api.deepseek.com/v1) as the background model, a thread distillation failed. The ruling fold request was sent with json_mode=Schema, and DeepSeek rejected it:
2026-11-26T15:56:56Z WARN nmem_harness::harness: AgentHarness provider stream error session_id=sched-thread_distillation error=CompletionError: ProviderResponseError: status 400 Bad Request: provider_json_mode_unsupported: {"error":{"message":"This response_format type is unavailable now (request_id: 8777a50e-a36c-4992-bfe4-93fab1c9c072)","type":"invalid_request_error","param":null,"code":"invalid_request_error"}}
2026-11-26T15:56:56Z INFO distillation failure fingerprint class="provider" failure=ProviderError wire=ChatCompletions host_class=Official reasoning_control=Disabled json_mode=Schema
Task thread-distill-806019ac97 ended with distillation_model_failed, and no memories were saved.
To Reproduce
We could not trigger it on demand. Assign the background purpose to the built-in DeepSeek provider and let automatic thread distillation run.
The other failed ruling folds on this provider show json_mode=JsonObject in their fingerprint, so the Schema mode is used only in some cases.
Expected behavior
DeepSeek's Chat Completions API accepts only text and json_object as response_format.type (API reference). json_schema exists only on its Responses API.
On the Chat Completions wire, nmem should use json_object for DeepSeek, or retry with json_object after provider_json_mode_unsupported.
Additional context
nmem 0.10.124,nmem-server 0.10.124 (b46efe2bdcad)on Linux, self-hosted (nmem serveunder systemd).- Provider
deepseek: modeldeepseek-flash,context_window1,000,000,max_tokens384,000,timeout3600. It servesai_now,backgroundanddefault. - Related, opposite case: #958 (LM Studio rejects
json_object).
Thanks for the report, we've received it. We'll look into fixing this as soon as we can and will update this issue once a release with the fix is out.