From bffd2eba76762cff597c6958d16e13ca5bca3bc0 Mon Sep 17 00:00:00 2001 From: Oliver Mee <102673257+oliver-mee@users.noreply.github.com> Date: Wed, 16 Sep 2026 09:59:33 +0800 Subject: [PATCH] fix(alibaba-token-plan): correct deepseek-v4.1-flash structured_output for the plan gateway --- .../models/deepseek-v4.1-flash.toml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/providers/alibaba-token-plan/models/deepseek-v4.1-flash.toml b/providers/alibaba-token-plan/models/deepseek-v4.1-flash.toml index f32c843d2e8..6856b6ad35b 100644 --- a/providers/alibaba-token-plan/models/deepseek-v4.1-flash.toml +++ b/providers/alibaba-token-plan/models/deepseek-v4.1-flash.toml @@ -1,8 +1,10 @@ # Reasoning HTTP format (accessed 2026-09-15): -# Toggle: enable_thinking = true|false. Chat Completions `reasoning_effort` -# accepts low, high (default), and max; medium and xhigh map to high. -# Reasoning streams on `reasoning_content`. -# Model availability: Token Plan Personal and Team editions (Singapore). +# Toggle: enable_thinking = true|false. Thinking content streams on +# `reasoning_content`. Chat Completions `reasoning_effort` accepts the string +# ladder low/high (default)/max on the Token Plan gateway (probed 2026-09-15); +# medium and xhigh are accepted as aliases per family precedent. The vendor +# OpenAI-chat reference publishes integer effort (1-100); the plan gateway +# rejects integers with a 400 for this id (probed 2026-09-15). # Sources: # https://docs.qwencloud.com/api-reference/chat/openai-chat # https://www.alibabacloud.com/help/en/model-studio/deepseek-api @@ -10,6 +12,15 @@ # https://www.alibabacloud.com/help/en/model-studio/token-plan-team-overview base_model = "deepseek/deepseek-v4.1-flash" +# Structured output: PARTIAL on this gateway despite the lab row's +# structured_output = true. response_format json_object works, but strict +# json_schema is rejected with 400 "This response_format type is unavailable +# now" in both thinking modes (probed 2026-09-15 on the international Token +# Plan gateway, Personal and Team editions). Omitting this field would +# inherit the lab value and advertise an unsupported capability, so the +# override is explicit. +structured_output = false + reasoning_options = [{ type = "toggle" }, { type = "effort", values = ["low", "high", "max"] }] [interleaved]