44 Commits

Author SHA1 Message Date
subaoyan16
3d890a0731 fix: 将 litellm 依赖窗口收敛到已验证上界(排除 1.99.0 回归) (#2320)
* Exclude litellm 1.99.0 from allowed versions

litellm 1.99.0 (released 2026-09-01T00:42:41Z) now forwards the
prompt_cache_key argument to the OpenAI provider. The provider cache
contract test asserts the key is not passed through without verified
capture, so CI backend-tests (3/3) and the downstream backend-gate
went red on every branch right after the release, unrelated to any
code change.

Local capture server reproduction: with 1.98.0 the captured request
body carries no prompt_cache_key; with 1.99.0 it carries
prompt_cache_key=cache-key. This one-line exclusion follows the
existing quarantine pattern for 1.82.7 / 1.82.8 and keeps the tested
behaviour until the contract is adapted deliberately.

* Bound litellm below the 1.99.0 behavioral change

Pin the dependency window to a verified upper bound (latest 1.98.x)
instead of quarantining only 1.99.0, and sync every doc that hardcodes
the litellm constraint string so docs cannot drift from requirements.txt
again.

* Sync .env.example runtime constraint comment to the litellm upper bound
2026-09-01 19:22:45 +08:00
zhulinsen
4dda5d7148 feat: add explicit Responses API channel routing (#2157) 2026-08-05 19:15:08 +08:00
Nicholas-Xiong
ee3d3da1c5 fix: redact short credentials in CLI diagnostics (#2118)
* fix: redact short credentials in CLI diagnostics

* fix(review-feedback-2111): Redact indented values under empty sensitive YAML fields and preserve

* fix: close structured diagnostic redaction gaps

* fix(review-feedback-2111): Treat comment-only YAML values as empty blocks and Redact indentless

* fix: redact YAML node property blocks

* fix: redact normalized proxy authorization fields

* fix: close multiline diagnostic redaction gaps

* fix: redact spaced credential labels

* fix(review-feedback-2111): Consume YAML blocks with node properties

* fix: include registered spaced credential labels

* fix: close remaining structured redaction gaps

* fix: redact shell words and explicit YAML mappings

* fix: redact single-quoted structured keys

* fix: redact shell append assignments

* fix: redact quoted YAML explicit keys

* fix(review-feedback-2111): add suffix text or drop segments from the env name, such as DeepSeek

* fix(review-feedback-2111): trimming the new docs/CHANGELOG

* fix(review-feedback-2111): update the PR description's verification counts/ranges to match the

* fix(review-feedback-2111): 评审结论 - 代码检查 :当前整个 PR 仍有 1 个未关闭的高置信度代码 blocker。最新复核摘要:基于

* fix(review-feedback-2111): 补上 helper 级和 non-zero-exit preview 级回归用例,避免文档与运行时行为再次漂移

* fix(review-feedback-2111): add focused helper-level and non-zero-exit preview regressions for

* fix(review-feedback-2111): 评审结论 - 代码检查 :当前整个 PR 仍有 1 个未关闭的高置信度代码 blocker。最新复核摘要:On the current

* fix(review-feedback-2111): update the PR description's reported current head from 27a013fbf to

* fix: redact sensitive env names embedded inside command substitutions across multi-segment diagnostics

- 覆盖 OPENAI_API_KEY=sk-12345 这种首段为非敏感赋值、值里又嵌敏感名的情况
- 当 $(...) 的前置赋值是敏感名时跳过尾扫避免双重改写,非敏感名仍需进入尾扫
- 新增测试覆盖多段 + 同函数敏感+非敏感赋值的复合诊断文本
- 使用 [A-Z][A-Z0-9_]* token 扫描找到 ALL  中的敏感 env 名引用

* fix(review-2111): redact export SENSITIVE=$(...) without dropping trailing fields

Round-3 review blocker closure for PR #2118 (issue #1784):

OR-COR-7c0a5d41 — the form

    export SENSITIVE_ENV=$(printenv OTHER_SECRET) session_id=dup1 token_budget=1000

previously lost ``session_id=dup1`` (case 1) and ALL trailing fields
(case 2 with ``echo OPENAI_API_KEY=sk-12345``) because the second-pass
``$(...)`` scan re-added the same span that the first pass had already
replaced, and ``_replace_spans`` silently dropped the duplicated
region's width worth of trailing characters.

Two fixes:

1. Track first-pass sensitive-assignment replacement spans
   (``first_pass_spans``) and skip any ``$(...)`` whose start lies
   inside one of those spans. This is the principled guard against
   the overlap regardless of where the leading assignment sits.
   Previously the second-pass computed a "prior prefix" via three
   independent regex branches (semicolon-separated / newline-
   separated / head-of-string), each of which only matched bare
   ``NAME=`` — so ``export NAME=`` slipped through and the second
   pass double-rewrote the same span.

2. Add ``(?:export[ \t]+)?`` to all three prior-prefix regexes so
   that even if the first-pass span guard were ever evaded, the
   leading ``export SENSITIVE=`` would still be recognised and the
   second pass would skip the inner ``$(...)``.

Regression tests cover the two exact reproductions from the review
(``session_id=dup1 token_budget=1000`` and ``session_id=dup3``), plus
a non-``export`` control case to lock in the existing behaviour. Full
``tests/test_local_cli_backend.py`` passes 363/363; the ``tests/test_stock_*``
subset is unaffected (460 passed across the CLI + stock subset).

---------

Co-authored-by: zhulinsen <zhuls97@163.com>
Co-authored-by: xxiaoxiong <xxiaoxiong@nicholasxiong.cn>
2026-07-30 22:49:54 +08:00
Alfred
628c5b6ef7 feat: add Codex App Server agent prototype (#2004) 2026-07-19 16:31:54 +08:00
Alfred
aa513135d6 feat: add internal DSA tool surface (#1943) 2026-07-08 22:12:24 +08:00
Alfred
7b39b73b9d feat: add generation backend status diagnostics (#1883) 2026-07-03 19:34:43 +08:00
Alfred
4c678850e2 feat: add Claude Code and OpenCode generation backends (#1850)
Co-authored-by: zhulinsen <42829555+ZhuLinsen@users.noreply.github.com>
2026-06-30 22:33:02 +08:00
Alfred
6cd64dc382 fix: surface Codex CLI desktop backend path diagnostics (#1857)
Co-authored-by: zhulinsen <42829555+ZhuLinsen@users.noreply.github.com>
2026-06-30 19:07:05 +08:00
Alfred
62adb5c4ee feat: add Hermes local HTTP generation (#1824) 2026-06-28 17:02:17 +08:00
Alfred
1f91024dec feat: 新增 codex_cli 本地生成后端 Phase2 (#1769)
* feat: add codex cli generation backend

* fix: harden local CLI backend phase 2

* fix: harden local cli output file handling

* fix: tighten codex cli backend contracts

* fix: support codex cli windows smoke path

* fix: make local cli tests portable on windows

* fix: avoid duplicate codex final output accounting
2026-06-24 20:19:19 +08:00
Alfred
2f75e832e3 feat: 添加 GenerationBackend Phase 1 抽象 (#1751)
* feat: add generation backend abstraction

* fix: tighten generation backend phase1 contract

* fix: preserve market review backend config errors
2026-06-22 22:42:53 +08:00
Alfred
df09b7ccf4 feat: add provider prompt cache controls (#1744) 2026-06-22 20:50:54 +08:00
Alfred
cc98a26cf1 feat: add legacy message stability audit (#1716) 2026-06-19 09:44:09 +08:00
Alfred
4fa81a421c feat: add legacy LLM usage telemetry (#1698) 2026-06-17 18:46:01 +08:00
Alfred
0bb515cc5e fix: 问股 single-agent 增加 provider-aware trace (#1473)
* fix: add provider-aware trace for ask chat

* fix: drop mismatched provider trace attempts
2026-05-26 19:13:05 +08:00
Alfred
3aa26ba7d8 feat: add visible chat context compression (#1460)
Co-authored-by: mumu <42829555+ZhuLinsen@users.noreply.github.com>
2026-05-25 20:31:20 +08:00
mumu
6684e327dd chore: prioritize daily analysis workflow (#1373) 2026-05-20 22:24:44 +08:00
mumu
4aad40cdd4 fix: 增强 LLM 参数适配层 (#1317)
* fix: add llm generation parameter adaptation

* fix(review-feedback-1317): 补充官方来源链接或明确写成基于当前兼容测试的保守策略,并说明验证环境

* fix(review-feedback-1317): 补充官方文档/公告链接、当前依赖/运行时验证依据,以及 provider override 的预期扩展方式

* feat: 增强 LLM 参数错误自愈 (#1318)

* fix: add llm generation parameter adaptation

* fix: add llm parameter error recovery

* fix(review-feedback-1318): Scope recovery cache to the endpoint and making recovery caching

* fix(review-feedback-1318): Avoid forcing 1.0 for all default-only temperature errors

* fix(review-feedback-1318): 基于目标分支解决冲突,并确保解决后 diff 仍只包含本 PR 声称的 LLM 参数自愈增量

* fix(review-feedback-1318): Scope legacy Router recoveries to their endpoint

* fix(review-feedback-1318): 解决冲突并基于解决后的最终 diff 重新确认测试结果

* fix(review-feedback-1318): 基于目标 base 解决冲突,再重新确认 diff 与 CI

* fix(review-feedback-1318): 解决冲突后重新确认 diff 与 CI

* fix(review-feedback-1318): 补充覆盖 Analyzer legacy multi-key Router 的回归测试
2026-05-16 21:31:28 +08:00
mumu
fef9dfca68 feat: expose env config backup in web settings (#1253)
* feat: expose env config backup in web settings
2026-05-10 19:03:47 +08:00
mumu
7d44cd0fa7 docs: remove transient PR notes (#1255) 2026-05-10 15:17:41 +08:00
Alfred
30fdb59370 fix: 修正 LLM 渠道测试请求被拦截误报为网络异常 (#1223) (#1225)
* fix: classify blocked LLM channel tests (#1223)

* fix: avoid firewall blocked false positives (#1223)
2026-05-08 20:23:44 +08:00
Alfred
fb6c71a240 fix: 修正 LLM Model disabled 诊断 (#1208) (#1211)
* fix: improve LLM model-disabled diagnostics (#1208)

* docs: clarify model disabled diagnostic scope (#1208)

* docs: add SiliconFlow model disabled evidence (#1208)
2026-05-07 22:55:24 +08:00
mumu
629335852e docs: Clean root helper files (#1203)
* chore: clean root helper files

* fix: forward quick smoke args
2026-05-06 18:44:39 +08:00
mumu
88d8ffbf81 Relax LiteLLM version constraint (#1201)
* chore: relax litellm version constraint

* chore: cap litellm constraint to 1.x
2026-05-05 22:49:21 +08:00
Alfred
762c6553c5 docs: improve LLM provider guide for issue 1180 (#1198)
Co-authored-by: mumu <42829555+ZhuLinsen@users.noreply.github.com>
2026-05-05 21:22:14 +08:00
Alfred
fa1e00eb8a feat: 增强 Web LLM 配置检测与错误分类 P3 (#1180) (#1196)
* feat: enhance LLM channel diagnostics

* fix: harden LLM diagnostics edge cases

* docs: clarify LLM capability smoke boundaries
2026-05-05 14:41:11 +08:00
mumu
695365b3d8 feat: add Anspire Open LLM support (#1193)
* feat: add Anspire Open LLM support
2026-05-04 23:53:22 +08:00
mumu
d0ff7abb14 chore: land #1180 P1 LLM Actions mapping (#1190)
* chore: 补齐 LLM Actions 映射与模板校准 P1 (#1180) (#1186)

* chore: align LLM channel Actions mapping (#1180)

* docs: prefer validated OpenRouter default (#1180)

* fix(review-feedback-1190): address latest review comments

---------

Co-authored-by: Alfred <massif0601@gmail.com>
2026-05-03 21:58:03 +08:00
mumu
05954d7cd2 fix: clean stale LLM runtime selections on save (#1152)
* fix: auto-clear stale LLM runtime selections

* docs: clarify direct provider retention examples
2026-05-03 20:29:17 +08:00
mumu
205795a325 feat: add LLM provider setup templates and presets (#1175)
* feat(issue-1172): dsa-后续开发规划:配置、通知告警、复盘红绿灯、bot-交互与-agent-增

* fix: address review feedback for MiniMax preset and agent timeout test

- Update MiniMax preset to official OpenAI-compatible base URL (api.minimaxi.com/v1)
  and current model examples (MiniMax-M2.7), with official source links in
  .env.example and docs/llm-providers.md.
- Add provenance + LiteLLM compatibility notes and rollback guidance in
  docs/llm-providers.md.
- Fix flaky test_llm_call_receives_remaining_timeout_budget by patching
  src.agent.runner.time.time so the remaining timeout budget is deterministic.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix(review-feedback-1175): address latest review comments

* Update LLM provider defaults

* Fix agent model fallback test
2026-05-02 22:19:42 +08:00
mumu
7711e9bf5f fix: 修复 task_queue、持仓估值与 LLM 诊断 (#1124) (#1146)
* fix(issue-1124): [bug]-修复-task_queue-测试、持仓盈亏漂移与-llm-连通性诊断
2026-05-01 13:30:16 +08:00
mumu
dfc4f92512 feat: add read-only setup status endpoint (#1162) 2026-04-30 23:04:00 +08:00
mumu
260fe06f08 fix: 最小化修复问股链路在 macOS 本地环境下的失败反馈:优先保留后端真实错误原因并补足… (#1138) (#1139)
* fix(issue-1138): [bug]-macos-26操作系统环境下,搭建完成后,问股页面反馈“问股执行失败
2026-04-28 22:02:55 +08:00
mumu
4574c52b04 [fix] Support Kimi K2.6 fixed temperature (#1113)
* Fix Kimi K2.6 temperature compatibility
2026-04-25 22:46:53 +08:00
Alfred
9a08ba47fa [fix][feat] #1108 #1109: 同步 DeepSeek V4 渠道配置 (#1110)
* fix: align DeepSeek V4 channel config

* fix: preserve DeepSeek legacy default

---------

Co-authored-by: zhulinsen <zhuls97@163.com>
2026-04-25 18:50:42 +08:00
mumu
826c340c28 [fix] Map LLM channel envs in daily analysis workflow (#1112)
* Fix GitHub Actions LLM channel env mapping
2026-04-25 10:23:36 +08:00
mumu
706879fd32 feat: 支持/v1/models路径获取所有支持模型 (#830) (#919)
* feat(issue-830): [feature]-支持/v1/models路径获取所有支持模型
2026-04-04 16:49:22 +08:00
mumu
65fe0446aa feat: 隐藏 LiteLLM 实现细节,简化用户侧模型接入体验 (#875) (#925)
* chore(issue-875): [feature]-隐藏-litellm-实现细节,简化用户侧模型接入体验
2026-04-01 16:02:07 +08:00
mumu
520521a524 feat: release的win客户端不能用minimax模型 (#826) (#917)
* feat(issue-826): [feature]-release的win客户端不能用minimax模型
2026-03-31 17:43:01 +08:00
Alfred
38d7ab5b5a docs: add Ollama local model configuration guide (Fixes #690) (#744)
* docs: add Ollama local model configuration guide (Fixes #690)

- Add Example 4 and channel mode example in LLM_CONFIG_GUIDE
- Add OLLAMA_API_BASE to .env.example and full-guide
- Add Ollama entry to litellm_config.example.yaml
- Add Q12b to FAQ (CN/EN)
- Add troubleshooting row for Ollama 404 / api/generate/api/show
- Update CHANGELOG

Made-with: Cursor

* docs: sync README with Ollama config per AGENTS.md (address review)

- Add Ollama to AI models list in README.md
- Add OLLAMA_API_BASE to Secrets table with link to config guide
- Add pitfall note: do not use OPENAI_BASE_URL for Ollama
- Sync docs/README_EN.md with same changes
- Update CHANGELOG to mention README sync

Made-with: Cursor

* docs: add OLLAMA_API_BASE to full-guide env table and note (address review)

* docs: remove duplicate OLLAMA_API_BASE entries in full-guide (address review)
2026-03-18 22:37:52 +08:00
Alfred
216a77f6a2 fix: decouple agent and analysis primary models (#692) (#741)
* fix #692: decouple agent and analysis primary model selection

* fix #692: preserve yaml alias for agent primary model

* docs #692: sync agent primary model in EN/CHT readmes
2026-03-18 19:08:36 +08:00
Elvis Wang
53f0fc7253 ci(workflow): support litellm_config.yaml in GitHub Actions (#581)
* ci(workflow): support litellm_config.yaml in GitHub Actions

- add LITELLM_CONFIG, LITELLM_API_KEY, LITELLM_MODEL environment variables
- add LiteLLM configuration check in workflow diagnostics
- add siliconflow provider example in litellm_config.example.yaml

* feat(ci): support litellm_config.yaml in GitHub Actions

- add LITELLM_CONFIG, LITELLM_API_KEY, LITELLM_MODEL env vars to workflow
- enhance LiteLLM configuration status check in workflow diagnostics
- improve LITELLM_MODEL variable spacing for readability
- update CHANGELOG.md to document new GitHub Actions configuration support

* feat(ci): enable litellm_config.yaml injection from GitHub Actions Secrets

- add LITELLM_CONFIG_YAML environment variable support in workflow
- implement automatic config file creation from Secrets/Variables content
- update docs/LLM_CONFIG_GUIDE.md with GitHub Actions YAML configuration guide
- update README.md to mention YAML advanced configuration for GitHub Actions
- add explanatory comments to litellm_config.example.yaml

* docs: fix numbering and update model field requirements

- correct step numbers from 3 to 2 in configuration instructions
- move LITELLM_MODEL to required section and reorder in table
- update LITELLM_MODEL from optional to required field

* docs(changelog): clarify LiteLLM config injection methods

- add LITELLM_CONFIG_YAML variable description
- explain both file commit and secret injection methods
- provide more detailed configuration options
2026-03-11 23:17:48 +08:00
Alfred
537f23b578 docs: Refactor LLM config guide for better clarity and accessibility (#545) (#583) 2026-03-11 13:11:54 +08:00
Alfred
9153a83c34 docs: 新增 LLM 配置指南,系统讲解三层配置、渠道模式、Vision、Agent、排错 (#545)
- 新增 docs/LLM_CONFIG_GUIDE.md(中文)与 docs/LLM_CONFIG_GUIDE_EN.md(英文)
- 更新 README、full-guide、.env.example、litellm_config.example.yaml 增加指南链接
- full-guide 环境变量表补充 LITELLM_MODEL、LITELLM_FALLBACK_MODELS、LLM_CHANNELS、LITELLM_CONFIG
- full-guide_EN 同步 LiteLLM 直接集成章节与 AI 表
- FAQ 与 FAQ_EN 增加 LLM 配置常见问题
- CHANGELOG 记录本次文档更新
2026-03-08 16:18:33 +08:00