creativecrafts/laravel-ai-assistant
A Laravel package for adding an AI-powered assistant to your application. It offers a simple, configurable way to integrate conversational AI features, manage prompts and responses, and connect your app to supported AI providers.
Architecture fit
Http/Guzzle usage without imposing a domain model.messages → Responses API input), not just a passthrough. That's a net positive for DX and reduces bespoke transformer code we'd otherwise maintain, but it means the package now owns payload semantics we can't see in our own code.InputBuilder::message() setting both input and message is a compatibility bridge, not a clean design. It is fine as transitional scaffolding, but treat it as debt: it implies two payload shapes coexisting in the same object graph.Integration feasibility
OPENAI_API_KEY. No new infrastructure, no daemon, no schema.-beta suffix. Composer will not resolve ^3.0 to a beta without an explicit constraint or minimum-stability change. We would have to pin 3.0.31-beta exactly or use ^3.0@beta, which globally widens stability for that dependency. Both are acceptable for a spike; neither is acceptable as a long-lived production default.Technical risk
messages deleted after conversion). Any logging, cost estimation, PII redaction, or audit trail that inspects the outbound payload must be verified post-conversion, not pre-conversion. Silent transforms are a classic source of "the logs say X, the API received Y" incidents.InputBuilder::message() writes both input and message. If the adapter's "preserve explicit input" branch and the builder's dual-write ever disagree, we get either a rejected request or double-counted context (cost). Needs a contract test.image_url string/object → input_image is a lossy surface for edge cases: data URIs, private URLs requiring auth, file_id variants, and any type not in the enumerated list. Unmapped types are the likely source of 400s.Key questions
-beta → stable promotion timeline and a stated support window for betas?input is absent — and what happens when both messages and input are passed by a caller who didn't use InputBuilder?message content type values — throw, drop, or pass through?input+message write get stripped before egress, or is it sent? (Payload size and 400-error exposure.)Stack fit
Migration path
3.0.31-beta as an exact version in a feature branch. Do not loosen minimum-stability globally.input_text, image_url as string and as object, file_id, explicit input already set) and assert the outbound JSON. This is the single highest-value test suite for this release.Compatibility
messages now produce a different wire format, so anything asserting on request bodies (snapshot tests, mock servers, stubbed HTTP clients) will need updating.message on builders only as long as internal tests need it; plan to drop reliance on it.Sequencing
message-key reliance).Maintenance
Support
Scaling
Failure modes
messages; if a caller relied on it downstream, requests succeed but with missing context. Detect via golden-payload assertions.tries is exhausted and then dead-letter; classify 4xx as non-retryable.Ramp-up
How can I help you explore Laravel packages today?