fix: harden model catalog projections
This commit is contained in:
@@ -140,7 +140,7 @@ function buildEmbeddingConfig(rendered: Record<string, unknown>): CanonicalEmbed
|
||||
}
|
||||
const model = requireString(embeddings, "model");
|
||||
return {
|
||||
id: `ollama/${model}`,
|
||||
id: optionalString(embeddings, "id") ?? `ollama/${model}`,
|
||||
model,
|
||||
dimensions: requireNumber(embeddings, "dimensions"),
|
||||
};
|
||||
|
||||
@@ -274,6 +274,8 @@ export function renderRuntimeConfig(
|
||||
},
|
||||
embedding: {
|
||||
provider: "ollama_internal",
|
||||
id: semanticRuntime.internalEmbeddingId
|
||||
?? `ollama/${semanticRuntime.internalEmbeddingModel}`,
|
||||
model: semanticRuntime.internalEmbeddingModel,
|
||||
dimensions: semanticRuntime.internalEmbeddingDimensions,
|
||||
},
|
||||
@@ -287,6 +289,8 @@ export function renderRuntimeConfig(
|
||||
embeddings: {
|
||||
provider: "ollama_internal",
|
||||
base_url: semanticRuntime.internalEmbeddingUrl,
|
||||
id: semanticRuntime.internalEmbeddingId
|
||||
?? `ollama/${semanticRuntime.internalEmbeddingModel}`,
|
||||
model: semanticRuntime.internalEmbeddingModel,
|
||||
dimensions: semanticRuntime.internalEmbeddingDimensions,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user