# Host compatibility

Version 0.1.3 targets DSH 0.2.2-alpha.2 and pi-ai 1.3.0; see [the verification record](0.2.2-alpha.2-verification.md). It does not declare compatibility with earlier Hosts. The 0.1.2 release targeted DSH 0.2.0-rc.2 and 0.2.1-alpha.3; its acceptance is recorded in [the 0.2.1-alpha.3 verification](alpha-compat-verification.md). Version 0.1.0 required a locally patched 0.1.7-alpha.2 Host. Do not apply those old patches to the current release.

The plugin constructs OpenCode providers with public pi-ai protocol factories and feeds resolved profiles into the public DSH `PiAiAdapter`. The native adapter still owns message conversion, attachments, reasoning validation, stream cancellation, attribution and token accounting. Per-model endpoint dispatch and request-local `x-opencode-session` headers belong to the plugin. Native configuration schemas supply stream and image defaults. No main-loop, sandbox, native build or private source imports are changed.

The native Host owns built-in configurable-provider directory entries. The plugin does not replace those registrations. Canonical `opencode` and `opencode-go` inference routes remain unchanged, but they must not also be configured in `llm-pi-ai.providers`. Configure credentials and overrides in the plugin settings, not the built-in provider editor. Native discovery exposes model identity and capacity; the plugin's authenticated catalog API and Models footer retain protocol, pricing and eligibility diagnostics. Inference listings include pricing descriptions.

`excludedProviders`, `resolvePiAiProfiles` and a constructor-level request-header callback are not required. Migration removes the obsolete exclusion field. Peer requirements name the target versions; another pre-stable Host needs validation before widening them. Native model listing hides routes whose named credential is missing; configured credential references must resolve before models are offered.

Discovery reads the official `/inference` and `/inference/go` model endpoints and protocol tables. Cache validation accepts the matching route's protocol-specific endpoints and legacy official roots. Cross-route endpoints and arbitrary redirects are rejected.
