Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .specify/memory/api-naming.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@
## 3. 鉴权与租户透传

- **所有 `/api/v1/admin` 与 `/api/internal` 必须鉴权**
- 租户信息必须通过 token 或 header 解析:
- `tenant_uuid` / `X-PowerX-Tenant`
- 租户信息必须通过 token(JWT claims)或 `tenant_uuid` 字段解析,不接受遗留租户头注入。
- 内部接口也需 tenant 校验,禁止跨租户调用

---
Expand Down
3 changes: 1 addition & 2 deletions .specify/memory/dev_crud_grpc_guides.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ internal/transport/grpc/

### 5.1 绑定/校验

* **tenant 提取**:优先读 `RequestContext.tenant_id`,其次从 Metadata 头 `x-powerx-tenant-id|tenant-id|x-tenant-id` 兜底
* **tenant 提取**:优先读 `RequestContext.tenant_id`,其次仅从 Metadata `tenant-id` 兜底(不接受任何 `x-powerx-*` 遗留租户头)
你的 `tenantIDFrom()` 已经实现这一落地逻辑。
* **分页映射**:`PageRequest(offset,page_size)` → `(page,size)` 的换算统一用工具函数(如 `pageFrom()`)。
* **错误回包**:Meta 中返回 `code/message/request_id`,与你的 `okMeta/badMeta` 一致(见 `member_handler.go`/`team_handler.go` 调用)。
Expand Down Expand Up @@ -140,4 +140,3 @@ internal/transport/grpc/
* [ ] **与 HTTP 等价**:同一用例在 HTTP 与 gRPC 的语义、错误、分页完全可对照。

---

9 changes: 6 additions & 3 deletions backend/config/agents/providers.d/anthropic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ drivers:
llm: anthropic
embedding: anthropic
image: anthropic
audio: anthropic
audio_tts: anthropic
audio_asr: anthropic
video: anthropic
rerank: anthropic

Expand Down Expand Up @@ -49,9 +50,11 @@ modalities:
models: [] # 有 Embeddings 能力,但当前以 Messages API 为主;如需可后续补充
image:
models: []
audio:
audio_tts:
models: []
audio_asr:
models: []
video:
models: []
rerank:
models: []
models: []
7 changes: 5 additions & 2 deletions backend/config/agents/providers.d/baidu_wenxin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ drivers:
llm: baidu
embedding: baidu
image: baidu
audio: baidu
audio_tts: baidu
audio_asr: baidu
video: baidu
rerank: baidu

Expand Down Expand Up @@ -79,7 +80,9 @@ modalities:
# 官方未公开统一维度,这里不写 dims,避免类型不符
image:
models: []
audio:
audio_tts:
models: []
audio_asr:
models: []
video:
models: []
Expand Down
4 changes: 4 additions & 0 deletions backend/config/agents/providers.d/comfyui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ modalities:
video:
note: "ComfyUI Video(UI 目录占位)。"
models: []
audio_tts:
models: []
audio_asr:
models: []
9 changes: 6 additions & 3 deletions backend/config/agents/providers.d/coze.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ drivers:
llm: coze
embedding: coze
image: coze
audio: coze
audio_tts: coze
audio_asr: coze
video: coze
rerank: coze

Expand Down Expand Up @@ -35,9 +36,11 @@ modalities:
models: [] # 如你的 driver 支持 Coze 向量服务,可在此处补充
image:
models: []
audio:
audio_tts:
models: []
audio_asr:
models: []
video:
models: []
rerank:
models: []
models: []
9 changes: 6 additions & 3 deletions backend/config/agents/providers.d/deepseek.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ drivers:
llm: deepseek
embedding: deepseek
image: deepseek
audio: deepseek
audio_tts: deepseek
audio_asr: deepseek
video: deepseek
rerank: deepseek

Expand All @@ -31,9 +32,11 @@ modalities:
models: [] # 暂未公开官方 Embedding API
image:
models: []
audio:
audio_tts:
models: []
audio_asr:
models: []
video:
models: []
rerank:
models: []
models: []
4 changes: 4 additions & 0 deletions backend/config/agents/providers.d/google.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@ modalities:
- id: gemini-3-pro-image-preview
label: "Gemini 3 Pro Image Preview (Nano Banana Pro)"
tags: ["image", "high-quality"]
audio_tts:
models: []
audio_asr:
models: []
4 changes: 4 additions & 0 deletions backend/config/agents/providers.d/hash.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ modalities:
tags: ["local","dev","non-semantic"]
defaults:
dimensions: 1536
audio_tts:
models: []
audio_asr:
models: []
13 changes: 8 additions & 5 deletions backend/config/agents/providers.d/huggingface.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ drivers:
llm: huggingface
embedding: huggingface
image: huggingface
audio: huggingface
audio_tts: huggingface
audio_asr: huggingface
video: huggingface
rerank: huggingface

Expand Down Expand Up @@ -81,14 +82,16 @@ modalities:
- id: stabilityai/stable-diffusion-2
label: "Stable Diffusion 2 (text-to-image)"
tags: ["img-gen","open"]
audio:
audio_tts:
models:
- id: openai/whisper-large-v3
label: "Whisper Large v3 (ASR)"
tags: ["asr","open"]
- id: coqui/XTTS-v2
label: "Coqui XTTS v2 (TTS)"
tags: ["tts","multilingual"]
audio_asr:
models:
- id: openai/whisper-large-v3
label: "Whisper Large v3 (ASR)"
tags: ["asr","open"]
video:
models: []
rerank:
Expand Down
6 changes: 6 additions & 0 deletions backend/config/agents/providers.d/hunyuan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,9 @@ modalities:
- id: hunyuan-video
label: "混元 视频生成 (placeholder)"
tags: ["video","tencent","placeholder"]

