feat: unify installation model catalog
This commit is contained in:
@@ -41,8 +41,6 @@ TASK13_AUTHENTIK_API_TOKEN="fixture-authentik-token-$profile"
|
||||
TASK13_FRONTEND_PORT=18080
|
||||
TASK13_SESSION_RUNTIME_PASSWORD="$fixture/runtime-password"
|
||||
TASK13_SESSION_CA="$fixture/session-ca.pem"
|
||||
TASK13_PI_MODELS="$fixture/models.json"
|
||||
TASK13_PI_SETTINGS="$fixture/settings.json"
|
||||
TASK13_LLM_SERVER="$fixture/fake-llm.mjs"
|
||||
TASK13_LLM_CONTAINER="$TASK13_PROJECT-llm"
|
||||
TASK13_REMOTE="$fixture/remote.git"
|
||||
@@ -54,22 +52,8 @@ cp "$root/scripts/fixtures/workspace-registry-task13.yaml" "$workspace"
|
||||
|
||||
if [[ "$profile" == local ]]; then
|
||||
task13_write_fixture_files
|
||||
node - "$TASK13_PI_MODELS" <<'NODE'
|
||||
const fs = require("fs");
|
||||
const models = JSON.parse(fs.readFileSync(process.argv[2], "utf8"));
|
||||
const model = models.providers?.["local-qwen"]?.models?.find(
|
||||
(candidate) => candidate?.id === "task13-smoke",
|
||||
);
|
||||
if (!model || JSON.stringify(model.input) !== JSON.stringify(["text"])) {
|
||||
throw new Error("Task 13 provider smoke model must declare text input support");
|
||||
}
|
||||
const expectedCost = { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 };
|
||||
if (JSON.stringify(model.cost) !== JSON.stringify(expectedCost)) {
|
||||
throw new Error("Task 13 provider smoke model must declare complete zero-cost metadata");
|
||||
}
|
||||
NODE
|
||||
task13_write_environment /fixtures/remote.git
|
||||
compose_files=(-f "$root/compose.yaml" -f "$root/deploy/compose.local.yaml" -f "$TASK13_OVERRIDE")
|
||||
compose_files=(-f "$root/compose.yaml" -f "$root/deploy/compose.local.yaml" -f "$TASK13_OVERRIDE" -f "$fixture/generated/compose.models.yaml")
|
||||
else
|
||||
TASK13_SERVER_DATA="$fixture/Server Data"
|
||||
TASK13_SERVER_PI_STATE="$fixture/Server Pi State"
|
||||
@@ -106,6 +90,7 @@ else
|
||||
-f "$root/deploy/compose.server.yaml"
|
||||
-f "$root/deploy/compose.session-server.yaml.example"
|
||||
-f "$TASK13_OVERRIDE"
|
||||
-f "$fixture/generated/compose.models.yaml"
|
||||
-f "$root/deploy/compose.auth-runtime-projection.yaml"
|
||||
)
|
||||
fi
|
||||
@@ -188,7 +173,7 @@ NODE
|
||||
fi
|
||||
done
|
||||
|
||||
for mutation in collection-reuse dimension-change; do
|
||||
for mutation in workspace-semantic-index workspace-llm-policy; do
|
||||
mutated="$fixture/$mutation.yaml"
|
||||
node - "$root/backend/package.json" "$workspace" "$mutated" "$mutation" <<'NODE'
|
||||
const fs = require("fs");
|
||||
@@ -197,11 +182,12 @@ const requireFromBackend = createRequire(process.argv[2]);
|
||||
const yaml = requireFromBackend("yaml");
|
||||
const [source, destination, mutation] = process.argv.slice(3);
|
||||
const workspace = yaml.parse(fs.readFileSync(source, "utf8"));
|
||||
if (mutation === "collection-reuse") {
|
||||
workspace.semantic_index.vector_store.collection = "shared-semantic";
|
||||
} else if (mutation === "dimension-change") {
|
||||
workspace.semantic_index.vector_store.dimensions = 1536;
|
||||
workspace.semantic_index.embedding.dimensions = 1536;
|
||||
if (mutation === "workspace-semantic-index") {
|
||||
workspace.semantic_index = {
|
||||
vector_store: { engine: "qdrant", collection: "shared-semantic", dimensions: 1536 },
|
||||
};
|
||||
} else if (mutation === "workspace-llm-policy") {
|
||||
workspace.llm_policy = { provider: "openai", model: "gpt-test" };
|
||||
}
|
||||
fs.writeFileSync(destination, yaml.stringify(workspace));
|
||||
NODE
|
||||
|
||||
Reference in New Issue
Block a user