mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-06-29 15:31:05 +08:00
## Summary - Fixes **Tongyi-Qianwen** (`QWenEmbed`) text embeddings when the configured `base_url` points at DashScope **international** (`dashscope-intl.aliyuncs.com`) or **China** (`dashscope.aliyuncs.com`) hosts, including values copied from Model Studio that use the **OpenAI-compatible** path (`.../compatible-mode/v1`). - The `dashscope` Python SDK (`TextEmbedding.call`) expects the **native** HTTP root (`https://<host>/api/v1`), not the OpenAI-compatible base URL. Without mapping, international accounts could hit the wrong host or path. ## Implementation - Added `_dashscope_native_http_api_url()` to normalize known DashScope hosts to `.../api/v1`, and wired `QWenEmbed` to set `dashscope.base_http_api_url` before each embedding call (document and query). ## Notes - In-code comments document the Tongyi-Qianwen / DashScope intl vs CN behavior for future maintainers. --------- Co-authored-by: Cursor <cursoragent@cursor.com>
3.9 KiB
3.9 KiB