Skip to content

[Platform][RFC] OpenAI Responses API #149

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

glengemann
Copy link

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

Hi! I've been playing around with the new OpenAI Responses API for a project. Just wondering if the changes in this branch are moving in the right direction.

@chr-hertel chr-hertel added the Platform Issues & PRs about the AI Platform component label Jul 17, 2025
@chr-hertel chr-hertel marked this pull request as draft July 17, 2025 20:52
@chr-hertel chr-hertel changed the title [RFC]: OpenAI Responses API [Platform][RFC]: OpenAI Responses API Jul 17, 2025
@chr-hertel
Copy link
Contributor

Hey @glengemann, thanks for working on this and thanks for checking in early for feedback 👍

I notice some things here:

  • in general I'd like to avoid different endpoint or models having impact to the Agent component - it might not always be possible and you found an unflexible part of the code there. I would rather try to bring in some extension points or contract handling - like with the tool schema - instead of just duplicating the AgentProcessor and ResponseFormatFactory
  • also with the changes within the Platform component there is a lot of duplication going on, e.g. 'GPTandResponsesclasses are basically the same - we just need it here because we can't differentiate the other extension points, like theInputBagNormalizer` in a different way - that's unfortunate.

what I'm basically saying here, I get why you checked in early - somehow this duplication feels odd, but the current extension points, like those supports methods, don't provide more flexibility.

In those cases I'd like to start from the user land code: how would we want the user to select the different apis? do they care at this point?

let's image we would use this:

use Symfony\AI\Platform\Bridge\OpenAI;

$platform = OpenAI\PlatformFactory($apiKey);
$model = new OpenAI\GPT();

$response = $platform->request($model, $messages);

vs.

use Symfony\AI\Platform\Bridge\OpenAI;

$platform = OpenAI\PlatformFactory($apiKey);
$model = new OpenAI\Responses();

$response = $platform->request($model, $messages);

So, my questions:

  • What would be the difference from a user point of view? Which features do we gain by adopting the Responses API?
  • If there is a benefit, could we go with something like this?
    use Symfony\AI\Platform\Bridge\OpenAI;
    
    $platform = OpenAI\PlatformFactory($apiKey);
    $model = new OpenAI\GPT();
    
    $response = $platform->request($model, $messages, ['api' => 'responses']); // with default ['api => 'completions']

If we'd go with an option, we would need to find a way to extend the supports methods to check for that - and the OpenAI\ModelClient would need to interpret that to choose the right endpoint.

@OskarStark OskarStark changed the title [Platform][RFC]: OpenAI Responses API [Platform][RFC] OpenAI Responses API Jul 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform Issues & PRs about the AI Platform component
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants