Skip to content

[Bug] With Gemini models team agents are giving AttributeError: type object 'tuple' has no attribute 'raw_function' #2444

@bhuwan-nw18

Description

@bhuwan-nw18

Description

Recreating the examples provided here with Gemini models are resulting in AttributeError: type object 'tuple' has no attribute 'raw_function'
and a warning Could not parse args for transfer_task_to_: name 'Optional' is not
defined

Steps to Reproduce

Use google gemini model instead of Chat openAI and run

Code (if applicable)

This is an example code

from agno.agent import Agent
from agno.models.google import Gemini

duckduckgo_agent = Agent(
    name='DuckDuckGo Agent',
    model=Gemini(api_key=GEMINI_API_KEY, id="gemini-2.0-flash"),
    role='You are equipped with DuckDuckGo tools to help with searching business info on the web',
    tools=[DuckDuckGoTools()],
    show_tool_calls=True,
    debug_mode=True
)

team_agent = Agent(
    model=Gemini(api_key=GEMINI_API_KEY, id="gemini-2.0-flash"),
    team=[duckduckgo_agent],
    add_history_to_messages=True,
    # add_transfer_instructions=True,
    description=dedent('''
    You are now connected to the **DuckDuckGo Agent**.

 The **DuckDuckGo Agent** will help you fill in any missing information about businesses
    '''),
    instructions=[dedent('''
    Use the DuckDuckGo Agent to fill any missing information about businesses.
    ''')],
    # expected_output=expected_output,
    markdown=True,
    show_tool_calls=True,
    reasoning=True,
    debug_mode=True,
    structured_outputs=True,
    tool_choice="auto", 
)

Screenshots or Logs (if applicable)

/myenv/lib/python3.12/site-packages/pydantic/_internal/_validate_call.py", line 153, in eq
(self.raw_function == other.raw_function)
^^^^^^^^^^^^^^^^^^
AttributeError: type object 'tuple' has no attribute 'raw_function'

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions