Files
deepseek-harness/packages/llm
Yichen Jiang 246caaba77 Merge remote-tracking branch 'origin/master' into worktree/deepseek-vision-model-catalog
# Conflicts:
#	.agents/notes/implemented/feature/2026-07-22-web-multimodal-image-input-and-durable-attachments.i18n.yaml
#	.agents/notes/implemented/feature/2026-08-19-direct-deepseek-vision-input.i18n.yaml
#	docs/config-catalog.i18n.yaml
#	packages/llm/llm-deepseek/README.i18n.yaml
2026-08-21 10:34:51 +08:00
..
2026-08-19 23:00:28 +08:00

llm/ — LLM capability family

English | 中文

The LLM seam and its provider adapters. The llm package owns both the Service Definition and Consumer roles: the abstract service, content-block vocabulary, and stream-chunk assembler. Provider adapters register on ctx.llm. All product packages.

Package Role ctx key
llm/ LLM service and shared streaming vocabulary ctx.llm
token-meter/ Replay-aware token measurement ctx.tokenMeter
llm-retry/ Provider-scoped retry policy listens to agent/request-error
llm-deepseek/ Direct DeepSeek adapter registers on ctx.llm
llm-pi-ai/ Multi-provider pi-ai adapter registers on ctx.llm

Adapters register provider routes on the seam; retry and token measurement remain separate consumers. The child READMEs own routing, metadata, replay, and provider-wire details; the LLM architecture decisions own the rationale.

The subsystem reference — messages and blocks, the model request, the StreamChunk protocol, the adapter contract — is docs/subsystems/llm-streaming.md (token measurement: token-meter.md); see the twin adapters, replay token meter, and routed model context Agent Notes.