microsoft / autogen

A programming framework for agentic AI 🤖
https://microsoft.github.io/autogen/
Creative Commons Attribution 4.0 International
34.67k stars 5.01k forks source link

Not clear error message when agent name is not valid (0.2 branch). #4157

Closed giorgossideris closed 1 week ago

giorgossideris commented 1 week ago

What feature would you like to be added?

This issue refers to the 0.2 branch.

The message when an agent name is not valid (based on the OpenAI's expected pattern) should be clearer (this problem is fixed in the main branch here).

The message right now is: BadRequestError: Error code: 400 - {'error': {'message': "Invalid 'messages[1].name': string does not match pattern. Expected a string that matches the pattern '^[a-zA-Z0-9_-]+$'.", 'type': 'invalid_request_error', 'param': 'messages[1].name', 'code': 'invalid_value'}}

Why is this needed?

It will be easier to identify the problem.

jackgerrits commented 1 week ago

Closing as not-planned/wontfix for now with rationale in this comment: https://github.com/microsoft/autogen/pull/4158#issuecomment-2479258774