Repository navigation
[6.x] AI connections - #20006
Merged
Merged
[6.x] AI connections#20006
Conversation
Admins choose providers and models for AI tasks under Settings → AI. Providers come from laravel/ai's ai.providers config. Plugins register task classes and run laravel/ai agents and requests through them.
📚 Storybook previews@craftcms/ui — open Storybook No changed components detected in this Storybook. resources/js — open Storybook No changed components detected in this Storybook. |
riasvdv
marked this pull request as ready for review
October 17, 2026 12:51
Model fields list the default, cheapest, and smartest models laravel/ai names for the chosen provider, refreshing when a provider changes. Provider fields only offer providers that implement the modality's contract, and saving enforces it. Drop the display-only Capability enum in favor of task descriptions.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The AI settings screen lists each enabled task that can't run, with the reason, and other control panel screens show an alert linking to it. Providers without an API key are marked in the provider menus, and task details put the plugin name on its own line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…warnings Warn admins about AI tasks that can't run
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds AI connections: one place where core and plugins get AI provider access. Customers bring their own keys. Admins choose a provider and model per task under Settings → AI → Connections.
ai.default. A task is available only once Craft's settings choose a provider for it or for its modality.ai.providersentries. Craft stores no keys.TypeRegistry(AiTasks). Labels are translated at render time.laravel/ai: ^1.2.laravel/mcp, a dev dependency through Boost, moves from 0.9.4 to 1.0.2 to satisfy its conflict rule.docs/ai.md..Evidence
Settings → AI → Connections in the workbench, with two workbench tasks registered locally (the workbench registration isn't part of this PR):
Tests (
tests/Unit/Ai,tests/Feature/Ai):composer cipasses locally (Pint, Rector, PHPStan, 10,906 core tests, adapter tests).