# Conflicts: # apps/cli/tests/profiles/acp/image-compaction.cordis.snapshot.yml # apps/cli/tests/profiles/acp/image-compaction.cordis.yml # apps/cli/tests/profiles/acp/tests/snapshots/image-compaction/input.json # apps/cli/tests/profiles/acp/tests/snapshots/image-compaction/session.jsonl # apps/cli/tests/profiles/acp/tests/snapshots/image-compaction/stdout.expected.jsonl # docs/config-catalog.i18n.yaml # docs/config-catalog.md # docs/config-catalog.zh.md # examples/acp-agent/tests/acp.snapshot.ts # packages/llm/token-meter/README.i18n.yaml # packages/llm/token-meter/README.md # packages/llm/token-meter/README.zh.md # packages/llm/token-meter/src/index.ts # packages/llm/token-meter/src/surface-fold.ts
llm/ — LLM capability family
English | 中文
The LLM seam, provider adapters, and provider-specific request metadata plugins. 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 |
deepseek-llm-api-extensions/ |
Official DeepSeek request-field registry | ctx.deepseekLlmApiExtensions |
plugin-package-inventory-deepseek/ |
Active package metadata for official DeepSeek requests | contributes dsh_plugin_packages |
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.