from inline_snapshot import snapshot

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

test_snapshot = snapshot(
    {
        "response": {
            "provider_id": "openrouter",
            "model_id": "openrouter/anthropic/claude-3-5-sonnet-20241022",
            "provider_model_name": "anthropic/claude-3-5-sonnet-20241022",
            "params": {},
            "finish_reason": None,
            "usage": {
                "input_tokens": 12,
                "output_tokens": 5,
                "cache_read_tokens": 0,
                "cache_write_tokens": 0,
                "reasoning_tokens": 0,
                "provider_tool_usage": None,
                "raw": "CompletionUsage(completion_tokens=5, prompt_tokens=12, total_tokens=17, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=None, audio_tokens=None, reasoning_tokens=0, rejected_prediction_tokens=None), prompt_tokens_details=PromptTokensDetails(audio_tokens=None, cached_tokens=0, cache_write_tokens=0), cost=0.000222, is_byok=False, cost_details={'upstream_inference_cost': 0.000222, 'upstream_inference_prompt_cost': 7.2e-05, 'upstream_inference_completions_cost': 0.00015})",
                "total_tokens": 17,
            },
            "messages": [
                UserMessage(content=[Text(text="Say hello in one word")]),
                AssistantMessage(
                    content=[Text(text="Hello!")],
                    provider_id="openrouter",
                    model_id="openrouter/anthropic/claude-3-5-sonnet-20241022",
                    provider_model_name="anthropic/claude-3-5-sonnet-20241022",
                    raw_message={"content": "Hello!", "role": "assistant"},
                ),
            ],
            "format": None,
            "tools": [],
        }
    }
)
