symfony/ai-cloudflare-store
Cloudflare Vectorize vector store integration for Symfony AI Store, enabling upsert, query, and delete-by-ID operations through Cloudflare's Vectorize API.
Architecture Fit
StoreInterface, StoreFactory, VectorDocumentInterface) that has no Laravel-native counterpart, no published service provider, and no config scaffolding. The integration cost is ours, not the package's.clear(), count(), and a document interface. Everything meaningful — embeddings, index design, retrieval strategy — is outside its scope. A TPM should frame this as "buying a small adapter," not "buying a vector capability."Integration Feasibility
VectorDocumentInterface, and our own retry/logging/circuit-breaker layer around the Cloudflare API. None of this ships with the package.VectorDocumentInterface and store count() both landed in v0.14.0 — i.e., the document contract is one release old. Any adapter we write now should be treated as a first draft.count() is observability, not a correctness primitive. Usable for dashboards, quota visibility, and preflight checks; unsuitable for request-path gating until consistency, rate-limit, and cost behaviour are measured by us. The release notes do not document them.Technical Risk
count()-on-every-request or chatty upsert pattern becomes a live incident. This is a design constraint we must impose, not one the package enforces.Key Questions
count() semantics: What are the consistency guarantees, rate limits, and per-call cost? Until answered, is it restricted to scheduled jobs?VectorDocumentInterface is stable across v0.15–v1.0, and what does the Symfony AI roadmap say about the store abstraction?Stack Fit
StoreInterface in a service provider, but expose our own VectorStore contract to feature code. No controller, job, or model should reference Symfony AI or Cloudflare types directly. This preserves the option to swap to a self-hosted store (pgvector, Qdrant) without a rewrite.VectorDocumentInterface. This is where metadata, IDs, and serialization consistency live — and where most bugs will otherwise appear.count() output in Redis. This is the primary lever against quota and latency.Migration Path
clear(), count(). Simultaneously build the internal-client alternative. Compare on lines of code, operational surface, and upgrade exposure. Decision gate: adopt vs. build.VectorStore interface.count()-based scheduled health checks, quota dashboards, retry/circuit-breaker metrics, and runbooks.Compatibility
VectorStore interface is the compatibility buffer — insist on it in the design review.Sequencing
count()-based observability first — lowest blast radius, validates auth, quotas, and the operational story early.VectorDocumentInterface in a single new feature path, not a fleet-wide migration.Maintenance
count() semantics, metadata schema, and failure handling are load-bearing; without them, the bridge becomes tribal knowledge.Support
count() inconsistency, index deletion or recreation.Scaling
count() must not scale with request volume. Schedule it (e.g., hourly), cache the result, and alert on failure rather than retrying in-band.VectorDocumentInterface improves consistency, not throughput. Do not expect scaling gains from it; expect fewer payload-shape bugs.Failure Modes
count(). Mitigation: idempotent IDs, per-batch reconciliation, periodic drift checks comparing source-of-truth counts to count().count()/query volume metrics.Ramp-up
How can I help you explore Laravel packages today?