mirror of
https://github.com/alibaba/higress.git
synced 2026-05-27 22:27:29 +08:00
fix(skill): correct model reference prefix for higress provider (#3485)
This commit is contained in:
@@ -204,13 +204,11 @@ const higressPlugin = {
|
|||||||
const modelIds = parseModelIds(modelInput);
|
const modelIds = parseModelIds(modelInput);
|
||||||
const hasAutoModel = modelIds.includes("higress/auto");
|
const hasAutoModel = modelIds.includes("higress/auto");
|
||||||
|
|
||||||
// FIX: Avoid double prefix - if modelId already starts with provider, don't add prefix again
|
// Always add higress/ provider prefix to create model reference
|
||||||
const defaultModelId = hasAutoModel
|
const defaultModelId = hasAutoModel
|
||||||
? "higress/auto"
|
? "higress/auto"
|
||||||
: (modelIds[0] ?? "glm-5");
|
: (modelIds[0] ?? "glm-5");
|
||||||
const defaultModelRef = defaultModelId.startsWith("higress/")
|
const defaultModelRef = `higress/${defaultModelId}`;
|
||||||
? defaultModelId
|
|
||||||
: `higress/${defaultModelId}`;
|
|
||||||
|
|
||||||
// Step 7: Configure default model for auto-routing
|
// Step 7: Configure default model for auto-routing
|
||||||
let autoRoutingDefaultModel = "glm-5";
|
let autoRoutingDefaultModel = "glm-5";
|
||||||
@@ -250,10 +248,8 @@ const higressPlugin = {
|
|||||||
defaults: {
|
defaults: {
|
||||||
models: Object.fromEntries(
|
models: Object.fromEntries(
|
||||||
modelIds.map((modelId) => {
|
modelIds.map((modelId) => {
|
||||||
// FIX: Avoid double prefix - only add provider prefix if not already present
|
// Always add higress/ provider prefix to create model reference
|
||||||
const modelRef = modelId.startsWith("higress/")
|
const modelRef = `higress/${modelId}`;
|
||||||
? modelId
|
|
||||||
: `higress/${modelId}`;
|
|
||||||
return [modelRef, {}];
|
return [modelRef, {}];
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user