Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Ai Bedrock Platform

Ai Bedrock Platform Laravel Package

symfony/ai-bedrock-platform

AWS Bedrock platform bridge for Symfony AI, letting you invoke foundation models and list available ones through Bedrock, with support for Anthropic Claude, Meta Llama, and Amazon Nova request formats.

View on GitHub
Deep Wiki
Context7

Bedrock Platform is an AWS Bedrock platform bridge for Symfony AI, letting your application send prompts to foundation models hosted on Amazon Bedrock through a consistent Symfony AI interface.

It speaks the Bedrock InvokeModel and ListFoundationModels APIs and adapts each provider's request format, so you can switch between models without rewriting integration code.

  • Seamless InvokeModel requests for text generation
  • Model discovery via ListFoundationModels
  • Native request schemas for Anthropic Claude, Meta Llama, and Amazon Nova
  • Plugs directly into the Symfony AI platform abstraction
Frequently asked questions about Ai Bedrock Platform
How do I install symfony/ai-bedrock-platform in a Laravel app?
Install it with Composer using symfony/ai-bedrock-platform, then configure AWS credentials and a Bedrock region in your Laravel environment. Because this is a Symfony AI bridge rather than a Laravel-specific package, you will usually add a small service provider or facade that constructs and exposes the Bedrock client through Laravel's container. Keep the integration thin so your application code depends on your own wrapper rather than directly on the package classes.
Does symfony/ai-bedrock-platform work with Laravel 10 and Laravel 11?
It can be used with Laravel 10 and Laravel 11 applications running on PHP 8.2 or newer, especially after the v0.14.0 PHP 8.2 polyfill fix. The package targets Symfony AI abstractions, so Laravel integration depends on your own service container bindings rather than official Laravel package discovery. Test your specific Laravel version and PHP runtime before relying on it in production.
Which AWS Bedrock models does this package support?
The package supports Bedrock InvokeModel and ListFoundationModels and documents request formats for Anthropic Claude, Meta Llama, and Amazon Nova models. Other Bedrock foundation models may work through InvokeModel, but you may need to provide the correct payload format yourself. Use ListFoundationModels to discover what is available in your AWS region and account.
How do I configure AWS credentials and region for Bedrock in Laravel?
Store AWS access keys, secret keys, and the Bedrock region in Laravel environment variables, then read them through config files such as config/services.php. The package relies on Bedrock's Runtime API, so standard AWS credential and region settings apply. Avoid hardcoding credentials and prefer the AWS SDK credential chain or Laravel secrets management where possible.
Can I use symfony/ai-bedrock-platform with the OpenAI-compatible Mantle interface?
Yes, v0.14.0 introduced the Bedrock Mantle platform, which exposes an OpenAI-compatible chat interface over Bedrock. This lets you write a ChatClient-style contract once and switch between OpenAI and Bedrock through configuration, such as an AI_DRIVER flag. Keep in mind that this is a young surface, so choose one primary integration path and treat the other as a migration option.
Is symfony/ai-bedrock-platform stable for production use?
The package is still pre-1.0, so minor version bumps may include breaking changes by convention. The Mantle OpenAI-compatible surface is especially new and likely to evolve. For production, pin exact versions, wrap the client behind your own Laravel service, and plan upgrades as deliberate work rather than routine Composer updates.
How do I test Bedrock calls in Laravel without hitting AWS?
Mock or fake the Bedrock client or Symfony AI ClientInterface in Laravel's service container so unit tests do not call AWS. Assert that your application builds the expected messages and payloads, then keep a smaller integration test suite that uses real AWS credentials or a sandbox account. This keeps fast tests deterministic while still validating the real Bedrock request format.
How do I list available Bedrock foundation models from Laravel?
Use the package's ListFoundationModels support and expose it through a Laravel Artisan command or service method. Cache the model list in Redis or the database with a TTL to avoid repeated API calls and throttling. This is useful for filtering models by provider or region before routing requests in your application.
What are alternatives to symfony/ai-bedrock-platform for using Bedrock in Laravel?
Alternatives include calling AWS Bedrock directly with the AWS SDK for PHP, using an OpenAI-compatible client through Bedrock Mantle, or adopting another Laravel AI package that supports Bedrock. This package is most useful when you want Symfony AI abstractions, provider-style model routing, and documented payload handling for Claude, Llama, and Nova. Compare based on your need for multi-provider abstraction versus a simpler direct SDK integration.
How do I handle structured JSON output from Claude on Bedrock in Laravel?
Use Claude's structured output and JSON schema support through the package, then validate the returned JSON in Laravel before casting it to an array or Eloquent model. Reject invalid payloads early and log the raw response for debugging. Also handle the package's InvalidArgumentException for string payloads so malformed requests fail clearly in your application pipeline.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
andydefer/laravel-notification
adachsoft/cli-process-tester
jhaskell13/laraflow
sebastienheyd/boilerplate-media-manager
ccast/tagixo-primix
pretendtrue/laravel-builder
sawmainek/laravel-scout-tntsearch-driver
tomshaw/laravel-calendar-table
dibakar/laravel-ownership
steadrun/laravel-monitor
labyrinthe/connect-laravel
elmogy/layan
drewdan/sentinel-client
dskripchenko/laravel-llm
fatryst/nuonuo
stevenay/myanfont
gmostafa/php-graphql-client
xeviant/paystack
snowsoft/faker
meditationsteps/blogetc