- 修复了 qwen 图像测试报 unknown image provider:PingImage 现在按 drivers.image 分…#360
Merged
Matrix-X merged 3 commits intodev/michaelhufrom Mar 4, 2026
Merged
- 修复了 qwen 图像测试报 unknown image provider:PingImage 现在按 drivers.image 分…#360Matrix-X merged 3 commits intodev/michaelhufrom
Matrix-X merged 3 commits intodev/michaelhufrom
Conversation
…流,qwen 走 VLM 驱动真实探活。
- 修复了 Qwen 默认接入地址体验:前端会自动回填 provider 默认 base_url,不再要求手填。
- 支持了 Qwen 国内/国际双 provider:
- qwen-intl(默认 dashscope-intl)
- qwen-cn(默认 dashscope)
并保留 qwen -> qwen-intl 别名兼容。
- 统一了运行时驱动映射:AI service 调用 image/vlm/video/tts 时按 provider manifest 的 drivers 路由,避免 provider 别名导致 unknown driver。
- 优化了测试失败展示:默认显示简洁错误,不再把整段 JSON 原样暴露;新增“查看技术详情”折叠区。
- 新增管理接口:
- GET /api/v1/admin/capabilities/sources(source 枚举/别名/默认值)
- GET /api/v1/admin/gateway/meta(base_url、api_prefix、auth schemes、示例路径)
- 统一了 platform-capabilities 的分页行为:支持 page/page_size 并返回分页字段。
- 文档对齐更新:
- docs/guides/develop/gateway_contract.md(新增,路由+认证契约)
- docs/guides/develop/api_key_token_playbook.md(补 source 定义、接口选型、新增接口说明)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 62c9375925
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- 在 service.go 的 ImageInvoke 中新增分流:
- 若 resolveProviderDriver(provider, "image") == "qwen",直接走 VLMInvoke
- 不再进入 imagefactory.NewClient("qwen")
这样 /ai/image/invoke 使用 qwen-intl/qwen-cn 时不会再报 unknown image provider。
已验证:
- go test ./internal/service/ai ./internal/transport/http/openapi/ai ./internal/server/ai/factory/image ./internal/server/ai/factory/vlm ./internal/
server/ai/drivers/qwen 通过。
- 租户判定收敛为“只信凭证上下文”:只用 JWT claims / ApiKey 注入的 tenant。
- 删除 /api/v1/tenant/invocations 对 body tenant_uuid 的 mismatch 拒绝逻辑。
- 清理生产代码里通过 header/query 注入 tenant 的入口(核心链路):
- 移除 JWT as_tenant_uuid 代理入口。
- plugin_release local install 不再读 tenant_uuid/tenantUuid query。
- admin/integration_gateway(routes + apikey 管理)不再从 body/query 取 tenant,统一从 reqctx 取。
- admin/dev_hotload list/clear 会话改为只用 reqctx tenant。
- admin/capability_registry/catalog tenant 过滤改为 reqctx tenant。
- admin/event_fabric/directory 强制当前 tenant,不再读 query tenant。
- admin/agent/tenant_handlers 列表接口不再读 query tenant。
- admin/iam/rbac 的 check 不再支持 query tenant 覆盖。
关键文件
- tenant_handler.go
- jwt.go
- local_install_handler.go
- handler.go
- apikey_handler.go
- routes.go
- catalog_handler.go
- directory_handler.go
- tenant_handlers.go
- rbac_handler.go
验证结果
- 生产代码扫描:
- Header.Get/Set(...tenant...):0 命中
- c.Query("tenant_uuid"/"tenantUuid"/"as_tenant_uuid"):0 命中(剩余仅模型字段字符串,不是取参逻辑)
- 编译回归通过(受影响包 go test ... -run TestDoesNotExist 全通过)。
你最新这段日志的结论
- 后端调用成功:POST /tenant/invocations 200,内部 GET /media/assets 200。
- “没有订阅者”是事件总线提示,不是业务失败。
- 插件侧若仍报错,问题应在插件对返回体/日志的判定逻辑,不在这条后端链路。
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.
…流,qwen 走 VLM 驱动真实探活。