Skip to content

[Agent][Platform] Transform Serializer into a domain exception #786

@VincentLanglet

Description

@VincentLanglet

Currently there is two call to serializer

One issue is the fact,

  • Those call might throw exception (I recently got a MissingConstructorArgumentsException because the AI call didn't return the expected format of data)
  • Those exception are not documented anywhere
    • ToolResultConverter::convert has no throws tag, so does Toolbox\AgentProcessor::processOutput
    • AgentProcessor::processOutput has no throws tag

What could be interesting if you agree with @chr-hertel @OskarStark would be

  • To try/catch those call in order to throw an exception from symfony/agent
  • To document the processOutput that such exception could be thrown

Basically InputProcessorInterface::processInput and OutputProcessorInterface::processOutput should be restricted to throws Symfony\AI\Agent\Exception\ExceptionInterface only.

Metadata

Metadata

Assignees

No one assigned

    Labels

    AgentIssues & PRs about the AI Agent componentPlatformIssues & PRs about the AI Platform componentRFCRFC = Request For Comments (proposals about features that you want to be discussed)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions