Filter probed unsupported tool models
This commit is contained in:
@@ -66,6 +66,68 @@ VALIDATED_CHAT_MODEL_PROVIDERS = {
|
||||
'zhipuai',
|
||||
}
|
||||
|
||||
UNSUPPORTED_TOOL_CHAT_MODEL_IDS = {
|
||||
# 这些模型来自 /models,但带 tools/tool_choice 的最小 Agent 请求实测失败。
|
||||
'azure_openai/gpt-5.5',
|
||||
'azure_openai/grok-3',
|
||||
'azure_openai/grok-3-mini',
|
||||
'minimax/abab6.5t-chat',
|
||||
'ppio/gemini-2.0-flash-20250609',
|
||||
'siliconflow/deepseek-ai/deepseek-ocr',
|
||||
'siliconflow/deepseek-ai/deepseek-r1-distill-qwen-14b',
|
||||
'siliconflow/deepseek-ai/deepseek-r1-distill-qwen-32b',
|
||||
'siliconflow/deepseek-ai/deepseek-r1-distill-qwen-7b',
|
||||
'siliconflow/qwen/qwen2.5-coder-32b-instruct',
|
||||
'siliconflow/qwen/qwen2.5-vl-32b-instruct',
|
||||
'siliconflow/qwen/qwen2.5-vl-72b-instruct',
|
||||
'siliconflow/qwen/qwen3-235b-a22b',
|
||||
'siliconflow/qwen/qwen3-235b-a22b-thinking-2507',
|
||||
'siliconflow/qwen/qwen3-30b-a3b-instruct-2507',
|
||||
'siliconflow/qwen/qwen3-vl-8b-instruct',
|
||||
'siliconflow/qwen/qwen3-vl-8b-thinking',
|
||||
'siliconflow/thudm/glm-4-9b-chat',
|
||||
'siliconflow/thudm/glm-4.1v-9b-thinking',
|
||||
'siliconflow/zai-org/glm-4.5',
|
||||
'tongyi/deepseek-r1-distill-qwen-14b',
|
||||
'tongyi/deepseek-r1-distill-qwen-32b',
|
||||
'tongyi/qwen-mt-plus',
|
||||
'tongyi/qwen-mt-turbo',
|
||||
'tongyi/qwen-plus-0919',
|
||||
'tongyi/qwen2.5-0.5b-instruct',
|
||||
'tongyi/qwen2.5-1.5b-instruct',
|
||||
'tongyi/qwen3-0.6b',
|
||||
'tongyi/qwen3-1.7b',
|
||||
'tongyi/qwen3-30b-a3b',
|
||||
'tongyi/qwen3-4b',
|
||||
'tongyi/qwen3-8b',
|
||||
'vertex_ai/gemini-2.0-flash-001',
|
||||
'vertex_ai/gemini-2.0-flash-lite-001',
|
||||
'vertex_ai/gemini-2.5-computer-use-preview-10-2025',
|
||||
'vertex_ai/gemini-2.5-flash',
|
||||
'vertex_ai/gemini-2.5-flash-lite',
|
||||
'vertex_ai/gemini-2.5-flash-lite-preview-09-2025',
|
||||
'vertex_ai/gemini-2.5-pro',
|
||||
'vertex_ai/gemini-3-flash-preview',
|
||||
'vertex_ai/gemini-3.1-flash-lite-preview',
|
||||
'vertex_ai/gemini-3.1-pro-preview',
|
||||
'vertex_ai/gemini-3.1-pro-preview-pt',
|
||||
'wenxin/ernie-speed-128k',
|
||||
'wenxin/ernie-speed-8k',
|
||||
'xiaomi/mi-brag-vl',
|
||||
'xiaomi/midashenglm-7b-1021-bf16',
|
||||
'xiaomi/milm2.1-13b-chat',
|
||||
'xiaomi/mimo-vl-7b-rl',
|
||||
'xiaomi/mimo-vl-7b-rl-0808',
|
||||
'xiaomi/paddleocr-vl-0.9b',
|
||||
'xiaomi/qwen-235b-a22b',
|
||||
'xiaomi/qwen2.5-72b-instruct-gptq-int4',
|
||||
'xiaomi/qwen2.5-vl-72b-instruct-awq',
|
||||
'xiaomi/qwen25-coder-7b',
|
||||
'xiaomi/qwen3-235b-a22b',
|
||||
'xiaomi/qwen3-235b-a22b-instruct-2507',
|
||||
'xiaomi/qwen3-32b',
|
||||
}
|
||||
|
||||
# WebUI 的快速入口只展示可以通过对话输入框安全执行的 slash command。
|
||||
# 这些命令仍然保留在终端 `/` 列表里,但不适合作为 WebUI 快捷项。
|
||||
WEBUI_HIDDEN_SLASH_COMMANDS = {
|
||||
@@ -1549,6 +1611,8 @@ def _normalize_model_list(payload: Any) -> list[dict[str, str]]:
|
||||
if provider and provider not in VALIDATED_CHAT_MODEL_PROVIDERS:
|
||||
continue
|
||||
normalized = _normalize_model_id(model_id, provider=provider)
|
||||
if normalized is not None and normalized.lower() in UNSUPPORTED_TOOL_CHAT_MODEL_IDS:
|
||||
continue
|
||||
if normalized is not None:
|
||||
entry = {'id': normalized}
|
||||
if provider:
|
||||
|
||||
@@ -32,6 +32,12 @@ class ModelListTests(unittest.TestCase):
|
||||
'owned_by': 'azure_openai',
|
||||
'model_type': 'llm',
|
||||
},
|
||||
{
|
||||
'id': 'gpt-5.5',
|
||||
'object': 'model',
|
||||
'owned_by': 'azure_openai',
|
||||
'model_type': 'llm',
|
||||
},
|
||||
{
|
||||
'id': 'gpt-4o-audio-preview',
|
||||
'object': 'model',
|
||||
@@ -63,7 +69,7 @@ class ModelListTests(unittest.TestCase):
|
||||
'model_type': 'llm',
|
||||
},
|
||||
{
|
||||
'id': 'gemini-2.0-flash-20250609',
|
||||
'id': 'gemini-2.5-flash',
|
||||
'object': 'model',
|
||||
'owned_by': 'ppio',
|
||||
'model_type': 'llm',
|
||||
@@ -77,7 +83,7 @@ class ModelListTests(unittest.TestCase):
|
||||
[model['id'] for model in models],
|
||||
[
|
||||
'azure_openai/gpt-5',
|
||||
'ppio/gemini-2.0-flash-20250609',
|
||||
'ppio/gemini-2.5-flash',
|
||||
'ppio/pa/claude-opus-4-7',
|
||||
'siliconflow/Pro/deepseek-ai/DeepSeek-V3',
|
||||
'xiaomi/DeepSeek-R1-0528',
|
||||
|
||||
Reference in New Issue
Block a user