Skip to content

fix(webui): add skillhub proxy to resolve 404#581

Merged
yaozheng-fang merged 2 commits into
volcengine:mainfrom
FirstayZheng:fix/skillhub-proxy-404
Jun 5, 2026
Merged

fix(webui): add skillhub proxy to resolve 404#581
yaozheng-fang merged 2 commits into
volcengine:mainfrom
FirstayZheng:fix/skillhub-proxy-404

Conversation

@FirstayZheng
Copy link
Copy Markdown
Contributor

@FirstayZheng FirstayZheng commented Jun 5, 2026

Summary

修复生产环境下技能搜索返回 404 的问题,通过在 FastAPI 后端添加 /skillhub 代理路由。

Bug Description

用户在自定义创建 Agent 时使用技能搜索功能,所有请求返回 404 错误。开发环境(Vite dev server)正常工作,但生产环境(veadk frontend 命令)出现问题。

Root Cause:

  • 开发环境: Vite 配置了 /skillhub 代理到 https://skills.volces.com
  • 生产环境: FastAPI 后端缺少对应的代理路由
  • Volcengine Skill Hub API 不支持 CORS,必须通过服务端代理访问

Changes

  • veadk/cli/cli_frontend.py: 添加 /skillhub/{path:path} 代理路由
    • 使用 httpx.AsyncClient 异步转发请求到 https://skills.volces.com
    • 支持 GET/POST/PUT/DELETE/PATCH 方法
    • 保留原始请求头和查询参数
    • 30 秒超时防止挂起
  • veadk/cli/cli_frontend.py: 在 OAuth2 exempt_prefixes 中添加 /skillhub(未登录用户也可搜索技能)

Testing

✅ 技能搜索功能恢复正常(搜索"画图"、"PDF"等关键词返回结果列表)
✅ 其他 API 路由不受影响
✅ OAuth2 登录流程正常
✅ 静态资源和 WebSocket 连接正常

@yaozheng-fang yaozheng-fang merged commit 88dbef6 into volcengine:main Jun 5, 2026
5 checks passed
@FirstayZheng FirstayZheng deleted the fix/skillhub-proxy-404 branch June 5, 2026 06:30
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.

2 participants