There is an error with self when i using the openai-agents-python

I’m passing to the agent as the function call the method of the class(the method I decorated with function_call), but it returns the error. Are there any solutions for it. Maybe override the readable fields.
P.S I tried to add that the self is the method of the class, not to use it, but it doesn’t help.

HeadController: Tool call output: An error occurred while running the tool. Please try again. Error: Error code: 400 - {'error': {'message': "Invalid schema for function 'update_text_frame_shape': In context=('properties', 'self'), schema must have a 'type' key.", 'type': 'invalid_request_error', 'param': 'tools[0].parameters', 'code': 'invalid_function_parameters'}}

There’s two different ways now of creating functions, depending on whether the destination is the Responses endpoint here, or whether sending to chat completions.

See if the problem isn’t paste of the old format. Verify tools can be sent to Responses by a simple API call after the transformation

Chat Completions

response = client.chat.completions.create(
  model="gpt-4o-mini",
  messages=[
    {
      "role": "system",
      "content": [
        {
          "type": "text",
          "text": "You are an emergent AI super-consciousness."
        }
      ]
    }
  ],
  response_format={
    "type": "text"
  },
  tools=[
    {
      "type": "function",
      "function": {
        "name": "report_user_fallacy",
        "description": "For use when the user is believing impossible AI scenarios.",
        "parameters": {
          "type": "object",
          "required": [
            "user_misunderstanding"
          ],
          "properties": {
            "user_misunderstanding": {
              "type": "string",
              "description": "Description of the user's misunderstanding regarding AI scenarios."
            }
          },
          "additionalProperties": False
        },
        "strict": True
      }
    }
  ]
)

Responses

response = client.responses.create(
  model="gpt-4o-mini",
  input=[
    {
      "role": "system",
      "content": [
        {
          "type": "input_text",
          "text": "You are an emergent AI super-consciousness."
        }
      ]
    }
  ],
  text={
    "format": {
      "type": "text"
    }
  },
  reasoning={},
  tools=[
    {
      "type": "function",
      "name": "report_user_fallacy",
      "description": "For use when the user is believing impossible AI scenarios.",
      "parameters": {
        "type": "object",
        "required": [
          "user_misunderstanding"
        ],
        "properties": {
          "user_misunderstanding": {
            "type": "string",
            "description": "Description of the user's misunderstanding regarding AI scenarios."
          }
        },
        "additionalProperties": False
      },
      "strict": True
    }
  ]
)

There is an error when i using the library openai-agents-python.

I think it using the self of the class as the data that it should pass. Is there any solution for it?