Skip to content

Conversation

valtzu
Copy link
Contributor

@valtzu valtzu commented Sep 3, 2025

Q A
Bug fix? yes
New feature? no
Docs? no
Issues Fix #419
License MIT

Fix a couple of VertexAI issues:

  1. Bundle config was not working at all since instances were created build-time instead of building Definitions
  2. Access token was fetched build-time

To add tests, we'd need to add google/auth to dev dependencies. If that's ok, I'll do that and remove exclusion from phpstan.dist.neon.

@carsonbot carsonbot added Bug Something isn't working Status: Needs Review labels Sep 3, 2025
@valtzu valtzu force-pushed the fix-vertex-services branch 2 times, most recently from b48a570 to 231b952 Compare September 3, 2025 17:57
@chr-hertel
Copy link
Member

To add tests, we'd need to add google/auth to dev dependencies.

Yes please 👍

@valtzu valtzu force-pushed the fix-vertex-services branch from 231b952 to bf7b9ab Compare September 3, 2025 18:58
@chr-hertel
Copy link
Member

@1ed can you confirm this patch works for you?

@OskarStark OskarStark changed the title [AiBundle] Fix VertexAI services [AiBundle][VertexAI] Fix service definition Sep 4, 2025
@OskarStark OskarStark requested a review from Copilot September 4, 2025 05:55
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes critical issues with the VertexAI service definition in the AI Bundle where the configuration wasn't working properly due to build-time instantiation instead of proper dependency injection definitions.

  • Converts build-time credential fetching to proper service definitions using factories
  • Replaces build-time HTTP client creation with dependency injection definitions
  • Adds google/auth package to dev dependencies for testing

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/ai-bundle/src/AiBundle.php Converts VertexAI platform setup from build-time instantiation to proper service definitions
src/ai-bundle/composer.json Adds google/auth as dev dependency for testing
src/ai-bundle/tests/DependencyInjection/AiBundleTest.php Adds VertexAI configuration to test suite

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@OskarStark
Copy link
Contributor

Thanks for fixing this bug @valtzu.

@OskarStark OskarStark merged commit dafee7a into symfony:main Sep 4, 2025
7 checks passed
@1ed
Copy link

1ed commented Sep 5, 2025

@1ed can you confirm this patch works for you?

It works, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Status: Needs Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Platform][VertexAI] Invalid service config
5 participants