from inline_snapshot import snapshot

from mirascope.llm import (
    AssistantMessage,
    Text,
    UserMessage,
)

test_snapshot = snapshot(
    {
        "response": {
            "provider_id": "google",
            "model_id": "google/gemini-3-pro-preview",
            "provider_model_name": "gemini-3-pro-preview",
            "finish_reason": None,
            "messages": [
                UserMessage(
                    content=[Text(text="Answer this question: What is 2 + 2?")]
                ),
                AssistantMessage(
                    content=[
                        Text(
                            text="""\
{
"integer_a": 2,
"integer_b": 2,
"answer": 4
}\
"""
                        )
                    ],
                    provider_id="google",
                    model_id="google/gemini-3-pro-preview",
                    provider_model_name="gemini-3-pro-preview",
                    raw_message={
                        "parts": [
                            {
                                "media_resolution": None,
                                "code_execution_result": None,
                                "executable_code": None,
                                "file_data": None,
                                "function_call": None,
                                "function_response": None,
                                "inline_data": None,
                                "text": """\
{
"integer_a": 2,
"integer_b": 2,
"answer": 4
}\
""",
                                "thought": None,
                                "thought_signature": None,
                                "video_metadata": None,
                            },
                            {
                                "media_resolution": None,
                                "code_execution_result": None,
                                "executable_code": None,
                                "file_data": None,
                                "function_call": None,
                                "function_response": None,
                                "inline_data": None,
                                "text": "",
                                "thought": None,
                                "thought_signature": b"\x12\xe6\x08\n\xe3\x08\x01r\xc8\xda|$w\xef'x\x04\xe5{\xb6g*\x8f6\x86D1\x13\xad\x8b\xcd#\x1e\xd5\xc7\x96\xaceat\xcbTE\xc6U\xf0\x97\x8e\x87\x15,[\x8b\xb3\xf0\x8b\xd188,\xc1\xfaFg\xe4\xe4=\xf6\xb1\x90\x81lT\xe3\x88d\xa2\x19\x96x\xf2\x9d\xe1\xd5\x10.u\xf8\x19\x88?\xee\xd9Q\xb3\x05\xf6\x08e\x88<\xa6\xf7\x13\x03\xd69r>\x88{8^\xb4u#\x95\xa8U1\x9d\xbf0\x00\xddW\x8b@G\xcb\xab5\x88\x1f*\xd12@\xdc\xa3\xea\x02W\xba\xf5\xda\xc0\xc5\xe4\x8eZX\x98\n\x958Y'\xcb\xe6\x9c\xd8\xd6\x0bbV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4l\xe7\x0b\xd2f\xc8\n\xdd?t)~0\xf7T{y\nB\xf9\xcc\x81rw,C\x8c\xcc\xf31\x89F\xbd{\x01\xef\xac6\xea\x9c#FP\xd8\xee\xe5\xb6\xb3\xf9\xe2\x04y\xb9\xe7\x92'\x11?\x9aG\x1c\x03z\x90!\x11\x11\x17CG\xc8v\xc6v\x1b\x03d}\xf6\xfb\xc3\xdc\x8dP\x15\xc2\xcb\x95\x97\x98V\x01\xa3X\x11\x1cC}o\x90\xc3\xfe\xe3\xb6DTxx\xa1#>\xcc\xbd\xdc\xcb5C!\x89%\xc6\x1f\xa0\x1f\x0f\xd6\xb7\x18\xda\x93a\t\xd1\xa8Hy\x92'\xd0\x18\xcc\xe8\xfbz\x98x\xc1i\x89\x86mub\xbf\x9d\xdfkH\x06\xa7\xdf\xc8\xe1\x08f\r\xc9/zb{\xb7\xa27$\x9e\x86\xcd\"\xd4r\xda\xf5\xcd\xa96X?\xd1\x1f\xa2\xf6\xeb\x92\x97\x16\xebf\xec@U\xbb>\xc9\xac\x0f",
                                "video_metadata": None,
                            },
                        ],
                        "role": "model",
                    },
                ),
            ],
            "format": {
                "name": "IntegerAdditionResponse",
                "description": "A simple response for testing.",
                "schema": {
                    "description": "A simple response for testing.",
                    "properties": {
                        "integer_a": {"title": "Integer A", "type": "integer"},
                        "integer_b": {"title": "Integer B", "type": "integer"},
                        "answer": {"title": "Answer", "type": "integer"},
                    },
                    "required": ["integer_a", "integer_b", "answer"],
                    "title": "IntegerAdditionResponse",
                    "type": "object",
                },
                "mode": "strict",
                "formatting_instructions": None,
            },
            "tools": [],
            "usage": {
                "input_tokens": 13,
                "output_tokens": 27,
                "cache_read_tokens": 0,
                "cache_write_tokens": 0,
                "reasoning_tokens": 284,
                "provider_tool_usage": None,
                "raw": "None",
                "total_tokens": 40,
            },
            "n_chunks": 3,
        }
    }
)
