mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-09-16 11:52:26 +03:00
Custom provider-node models (synced, custom, and alias-backed) now appear under their configured prefix in the unified catalog when the operator's model-id prefix mode is canonical, instead of being dropped whenever alias-inclusion was otherwise disabled. Closes #11832. Thanks!
This commit is contained in:
@@ -1230,7 +1230,7 @@ async function buildUnifiedModelsResponseCore(
|
||||
continue;
|
||||
}
|
||||
|
||||
if (includeAlias) {
|
||||
if (includeAlias || Boolean(prefix)) {
|
||||
models.push({
|
||||
id: aliasId,
|
||||
object: "model",
|
||||
@@ -1242,7 +1242,7 @@ async function buildUnifiedModelsResponseCore(
|
||||
...syncedFields,
|
||||
});
|
||||
}
|
||||
if (includeAlias && modelType === "audio") {
|
||||
if ((includeAlias || Boolean(prefix)) && modelType === "audio") {
|
||||
models.push({
|
||||
id: aliasId,
|
||||
object: "model",
|
||||
@@ -1655,7 +1655,7 @@ async function buildUnifiedModelsResponseCore(
|
||||
? getCustomVisionCapabilityFields(model, aliasId, modelId)
|
||||
: null;
|
||||
|
||||
if (includeAlias) {
|
||||
if (includeAlias || Boolean(prefix)) {
|
||||
models.push({
|
||||
id: aliasId,
|
||||
object: "model",
|
||||
@@ -1773,7 +1773,7 @@ async function buildUnifiedModelsResponseCore(
|
||||
const visionFields =
|
||||
getVisionCapabilityFields(aliasId) || getVisionCapabilityFields(modelId);
|
||||
|
||||
if (includeAlias) {
|
||||
if (includeAlias || Boolean(nodePrefix)) {
|
||||
models.push({
|
||||
id: aliasId,
|
||||
object: "model",
|
||||
|
||||
Reference in New Issue
Block a user