Skip to content

Conversation

@mirror58229
Copy link
Contributor

Ⅰ. Describe what this PR did

  1. add default route support for wanx image&video synthesis in model-mapper & model-router
  2. update README.md

Ⅱ. Does this pull request fix one issue?

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@lingma-agents
Copy link

lingma-agents bot commented Jun 17, 2025

🔍 代码审查进行中

⏳ 正在审查

⏰️ 剩余时间:约需数分钟

🔄 分支流向: support-wanx-modelmain

📦 提交: 审查当前PR从0b925665927f92的提交。


📒 文件清单 (6 个文件)
📝 变更: 6 个文件

📝 变更文件:

  • plugins/wasm-cpp/extensions/model_mapper/README.md
  • plugins/wasm-cpp/extensions/model_mapper/README_EN.md
  • plugins/wasm-cpp/extensions/model_mapper/plugin.h
  • plugins/wasm-cpp/extensions/model_router/README.md
  • plugins/wasm-cpp/extensions/model_router/README_EN.md
  • plugins/wasm-cpp/extensions/model_router/plugin.h

@lingma-agents
Copy link

lingma-agents bot commented Jun 17, 2025

新增Wanx图像与视频合成的默认路由支持

变更概述

新功能

  • 组件: model-mappermodel-router插件
  • 功能描述: 扩展了路由生效路径配置,新增对图像合成(/image-synthesis)和视频合成(/video-synthesis)端点的支持
  • 实现细节:
    • enableOnPathSuffix配置项中添加了/image-synthesis/video-synthesis路径后缀
    • 更新了C++结构体ModelMapperConfigRuleModelRouterConfigRule的默认路径数组
    • 允许这些新路径的请求触发模型映射和路由逻辑
  • 意义: 使Wanx模型的图像/视频合成请求能够通过插件进行模型名称映射和路由选择

文档更新

  • 组件: 中英文README文档
  • 内容变更:
    • 修正enableOnPathSuffix的默认路径列表,补充新支持的路径后缀
    • 更新了配置项说明,明确新增路径的生效范围
    • 修正英文文档中不一致的路径配置示例

配置调整

  • 组件: 插件配置结构体
  • 变更内容:
    • enable_on_path_suffix_数组的默认值扩展为包含8个路径后缀(新增2项)
    • 移除了旧版本中遗留的/v1/chat/completions路径配置
变更统计
  • 📁 修改文件: 6 个文件

  • ✅ 新增代码: +8 行

  • ❌ 删除代码: -6 行

变更文件
文件路径 变更说明
plugins/​wasm-cpp/​extensions/​model_​mapper/​README.​md 更新enableOnPathSuffix配置项的默认路径列表和说明
plugins/​wasm-cpp/​extensions/​model_​mapper/​README_​EN.​md 英文文档同步更新路径配置说明
plugins/​wasm-cpp/​extensions/​model_​mapper/​plugin.​h 扩展C++结构体的默认路径数组包含新路径
plugins/​wasm-cpp/​extensions/​model_​router/​README.​md 更新路由插件的路径配置说明
plugins/​wasm-cpp/​extensions/​model_​router/​README_​EN.​md 英文路由插件文档同步路径更新
plugins/​wasm-cpp/​extensions/​model_​router/​plugin.​h 路由插件结构体配置扩展路径列表

💡 小贴士

与 lingma-agents 交流的方式

📜 直接回复评论
直接回复本条评论,lingma-agents 将自动处理您的请求。例如:

  • 在当前代码中添加详细的注释说明。

  • 请详细介绍一下你说的 LRU 改造方案,并使用伪代码加以说明。

📜 在代码行处标记
在文件的特定位置创建评论并 @lingma-agents。例如:

  • @lingma-agents 分析这个方法的性能瓶颈并提供优化建议。

  • @lingma-agents 对这个方法生成优化代码。

📜 在讨论中提问
在任何讨论中 @lingma-agents 来获取帮助。例如:

  • @lingma-agents 请总结上述讨论并提出解决方案。

  • @lingma-agents 请根据讨论内容生成优化代码。

