Skip to content

Conversation

@jvancoillie
Copy link

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

This PR introduces support for configuring the Albert platform under the ai.platforms section, following the pattern of existing platforms (OpenAI, Mistral, Ollama, etc.).

The underlying Albert integration was already implemented, but the albert platform key was not recognized during configuration parsing.

ai:
  platforms:
    albert:
      api_key: '%env(ALBERT_API_KEY)%'
      base_url: '%env(ALBERT_API_URL)%'

The configuration uses base_url because this is the parameter expected by the Albert platform factory.
Some platforms use host instead, which might cause confusion. If needed, I'm open to aligning naming conventions in a follow-up discussion.

I did not define a default base_url, but we could consider providing the known Albert endpoint (https://albert.api.etalab.gouv.fr/v1) if that aligns with the project’s policy on defaults.

While working on this, I also noticed that the list of Albert models may not be fully aligned with the current API. I can open a separate issue to track that, unless this work is already in progress.

@carsonbot carsonbot changed the title feat(aibundle): add support for the albert platform configuration feat(aibundle): add support for the albert platform configuration Nov 6, 2025
@jvancoillie jvancoillie changed the title feat(aibundle): add support for the albert platform configuration [AI Bundle] add support for the albert platform configuration Nov 6, 2025
@OskarStark OskarStark requested a review from Copilot November 6, 2025 21:37
Copy link

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 adds support for the Albert AI platform to the Symfony AI bundle. Albert is an AI platform provided by the French government (etalab.gouv.fr).

Key changes:

  • Added Albert platform configuration with required api_key and base_url fields
  • Integrated Albert platform factory into the dependency injection container
  • Updated test fixtures to include Albert configuration

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/ai-bundle/config/options.php Added Albert platform configuration schema with api_key, base_url, and http_client options
src/ai-bundle/src/AiBundle.php Added Albert platform factory registration and service definition
src/ai-bundle/tests/DependencyInjection/AiBundleTest.php Added Albert platform configuration to test fixtures

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jvancoillie
Copy link
Author

Quick update: I added support for providing a custom ModelCatalog in the factory, so the Albert platform configuration is now consistent with the other platforms.

Also, regarding the model list: I saw that the alignment work was already merged, so that part is resolved (#839).

One open point from the original description: Albert currently uses base_url while some platforms use host. Do we want to standardize on one naming style across platforms, or keep it platform-specific for now?

Related to that: should we provide a default base_url for Albert (e.g. https://albert.api.etalab.gouv.fr/v1), or do we prefer requiring it explicitly in configuration?

@jvancoillie jvancoillie force-pushed the albert-config branch 2 times, most recently from 71aa87e to 154621c Compare November 7, 2025 09:51
@carsonbot carsonbot changed the title [AI Bundle] add support for the albert platform configuration add support for the albert platform configuration Nov 7, 2025
@chr-hertel
Copy link
Member

See #839 and #840 for other items - i think base_url vs host or default is fine like this

@chr-hertel
Copy link
Member

could you please squash the two commits?

- Add Albert platform configuration and service definitions.
- Make platform factory accept a customizable ModelCatalog instance.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[AI Bundle] Add albert platform configuration support

4 participants