audio_tts:
models: []

audio_asr:
models: []
9 changes: 6 additions & 3 deletions backend/config/agents/providers.d/moonshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ drivers:
llm: moonshot
embedding: moonshot
image: moonshot
audio: moonshot
audio_tts: moonshot
audio_asr: moonshot
video: moonshot
rerank: moonshot

Expand Down Expand Up @@ -39,9 +40,11 @@ modalities:
models: [] # 官方暂未公开独立 Embedding API
image:
models: []
audio:
audio_tts:
models: []
audio_asr:
models: []
video:
models: []
rerank:
models: []
models: []
7 changes: 5 additions & 2 deletions backend/config/agents/providers.d/openai.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ drivers:
llm: openai
embedding: openai
image: openai
audio: openai
audio_tts: openai
audio_asr: openai
video: openai
rerank: openai

Expand Down Expand Up @@ -97,11 +98,13 @@ modalities:
label: "DALL·E 2"
tags: ["img-gen","legacy"]

audio:
audio_tts:
models:
- id: gpt-4o-mini-tts
label: "GPT-4o mini TTS"
tags: ["audio","tts","expressive"]
audio_asr:
models:
- id: gpt-4o-transcribe
label: "GPT-4o Transcribe"
tags: ["audio","asr","multilingual"]
Expand Down
4 changes: 4 additions & 0 deletions backend/config/agents/providers.d/openai_compatible.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ modalities:
- id: "*"
label: "Any (OpenAI-compatible)"
tags: ["local","gateway"]
audio_tts:
models: []
audio_asr:
models: []
51 changes: 51 additions & 0 deletions backend/config/agents/providers.d/qwen-cn.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
id: qwen-cn
name: Qwen(官方国内)
aliases: ["qwen-mainland", "tongyi-cn", "dashscope-cn", "alibaba-cn"]

drivers:
image: qwen
audio_tts: qwen

auth:
scheme: bearer
fields: ["api_key", "base_url"]
defaults:
base_url: "https://dashscope.aliyuncs.com/compatible-mode/v1"

modalities:
image:
models:
- id: qwen-vl-max-latest
label: "Qwen VL Max Latest"
- id: qwen-vl-plus-latest
label: "Qwen VL Plus Latest"
- id: qwen-vl-max
label: "Qwen VL Max"
- id: qwen-vl-plus
label: "Qwen VL Plus"
- id: qwen3-vl-plus
label: "Qwen3 VL Plus"
- id: qwen3-vl-flash
label: "Qwen3 VL Flash"
- id: qwen2.5-vl-72b-instruct
label: "Qwen 2.5 VL 72B Instruct"
- id: "*"
label: "Qwen VLM (Any)"
audio_tts:
models:
- id: qwen-tts-latest
label: "Qwen TTS Latest"
- id: qwen-tts-1
label: "Qwen TTS 1"
- id: qwen3-tts-flash
label: "Qwen3 TTS Flash"
- id: qwen3-tts-instruct-flash
label: "Qwen3 TTS Instruct Flash"
- id: qwen3-tts-vd
label: "Qwen3 TTS VD"
- id: qwen3-tts-vc
label: "Qwen3 TTS VC"
- id: "*"
label: "Qwen TTS (Any)"
audio_asr:
models: []
51 changes: 51 additions & 0 deletions backend/config/agents/providers.d/qwen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
id: qwen-intl
name: Qwen(官方国际)
aliases: ["qwen", "tongyi", "dashscope", "alibaba"]

drivers:
image: qwen
audio_tts: qwen

auth:
scheme: bearer
fields: ["api_key", "base_url"]
defaults:
base_url: "https://dashscope-intl.aliyuncs.com/compatible-mode/v1"

modalities:
image:
models:
- id: qwen-vl-max-latest
label: "Qwen VL Max Latest"
- id: qwen-vl-plus-latest
label: "Qwen VL Plus Latest"
- id: qwen-vl-max
label: "Qwen VL Max"
- id: qwen-vl-plus
label: "Qwen VL Plus"
- id: qwen3-vl-plus
label: "Qwen3 VL Plus"
- id: qwen3-vl-flash
label: "Qwen3 VL Flash"
- id: qwen2.5-vl-72b-instruct
label: "Qwen 2.5 VL 72B Instruct"
- id: "*"
label: "Qwen VLM (Any)"
audio_tts:
models:
- id: qwen-tts-latest
label: "Qwen TTS Latest"
- id: qwen-tts-1
label: "Qwen TTS 1"
- id: qwen3-tts-flash
label: "Qwen3 TTS Flash"
- id: qwen3-tts-instruct-flash
label: "Qwen3 TTS Instruct Flash"
- id: qwen3-tts-vd
label: "Qwen3 TTS VD"
- id: qwen3-tts-vc
label: "Qwen3 TTS VC"
- id: "*"
label: "Qwen TTS (Any)"
audio_asr:
models: []
9 changes: 6 additions & 3 deletions backend/config/agents/providers.d/sentence-transformers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ drivers:
llm: sentence_transformers
embedding: sentence_transformers
image: sentence_transformers
audio: sentence_transformers
audio_tts: sentence_transformers
audio_asr: sentence_transformers
video: sentence_transformers
rerank: sentence_transformers

Expand Down Expand Up @@ -39,7 +40,9 @@ modalities:
limits: { dims: 384 }
image:
models: []
audio:
audio_tts:
models: []
audio_asr:
models: []
video:
models: []
Expand All @@ -50,4 +53,4 @@ modalities:
tags: ["rerank","fast"]
- id: cross-encoder/ms-marco-MiniLM-L-12-v2
label: "MS MARCO MiniLM-L-12 (Cross-Encoder)"
tags: ["rerank","accurate"]
tags: ["rerank","accurate"]
Loading