#!/usr/bin/env python3
"""
Generated test file for Long Input Agent Test
Framework: pydantic-ai
Execution mode: async
Streaming: no"""

import os
import sentry_sdk
import asyncio

from pydantic_ai import Agent, ImageUrl, RunContext
from pydantic_ai.models.fallback import FallbackModel


sentry_sdk.init(
    dsn=os.environ.get("SENTRY_DSN"),
    traces_sample_rate=1.0,
    send_default_pii=True,
    stream_gen_ai_spans=True,
)



# Create Pydantic AI agent with system prompt
agent = Agent(
    FallbackModel("openai:gpt-4o-mini-bad-model-name", "openai:gpt-5-nano"),
    system_prompt="",
    name="summarizer_assistant"
)

# Register tools with the agent
@agent.tool
def get_word_count(context: RunContext, text: str):
    """Count the number of words in a text"""
    return 2400


async def main():
    # Turn 1: Run agent
    

    try:
        result = await agent.run("Please summarize the following text in one sentence. You may use the get_word_count tool first if needed: This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. This is a test message that will be repeated many times to create a very long input. ")

        # Print response
        print(f"Turn 1 Response: {result.output}")
    except Exception as e:
        print(f"Turn 1 Error: {type(e).__name__}: {e}")

if __name__ == "__main__":
    with sentry_sdk.start_transaction(op="test", name="Long Input Agent Test"):
        asyncio.run(main())
    sentry_sdk.flush(timeout=5)
