refactor!: provider SPI in its own package com.kingsrook.qbits.assistant.spi #43

Merged
KofTwentyTwo merged 1 commits from feature/provider-spi-package into develop 2026-10-14 15:55:29 +00:00
KofTwentyTwo commented 2026-10-14 15:51:43 +00:00 (Migrated from github.com)

This makes qbit-assistant-provider-api self-sufficient for qbit-marketing and the qbit-bom G1 guardrails.

Why

The API types lived in ...assistant.provider and ...assistant.engine, which are split packages shared with qbit-assistant internals, so a package allow-list could not tell API from implementation. ...assistant.api is already taken by the internal HTTP classes.

Change

  • The only package in qbit-assistant-provider-api is now com.kingsrook.qbits.assistant.spi. It holds 23 types, ModelPricing included.
  • Internal classes stay where they are: provider.RegistryModelProvider and provider.fake.*.
  • ArchUnit checks that the API module depends on nothing else in com.kingsrook.qbits.. and that there are no split packages.
  • BREAKING: imports change from ...assistant.provider.X and ...assistant.engine.ModelPricing to ...assistant.spi.X. UPGRADE.md has the full mapping.
  • Consumers depend only on com.kingsrook.qbits:qbit-assistant-provider-api.
  • Guardrails: QRun-IO/qbit-bom (companion PR) adds com.kingsrook.qbits.assistant.spi to the G1 default allowed API packages. The artifact already matches the *-api default.

Tests

./mvnw verify passes: 378 tests, 1 skipped (Docker only).

Merge note

#21 (write mode, waiting on RC.8) will need its imports updated after this. I'll do that.

🤖 Generated with Claude Code

This makes `qbit-assistant-provider-api` self-sufficient for qbit-marketing and the qbit-bom G1 guardrails. ### Why The API types lived in `...assistant.provider` and `...assistant.engine`, which are split packages shared with qbit-assistant internals, so a package allow-list could not tell API from implementation. `...assistant.api` is already taken by the internal HTTP classes. ### Change - The **only** package in `qbit-assistant-provider-api` is now `com.kingsrook.qbits.assistant.spi`. It holds 23 types, `ModelPricing` included. - Internal classes stay where they are: `provider.RegistryModelProvider` and `provider.fake.*`. - **ArchUnit** checks that the API module depends on nothing else in `com.kingsrook.qbits..` and that there are no split packages. - **BREAKING:** imports change from `...assistant.provider.X` and `...assistant.engine.ModelPricing` to `...assistant.spi.X`. UPGRADE.md has the full mapping. - **Consumers** depend only on `com.kingsrook.qbits:qbit-assistant-provider-api`. - **Guardrails:** QRun-IO/qbit-bom (companion PR) adds `com.kingsrook.qbits.assistant.spi` to the G1 default allowed API packages. The artifact already matches the `*-api` default. ### Tests `./mvnw verify` passes: 378 tests, 1 skipped (Docker only). ### Merge note #21 (write mode, waiting on RC.8) will need its imports updated after this. I'll do that. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.