--- ### Added default routing support for Wanx image and video synthesis
Change Overview

New Features

  • Components: model-mapper and model-router plugins
  • Function Description: Extended routing effective path configuration, and added support for image synthesis (/image-synthesis) and video synthesis (/video-synthesis) endpoints
  • Implementation details:
    • Added /image-synchesis and /video-synchesis path suffix in enableOnPathSuffix configuration item
    • Updated default path array for C++ structures ModelMapperConfigRule and ModelRouterConfigRule
    • Allow requests for these new paths to trigger model mapping and routing logic
  • Meaning: Enables the Wanx model's image/video synthesis request to model name mapping and routing through plug-ins

Document Update

  • Component: Chinese and English README Documentation
  • Content Change:
    • Fixed the default path list of enableOnPathSuffix, supplementing the newly supported path suffix
    • Updated configuration item description to clarify the effective scope of newly added paths
    • Fixed inconsistent path configuration example in English documentation

Configuration adjustment

  • Component: Plug-in configuration structure
  • Change content:
    • Extend the default value of the enable_on_path_suffix_ array to contain 8 path suffixes (2 new items)
    • Removed the /v1/chat/completes path configuration left in the old version
Change statistics
  • 📁 Modify files: 6 files

  • ✅ Added code: +8 lines

  • ❌ Delete code: -6 lines

Change file
File path Change instructions
plugins/​wasm-cpp/​extensions/​model_​mapper/​README.​md Update the default path list and description of enableOnPathSuffix configuration item
plugins/​wasm-cpp/​extensions/​model_​mapper/​README_​EN.​md Instructions for synchronous update paths in English documents
plugins/​wasm-cpp/​extensions/​model_​mapper/​plugin.​h The default path array for extending C++ structure contains new paths
plugins/​wasm-cpp/​extensions/​model_​router/​README.​md Update the path configuration instructions for routing plug-in
plugins/​wasm-cpp/​extensions/​model_​router/​README_​EN.​md English routing plug-in document synchronization path update
plugins/​wasm-cpp/​extensions/​model_​router/​plugin.​h Routing plug-in structure configuration extension path list

💡 Tips

How to communicate with lingma-agents

📜 Reply to comments directly
Reply to this comment directly and lingma-agents will automatically process your request. For example:

  • _Add detailed comment description in the current code. _

  • _Please introduce the LRU transformation plan you mentioned in detail and explain it using pseudo-code. _

**📜 Mark ** at line of code
Create comments at a specific location in the file and @lingma-agents. For example:

  • _@lingma-agents Analyze the performance bottlenecks of this method and provide optimization suggestions. _

  • _@lingma-agents Generate optimization code for this method. _

📜 Ask a question during discussion
In any discussion @lingma-agents to get help. For example:

  • _@lingma-agents Please summarize the above discussion and propose solutions. _

  • _@lingma-agents Please generate optimization code based on the discussion content. _

Copy link
Collaborator

@johnlanni johnlanni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@johnlanni johnlanni merged commit c471bb2 into alibaba:main Jun 17, 2025
8 of 9 checks passed
@lingma-agents
Copy link

lingma-agents bot commented Jun 17, 2025

CodeReview流程已终止


CodeReview process has been terminated

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 46.05%. Comparing base (ef31e09) to head (5927f92).
Report is 568 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #2431       +/-   ##
===========================================
+ Coverage   35.91%   46.05%   +10.14%     
===========================================
  Files          69       81       +12     
  Lines       11576    13020     +1444     
===========================================
+ Hits         4157     5996     +1839     
+ Misses       7104     6679      -425     
- Partials      315      345       +30     

see 78 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

erasernoob pushed a commit to erasernoob/higress that referenced this pull request Jun 18, 2025
@lingma-agents lingma-agents bot mentioned this pull request Jul 18, 2025
ink-hz pushed a commit to ink-hz/higress-ai-capability-auth that referenced this pull request Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants