Skip to content

v0.5.17 — Web UI 记住 LLM 配置(#96)

Latest

Choose a tag to compare

@simonlin1212 simonlin1212 released this 05 Sep 02:08

新增:Web UI 记住 LLM 配置(#96,by @WenhuaXia

此前侧栏选的供应商 / 快速·深度模型 / API Base URL / 订阅覆盖 / 自定义模型 ID 只存在 st.session_state,关掉标签页就回到默认的 MiniMax。现在点「开始分析」时把这组选择写入 ~/.tradingagents/llm_config.json,页面加载时恢复——不覆盖当次已经改过的选项;写盘失败(目录只读 / 磁盘满)只记 warning,不打断分析。

合并后补了两处:

  • 配置文件从包目录(pip 安装时落在 site-packages)移到 ~/.tradingagents/,与 logs / cache / memory 同一位置;
  • 「个人 Claude 订阅覆盖」的恢复改写 selectbox 的 widget 键 subscription_scope_idx——只回填派生值会在渲染时被覆盖回「关闭」。

新增 tests/test_llm_config_persistence.py;全量 378 passed。

升级:pip install -U .(或 git pull),无配置变化。