'添加七牛云API支持'#691
Open
wszqj2018 wants to merge 1 commit into
Open
Conversation
echopoison0712
pushed a commit
to echopoison0712/TradingAgents-CN
that referenced
this pull request
Jun 8, 2026
…g#694) * fix: 修复港股代码全链路支持,避免误走 A 股路径 (Fixes hsliuping#629, Fixes hsliuping#691) - validation.ts: 新增 /^HK\d{5}$/ 港股前缀格式校验,修复 Web 端 HK01810 被拒问题 - base.py: normalize_stock_code 支持 1810.HK / hk1810 归一为 HK01810; _is_hk_market 精确匹配 HK+纯数字,防止误匹配; DataFetcherManager.get_realtime_quote 新增港股专用快速路径, 直接调用 akshare_hk,不再按 A 股 source_priority 多次尝试 - tushare_fetcher.py: 四处方法(_convert_stock_code / _fetch_raw_data / get_realtime_quote / get_stock_name)增加 HK 早退,避免港股误走深市 - baostock_fetcher.py: 两处方法增加 HK 早退,防止生成 sz.HK01810 等无效请求 - pytdx_fetcher.py: 两处方法增加 HK 早退,规避 36 秒连接超时 - akshare_fetcher.py: get_chip_distribution 增加 HK 早退(stock_cyq_em 仅支持 A 股) - data_tools.py: DataFetcherManager 改为 singleton,避免每次工具调用重置熔断器; get_realtime_quote 失败时返回 retriable=false,阻止 LLM 重试 - runner.py: 新增工具调用非兼容缓存(non_retriable_tool_results), HK 代码不同写法(HK01810 / 1810.HK)共享同一缓存 key - tests: 新增 test_hk_realtime_routing.py;补充 test_stock_code_bse / test_agent_executor * fix: reset agent fetcher singleton on config reload * fix: align web hk validation with backend formats
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request 模板
📋 PR 类型
请标记此 PR 的类型:
📖 PR 描述
变更摘要
变更详情
相关 Issue
🤖 LLM 适配器集成检查清单
✅ 代码实现检查
适配器类实现
OpenAICompatibleBase的适配器类provider_name、api_key_env_var、base_url注册和集成
OPENAI_COMPATIBLE_PROVIDERS字典中注册了提供商__init__.py中添加了适配器导出sidebar.py中添加了提供商选项环境变量配置
.env.example中添加了 API Key 示例{PROVIDER}_API_KEY格式base_url配置✅ 测试和验证
基础功能测试
工具调用测试
集成测试
性能和稳定性测试
✅ 文档和配置
代码文档
用户文档
📝 测试报告
如果这是 LLM 适配器 PR,请提供以下信息:
提供商信息:
测试结果:
性能指标:
已知问题:
🧪 测试说明
如何测试此 PR
测试环境
破坏性变更
如果包含破坏性变更,请说明:
📊 影响范围
请标记此 PR 影响的组件:
🔗 相关链接
📷 截图/演示
✅ 检查清单
请确认以下项目:
代码质量
测试覆盖
文档更新
安全考虑
性能考虑
🏷️ 标签建议
请为此 PR 建议适当的标签:
enhancement- 新功能或改进bug- Bug 修复documentation- 文档相关refactor- 代码重构performance- 性能优化security- 安全相关llm-adapter- LLM 适配器ui/ux- 用户界面/体验config- 配置相关testing- 测试相关👥 审查者
建议的审查者:
📝 额外说明
感谢您的贡献! 🎉
请确保您已经阅读并遵循了我们的 贡献指南。如果您有任何问题,请随时在 PR 中提问或联系维护者。