# ctx.llm `LlmService` — provided by `@deepseek-ai/dsh-llm`. The abstract `llm` service: an adapter registry plus a streaming model-call surface, interceptable via the `llm/stream` waterfall. [Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/llm/llm/src/index.ts#L75) ### ctx.llm.registerAdapter(models, adapter) ```ts website-api registerAdapter(models: string[], adapter: LlmAdapter): () => void ``` Register an adapter for the given model names. Throws `LlmError` with code `DUPLICATE_ADAPTER` if any model already has an adapter (all-or-nothing). Disposed with the fiber. - `models` — every model name this adapter should serve. - `adapter` — the adapter that streams calls for those models. **Returns** the disposer that unregisters all of them. [Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/llm/llm/src/index.ts#L90) ### ctx.llm.models() ```ts website-api models(): string[] ``` Model names with a registered adapter. **Returns** the registered names, in registration order. [Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/llm/llm/src/index.ts#L111) ### ctx.llm.stream(options) ```ts website-api stream(options: GenerateOptions): AsyncIterable ``` Stream one model call as raw chunks (token-level deltas). Throws `LlmError` with code `NO_ADAPTER` if no adapter is registered for `options.model`. Dispatches through the `llm/stream` waterfall. - `options` — the full request; `options.model` selects the adapter. **Returns** the chunk stream, possibly wrapped by `llm/stream` listeners. [Source](https://github.com/deepseek-harness/deepseek-harness/blob/master/packages/llm/llm/src/index.ts#L128)