From 32bb38af3c8654881798cf2ecd6d183b5f2fb5f9 Mon Sep 17 00:00:00 2001 From: kunkunblueberry <1833921874@qq.com> Date: Mon, 2 Nov 2026 15:34:53 +0800 Subject: [PATCH] [docs] readme: document the context length a self-hosted chat service needs ## summary - Record the measured requirement: the application sends `max_tokens: 8192`, so a self-hosted chat service must allow at least 8192 tokens of context. A smaller `--max-model-len` (vLLM's 4096 default) rejects every request with HTTP 400. - Add the same note to the Chinese README. ## validation Measured with vLLM 0.32 serving `Qwen2.5-1.5B-Instruct`: `--max-model-len 4096` produced `providerCode: 400` on every generation; `--max-model-len 16384` produced `status: succeeded`, `adopted: true`. Refs: #19 --- README.md | 4 ++++ README.zh-CN.md | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/README.md b/README.md index 63178b171..3f3b68011 100644 --- a/README.md +++ b/README.md @@ -133,6 +133,10 @@ A service can provide multiple models within the same category. After entering i The service URL and Model ID must match your model service. Self-hosted service URLs typically include `/v1`; use the model name actually exposed by the service as the Model ID. For third-party services, follow the information provided by the service. +For a self-hosted chat service, allow at least 8192 tokens of context: the +application sends `max_tokens: 8192`, so a smaller `--max-model-len` (for +example vLLM's 4096 default) rejects every request with HTTP 400. + For detailed video settings, see [Video model capability configuration (Chinese)](docs/guides/video-model-capabilities.md). When no explicit output specification is provided, use **Auto (自动)** or **Service default duration (服务默认时长)**. Automatic region selection in images and video matting require a model with segmentation capabilities. Image generation and editing still require the corresponding generation or editing model. diff --git a/README.zh-CN.md b/README.zh-CN.md index ff5e97401..ffcd7aa9b 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -133,6 +133,10 @@ npm.cmd run build 服务地址和 Model ID 应与自己的模型服务一致。自部署服务的地址通常包含 `/v1`,Model ID 使用服务实际公开的模型名称;第三方服务按其提供的信息填写。 +自部署的对话服务需要至少 8192 token 的上下文:应用固定发送 `max_tokens: 8192`, +若服务端的 `--max-model-len` 更小(例如 vLLM 的 4096 默认值),每次请求都会返回 +HTTP 400。 + 视频模型的详细配置见 [视频模型能力配置](docs/guides/video-model-capabilities.md)。未提供明确输出规格时,使用“自动”或“服务默认时长”。 自动识别图片选区或视频抠像需要具备分割能力的模型;生成图片、编辑图片仍需选择对应的生成或编辑模型。