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\xff\t\n\xfc\t\x01r\xc8\xda|\x11c\xa4\x0b\xcd%\x18\xbc\x9f\xf5\xa1\xea\xe6\xd44\x16\xf1\xac\xb2p_3\xe6\xf9\x08g\x85\xbe$\x1b\x8a\xaaB>V\xf5\n\x02\xc9&5\x8c\nE\xd9>sKA\x11\x16\x96\xb1F\x89\xe1\x85<\x9b6\xed\x17h\xcf\xd1b\x9e\xff\x1a\xa7\xc5Z\xf7\xda\xe5\xe1\x1a\xbb\xfe\xe7\xd0\xd2\x07R\x1c\xb8nW\rF\xafIX\xcf^\\\x19/\x1c\xd4\x1c\x83\xeb\xe6\xd19T\xbc\x96\xb5#\x9f\xfc\xfdf\xa10Z\xe56Q\xcd\x1c\xb5\xb5\n.G~\xc1W\x8c\x0ft\x97\xc4\x17\xd1X\x1f(\xceU\x17\xe5\xbf\x9d3p+`\x89Pgf\x07\xbbm\x81\x16\xe8\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\x82\x03\x86)XW\xf6\xf1>\x8a8/@\x83\x85\x11\xd9\x1d\xb7\xf7\x89\xee\r\x9f\xcb\xaf\xf9\x97\xa4\xbeS\x8d3N\x1b\r\xc7\xaa\x9cn\xd9\xd4\x9f\xdaK\xd2T<\xb6\xd5\x89H}\x97\xfe\xb4a[X+s\x144`\x9e\xc1\xf1b|\xbdG;L\xd0}\x8b\xf6\xfeS,K\xaa\x7fa\x18;\x80\x8f\x16\xef\xcc\xc4\xc2{V(\xe7\xdb\x7fr\nD\x02ON\x18\x0e,\xdb\xd3\x0f\xb9\xde7!6,*\x1eWI\xe0U`3\xdd\x06\xe1\xe34)\x9e\xbd\xea\xcah\xe0\xb2\x1a\x94\x14\xca/\x18=]\xa9{C\x84\xa7h"9\x9e\xc8\xa0#c\xbf1T\xfd\xecG\x90/y\xe9\x88\xa6Jz\x92\xe79mjT\xa28\xd4\xaa\xee\x11I\xc5\xf5\x9e\xc8\x18{Kt\xaf\x88WoE\xe3j\xd14j\x97\xe5\xe0|3\xf7\x80\x0f\xc3\x81b\x04\x17r\x8a\x0b\x91\xa1\xba\xf18_\xd4x\xd1u\xae\xa8\x03\xdd\x00\x8ai\n:\xad\xd68\xcb\xad\xd1h\xacC-\x82O8\x8af.\x0c\x87\xbe\x86WI\x18\x90\xf7\x03\xf7I\xa0\xf8ki\xfb\xbe\x93\x15\x8e\xc1\xe1\xde\xe9\x0c d\x19t\xb8\x12\x11\x82\xc6\xa4C3\xa2r\x05\xd2:\xe7Us\x83\xd4:0\x0f\x8f\x13Z{\x86nF\xf34H\x87\xfd\x86\x11\xb5\x85 b:\x89\xff]\x1f\xe5\xc6~\x91\x0b3\xdb\x89\x02\xc7\x05\xc7\xc1\xf2\xee\x83\x17\xfd0\xe54\xe5$\xc7U',
                                "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": 17,
                "cache_read_tokens": 0,
                "cache_write_tokens": 0,
                "reasoning_tokens": 327,
                "provider_tool_usage": None,
                "raw": "None",
                "total_tokens": 30,
            },
            "n_chunks": 3,
        }
    }
)
