Skip to content

Decision record · ADR

ADR-0023: Separate adapter and measurement Python SDKs by release ownership

Status: accepted | Date: 2026-07-30

References: ADR-0003, ADR-0021, RFC-0004:C-INFERLAB-TOOLCHAIN, RFC-0004:C-MEASUREMENTS, RFC-0006:C-INTEGRATIONS

ADR-0021 separates product-owned artifacts from independently released workspace-side adapter packages, while ADR-0003 keeps Eval and Bench in one product-owned measurement toolchain. The Python dependency graph does not yet reflect those decisions: inferlab-adapter-sdk contains both framework-integration plan and render models and the request and result models plus runtime helpers used only by the release-owned Eval and Bench runners.

The generated model file comes from one Rust schema root that aggregates both contracts. A completed Bench request-source change therefore changed inferlab-adapter-sdk even though no framework-integration wire shape or helper changed. Because every maintained integration declares the exact SDK version it was built and tested against, preparing that measurement-only change then required metadata releases of all integrations. This is observed coupling between two release authorities rather than evidence that those consumers form one SDK.

The design needs to preserve Rust wire DTOs as the editable source, exact adapter dependency pins, the separately isolated Eval and Bench environments, and the one product release identity for measurement tooling. It also needs to avoid presenting an internal measurement support module as another package that operators must select, install, or release independently.

We will separate the Python projections according to their existing release ownership.

inferlab-adapter-sdk will contain only the generated framework-integration plan and render contract, adapter process runtime, and helpers whose consumers are framework integrations. It remains an independently versioned and published workspace-side package under RFC-0006:C-INTEGRATIONS.

A new inferlab-measurement-sdk internal package will contain the generated Rust-to-runner measurement request and result types and the client helpers shared by the release-owned Eval and Bench runners. It will carry the InferLab product version, travel inside the versioned measurement toolchain with those runners, and have no independent package-index or package-scoped release lifecycle. The runners, rather than downstream serving workspaces or framework integrations, are its consumers.

The Rust protocol crate will remain one product-owned crate. Its source will expose separate adapter and measurement schema roots and generated Python projections, while genuinely shared Rust wire types can remain shared internally. This separates generated closure and Python dependency ownership; no additional Rust compilation or reuse boundary has been demonstrated that would justify another crate. The split changes Python package composition, not the existing adapter wire version, measurement result-envelope version, or Eval and Bench execution boundaries.

  • Measurement-only evolution changes the product-owned measurement SDK and runners without revising public adapter packages.
  • Adapter SDK changes propagate to integrations only when their actual generated contract or shared runtime changes.
  • The installed measurement toolchain no longer embeds a public workspace-side adapter package merely to run its internal clients.
  • Separate schema roots make the two Python dependency closures explicit while retaining one Rust source authority.
  • Establishing the boundary requires a one-time breaking adapter SDK revision and a coordinated exact-pin update for maintained integrations.
  • The repository gains a second generated Python projection, and the internal measurement package becomes an additional member of the product-owned toolchain closure.
  • A small amount of structurally similar value conversion can remain on both sides when sharing it would recreate a cross-release Python dependency.
  • Eval and Bench continue to use separate Pixi environments and one product toolchain identity.
  • The internal measurement SDK is versioned with InferLab like the two runners; it is not another operator-selected or independently published artifact.
  • The Cargo workspace remains lockstep, and existing adapter protocol and measurement envelope versions retain their meanings.

Keep one adapter SDK for integration and measurement consumers (rejected)

Section titled “Keep one adapter SDK for integration and measurement consumers (rejected)”
  • Pros: Keeps the existing package count and code-generation command small
  • Cons: A measurement-only model change changes the independently published adapter SDK and its exact integration dependency closure
  • Rejected because: The observed Bench source change forced unrelated integration package revisions, demonstrating that the package combines two release authorities.

Move all generated models into one neutral protocol-models package (rejected)

Section titled “Move all generated models into one neutral protocol-models package (rejected)”
  • Pros: Separates generated DTOs from Python runtime helpers
  • Cons: A shared exact dependency still propagates measurement-only changes into adapter consumers
  • Rejected because: It renames the coupling without separating the adapter and measurement release lifecycles.

Embed separate generated support directly in each measurement runner (rejected)

Section titled “Embed separate generated support directly in each measurement runner (rejected)”
  • Pros: Avoids adding an internal Python distribution
  • Cons: Duplicates the shared Rust-to-Python measurement contract and common client helpers across two runners
  • Rejected because: Eval and Bench already share one product release identity and one independently testable measurement-client boundary, so duplicating that boundary would create two projections without an ownership benefit.

Separate the public adapter SDK from an internal product-owned measurement SDK (accepted)

Section titled “Separate the public adapter SDK from an internal product-owned measurement SDK (accepted)”
  • Pros: Aligns Python dependencies with the independent adapter and product release authorities, Keeps shared measurement DTOs and helpers in one internal authority used by both runners
  • Cons: Requires two generated schema roots and one additional internal package, Establishing the boundary causes a one-time adapter SDK and integration dependency migration