pipeline_core/wwwroot/api/get_model_options.dspy
yumoqing 4b2fd4cd7a feat(ownership): 三张跨产线表归属迁入——sd_projects/sd_project_role_models/pipeline_deliverables models+CRUD json+15个api dspy+手写角色模型页自pipeline-sdlc迁入(第2轮迁归属)
- models: 3张表JSON迁入(sd_projects全产线项目容器/pipeline_deliverables被bidding+service+core写681行实证/sd_project_role_models被pipeline-service三处消费)——分层倒置修复:core的agent_config.py裸查sd_projects/pipeline_deliverables,低层查高层表
- json: sd_project_list.json/pipeline_deliverables_list.json迁入,subtables迭代/仓库页改绝对路径/pipeline-sdlc/**(跨模块相对路径会解析到core不存在的目录)
- api: 15个CRUD页面依赖的dspy迁入(get_project_options等,entire_url('../api/')相对解析跟页面走);get_module_dbname('pipeline_sdlc')→pipeline_core(app层一律返pipeline,行为不变仅语义归位)
- init/data.json: 4组字典随表迁(sd_project_status/sd_project_type/deliverable_type/review_status)——normalize幂等键{parentid}_{k}不变,import_init重跑无副作用
- .gitignore: 补wwwroot/sd_projects/+wwwroot/pipeline_deliverables/(xls2ui生成目录,build.sh第7步清单已含pipeline_core,重生成不脏工作树)
2026-09-10 12:33:30 +08:00

17 lines
951 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.

# get_model_options.dspy — 角色模型配置下拉value=模型注册名)
# 2026-09-04 收敛:实现统一在模型治理模块 pipeline_llm.selection.model_options
# 本文件只作 URL 入口。保留历史格式:首项「缺省(用项目默认模型)」+ value/text 两列。
# capabilities='chat':角色模型也是会话/任务 agent 用的对话模型,只列 t2t/i2t/m2t
# 2026-09-06 用户定夺;防把 embedding 等非对话模型配给角色后推理链报能力不匹配)。
rows = [{'value': '', 'text': '缺省(用项目默认模型)'}]
try:
org_id = await get_userorgid()
if org_id:
opts = await llm_model_options(org_id, value_field='name', capabilities='chat')
rows += [{'value': r['value'], 'text': r['text']} for r in opts]
return json.dumps(rows, ensure_ascii=False)
except Exception as e:
debug(f'get_model_options error: {e}')
return json.dumps(rows, ensure_ascii=False)