feat: unify installation model catalog
This commit is contained in:
@@ -36,8 +36,7 @@ def _candidate():
|
||||
def test_pi_restructurer_uses_an_ephemeral_no_tools_invocation(tmp_path, monkeypatch):
|
||||
from tht.evidence import authoring
|
||||
|
||||
monkeypatch.setenv("PI_PROVIDER", "zai")
|
||||
monkeypatch.setenv("PI_MODEL", "glm-5.2")
|
||||
monkeypatch.setenv("THT_DEFAULT_SESSION_MODEL", "zai/glm-5.2")
|
||||
monkeypatch.setenv("PI_THINKING", "medium")
|
||||
calls = []
|
||||
|
||||
|
||||
@@ -34,8 +34,13 @@ def test_local_compose_uses_the_generic_external_endpoint_contract():
|
||||
assert name in environment
|
||||
assert environment["THT_INTERNAL_QDRANT_URL"] == "http://qdrant:6333"
|
||||
assert environment["THT_INTERNAL_EMBEDDING_URL"] == "http://embedding:11434"
|
||||
assert environment["THT_INTERNAL_EMBEDDING_MODEL"] == "qwen3-embedding:0.6b"
|
||||
assert environment["THT_INTERNAL_EMBEDDING_DIMENSIONS"] == "1024"
|
||||
# Identity and dimensions come only from the installation-generated Compose projection.
|
||||
for name in (
|
||||
"THT_INTERNAL_EMBEDDING_ID",
|
||||
"THT_INTERNAL_EMBEDDING_MODEL",
|
||||
"THT_INTERNAL_EMBEDDING_DIMENSIONS",
|
||||
):
|
||||
assert name not in environment
|
||||
for name in ("THT_VEC_REST_URL", "THT_VEC_WRITE_REST_URL", "THT_OLLAMA_URL"):
|
||||
assert name not in environment
|
||||
|
||||
@@ -53,6 +58,7 @@ def test_local_compose_uses_the_generic_external_endpoint_contract():
|
||||
|
||||
model_init = compose["services"]["embedding-model-init"]
|
||||
assert "ports" not in model_init
|
||||
assert "OLLAMA_MODEL" not in model_init.get("environment", {})
|
||||
assert model_init["depends_on"]["embedding"]["condition"] == "service_healthy"
|
||||
assert compose["services"]["core"]["depends_on"]["embedding-model-init"]["condition"] == "service_completed_successfully"
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ from datetime import UTC, datetime
|
||||
from pathlib import Path
|
||||
from types import SimpleNamespace
|
||||
|
||||
import pytest
|
||||
from typer.testing import CliRunner
|
||||
|
||||
from tht.cli import app
|
||||
@@ -13,6 +14,12 @@ from tht.memory import MemoryRecord, save_registry
|
||||
from tht.ports.vector import VectorStoreError
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def _ignore_operator_profile(monkeypatch):
|
||||
"""Exercise the self-contained server runtime fixture, not the developer's harness/.env."""
|
||||
monkeypatch.delenv("THT_PROFILE", raising=False)
|
||||
|
||||
|
||||
class _FakeEmbedder:
|
||||
def embed_documents(self, documents):
|
||||
return [[0.1] * 4 for _ in documents]
|
||||
|
||||
Reference in New Issue
Block a user