Skip to content

Conversation

@chr-hertel
Copy link
Member

@chr-hertel chr-hertel commented Jul 17, 2025

Q A
Bug fix? no
New feature? no
Docs? no
Issues
License MIT

This PR decouples the main Platform implementation from HTTP details, enabling Bedrock and TransformersPHP to drop their own Platform implementation.

I get that dealing with those RawXYZ objects is extra burden, but this is just one refactoring after each other - the goal was to decouple more from HTTP and reduce Platform implementations.

Key changes are in:

Everything else is noise but impossible to avoid.
Definitely up for discussing the naming of interfaces and classes involved here. feels a bit odd, but let's move the renaming to follow-up PR, and also please check #141 in that case.

@chr-hertel chr-hertel added Platform Issues & PRs about the AI Platform component BC Break Breaking the Backwards Compatibility Promise labels Jul 17, 2025
@chr-hertel chr-hertel force-pushed the platform-http-awareness branch from 4e52d57 to 686e4fa Compare July 17, 2025 01:34
@chr-hertel chr-hertel added the RFC RFC = Request For Comments (proposals about features that you want to be discussed) label Jul 17, 2025
@chr-hertel chr-hertel changed the title Remove HTTP awareness from Platform [Platform] Remove HTTP awareness from Platform Jul 17, 2025
@chr-hertel chr-hertel force-pushed the platform-http-awareness branch from 686e4fa to 0872104 Compare July 17, 2025 01:38
@OskarStark
Copy link
Contributor

We just created some CHANGELOG.md files.
Please rebase your branch and add info to the appropriate CHANGELOG.md file.

Thanks

Base automatically changed from refactor-decouple-client-converter to main July 17, 2025 20:10
@chr-hertel chr-hertel force-pushed the platform-http-awareness branch 2 times, most recently from 1da0f5b to af03865 Compare July 17, 2025 21:30
@chr-hertel chr-hertel force-pushed the platform-http-awareness branch from af03865 to f912f43 Compare July 18, 2025 08:06
@chr-hertel chr-hertel merged commit c0266db into main Jul 18, 2025
25 checks passed
welcoMattic pushed a commit to welcoMattic/ai that referenced this pull request Jul 18, 2025
…-hertel)

This PR was merged into the main branch.

Discussion
----------

[Platform] Remove HTTP awareness from Platform

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| Docs?         | no
| Issues        |
| License       | MIT

This PR decouples the main Platform implementation from HTTP details, enabling Bedrock and TransformersPHP to drop their own Platform implementation.

I get that dealing with those RawXYZ objects is extra burden, but this is just one refactoring after each other - the goal was to decouple more from HTTP and reduce Platform implementations.

**Key changes are in:**
* HTTP Decoupling:
  * [src/platform/src/ModelClientInterface.php](https://github.com/symfony/ai/pull/142/files#diff-2fa6af72c0c856e895a407798442305cadab6f7f0d0fa0d84f5c26ff6faaccac)
  * [src/platform/src/Platform.php](https://github.com/symfony/ai/pull/142/files#diff-660e8336450572154d3c925521d0b91b8e98f1c6bba0d0ca547e163873549a36)
  * [src/platform/src/Response/ResponsePromise.php](https://github.com/symfony/ai/pull/142/files#diff-ee22066b5a7dfe6e5daccca990feafd609d2afc07412210a9d630e54b057b454)
  * [src/platform/src/ResponseConverterInterface.php](https://github.com/symfony/ai/pull/142/files#diff-2847909fadca63a47d4156f7aec298b9a67992d198922d1f174fa2b961d7abd4)
* Additional Platform Removal
  * [src/platform/src/Bridge/Bedrock/PlatformFactory.php](https://github.com/symfony/ai/pull/142/files#diff-9d90025703ce4f7a3c795b186355435b8b0925de16859c0b4d52ab2cb88d5d51)
  * [src/platform/src/Bridge/TransformersPHP/PlatformFactory.php](https://github.com/symfony/ai/pull/142/files#diff-a6e435b3ff56bbcb596d7f241bfe2926467411d9b489a75573cb705e875c8079)

Everything else is noise but impossible to avoid.
Definitely up for discussing the naming of interfaces and classes involved here. feels a bit odd, but let's move the renaming to follow-up PR, and also please check symfony#141 in that case.

Commits
-------

f912f43 Remove HTTP awareness from Platform
@chr-hertel chr-hertel deleted the platform-http-awareness branch July 18, 2025 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BC Break Breaking the Backwards Compatibility Promise Platform Issues & PRs about the AI Platform component RFC RFC = Request For Comments (proposals about features that you want to be discussed)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants