- Can I use symfony/ai-deep-seek-platform in a Laravel application?
- Yes, but not as a native Laravel package. It is a Symfony AI platform bridge that depends on Symfony's HttpClient and AI abstractions, and those components can be pulled into a Laravel app through Composer. You will need to register the relevant services and bindings in Laravel's container yourself, or use a Symfony component bridge such as spatie/laravel-symfony-components. There is no Laravel service provider, facade, or config file shipped with the package.
- How do I install and configure the DeepSeek platform bridge in Laravel?
- Install it with Composer alongside the Symfony AI contracts and HttpClient components, then register the platform and provider classes in a Laravel service provider. You supply your DeepSeek API key and base URL through your own config file or environment variables, since the package does not read Laravel config directly. Once bound in the container, you can resolve the platform and request a chat model wherever you need it. Expect to write a thin wrapper or facade to make the API feel idiomatic in Laravel.
- Does this package support streaming chat responses?
- Yes. The bridge exposes Symfony AI's DeltaInterface, which lets you consume incremental response chunks as they arrive from DeepSeek. That maps well to server-sent events or a queued broadcasting setup in Laravel for live chat interfaces. You are responsible for wiring the stream to your HTTP response layer, since the package only provides the AI-side abstraction.
- Which PHP and Laravel versions does symfony/ai-deep-seek-platform require?
- The package requires PHP 8.2 or newer, which rules out older Laravel releases such as 9.x that still support PHP 8.0 and 8.1. Laravel 10 and 11 applications on PHP 8.2+ are the realistic target. Check your composer.lock for conflicts with symfony/http-client or other Symfony components before installing, and use platform checks in CI to catch mismatches early.
- How do I use DeepSeek function calling from a Laravel app?
- Function calling is supported through the platform bridge's chat completion options, where you describe your tools and their JSON schemas. DeepSeek returns the requested tool call, and your Laravel code executes the matching method and sends the result back in a follow-up message. Keep your tool definitions in a dedicated class so the schema and the executable handler stay in sync. The package handles the transport and message shaping, not the tool execution itself.
- Can I track token usage and cost per model with this package?
- Yes. As of v0.14.0 the TokenUsage object carries a model property, so you can attribute prompt and completion tokens to a specific DeepSeek model per request. In Laravel you can map model plus token counts against a rate card and record the result in a usage_events table from a listener or middleware. Before that change, cost attribution required correlating usage records back to the request payload out of band.
- Is symfony/ai-deep-seek-platform safe to use in production?
- Treat it as pre-1.0 software. Symfony's backward compatibility promise does not apply below 1.0, so a minor bump can change behavior, and adoption is still very low with no dependents listed. Pin to ~0.14.0 rather than ^0.14 so routine Composer updates cannot pull in an unreviewed minor release. Review each upgrade as a deliberate change and test against DeepSeek in a staging environment before shipping.
- How does the bridge handle DeepSeek API errors?
- The package exposes API errors uniformly, which means failures surface as exceptions you can catch rather than as inconsistent response payloads. In Laravel that fits naturally into your exception handler and logging setup for retries, alerting, and user-facing fallbacks. Because DeepSeek's API can rate limit or return authentication errors, you should still add your own retry and timeout policy around the calls. Monitor error rates in staging before trusting it in production.
- Can I switch between DeepSeek and another AI provider without rewriting code?
- The model routing layer added in v0.8.0 is designed for exactly that. Because the bridge implements Symfony AI's platform abstractions, you can swap DeepSeek for another provider bridge while keeping your calling code against the same interfaces. In practice, you still need to check that prompts, tool schemas, and model identifiers behave consistently across providers. Keep provider-specific model IDs in config rather than hardcoded in your application logic.
- What should I watch out for with the model catalog in newer releases?
- The model catalog is now refreshed through automated CI, which means identifiers and metadata can change on a minor version bump. Treat any model ID you put in Laravel config as a versioned input that needs review alongside the dependency, not as a stable constant. If you serialize usage or model metadata, tolerate unknown or extra keys so a catalog change does not break hydration. This is a structural improvement overall, but it shifts some review burden onto your upgrade process.