Add support embedings via symfony/ai
## Motivation Support embeddings with symfony/ai. See parent issues. ## API New API: ``` // Pick the embeddings-capable platform(s). $platforms = \Drupal::service('plugin.manager.ai.platform') ->getPlatformsForOperationType('embeddings'); $platform = reset($platforms); // Operation-agnostic invoke. Input is a plain string (or list<string>). $result = $platform->invoke('text-embedding-3-small', 'Hello world')->getResult(); // Symfony VectorResult. $vectors = $result->getContent(); $floats = $vectors[0]->getData(); $dim = $vectors[0]->getDimensions(); ``` Legacy API: ``` // BC usage — pick by operation type $providers = \Drupal::service('ai.provider') ->getProvidersForOperationType('embeddings'); $provider = reset($providers); $output = $provider->embeddings( new EmbeddingsInput('Hello world'), 'text-embedding-3-small', ); $floats = $output->getNormalized(); ``` ## Implementation plan Wire embeddings through the platform layer 1. Make PlatformProxy implement EmbeddingsInterface 2. add BC via InputOutputConverter::toEmbeddingsOutput(DeferredResult): EmbeddingsOutput: t 3. getSupportedOperationTypes() reports 'embeddings' when the catalog has an EMBEDDINGS-capable model 4. AiProviderPluginManager::getProvidersForOperationType('embeddings') returns the platform proxies 5. Test fixture (ai_test EchoProvider) — add an EmbeddingsModel to the catalog 6. Test coverage for new and legacy API usage
task