feat: unify installation model catalog
This commit is contained in:
@@ -71,6 +71,7 @@ test("loadConfig keeps local development defaults", () => {
|
||||
workspaceSecretRuntimeRoot: "/tmp/thothii-workspace-secrets",
|
||||
internalQdrantUrl: "http://qdrant:6333",
|
||||
internalEmbeddingUrl: "http://embedding:11434",
|
||||
internalEmbeddingId: "ollama/qwen3-embedding:0.6b",
|
||||
internalEmbeddingModel: "qwen3-embedding:0.6b",
|
||||
internalEmbeddingDimensions: 1024,
|
||||
authMode: "none",
|
||||
@@ -198,6 +199,22 @@ test("loadConfig accepts only the allowed internal semantic runtime hosts", () =
|
||||
.toThrow(/internal.*embedding|invalid/i);
|
||||
});
|
||||
|
||||
test("loadConfig derives the embedding runtime model from its canonical catalog identity", () => {
|
||||
expect(loadConfig({
|
||||
THT_INTERNAL_EMBEDDING_ID: "ollama/nomic-embed-text",
|
||||
THT_INTERNAL_EMBEDDING_MODEL: "nomic-embed-text",
|
||||
})).toMatchObject({
|
||||
internalEmbeddingId: "ollama/nomic-embed-text",
|
||||
internalEmbeddingModel: "nomic-embed-text",
|
||||
});
|
||||
expect(() => loadConfig({
|
||||
THT_INTERNAL_EMBEDDING_ID: "ollama/nomic-embed-text",
|
||||
THT_INTERNAL_EMBEDDING_MODEL: "different-model",
|
||||
})).toThrow("does not match its canonical identity");
|
||||
expect(() => loadConfig({ THT_INTERNAL_EMBEDDING_ID: "not-canonical" }))
|
||||
.toThrow("embedding identity configuration is invalid");
|
||||
});
|
||||
|
||||
test("loadConfig enables the legacy workspace request only through explicit local mode", () => {
|
||||
expect(loadConfig({ THT_LEGACY_WORKSPACE_MODE: "local" }).legacyWorkspaceMode).toBe(true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user