Weave Code
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 Azure Platform

Ai Azure Platform Laravel Package

symfony/ai-azure-platform

Symfony AI bridge for Microsoft Azure AI: connect to Azure OpenAI and Azure AI Foundry (including Responses API) via Symfony components. Provides integration points to call Azure-hosted models from Symfony AI with links to official Azure references.

View on GitHub
Deep Wiki
Context7

Azure AI platform bridge for Symfony AI

Frequently asked questions about Ai Azure Platform
Can I use this package with Laravel 10 and Symfony AI?
Yes, this package is designed for Laravel 10+ and works with Symfony AI. Ensure you pin Symfony dependencies (e.g., `^6.4`) in `composer.json` to avoid version conflicts. Laravel’s dependency injection and HTTP facade integrate smoothly with Symfony’s HttpClient.
How do I configure Azure API keys and endpoints in Laravel?
Store keys in `.env` (e.g., `AZURE_OPENAI_API_KEY`, `AZURE_FOUNDRY_ENDPOINT`) and reference them in `config/ai.php`. Laravel’s `.env` caching and Vault support (e.g., HashiCorp) simplify secure key management. Example: `'api_key' => env('AZURE_OPENAI_API_KEY')`.
Does this support Azure AI Foundry’s Responses API for structured outputs?
Yes, the package includes `ResponsesModelClient` for Foundry’s structured outputs (e.g., JSON schemas). Pair it with Laravel’s `spatie/laravel-array-to-object` or API resources to map responses to Eloquent models or DTOs cleanly.
How can I handle rate limits or retries for Azure API calls in Laravel?
Use Laravel’s `spatie/laravel-retryable` package for automatic retries on failures (e.g., 429 errors). Monitor Azure quotas via Laravel’s task scheduler and cache responses with `cache()->remember()` to reduce API calls.
Will this work with Laravel Queues for async AI processing?
Not natively, but you can wrap Azure calls in a custom Laravel job (e.g., `AzureAiJob`). Dispatch the job to handle long-running AI tasks asynchronously, then process results via queue listeners or webhooks.
Can I switch between Azure OpenAI and Foundry Llama dynamically?
Yes, the package supports dynamic provider routing via config-driven strategies. Define fallback providers in `config('ai.providers')` and use feature flags (e.g., A/B testing) to switch models at runtime.
How do I test Azure AI integrations without hitting real endpoints?
Use Symfony’s `MockHttpClient` to mock Azure responses in tests. Example: `$mockClient = new MockHttpClient(); $client = new ModelClient($mockClient, config('ai.azure'));` Laravel’s HTTP mocking also works for testing.
Are there alternatives to this package for Laravel?
For Azure-specific Laravel packages, consider `azure/azure-sdk-for-php` (low-level) or `guzzlehttp/guzzle` with custom wrappers. However, this package offers deeper Symfony AI integration, structured outputs, and multi-provider support out of the box.
How do I handle Azure authentication with Managed Identity in cloud deployments?
For Azure Managed Identity, use Laravel’s environment-aware configuration to inject the identity token dynamically. Example: `'auth' => ['managed_identity' => true]`. Ensure your cloud provider (e.g., Azure App Service) has the identity enabled.
Can I integrate AI responses into Laravel Blade templates?
Not directly, but you can create a Blade directive or helper function to format AI responses. Example: `@aiResponse($response)` with logic to parse and display structured data. Pair with Laravel’s `collect()` for easy templating.
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.
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor