mirror of
https://gitee.com/mateos/mateclaw.git
synced 2026-09-14 11:37:31 +08:00
fix(llm): add text-embedding- prefix to DashScope native model allow-list (#172)
Closes #168 The native DashScope provider exposes both chat and embedding models, but DASHSCOPE_NATIVE_ALLOW_PREFIXES only listed chat families (qwen-/qwen2-/qwen3-/deepseek-/baichuan/yi-/llama). When a user manually added text-embedding-v1/v2/v3/v4 to the dashscope provider, assertModelIdAcceptable() rejected the id because no allow prefix matched. Add 'text-embedding-' to the allow-list and broaden the doc comment from "native chat protocol" to "native protocol (chat or embedding)" so the intent is clear. Discovery probing is chat-based and will still mark embedding entries probeOk=false; surfacing them as discoverable embedding suggestions is a separate follow-up.
This commit is contained in:
parent
e0f66eef25
commit
828ece526e
@ -141,8 +141,8 @@ public class ModelDiscoveryService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Allow-list prefixes for DashScope models that are known to work on the native
|
* Allow-list prefixes for DashScope models that are known to work on the native
|
||||||
* chat protocol. An empty set means "no prefix filter" (we still apply DENY).
|
* protocol (chat or embedding). An empty set means "no prefix filter" (we still
|
||||||
* Extend conservatively as new families are verified.
|
* apply DENY). Extend conservatively as new families are verified.
|
||||||
*/
|
*/
|
||||||
private static final Set<String> DASHSCOPE_NATIVE_ALLOW_PREFIXES = Set.of(
|
private static final Set<String> DASHSCOPE_NATIVE_ALLOW_PREFIXES = Set.of(
|
||||||
"qwen-", // qwen-max / qwen-plus / qwen-turbo / qwen-coder-* / qwen-long
|
"qwen-", // qwen-max / qwen-plus / qwen-turbo / qwen-coder-* / qwen-long
|
||||||
@ -151,7 +151,8 @@ public class ModelDiscoveryService {
|
|||||||
"deepseek-", // deepseek-v3.x / deepseek-r1*
|
"deepseek-", // deepseek-v3.x / deepseek-r1*
|
||||||
"baichuan",
|
"baichuan",
|
||||||
"yi-",
|
"yi-",
|
||||||
"llama"
|
"llama",
|
||||||
|
"text-embedding-" // DashScope embedding models (text-embedding-v1/v2/v3/v4)
|
||||||
);
|
);
|
||||||
|
|
||||||
// ==================== 模型发现 ====================
|
// ==================== 模型发现 ====================
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user