refactor: qbit-assistant-provider-api module for the provider SPI and pricing (#30) #37

Merged
KofTwentyTwo merged 3 commits from feature/provider-api-module into develop 2026-10-14 12:35:12 +00:00
KofTwentyTwo commented 2026-10-14 01:49:50 +00:00 (Migrated from github.com)

Closes #30 (architecture review QRun-IO/qqq#1150, finding F5). qbit-marketing compiled against qbits.assistant.provider.* and engine.ModelPricing, which pulled in the whole assistant runtime.

What changes

  • New artifact qbit-assistant-provider-api. It holds the provider SPI and value types, and engine.ModelPricing. Package names are unchanged, so callers only change their Maven dependency.
    • SPI: AssistantModelProvider, AssistantProviderType, ModelRequest/ModelResponse/ModelMessage/ModelPart/ModelUsage/ModelCapabilities, ModelProviderException, StreamHandle/CompletableStreamHandle, ProviderSettings, TrustedCaBundle, DiscoveredModel, HealthResult, EmbeddingRequest/EmbeddingResponse, SystemBlock, CacheHint, ModelToolDefinition, TokenCount, ModelEventListener.
    • Its only production dependency is jackson-annotations: no QQQ and no assistant runtime.
    • An ArchUnit test keeps it free of assistant internals.
  • One SPI change: AssistantProviderType's settings validation now takes ProviderSettings instead of the assistant_provider entity. Bedrock and Vertex are updated, and UPGRADE.md documents the change.
  • Dependencies: qbit-assistant and the anthropic, openai, bedrock and vertex modules depend on the API artifact. pgvector keeps qbit-assistant for VectorStore.
  • Tests: 302 in total, all green in ./mvnw verify (1 Docker-only skip). The API module covers 97% of instructions and 100% of classes.

For marketing#9

Depend on com.kingsrook.qbits:qbit-assistant-provider-api instead of qbit-assistant. No import changes are needed. It is available from the next qbit-assistant RC after this merges.

🤖 Generated with Claude Code

Closes #30 (architecture review QRun-IO/qqq#1150, finding F5). qbit-marketing compiled against `qbits.assistant.provider.*` and `engine.ModelPricing`, which pulled in the whole assistant runtime. ### What changes - **New artifact `qbit-assistant-provider-api`.** It holds the provider SPI and value types, and `engine.ModelPricing`. Package names are unchanged, so callers only change their Maven dependency. - SPI: `AssistantModelProvider`, `AssistantProviderType`, `ModelRequest`/`ModelResponse`/`ModelMessage`/`ModelPart`/`ModelUsage`/`ModelCapabilities`, `ModelProviderException`, `StreamHandle`/`CompletableStreamHandle`, `ProviderSettings`, `TrustedCaBundle`, `DiscoveredModel`, `HealthResult`, `EmbeddingRequest`/`EmbeddingResponse`, `SystemBlock`, `CacheHint`, `ModelToolDefinition`, `TokenCount`, `ModelEventListener`. - Its only production dependency is `jackson-annotations`: no QQQ and no assistant runtime. - An ArchUnit test keeps it free of assistant internals. - **One SPI change:** `AssistantProviderType`'s settings validation now takes `ProviderSettings` instead of the `assistant_provider` entity. Bedrock and Vertex are updated, and UPGRADE.md documents the change. - **Dependencies:** `qbit-assistant` and the anthropic, openai, bedrock and vertex modules depend on the API artifact. pgvector keeps `qbit-assistant` for `VectorStore`. - **Tests:** 302 in total, all green in `./mvnw verify` (1 Docker-only skip). The API module covers 97% of instructions and 100% of classes. ### For marketing#9 Depend on `com.kingsrook.qbits:qbit-assistant-provider-api` instead of `qbit-assistant`. No import changes are needed. It is available from the next qbit-assistant RC after this merges. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.