Phase 4.5: cleanup — polish, branching, embeddings, lifecycle, deep-link #7

Merged
dohertj2 merged 39 commits from phase-4.5 into main 2026-04-27 11:33:27 -04:00
Showing only changes of commit 5f16bb575a - Show all commits
+8
View File
@@ -12,3 +12,11 @@ class Message:
class LLMClient(Protocol):
async def generate(self, messages: Sequence[Message], *, model: str, **params) -> str: ...
def stream(self, messages: Sequence[Message], *, model: str, **params) -> AsyncIterator[str]: ...
# T112 (Phase 4.5): real-embedding seam. Implementations either call a
# provider's ``/v1/embeddings`` endpoint or, when the provider doesn't
# expose embeddings (e.g. Featherless today), raise ``NotImplementedError``
# so ``generate_embedding`` can catch it and degrade to the zero-vector
# fallback. The Protocol is structural, so this method only needs to
# exist on implementations; existing callers that don't use it are
# unaffected.
async def embed(self, text: str, *, model: str) -> list[float]: ...