apavliukov/laravel-ai-core
Laravel AI Core provides a foundation for integrating AI capabilities into Laravel applications, with configurable drivers, service bindings, and a consistent API for working with AI models and providers. It aims to keep AI configuration and usage organized, testable, and framework-native.
Architecture fit
laravel-ai-core reads as an abstraction layer between Laravel domain models and AI providers: ModelAssignments is a polymorphic pivot assigning AI models/configs to subjects, and "subject key stamping" implies the package now owns derivation/persistence of a stable subject key across those polymorphic relations.protected store() extension point is a conventional Laravel template-method pattern — good sign of intentional API design, but it means the package owns persistence control flow.Integration feasibility
ModelAssignments. Net-new adoption is unaffected.row factory materially lowers integration cost — assignment and report fixtures become testable without hand-rolling records, which shortens the spike phase. v0.4.1's "sharper factory" is a usability improvement in exactly the tooling the spike depends on.assign(). v0.4.1 introduces no new migration work beyond 0.4.0.Technical risk
final assign() removes an escape hatch. Anyone overriding assign() gets a hard fatal error, not a deprecation. This remains the single highest-cost upgrade item and is undiscoverable without reading the changelog.Key questions
store(), and does assign() still throw a clear error if a subclass defines it?Stack fit
Migration path
^0.4.1, not 0.4.0. Anyone who adopted 0.4.0 during the last few weeks should take the patch immediately if subject key stamping is enabled, then verify stored keys.^0.3 if not yet adopted and stamping isn't needed; treat v0.4.x as a planned change, not a patch.ModelAssignments subclasses from assign() overrides to protected store(). Call sites are unchanged — assign() remains the public entry point. This is a small, mechanical, but mandatory edit.Compatibility
composer update.Sequencing
0.4.1 specifically, publish config/migrations, run the row factory to seed assignments and reports.assign() subclasses to store(); add a smoke test asserting assignments still persist.Maintenance
composer update becomes an incident.0.4.x is still settling. Assume at least one more patch before the API stops moving.Support
store() extension contract, the subject-key format, and the required write ordering relative to host-model traits in internal docs — this knowledge lives only in the package source and in one commit message.Scaling
(subject_type, subject_id) and on the model/config foreign key; unindexed, these degrade badly as assignments accumulate.Failure modes
assign() after upgrade → fatal error at class load. Detected only at runtime; needs a test.Ramp-up
store() extension contract, the subject-key derivation/backfill, the trait-ordering constraint, and the report retention/redaction policy.How can I help you explore Laravel packages today?