pipeline_core/wwwroot/api/agent_model_options.dspy

17 lines
922 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# agent_model_options.dspy — AgentIO 模型下拉
# 2026-09-04 收敛:实现统一在模型治理模块 pipeline_llm.selection.model_options
# 本文件只作 URL 入口(前端 AgentIO 的 model_dataurl 指向此处)。
# 返回格式与历史一致value/model_id=模型idmodel_id_text=模型名,含 selected 标记。
# capabilities='chat':会话 agent 只列文本输出对话能力t2t/i2t/m2t
# 过滤掉 embedding/rerank/图视频生成等非对话模型2026-09-06 用户定夺)。
uid = await get_user()
org_id = (await get_userorgid()) or ''
session_id = (params_kw or {}).get('session_id', '') or ''
pipeline_id = (params_kw or {}).get('pipeline_id', '') or ''
rows = await llm_model_options(org_id, uid=uid or '', session_id=session_id,
pipeline_id=pipeline_id, value_field='id',
capabilities='chat')
return rows