Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes#30182: update tool names to match OpenAI function name pattern (#…
…30183) The OpenAI API requires function names to match the pattern '^[a-zA-Z0-9_-]+$'. This updates the JIRA toolkit's tool names to use underscores instead of spaces to comply with this requirement and prevent BadRequestError when using the tools with OpenAI functions. Error fixed: ``` File "langgraph-bug-fix/.venv/lib/python3.13/site-packages/openai/_base_client.py", line 1023, in _request raise self._make_status_error_from_response(err.response) from None openai.BadRequestError: Error code: 400 - {'error': {'message': "Invalid 'tools[0].function.name': string does not match pattern. Expected a string that matches the pattern '^[a-zA-Z0-9_-]+$'.", 'type': 'invalid_request_error', 'param': 'tools[0].function.name', 'code': 'invalid_value'}} During task with name 'agent' and id 'aedd7537-e8d5-6678-d0c5-98129586d3ac' ``` Issue:#30182
- Loading branch information