Update Longcat presets to LongCat-2.0 (#4838)

* Update Longcat presets to LongCat-2.0

* fix(proxy): classify LongCat-2.0 as text-only for media sanitizer

The Longcat presets now use LongCat-2.0, but the known_text_only_model
allowlist still only matched the retired longcat-flash-chat tail. Without
this, images pasted into a text-only LongCat-2.0 session are forwarded
upstream instead of being replaced with the unsupported-image marker,
causing a hard rejection. Add longcat-2.0 (keeping the retired name for
saved configs) and a regression test.

---------

Co-authored-by: chengzifeng <chengzifeng@meituan.com>
Co-authored-by: Jason <farion1231@gmail.com>
This commit is contained in:
Cheng Zi Feng
2026-07-04 16:38:35 +08:00
committed by GitHub
parent 0cda8d46c7
commit 7a8b956253
11 changed files with 195 additions and 29 deletions
+3 -3
View File
@@ -723,7 +723,7 @@ requires_openai_auth = true`,
config: generateThirdPartyConfig(
"longcat",
"https://api.longcat.chat/openai/v1",
"LongCat-2.0-Preview",
"LongCat-2.0",
),
endpointCandidates: ["https://api.longcat.chat/openai/v1"],
// 美团 LongCat 官方 Codex 文档用 wire_api=responses 对自家 base_url,原生 Responses,无需路由接管转换
@@ -732,8 +732,8 @@ requires_openai_auth = true`,
// 注:LongCat 的 /responses 工具类型契约文档化程度最低,建议真机冒烟一次
modelCatalog: modelCatalog([
{
model: "LongCat-2.0-Preview",
displayName: "LongCat 2.0 Preview",
model: "LongCat-2.0",
displayName: "LongCat 2.0",
contextWindow: 1048576,
},
]),