fix(platform): _capability_guard输出侧媒体词对称排除——t2i描述含'图像/图片'(输出)被误判图像输入→反复纠正成i2i且overrides.model_capability压不住(2026-09-07 qwen-image-plus实测:文档明写输入文本输出图像,助手override t2i被守卫每次改回i2i死循环);此前只排video未排image,补_OUTPUT_KIND对称表
This commit is contained in:
parent
31834c812e
commit
48735b98ba
@ -497,7 +497,15 @@ def _capability_guard(capability, description):
|
||||
return None, None
|
||||
has_ref = any(w in desc for w in _DESC_REF_WORDS)
|
||||
kinds = [k for k, words in _DESC_MEDIA_WORDS.items() if any(w in desc for w in words)]
|
||||
input_kinds = [k for k in kinds if k != 'video']
|
||||
# 输出侧媒体词对称排除(2026-09-07 qwen-image-plus 实测根因):纯文本生成
|
||||
# 能力的描述几乎必含其输出媒体词——t2v 必含「视频」、t2i 必含「图像/图片」,
|
||||
# 那是输出声明不是输入声明。此前只排 video(video 在 t2v/i2v 描述必现),
|
||||
# 没排 image(image 在 t2i 描述必现)→「千问系列图像生成模型」被误判有
|
||||
# 图像输入 → t2i 被反复纠正成 i2i,且 overrides.model_capability 压不住
|
||||
# (守卫在 apply 前置阶段每次又改回去,用户纠正陷入死循环)。
|
||||
_OUTPUT_KIND = {'t2v': 'video', 't2i': 'image'}
|
||||
out_kind = _OUTPUT_KIND.get(capability)
|
||||
input_kinds = [k for k in kinds if k != out_kind]
|
||||
if not (has_ref or input_kinds):
|
||||
return None, None
|
||||
if capability == 't2t':
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user