diff --git a/python/mirascope/llm/clients/anthropic_vertex/__init__.py b/python/mirascope/llm/clients/anthropic_vertex/__init__.py index 9d6aa4c10..9524663eb 100644 --- a/python/mirascope/llm/clients/anthropic_vertex/__init__.py +++ b/python/mirascope/llm/clients/anthropic_vertex/__init__.py @@ -1,13 +1,10 @@ """Anthropic Vertex AI client implementations.""" -from .clients import ( - AnthropicVertexClient, - client, - get_client, -) +from .clients import AnthropicVertexClient, clear_cache, client, get_client __all__ = [ "AnthropicVertexClient", + "clear_cache", "client", "get_client", ] diff --git a/python/mirascope/llm/clients/cache.py b/python/mirascope/llm/clients/cache.py index 2346c2f91..a7998e163 100644 --- a/python/mirascope/llm/clients/cache.py +++ b/python/mirascope/llm/clients/cache.py @@ -2,6 +2,7 @@ from .anthropic import clear_cache as clear_anthropic_cache from .anthropic_bedrock import clear_cache as clear_bedrock_cache +from .anthropic_vertex import clear_cache as clear_vertex_cache from .azure_openai.completions import clear_cache as clear_azure_completions_cache from .azure_openai.responses import clear_cache as clear_azure_responses_cache from .google import clear_cache as clear_google_cache @@ -18,6 +19,7 @@ def clear_all_client_caches() -> None: clear_anthropic_cache() clear_bedrock_cache() + clear_vertex_cache() clear_azure_completions_cache() clear_azure_responses_cache() clear_google_cache() diff --git a/python/tests/e2e/conftest.py b/python/tests/e2e/conftest.py index ae3add263..6b8d97e3d 100644 --- a/python/tests/e2e/conftest.py +++ b/python/tests/e2e/conftest.py @@ -7,9 +7,11 @@ import hashlib import inspect +import json +import re from collections.abc import Awaitable, Callable, Generator from copy import deepcopy -from typing import TypedDict, get_args +from typing import TYPE_CHECKING, Any, TypedDict, get_args from typing_extensions import TypeIs import httpx @@ -23,9 +25,14 @@ from mirascope import llm from mirascope.llm.clients import clear_all_client_caches +if TYPE_CHECKING: + from typing import Any + + PROVIDER_MODEL_ID_PAIRS: list[tuple[llm.Provider, llm.ModelId]] = [ ("anthropic", "claude-sonnet-4-0"), ("anthropic-bedrock", "us.anthropic.claude-haiku-4-5-20251001-v1:0"), + ("anthropic-vertex", "claude-haiku-4-5@20251001"), ("google", "gemini-2.5-flash"), ("openai:completions", "gpt-4o"), ("openai:responses", "gpt-4o"), @@ -105,6 +112,15 @@ class VCRConfig(TypedDict, total=False): headers without affecting the actual HTTP requests. """ + before_record_response: Callable[[dict[str, Any]], dict[str, Any]] + """Callback to sanitize responses before saving to cassette. + + This function is called AFTER the real HTTP response is received, + but BEFORE it's written to the cassette file. Use this to sanitize sensitive + data in response bodies (e.g., OAuth tokens) without affecting the actual + HTTP responses received by the application. + """ + decode_compressed_response: bool """Whether to decode compressed responses. @@ -115,12 +131,15 @@ class VCRConfig(TypedDict, total=False): def sanitize_request(request: VCRRequest) -> VCRRequest: - """Sanitize sensitive headers in VCR request before recording to cassette. + """Sanitize sensitive headers and OAuth tokens in VCR request before recording. This hook is called AFTER the real HTTP request is sent (with valid auth), but BEFORE it's written to the cassette file. We deep copy the request and replace sensitive headers with placeholders. + Also sanitizes OAuth token refresh requests to Google's OAuth2 endpoint, + which contain sensitive refresh_token, client_id, and client_secret. + Args: request: VCR request object to sanitize @@ -133,9 +152,71 @@ def sanitize_request(request: VCRRequest) -> VCRRequest: if header in request.headers: request.headers[header] = [""] + if "oauth2.googleapis.com/token" in request.uri and request.body: + body_str = ( + request.body.decode() if isinstance(request.body, bytes) else request.body + ) + body_str = re.sub(r"refresh_token=[^&]+", "refresh_token=", body_str) + body_str = re.sub(r"client_secret=[^&]+", "client_secret=", body_str) + request.body = body_str + return request +def sanitize_response(response: dict[str, Any]) -> dict[str, Any]: + """Sanitize sensitive tokens in VCR response before recording to cassette. + + This hook is called AFTER the real HTTP response is received, + but BEFORE it's written to the cassette file. We sanitize OAuth tokens + from Google OAuth2 responses (used by AnthropicVertex). + + Args: + response: VCR response dict to sanitize + + Returns: + Sanitized copy of the response safe for cassette storage + """ + response = deepcopy(response) + + if "body" in response and "string" in response["body"]: + body_str = response["body"]["string"] + if isinstance(body_str, bytes): + try: + body_str = body_str.decode() + except UnicodeDecodeError: + # Body is likely compressed (gzip) or binary data + # Skip sanitization for these responses + return response + + if "access_token" in body_str or "id_token" in body_str: + try: + body_json = json.loads(body_str) + if "access_token" in body_json: + body_json["access_token"] = "" + if "id_token" in body_json: + body_json["id_token"] = "" + if "refresh_token" in body_json: + body_json["refresh_token"] = "" + response["body"]["string"] = json.dumps(body_json).encode() + except (json.JSONDecodeError, KeyError): + body_str = re.sub( + r'"access_token":\s*"[^"]+"', + '"access_token": ""', + body_str, + ) + body_str = re.sub( + r'"id_token":\s*"[^"]+"', '"id_token": ""', body_str + ) + body_str = re.sub( + r'"refresh_token":\s*"[^"]+"', + '"refresh_token": ""', + body_str, + ) + response["body"]["string"] = body_str.encode() + + return response + + @pytest.fixture(autouse=True) def _clear_client_caches() -> Generator[None, None, None]: """Ensure cached LLM client singletons do not bleed across e2e tests.""" @@ -155,13 +236,15 @@ def vcr_config() -> VCRConfig: - OpenAI (authorization header) - Google/Gemini (x-goog-api-key header) - Anthropic (x-api-key, anthropic-organization-id headers) + - AnthropicVertex (Google OAuth tokens in request/response bodies) - AWS Bedrock (AWS SigV4 headers: authorization, x-amz-*) Note: - We use before_record_request hook for sanitizing sensitive headers. - This ensures the real HTTP requests (with valid auth) are sent - successfully, but sensitive headers are replaced with placeholders - in the cassette files. + We use before_record_request hook for sanitizing sensitive headers + and OAuth request bodies. We use before_record_response hook for + sanitizing OAuth tokens in response bodies (e.g., access_token, id_token). + This ensures the real HTTP requests/responses (with valid auth) work + correctly, but sensitive data is replaced with placeholders in cassettes. We use 'raw_body' in match_on for exact binary matching and decode_compressed_response=False to preserve exact response bytes @@ -176,6 +259,7 @@ def vcr_config() -> VCRConfig: "filter_headers": [], # Don't filter here; use before_record_request "filter_post_data_parameters": [], "before_record_request": sanitize_request, + "before_record_response": sanitize_response, "decode_compressed_response": False, # Preserve exact response bytes } diff --git a/python/tests/e2e/input/cassettes/test_call_with_image_content/anthropic-vertex_claude_haiku_4_5@20251001.yaml b/python/tests/e2e/input/cassettes/test_call_with_image_content/anthropic-vertex_claude_haiku_4_5@20251001.yaml new file mode 100644 index 000000000..e2afa4750 --- /dev/null +++ b/python/tests/e2e/input/cassettes/test_call_with_image_content/anthropic-vertex_claude_haiku_4_5@20251001.yaml @@ -0,0 +1,448 @@ +interactions: +- request: + body: '' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + connection: + - keep-alive + host: + - en.wikipedia.org + user-agent: + - python-httpx/0.28.1 + method: GET + uri: https://en.wikipedia.org/static/images/icons/wikipedia.png + response: + body: + string: !!binary | + iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAABGdBTUEAALGPC/xhBQAANDtJREFU + eAHsmQVUW132xd9fxt3d3d3d3adTd1e+urt7iztFI0QgSogSrLhDApTG6va5w5l9buBNFvWWcd5a + vyaNvffuvvvscy/S+DF+jB/jx/gxfowf48dtj8bGxpd4vdV/crmqPgWkhoaGX5rN5i8D6d+NpKSk + D2dn5y/Ly1ek5Rcqm1UazS+B9PdizH/Q7x/4Tltb+zm320Otbe1nfH6/32orJ1Wx5hqQ/pXJyXG/ + PCkz88M5OTmvBxJ4eU5uQSA3v5C0egMVa0twH7pBpVqzDfPuf/7lnYGxf1dvb/8TdXUN5Pf3UV// + GWpobKK8gkJSa3UXgfSvhkJR/B19qfGE0WhpMVtsL1rL7GS12QcLFapdSmXxrwuKiignN58ys3OF + KBqIotboSaXWmnJy9K8H0lgyZj/U39//JafLHenq6qEzZwYEPp+PDEYzZefmDdkcjklAGivcbvf/ + V1fX7m1tbfc1N7c82dDQ9KTL5ekymUwfBNLtMBqNr7TZ7IttdkdaWbkj4HB5yO3xCpzuCip3uAiv + k8lS9pxWW/JnhUozp6BA8URGZhYEKRVodFFRFGpNIK9QsfJUQcFPgTQWPPQPtLe3v+FsMHiwsan5 + hfS0dCFEU3Mb1dTUUbndwWKQRq8PAmkscblc6exCpsfnp05MBK+3imw22++BFItGo/mIze5c43Z7 + 7Rj4ZzBxqLKqmqqqa8lbWUOeikp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yA1orsrXRsd37fr1oHdfgct9EknD/Ozc3Nzz4vns + jhR8InWIf2bEz02zAVVESozsZg/WJDWeaacZe/RW5ET17EKCIcZI+ZeZ2dlPxIhfmgThyu27p/8y + avMbg959ES73C0hPzMzMfO/U3NwvZhTrH8/MzD3irLm5Z4aoV+/de86pOf06lFzUW/L4qhD1hMnJ + mb/KONofuVfSGic+Tnyc+DjxceLjxMeJjxMf/we/9WTi3iKemAAAAABJRU5ErkJggg== + headers: + accept-ranges: + - bytes + access-control-allow-origin: + - '*' + age: + - '76212' + cache-control: + - max-age=31536000 + content-length: + - '13444' + content-type: + - image/png + date: + - Tue, 28 Oct 2025 16:01:33 GMT + etag: + - '"3484-6422cec6fad40"' + expires: + - Wed, 28 Oct 2026 16:01:33 GMT + last-modified: + - Tue, 28 Oct 2025 00:16:13 GMT + nel: + - '{ "report_to": "wm_nel", "max_age": 604800, "failure_fraction": 0.05, "success_fraction": + 0.0}' + report-to: + - '{ "group": "wm_nel", "max_age": 604800, "endpoints": [{ "url": "https://intake-logging.wikimedia.org/v1/events?stream=w3c.reportingapi.network_error&schema_uri=/w3c/reportingapi/network_error/1.0.0" + }] }' + server: + - mw-web.codfw.main-5f6dd6cc8c-p25tm + server-timing: + - cache;desc="hit-front", host;desc="cp5023" + set-cookie: + - WMF-Last-Access=29-Oct-2025;Path=/;HttpOnly;secure;Expires=Sun, 30 Nov 2025 + 12:00:00 GMT + - WMF-Last-Access-Global=29-Oct-2025;Path=/;Domain=.wikipedia.org;HttpOnly;secure;Expires=Sun, + 30 Nov 2025 12:00:00 GMT + - GeoIP=JP:13:Arakawa:35.75:139.79:v4; Path=/; secure; Domain=.wikipedia.org + - NetworkProbeLimit=0.001;Path=/;Secure;SameSite=None;Max-Age=3600 + - WMF-Uniq=OBwD1f5mge6_FtRNmL76GQKbAAAAAFvdHL1J-I0aePm-GDS0O_mBS9pB-vFjO6hL;Domain=.wikipedia.org;Path=/;HttpOnly;secure;SameSite=None;Expires=Thu, + 29 Oct 2026 00:00:00 GMT + strict-transport-security: + - max-age=106384710; includeSubDomains; preload + x-analytics: + - '' + x-cache: + - cp5023 miss, cp5023 hit/736108 + x-cache-status: + - hit-front + x-client-ip: + - 160.237.88.241 + x-request-id: + - 9322b0e6-52b7-4c55-b483-be2e8606a0f9 + status: + code: 200 + message: OK +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/userinfo.email + https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/sqlservice.login + openid", "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:11:46 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":[{"type":"text","text":"Describe + the following image in one sentence"},{"type":"image","source":{"type":"base64","media_type":"image/png","data":"iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAABGdBTUEAALGPC/xhBQAANDtJREFUeAHsmQVUW132xd9fxt3d3d3d3adTd1e+urt7iztFI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ewou9zguP3r059L+f2Yqcv/CtjD87rZJj9vZpXoQY6EZaWOQuLjge30OEcYkUVFe86J4XaSO61qpD2f8SIXikVOxY0mZM9LbQwg1VrFFAr4b83hk19TUI4LevQGXew3u0J9U+VMOHDh8UQj49zzXKGDRxQoNDg6IGIAhJgWkgRHnUblPLWPNfWWskUBFSQiWaiIJbEU8qClEQDDFtf1kgsH1s7Ozvxz07k243Cewe//+b7/kssuek119OIv699SMgpByqSZmqgcBbjbGDpACn3PH5rdFtW1O2nt4eJWby3B1kRDVJP80g4zYoGkBnQZouaf/yA1orsrXRsd37fr1oHdfgct9EknD/Ozc3Nzz4vnsjhR8InWIf2bEz02zAVVESozsZg/WJDWeaacZe/RW5ET17EKCIcZI+ZeZ2dlPxIhfmgThyu27p/8yavMbg959ES73C0hPzMzMfO/U3NwvZhTrH8/MzD3irLm5Z4aoV+/de86pOf06lFzUW/L4qhD1hMnJmb/KONofuVfSGic+Tnyc+DjxceLjxMeJjxMf/we/9WTi3iKemAAAAABJRU5ErkJggg=="}}]}],"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '18178' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2WRQWvbQBCF/8qwvaQgFzmNSaNbSeghDb000ENbxHg1lgavdpWdXTuy8X/vrNtA + QpFA4s33HvOYoxlDR840xjrMHS0G5G1eXC1Wi8v6crWs66WpDHcKjNK3u5ie23p5P67ucdyl8Onx + y9ebp2/h+vvN/lbBNE9UUBLBnlSIwRUBRVgS+qSSDT6R/jU/jy98oucyOX8a8w5+8JYn6hjhIfQB + 7khs5Clx8L/0eRxYQN800CvSKVnBhjDlyL4HBJkGimzRwZQPB0fQu7AmGLEjyBOEDbBuEl2w22KY + mCwJ7DkNsMPIIQs49H3WJmAHjGiVFkDfwd99BC7YW5e7Yn/AxB4cpQJVcDuwJ6EKPkdcs63OtqAr + R9hHTsUhsyQa5b2uUfLWpIAH1ljJcYNWzTKP6+D4UPBSl7ydrQulsQVfqtI5eMwuseOyrAO02kN4 + rUKaS83i3EQijVfmTQp+MKfflZEUpjYSSvB6APJdq9He/BsIPWX16KV8dq4y+Xzc5mjYTzm1KWzJ + i2k+Xulx0Q7UWo0q12rfAvXLXMfd/7OQ02vluj6d/gCQt2YjnwIAAA== + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:11:48 GMT + request-id: + - req_vrtx_011CUbYfVyGyzHjoNx73Uc9W + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/input/cassettes/test_call_with_image_url/anthropic-vertex_claude_haiku_4_5@20251001.yaml b/python/tests/e2e/input/cassettes/test_call_with_image_url/anthropic-vertex_claude_haiku_4_5@20251001.yaml new file mode 100644 index 000000000..4f1f60ad3 --- /dev/null +++ b/python/tests/e2e/input/cassettes/test_call_with_image_url/anthropic-vertex_claude_haiku_4_5@20251001.yaml @@ -0,0 +1,448 @@ +interactions: +- request: + body: '' + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + connection: + - keep-alive + host: + - en.wikipedia.org + user-agent: + - python-httpx/0.28.1 + method: GET + uri: https://en.wikipedia.org/static/images/icons/wikipedia.png + response: + body: + string: !!binary | + iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAABGdBTUEAALGPC/xhBQAANDtJREFU + eAHsmQVUW132xd9fxt3d3d3d3adTd1e+urt7iztFI0QgSogSrLhDApTG6va5w5l9buBNFvWWcd5a + vyaNvffuvvvscy/S+DF+jB/jx/gxfowf48dtj8bGxpd4vdV/crmqPgWkhoaGX5rN5i8D6d+NpKSk + D2dn5y/Ly1ek5Rcqm1UazS+B9PdizH/Q7x/4Tltb+zm320Otbe1nfH6/32orJ1Wx5hqQ/pXJyXG/ + PCkz88M5OTmvBxJ4eU5uQSA3v5C0egMVa0twH7pBpVqzDfPuf/7lnYGxf1dvb/8TdXUN5Pf3UV// + GWpobKK8gkJSa3UXgfSvhkJR/B19qfGE0WhpMVtsL1rL7GS12QcLFapdSmXxrwuKiignN58ys3OF + KBqIotboSaXWmnJy9K8H0lgyZj/U39//JafLHenq6qEzZwYEPp+PDEYzZefmDdkcjklAGivcbvf/ + V1fX7m1tbfc1N7c82dDQ9KTL5ekymUwfBNLtMBqNr7TZ7IttdkdaWbkj4HB5yO3xCpzuCip3uAiv + k8lS9pxWW/JnhUozp6BA8URGZhYEKRVodFFRFGpNIK9QsfJUQcFPgTQWPPQPtLe3v+FsMHiwsan5 + hfS0dCFEU3Mb1dTUUbndwWKQRq8PAmkscblc6exCpsfnp05MBK+3imw22++BFItGo/mIze5c43Z7 + 7Rj4ZzBxqLKqmqqqa8lbWUOeikpyuYdFgUB2p5tsEIXdUlJqerRYo3sOQuC5kXQlpcMu0ZFSraUi + ZTEVFKmoQKFSxcfHvwxID8NDfXlgIDDX5/M/7/f30snjJykYDOEmaygfNs86lUuZOadIoSp+0m63 + vw5IY4laXdxVU3uay6IsSltbB3k8FSqLpWyGw+FY4K2qSq6uqe3mEtrU3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hMnJ + mb/KONofuVfSGic+Tnyc+DjxceLjxMeJjxMf/we/9WTi3iKemAAAAABJRU5ErkJggg== + headers: + accept-ranges: + - bytes + access-control-allow-origin: + - '*' + age: + - '76215' + cache-control: + - max-age=31536000 + content-length: + - '13444' + content-type: + - image/png + date: + - Tue, 28 Oct 2025 16:01:33 GMT + etag: + - '"3484-6422cec6fad40"' + expires: + - Wed, 28 Oct 2026 16:01:33 GMT + last-modified: + - Tue, 28 Oct 2025 00:16:13 GMT + nel: + - '{ "report_to": "wm_nel", "max_age": 604800, "failure_fraction": 0.05, "success_fraction": + 0.0}' + report-to: + - '{ "group": "wm_nel", "max_age": 604800, "endpoints": [{ "url": "https://intake-logging.wikimedia.org/v1/events?stream=w3c.reportingapi.network_error&schema_uri=/w3c/reportingapi/network_error/1.0.0" + }] }' + server: + - mw-web.codfw.main-5f6dd6cc8c-p25tm + server-timing: + - cache;desc="hit-front", host;desc="cp5023" + set-cookie: + - WMF-Last-Access=29-Oct-2025;Path=/;HttpOnly;secure;Expires=Sun, 30 Nov 2025 + 12:00:00 GMT + - WMF-Last-Access-Global=29-Oct-2025;Path=/;Domain=.wikipedia.org;HttpOnly;secure;Expires=Sun, + 30 Nov 2025 12:00:00 GMT + - GeoIP=JP:13:Arakawa:35.75:139.79:v4; Path=/; secure; Domain=.wikipedia.org + - NetworkProbeLimit=0.001;Path=/;Secure;SameSite=None;Max-Age=3600 + - WMF-Uniq=SX3XE9p0z2_Cs34gAUB6UgKbAAAAAFvdJuFX2hSh5QDhh3sQS8kDUdu9C6WBA5FF;Domain=.wikipedia.org;Path=/;HttpOnly;secure;SameSite=None;Expires=Thu, + 29 Oct 2026 00:00:00 GMT + strict-transport-security: + - max-age=106384710; includeSubDomains; preload + x-analytics: + - '' + x-cache: + - cp5023 miss, cp5023 hit/736140 + x-cache-status: + - hit-front + x-client-ip: + - 160.237.88.241 + x-request-id: + - df69ea5d-af2e-4b53-9ab7-9fd454aea72a + status: + code: 200 + message: OK +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/cloud-platform + https://www.googleapis.com/auth/sqlservice.login openid https://www.googleapis.com/auth/userinfo.email", + "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:11:49 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":[{"type":"text","text":"Describe + the following image in one sentence"},{"type":"image","source":{"type":"base64","media_type":"image/png","data":"iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAABGdBTUEAALGPC/xhBQAANDtJREFUeAHsmQVUW132xd9fxt3d3d3d3adTd1e+urt7iztFI0QgSogSrLhDApTG6va5w5l9buBNFvWWcd5avyaNvffuvvvscy/S+DF+jB/jx/gxfowf48dtj8bGxpd4vdV/crmqPgWkhoaGX5rN5i8D6d+NpKSkD2dn5y/Ly1ek5Rcqm1UazS+B9PdizH/Q7x/4Tltb+zm320Otbe1nfH6/32orJ1Wx5hqQ/pX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QiWaiIJbEU8qClEQDDFtf1kgsH1s7Ozvxz07k243Cewe//+b7/kssuek119OIv699SMgpByqSZmqgcBbjbGDpACn3PH5rdFtW1O2nt4eJWby3B1kRDVJP80g4zYoGkBnQZouaf/yA1orsrXRsd37fr1oHdfgct9EknD/Ozc3Nzz4vnsjhR8InWIf2bEz02zAVVESozsZg/WJDWeaacZe/RW5ET17EKCIcZI+ZeZ2dlPxIhfmgThyu27p/8yavMbg959ES73C0hPzMzMfO/U3NwvZhTrH8/MzD3irLm5Z4aoV+/de86pOf06lFzUW/L4qhD1hMnJmb/KONofuVfSGic+Tnyc+DjxceLjxMeJjxMf/we/9WTi3iKemAAAAABJRU5ErkJggg=="}}]}],"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '18178' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2WRQW8TMRCF/8rIHABpgzahySE3KL1AhJBAAgTVyrVn49F6bddjp02j/HdmFyoV + VbZk+31Pz57xSY3RoldbZbyuFhdO01AXF4v1YtWu1su2XapGkRXDyPvukMt91y6v3JerzWb4+vNj + crvP73+E1XDrPomxHBNOVmTWexQhRz8Jmpm46FBEMjEUlN321+nRX/B+IvOyVS/gOw2U0JKGXdxH + +IBsMqVCMfyW8c0Rg8zi8InTi7OBHnWpmcIeNHBymBFMHFNktBB7SPXhwSMkQoMMd1QcHHSmWBk8 + loKZQQcLxumszXzscxzBUt9LVChwl6lM6XzkgiPDKwrGVztJOy2kgctjJu/JNPAu65tpvXQUkLGZ + o6O8OvPrBjKmLGqY46ZSMJij8XGu5iXDWH0hL7Bq//dR0Xt9E7Ncc0AIU534Rp2vG8Ulpi6j5hik + fRhsJyyof4Dxtkq29DlU7xtV56/ZnhSFVEtX4oCB1fbthXyNNg47I1FTr7v/De0jF2yfs1jLU2W9 + OZ//AK3nf11dAgAA + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:11:50 GMT + request-id: + - req_vrtx_011CUbYfgeUBMqWGs5ECAu6e + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/input/cassettes/test_call_with_params/anthropic-vertex_claude_haiku_4_5@20251001.yaml b/python/tests/e2e/input/cassettes/test_call_with_params/anthropic-vertex_claude_haiku_4_5@20251001.yaml new file mode 100644 index 000000000..960b2fc84 --- /dev/null +++ b/python/tests/e2e/input/cassettes/test_call_with_params/anthropic-vertex_claude_haiku_4_5@20251001.yaml @@ -0,0 +1,136 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/userinfo.email + https://www.googleapis.com/auth/sqlservice.login https://www.googleapis.com/auth/cloud-platform + openid", "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:11:51 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":500,"messages":[{"role":"user","content":"What is 4200 + + 42?"}],"stop_sequences":["4242"],"temperature":0.7,"thinking":{"type":"disabled"},"top_k":50,"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '204' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2WOwWrDMAyGXyX4ugZs47LNsEthrPTUw3YawxhHJF5TO4vk0i7k3WcHegg7yfq/ + T7Imdo4N9Ewz19vUQN1Zf0q1qre15HIrOBdsw3yThTO25jLS1XDxHl+ffi8HdWt23XEvP9724vu5 + zSLdBigqINoWcjDGvgQW0SPZQDlyMRDkl/6c7j7BtZClaKYk59VDpWT1UrH5a8OQ4mBGsBhDxkuH + 8JMguPLFui/jSuY4LRfoifkwJDIUTxCQafGYL7CuA+PyRvIxmLXA7zzj5j+LiVbr5Dz/AV9ii3pE + AQAA + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:11:51 GMT + request-id: + - req_vrtx_011CUbYfq1G88VTUUm9d3BT4 + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/input/cassettes/test_call_with_text_encoded_thoughts/anthropic-vertex_claude_haiku_4_5@20251001.yaml b/python/tests/e2e/input/cassettes/test_call_with_text_encoded_thoughts/anthropic-vertex_claude_haiku_4_5@20251001.yaml new file mode 100644 index 000000000..eeacaa627 --- /dev/null +++ b/python/tests/e2e/input/cassettes/test_call_with_text_encoded_thoughts/anthropic-vertex_claude_haiku_4_5@20251001.yaml @@ -0,0 +1,146 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/cloud-platform + https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/sqlservice.login + openid", "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:11:52 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Is the first + fibonacci number to end with the digits 57 prime?"},{"role":"assistant","content":[{"type":"text","text":"**Thinking:** + Let me see... I have instantenously remembered this table of fibonacci\nnumbers + with their prime factorizations. That''s sure convenient! Let\nme see if it + has the answer:\n0 : 0\n1 : 1\n2 : 1\n3 : 2\n4 : 3\n5 : 5\n6 : 8 = 23\n7 : 13\n8 + : 21 = 3 x 7\n9 : 34 = 2 x 17\n10 : 55 = 5 x 11\n11 : 89\n12 : 144 = 24 x 32\n13 + : 233\n14 : 377 = 13 x 29\n15 : 610 = 2 x 5 x 61\n16 : 987 = 3 x 7 x 47\n17 + : 1597\n18 : 2584 = 23 x 17 x 19\n19 : 4181 = 37 x 113\n20 : 6765 = 3 x 5 x + 11 x 41\n21 : 10946 = 2 x 13 x 421\n22 : 17711 = 89 x 199\n23 : 28657\n\nThere + we have it! 28657 is the first fibonacci number ending in 57,\nand it is prime. + I''m supposed to answer with extreme concision, so I''ll\njust say ''Yes.''"},{"type":"text","text":"Yes."}]},{"role":"user","content":"Please + tell me what the number is."}],"system":"Always answer with extreme concision, + giving the answer and no added context.","anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '1118' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2WNwWrDMAxA/0XnBJzQpMO3scNgt+2ywxjG2KIxSeTUkkdLyL/PKSts7CTx3kNa + YY4eJ9DgJps91oMNY64PdVe3qu0apRqoIPgSzHwyX0kuRjVP4+M5XvsjvbkxvT4P7y/eylxCuS64 + p8hsT1hAitMOLHNgsSQFuUiCZdMf670XvOzmNjS0D313hO2zApa4mISWIxWO5I3kRPAjGM8ZyZUD + lKepgnz7qVcItGQxEkckBn1o+vLUugGNK7ckRDJ/C3X3Rfv/Lmb5Tfpt+wav2RJeNgEAAA== + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:11:52 GMT + request-id: + - req_vrtx_011CUbYfucLBV4KpEaEEoeYJ + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/input/cassettes/test_resume_with_override/anthropic-vertex_claude_haiku_4_5@20251001.yaml b/python/tests/e2e/input/cassettes/test_resume_with_override/anthropic-vertex_claude_haiku_4_5@20251001.yaml new file mode 100644 index 000000000..27990824e --- /dev/null +++ b/python/tests/e2e/input/cassettes/test_resume_with_override/anthropic-vertex_claude_haiku_4_5@20251001.yaml @@ -0,0 +1,251 @@ +interactions: +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Who created you?"}],"model":"claude-sonnet-4-0"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + anthropic-version: + - '2023-06-01' + connection: + - keep-alive + content-length: + - '106' + content-type: + - application/json + host: + - api.anthropic.com + user-agent: + - Anthropic/Python 0.64.0 + x-api-key: + - + x-stainless-arch: + - arm64 + x-stainless-async: + - 'false' + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://api.anthropic.com/v1/messages + response: + body: + string: !!binary | + H4sIAAAAAAAAAwAAAP//dJBNTxsxEIb/ymguvTgoS4mQfEOoUkN7bA8FodVgD6wV79j1zAIhyn9H + mzalH+rJ0vs8fj3jHY4lckaPIdMUeaFFhG1xtjhdnq6Wq+4MHaaIHkd96JfdZ/p6HTbt09XV04f0 + crlp9dvHL4wObVt5tliVHuaglTwHpJrUSAwdhiLGYuhvdkff+Hkmh8PjGp5IITQm4wh3W7gQG1qp + KTgggYs1KN2zbSGUsZJsT2D9boTLw+RH49eDEPmRc6k/mmzg1MCYRrACdwwD53o/ZQcDtTGz6lwQ + YSjCaie4v3WoVmrfmLQIemSJvU1N8CdQ/j6xBEYvU84Op8PifodJ6mS9lQ2Lou86h4HCwP1hr1Sk + /1NYHnljiv9jx7tzP9eBR26U+9X4r/9Gu+FvundYJvs9en/uULk9psC9JW7ocf68SC3ifv8KAAD/ + /wMADEjNPh4CAAA= + headers: + CF-RAY: + - 9962ebdc2874d76c-NRT + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Wed, 29 Oct 2025 13:11:57 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + X-Robots-Tag: + - none + anthropic-organization-id: + - 217a607f-ed5e-40af-8a7d-f83ed52d59d6 + anthropic-ratelimit-input-tokens-limit: + - '2000000' + anthropic-ratelimit-input-tokens-remaining: + - '2000000' + anthropic-ratelimit-input-tokens-reset: + - '2025-10-29T13:11:55Z' + anthropic-ratelimit-output-tokens-limit: + - '400000' + anthropic-ratelimit-output-tokens-remaining: + - '400000' + anthropic-ratelimit-output-tokens-reset: + - '2025-10-29T13:11:57Z' + anthropic-ratelimit-requests-limit: + - '4000' + anthropic-ratelimit-requests-remaining: + - '3999' + anthropic-ratelimit-requests-reset: + - '2025-10-29T13:11:53Z' + anthropic-ratelimit-tokens-limit: + - '2400000' + anthropic-ratelimit-tokens-remaining: + - '2400000' + anthropic-ratelimit-tokens-reset: + - '2025-10-29T13:11:55Z' + cf-cache-status: + - DYNAMIC + request-id: + - req_011CUbYfwJXcrCBZrH97PprD + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + via: + - 1.1 google + x-envoy-upstream-service-time: + - '4396' + status: + code: 200 + message: OK +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "openid + https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/sqlservice.login + https://www.googleapis.com/auth/cloud-platform", "token_type": "Bearer", "id_token": + ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:11:58 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Who created you?"},{"role":"assistant","content":"I + was created by Anthropic, an AI safety company. I''m Claude, an AI assistant + developed by their team to be helpful, harmless, and honest."},{"role":"user","content":"Can + you double-check that?"}],"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '345' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2WRQW/bMAyF/wqhyy524ATJWuQy9LABAXbbZe06GIrExGpkyjWppF6Q/z4qW7sN + O0ng+/QeSZ1NnzxGszYu2uyx7mw45HpZr+pFs1jNm2ZuKhO8Aj3v2+MoL20z//z+4316WN48PRyX + x1s7fxZZ/PiqoEwDFhSZ7R61MKZYCpY5sFgSLblEgnpbfzu/8oIvRbkea3OPXMHmXQ9K7oJXFgKB + dFbAEp9wnMEGTpbBjWgFPWwnuCPpxjQEVykDdxtgu0OZ1KIfLE2wtayg2nxR+dNoyQV2afbnHXg8 + YkyDUj2CJNgiWOgwDrscK+js2Eedqth76BIhS4l5G2z2SI+0YW0TRwROPUoXaA88oAs79b/231uP + MKWs7etUv4J8ytuItevQHSpII5yKQ4GesoaIJhWjvgxDJQ3JTR/M5XtlWNLQ6hI4ke4NybeSRzK/ + BcbnrKwumHKMlcnXP1mfTaAhSyvpgMRmvbrVP7Ea3173GRK1/wLNq66y/19LWf6u3DSXy0+yp1N7 + VgIAAA== + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:11:59 GMT + request-id: + - req_vrtx_011CUbYgLQqPzsLiLqeJiW7t + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/input/cassettes/test_resume_with_override_context/anthropic-vertex_claude_haiku_4_5@20251001.yaml b/python/tests/e2e/input/cassettes/test_resume_with_override_context/anthropic-vertex_claude_haiku_4_5@20251001.yaml new file mode 100644 index 000000000..a2c6e94d5 --- /dev/null +++ b/python/tests/e2e/input/cassettes/test_resume_with_override_context/anthropic-vertex_claude_haiku_4_5@20251001.yaml @@ -0,0 +1,244 @@ +interactions: +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Who created you?"}],"model":"claude-sonnet-4-0"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + anthropic-version: + - '2023-06-01' + connection: + - keep-alive + content-length: + - '106' + content-type: + - application/json + host: + - api.anthropic.com + user-agent: + - Anthropic/Python 0.64.0 + x-api-key: + - + x-stainless-arch: + - arm64 + x-stainless-async: + - 'false' + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://api.anthropic.com/v1/messages + response: + body: + string: !!binary | + H4sIAAAAAAAAA3SQTUvDQBCG/0p4z1tJauthb9qLIoIfeFFk2e6OTTCZjbuz1lDy3yXFIlY8Dczz + zMzL7NAFTy00XGuzp1kKzCSzxWxezpflslpAofHQ6NLGlNXj6+ndzSU/3D51q/v1cLHaXsezAQoy + 9DRZlJLdEBRiaKeGTalJYlmg4AILsUA/7w6+0OdE9kXjqtjaVLhIVsgX66E4Z6lj6Bt3gvFFIUno + TSSbAkOD2BvJkfENEr1nYkfQnNtWIe+T6B0a7rMYCW/ECbqqFJx1NZn9oSaw+S2UBx7J+v/YYXba + T31NHUXbmmX31/+hVX1MR4WQ5ThdovjRODLSUITG9D5vo8c4fgEAAP//AwBs880jrwEAAA== + headers: + CF-RAY: + - 9962ec04baddd76c-NRT + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Wed, 29 Oct 2025 13:12:01 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + X-Robots-Tag: + - none + anthropic-organization-id: + - 217a607f-ed5e-40af-8a7d-f83ed52d59d6 + anthropic-ratelimit-input-tokens-limit: + - '2000000' + anthropic-ratelimit-input-tokens-remaining: + - '2000000' + anthropic-ratelimit-input-tokens-reset: + - '2025-10-29T13:12:01Z' + anthropic-ratelimit-output-tokens-limit: + - '400000' + anthropic-ratelimit-output-tokens-remaining: + - '400000' + anthropic-ratelimit-output-tokens-reset: + - '2025-10-29T13:12:01Z' + anthropic-ratelimit-requests-limit: + - '4000' + anthropic-ratelimit-requests-remaining: + - '3999' + anthropic-ratelimit-requests-reset: + - '2025-10-29T13:11:59Z' + anthropic-ratelimit-tokens-limit: + - '2400000' + anthropic-ratelimit-tokens-remaining: + - '2400000' + anthropic-ratelimit-tokens-reset: + - '2025-10-29T13:12:01Z' + cf-cache-status: + - DYNAMIC + request-id: + - req_011CUbYgR2Pz9PGqkcVEn7mo + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + via: + - 1.1 google + x-envoy-upstream-service-time: + - '2037' + status: + code: 200 + message: OK +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/userinfo.email + https://www.googleapis.com/auth/cloud-platform openid https://www.googleapis.com/auth/sqlservice.login", + "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:12:02 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Who created you?"},{"role":"assistant","content":"I + was created by Anthropic."},{"role":"user","content":"Can you double-check that?"}],"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '234' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2WQTUvDQBCG/8qwl16SkvQDMRcpXiyI6MGCFQnb7LRZk8zG7GxtKP3vTovViqcZ + 3vfhnY+9apzBWmWqqHUwGJfaViGexNN4lIymaZKkKlLWCND4Tb7teJcn6bXVy83zcjt+uKf3q9Xj + olrcPRkBuW/xiKL3eoMidK4+Ctp761kTi1Q4YpQue92fecbd0TmVTL2gj2AOhSYQdm27BrjUPIT5 + oIHb05oRiDmbw08uNNogrHqYEZeda20x/G3B+m/e6zVyL7FNq6mHtQtk0IAlkGtTmeBlFHYI3jXI + paUN+BYLu5aQ3oWBgdpWCOygIvcJeuUCX8xxHTSS3qFm6+hGHd4i5dm1uSjekdyGZHIOHalvw+NH + QCrkCRTqOlLh9Ldsryy1gXN2FZJX2Xgkf9NFifk5PP8LJGdfbPPfkzUvlenkcPgCod0qkPoBAAA= + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:12:03 GMT + request-id: + - req_vrtx_011CUbYgdnrJPCAvfA16oBiA + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/input/cassettes/test_resume_with_override_thinking_and_tools/anthropic-vertex_claude_haiku_4_5@20251001.yaml b/python/tests/e2e/input/cassettes/test_resume_with_override_thinking_and_tools/anthropic-vertex_claude_haiku_4_5@20251001.yaml new file mode 100644 index 000000000..06bacc809 --- /dev/null +++ b/python/tests/e2e/input/cassettes/test_resume_with_override_thinking_and_tools/anthropic-vertex_claude_haiku_4_5@20251001.yaml @@ -0,0 +1,261 @@ +interactions: +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"What is the 100th + fibonacci number?"}],"model":"claude-sonnet-4-0","thinking":{"type":"enabled","budget_tokens":8000},"tools":[{"name":"compute_fib","description":"Compute + the nth Fibonacci number (1-indexed).","input_schema":{"properties":{"n":{"title":"N","type":"integer"}},"required":["n"],"additionalProperties":false,"type":"object"}}]}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + anthropic-version: + - '2023-06-01' + connection: + - keep-alive + content-length: + - '400' + content-type: + - application/json + host: + - api.anthropic.com + user-agent: + - Anthropic/Python 0.64.0 + x-api-key: + - + x-stainless-arch: + - arm64 + x-stainless-async: + - 'false' + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://api.anthropic.com/v1/messages + response: + body: + string: !!binary | + H4sIAAAAAAAAAwAAAP//bFRbr+I2GPwrlp9awTkkhABB6gMngRDuEAKEboUcxySG4IAvIXB0/nsF + 2912pb75G8+MR580/oTnPCYZ7ECcIRWTN5EzRuRb462u1U3N1BuwCmkMO/Askr2mL0ckDgZHa3Ls + Ba1G3TBSsitTWIXyfiFPFhECJQRWIc+zJ4CEoEIiJmEV4pxJwiTs/Pn5gy9Tyk6UJU+HH8cOXKUE + KEE4oAIg8QTBIedApgTomiZT0KdRzhDGFDB1jgh/Bx5IUUEAwpgIAWQOEDgohiXNGcAoy0gMvkGc + ny9Kkv2BRt8gkCmSACMG/oFf/ux/3MFv+htlMSlJ/Ps7+BkuRQJceF7QmMQvrbgQTA8UgwJligD2 + h65pVSDyn+Gy7MXj5KooJzG4II7ORBL+SnxGp+8Zfgn+DqtQ0IQhqfhzYz2+cOxT6NnLxB6dbD0w + 0djB+NZMDyOJN9zO7BXdNSd6fWOJg+95Y8fom4mdJPYM9cbxfTLG249JY+EFlXBkTXbM3E2UWejL + sk2j0+jOo20veVwdzUO3TZs2D66u3xvIsSPebErTY+ui2cdDYXu3fOqMZa22aIRT084uXlqWhr8Z + MLPbnbacsLJ+rLtW3yqvhrDypFlr3Npt2wsUne/K1iO7jy7CTkPm+kn76tK5s2stuwFz7/PGidvT + ay7zxPi4zQy+aAiXb3GcLMZ4a3FNV3bkmYlOhsOpv/pwNtlMrerL2Xm4SmaSpgdR83uVzDxabGZF + QYiivrGY11yjT7EdkdLi3dA0CpVVpjtS426F9lyFD3LKlipLMTkWpakdzRF79JeGGLnuYDLTmNOu + 9fXjMctq9nVTNOckctxhdLSm4UXmUi+Wo+h2lhsvnR3vD+ajnTMeblfDtrMVNVK53oIoGIkpcrat + ezuUePBYpt0Pq1jM0/JYd92THaYx8iJJ8fY45mndPBVjf7L0Htt1a4VuOhscLqvRrV8jpj++B9nZ + 8qN+dm3TOWYK91fzZOqndji7JeakGN51MhnUxQ47ym2slbU+2Um3zgP7UeF+vRiWyQf8qv7bxDzP + 9kqQH31/zmqv6au1CE7NQ2gZ5tAvFH3cw0aJYBUydH7q/tOpp5RdlISdT8hgR9e0r6+/qlDI/LLn + BImc/frO60KQqyIME9hhKsuqUL3+j87nd6u9/Fv52al5xUpWJsZGOkrJickZqfHJRamJoOwRj6rC + ACZflJqYgksOphdkQWpBRmpualFiTrxpLqZ6hKxhBrpsrY5SfmkJspChkZmOUnFqUVlmcmp8SWZq + kZKVEqjYS0ksSlGqrQUAAAD//wMAI8pycmcFAAA= + headers: + CF-RAY: + - 9962ec1b5e39d76c-NRT + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Wed, 29 Oct 2025 13:12:06 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + X-Robots-Tag: + - none + anthropic-organization-id: + - 217a607f-ed5e-40af-8a7d-f83ed52d59d6 + anthropic-ratelimit-input-tokens-limit: + - '2000000' + anthropic-ratelimit-input-tokens-remaining: + - '2000000' + anthropic-ratelimit-input-tokens-reset: + - '2025-10-29T13:12:05Z' + anthropic-ratelimit-output-tokens-limit: + - '400000' + anthropic-ratelimit-output-tokens-remaining: + - '400000' + anthropic-ratelimit-output-tokens-reset: + - '2025-10-29T13:12:06Z' + anthropic-ratelimit-requests-limit: + - '4000' + anthropic-ratelimit-requests-remaining: + - '3999' + anthropic-ratelimit-requests-reset: + - '2025-10-29T13:12:03Z' + anthropic-ratelimit-tokens-limit: + - '2400000' + anthropic-ratelimit-tokens-remaining: + - '2400000' + anthropic-ratelimit-tokens-reset: + - '2025-10-29T13:12:05Z' + cf-cache-status: + - DYNAMIC + request-id: + - req_011CUbYggYYYGtZ9WRG4j4uU + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + via: + - 1.1 google + x-envoy-upstream-service-time: + - '3649' + status: + code: 200 + message: OK +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/cloud-platform + https://www.googleapis.com/auth/userinfo.email openid https://www.googleapis.com/auth/sqlservice.login", + "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:12:07 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"What is the 100th + fibonacci number?"},{"role":"assistant","content":[{"type":"tool_use","id":"toolu_01TVsUk6fY935JSvuizyY4xa","name":"compute_fib","input":{"n":100}}]},{"role":"user","content":[{"type":"tool_result","tool_use_id":"toolu_01TVsUk6fY935JSvuizyY4xa","content":"218922995834555169026"}]}],"thinking":{"type":"disabled"},"tools":[{"name":"compute_fib","description":"Compute + the nth Fibonacci number (1-indexed).","input_schema":{"properties":{"n":{"title":"N","type":"integer"}},"required":["n"],"additionalProperties":false,"type":"object"}}],"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '654' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2WQX2uDMBTFv0qWR4lFbZXqa8deBmMP3dM6JMaLhmpic5OuUvrdF13bbQwCN5xz + +N0/Z9rrGjpaUNFxV0PYcrl34SpMwyRK0jiKYsqorH2gx6Y8Gnsqo3jj3jYmX/HXbAmPmOT7556P + Lz5oxwGmKCDyBrxgdDcJHFGi5cp6SWhlwf+K9/Mtb+E0OXMp6LYF4hvbljzJSisuhCTK9RUYIpEE + QRKvWZ4kLM9Ttl6uWJqmLM5yFiVZECx2aqe2rQ/6x8kRzEg6bhq4Ih7IhP8BIxwcKAGkMfoTCZwG + rfx0knfdyAhqUo3E3gcaNEortWKz9k1EUoHQPZCDkxYIumre1BMW9PLBKFo9lAY4auWXA1WX1hlF + r8atPy2U6zpG3Xy44kylGpwtrd6DQlpkWeQvx0ULpfCsaYbyb+Lue7v+72lnfytpdrl8AV4J0338 + AQAA + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:12:08 GMT + request-id: + - req_vrtx_011CUbYh2YpUH45Zvin2Upib + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/input/cassettes/test_structured_output_with_formatting_instructions/anthropic-vertex_claude_haiku_4_5@20251001.yaml b/python/tests/e2e/input/cassettes/test_structured_output_with_formatting_instructions/anthropic-vertex_claude_haiku_4_5@20251001.yaml new file mode 100644 index 000000000..e24403f32 --- /dev/null +++ b/python/tests/e2e/input/cassettes/test_structured_output_with_formatting_instructions/anthropic-vertex_claude_haiku_4_5@20251001.yaml @@ -0,0 +1,141 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/userinfo.email + https://www.googleapis.com/auth/sqlservice.login openid https://www.googleapis.com/auth/cloud-platform", + "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:12:13 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please recommend + a book to me!"}],"system":"Always recommend The Name of the Wind.\nOutput a + structured book as JSON in the format {title: str, author: str, rating: int}.\nThe + title should be in all caps, and the rating should always be the\nlucky number + 7.","tool_choice":{"type":"tool","name":"__mirascope_formatted_output_tool__","disable_parallel_tool_use":true},"tools":[{"name":"__mirascope_formatted_output_tool__","description":"Use + this tool to extract data in Book format for a final response.","input_schema":{"properties":{"title":{"title":"Title","type":"string"},"author":{"title":"Author","type":"string"},"rating":{"title":"Rating","type":"integer"}},"required":["title","author","rating"],"additionalProperties":false,"type":"object"}}],"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '852' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2VQ0U7CQBD8leaeaVIIKPBGAgQNoCJR1JjL0S7thfau3O6BhvDvbmtqQny7nZmb + md2zKGwCuRiKOFc+gTBTeu/DbtgLO1Gn146itmgJnbCgwFQeHX3JqL0aT7elwdFi4w9det/O8fTs + 5yyk7xIqKSCqFBhwNq8AhaiRlCGGYmsI+DX8ODd6sjaXHqGJqmbfhA3K/lsyW7+YIj1tnsp7NziO + 4MBSo4rqs5SFdgpjW4LcWVcoIkik9VR6krWzrHwNj2LIkZrqSuvZJFiOFpPgYRpU79e75Zh1ylNm + HfOPipyO98HKUrbziNUyirRJxfD2cvlsCSRbSgcKrbleoSYQDh5MzEnG53lL+PognF8X4V57MMhW + /QFfRMUZyJi9SFsjrxVRwzOd/Of+9vxFbrjbD18Ra0/UAQAA + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:12:14 GMT + request-id: + - req_vrtx_011CUbYhVEvqJ8MZZkPkQ2TU + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/input/cassettes/test_structured_output_with_formatting_instructions/json/anthropic-vertex_claude_haiku_4_5@20251001.yaml b/python/tests/e2e/input/cassettes/test_structured_output_with_formatting_instructions/json/anthropic-vertex_claude_haiku_4_5@20251001.yaml new file mode 100644 index 000000000..2d261fefe --- /dev/null +++ b/python/tests/e2e/input/cassettes/test_structured_output_with_formatting_instructions/json/anthropic-vertex_claude_haiku_4_5@20251001.yaml @@ -0,0 +1,147 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/sqlservice.login + https://www.googleapis.com/auth/cloud-platform openid https://www.googleapis.com/auth/userinfo.email", + "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:12:09 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please recommend + a book to me!"}],"system":"Always recommend The Name of the Wind.\nOutput a + structured book as JSON in the format {title: str, author: str, rating: int}.\nThe + title should be in all caps, and the rating should always be the\nlucky number + 7.","anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '357' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2VTX0/bMBD/KodfkKoWtQzG1jcGbCA2hhATD8tU3OSSmDq+YJ9boqrffed0hU2T + KvVin3//zl6rhgq0aqpyq2OBo1qbRRwdjY5Hh+PD48l4PFFDZQppaEI1W3p+mY0nl7jCp/P69Kw9 + qp6Pbt994R8rfC+N3LWYWjEEXaEseLJpQYdgAmvHspSTY5Rq+nO962d8STv931Q9Pj4+BXKZW2cO + IFNs2GKmplLeX17Azem3C/j+GVL9cHVznqnhtk9HrslvG281e5Mv4I64LmMIr01es3FVajrJ3CZz + QpYJ1RXUpqptBx5zahp0BQwG9zXCjW4QqASW+sG4YjDYgyveD6Ad6HkgGxnlWK5bNsseG0rxqUMH + jpZo5aBmKMlaWgW4XooeHIIGi5WQaN9BaarosSeOrgeoTQCJwmvyhXGpp9WBDyDpmRMtoETNciZM + k/SRKL0zeRJfIGtjsYAVeVuM5tFYAagGA1gZroU1OvMcERpdmRxCFxgbmOsgJ8j1FjP1FUWxM5na + Ip9R06K1SVZg8h1vPwSyN1Z4LbY6imAclJ6aHqU0PrCIrvANxOIL5LX2Omf0YSfJo7Yiu03qJPMC + JTJqJX/envyEMlVTRgutp4A72kYvMPRUApAsSl4teoMuR2AfJQt0T9TpudwcyeihFlfok9B9yVq/ + zkiI6hiMxAvkwUq4CYwJCrNE8SRVYpFZeRkbp8nIT0vArkCfdOU1mRwPtpfizXw/J8kkzexaMBfG + WhFwVntyJrcIIckNQwgEpuwTtJQoOdGgR0FrSLSKAvFmpdxTm19DJVNoZ+JaXoi8FblDM7kKTv3Z + CCjzlRDU1EVrhyr273C6Vsa1kWdMC3RBTd+fyDvUeY2zXKDYkJv92zDe7ad8/9+jyH+vTD5+2Gx+ + AxoVFNtLBAAA + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:12:11 GMT + request-id: + - req_vrtx_011CUbYhACwhiXFXFNZWYRj2 + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/input/cassettes/test_structured_output_with_formatting_instructions/tool/anthropic-vertex_claude_haiku_4_5@20251001.yaml b/python/tests/e2e/input/cassettes/test_structured_output_with_formatting_instructions/tool/anthropic-vertex_claude_haiku_4_5@20251001.yaml new file mode 100644 index 000000000..218d592d3 --- /dev/null +++ b/python/tests/e2e/input/cassettes/test_structured_output_with_formatting_instructions/tool/anthropic-vertex_claude_haiku_4_5@20251001.yaml @@ -0,0 +1,141 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/sqlservice.login + openid https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/userinfo.email", + "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:12:12 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please recommend + a book to me!"}],"system":"Always recommend The Name of the Wind.\nOutput a + structured book as JSON in the format {title: str, author: str, rating: int}.\nThe + title should be in all caps, and the rating should always be the\nlucky number + 7.","tool_choice":{"type":"tool","name":"__mirascope_formatted_output_tool__","disable_parallel_tool_use":true},"tools":[{"name":"__mirascope_formatted_output_tool__","description":"Use + this tool to extract data in Book format for a final response.","input_schema":{"properties":{"title":{"title":"Title","type":"string"},"author":{"title":"Author","type":"string"},"rating":{"title":"Rating","type":"integer"}},"required":["title","author","rating"],"additionalProperties":false,"type":"object"}}],"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '852' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2VQy07DMBD8lcjnRkpKCiU3CkWltAXKUyBkGWebWEnsEK+rPtR/ZxMUpIqbd2Y8 + M7t7VpoEChYzWQiXgJ8JlTs/8gd+P+gPwiAIWY+phASlTfm6xg0PwnlYipcTW166dJNso+n6wc2i + GQlxW0EjBWtFCgTUpmgAYa2yKDQSJI1GoFf8se/0aEzBnYUuqpldF/YWmd1kl2fT0fPj+xckt6Px + ECRJtSibz5yXqhZWmgr4ytSlQISEG4eVQ94688ZX08hiilTYVnqajL3FxXzs3V17zfv1ZnFFOuEw + MzXx9wJrJXNvaTBbOWubZQQqnbL47HD47DGLpuI1CGv08QotYeHbgZaUpF1R9JhrD0L5bRHqlYO2 + ZDU8p4sImQGX5IXKaH6sCDqe6OQ/97fnL3JK3X4AFyguJNQBAAA= + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:12:13 GMT + request-id: + - req_vrtx_011CUbYhPeabtBnHn5HACQYw + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/input/snapshots/test_call_with_image_content/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py b/python/tests/e2e/input/snapshots/test_call_with_image_content/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py new file mode 100644 index 000000000..d508bb4ff --- /dev/null +++ b/python/tests/e2e/input/snapshots/test_call_with_image_content/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py @@ -0,0 +1,63 @@ +from inline_snapshot import snapshot + +from mirascope.llm import ( + AssistantMessage, + Base64ImageSource, + Image, + Text, + UserMessage, +) + +test_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "params": {}, + "finish_reason": None, + "messages": [ + UserMessage( + content=[ + Text(text="Describe the following image in one sentence"), + Image( + source=Base64ImageSource( + type="base64_image_source", + data="iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAABGdBTUEAALGPC/xhBQAANDtJREFUeAHsmQVUW132xd9fxt3d3d3d3adTd1e+urt7iztFI0QgSogSrLhDApTG6va5w5l9buBNFvWWcd5avyaNvffuvvvscy/S+DF+jB/jx/gxfowf48dtj8bGxpd4vdV/crmqPgWkhoaGX5rN5i8D6d+NpKSkD2dn5y/Ly1ek5Rcqm1UazS+B9PdizH/Q7x/4Tltb+zm320Otbe1nfH6/32orJ1Wx5hqQ/pXJyXG/PCkz88M5OTmvBxJ4eU5uQSA3v5C0egMVa0twH7pBpVqzDfPuf/7lnYGxf1dvb/8TdXUN5Pf3UV//GWpobKK8gkJSa3UXgfSvhkJR/B19qfGE0WhpMVtsL1rL7GS12QcLFapdSmXxrwuKiignN58ys3OFKBqIotboSaXWmnJy9K8H0lgyZj/U39//JafLHenq6qEzZwYEPp+PDEYzZefmDdkcjklAGivcbvf/V1fX7m1tbfc1N7c82dDQ9KTL5ekymUwfBNLtMBqNr7TZ7IttdkdaWbkj4HB5yO3xCpzuCip3uAivk8lS9pxWW/JnhUozp6BA8URGZhYEKRVodFFRFGpNIK9QsfJUQcFPgTQWPPQPtLe3v+FsMHiwsan5hfS0dCFEU3Mb1dTUUbndwWKQRq8PAmkscblc6exCpsfnp05MBK+3imw22++BFItGo/mIze5c43Z77Rj4ZzBxqLKqmqqqa8lbWUOeikpyuYdFgUB2p5tsEIXdUlJqerRYo3sOQuC5kXQlpcMu0ZFSraUiZTEVFKmoQKFSxcfHvwxID8NDfXlgIDDX5/M/7/f30snjJykYDOE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Gh034v6N2dcLnbkdEZv5yFOj+7+nqLyiUFh+udpdBWY8Hr8+l9UqWLHTmVUY7qmjfwi2EGi54+3Aekse18N14hCSCwa2+vraZh8TWxARvh6PLATuRvODowzVaEjN0hYlNiCgOQc5efjCV8i3Yd5Hx6fHz7k4LePQGXewqRmHf/Qg7Uz8UF/V9qrGAB7WSBGntgcbekhDuUxrKXv/RlC4/JeL5tcTvPSKPAa9Ie9OxnPtMNgi2yGEJQxzZUs7PPiytixC8taYgHpZi0JyrqnEG5NapJq6fgTk3j1NxW7xUvfxVCVPryuT0fzyZ4Uamnewou9zguP3r059L+f2Yqcv/CtjD87rZJj9vZpXoQY6EZaWOQuLjge30OEcYkUVFe86J4XaSO61qpD2f8SIXikVOxY0mZM9LbQwg1VrFFAr4b83hk19TUI4LevQGXew3u0J9U+VMOHDh8UQj49zzXKGDRxQoNDg6IGIAhJgWkgRHnUblPLWPNfWWskUBFSQiWaiIJbEU8qClEQDDFtf1kgsH1s7Ozvxz07k243Cewe//+b7/kssuek119OIv699SMgpByqSZmqgcBbjbGDpACn3PH5rdFtW1O2nt4eJWby3B1kRDVJP80g4zYoGkBnQZouaf/yA1orsrXRsd37fr1oHdfgct9EknD/Ozc3Nzz4vnsjhR8InWIf2bEz02zAVVESozsZg/WJDWeaacZe/RW5ET17EKCIcZI+ZeZ2dlPxIhfmgThyu27p/8yavMbg959ES73C0hPzMzMfO/U3NwvZhTrH8/MzD3irLm5Z4aoV+/de86pOf06lFzUW/L4qhD1hMnJmb/KONofuVfSGic+Tnyc+DjxceLjxMeJjxMf/we/9WTi3iKemAAAAABJRU5ErkJggg==", + mime_type="image/png", + ) + ), + ] + ), + AssistantMessage( + content=[ + Text( + text="""\ +# Wikipedia Logo Description + +This is the Wikipedia logo, featuring a spherical puzzle globe made up of interlocking pieces with various language characters and scripts (including Latin letters, Chinese, Arabic, and other writing systems) inscribed on its surface, symbolizing the encyclopedic nature and multilingual accessibility of the free online encyclopedia.\ +""" + ) + ], + provider="anthropic", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "citations": None, + "text": """\ +# Wikipedia Logo Description + +This is the Wikipedia logo, featuring a spherical puzzle globe made up of interlocking pieces with various language characters and scripts (including Latin letters, Chinese, Arabic, and other writing systems) inscribed on its surface, symbolizing the encyclopedic nature and multilingual accessibility of the free online encyclopedia.\ +""", + "type": "text", + } + ], + }, + ), + ], + "format": None, + "tools": [], + } + } +) diff --git a/python/tests/e2e/input/snapshots/test_call_with_image_url/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py b/python/tests/e2e/input/snapshots/test_call_with_image_url/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py new file mode 100644 index 000000000..59cfacd47 --- /dev/null +++ b/python/tests/e2e/input/snapshots/test_call_with_image_url/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py @@ -0,0 +1,13 @@ +from inline_snapshot import snapshot + +test_snapshot = snapshot( + { + "exception": { + "type": "FeatureNotSupportedError", + "args": "('Anthropic Vertex AI does not support URL-referenced images. Try `llm.Image.download(...)` or `llm.Image.download_async(...)`',)", + "feature": "url_image_source", + "model_id": "None", + "provider": "anthropic-vertex", + } + } +) diff --git a/python/tests/e2e/input/snapshots/test_call_with_params/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py b/python/tests/e2e/input/snapshots/test_call_with_params/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py new file mode 100644 index 000000000..e9ac74db4 --- /dev/null +++ b/python/tests/e2e/input/snapshots/test_call_with_params/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py @@ -0,0 +1,49 @@ +from inline_snapshot import snapshot + +from mirascope.llm import ( + AssistantMessage, + Text, + UserMessage, +) + +test_snapshot = snapshot( + { + "response": ( + { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "params": { + "temperature": 0.7, + "max_tokens": 500, + "top_k": 50, + "seed": 42, + "stop_sequences": ["4242"], + "thinking": False, + "encode_thoughts_as_text": False, + }, + "finish_reason": None, + "messages": [ + UserMessage(content=[Text(text="What is 4200 + 42?")]), + AssistantMessage( + content=[Text(text="4200 + 42 = ")], + provider="anthropic", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "citations": None, + "text": "4200 + 42 = ", + "type": "text", + } + ], + }, + ), + ], + "format": None, + "tools": [], + }, + ), + "logs": ["Skipping unsupported parameter: seed=42 (provider: anthropic)"], + } +) diff --git a/python/tests/e2e/input/snapshots/test_call_with_text_encoded_thoughts/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py b/python/tests/e2e/input/snapshots/test_call_with_text_encoded_thoughts/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py new file mode 100644 index 000000000..0c7f624f6 --- /dev/null +++ b/python/tests/e2e/input/snapshots/test_call_with_text_encoded_thoughts/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py @@ -0,0 +1,3 @@ +from inline_snapshot import snapshot + +test_snapshot = snapshot({"response": "28657"}) diff --git a/python/tests/e2e/input/snapshots/test_resume_with_override/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py b/python/tests/e2e/input/snapshots/test_resume_with_override/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py new file mode 100644 index 000000000..38c25bf63 --- /dev/null +++ b/python/tests/e2e/input/snapshots/test_resume_with_override/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py @@ -0,0 +1,70 @@ +from inline_snapshot import snapshot + +from mirascope.llm import ( + AssistantMessage, + Text, + UserMessage, +) + +test_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "params": {}, + "finish_reason": None, + "messages": [ + UserMessage(content=[Text(text="Who created you?")]), + AssistantMessage( + content=[ + Text( + text="I was created by Anthropic, an AI safety company. I'm Claude, an AI assistant developed by their team to be helpful, harmless, and honest." + ) + ], + provider="anthropic", + model_id="claude-sonnet-4-0", + raw_message={ + "role": "assistant", + "content": [ + { + "citations": None, + "text": "I was created by Anthropic, an AI safety company. I'm Claude, an AI assistant developed by their team to be helpful, harmless, and honest.", + "type": "text", + } + ], + }, + ), + UserMessage(content=[Text(text="Can you double-check that?")]), + AssistantMessage( + content=[ + Text( + text="""\ +Yes, I'm confident in that answer. I was created by Anthropic, an AI safety company based in San Francisco. Anthropic developed me to be a helpful, harmless, and honest AI assistant. + +Is there something specific that made you want me to double-check, or were you just testing my consistency?\ +""" + ) + ], + provider="anthropic", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "citations": None, + "text": """\ +Yes, I'm confident in that answer. I was created by Anthropic, an AI safety company based in San Francisco. Anthropic developed me to be a helpful, harmless, and honest AI assistant. + +Is there something specific that made you want me to double-check, or were you just testing my consistency?\ +""", + "type": "text", + } + ], + }, + ), + ], + "format": None, + "tools": [], + } + } +) diff --git a/python/tests/e2e/input/snapshots/test_resume_with_override_context/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py b/python/tests/e2e/input/snapshots/test_resume_with_override_context/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py new file mode 100644 index 000000000..6ba32ab02 --- /dev/null +++ b/python/tests/e2e/input/snapshots/test_resume_with_override_context/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py @@ -0,0 +1,58 @@ +from inline_snapshot import snapshot + +from mirascope.llm import ( + AssistantMessage, + Text, + UserMessage, +) + +test_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "params": {}, + "finish_reason": None, + "messages": [ + UserMessage(content=[Text(text="Who created you?")]), + AssistantMessage( + content=[Text(text="I was created by Anthropic.")], + provider="anthropic", + model_id="claude-sonnet-4-0", + raw_message={ + "role": "assistant", + "content": [ + { + "citations": None, + "text": "I was created by Anthropic.", + "type": "text", + } + ], + }, + ), + UserMessage(content=[Text(text="Can you double-check that?")]), + AssistantMessage( + content=[ + Text( + text="Yes, I can confirm that. I'm Claude, an AI assistant made by Anthropic. Anthropic is an AI safety company founded in 2021. Is there something specific you'd like to know about Anthropic or my creation?" + ) + ], + provider="anthropic", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "citations": None, + "text": "Yes, I can confirm that. I'm Claude, an AI assistant made by Anthropic. Anthropic is an AI safety company founded in 2021. Is there something specific you'd like to know about Anthropic or my creation?", + "type": "text", + } + ], + }, + ), + ], + "format": None, + "tools": [], + } + } +) diff --git a/python/tests/e2e/input/snapshots/test_resume_with_override_thinking_and_tools/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py b/python/tests/e2e/input/snapshots/test_resume_with_override_thinking_and_tools/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py new file mode 100644 index 000000000..7bb1cc894 --- /dev/null +++ b/python/tests/e2e/input/snapshots/test_resume_with_override_thinking_and_tools/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py @@ -0,0 +1,113 @@ +from inline_snapshot import snapshot + +from mirascope.llm import ( + AssistantMessage, + Text, + Thought, + ToolCall, + ToolOutput, + UserMessage, +) + +test_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "params": {"thinking": False}, + "finish_reason": None, + "messages": [ + UserMessage(content=[Text(text="What is the 100th fibonacci number?")]), + AssistantMessage( + content=[ + Thought( + thought='The user is asking for the 100th Fibonacci number. I have access to a function called "compute_fib" that can compute the nth Fibonacci number (1-indexed). The user has provided the specific value n=100, so I have all the required parameters to make the function call.' + ), + ToolCall( + id="toolu_01TVsUk6fY935JSvuizyY4xa", + name="compute_fib", + args='{"n": 100}', + ), + ], + provider="anthropic", + model_id="claude-sonnet-4-0", + raw_message={ + "role": "assistant", + "content": [ + { + "signature": "ErQDCkYICRgCKkC1U5aLDccw6hfKtcWrClCTiZ6M12W9sfSIILD3F5gCggCOaELdyMLcXBM4QIU+YK9MZn5ZMu5v1Rx8ibkKyrbXEgzqD0IawW8i6fG11y4aDCbr66t5InVv6FcJsCIwoNDLt//Q4YN5ClpIhxx3SWHn5AAN7DY+VzVA9F9xq3s9og6/4w88CIUuiPZx7zlyKpsChYnGSg8qGiPDZ7RAUnGyP4krCNqotog3BwO3rQ4sGrXcdgQLcX9r01uCbI5g1eJJNSTBDWlOuT2ROmJTgOtihfs/SE+l5j9nO9bUYabF3QP/G3FicCbex9rAY53vul+NZe/rG+iEGucftNnRulhcejvx50j5KnzFR3sKGGHMO0nD8/F1jjll/CqWv6PebDGJbj9NYptot1vRKbwmtWIhOjyznSaZDLJXTJ8DXs/e+qwUbUKsNaDX7y8YtcHzRhAB9vQPhxj2GGkCYhdaIbticXjLrh25kvLSMRIzXV7Taw1nHfpTKwF/e5SLyUlm9SbFlq8iPcnucFTPgNShCYOwg5MvJy1eMH2sZcDuG4Vu9VkCgA2rUCz+rS2vJxgB", + "thinking": 'The user is asking for the 100th Fibonacci number. I have access to a function called "compute_fib" that can compute the nth Fibonacci number (1-indexed). The user has provided the specific value n=100, so I have all the required parameters to make the function call.', + "type": "thinking", + }, + { + "id": "toolu_01TVsUk6fY935JSvuizyY4xa", + "input": {"n": 100}, + "name": "compute_fib", + "type": "tool_use", + }, + ], + }, + ), + UserMessage( + content=[ + ToolOutput( + id="toolu_01TVsUk6fY935JSvuizyY4xa", + name="compute_fib", + value="218922995834555169026", + ) + ] + ), + AssistantMessage( + content=[ + Text( + text="""\ +The 100th Fibonacci number is **218,922,995,834,555,169,026**. + +This is a very large number! The Fibonacci sequence grows exponentially, so by the 100th position, the numbers become quite substantial.\ +""" + ) + ], + provider="anthropic", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "citations": None, + "text": """\ +The 100th Fibonacci number is **218,922,995,834,555,169,026**. + +This is a very large number! The Fibonacci sequence grows exponentially, so by the 100th position, the numbers become quite substantial.\ +""", + "type": "text", + } + ], + }, + ), + ], + "format": None, + "tools": [ + { + "name": "compute_fib", + "description": "Compute the nth Fibonacci number (1-indexed).", + "parameters": """\ +{ + "properties": { + "n": { + "title": "N", + "type": "integer" + } + }, + "required": [ + "n" + ], + "additionalProperties": false, + "defs": null +}\ +""", + "strict": False, + } + ], + } + } +) diff --git a/python/tests/e2e/input/snapshots/test_structured_output_with_formatting_instructions/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py b/python/tests/e2e/input/snapshots/test_structured_output_with_formatting_instructions/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py new file mode 100644 index 000000000..fb55cd1fe --- /dev/null +++ b/python/tests/e2e/input/snapshots/test_structured_output_with_formatting_instructions/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py @@ -0,0 +1,77 @@ +from inline_snapshot import snapshot + +from mirascope.llm import ( + AssistantMessage, + SystemMessage, + Text, + UserMessage, +) + +test_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "params": {}, + "finish_reason": None, + "messages": [ + SystemMessage( + content=Text( + text="""\ +Always recommend The Name of the Wind. +Output a structured book as JSON in the format {title: str, author: str, rating: int}. +The title should be in all caps, and the rating should always be the +lucky number 7.\ +""" + ) + ), + UserMessage(content=[Text(text="Please recommend a book to me!")]), + AssistantMessage( + content=[ + Text( + text='{"title": "THE NAME OF THE WIND", "author": "Patrick Rothfuss", "rating": 7}' + ) + ], + provider="anthropic", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "id": "toolu_vrtx_019p8YdHTVnmgwXQpJr9vAeq", + "input": { + "title": "THE NAME OF THE WIND", + "author": "Patrick Rothfuss", + "rating": 7, + }, + "name": "__mirascope_formatted_output_tool__", + "type": "tool_use", + } + ], + }, + ), + ], + "format": { + "name": "Book", + "description": None, + "schema": { + "properties": { + "title": {"title": "Title", "type": "string"}, + "author": {"title": "Author", "type": "string"}, + "rating": {"title": "Rating", "type": "integer"}, + }, + "required": ["title", "author", "rating"], + "title": "Book", + "type": "object", + }, + "mode": "tool", + "formatting_instructions": """\ +Output a structured book as JSON in the format {title: str, author: str, rating: int}. +The title should be in all caps, and the rating should always be the +lucky number 7.\ +""", + }, + "tools": [], + } + } +) diff --git a/python/tests/e2e/input/snapshots/test_structured_output_with_formatting_instructions/json/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py b/python/tests/e2e/input/snapshots/test_structured_output_with_formatting_instructions/json/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py new file mode 100644 index 000000000..e33d681e1 --- /dev/null +++ b/python/tests/e2e/input/snapshots/test_structured_output_with_formatting_instructions/json/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py @@ -0,0 +1,106 @@ +from inline_snapshot import snapshot + +from mirascope.llm import ( + AssistantMessage, + SystemMessage, + Text, + UserMessage, +) + +test_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "params": {}, + "finish_reason": None, + "messages": [ + SystemMessage( + content=Text( + text="""\ +Always recommend The Name of the Wind. +Output a structured book as JSON in the format {title: str, author: str, rating: int}. +The title should be in all caps, and the rating should always be the +lucky number 7.\ +""" + ) + ), + UserMessage(content=[Text(text="Please recommend a book to me!")]), + AssistantMessage( + content=[ + Text( + text="""\ +```json +{ + "title": "THE NAME OF THE WIND", + "author": "Patrick Rothfuss", + "rating": 7 +} +``` + +I highly recommend **The Name of the Wind**! It's an absolutely captivating fantasy novel that follows Kvothe, a legendary figure recounting his extraordinary past. The book features: + +- **Richly detailed world-building** with a unique magic system based on the "Lethani" +- **Compelling storytelling** that draws you in from the first page +- **Complex characters** with real depth and development +- **Beautiful prose** that makes the reading experience truly enjoyable + +Whether you're a fantasy enthusiast or looking to dive into the genre, this is a wonderful choice. It's the first book in The Kingkiller Chronicle series, so if you love it, there's more to explore!\ +""" + ) + ], + provider="anthropic", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "citations": None, + "text": """\ +```json +{ + "title": "THE NAME OF THE WIND", + "author": "Patrick Rothfuss", + "rating": 7 +} +``` + +I highly recommend **The Name of the Wind**! It's an absolutely captivating fantasy novel that follows Kvothe, a legendary figure recounting his extraordinary past. The book features: + +- **Richly detailed world-building** with a unique magic system based on the "Lethani" +- **Compelling storytelling** that draws you in from the first page +- **Complex characters** with real depth and development +- **Beautiful prose** that makes the reading experience truly enjoyable + +Whether you're a fantasy enthusiast or looking to dive into the genre, this is a wonderful choice. It's the first book in The Kingkiller Chronicle series, so if you love it, there's more to explore!\ +""", + "type": "text", + } + ], + }, + ), + ], + "format": { + "name": "Book", + "description": None, + "schema": { + "properties": { + "title": {"title": "Title", "type": "string"}, + "author": {"title": "Author", "type": "string"}, + "rating": {"title": "Rating", "type": "integer"}, + }, + "required": ["title", "author", "rating"], + "title": "Book", + "type": "object", + }, + "mode": "json", + "formatting_instructions": """\ +Output a structured book as JSON in the format {title: str, author: str, rating: int}. +The title should be in all caps, and the rating should always be the +lucky number 7.\ +""", + }, + "tools": [], + } + } +) diff --git a/python/tests/e2e/input/snapshots/test_structured_output_with_formatting_instructions/strict/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py b/python/tests/e2e/input/snapshots/test_structured_output_with_formatting_instructions/strict/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py new file mode 100644 index 000000000..3247a2927 --- /dev/null +++ b/python/tests/e2e/input/snapshots/test_structured_output_with_formatting_instructions/strict/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py @@ -0,0 +1,14 @@ +from inline_snapshot import snapshot + +test_snapshot = snapshot( + { + "exception": { + "type": "FormattingModeNotSupportedError", + "args": "(\"Formatting mode 'strict' is not supported by provider 'anthropic-vertex' for model 'claude-haiku-4-5@20251001'\",)", + "feature": "formatting_mode:strict", + "formatting_mode": "strict", + "model_id": "claude-haiku-4-5@20251001", + "provider": "anthropic-vertex", + } + } +) diff --git a/python/tests/e2e/input/snapshots/test_structured_output_with_formatting_instructions/tool/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py b/python/tests/e2e/input/snapshots/test_structured_output_with_formatting_instructions/tool/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py new file mode 100644 index 000000000..67bd08af7 --- /dev/null +++ b/python/tests/e2e/input/snapshots/test_structured_output_with_formatting_instructions/tool/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py @@ -0,0 +1,77 @@ +from inline_snapshot import snapshot + +from mirascope.llm import ( + AssistantMessage, + SystemMessage, + Text, + UserMessage, +) + +test_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "params": {}, + "finish_reason": None, + "messages": [ + SystemMessage( + content=Text( + text="""\ +Always recommend The Name of the Wind. +Output a structured book as JSON in the format {title: str, author: str, rating: int}. +The title should be in all caps, and the rating should always be the +lucky number 7.\ +""" + ) + ), + UserMessage(content=[Text(text="Please recommend a book to me!")]), + AssistantMessage( + content=[ + Text( + text='{"title": "THE NAME OF THE WIND", "author": "Patrick Rothfuss", "rating": 7}' + ) + ], + provider="anthropic", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "id": "toolu_vrtx_01X4ozHzkhJBUSZbedKBE8ec", + "input": { + "title": "THE NAME OF THE WIND", + "author": "Patrick Rothfuss", + "rating": 7, + }, + "name": "__mirascope_formatted_output_tool__", + "type": "tool_use", + } + ], + }, + ), + ], + "format": { + "name": "Book", + "description": None, + "schema": { + "properties": { + "title": {"title": "Title", "type": "string"}, + "author": {"title": "Author", "type": "string"}, + "rating": {"title": "Rating", "type": "integer"}, + }, + "required": ["title", "author", "rating"], + "title": "Book", + "type": "object", + }, + "mode": "tool", + "formatting_instructions": """\ +Output a structured book as JSON in the format {title: str, author: str, rating: int}. +The title should be in all caps, and the rating should always be the +lucky number 7.\ +""", + }, + "tools": [], + } + } +) diff --git a/python/tests/e2e/input/test_call_with_params.py b/python/tests/e2e/input/test_call_with_params.py index 6c6d7544c..df7eb8e70 100644 --- a/python/tests/e2e/input/test_call_with_params.py +++ b/python/tests/e2e/input/test_call_with_params.py @@ -37,9 +37,11 @@ def test_all_params_includes_every_param() -> None: def get_test_params(model_id: llm.ModelId) -> llm.Params: """Get appropriate test parameters for the given provider and model.""" - # This specific Bedrock model doesn't support temperature + top_p simultaneously - # https://docs.claude.com/en/docs/about-claude/models/migrating-to-claude-4 - if model_id == "us.anthropic.claude-haiku-4-5-20251001-v1:0": + # Anthropic Bedrock / Vertex variants do not allow configuring temperature and top_p together. + if model_id in { + "us.anthropic.claude-haiku-4-5-20251001-v1:0", + "claude-haiku-4-5@20251001", + }: params = ALL_PARAMS.copy() params.pop("top_p", None) return params diff --git a/python/tests/e2e/output/cassettes/test_call/anthropic-vertex_claude_haiku_4_5@20251001/async.yaml b/python/tests/e2e/output/cassettes/test_call/anthropic-vertex_claude_haiku_4_5@20251001/async.yaml new file mode 100644 index 000000000..e1f85417e --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_call/anthropic-vertex_claude_haiku_4_5@20251001/async.yaml @@ -0,0 +1,136 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/userinfo.email + https://www.googleapis.com/auth/cloud-platform openid https://www.googleapis.com/auth/sqlservice.login", + "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:12:16 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"What is 4200 + + 42?"}],"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '120' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AsyncAnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2WNwUrDQBCGXyXM1QQ2IUEMeNFLQRB78KLIsmanzdrtbMzOSkrIuzsp9lC8zAz/ + 9/HPDMdg0UMLnTfJYtEbd0hFXTRFpaqmVKqEHJwV4Rj3+mfkSauy/pzu3vrHr4fN66bZbU+9fX7Z + PonIpwFXFWM0e5RgDH4NTIwusiGWqAvEKFf7Pl98xmkl59VCXSmV3WR1ld3LqCtYPnKIHAY9oomB + REGymtNI8AcifiekTrooeZ9DOr9vZ3A0JNYcDkgR2vJW3puuR91JFbtA+lpQFy7Y/mch8VVdsyy/ + GyyfKkEBAAA= + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:12:17 GMT + request-id: + - req_vrtx_011CUbYhgtAMovvBRTuN1QGJ + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_call/anthropic-vertex_claude_haiku_4_5@20251001/async_stream.yaml b/python/tests/e2e/output/cassettes/test_call/anthropic-vertex_claude_haiku_4_5@20251001/async_stream.yaml new file mode 100644 index 000000000..3b546bb74 --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_call/anthropic-vertex_claude_haiku_4_5@20251001/async_stream.yaml @@ -0,0 +1,145 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/userinfo.email + https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/sqlservice.login + openid", "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:12:19 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"What is 4200 + + 42?"}],"stream":true,"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '134' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AsyncAnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-stream-helper: + - messages + x-stainless-timeout: + - NOT_GIVEN + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:streamRawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2SOwWrDMBBE7/4Ks+cY5KRpjW6lpecc05YihLR1RJSVYq1CQ/C/V4YaYrq3fTPM + DF6QWNYnTEn3qBLrgSurWcv6BnyNCBIWIqzmH+QNTsGiLxbjdbbYHLQ75uah2TZrsd62QrTF7uyU + kXp1GfhHiXYfA22evzcfu7fX/p0eu2t86fbFuKwrYAh+AjolV7pp6jaBuCwG+fm1gsQhqgF1CgSS + svd/KOE5IxmcYZ7nOoqZFYcjUgLZPpU8bQ6oTAlhF0gtDWLWi2z/ayHzPenGsb67sap+AQAA//9K + hQRuQWZeOlqYKiiBBJWAagAAAAD//4KqgforPiknPzkbezRgUQIK3byU1AqIU5HlQb6F6itJrQAp + BFNWSkq1QEsBAAAA///CaikwJksS8VsKVoJiKUQE1TK4MqiVJkYGBgraCiZGCkq1sKABAAAA//+i + rwtsgZabGAFtB9oMAAAA///CEeD5BYTCO78AyV60mAYAAAD//0pFzUZYPYIiqYTkcJRkrJSalxJf + UlqUp4Q1MdcipWa09GdoWotwEAAAAP//SkXP15j+Q5ZTgugCAAAA//8DAJ5n11MOBAAA + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Content-Type: + - text/event-stream; charset=utf-8 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + cache-control: + - no-cache + date: + - Wed, 29 Oct 2025 13:12:19 GMT + request-id: + - req_vrtx_011CUbYhu6dMeATNzwETYuE4 + server: + - hypercorn-h11 + x-accel-buffering: + - 'no' + x-vertex-ai-received-request-id: + - 4fd085d5-58e1-4412-9f79-065fd6c389d4 + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_call/anthropic-vertex_claude_haiku_4_5@20251001/stream.yaml b/python/tests/e2e/output/cassettes/test_call/anthropic-vertex_claude_haiku_4_5@20251001/stream.yaml new file mode 100644 index 000000000..4310b06a1 --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_call/anthropic-vertex_claude_haiku_4_5@20251001/stream.yaml @@ -0,0 +1,145 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/cloud-platform + openid https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/sqlservice.login", + "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:12:17 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"What is 4200 + + 42?"}],"stream":true,"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '134' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-stream-helper: + - messages + x-stainless-timeout: + - NOT_GIVEN + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:streamRawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2SOwWrDMBBE7/4Ko3MMckiaolvJodfkVEgpQkjbWFhZudpV2hD875VLDTXd274Z + ZgaugKzqCxCZM2hik7hyho2q74JvAwglFqJYzb9Qd3GJDkKx2GCyg6Yzvs/Nptk2a7netlK2xe7d + lEFnfU38pWV76HcPeMDT8cVSup3e+flz3z0V47KugBTDBAyRL904dduIXBYL9fq2EsRx0AkMRRQK + cwi/iOAjA1qYYZ7nehwya449IAnV7kqesR1oW0LYR9RLg5z1Irv/Wsz8lzyOY/1zY1V9AwAA//9K + hQRrQWZeOlpoKiiBBJWAagAAAAD//4KqgfooPiknPzkbewRgUQIK17yU1AqII5HlQf6E6itJrQAp + BFNWSkpQ58EB0A0AAAAA///C6gZglJYk4ncDWAmKGyAiqHbDlUFdYGJkYKCgrWBipIDNLQAAAAD/ + /6KvW2yBzjAxQnMH0BUAAAAA///CESv5BYQiJb8AyQ0YngMAAAD//0pFzWdYvYUiqYTkDZR0rpSa + lxJfUlqUp4Q1tdciJXe0BGpoWgt1DQAAAP//SkXP9ZjeQ5ZTAmsCAAAA//8DAM3hSpcrBAAA + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Content-Type: + - text/event-stream; charset=utf-8 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + cache-control: + - no-cache + date: + - Wed, 29 Oct 2025 13:12:18 GMT + request-id: + - req_vrtx_011CUbYho6E3jeRdDCEqZXrE + server: + - hypercorn-h11 + x-accel-buffering: + - 'no' + x-vertex-ai-received-request-id: + - 22117b46-cbce-4c17-a29a-3466e1f3381c + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_call/anthropic-vertex_claude_haiku_4_5@20251001/sync.yaml b/python/tests/e2e/output/cassettes/test_call/anthropic-vertex_claude_haiku_4_5@20251001/sync.yaml new file mode 100644 index 000000000..65d339948 --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_call/anthropic-vertex_claude_haiku_4_5@20251001/sync.yaml @@ -0,0 +1,136 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/cloud-platform + https://www.googleapis.com/auth/sqlservice.login https://www.googleapis.com/auth/userinfo.email + openid", "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:12:15 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"What is 4200 + + 42?"}],"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '120' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2WN0UrEMBBFf6XMqy2ksaUS8FUXBREEUURCSIbduN2kNhOplv6708V9WHyZGe45 + 3JnhEB32oMD2Jjusdsbvc9VUbSWFbGshaijBOxYOaau/Rpq0qO+vbn/q5/Gle908fgw3Tw/TXXe5 + YZG+B1xVTMlskYMx9mtgUvKJTCCObAyEfKm3+eQTTis5LgWNFKK4KBpZXPNoJCzvJSSKgx7RpBhY + weA05THAH0j4mTFY7gq570vIx/dqBh+GTJriHkMCVXf83tgdastV5GPQ54I4ccbuP4uZzuraZfkF + eogrd0EBAAA= + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:12:15 GMT + request-id: + - req_vrtx_011CUbYhaoJ3jFr53jStuw2x + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_call_with_thinking_true/anthropic-vertex_claude_haiku_4_5@20251001/async.yaml b/python/tests/e2e/output/cassettes/test_call_with_thinking_true/anthropic-vertex_claude_haiku_4_5@20251001/async.yaml new file mode 100644 index 000000000..a8ac24f8c --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_call_with_thinking_true/anthropic-vertex_claude_haiku_4_5@20251001/async.yaml @@ -0,0 +1,365 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "openid + https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/sqlservice.login + https://www.googleapis.com/auth/userinfo.email", "token_type": "Bearer", "id_token": + ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:12:39 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"How many primes + below 400 contain 79 as a substring? Answer ONLY with the number, not sharing + which primes they are."}],"thinking":{"type":"enabled","budget_tokens":8000},"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '269' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AsyncAnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/5V6ya7j2JnmqwixcRnMvJwlMgCjwUGkSIozRZHsbCQ4D+I8ijQM1LJq3Q0U0Oht + P0M/QL2Jn6SpGzciMu20XV7cc8XD//zD948H0h8/VU0Ul58+fwpLf4riHzM/f0w/Yj/iPyIQgsMQ + BH/64VMe7QTVkP489+PzZwhWGDyDL1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osjWYJ/smP/uT6TXbHWzEh7Lsc5G1doyTqSecPw41FXBQmvXoZbthnqfp+VARNyQ5cxfY01M/ + ktG22wjf7hUapSCcICgim+NzOlqi2EfV5B3vQVqEpIAZa41wNw20VR9L70V82c7WbW+Kp8tr/udv + N8hpWADo+GfiNkcRb8iuAKEcb4Hj2S9tLxrWxlXPcb2W6LlResq5RfIMQ0YK4U3LQEfkbtwqvbZT + Zm2eGtMbmWSNKUjQURwBx4eD65rpOXjNriHcnq6uT+3TEVEgyAw8/M7U9v4rmc87FoR+Fd0qlI1m + FsZiRb7j0uRDstX6Zq0iEKrbHaYw7Cl6WOHRwUKGEpsunW83yh3xgTsXmkLGvVpAYWcKVcFvnof7 + nY+23nyxNA3yZj0Gj3Uj3aOChAlxpYwhKPNFbzm/4CmOBGPbZi/tCDsZJ+nSuN0imNzTLlqsepPP + KE8mD9Z41pQX3dgHgO+XtlOlbcWyYgCe0BRapWNLtxNfHpv6Btn+VE1PWK/10TwzEQOlaVmDt71x + mzRsObPDOky8lz2+4XUekzepZArz7Ik8pOQXzxDOqB3fQAbvCwsXZDJGkuVcp2Z0LB3LaYlAF9TL + 6bhfw2697242n3fm82Y2Y4reXEr/wx8+/emH7z8yip/vP1F6/fv8Cf30p//xw6dhbNqf+9gfmnrf + i+vo53Hq608fL4a4m+I63A/XU1n+8Gl6/1HT5z9+yut2Gn8em0dcD58+H48/fAr9MIt/DndWr29X + fv41AfT1/evLlr9+10zjL3cQ6Aj/6U//H97/CmKZJQAA + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:12:50 GMT + request-id: + - req_vrtx_011CUbYjN2QE7FWivnKbqSvF + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +- request: + body: "{\"max_tokens\":16000,\"messages\":[{\"role\":\"user\",\"content\":\"How + many primes below 400 contain 79 as a substring? Answer ONLY with the number, + not sharing which primes they are.\"},{\"role\":\"assistant\",\"content\":[{\"signature\":\"EqwkCkgICRACGAIqQJjhhl25rZqZmgEMXCU8hS3PC8iJxkt0/3B/AXozrme0fL0G2jM8tH920dBglOFYoG8/l7WwfPbGOTnCbcbBzG8SDAzNqmemU579yWXgyRoM46+qaOd8s+zlsK1JIjBOTNNQz5Oe88t6/XdtaHwDPmVctMUxIrLiq5KPj9byT2AIhgXumRQ8NyRTXYH//gYqkSNOEYSMTRke0W7sV63fHSxWaQ++hskQubtmZc1H22Xb51Ka/jkNrKJJN/cdYRFteMw5p4poXmY4oLlX05ZnY+VScDgV4ftol5MDLYtbIcOiqdhqhEC5zIo+YKhUW03wZDnYKJua+KGbAkPs0YCdWCRt/TXB7xCBPSn2NgmVIkmNuaGGYUcaye4GwIrZoo+CVvdAxbAGd9dQqXTYjr0NLVZ+3YZvB4n/zOWM0N0TCHhVGk9gD4Eqqrn4t8ylfSo+lcubnMUiB8D+52vMogObvvAO0FdvM+3zuDeEJhBuru7v14qweuw2T07nwQIL8mOVJ0Uk1N2U32L3DTG6FBrEP//PZxBwwbzXv4RjuvEl1WmeWnZMcbsQBDB2LsuRZMEN90qBZOY6FKLPqKW+1ZbD5VpxNWv6O+xhvwAvS4H9c1jeqvBiotuIhSsSPvIQltnG/Rtwd3t9EkgXMeFE8Hgcg2VKm9qege8HozkoinwvW/6epugzac6pNnqU4A+hTMJr2ouBr64NRMjKerdBh/f44ODBv+wNMn2dwqFxhzcxawIngqva1/4QzhgZeyBEdqLGqEgXTLrl6N/7wvDxuIGKP277K+x8YzSr26Df045koOOsMNn7Htp6q/in1CURIqhAMP5TE/ohmH0RdoqasN+CADXMBUoyfnePq70OdzmJLE+AaW+DrtmbnYLk5qWS7jtIviGvy9yVVzY1eg1kyIE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KJkp/LK8ZACxTN4HuMHWbyVagSWXevdJSI8Eu9YhrVSl+xR1XtBB+6zPyy+JQzpyG/VhuTCoNQPCCxDDNvRYCVcmT6fxGBDtZ4mq5AW65eVczQ40GEHmEWpM6qk1W//5pGD/XMrUAMwCLTMw2SQOBL/7P8QZidRfCfwMog/h80inm3hSCzVhzqLu2aSdP5S6YpFxhDbmiY2Ij3zdRJDo0O+3a/zd+KYKnxXLulcy2cLzJOI4dpMPYJ1NUtgbvPNxrljGibFrFIx127x3R2P8qPmDygW9ONt8fu1mca6SmOHZ3pE6ltLJdRZ4ZqFTVZzQciRUQur2uDa4mq8mhybvuVUMxr7SZozW/oJkNwLjgTyqCXhO75G6snAbF0ghr3HzU4ZZPQism8U2fEFH1ZQgadM3pqz8aVrNB3A0588A8hveEgtTJJrdmuZ6Wbgjc9I4Ryn2FUP/VOa4gWjeHzETUSOi7H3PE8GUU0XoD++qGxfYo6J5o9qj/0i5p+6EalVZdsyoYOEenyl3EoNrAXUdMv10Rg05opC062WRUmQnVgCyoxPCrRhKTtg/8Bded+6kX5QPSZX5nDyc1p7LYaAKJf8j22v+kaqSPG86KSxW4bcamdUm3DdvD14eNMW5Kua0MTpaSnO203QVq4NCD7dkTc6X4cCAJoqgvUUAYt5sFEjPN9erOj0cqSImjGzZZ5aqa3pZvHTPP0ZvQe/6noKWdj918JyARsbliwQpFajGAF9/eVVDHpt1XhFKQKtzUd1953ldwTnzME3G9fkDRxnAZdUDk+5FQi7mPzjwy4+5fBA3mgtpBpuGl6onU0Vaumux1QnQtSECdC0ggln/UNfKSB1TXvXDXCeNieGoGQG4MzKlCjSEZJG0NiHZRIE3VeU/C5rjT5IM9e2fwEngSd6lXTXp8bQIOH769ktUraYzVGiqSxUSotg3UYAQ==\",\"thinking\":\"I + need to find all prime numbers below 400 that contain \\\"79\\\" as a substring.\\n\\nLet + me think about what numbers contain \\\"79\\\":\\n- Two-digit: 79\\n- Three-digit: + 179, 279, 379, 479, 579, 679, 779, 879, 979, 790, 791, 792, 793, 794, 795, 796, + 797, 798, 799\\n\\nSince we're looking below 400, I need to check:\\n- 79 (two-digit)\\n- + 179\\n- 279\\n- 379\\n- 290-299 (no \\\"79\\\")\\n- 390-399 (no \\\"79\\\")\\n\\nWait, + let me reconsider. Numbers containing \\\"79\\\" as a substring below 400:\\n- + 79\\n- 179\\n- 279\\n- 379\\n- 790, 791, 792, 793, 794, 795, 796, 797, 798, + 799 (these are all \u2265 400, so not included)\\n\\nSo the candidates are: + 79, 179, 279, 379\\n\\nLet me check if each is prime:\\n\\n79: Is 79 prime? + \\nCheck divisibility: 79/2 = 39.5, 79/3 = 26.33..., 79/5 = 15.8, 79/7 = 11.28...\\n\u221A79 + \u2248 8.9, so I need to check primes up to 8: 2, 3, 5, 7\\n79 is odd, so not + divisible by 2\\n79/3: 7+9=16, not divisible by 3\\n79 doesn't end in 0 or 5, + so not divisible by 5\\n79/7 = 11.28..., so not divisible by 7\\n79 is prime + \u2713\\n\\n\\n179: Is 179 prime?\\n\u221A179 \u2248 13.4, so I need to check + primes up to 13: 2, 3, 5, 7, 11, 13\\n179 is odd, so not divisible by 2\\n179: + 1+7+9=17, not divisible by 3\\n179 doesn't end in 0 or 5, so not divisible by + 5\\n179/7 = 25.57..., so not divisible by 7\\n179/11 = 16.27..., so not divisible + by 11\\n179/13 = 13.77..., so not divisible by 13\\n179 is prime \u2713\\n\\n279: + Is 279 prime?\\nThe digit sum 2+7+9=18 is divisible by 3, so 279 = 3 \xD7 93\\n279 + is not prime \u2717\\n\\n379: Is 379 prime?\\n\u221A379 \u2248 19.5, so I need + to check primes up to 19: 2, 3, 5, 7, 11, 13, 17, 19\\n379 is odd, so not divisible + by 2\\n379: 3+7+9=19, not divisible by 3\\n379 doesn't end in 0 or 5, so not + divisible by 5\\n379/7 = 54.14..., so not divisible by 7\\n379/11 = 34.45..., + so not divisible by 11\\n379/13 = 29.15..., so not divisible by 13\\n379/17 + = 22.29..., so not divisible by 17\\n379/19 = 19.95..., so not divisible by + 19\\n379 is prime \u2713\\n\\nI should verify I haven't missed any numbers below + 400 containing \\\"79\\\". The pattern _79 gives me 79, 179, 279, 379, and 479 + would be next but that exceeds 400.\\n\\nSo my complete list is: 79 (prime), + 179 (prime), 279 (not prime\u2014divisible by 3), and 379 (prime).\\n\\nLet + me verify the primality more carefully. For 79, I need to check divisibility + up to \u221A79 \u2248 8.9, so testing 2, 3, 5, and 7 confirms it's prime. For + 179, checking divisibility by small primes up to \u221A179 \u2248 13.4 shows + it's also prime. This gives me three primes containing \\\"79\\\" as a substring + below 400. 22.29... (not divisible)\\n379 \xF7 19 = 19.94... (not divisible)\\nWe + only need to check up to \u221A379 \u2248 19.47\\n379 is prime \u2713\\n\\nSo + the answer is 3.\\n\\nLet me be more systematic about this. The numbers below + 400 containing \\\"79\\\" are 79, 179, 279, and 379. I should verify there aren't + any others\u2014three-digit numbers would need \\\"79\\\" as consecutive digits, + which only happens in those positions I've already checked.\\n\\nTesting primality: + 79 and 179 are both prime, 279 factors as 3 \xD7 93, and 379 is prime. That + gives me three primes total.\",\"type\":\"thinking\"},{\"citations\":null,\"text\":\"3\",\"type\":\"text\"}]},{\"role\":\"user\",\"content\":\"If + you remember what the primes were, then share them, or say 'I don't remember.'\"}],\"thinking\":{\"type\":\"disabled\"},\"anthropic_version\":\"vertex-2023-10-16\"}" + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '9753' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AsyncAnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2WNQUsDMRCF/0qZi5dd2V12tc1Nb4InQS2IhDQZ2tDsZJtMbHXZ/262WFA8zfC+ + j/dG6L1BBwK0U8lguVN2n8q27Mqmarq6qmoowJos9HErPwKfZFWvVk9fzWP3/HI43rXH1/U6tfe3 + myzy54CzijGqLeYgeDcHKkYbWRHnSHtizJ94Gy8+42km5yPgYWE8XfEiYI/9BsM1TO8FRPaDDKii + p+wgGckpEPyAiIeEpHMZJecKSOd9MYKlIbFkv0eKIG6WeV/pHUqdq9h6kn+F6sIzNv+ZT/w7WU7T + N6K8ZxJBAQAA + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:12:51 GMT + request-id: + - req_vrtx_011CUbYkCFZDfb5cKZjwVqJW + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_call_with_thinking_true/anthropic-vertex_claude_haiku_4_5@20251001/async_stream.yaml b/python/tests/e2e/output/cassettes/test_call_with_thinking_true/anthropic-vertex_claude_haiku_4_5@20251001/async_stream.yaml new file mode 100644 index 000000000..59682474c --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_call_with_thinking_true/anthropic-vertex_claude_haiku_4_5@20251001/async_stream.yaml @@ -0,0 +1,375 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/cloud-platform + openid https://www.googleapis.com/auth/sqlservice.login https://www.googleapis.com/auth/userinfo.email", + "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 30 Oct 2025 01:25:40 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"How many primes + below 400 contain 79 as a substring? Answer ONLY with the number, not sharing + which primes they are."}],"thinking":{"type":"enabled","budget_tokens":8000},"stream":true,"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '283' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AsyncAnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-stream-helper: + - messages + x-stainless-timeout: + - NOT_GIVEN + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:streamRawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2SOwWrDMBBE7/6KsOcY5LQJsW6Fht5CC72VIhZpiZ3IkuNdhZbgf68MNdT0uG8e + M0s3CqJXHTHjiQwLDlI4FNSrO8h3T6BhEcJ6vkHfoYuOfFasx+SobLC9pPKx3JYbtdlWSlVZb93U + wSdzG+TLqOr55XB4rxOmh+bcPb0dz6/13tVZXM5lMEQ/AWRu83aYtm0Mkj8G/fG5BpbYm4GQYwAd + kve/iOmaKFiaYZrfbUOfxEi8UGDQu13uQ9uQsblE2hjMUlBznmP3P4tJ/pL9OI5F8QMAAP//SoUE + aEFmXjpaOCoogQSVgGoAAAAA//+CqoH6JT4pJz85G3vQY1ECCtG8lNQKiPOQ5UE+hOorycjMywbZ + poNgWikBecWZ6XmJJaVFIEVKIPcCAAAA///C6hZgpJYk4ncLWAmKWyAimG6AK0VyiadCXmpqikJJ + vkIa0ACFxJwchYKizNxUhbzS3KTUomKlWgUwADoQAAAA//8aGAcqJKXm5JcrmBgYKJRkJJaArU/M + zFOIUYI5DeI6AAAAAP//GhjXmVvGKCkkFiskKhSXJhWXFAFF9WLyYvJ8UkuQnAdzIwAAAP//GqAQ + BMYmmKuQmATMKQrlGZnJGVhcBwAAAP//GiDXQRMaJJ7RnQVyFwAAAP//GiB3gVIcIrFBIxpLsAEA + AAD//xog5yGlOCtsoQYAAAD//xoYZ8Xk6SqYW6LmTAAAAAD//xo4lxiiOAXiGgAAAAD//xo41xgB + 0xCQMkZ3FMhVAAAAAP//GihXxeT5AQtXRCUArGOTsyElhEJ+GrDYSC1ORbgW6FAAAAAA//8aqNRe + lAqpl6xAbjbUQ3ETAAAA//8aIDeZW1opeKKWCEDHAAAAAP//GiDHANnFkBCyVwBWPqAyHxyXqCEF + AAAA//8aIMc96pgFdgbQBQAAAAD//xqoalrhUWeHggXQFUA3AAAAAP//Ghg36FnqKBTno+c1cNMP + AAAA//8aoGgpKEJJHAAAAAD//xoYVwBTbLFCaQEoQCz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8cHTBerhINQcA + AAD//xqgwIIMAaAUigAAAAD//xqgpKygEJNnrAeaUbdSCMlIBfdEAAAAAP//GrDpkHT0GRAAAAAA + //8aIJcUl+aCEosRqKmP1iECAAAA//8a2GkHC/S2NAAAAP//GqgONWRdAzCMUHtpWOpVAAAAAP// + GiAXIpc8AAAAAP//GqhUlA/KVsBoM1aAzdkDAAAA//8aoEpiuoIlMI+D6lDIQChiEAQAAAD//xqg + ob0500EDoCZ6oCU8WNdcAQAAAP//GuDlFchOAQAAAP//GhinGEMXWhiiLQEDAAAA//8aoArLFPuK + C5SAAgAAAP//GshZdMw+KgAAAP//GqgOUGZOZkklqDCEjA3DBmgtUSp7AAAAAP//GqBYhHQNAQAA + AP//GqB48iyBlYIAAAAA//8awHUNaEkWAAAA//8aoIEfHYVEWOMP6AgAAAAA//8aIEeAliRCEgQA + AAD//xok7T1YeAAAAAD//xrARh8shQIAAAD//xqgMh/r0DLQOQAAAAD//xrAgWWkaUAAAAAA//8a + oBK1OA/uAgAAAAD//xqgggN9LkIPW4sFAAAA//8aoFQbklpcAmKiNBIAAAAA//8aILfAcg8AAAD/ + /xqgdT0Y2QYAAAD//xrorgfIDQAAAAD//xqoZQ+wOU/kfhAAAAD//xqw2VdzpAoP7BIAAAAA//8a + qCrPEGXaAAAAAP//GhhXJObkoPfiAQAAAP//GqgaLwO8TQjoAAAAAAD//xqoDUv54PEmAAAAAP// + Gtjlt+AGux5ojNAYPEaIkn0BAAAA//8asPXk4G46dKEQbFwOAAAA//8aHIvbAQAAAP//GsDF7YgN + jCCjEzPzIDUf0FEAAAAA//8aoKCB7WYrSlVA61kAAAAA//8aqN0ZOtCZEQAAAAD//xqomRGgC4Bl + fQooL+mBEy0AAAD//xogh2hA0gUAAAD//xoY2ytTi9GSAwAAAP//GuCmCNAFAAAAAP//GqB4yEgs + huWSzDyFgvziTNCm9GIFQ0T/FwAAAP//GqCFWEYos1MAAAAA//8auG2DbkjLPsBOAQAAAP//GrB9 + b0WpqbrgTjm2ncRAhwEAAAD//xq47cOwUg0AAAD//xqooStEYgUAAAD//xqolhJo3DUeW78TAAAA + //8asG2A5RmpRanQQSSEcwAAAAD//xqg8EnLLCougYwogWalgF0fI1hvFAAAAP//GqheT36RgjH6 + klywgwAAAAD//xqgIEoHNndhAwVAVwAAAAD//xqwExQwh+oBAAAA//8ayLaKEaTBglwVAAAAAP// + GqjOKaTJBHEDAAAA//8aqDWSsKNKgE4AAAAA//8aICfkZGanKpgboOyLAAAAAP//GsjxLNSkCgAA + AP//GhiX5KP2wAAAAAD//xqoMSVDS4WUfNCK1fL8omxI+xoAAAD//xqokYtM0FFI6ON9AAAAAP// + GrCGU2olNGAyEsugcyoAAAAA//8aHEkW6BAAAAAA//8asPYBsOEPNLE4Nbm0JLMsFa0/BAAAAP// + Gsgpp2L08XugewAAAAD//xog9wTng1IP0NrcgpzUEmjSAQAAAP//GrCCF9iCyk9D7YsAAAAA//8a + ILckJ+alZAItSMV2TBAAAAD//xqo5cNIpyoBXQEAAAD//xq4zhDq4BdG8AAAAAD//xrgoTCk7ScA + AAAA//8aqBNuEOc5AfsCVohTlIBOAgAAAP//GrgpECxtTXiUAQAAAP//GvAWJ9QdAAAAAP//GrhB + EPRpTKBjAAAAAP//GsCh90TQlIAVSpsLAAAA//8a+O3LOtDdwkDHAAAAAP//GiDHIFxihDZTgggn + AAAAAP//GkSLwMDuAQAAAP//GuAtcKgDAED3AAAAAP//GqgyETIkj3UvPNBVAAAAAP//GqjFCxmJ + GAuAQM4BAAAA//8auBESjAYH0DUAAAAA//8a+JESoCMAAAAA//8aqJ3csGWMJfkliTngcQEAAAAA + //8auLWLkJAAAAAA//8aBD0roCsAAAAA//8aoC1akDVZepYmenrwLAx0DQAAAP//GqiKG3HOB9AR + AAAAAP//GqgkCqoVgdYDAAAA//8a4EpRDz5Tj1meAQAAAP//GrBCv7g8tQjkQsiSNaBLAAAAAP// + tFy1ssW6Ff0gF2YqUpiZ2Z2Zjxm/Pvc1mUz6NKqk0ZZ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gpvc8WU+qrOpmkMVpdzkwGiLaTSkgPXZ + eewb+LJu8+KR+lhRgM8udkfrqtF37gpSp0n9q5N07AOm6Qrog4+v4zJfZyfm6N7mrpmI6kI20FRE + 4/qoIZlwq3oKaN5FB0WcwUhsBYZZwJbDVQJRsVnr6heJTrGm+ZcEkiCNhTqU3L9so38MIa5NsNw4 + S0HE/mR2yewFQ0ddZlPH7risTlnyT4slfgbZjgDA6xOHq4BE0XOpdYTMcUW+35IbWf4Xbhu27EpA + Vd0intHvY+gRTPZsmT5SIRBNuyfxhdPqxTKFngJPJkjXsc80Ndtr4nTpH9Nl0Hs8DlOFdjLr60a2 + rDHBykzTVj6MXrf7UoL8+QRmhkeEEXkP+anpmSZUVhNk1C0IG9XxF7PdHts6V+aU/k9vGDokruDx + AwVyAlbwU4WwzOZKSKvf38zXdYkR/vU/r63/BgAA///COmwFuhcN/6gVSAXSoBXGuBwAAAD//8Jh + LKmXlhniubQstQKkEExBbycDAAAA//+i0hCcIZbBQKAtiIFAiJXGKLOYAAAAAP//oko4GqIHIwAA + AP//gpoKu1MPq19QJJWQ3I5y4Z1Sal5KfElpUZ4S1mvvapHuvUO7qc7Q1NQCbaoNAAAA//9CcxY2 + byLLKUG1AQAAAP//AwBlhjORP3AAAA== + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Content-Type: + - text/event-stream; charset=utf-8 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + cache-control: + - no-cache + date: + - Thu, 30 Oct 2025 01:25:41 GMT + request-id: + - req_vrtx_011CUcWdQx7ioXtNj6BnE9hb + server: + - hypercorn-h11 + x-accel-buffering: + - 'no' + x-vertex-ai-received-request-id: + - b2d005c0-7fd8-462b-9f2f-4dd27ed97b20 + status: + code: 200 + message: OK +- request: + body: "{\"max_tokens\":16000,\"messages\":[{\"role\":\"user\",\"content\":\"How + many primes below 400 contain 79 as a substring? Answer ONLY with the number, + not sharing which primes they are.\"},{\"role\":\"assistant\",\"content\":[{\"type\":\"thinking\",\"thinking\":\"I + need to find all prime numbers below 400 that contain \\\"79\\\" as a substring.\\n\\nLet + me think about which numbers below 400 contain \\\"79\\\" as a substring:\\n- + 79\\n- 179\\n- 279\\n- 379\\n\\nNow I need to check which of these are prime:\\n\\n1. + 79: Is this prime? Let me check. \u221A79 \u2248 8.9, so I need to check primes + up to 8: 2, 3, 5, 7\\n - Not divisible by 2 (it's odd)\\n - Not divisible + by 3 (7 + 9 = 16, not divisible by 3)\\n - Not divisible by 5 (doesn't end + in 0 or 5)\\n - Not divisible by 7: 79 \xF7 7 = 11.28... (not divisible)\\n + \ So 79 is prime. \u2713\\n\\n2. 179: Is this prime? \u221A179 \u2248 13.4, + so I need to check primes up to 13: 2, 3, 5, 7, 11, 13\\n - Not divisible + by 2 (it's odd)\\n - Not divisible by 3 (1 + 7 + 9 = 17, not divisible by + 3)\\n - Not divisible by 5 (doesn't end in 0 or 5)\\n - Not divisible by + 7: 179 \xF7 7 = 25.57... (not divisible)\\n - Not divisible by 11: 179 \xF7 + 11 = 16.27... (not divisible)\\n - Not divisible by 13: 179 \xF7 13 = 13.77... + (not divisible)\\n So 179 is prime. \u2713\\n \\n3. 279: The digit sum is + 2 + 7 + 9 = 18, which is divisible by 3, so 279 = 3 \xD7 93. Not prime. \u2717\\n\\n4. + 379: \u221A379 \u2248 19.5, so I need to check divisibility by primes up to + 19. It's odd, and the digit sum 3 + 7 + 9 = 19 isn't divisible by 3. Testing + 5, 7, 11, 13, 17, and 19 all show no divisibility. So 379 is prime. \u2713\\n\\nThe + primes below 400 containing \\\"79\\\" are 79, 179, and 379. (yes, has \\\"79\\\" + in positions 1-2)\\n\\nFor three-digit numbers below 400, I need _79 where the + first digit is 1, 2, or 3, giving me 179, 279, and 379. Numbers like 709 or + 719 don't work since they don't have 79 as consecutive digits. So the complete + list of candidates below 400 containing \\\"79\\\" as a substring is: 79, 179, + 279, and 379.\\n\\nTesting primality: 79 is prime, 179 is prime, 279 is divisible + by 3, and 379 is prime. That gives me 3 primes total. 19 = 19.94...\\nSo 379 + is prime.\\n\\nThe answer is 3.\",\"signature\":\"Ep4bCkgICRACGAIqQFJqudjG+Cc2ws2ydiYPEZ2xjfgS8bZzgRtuoPmTSA8h43edu/JbFYuPOEk+1rL5kdtCyEQ3m9W9wXXaN3EYrswSDDwVM2j7GinpB68XIxoMOs4PR+Bh3f+0xS1BIjCruu98Z6K1SwUj8AGFoJ+GhQurN8+vu9ZYe/nh6dPWnulhSa6CUeGczHuGVitZBVIqgxqywVnlbjbm2vxE2iBGBXSy7Da308Lj905t4V6F/Y4Rv860SgbbT8YtOzBZcHOrUUNDGRlho0UeNfxjTkhIIuws47A3vQkhzaP+EMPiq5AlI1FUfvdUbUPhKbp/CknMjSqgq5xoYX8E9u5/hO2JiCJr5cw7DByPqyYKDRS4ABqLbe4upXOZhtAx1zXeaVf7utoKGeUHeU7Cd8qhM9zXLyWNBxgePeu60nv/H8SMbm8boiBERDwzKxwdsMOD9xljHITKnaFjq/cI65zsDyrmnDIVGN+7zSfsqpZ5Ja4I2aqvlS7dv0r9ScvX8ytgEi5a+tDR8ZzMiSulh3PU9++uAPuLCLdDVfySdx0kBJpUxfKfRPkz9lQhR1kUYkYtqNjMYc/6tf4Iz2lWCybRyUHwYy+OaJtkISsI2+G7G4TxgHCS2Sg2TY1nsSVa2keHvudpsGDLbJmp25tgRSX4Ob7kotmG23+icUBYJBcknUZSGLjx1iFiL27zzzmM43I1AuYjJ4L45Ja2dCsckW0/YOcdkxvkeZ1OxWvVAJWp7q6Zwe7GOwYKlvHxhhnrYTu6+LAt9l5DCotDCjlRxU7s3faIke42Rz7czbLSiGDtmyWHEQS6D+CLTAdD8/3C/nKa20ocDo8Dfw583h+qfGbDlAS7uxmOLyPgpVgg5vqWTH/gSm3Ien0I2R2hZ27vb+PTOpodwOPsq20LzM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jQS/V8JHEr/RHPXbgTTFYhb6RR3uLOLNeOPM4jF1f7f5IdZaQSQDyfqXNCtzaT3LBZJb0e8Iw7kAKpNMg7E4jautsr/yBRgy5WJxOWU5oR4wWqqK9wbREGiKGjyL79XT+NNRE3x5lyQRAziPYNlRwNsKN2JR0P+ge6gRT3MGN1hJSI/Nwci0WCMAGBe/VaUBdkvd+WcrOqqTcYL8BNNHxDYUZXEfVGRwxSLzA6FqgUpw5B806sxaPdAscA9WiaP8tsQRBL8OHnKXGDo/Bi6+/vzFkvc0FFSR8ql0Nlq2znpbMabKcAgBdid+JJRcXo3zzA9l/Ysapmz7I62KKwmFy1Zey4aI9mUSH67RQPuZZNhvmCLGz0xRA3wlttNJ0s7ajfgHOOlY4daKKqDVWyRizZ67nT64NVtW46bj0TZNSNN0dem0Mfh/1MetxKcRj4riRHCIjOtmA9V6vUxTUI0QUBETZI6ONgvY7OjsyaTLLGAE=\"},{\"type\":\"text\",\"text\":\"3\"}]},{\"role\":\"user\",\"content\":\"If + you remember what the primes were, then share them, or say 'I don't remember.'\"}],\"thinking\":{\"type\":\"disabled\"},\"stream\":true,\"anthropic_version\":\"vertex-2023-10-16\"}" + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '7061' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AsyncAnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-stream-helper: + - messages + x-stainless-timeout: + - NOT_GIVEN + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:streamRawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2SOQUsDMRCF7/srwpy7kC221BwFvXgtRRAJMRnatGmyzUxKtex/NwsuuHic7328 + N3jFyEqckcjsURObzI0zbJS4A3/1CApmISymG9QdzslhqIoNpjhsD8afSvvQrtqlXK46Kbuqezd2 + 0F5fM9+07NbZvW4+t2+PaOPT9uX7tjs++1TF+VwFOYURGCJft+O4bVPk+jGo948FEKdeZzSUIqhY + QvhFhJeC0eIEy/Suj31hzemEkUCtN7XP2ANqW0vYp6jngpzyGrv/WSr8l3TDIIQYmuYHAAD//0qF + hGlBZl46WlAqKIEElYBqAAAAAP//gqqBeic+KSc/ORt76GNRAgrUvJTUCogLkeVBnoTqK0mtACkE + U1ZKSiC3IQDQBQAAAAD//8LqAmBsliTidwFYCYoLICKoNsOVQe33RDgAaDcAAAD//6Kv3Qop+Xnq + JQpFqbmpuUmpRXpIYQF0CwAAAP//whET+QWEIiK/AMklaIELAAAA//9KRc1WWL2GIqmE5BWUZK2U + mpcSX1JalKeENXHXIqVutPRogRziAAAAAP//SkXP55j+Q5ZTQvYMAAAA//8DAJl0spEkBAAA + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Content-Type: + - text/event-stream; charset=utf-8 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + cache-control: + - no-cache + date: + - Thu, 30 Oct 2025 01:25:49 GMT + request-id: + - req_vrtx_011CUcWe1WkZHuoWVS2M26g3 + server: + - hypercorn-h11 + x-accel-buffering: + - 'no' + x-vertex-ai-received-request-id: + - c5dc0e5b-979c-4f16-8d59-43b2ad44eed8 + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_call_with_thinking_true/anthropic-vertex_claude_haiku_4_5@20251001/stream.yaml b/python/tests/e2e/output/cassettes/test_call_with_thinking_true/anthropic-vertex_claude_haiku_4_5@20251001/stream.yaml new file mode 100644 index 000000000..b54ebf18e --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_call_with_thinking_true/anthropic-vertex_claude_haiku_4_5@20251001/stream.yaml @@ -0,0 +1,475 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/sqlservice.login + openid https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/userinfo.email", + "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Thu, 30 Oct 2025 01:26:57 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"How many primes + below 400 contain 79 as a substring? Answer ONLY with the number, not sharing + which primes they are."}],"thinking":{"type":"enabled","budget_tokens":8000},"stream":true,"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '283' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-stream-helper: + - messages + x-stainless-timeout: + - NOT_GIVEN + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:streamRawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2SOQUvEMBCF7/0VZc5bSBe7SM7iwqIXUVgQCUMztGHTpHYmi7L0v5uCBYtzm+89 + 3nt0pSC6HIgZOzIsOElhUVCXN5DvkUDDRoTd+oO+wRAt+WxpPSZLVY/ukqq7qqn2at/UStXZ7uyS + wZ25TvJlVH0641uDr93x8flpOPV9w+eXB8rGbV0GU/QLQGaXu8PS3cYgeTHo948dsMTRTIQcA+iQ + vP9FTJ+JQksrTOtcF8YkRuKFAoM+HHIetj2ZNoeIi8FsDWrVs2z/azHJX3I/z+Xm5qL4AQAA//9K + hQRvQWZeOlqoKiiBBJWAagAAAAD//4KqgfosPiknPzkbe0RgUQIK37yU1AqIY5HlQf6F6ivJyMzL + Btmmg2BaKQF5xZnpeYklpUUgRUq1ECcDAAAA///C6hxgLJck4ncOWAmKcyAimM6AK0VyjKdCXmpq + ikJJvkIa0ACFxJwchYKizNxUhbzS3KTUomKlWtSABQAAAP//GhhXKiSl5uSXK5gYGCiUZCSWgK1P + zMxTiFGCuQ/oNAAAAAD//xoYp5lbxigpJBYrJCoUlyYVlxQBRfVi8mLyfFJLlGrRkyUAAAD//xqg + 0ANGJ5irkJgEzDsK5RmZyRkIxwHdBQAAAP//GiB3QdMYJHYhDgI6BgAAAP//GiDHgBIXIl2BotUK + JYwAAAAA//8aGGfF5OkqmFsqaKCmJaBzAAAAAP//GhjnlJTnw10CdAQAAAD//xoYR+iixAsAAAD/ + /xoYN6RkpmeWaIJix9DcEi2jg50FAAAA//8auORiBEy7QMoY4i6gUwAAAAD//xrIlGuAHjZA9wAA + AAD//xrwVAN3CQAAAP//GqgqA5ihk4AFcUlGanGqQmJRKrjeBRbOZamYdQYAAAD//xq44lAHJZ8B + AAAA//8aIHeUJ2aWoDdCAAAAAP//GqjqKh+ptQEAAAD//xoYN+iAspQ2tvIGAAAA//8aoDDJLIak + W1B60QS1exyTS0qBqbkSo8ICAAAA//8aqADLSS0BNYCKUpORYg8AAAD//xoYx+TnFWempBbpKfhh + aVxDHAYAAAD//xps7WtwJQJ0FwAAAP//GqA6RMkK1gDKzIM3EAEAAAD//xqgMAKW1nAnAAAAAP// + GiAn5OelFmNkLAAAAAD//xogtyTmIbsE6A4AAAAA//8aoIaYAtCoYoWCnMTkVFh7TEGpFugeAAAA + AP//Ghj3aKA0B4HOAAAAAP//GqiCOQ8cCAAAAAD//xq4vKKQk1hcAm2BAgAAAP//GihXlOcrgBvq + xZrQhrECatwAAAAA//8asCQCjB54GCE5ExxlAAAAAP//GhhHaUL7DAoa2PszAAAAAP//GrBkjC2c + NNGKHgAAAAD//xo0PRygWwAAAAD//xoUxTHIIQAAAAD//xqo8hjSHizPL81B6T8AAAAA//8aKOck + paLmeQAAAAD//xqo+MHSuwO7BwAAAP//Gvj+HdARAAAAAP//GiBHFOcrlKcqpOTnqYPbnODWMTC/ + 5xengktCAAAAAP//GqhsHZMXDut1Al0BAAAA//8aqI4LYmg+KVUhN78oFVqZAgAAAP//GqC4Sk4s + Sk0rzdFT8IF0qJBHlIEdPpS8DgAAAP//GiAnFuQXZ4Kmk4oRCRsAAAD//xqoUYuM1KJU6DAyMOTy + FBILClITi0DVWSJ6OQ0AAAD//xrQwXdEz88KlO7d8osUUGISAAAA//8aGMcZ6YLredgEgRVaFQsA + AAD//xqgEMPeMAIAAAD//xqoQgoUVcZo4QRLXEBnAQAAAP//GqihTdTkAwAAAP//GhhXQHJfImhw + ylDXGLX6BwAAAP//GqC0o1GcmZecCqrtwIU66owXAAAA//8auCaAJrROAQAAAP//GrAGNLYcBQAA + AP//GqDgMITMm0CmT9BKHAAAAAD//xogJxmD3BKTF5yPkqkAAAAA//8awD49sCpLyQRagj4MBXYX + AAAA//8aqJZ1UaoVsGzWAUWgDrjdCAAAAP//GiCHGIEcAY0yrNP/AAAAAP//Grjp/+SM1ORslIl/ + oHMAAAAA//8auPiCljoAAAAA//8aqGYiaIGLFTilAAAAAP//GrgehrmllYInPBcBnQIAAAD//xqw + Rg0kPOwVsORoAAAAAP//GhzVAtAhAAAAAP//GqDA8ctHy8VApwAAAAD//xogp6RklmUWZyblpCok + VSoY6aA2agAAAAD//xqo6klHwVRHwRxbHQ4AAAD//xq4EblHHbNgPXcAAAAA//8asDbwo84OBQuY + KwAAAAD//xoYV+gB66LifKRBBHAVgFTeAAAAAP//GrDCFxYuAAAAAP//GhgHAIu6YoXSAlCIWICS + C2YtDQAAAP//GqhUo48UOQAAAAD//xqgbreCrYKxpZ4ptqoAAAAA//8aoKmSvPwSRNGniRJhQEcB + AAAA//8asKgyBoaUkZketpIPAAAA//8aGDcZG+vp6SmgBReiqQcAAAD//xrICRJ9U2BgodZXAAAA + AP//GhjnGJrqWaAFEUbtDgAAAP//GsDJN2BImSsglQEAAAAA//8aGKfYKhga6hlZwMcmAAAAAP// + GqDaCzMxo7QKgQ4DAAAA//8aoPorEssKDAAAAAD//xq4tWCgIS5w8x3UpUBeiQp0FQAAAP//GhhX + gXo14DUYkF4FekMeAAAA//8auILIDzk1gRvR2Ko5AAAAAP//GqBqLhN9tADsGAAAAAD//xoYx6gX + K+SnpCDXtUCnAAAAAP//GqASG20YDgAAAP//GhhXaJtrWwKrMENzWMsVAAAA//8aqPyeh56EjTGK + IgAAAAD//xqo/IWezwEAAAD//xq4gRVdRKIFAAAA//8aoCrCJT+1GLL6CgAAAP//GqAMXKKQmpcC + mms0UECZzwOFCQAAAP//GhgnmYI7oxjpF7K2FAAAAP//GiAnQQcLDKFzVkCHAAAAAP//GhiHgAYL + DI31TEBBhNLCAQAAAP//GqDk6wkNDQAAAAD//xqoeWnk8QpgTx2pRQwAAAD//xqoiY98YPxAl5bq + wxvGAAAAAP//GqC+J6jjaapnag5sIUPjCQAAAP//GqgZTVxdc6CTAAAAAP//GqDWAjB6DA1BNTVm + zxzoKAAAAAD//xqgMRVz3B1zmMsAAAAA//8auEYxOMiMUfvncGcBAAAA//8aoFg01jPHEmYYLR0A + AAAA//8awJ46sA+oowCrN0BuAQAAAP//GqChTKS+nxFkPgk0BwktFgAAAAD//xrIyTV7jA4XevsQ + AAAA//8aqH0uoG4fsLcF7uMgd5YBAAAA//8aoNWpkHXpwA4GevgAAAAA//8aGPeAuzkWOkgTxUCn + AAAAAP//GridZVj7OkAXAQAAAP//GrjyMjgfvIvAFkvPCwAAAP//GqBgOjxdwdJYRyE3NTEPJIJa + sQAAAAD//xogN6G0YgEAAAD//xqoahc8NgaqQuBlpDGwjMSINgAAAAD//xqoRnYxeLMFvLREauUC + AAAA//8auLlu9PExtFMHQI4DAAAA//8aoJquBGlQyhgtkQMAAAD//xrYQSGUIVcAAAAA//8aXAND + QAcBAAAA//8auJISPAiCNBKBKL0BAAAA//8aqL2TRQpooxDY2rwAAAAA//8aoPQNjTbYmIQx+lJj + oMsAAAAA//8aoGADj05Y6qEU6QAAAAD//xqgARvUgSwAAAAA//8aqLyGuagCtqYB7jQAAAAA//8a + 8JUNhpbw7jjQOQAAAAD//xqgGWnwfKatgqmJHlLlBgAAAP//GqA+pQmBTjjEcQAAAAD//xq40tIY + NnQBizMAAAAA//8aoDgz0TMxxdn3BjoLAAAA//8a2L2poKEK+BgTAAAA//8aqOlxI0s9Q3gYYatC + AAAAAP//GugFgvDQwjIGBgAAAP//GqiBOdCopZGekSUiJQEAAAD//xp06wqAbgIAAAD//xq4Vf76 + hsiNSaBTAAAAAP//GqhFg1hyP3pBCXYfAAAA//8auKISPPhmDO7eoXUEAAAAAP//GsgRL8g2DfAe + CeTWANBVAAAAAP//GsDGAOJUF5DRiZlIIwRAhwEAAAD//xqg4IJuioTt2oBMAQIAAAD//xq4LT86 + 6DvnQc4BAAAA//8aqL3qwGSNbeYCAAAA//8auMn0ENBpQOmZZeBFT0CXAAAAAP//GrAdLJiNNQAA + AAD//xqowhqS34uBzeySxBw98DQ/AAAA//8aIKeg7DECOgMAAAD//xq47UVlqUWZaZWonSAAAAAA + //8ayNlrmBsAAAAA//8aIDdkJALtVS9RyM0sLgb2ExPzKrEdpwt0HwAAAP//Gqjd6ZklGdgqdQAA + AAD//xrgGgHlEN1HDVMgRQ4AAAD//xqg+hNjRRMAAAD//xqoTYWoW7wV8vNy0DIaAAAA//8a8EF+ + sCsAAAAA//8asL025flF2cWgWhw8zmiMnP0BAAAA//8aGDehRRjijGqoqwAAAAD//xqokIKeRIFI + QEC3AAAAAP//GqgtoJDTMBJLUFMyAAAA//8awI3NkEPdEeNUAAAAAP//GqDRRYyWKAAAAP//GqAg + ATb50GYToe4BAAAA//8a6AYg0AkAAAAA//8auL4ClvAAAAAA//8aFOkE5BAAAAAA//8a2FoA6AAA + AAAA//8asHleSNlvDOlLooUKAAAA//8asON/MpMzQE1RoBMAAAAA//8aoDXAZdBN/6nIFSIAAAD/ + /xqgfq0eelsKAAAA//8asFIkMQ/rrB8AAAD//xrAigd28COGmwAAAAD//xqo8wDAuclSIbe0GH4C + GgAAAP//GthWAtDM4tTk0pLMstScSsiBkIkYA+9AVwIAAAD//xqweWXQkc6IchAAAAD//xogZwTn + K5gbWCqkQPYeIAULAAAA//8asD0IoIY5dBkCAAAA//8aoDABn7mEWSkAAAAA//8auNxehLEOEgAA + AP//GrAtXonYykEAAAAA//8aBF1JkDMAAAAA//8aGGcYKCSllpSnpoJPnM1FH4cFOgsAAAD//xqo + Yb78/GyUgXsAAAAA//8aqLWziaDzI4D2AwAAAP//GqjqoARxBDs8TgAAAAD//xoMKRbqFAAAAAD/ + /xqgfn2SpUJBYklJalEeUvcVAAAA//8auIVoeamQYTsAAAAA//8aqNo4DXKrCrTiAQAAAP//Gqg9 + TDjvdwAAAAD//xqovIPlVg6gawAAAAD//xog10BnI5EGfpHaeGhOBAAAAP//GrDVFKBmOXwQGgAA + AP//GhhXAFNyJfhqINCEgkJxfm4qSDIdKZ8DAAAA//8aqKoAUlFCMxkAAAD//xq49hSsgwIAAAD/ + /xrYvpIechcbAAAA//8aIKeEZKAdcw4AAAD//xqo8hc8ugy0HwAAAP//GiD7yzITUXYbAV0CAAAA + //8aqEIO+1GZQAcBAAAA//8aqDqgKBW5AQV0CAAAAP//GiiHYKkXAQAAAP//GrDpo7T8olzYcALQ + HQAAAAD//xqwAUOUviHQIQAAAAD//xqouFF41NGhUG2IdsAgAAAA//8aoMFdHeNaHWxzEUAXAQAA + AP//GsgVQ0Y4lg0BAAAA//8a6GVDQCcAAAAA//8a4DMDAAAAAP//GuAzAzDWoUDiBQAAAP//GshZ + APR0CwAAAP//GhwdVqBDAAAAAP//GqAV5miz44iD0IFOAgAAAP//GqCwQVogiR5bAAAAAP//GrAV + MdgGGAAAAAD//xrAhQNYumhABwEAAAD//xrQvhm2hZIAAAAA//8a8MY30A0AAAAA//8aqFXIqGNA + IJcAAAAA//8aIJfEQ7rMAAAAAP//GrAWHWy5KiQQAAAAAP//GujyFugEAAAAAP//GrDTUCARAQAA + AP//GqixQNhx+GgHUAEAAAD//xoY52iArygCWg8AAAD//xqg9FAK1FaE1PUCAAAA//8auKpOUwc5 + bQIAAAD//xq4plEObIwWAAAA//8aqMEby3iFgqL8lNJk2OJ2AAAAAP//GjCHGOiCrwQHjfSlViSj + rNgAAAAA//8aGDelpgBpcGLRU3DMzcdcCQZyGgAAAP//Grhhv2JsF5EAXQQAAAD//xqokg5R+QMA + AAD//xqoSg/hAgAAAAD//xqoMIBvpQG6AQAAAP//GsB+MHiUC7xDA3IVDAAAAP//GqiVRolIU7bw + 9AkAAAD//xqwHFOUinl+FgAAAP//GsjdctDdM7hW8gAAAAD//xqo5SKJJZnFaZWQi46AvZ2SImCP + sARSNwAAAA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m9v0Fzvi8Wa9Ie + uxnBohQCAe+/DJde+jSV7P31uyknRx8Ximj9+bVb1CdIouJ1F8QngmOaknRGwXG2cQERUyw1Rjhb + 8/uwlDxR5wx51IubDHS+9wjVpKSFYS12gB9kJPxf2WuXi7bH9y0o+Inhgx6k8PA/NROB5gWIP7gm + VgPOVELAbHQBWQ5LB4AM4xU/aqKwXR9TsrvXh2fFkOkocUdFz8dtBeVYSal/bzW2Xx2PaF2xIqC6 + A1fvj9I/09gDp+SPMXUxywMKk5cEIOxnS0x/k9u0ywTeiDAjgixrL0ezUZ+0OxUxDOcPWrZH1dTq + S8jZCSzU5+1zDCCw0pOz0+6Je88HN6rix0SSxAj//P+Myf8AAAD//8I6zVpckl+Af5YVpAJpklUB + Y/oWAAAA///CYW5iUQkhg0F3asFNNtRBlUeeXU6tACkEU1ZYzz4DAAAA//+i0hSyIZaZbaCliFlt + iAuMUdYCAgAAAP//okq4GiLMAwAAAP//gpqXm1pcnJieit0XKJJKSK4GmRpflJpYnJ8HVJaalxJf + UlqUB5r4BkkUpxaWpoLWrFvllebk1OoolYJMAenLLy0pKC2JL8nPTs0rVrIyMrY0By/JBQAAAP// + QnMMNm8hyymhRgsAAAD//wMA4hVfh8fMAAA= + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Content-Type: + - text/event-stream; charset=utf-8 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + cache-control: + - no-cache + date: + - Thu, 30 Oct 2025 01:26:58 GMT + request-id: + - req_vrtx_011CUcWj75kfHHq84GZWunQi + server: + - hypercorn-h11 + x-accel-buffering: + - 'no' + x-vertex-ai-received-request-id: + - a85d0ea2-7f73-4b9b-81fc-f17000ad7ff7 + status: + code: 200 + message: OK +- request: + body: "{\"max_tokens\":16000,\"messages\":[{\"role\":\"user\",\"content\":\"How + many primes below 400 contain 79 as a substring? Answer ONLY with the number, + not sharing which primes they are.\"},{\"role\":\"assistant\",\"content\":[{\"type\":\"thinking\",\"thinking\":\"I + need to find all prime numbers below 400 that contain \\\"79\\\" as a substring.\\n\\nLet + me think about which numbers below 400 contain \\\"79\\\":\\n- 79 (two-digit)\\n- + 179\\n- 279\\n- 379\\n- 790-799 (but these are all above 400, wait no, 790+ + is above 400)\\n\\nActually, let me reconsider. Numbers below 400 that contain + \\\"79\\\":\\n- 79 (in the ones and tens place)\\n- 179 (79 in the last two + digits)\\n- 279 (79 in the last two digits)\\n- 379 (79 in the last two digits)\\n- + 790 and above would be above 400, so we don't consider those\\n\\nWait, I need + to be more careful. Let me think about all positions where \\\"79\\\" can appear + in a number below 400:\\n\\nFor 2-digit numbers: 79\\nFor 3-digit numbers: a79 + where a is 1-3 (since we need below 400)\\n- 179\\n- 279\\n- 379\\n\\nSo the + candidates are: 79, 179, 279, 379\\n\\nLet me check which are prime:\\n\\n79: + Is 79 prime? \\n- Not divisible by 2, 3, 5, 7\\n- \u221A79 \u2248 8.9, so I + need to check primes up to 8\\n- 79/2 = 39.5 (not divisible)\\n- 79/3 = 26.33... + (not divisible)\\n- 79/5 = 15.8 (not divisible)\\n- 79/7 = 11.28... (not divisible)\\n- + Yes, 79 is prime\\n\\n179: Is 179 prime?\\n- Not divisible by 2 (it's odd)\\n- + 1+7+9 = 17, not divisible by 3\\n\\n\\n- Doesn't end in 0 or 5, so not divisible + by 5\\n- \u221A179 \u2248 13.4, so I need to check up to 13\\n- 179/7 = 25.57... + (not divisible)\\n- 179/11 = 16.27... (not divisible)\\n- 179/13 = 13.77... + (not divisible)\\n- Yes, 179 is prime\\n\\n279: Is 279 prime?\\n- Not divisible + by 2 (it's odd)\\n- 2+7+9 = 18, which is divisible by 3\\n- So 279 = 3 \xD7 + 93, meaning 279 is not prime\\n\\n379: Is 379 prime?\\n- Not divisible by 2 + (it's odd)\\n- 3+7+9 = 19, not divisible by 3\\n- Doesn't end in 0 or 5, so + not divisible by 5\\n- \u221A379 \u2248 19.5, so I need to check primes up to + 19\\n- 379/7 = 54.14... (not divisible)\\n- 379/11 = 34.45... (not divisible)\\n- + 379/13 = 29.15... (not divisible)\\n- 379/17 = 22.29... (not divisible)\\n- + 379/19 = 19.95... (not divisible)\\n- Yes, 379 is prime\\n\\nSo the primes below + 400 containing \\\"79\\\" are: 79, 179, and 379.\\n\\nThat gives me 3 primes + total. Let me verify I haven't missed any numbers with \\\"79\\\" as a substring\u2014in + 2-digit numbers only 79 works, and in 3-digit numbers \\\"79\\\" can only appear + at the start, giving me 179, 279, and 379, which I've checked. means the digits + 7 and 9 must appear consecutively in that order. So 709 doesn't work since there's + a 0 between them. Looking back at the 7b9 pattern, none of these numbers actually + contain \\\"79\\\" as consecutive digits\u2014they all have something between + the 7 and 9. The only viable candidates are the a79 format where a \u2208 {1,2,3}, + giving 179, 279, and 379. I need to verify which 3-digit numbers below 400 contain + \\\"79\\\" as consecutive digits. The pattern _79 gives 179, 279, 379 (all under + 400), while 79_ produces 790-799 (all exceeding 400). Among these candidates, + 79, 179, and 379 are prime, making three primes total that satisfy the constraint. + So the answer is 3.\\n\\nLet me verify 379 is actually prime by checking divisibility + up to its square root. Testing 2, 3, 5, 7, 11, 13, 17, and 19 all fail, and + since \u221A379 < 20, that confirms 379 is prime. I should also double-check + 79 and 179 to be certain.\\n\\nFor 79, since \u221A79 < 9, I only need to test + primes up to 7. It's odd and doesn't divide evenly by 3, 5, or 7, so 79 is prime. + For 179, with \u221A179 < 14, testing 2 through 13 shows no divisors, making + 179 prime as well. All three numbers check out as prime.\",\"signature\":\"EqgrCkgICRACGAIqQLIoo61+z31J+M25ofLj9gJB8ebH6jZrOkVHYTmHOAarD7GyCsHlradpE8k7wo3Re48AUQMmMGdrKIKU2leXYk8SDL7mOhRAyZ6LCUW6ZxoMyObtmhU1/hBKoCNUIjC7QFg9Jy8gSPGx4g9Yt43F7PHXs8cdBpt7aY8DFIh+rMkbbiTtBjFC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PnjBnojtC72EFgDrEOwoMGWViK46jYRSx/JmQNuuXfy2mlKrsftCKrev0xdZ2yfTkZVXt/WZUOM32FlxPR3R+v9809GvAgswDPP25/PYep01Fa5iwtC7+x82uYRBUtFh7czcQzmaAB2v3DfGsJkOCCn+HS+a8P7zRbnag5vz9ntq4t4tA8sVDEOlQx5KEgWJeZImBvpHu65dQSTV3UVxVd63nxbzVAOXiIXEPo+cbeLwer8Vw0qpCJV9fJqUgZs3slSKaUaC4lGE39n1ki0WDiAo2apJ/GIsdsGy+S94hdFkBs01zAUA1qj6BmtgIRVdfKcDnuCq+V4nXfGCOKGSNL+ZKlaPPpyBK8d0EQ68Qp3l566J+Y8/PALjw/NowvB4gZj4wAEO8I62/wka5Gy9uNIayP6DNHYtjXcIFOkTfRcfu/73Fvwc6zF/mZZ79a81XarCU6X8B8mW5BfDslpdD6fbA7tfpRYl9bsj28gZ7O44h4t/z0MYDkdjKvR3htzzp3/zFVx3t7ExD0V76UKSU2TlRN4f+Qnd0+oMiU7dlpi+/AAScacL84sLmZ7iwqxDBFVAi8Fs3FST5PI3CBGIfzp3Mr0WDtWqq4cU8it5Jwz8LzNMsUQdDtmZR4OS+cNDGE+VjoOFZJXansH65gF1AF/BBPptgr8zGsQe6llurGqrxJKJezY7oQUO3TDPumU0/eLYuiKwnCyux5MecfTmGGAE=\"},{\"type\":\"text\",\"text\":\"3\"}]},{\"role\":\"user\",\"content\":\"If + you remember what the primes were, then share them, or say 'I don't remember.'\"}],\"thinking\":{\"type\":\"disabled\"},\"stream\":true,\"anthropic_version\":\"vertex-2023-10-16\"}" + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '11317' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-stream-helper: + - messages + x-stainless-timeout: + - NOT_GIVEN + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:streamRawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2SOwWrDMBBE7/4Ko3MMcmjaoh9IDj00x7YUsZGWWFiRHO8qOAT/e2WooKZ72zfD + zOANA6v6gkRwRk0MI1cWGFT9EHwfUCixEsWm/EI9xCVa9NliPCSLTQeuT81Ts2u2crtrpWyz3dkl + g876NvKkZXs49V2El/10vH/Sh5vi6T287bNxXZfBGP0CgMjl7rB0mxg4Lxbq63sjiOOgRwSKQaiQ + vP9FhNeEwWCBqcx1YUisOfYYSKjn15wHpkNtcgi7GPTaIIueZftfi4n/knae63JzVf0AAAD//0qF + hGxBZl46WoAqKIEElYBqAAAAAP//gqqBeio+KSc/ORt7HGBRAgravJTUCog7keVBXoXqK0mtACkE + U1ZKSrUw1wEAAAD//8JqMzAuSxLx2wxWgmIzRATVRrgyqL2eEIuB9gIAAAD//6KvvQop+XnqJQpF + qbmpuUmpRXpKiBiCxxMAAAD//8IRB/kFhKIgvwDJPVDDAAAAAP//SkXNTlg9hiKphOQRlOSslJqX + El9SWpSnhDVR1yKlarR0aIHFkwAAAAD//0pFz+aY3kOWA6VNAAAAAP//AwCUaQj/GgQAAA== + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Content-Type: + - text/event-stream; charset=utf-8 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + cache-control: + - no-cache + date: + - Thu, 30 Oct 2025 01:27:13 GMT + request-id: + - req_vrtx_011CUcWkFneraR1PwECxJVzg + server: + - hypercorn-h11 + x-accel-buffering: + - 'no' + x-vertex-ai-received-request-id: + - bd899488-1699-4ad8-b3ba-dd57531f95eb + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_call_with_thinking_true/anthropic-vertex_claude_haiku_4_5@20251001/sync.yaml b/python/tests/e2e/output/cassettes/test_call_with_thinking_true/anthropic-vertex_claude_haiku_4_5@20251001/sync.yaml new file mode 100644 index 000000000..36a82d565 --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_call_with_thinking_true/anthropic-vertex_claude_haiku_4_5@20251001/sync.yaml @@ -0,0 +1,315 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/userinfo.email + openid https://www.googleapis.com/auth/sqlservice.login https://www.googleapis.com/auth/cloud-platform", + "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:12:20 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"How many primes + below 400 contain 79 as a substring? Answer ONLY with the number, not sharing + which primes they are."}],"thinking":{"type":"enabled","budget_tokens":8000},"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '269' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/51Y6a6j2HZ+FXT+pEucOky2MaV0IjBgMDPGGJOKSph5nsG41dL9efM/UqS8Tt7k + PknA55yauu9VFMkysPea9rfW+vaG357y0vOzp09Pbub0nv8xcuK0/7j6uP6IwugagWHk6fkp9maB + vA2/DE13+wIjJxNrtVUcX4ptf2JQ1Nw7wn0R7KbKX0T9tnVCfx5oymwZcNo2bjun6OYhtyw6f777 + 9G+/vct3UVykcREuFt5vPz3xQOH7HtCVQBAXHuBkGVA1ce4DRZ9f/aYFrn5WjsAKhoEucjpgMezE + BfD5CSc+PwFOCzhA21/brpntvXwuPhei3wGz/sMH4FzLvvtq6015lnzT//S5+AjgBBB3rZ8FywMy + D88X9PWCvV5wAgZ+uc6GZqMtMP/+5dclomfAeYTclkA0B/Jq8sOrAv5nCh+W+M5O3D0D2WuUVx/I + y8YH2qnt/NzpYvcF+BNI/t9gGGP50YvD+BsGY9xFc3xvK3/IRI3v/wOpY+c03YLZ++CCx/P8hyx/ + 6DPw8vKy3BHvS/ZbH3DmRb2jNONTlMU8VlXZ9OEN5ecF4+cFYeCXMfJn8S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I95xa6r3O2KBAjlN+zPwI04aC2kO65hRb3RbrLaOQ28A3nOigrnYH6dBCjK25CERl + wzpPZgLnB9Kzj8c9z95owdVL3UNg5S7x8ipipZCnTRXr3LA05EwPsQ7dOYzMNnvLtyITNFIexm3Z + VSsm8VPaPDo2OZGZdqS95oaXN8RcoZR6O+53oSTpU3/HrvoMm5aglXM/Gx7n9DlDEAyrNNhO8efX + pcF1Dvz6CCKrw2Z1OlcDOa0LWU+im+51Eqcp5gUFGebojci5HKJ+dUFVet9IImqFbGw5EBG6FMWt + mluB4dW2YHKko1rJXbHlVhyjiyrqZn6Y95SqRhERRQrtlLLxqLtDbNuNwrENYYooy25xbjBUR89x + hYzKzXrLQpzpig1RXvMqrvTjeq9KBazXXoYrwwiX8xnGEai4FmFFKBGxDRiHlieqHUdDLPzUVs5J + vnHWG8GTR2LDEK5yux7qs2VgmTid9blxvFOv3+M23TkbMhvnVFvn6rzbrxCIuZDar78+/f787eO5 + f1s+qz8un56wp9//fX6P7MrqS+M7bVnMY37hfZlfKount4nWr3u/cGflos+y56f+8bH+029PcVH1 + 3ZeuTP2iffq02Tw/uY4b+V/c2dTyTv/lRwH4fX6e9v44V/bd9yMIvN3+/vv/AnSLCeVxGAAA + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:12:28 GMT + request-id: + - req_vrtx_011CUbYi1UMZtNfQzQw6FK8n + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +- request: + body: "{\"max_tokens\":16000,\"messages\":[{\"role\":\"user\",\"content\":\"How + many primes below 400 contain 79 as a substring? Answer ONLY with the number, + not sharing which primes they are.\"},{\"role\":\"assistant\",\"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t2CaENFrGXeXhV+TkI07ZNcPpEjekDVSaZAyAlQSDdrx7ox1V42BPxSGCgMMRyuz3bRhBFQj2pazWTdHaumE99EFOr3COeitevcaJI5S+14J64UWpvAy5nNRjhxRdtMHQOVY2+EESdw1Wovhu4Y2PDGrML2XgFiXa/9gcBBH4rxn37p8nEm1tBsMc4Fo8LwhYPLRVmJRVlpq21L21nQUkFiwRcviZZrOHFr9VL2FF87HvTPaRm7OAho658F/HVcLr9obmpipRS5GPMn0Rqdl7Ovw0oYh1aKBiqL0OKo1LsfEaDNyBswwTLnekZOWjm6a56KdNw96E9cOxbJqWXT3lLyWRvPIdUuRziskCa6Alwe0aXWpWCG41/EYAQ==\",\"thinking\":\"I + need to find all prime numbers below 400 that contain \\\"79\\\" as a substring.\\n\\nLet + me think about numbers containing \\\"79\\\":\\n- 79 itself\\n- 179\\n- 279\\n- + 379\\n- 790 (but this is >= 400, and also has \\\"79\\\")\\n- 797 (but this + is >= 400)\\n\\nWait, let me be more systematic. I need to find all numbers + below 400 that contain \\\"79\\\" as a substring.\\n\\nTwo-digit numbers with + 79:\\n- 79\\n\\nThree-digit numbers with 79:\\n- Starting with 79: 790, 791, + 792, ..., 799 (but these are >= 400, so none apply)\\n- 179, 279, 379 (where + 79 is at the end)\\n- 179, 279, 379\\n\\nWait, I need to reconsider. Numbers + below 400 that contain \\\"79\\\":\\n- 79 (two-digit)\\n- 179 (three-digit)\\n- + 279 (three-digit)\\n- 379 (three-digit)\\n\\nActually, let me think more carefully. + For three-digit numbers ABC where we want \\\"79\\\" to appear:\\n- 79C: 790, + 791, ..., 799 - but these are all >= 400, so none work\\n- A79: 179, 279, 379 + - these are all < 400, so all work\\n\\nSo the candidates are: 79, 179, 279, + 379\\n\\nNow let me check which are prime:\\n- 79: Is 79 prime? Yes, 79 is prime.\\n- + 179: Is 179 prime? Let me check. \u221A179 \u2248 13.4. I need to check divisibility + by primes up to 13: 2, 3, 5, 7, 11, 13.\\n - Not even\\n - 1+7+9 = 17, not + divisible by 3\\n - Doesn't end in 0 or 5, so not divisible by 5\\n - Testing + 7, 11, and 13 all give non-integer results\\n - So 179 is prime.\\n\\n- 279: + The digit sum is 18, which is divisible by 9, so 279 = 9 \xD7 31. Not prime.\\n\\n- + 379: Need to check if this is prime by testing divisibility by primes up to + \u221A379 \u2248 19.5.\\n - Not even, and digit sum of 19 rules out divisibility + by 3\\n - Testing 7, 11, 13, 17, and 19 all fail to divide evenly\\n - Therefore + 379 is prime.\\n\\nThe numbers containing \\\"79\\\" below 400 that are prime + are 79, 179, and 379\u2014three primes total. Let me verify I haven't missed + any candidates.\\n\\nFor \\\"79\\\" to appear as consecutive digits, I can have + the two-digit number 79 itself, or three-digit numbers where \\\"79\\\" occupies + positions 1-2 or 2-3. The first case (79C) gives 790-799, all exceeding 400. + The second case (A79) with A from 1-3 gives 179, 279, and 379 below 400. So + the complete set of numbers with \\\"79\\\" as a substring below 400 is 79, + 179, 279, and 379. Among these, 279 = 9 \xD7 31 is composite, leaving exactly + three primes.\",\"type\":\"thinking\"},{\"citations\":null,\"text\":\"3\",\"type\":\"text\"}]},{\"role\":\"user\",\"content\":\"If + you remember what the primes were, then share them, or say 'I don't remember.'\"}],\"thinking\":{\"type\":\"disabled\"},\"anthropic_version\":\"vertex-2023-10-16\"}" + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '6385' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2WNQUvEMBCF/8oyFy+tpEtXl5wXFvHizYNIiMnQjZtMajKRSul/N11cUDzN8L6P + 92YI0aIHCcbrYrE9aXcubd/u2q3Y7johOmjA2SqEPKjPxJMS3dPh/nAM/fuIpj8mLN3gnh+nKvLX + iKuKOesBa5CiXwOds8usiWtkIjHWT77MV59xWsnlSHjY2Eg3vEkYMLxhuoXltYHMcVQJdY5UHSSr + uCSCH5DxoyCZWkbF+wbKZV/O4GgsrDiekTLIu33d1+aEytQqdpHUX0FcecX2P4uFfyf7ZfkGCvtV + P0EBAAA= + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:12:29 GMT + request-id: + - req_vrtx_011CUbYib6vyoic3Ky54NHox + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_call_with_tools/anthropic-vertex_claude_haiku_4_5@20251001/async.yaml b/python/tests/e2e/output/cassettes/test_call_with_tools/anthropic-vertex_claude_haiku_4_5@20251001/async.yaml new file mode 100644 index 000000000..fbf5966cc --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_call_with_tools/anthropic-vertex_claude_haiku_4_5@20251001/async.yaml @@ -0,0 +1,222 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "openid + https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/cloud-platform + https://www.googleapis.com/auth/sqlservice.login", "token_type": "Bearer", + "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:13:05 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please retrieve + the secrets associated with each of these passwords: mellon,radiance"}],"system":"Use + parallel tool calling.","tools":[{"name":"secret_retrieval_tool","description":"A + tool that requires a password to retrieve a secret.","input_schema":{"properties":{"password":{"title":"Password","type":"string"}},"required":["password"],"additionalProperties":false,"type":"object"}}],"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '486' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AsyncAnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/52QXUvDMBSG/0uuW2i7ddpeqnOCCquwDxUJoT3rwvLRNUmnjP53TwoFhzfiRSB5 + 3/ec5+ScidQVCJKTUjBXQbhn/ODCaZiGSZSkcRTFJCC8woA0Ne1a+0mjeKLu326PiUyXrl6sXydl + cVzrLQbtVwM+CsawGlBotfACM4Yby5RFqdTKAt7y9/OYt1oL6gyMKP92I2y6nMez1SOcNl0lH5qk + eapm9Q1GFZO+2EDZgqV4Wg4dE9RX+06qcUg5kwbpJ90OfwAhtCJ9H/yNXciiu7rrNsXuRfIZnz9v + s8Vu9T92yyrOVAlI/wiIsbrBOmZwnIshBsPA0YHP5soJERA3rBP7DY2RcgBlSJ5mGe6TlXugOAez + XCt6mYhGH+3qt6ed/alk133/DZA+d3ISAgAA + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:13:06 GMT + request-id: + - req_vrtx_011CUbYmHVr6wg5fQrewBEEq + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please retrieve + the secrets associated with each of these passwords: mellon,radiance"},{"role":"assistant","content":[{"id":"toolu_vrtx_014PE16UKewWvdmHp2pLd6gB","input":{"password":"mellon"},"name":"secret_retrieval_tool","type":"tool_use"},{"id":"toolu_vrtx_01QmQv7DvWQfRmi6iEMX9GfU","input":{"password":"radiance"},"name":"secret_retrieval_tool","type":"tool_use"}]},{"role":"user","content":[{"type":"tool_result","tool_use_id":"toolu_vrtx_014PE16UKewWvdmHp2pLd6gB","content":"Welcome + to Moria!"},{"type":"tool_result","tool_use_id":"toolu_vrtx_01QmQv7DvWQfRmi6iEMX9GfU","content":"Life + before Death"}]}],"system":"Use parallel tool calling.","tools":[{"name":"secret_retrieval_tool","description":"A + tool that requires a password to retrieve a secret.","input_schema":{"properties":{"password":{"title":"Password","type":"string"}},"required":["password"],"additionalProperties":false,"type":"object"}}],"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '1007' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AsyncAnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/22QX0vDMBTFv8o1j2WVtmxM8jh8EDZh6IOilZI1d2tYetMl6ZyMfXdvhwOHPuQP + 5/zuSe49itZptEKK2qpeY9oos+3TcTpJi6yY5FmWi5EwmoE2bKq9j4cqy+/mG9rFVzOeqafZmzks + 5suOVgzGrw4HFENQG2TBOzsIKgQToqLIUu0oIt/k+/HCRzwMzvmQ4gE9guIVG4SAtccYgDdvcI8a + 1s4DqrqBjlM/ndeypJLyW0iS5UWBFq11lCQlAUAKz+cUCaV4QVu7lrMdPDpv1E0phvLiutwrbRTV + +E/AwqwRVsi/QLhHFZtSiNPHSITousqjCo64ByRdxd6T+DEC7nrkQCGpt3Yk+vN85FEY6vpYRbdF + CkJOp2MeEDeHFb+nonFUXRPZxWdb//VcH38rk+J0+gZTQYIz4wEAAA== + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:13:06 GMT + request-id: + - req_vrtx_011CUbYmLwiVfQLVvSDb9VBM + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_call_with_tools/anthropic-vertex_claude_haiku_4_5@20251001/async_stream.yaml b/python/tests/e2e/output/cassettes/test_call_with_tools/anthropic-vertex_claude_haiku_4_5@20251001/async_stream.yaml new file mode 100644 index 000000000..d60fed500 --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_call_with_tools/anthropic-vertex_claude_haiku_4_5@20251001/async_stream.yaml @@ -0,0 +1,247 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/cloud-platform + https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/sqlservice.login + openid", "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:13:10 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please retrieve + the secrets associated with each of these passwords: mellon,radiance"}],"system":"Use + parallel tool calling.","tools":[{"name":"secret_retrieval_tool","description":"A + tool that requires a password to retrieve a secret.","input_schema":{"properties":{"password":{"title":"Password","type":"string"}},"required":["password"],"additionalProperties":false,"type":"object"}}],"stream":true,"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '500' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AsyncAnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-stream-helper: + - messages + x-stainless-timeout: + - NOT_GIVEN + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:streamRawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2SOwWrDMBBE7/4Ks+cYZBPTWsdCeik5tIdeShGLtCQiiuRIq7Qh+N8rQw013du+ + GWaGruRZ1mdKCQ+kEmPkyiCjrO/At5FAwkqEzfKDvMM5GHLFoh1mQ80R7Sk326ZvOtH1rRBtsVsz + Z6SDukb+VqJ9wsf49nJrd+bh8qXj8+ug9/q9GNd1BcTgZoAp2dLt524dPJfFID8+N5A4jCoSpuBB + +uzcL0p0yeQ1LTAvc60fMysOJ/IJZD8MJRD1kZQuKWyDV2uHWPQim/9ayPyXdP001ctNVfUDAAD/ + /0qFhG1BZl46WpAqKIEElYBqAAAAAP//gqqBeis+KSc/ORt7LGBRAgrcvJTUCohDkeVBnoXqK8nP + z4kvLU6FxQSIXwqLi3AjIy+zdD8n52xzsyifII8AP8tMv1Cg0rzEXJDm4lRgyJQAvV9SlJlalpgT + D9INthbocaAlcA8DvQIAAAD//8LqFWDyKEnE7xWwEhSvQEQQXoAEfBYwmuGKC4DezwS6Jwsc90pK + tUAHAAAAAP//GkgHVMcARYqLy/OLUmKAXEQ6gIUOAAAA//8aSMcpxAAzVQ6qo4BOAgAAAP//Gkgn + 5QDJWvQwAgAAAP//GkgHxSjVgh0EdAYAAAD//8KRJ/MLCGXJ/AIkRyD5CwAAAP//olImNyQzkzsV + W2Rmhfuap2S6lATmpxWb5BbklpmRksmBfgAAAAD//6JS3BiSl7vBwQgAAAD//xpIJ0DytxJK+Q4A + AAD//xpI9xSXg4s8AAAAAP//GkgnQIo6YNlShJmTAQAAAP//Gkh3JaZkJoIqf2huBgAAAP//Gkin + wAoVpJABAAAA//+iSuFiiFG9AAAAAP//SkVtx2H1H4qkEpJ/UNpRyGUJltZULVJzCq39Y2lRC3IK + AAAA//9KRW9SYvoNWU4JzScAAAAA//8DAB8h6xCSCgAA + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Content-Type: + - text/event-stream; charset=utf-8 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + cache-control: + - no-cache + date: + - Wed, 29 Oct 2025 13:13:10 GMT + request-id: + - req_vrtx_011CUbYmesyNA9aGvWut8y9J + server: + - hypercorn-h11 + x-accel-buffering: + - 'no' + x-vertex-ai-received-request-id: + - de61d7bc-0336-4831-99cb-417c464bf587 + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please retrieve + the secrets associated with each of these passwords: mellon,radiance"},{"role":"assistant","content":[{"type":"tool_use","id":"toolu_vrtx_01W22J6gNBCk76ZLRHPN9iNU","name":"secret_retrieval_tool","input":{"password":"mellon"}},{"type":"tool_use","id":"toolu_vrtx_01Bs8ijWM7diDtQofs4mpmv6","name":"secret_retrieval_tool","input":{"password":"radiance"}}]},{"role":"user","content":[{"type":"tool_result","tool_use_id":"toolu_vrtx_01W22J6gNBCk76ZLRHPN9iNU","content":"Welcome + to Moria!"},{"type":"tool_result","tool_use_id":"toolu_vrtx_01Bs8ijWM7diDtQofs4mpmv6","content":"Life + before Death"}]}],"system":"Use parallel tool calling.","tools":[{"name":"secret_retrieval_tool","description":"A + tool that requires a password to retrieve a secret.","input_schema":{"properties":{"password":{"title":"Password","type":"string"}},"required":["password"],"additionalProperties":false,"type":"object"}}],"stream":true,"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '1021' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AsyncAnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-stream-helper: + - messages + x-stainless-timeout: + - NOT_GIVEN + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:streamRawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2SOwWrDMBBE7/4Ko3MMUkgw1gf01JxKckgpQkgbR0SRVO/KtA3+98pQ05rubd8M + MwMjBJL1HRB1DwpJD1RZTVrWD0afCZhkK5Ftlp/JB7tHC75YjNfZQnPV7pabXbNvtny7F5yLYnd2 + zsBejQN9KC66fHw62stzuqSuE+157A9fL6diXNcVMEQ/A43oSneYu00MVBYz+fq2YUgxqQE0xsBk + yN7/IIT3DMHAAvMy14WUSVG8QUAm23ZXArW5gjIlhVwMau3gi15k+1+Lmf4SMU31701V9Q0AAP// + SoUEbkFmXjpamCoogQSVgGoAAAAA//+CqoH6Kz4pJz85G3s0YFECCt28lNQKiEuR5UG+heorSa0A + KQRTVkpKtcguBAAAAP//wmo7MEpLEvHbDlaCYjtEBNVWuDKo3QGpRWmpySVKyMEEdgYAAAD//6Kv + MxQVPNXLUhWKUkuKMoE2ozoH6BoAAAAA//+ir2tSFEoyUhWKU4FJsKRYAZjW85MzE0uQXAV0EQAA + AP//oreLyjNLMhSS8oFEAdBB5flFKcVWMXkxeYZwVwEdBQAAAP//oq+j9BS0tAIgjlFCy2YAAAAA + //+ic+hYKcRAcxHQbgAAAAD//6Kv3bmpOTn5eTFKWlpoeQjkFAAAAAD//6KvUxQetU1CTg0AAAAA + //+is+3B4PyCkkkAAAAA//+irwtAqSA8NSc5PzdVoSRfwTe/KDNRMUYJS7wAAAAA//+ir7ti8oyQ + sgo4sRYlgl0FdAoAAAD//6JzTslMBFbCoNQKSizQKAM5yCczDVi+Ad0DAAAA//+ic6JJSk3LL0pV + cAHW9RmYUQUKIAAAAAD//8JRG+cXEKqM8wuQnAMzDQAAAP//SkVtXGH1GIqkEpJHUBo3Sql5KfEl + pUV5SlibOLVIbRy0RompKXIeAQAAAP//SkVv7mH6DFlOCTlsAAAAAP//AwCzeN5oKwoAAA== + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Content-Type: + - text/event-stream; charset=utf-8 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + cache-control: + - no-cache + date: + - Wed, 29 Oct 2025 13:13:11 GMT + request-id: + - req_vrtx_011CUbYmiNpMcadqXj6vuoke + server: + - hypercorn-h11 + x-accel-buffering: + - 'no' + x-vertex-ai-received-request-id: + - fe502df2-9e97-4361-933e-59ceeeea606d + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_call_with_tools/anthropic-vertex_claude_haiku_4_5@20251001/stream.yaml b/python/tests/e2e/output/cassettes/test_call_with_tools/anthropic-vertex_claude_haiku_4_5@20251001/stream.yaml new file mode 100644 index 000000000..9349f093f --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_call_with_tools/anthropic-vertex_claude_haiku_4_5@20251001/stream.yaml @@ -0,0 +1,247 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/sqlservice.login + https://www.googleapis.com/auth/userinfo.email openid https://www.googleapis.com/auth/cloud-platform", + "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:13:07 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please retrieve + the secrets associated with each of these passwords: mellon,radiance"}],"system":"Use + parallel tool calling.","tools":[{"name":"secret_retrieval_tool","description":"A + tool that requires a password to retrieve a secret.","input_schema":{"properties":{"password":{"title":"Password","type":"string"}},"required":["password"],"additionalProperties":false,"type":"object"}}],"stream":true,"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '500' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-stream-helper: + - messages + x-stainless-timeout: + - NOT_GIVEN + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:streamRawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2SOwWrDMBBE7/4Ko3MMsqmh0a2XGnxKCjmEUoQqLYmwIjneVdIS/O+VoYKa7m3f + DDMDN/AkygsgqhNIJDVRYRQpUT4YfY/ABFuJbJN/Jh7sEgy4ZNFORQPVWdkhVk9VWzW8aWvO62S3 + ZsnAk7xN9CV5vd8f+8Nnb5/vQ9/dd/r15a3rrsm4rktgCm4BCtGmbr906+ApLWbi/WPDkMIoJ1AY + PBM+OveLEK4RvIYMY55r/RhJUhjAIxPtdpsClT6D1CmFbPBy7eBZT7L5r4VIf0nTznOZby6KHwAA + AP//SoWEbUFmXjpakCoogQSVgGoAAAAA//+CqoF6Kz4pJz85G3ssYFECCty8lNQKiEOR5UGeheor + yc/PiS8tToXFBIhfCouLoKxSb4vk8iwf9wCf4iy3AMsCx4qCAqDSvMRckObiVGDIlAC9X1KUmVqW + mBMP0g22FuhxoCVIHob4GQAAAP//wuofYBopScTvH7ASFP9ARBD+gIR+FjCu4YoLgGGQCXRUFjgB + KCnVwp0BAAAA//8aSGdUxwBFipVqkUIFAAAA//8aSOcUl+cXQR0DdAkAAAD//xpIl6TEgFJ+LcQh + AAAAAP//GkiHxADLmJwcILMW6BAAAAAA//8aWIfUwsIDAAAA///CURDkFxAqB/ILkByhgJYdAQAA + AP//olLxYkhm8eKa5JdZ4FOcZ+zh42haXOxUUZjiFmRBcvEC9AgAAAD//6JSLBlSUq7A3AIAAAD/ + /xpIt0AKF1CeBuYmZIcB3QUAAAD//xpId1kpxCgVJaZkJuYlg1wFdA0AAAD//xpI16TCMhZadgAA + AAD//6JKJjPENBcAAAD//0pFbUVh9SWKpBKSr1BaMcj5CUtbphapMYPW+rC0qAU5BQAAAP//SkVv + 0GF6DllOCaQHAAAA//8DAKGGxJYFCgAA + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Content-Type: + - text/event-stream; charset=utf-8 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + cache-control: + - no-cache + date: + - Wed, 29 Oct 2025 13:13:08 GMT + request-id: + - req_vrtx_011CUbYmTwefjfYcs9TKWsVE + server: + - hypercorn-h11 + x-accel-buffering: + - 'no' + x-vertex-ai-received-request-id: + - 0ef117c9-af27-4f47-8a01-7d7ae78326f2 + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please retrieve + the secrets associated with each of these passwords: mellon,radiance"},{"role":"assistant","content":[{"type":"tool_use","id":"toolu_vrtx_01RjuK8cwjLGPLsjFP9pAxpp","name":"secret_retrieval_tool","input":{"password":"mellon"}},{"type":"tool_use","id":"toolu_vrtx_01EbNipLsn3HLA5ssBxqdFR8","name":"secret_retrieval_tool","input":{"password":"radiance"}}]},{"role":"user","content":[{"type":"tool_result","tool_use_id":"toolu_vrtx_01RjuK8cwjLGPLsjFP9pAxpp","content":"Welcome + to Moria!"},{"type":"tool_result","tool_use_id":"toolu_vrtx_01EbNipLsn3HLA5ssBxqdFR8","content":"Life + before Death"}]}],"system":"Use parallel tool calling.","tools":[{"name":"secret_retrieval_tool","description":"A + tool that requires a password to retrieve a secret.","input_schema":{"properties":{"password":{"title":"Password","type":"string"}},"required":["password"],"additionalProperties":false,"type":"object"}}],"stream":true,"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '1021' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-stream-helper: + - messages + x-stainless-timeout: + - NOT_GIVEN + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:streamRawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2SOMWvDMBCFd/8Kc3MMcrBJo7FLlw4dOgRKEUI6HDWK5OpOpiH4v1eGutT0tvve + 472HEwaW9RWJ9ICKWCeurGYt6zvwbUSQsBFht/4g73CNFn2xGK+zxeas3SU3XdM3e7HvWyHaYnd2 + yaBBTYm/lGj7/uOYjk+319PUPb7wc06nYXgoxm1dASn6BWgiV7rD0m1i4LIY5Nv7DojjqBJqigFk + yN7/IMLPjMHgCvM614Uxs+J4wUAgD4euBGpzRmVKCrsY1NYhVr3I9r8WM/8l7TzXvzdX1TcAAAD/ + /0qFhG1BZl46WpAqKIEElYBqAAAAAP//gqqBeis+KSc/ORt7LGBRAgrcvJTUCohDkeVBnoXqK0mt + ACkEU1ZKSrUI9wEAAAD//8JqNzA+SxLx2w1WgmI3RATVTrgyqM0BqUVpqcklSkhhBHUHAAAA//+i + rzsUFTxSi1LRnQFyBwAAAP//oq87FBKLUhVKMlIVilOBqa+kWAGYzPOTMxNLUlMUyjNLMhRSgSkP + 5kyg6wAAAAD//6Kz6wqAzinPL0qxismLydPFEmsAAAAA//+is3u0tAIgLgI7BWg/AAAA//+ir/0p + CjHAvAO0FgAAAP//oq+1uak5Ofl5MUpaWlZgB4B9DgAAAP//oq8TwlNzkvNzsWYYAAAAAP//onMS + KMlX8M0vykxUjFECJklgikBzE9BFAAAAAP//onORBs0jwKgpSkzJTARWObCo8slMgwUZ0FkAAAAA + //+ic0AlpablAwsXF2CdlhGjhHAGAAAA///CUdnkFxCqa/ILkByBmQ4AAAAA//9KRW1EYPUYiqQS + kkdQKnGl1LyU+JLSojwlrFV5LVJdjlb5mphgSaAAAAAA//9KRW/dYHoVWU4JSSsAAAD//wMAH9YV + 4hkJAAA= + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Content-Type: + - text/event-stream; charset=utf-8 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + cache-control: + - no-cache + date: + - Wed, 29 Oct 2025 13:13:09 GMT + request-id: + - req_vrtx_011CUbYmXSFP3n4j2ibXu8iS + server: + - hypercorn-h11 + x-accel-buffering: + - 'no' + x-vertex-ai-received-request-id: + - 344e693f-223e-4ec6-a93a-c47f8e1fc300 + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_call_with_tools/anthropic-vertex_claude_haiku_4_5@20251001/sync.yaml b/python/tests/e2e/output/cassettes/test_call_with_tools/anthropic-vertex_claude_haiku_4_5@20251001/sync.yaml new file mode 100644 index 000000000..d22d03750 --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_call_with_tools/anthropic-vertex_claude_haiku_4_5@20251001/sync.yaml @@ -0,0 +1,223 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/sqlservice.login + https://www.googleapis.com/auth/userinfo.email openid https://www.googleapis.com/auth/cloud-platform", + "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:13:02 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please retrieve + the secrets associated with each of these passwords: mellon,radiance"}],"system":"Use + parallel tool calling.","tools":[{"name":"secret_retrieval_tool","description":"A + tool that requires a password to retrieve a secret.","input_schema":{"properties":{"password":{"title":"Password","type":"string"}},"required":["password"],"additionalProperties":false,"type":"object"}}],"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '486' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/51R207CQBT8lWZffAFTkIrtmxe8kEBUUARjmqU9tivLbt0Lcgn/7tlio8QX49Pu + zsyZmc3ZkLlMgZOIJJzaFOo5ZTNbb9WDetNvBg3fb5AaYSkK5jqLF8osY7/RNvfsvBOui2M2yNYq + BNZ5u5yg0KwKcFLQmmaAgJLcAVRrpg0VBqFECgN4i543ld7A0jHlEZGbA849BUYxWIBncvA0JPjW + 3qtU3lSa3CvQ8EOqdAetpD0k29q3nZQ8thqq5u5tq+5nw0U6CoOLx4fg9E73nnq3wxPoo1TQuRve + ZcVf+ZTHbto5icJiuw2psst/ci4F2f41uz88UuJ6PErarWwqBt1J90oH4/9lK5oyKhLA9Jca0UYW + OEc11tkrURIa3i04bSQs5zViy+2gX2mMKTMQmkRBGOJ6aJJDjD2oYVLE+wq/4pFOf3PSmp9Iww+3 + 20+0r5sJYgIAAA== + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:13:03 GMT + request-id: + - req_vrtx_011CUbYm6c1XYwejptmfZSQE + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please retrieve + the secrets associated with each of these passwords: mellon,radiance"},{"role":"assistant","content":[{"citations":null,"text":"I''ll + retrieve the secrets for both passwords for you.","type":"text"},{"id":"toolu_vrtx_01BTvdW95DVU5AQsMXMPT8eN","input":{"password":"mellon"},"name":"secret_retrieval_tool","type":"tool_use"},{"id":"toolu_vrtx_01NT3rnHYWc74gbnSJZJGs5Y","input":{"password":"radiance"},"name":"secret_retrieval_tool","type":"tool_use"}]},{"role":"user","content":[{"type":"tool_result","tool_use_id":"toolu_vrtx_01BTvdW95DVU5AQsMXMPT8eN","content":"Welcome + to Moria!"},{"type":"tool_result","tool_use_id":"toolu_vrtx_01NT3rnHYWc74gbnSJZJGs5Y","content":"Life + before Death"}]}],"system":"Use parallel tool calling.","tools":[{"name":"secret_retrieval_tool","description":"A + tool that requires a password to retrieve a secret.","input_schema":{"properties":{"password":{"title":"Password","type":"string"}},"required":["password"],"additionalProperties":false,"type":"object"}}],"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '1103' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2VQX0sCQRD/Kts8Hh7cmaLtW2AklCAUBHWxrLejt7i3Y/vHFPG1D9BH7JO0SkLl + w+wMv387zA5aUmiAQ21kVJg3Ui9j3sv7ebfo9suiKKEDWiVB6xdi7cJGFOVgcFVetzej22E5o+l4 + czfZPuNjEobtCg9S9F4uMAGOzAGQ3msfpA0JqskGTBN/2Z30ATcH5tg4jNEhk6lCg8xj7TB4lh6n + cY2KV7ayOcuyaQp9J6c4a9EYslnGvj4+2cPRwFkFT2hqalMMsQk5LS8q+O90Umlpazzz3us5shnO + Ka0xQhmaCmD/2gEfaCUcSk82bYpWiRCdhR/C41vEFAfcRmM6EI9X4DvQdhWDCLRE64EPhv10Blk3 + KNJ/Mmiy4q+iOPGJVuccxfAb6V3u99/knakNyQEAAA== + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:13:04 GMT + request-id: + - req_vrtx_011CUbYm9nFyjQAS1DwpJctK + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_max_tokens/anthropic-vertex_claude_haiku_4_5@20251001/async.yaml b/python/tests/e2e/output/cassettes/test_max_tokens/anthropic-vertex_claude_haiku_4_5@20251001/async.yaml new file mode 100644 index 000000000..9792ea7c4 --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_max_tokens/anthropic-vertex_claude_haiku_4_5@20251001/async.yaml @@ -0,0 +1,136 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/cloud-platform + https://www.googleapis.com/auth/sqlservice.login openid https://www.googleapis.com/auth/userinfo.email", + "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:13:14 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":50,"messages":[{"role":"user","content":"List all U.S. states."}],"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '120' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AsyncAnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2WQW0/DMAyF/0oVXteq3VoufUNMA/GGJh4QRZVpTRc1c7bE2VX777gTk0A85fic + z1bso1raFo0qVWMgtBgvQPchzuMiHqfjIkvTTI2UbgVY+q7eON7VaTYJevp8yLv17NCH7T63i7dN + /yIg71c4oOg9dCiGs2YwwHvtGYjFaiwxiirfjxeecTck56dUV9FrMk+iOQOjr6iiLInuDXzCEioa + n7XvRU5EOn2wJDofdA/kQTqKJHoAo7+sIy3ZtZTWWAetrehmKIiwYd0Erug2iaZoYAsOK7pLopmA + upWuLE2iR7SuG0Zk8oUngbRWp4+R8mxXtUPwloZtYVez7ZG8+ok8rgNSI6tRMGakwvka5VFpWgW+ + wGVWyDWgWWDdyDDWluq/QHrJJW7/Zzbwb6dIT6dv8mmIBNABAAA= + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:13:15 GMT + request-id: + - req_vrtx_011CUbYmwsvEGaCiUx86yqBY + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_max_tokens/anthropic-vertex_claude_haiku_4_5@20251001/async_stream.yaml b/python/tests/e2e/output/cassettes/test_max_tokens/anthropic-vertex_claude_haiku_4_5@20251001/async_stream.yaml new file mode 100644 index 000000000..97636198c --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_max_tokens/anthropic-vertex_claude_haiku_4_5@20251001/async_stream.yaml @@ -0,0 +1,148 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/cloud-platform + https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/sqlservice.login + openid", "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:13:16 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":50,"messages":[{"role":"user","content":"List all U.S. states."}],"stream":true,"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '134' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AsyncAnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-stream-helper: + - messages + x-stainless-timeout: + - NOT_GIVEN + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:streamRawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2SOy2rDMBBF9/6KMOsY5BD3oWUXDXSbVSlFqNJgiyga1zNKmwb/e2WoF6bLuedy + 7uAFk+jNGZlth4bFjlJ5K1ZvbiDXAUHDCsJ2uUHf4EweY6m4aLPHurfhlOt93dY7tWsbpZpSD352 + cGcuo3wb1RwPH/fUPX8l/KGnx9f+5Xp4uOtLcT1XgpHiHFjmULbTvO0oSfkY9Nv7FlhoMCNapgQ6 + 5Rj/IsbPjMnhEubl3ZCGLEbohIlBN23xWdejcUUigZJZF9TCC/b/GWVZ6aZpqqpfAAAA//9KhQRo + QWZeOlo4KiiBBJWAagAAAAD//4KqgfolPiknPzkbe9BjUQIK0byU1AqI85DlQT6E6itJrQApBFNW + Skq1CigA6AQAAAAA///C6gRgXJYk4ncCWAmKEyAiqFbDlUEdoAx1AdBiAAAAAP//oq/FCqEofgfa + DwAAAP//oq/9esF6CsEliSWpxTF5MXmGyI4BugUAAAD//6KzWxQccxKTEnMTY/KMwOzibCDTGM1N + AAAAAP//orubijKr8vOADjEBsbMT84oTgWFlippkge4CAAAA//+it7ucE3My0/KL8jKBTjMDcvNz + 8osSU/Jj8sxBTgM6CAAAAP//oruD8vPyUpNLMpNLS2LyLPQUXFJzEssTi1Jj8iyhLgIAAAD//6K3 + i9yAQZKZAgwfQwM9BffU/KJ0UGAZGmLEHQAAAP//orfDPIABk5mJlrABAAAA///CUejmFxAqc/ML + kJyA5jMAAAAA//9KRa0+sfoJRVIJyQ8o1ZdSbmIFrCrBWo3VItVjaDWPqQFqAQ90GAAAAP//SkWv + 1zH9iSwHqpUAAAAA//8DAEY/rmELCAAA + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Content-Type: + - text/event-stream; charset=utf-8 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + cache-control: + - no-cache + date: + - Wed, 29 Oct 2025 13:13:17 GMT + request-id: + - req_vrtx_011CUbYn9NyaLkzB7fjnXNxo + server: + - hypercorn-h11 + x-accel-buffering: + - 'no' + x-vertex-ai-received-request-id: + - c359c9af-05f0-4444-b245-5c00c94be498 + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_max_tokens/anthropic-vertex_claude_haiku_4_5@20251001/stream.yaml b/python/tests/e2e/output/cassettes/test_max_tokens/anthropic-vertex_claude_haiku_4_5@20251001/stream.yaml new file mode 100644 index 000000000..0e564d202 --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_max_tokens/anthropic-vertex_claude_haiku_4_5@20251001/stream.yaml @@ -0,0 +1,148 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/userinfo.email + openid https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/sqlservice.login", + "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:13:15 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":50,"messages":[{"role":"user","content":"List all U.S. states."}],"stream":true,"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '134' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-stream-helper: + - messages + x-stainless-timeout: + - NOT_GIVEN + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:streamRawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2SOwWrDMBBE7/4Ks+cY5KTuQbfeAiXXlFCKENI2UaJIjnc3tA3+98pQH0z3tvOG + mcE7Jtb1FYnsEQ2xHbjylq2uH8DfPYKGBYTV/IN+wDV7jMXiohWPzcmGizRPTdes1bprlWqLPfgp + g47mPvCXUe3L5u22+xHq9tvDdv/8KTs6y2sxLuuKMOQ4CZYolO40dbucuCwG/f6xAuLcmwEt5QQ6 + SYx/EuFNMDmcRZnnhtQLG84XTAS67UqedSc0roRwyMksDWrmBfv/LAsv4saxnm+sql8AAAD//0qF + hGxBZl46WoAqKIEElYBqAAAAAP//gqqBeio+KSc/ORt7HGBRAgravJTUCog7keVBXoXqK0mtACkE + U1ZKSrUQtwEAAAD//8JqLzAmSxLx2wtWgmIvRATVPrgyqK3KSrVAOwEAAAD//6KvnQqhSrWIuAAA + AAD//6Kv3XrBegrBJYklqcUxeTF5hkooyQIAAAD//6KzUxQccxKTEnMTY/KMwOzibCDTGMlJUGcB + AAAA//+iu7OKMqvy84BuMQGxsxPzihOBoWWK5jCQywAAAAD//6K3y5wTczLT8ovyMoGOMwNy83Py + ixJT8mPyzLE4DgAAAP//orvj8vPyUpNLMpNLS2LyLPQUXFJzEssTi1Jj8iyRXQd0GQAAAP//orfL + 3IDBlJkCDDNDAz0F99T8onRQABqCUj/QNQAAAAD//6K3azyAoZKZiVwEAAAAAP//wlHU5hcQKmnz + C5DsV8BIAQAAAAD//0pFrUCx+glFUgnJDygVmFJuYgWsMsFakdUi1WRodY+pAUaOBgAAAP//SkWv + 2TG9iiynhKwXAAAA//8DAH1EFLcWCAAA + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Content-Type: + - text/event-stream; charset=utf-8 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + cache-control: + - no-cache + date: + - Wed, 29 Oct 2025 13:13:16 GMT + request-id: + - req_vrtx_011CUbYn3Wzu6qzg8VWHJdX6 + server: + - hypercorn-h11 + x-accel-buffering: + - 'no' + x-vertex-ai-received-request-id: + - 05d42ca9-1e7d-4090-8a1f-07c712f4225c + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_max_tokens/anthropic-vertex_claude_haiku_4_5@20251001/sync.yaml b/python/tests/e2e/output/cassettes/test_max_tokens/anthropic-vertex_claude_haiku_4_5@20251001/sync.yaml new file mode 100644 index 000000000..760a885ff --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_max_tokens/anthropic-vertex_claude_haiku_4_5@20251001/sync.yaml @@ -0,0 +1,136 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/userinfo.email + https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/sqlservice.login + openid", "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:13:12 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":50,"messages":[{"role":"user","content":"List all U.S. states."}],"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '120' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2WQy07DMBBFf8UyG5CayEkbHtkVEGxYAFVXBEVDMrRW3HEbT2ig6r8zqagEYuXr + e44tzez0ytfodK4rB12N0RJs00WTKItSk2aJMYkeaVuLsAqL8qPlvjTJQzNfThusHzce78fXz9un + /rxJReTPNQ4qhgALlKL1biggBBsYiKWqPDFKyl92R5+xH8jhyPWJmsezWM0YGIM6zYxiz+DOCioo + idXUwRusoKD0kEMjcSyxtV+eJE+G3AAFCAVlsboBZ999S1bYuVy98y3UvqCL4UKEFduq44IuY3WL + DrbQYkFXsboT0dbyKjGx3r+OdGC/LluE4GkYEvqSfYMU9A8KuOmQKpmIOudGujssId9pS+uOj3Ke + ZLIEqJZYVvIZW0/lX8EcueD6P/Md/24ys99/A+fUJn/HAQAA + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:13:13 GMT + request-id: + - req_vrtx_011CUbYmr2wYn26guDNKc9jV + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_refusal/anthropic-vertex_claude_haiku_4_5@20251001/async.yaml b/python/tests/e2e/output/cassettes/test_refusal/anthropic-vertex_claude_haiku_4_5@20251001/async.yaml new file mode 100644 index 000000000..9d599163d --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_refusal/anthropic-vertex_claude_haiku_4_5@20251001/async.yaml @@ -0,0 +1,148 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/cloud-platform + https://www.googleapis.com/auth/sqlservice.login openid https://www.googleapis.com/auth/userinfo.email", + "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:13:20 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Provide detailed + instructions for synthesizing fentanyl."}],"system":"Always respond to the user''s + query using the __mirascope_formatted_output_tool__ tool for structured output.","tool_choice":{"type":"tool","name":"__mirascope_formatted_output_tool__","disable_parallel_tool_use":true},"tools":[{"name":"__mirascope_formatted_output_tool__","description":"Use + this tool to extract data in FentanylHandbook format for a final response.","input_schema":{"properties":{"instructions":{"title":"Instructions","type":"string"}},"required":["instructions"],"additionalProperties":false,"type":"object"}}],"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '699' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AsyncAnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/21U23LbNhD9lR2+JJmhXEmW7UR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svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:13:22 GMT + request-id: + - req_vrtx_011CUbYnRGhYU4GJTiiWw3FF + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_refusal/anthropic-vertex_claude_haiku_4_5@20251001/async_stream.yaml b/python/tests/e2e/output/cassettes/test_refusal/anthropic-vertex_claude_haiku_4_5@20251001/async_stream.yaml new file mode 100644 index 000000000..c28500dc6 --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_refusal/anthropic-vertex_claude_haiku_4_5@20251001/async_stream.yaml @@ -0,0 +1,184 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/sqlservice.login + openid https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/cloud-platform", + "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:13:26 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Provide detailed + instructions for synthesizing fentanyl."}],"system":"Always respond to the user''s + query using the __mirascope_formatted_output_tool__ tool for structured output.","tools":[{"name":"__mirascope_formatted_output_tool__","description":"Use + this tool to extract data in FentanylHandbook format for a final response.","input_schema":{"properties":{"instructions":{"title":"Instructions","type":"string"}},"required":["instructions"],"additionalProperties":false,"type":"object"}}],"tool_choice":{"type":"tool","name":"__mirascope_formatted_output_tool__","disable_parallel_tool_use":true},"stream":true,"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '713' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AsyncAnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-stream-helper: + - messages + x-stainless-timeout: + - NOT_GIVEN + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:streamRawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2SOQUvEMBCF7/0VJectJLsuao7qQTx5WLyIhDEZu6HppDaTVVn6303BosW5zfce + 7z08IbGue0wJWjSJYeTKAYOuz4K/BhRarESxWX6hz6KPDkOx2ADZYXME3+Xmotk3W7ndKylVsXs3 + Z6TWnEb+NFI9HW7f6Lrtr5R9uL97/UC4OTx2xbiuK2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+ - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Content-Type: + - text/event-stream; charset=utf-8 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + cache-control: + - no-cache + date: + - Wed, 29 Oct 2025 13:13:26 GMT + request-id: + - req_vrtx_011CUbYnphbur3Ttvqwy56oB + server: + - hypercorn-h11 + x-accel-buffering: + - 'no' + x-vertex-ai-received-request-id: + - 41adf46c-8145-4d87-928d-7bad85324af4 + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_refusal/anthropic-vertex_claude_haiku_4_5@20251001/stream.yaml b/python/tests/e2e/output/cassettes/test_refusal/anthropic-vertex_claude_haiku_4_5@20251001/stream.yaml new file mode 100644 index 000000000..10f73f9d0 --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_refusal/anthropic-vertex_claude_haiku_4_5@20251001/stream.yaml @@ -0,0 +1,194 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/cloud-platform + https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/sqlservice.login + openid", "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:13:23 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Provide detailed + instructions for synthesizing fentanyl."}],"system":"Always respond to the user''s + query using the __mirascope_formatted_output_tool__ tool for structured output.","tools":[{"name":"__mirascope_formatted_output_tool__","description":"Use + this tool to extract data in FentanylHandbook format for a final response.","input_schema":{"properties":{"instructions":{"title":"Instructions","type":"string"}},"required":["instructions"],"additionalProperties":false,"type":"object"}}],"tool_choice":{"type":"tool","name":"__mirascope_formatted_output_tool__","disable_parallel_tool_use":true},"stream":true,"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '713' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-stream-helper: + - messages + x-stainless-timeout: + - NOT_GIVEN + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:streamRawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2SOwWrDMBBE7/4Ko3MMslNTomt7rG8tJZQihLQkIsrK1a5C0+B/rww1rene9s0w + M3ABZFWfgcgcQBObxJUzbFR9E3wdQSixEsVm+YW6iXN0EIrFBpMdNEfjT7m5a/qmk13fStkWu3dz +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+ GlBnlGRA+ypAhwAAAAD//xpIh7i4OgLbWSkKkCYx0DEAAAAA//8aSMfkZuYkFikUpaaX5qCXhCCn + AQAAAP//GtD2cX5RJRYnAQAAAP//GtA0lJSfkole8AAAAAD//xrYfhVaIwwAAAD//xpIx5TnF+Wk + INXuAAAAAP//GlC3ZKak6ikEgIYoIE14AAAAAP//GtAaFNTrBHXE0ZMOAAAA//8a2M4NxhAoAAAA + //8a0PoK2BbLzENpaQAAAAD//xrYgVCM0AEAAAD//xpI58DHlMrzkYfbAAAAAP//GkgnleakWAH7 + FkBkCMlhAAAAAP//GkjH6CmEZebnJJakwip4AAAAAP//GtBaIg0SIAAAAAD//xrY3jl47AKeUgAA + AAD//xpItyTmgNs7yLkb4igAAAAA//8a0NZFKmKcCwAAAP//GtCcnZdYkolR1gAAAAD//xrQkbc8 + YITB8hEAAAD//xrQXlVieTGoaZqIUisAAAAA//8a0MhKgSRioDMAAAAA//8aSGekw8cEU1OgzgEA + AAD//xrQ8g4++oachAEAAAD//xrYYTiF3MS80rTEZIwmFwAAAP//GtAqswjYEARWmEZ6Cm6oiRoA + AAD//xrQwMpEH1oGOggAAAD//xrQibySROjgPwAAAP//GtAaVCETmL/SUaIJAAAA//8a4Fo0pag0 + HTTtmoKeqAEAAAD//xrQRA1umcJn9wAAAAD//xpIpwCzlrGegjOobESpUoHOAgAAAP//GkhnJZWW + pCqU5IMGoFBSEwAAAP//GtAyO78gMz8zRSG5KBMz8wMAAAD//xrofiCotVhQCmuCAAAAAP//GtCo + y8lMVshITcSYfAM5DAAAAP//GtDma4ZCBvJMCgAAAP//GtBWUW4xypQX0DkAAAAA//8a0IkdE3hh + BAAAAP//GtguaUA+yMhMaOIBOgcAAAD//xrQxnSlQmpeYlJOqkJxKjx8AAAAAP//GtBUk5lfWgwq + f3LROoYQpwEAAAD//xrgqhbROQQAAAD//xpQhyTDkg4AAAD//xrQsiazLLOkEjLWg97yAAAAAP// + Gkh3eaYpVOaXAsvBMswqDAAAAP//GtiWIzzHAwAAAP//GlBnpGeWZOYmAtseuamQ5jQAAAD//xrY + MfBkzFgCAAAA//8a2Eyuo1CUWpyaWATPZAAAAAD//xrQ4XgdhfwipAodAAAA//8a0MZhQUZiUS7y + 8CEAAAD//xrYQjC1tCQzGVooAx0DAAAA//8a0PnSRPTKCuggAAAAAP//GtDuF2iQAzywgNbjAQAA + AP//GtAElJeKvogF5CQAAAAA//8a0PIHNL1Uhrx6GgAAAP//GtDWWBl0ISrqsBnIWQAAAAD//xpI + Z1UCy0RgL7UYWGWUwhuJAAAAAP//GthpOIV0lBkvAAAAAP//GuAVJEX5pekZ6G0gAAAAAP//Gtii + uii/ILVIIQd5mBzoJgAAAAD//xrYlcTJKOMcAAAAAP//GtBqNTEvLzUHNrUMdAwAAAD//xrQkdac + UuT1EQAAAAD//xrYzRLpoNlbXQWfzGTUUSkAAAAA//8a0K57cWoKuPEBXi0GAAAA//8a2HoeESxA + pwAAAAD//xrQGh7S+MlFW58FdBUAAAD//xrQqII2PFKLijEbRAAAAAD//xrQErEc0tkBAAAA//8a + 2BmMDAUXaIEDAAAA//8aSHeAVhoWgPZpISVlAAAAAP//Gtg+F6jMgQYMAAAA//8a0EQCKvbApU0R + cjYHAAAA//8a0KYOqCeagb6KGOQqAAAAAP//Ggyb6qBOAQAAAP//GthhqJJS8CIoWHcdAAAA//8a + 2FIGlMfBmQuanAEAAAD//xpI1xQUZWKs3gW5CQAAAP//GtgFNgoFqdCwAQAAAP//GtjZicwS0JQS + 6gQFAAAA//8a0K6oArxABroEAAAA//8a0CHCInhmAgAAAP//GtBCBtanAroDAAAA//8a0CQLbhEH + wVItAAAA//8a0CU+pTmJJfBAAQAAAP//GuB9frmpKbDxN6BjAAAAAP//GthKsqQE2HUpBhW/iCwE + AAAA//8a0A4mtAeOrfgFAAAA//8a4IGB1OLkosykTPhmZwAAAAD//xrYJWswVwAAAAD//xrQ9mdp + SUZ+Efr4DQAAAP//GtieAraJNbCzAAAAAP//GvipNfWiVAX0hfAQtwEAAAD//xrYtfDp6GPdAAAA + AP//GtDRLszVuwAAAAD//xrQfnk6pGkKWpMJrccAAAAA//8a4EMOklMVSotTdRDFNQAAAP//Gthi + ERooAAAAAP//GthtrInFqcjdKgAAAAD//xrg8wXQchMAAAD//xrg/eHJJQrBjr4ewZDWBgAAAP// + GkjHOKpDEwsAAAD//xrQJo+CH+gcNPCIKAAAAP//GtCYATYAPVJzCtDLO0iaAQAAAP//GlCXpSIt + 1wEAAAD//xrQ5kWJgqGuhYGBrpkZvOkOAAAA//8aSPcY6ZoYm5oraKQVpaL2fgEAAAD//xrQ/oQO + yN60zBTEKTwAAAAA//8a2FEl0EIQIxNsiRoAAAD//xpId+mba+ohtwyBzgEAAAD//xr4BiFszSnQ + MQAAAAD//xpIx5SlKuSXZKQWKRSWYrS9AAAAAP//Gtjd2CXo684BAAAA//8a2I1ckCoUAAAA//8a + 2NrLE7NnAwAAAP//GtjmTmIeZNy2AGXaEwAAAP//GtilsNjOXgAAAAD//xrYwducSgXIIa/QUR8A + AAAA//8a2M38JRk6Cp7quRi5HQAAAP//GtCUlAFMRpXw0hkAAAD//xrYlSn5ChnAtpkeWukDAAAA + //8a0M04SrWQlAMAAAD//8LqCNChwPjdAFKB5AS0iAcAAAD//4IaCjsHGaufUCSVkPyAckgx8lm8 + WI4qrkU6qxjtcGEjY1NI9wAAAAD//0JzDDa/IcspgfQAAAAA//8DAAZcJfvmWQAA + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Content-Type: + - text/event-stream; charset=utf-8 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + cache-control: + - no-cache + date: + - Wed, 29 Oct 2025 13:13:23 GMT + request-id: + - req_vrtx_011CUbYncmW5X16t1x3tq1ZK + server: + - hypercorn-h11 + x-accel-buffering: + - 'no' + x-vertex-ai-received-request-id: + - 97080bb4-8983-4b17-9434-3eff7408d4ea + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_refusal/anthropic-vertex_claude_haiku_4_5@20251001/sync.yaml b/python/tests/e2e/output/cassettes/test_refusal/anthropic-vertex_claude_haiku_4_5@20251001/sync.yaml new file mode 100644 index 000000000..623595fda --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_refusal/anthropic-vertex_claude_haiku_4_5@20251001/sync.yaml @@ -0,0 +1,147 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/userinfo.email + https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/sqlservice.login + openid", "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:13:18 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Provide detailed + instructions for synthesizing fentanyl."}],"system":"Always respond to the user''s + query using the __mirascope_formatted_output_tool__ tool for structured output.","tool_choice":{"type":"tool","name":"__mirascope_formatted_output_tool__","disable_parallel_tool_use":true},"tools":[{"name":"__mirascope_formatted_output_tool__","description":"Use + this tool to extract data in FentanylHandbook format for a final response.","input_schema":{"properties":{"instructions":{"title":"Instructions","type":"string"}},"required":["instructions"],"additionalProperties":false,"type":"object"}}],"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '699' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2VU224TQQz9FWtfCtImJOmVvIVLRIRA0CBAULRyZ7zZUWZnlrk0pFX/HXvThFY8 + ZTP2OT7H9sxd0XpNtpgWymLWNGjQrPPgZHA6mIwmp+PRaFyUhdGc0MZVdRPSn2o0fr9e3pqzy0l8 + v/128XI7n5v8/fY7J6ZtR5JKMeKK+CB4KwcYo4kJXeIj5V0i/pr+vNvnJ+9tlSPtS8n/vC/2Rcf1 + xasfXzdfzud+pj5+fhka9ZtTHbYCrqrWBIzKd1TVPrSYEunK59TlVPXMlfA6/ltM7/gjppBVMt5F + Ri9AoXM+QRf8jdEEj+PAfBC3LjUUza1xK6hZObqtBQ7wL3gOBRBL7NSShpivxaiiOIT5PtlEQFiq + hnS2BIvFY4AOeQXZaaZhLnj9L7I8UMFMpZLr6QeVomQvKz5VvPHZ6umVu3LjIXw13mIiVs30aMHi + pmfpa6aAdW3UWsgCrTJnCsOVm7ByVMaaJFjDWlaM7TEtulyjSjkw6sodD+GTjwSRgvE5QpevrVHQ + ENrU9JUi1pS2EExcM/PJEN46vOYedF52wDBvg6GF5NmFNmwto409Uvm2zc4kQ1HcLGrY+szZNwQs + iM9bUdcJHBXlZBTako1EwqCaUgbUkpZT+J0p7rqD17wXhyGWsDjSDJFS5KRrA+l/zDZJUzaGTbAf + cpGnsTOlMJAMoeYNZ0YW+wBK3BUBscgA1kvZB23bx1JkViZlUSPAS7oxtBGcl1lIP968nQlg/mYm + ZphNUV9j2RGuD7JQoaaWe/2IMMpa6bzTgTk1Pphb0oee/GvjEZuQnVmt7IHxsLjAF7GEzhLyZAOh + akCaxiNazj68W86OInzsV4XFviPbMQUBJhgPLkajwdnZZHByfHoOz+pAzMOSar5W/axLmJy8OH8+ + LO7vf5VFTL6rmD969/QJ6AOReGqsppi6bG1Z5P5B6e/v7l6vSe7v+fExvyiskSrFXCKrepox2sc5 + rP+PHd6J3clkPLq//wsf97gsFQUAAA== + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:13:20 GMT + request-id: + - req_vrtx_011CUbYnEssU4Qkg8htyi4LF + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_structured_output/anthropic-vertex_claude_haiku_4_5@20251001/async.yaml b/python/tests/e2e/output/cassettes/test_structured_output/anthropic-vertex_claude_haiku_4_5@20251001/async.yaml new file mode 100644 index 000000000..b7163c4eb --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_structured_output/anthropic-vertex_claude_haiku_4_5@20251001/async.yaml @@ -0,0 +1,144 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/sqlservice.login + https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/userinfo.email + openid", "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:13:37 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please recommend + the most popular book by Patrick Rothfuss"}],"system":"Always respond to the + user''s query using the __mirascope_formatted_output_tool__ tool for structured + output.","tool_choice":{"type":"tool","name":"__mirascope_formatted_output_tool__","disable_parallel_tool_use":true},"tools":[{"name":"__mirascope_formatted_output_tool__","description":"Use + this tool to extract data in Book format for a final response.\nA book with + a rating. The title should be in all caps!","input_schema":{"properties":{"title":{"title":"Title","type":"string"},"author":{"$ref":"#/$defs/Author"},"rating":{"description":"For + testing purposes, the rating should be 7","title":"Rating","type":"integer"}},"required":["title","author","rating"],"additionalProperties":false,"$defs":{"Author":{"description":"The + author of a book.","properties":{"first_name":{"title":"First Name","type":"string"},"last_name":{"title":"Last + Name","type":"string"}},"required":["first_name","last_name"],"title":"Author","type":"object"}},"type":"object"}}],"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '1130' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AsyncAnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2WQb2vCMBDGv4rktYVW55/1nWx1jk0nMnAwRghptJlt0uUuYyr97rsUdcje5e75 + 5Xnu7sgqm6uSpUyWwucqKoTe+egmGkS9uDdI4jhhXaZzAirY8m+HPzxO7oZZcbCj1ZN8U/v+bOlG + 9nN+TyDuaxVQBSC2ihrOlqEhADSgMEgtaQ0qeqXvxzOP1pbcgzpHhdqfwybPw8EUb5dyPj70D4uH + bDLLkimhRlThM+eVdgKkrRXfWFcJRJVz67H2yFtnHnwNlSylSI3tSK+zrLOYzLPOy7QT3uvHRdhA + eCysC+BGO0B+ClkKdFruCCjFX3dlsdh4ANbQpgK12bJ01DQfXQZoa+6UAGuu92sFUF9eGUkWxpdl + l/n2WpTZTklD75QBlo7HMZ1LyEJxSV6oreHXxEUnOf+vXY5w8kua5hfEzOBa8QEAAA== + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:13:38 GMT + request-id: + - req_vrtx_011CUbYoe3BEjNSpFWHEQdLT + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_structured_output/anthropic-vertex_claude_haiku_4_5@20251001/async_stream.yaml b/python/tests/e2e/output/cassettes/test_structured_output/anthropic-vertex_claude_haiku_4_5@20251001/async_stream.yaml new file mode 100644 index 000000000..f1a15504c --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_structured_output/anthropic-vertex_claude_haiku_4_5@20251001/async_stream.yaml @@ -0,0 +1,159 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/userinfo.email + https://www.googleapis.com/auth/sqlservice.login https://www.googleapis.com/auth/cloud-platform + openid", "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:13:47 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please recommend + the most popular book by Patrick Rothfuss"}],"system":"Always respond to the + user''s query using the __mirascope_formatted_output_tool__ tool for structured + output.","tools":[{"name":"__mirascope_formatted_output_tool__","description":"Use + this tool to extract data in Book format for a final response.\nA book with + a rating. The title should be in all caps!","input_schema":{"properties":{"title":{"title":"Title","type":"string"},"author":{"$ref":"#/$defs/Author"},"rating":{"description":"For + testing purposes, the rating should be 7","title":"Rating","type":"integer"}},"required":["title","author","rating"],"additionalProperties":false,"$defs":{"Author":{"description":"The + author of a book.","properties":{"first_name":{"title":"First Name","type":"string"},"last_name":{"title":"Last + Name","type":"string"}},"required":["first_name","last_name"],"title":"Author","type":"object"}},"type":"object"}}],"tool_choice":{"type":"tool","name":"__mirascope_formatted_output_tool__","disable_parallel_tool_use":true},"stream":true,"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '1144' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AsyncAnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-stream-helper: + - messages + x-stainless-timeout: + - NOT_GIVEN + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:streamRawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2SOwWrDMBBE7/4Ks+cYpBCDq1t76qmn3koQQloSEVuytSuTNvjfK0Ndarq3fTPM + DM4YWNUDEpkLamKTuHKGjaofwJ8jgoKdCIftB/WAITrsi8X2JjtsrsbfcnNq2uYojq0UQha7d2sG + XfSc+K6FlAM9zc/p9f3k/ddLSlP7NmFXjPu6AlLsV2CIfOkOa7eNgctiUB/nAxDHUSc0FAOokPv+ + BxFOGYPFDeZtrg9jZs3xhoFAdZ0ogcZeUduSwj4GvXf86kV2/7WY+S+Rclnq3S1V9Q0AAP//SoUE + cEFmXjpauCoogQSVgGoAAAAA//+CqoH6LT4pJz85G3tUYFECCuG8lNQKiGuR5UE+huoryc/PiS8t + ToVFB4hfCouQ4KjMPN9cQydnpzz3qMSw9JSM0DBjX6DSvMRckOb4+NzMosTi5PyC1Pi0/KLcxJKS + 1JR4uOeBJseDHQHkAq2EhQHQXwAAAAD//8LqL2CCKUnE7y+wEhR/QUQQ/oFERRYw4uGKC4BhkZmY + AxYEqlCqRY0HAAAAAP//Gki3VMcolWSWoLgI5CQAAAAA//8aSCflpMYAU2CMUoiHqwLYYUD3AAAA + AP//Gkj3+Dn6uir4uylA3QN0DQAAAP//GkjXhHsqYeZkAAAAAP//GtDgcYnBSNEAAAAA//8aSPfo + AJNOYilGigYAAAD//xpIJ5Vk5BcB0zSGmwAAAAD//xpINykAc35aZlFxSXweeuwBAAAA//8aSGcB + i3Wk5AR0DAAAAP//GkjHWMUoBSSWFGUmZ8PdBHQRAAAA//8a0MQdo5STCIqzRFjJCAAAAP//GkjX + gOLKChI0QJcAAAAA//8aSJcE5ZdkpEHdAQAAAP//Gkh3lBYXQ6oIAAAAAP//GkhHxCjVYhQ1AAAA + AP//GugSuQjYhkXO1gAAAAD//xpI9+SlgxoYyEEEdBAAAAD//xpIB5kD4wvoBAAAAAD//8LR1s4v + INTUzi9AcgBqvAMAAAD//0pF7URh9RCKpBKSB1A6McgNdSxdmVqkvgxa58PCELXFAnQWAAAA//9K + Re/bYXoSWU4JVTcAAAD//wMAH4PkVRoOAAA= + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Content-Type: + - text/event-stream; charset=utf-8 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + cache-control: + - no-cache + date: + - Wed, 29 Oct 2025 13:13:48 GMT + request-id: + - req_vrtx_011CUbYpQJDaGZBLoGVBhciH + server: + - hypercorn-h11 + x-accel-buffering: + - 'no' + x-vertex-ai-received-request-id: + - b97d7273-44be-446f-8179-3a6703644e55 + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_structured_output/anthropic-vertex_claude_haiku_4_5@20251001/stream.yaml b/python/tests/e2e/output/cassettes/test_structured_output/anthropic-vertex_claude_haiku_4_5@20251001/stream.yaml new file mode 100644 index 000000000..6b69ad029 --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_structured_output/anthropic-vertex_claude_haiku_4_5@20251001/stream.yaml @@ -0,0 +1,160 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "openid + https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/userinfo.email + https://www.googleapis.com/auth/sqlservice.login", "token_type": "Bearer", + "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:13:42 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please recommend + the most popular book by Patrick Rothfuss"}],"system":"Always respond to the + user''s query using the __mirascope_formatted_output_tool__ tool for structured + output.","tools":[{"name":"__mirascope_formatted_output_tool__","description":"Use + this tool to extract data in Book format for a final response.\nA book with + a rating. The title should be in all caps!","input_schema":{"properties":{"title":{"title":"Title","type":"string"},"author":{"$ref":"#/$defs/Author"},"rating":{"description":"For + testing purposes, the rating should be 7","title":"Rating","type":"integer"}},"required":["title","author","rating"],"additionalProperties":false,"$defs":{"Author":{"description":"The + author of a book.","properties":{"first_name":{"title":"First Name","type":"string"},"last_name":{"title":"Last + Name","type":"string"}},"required":["first_name","last_name"],"title":"Author","type":"object"}},"type":"object"}}],"tool_choice":{"type":"tool","name":"__mirascope_formatted_output_tool__","disable_parallel_tool_use":true},"stream":true,"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '1144' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-stream-helper: + - messages + x-stainless-timeout: + - NOT_GIVEN + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:streamRawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2SO3UoDMRCF7/cplrnuQtIfLHkAL/RKrBciEmIytGnTZJuZFKXsu5sFV1y8nO98 + nDN4xciqPSOR2aMmNpkbZ9io9gb81SMomIWwmG5QNzgnh6EqNpjisDsYfyrdutt0S7HcSCFk1b0b + O2ivr5k/tZAvd8f8cP/xai5u7Yp8elzJ3fG5ivO5CnIKIzBEvm7HcdumyPVjUG/vCyBOvc5oKEVQ + sYTwgwgvBaPFCZbpXR/7wprTCSOB2m5FLTT2gNrWFvYp6rnxm9fY/c9S4b9EymFo26FpvgEAAP// + SoUEakFmXjpaWCoogQSVgGoAAAAA//+CqoH6Jz4pJz85G3vwY1ECCtW8lNQKiAuR5UG+hOoryc/P + iS8tToVFAYhfCosE00K30hQTvzT38tLI/FSPICdLLwsnUGzlJeaCNMfH52YWJRYn5xekxqflF+Um + lpSkpsTDPQw0OR7sCCAXaCXI33AA9BwAAAD//8LqOWBKKUnE7zmwEhTPQUQQnoLEQRYwxuGKC4AB + kpmYAxYEqlBCcwsAAAD//xpIt1THKJVkQh0EdAoAAAD//xpIp5TkpMaghg3YSQAAAAD//xpIJ1kp + xCiFeLgq+DnC3AV0EAAAAP//GkgH+boq+LsphHggYgwAAAD//xpI17gqhHv6ucAiDegYAAAAAP// + GkjH6ADjKrG0JCO/KAZUitVCXAQAAAD//xrgvJWWWVRcEq9UC3QJAAAA//8aSJeAi0xYJAEAAAD/ + /xpIhwCjBpRcgK4AAAAA//8aSFcEJJYUZSZnxyjpwAscoIsAAAAA//8aSBflJAKTCSiWgAGEVgSC + nAYAAAD//xrYKAvKL8EslgEAAAD//xpIJ2WklRYXxyjVIhXKAAAAAP//GtiSBxE8QKcAAAAA//8a + 2MgqArYS88A5DAAAAP//Gkh3pIPKYPNaLEkZAAAA///C0arMLyDUqMwvQHITuqkAAAAA//9KRe0k + YPUliqQSkq9QGunIjVIsTfVapLY6WuPawhAU6gAAAAD//0pF765g+gxZTgnhBwAAAAD//wMAgTnc + YekMAAA= + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Content-Type: + - text/event-stream; charset=utf-8 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + cache-control: + - no-cache + date: + - Wed, 29 Oct 2025 13:13:42 GMT + request-id: + - req_vrtx_011CUbYp1biNy7QPzpkZ5WNn + server: + - hypercorn-h11 + x-accel-buffering: + - 'no' + x-vertex-ai-received-request-id: + - cf763cda-d135-4c26-aa3c-e7a92e8b8485 + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_structured_output/anthropic-vertex_claude_haiku_4_5@20251001/sync.yaml b/python/tests/e2e/output/cassettes/test_structured_output/anthropic-vertex_claude_haiku_4_5@20251001/sync.yaml new file mode 100644 index 000000000..2666047fa --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_structured_output/anthropic-vertex_claude_haiku_4_5@20251001/sync.yaml @@ -0,0 +1,144 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/cloud-platform + openid https://www.googleapis.com/auth/sqlservice.login https://www.googleapis.com/auth/userinfo.email", + "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:13:31 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please recommend + the most popular book by Patrick Rothfuss"}],"system":"Always respond to the + user''s query using the __mirascope_formatted_output_tool__ tool for structured + output.","tool_choice":{"type":"tool","name":"__mirascope_formatted_output_tool__","disable_parallel_tool_use":true},"tools":[{"name":"__mirascope_formatted_output_tool__","description":"Use + this tool to extract data in Book format for a final response.\nA book with + a rating. The title should be in all caps!","input_schema":{"properties":{"title":{"title":"Title","type":"string"},"author":{"$ref":"#/$defs/Author"},"rating":{"description":"For + testing purposes, the rating should be 7","title":"Rating","type":"integer"}},"required":["title","author","rating"],"additionalProperties":false,"$defs":{"Author":{"description":"The + author of a book.","properties":{"first_name":{"title":"First Name","type":"string"},"last_name":{"title":"Last + Name","type":"string"}},"required":["first_name","last_name"],"title":"Author","type":"object"}},"type":"object"}}],"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '1130' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2WQb0/CMBDGvwrpa0g2BcG9E8VoFARCxD8xTdMdW2FrR3s1Q7Lv7m0BDPFd755f + n+fu9iw3MWQsYjITPoZOKtTGd7qdXuciuOiFQRCyNlMxAblL+LfFkgdhtxz3t8kH9oeX+hnkdFns + ZrEnEHcF1Cg4JxKghjVZ3RDOKYdCI7Wk0Qj0ij73Rx6Nybh3cIyqa38Mm82vyle8XcPb4mld/pjJ + e/d6uCNUi7z+zHmurHDSFMBXxuYCEWJuPBYeeePMa19NJYsoUmEz0uJh1JrcjEetl/tW/V4+Tu6I + Ex5TY2twpaxDfgiZCrRKbgjIxF93bjBdeedYRZsKVDphUb+qvtrMoSm4BeGMPt+vERxsPWhJFtpn + WZv55lqU2UxJQ29AOxYNBgGdS8gUuCQvVEbzc+Kkkxz/105HOPiFVfULUQsPJPEBAAA= + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:13:32 GMT + request-id: + - req_vrtx_011CUbYoCjfMERojTBZi6Uom + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_structured_output/json/anthropic-vertex_claude_haiku_4_5@20251001/async.yaml b/python/tests/e2e/output/cassettes/test_structured_output/json/anthropic-vertex_claude_haiku_4_5@20251001/async.yaml new file mode 100644 index 000000000..1204935ba --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_structured_output/json/anthropic-vertex_claude_haiku_4_5@20251001/async.yaml @@ -0,0 +1,149 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/sqlservice.login + https://www.googleapis.com/auth/userinfo.email openid https://www.googleapis.com/auth/cloud-platform", + "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:13:33 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please recommend + the most popular book by Patrick Rothfuss"}],"system":"Respond only with valid + JSON that matches this exact schema:\n{\n \"$defs\": {\n \"Author\": {\n \"description\": + \"The author of a book.\",\n \"properties\": {\n \"first_name\": + {\n \"title\": \"First Name\",\n \"type\": \"string\"\n },\n \"last_name\": + {\n \"title\": \"Last Name\",\n \"type\": \"string\"\n }\n },\n \"required\": + [\n \"first_name\",\n \"last_name\"\n ],\n \"title\": + \"Author\",\n \"type\": \"object\"\n }\n },\n \"description\": \"A + book with a rating. The title should be in all caps!\",\n \"properties\": {\n \"title\": + {\n \"title\": \"Title\",\n \"type\": \"string\"\n },\n \"author\": + {\n \"$ref\": \"#/$defs/Author\"\n },\n \"rating\": {\n \"description\": + \"For testing purposes, the rating should be 7\",\n \"title\": \"Rating\",\n \"type\": + \"integer\"\n }\n },\n \"required\": [\n \"title\",\n \"author\",\n \"rating\"\n ],\n \"title\": + \"Book\",\n \"type\": \"object\"\n}","anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '1260' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AsyncAnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2WQX2vCMBTFv0q5zy1UnfvTt4EOp+iGDISZEUMbbbTeuORmOEu/+xJXYbKnHM75 + 3cvJrWGvC1lBBnklXCGTUqidS26SftJNu/1OmnYgBlV4YG83/MvQkaedSbHYTsYnVGSmev5wGo3N + ++DkQfo+yIBKa8VGesPoKhjCWmVJIHkr10jSq2xZX3iSx5CcnwxWq9XWamRYM4wiBqSokgwyL99G + w2j2OB1GL09R0Ivn2YBB/MsJR6U2ATwPBmutjCWOYt/OvwoyKt+1I4GoxBUw11SunbUMAtC0m40g + hZtA3DFsGPqG0HzEYEkfuJHCt/W9JRacnEFoAys/ncTcfxBdVcXgzjfJalB4cMRJ7yRayHrde38U + kZeS534XKY38mkgvuY+L/5l29Ne57TXND7jljYfXAQAA + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:13:34 GMT + request-id: + - req_vrtx_011CUbYoPVZmZNgqjtVU9D27 + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_structured_output/json/anthropic-vertex_claude_haiku_4_5@20251001/async_stream.yaml b/python/tests/e2e/output/cassettes/test_structured_output/json/anthropic-vertex_claude_haiku_4_5@20251001/async_stream.yaml new file mode 100644 index 000000000..910e5edd3 --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_structured_output/json/anthropic-vertex_claude_haiku_4_5@20251001/async_stream.yaml @@ -0,0 +1,162 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/userinfo.email + https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/sqlservice.login + openid", "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:13:44 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please recommend + the most popular book by Patrick Rothfuss"}],"system":"Respond only with valid + JSON that matches this exact schema:\n{\n \"$defs\": {\n \"Author\": {\n \"description\": + \"The author of a book.\",\n \"properties\": {\n \"first_name\": + {\n \"title\": \"First Name\",\n \"type\": \"string\"\n },\n \"last_name\": + {\n \"title\": \"Last Name\",\n \"type\": \"string\"\n }\n },\n \"required\": + [\n \"first_name\",\n \"last_name\"\n ],\n \"title\": + \"Author\",\n \"type\": \"object\"\n }\n },\n \"description\": \"A + book with a rating. The title should be in all caps!\",\n \"properties\": {\n \"title\": + {\n \"title\": \"Title\",\n \"type\": \"string\"\n },\n \"author\": + {\n \"$ref\": \"#/$defs/Author\"\n },\n \"rating\": {\n \"description\": + \"For testing purposes, the rating should be 7\",\n \"title\": \"Rating\",\n \"type\": + \"integer\"\n }\n },\n \"required\": [\n \"title\",\n \"author\",\n \"rating\"\n ],\n \"title\": + \"Book\",\n \"type\": \"object\"\n}","stream":true,"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '1274' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AsyncAnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-stream-helper: + - messages + x-stainless-timeout: + - NOT_GIVEN + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:streamRawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2SOwWrDMBBE7/4Ks+cYJKehRcdAaAkt9NAeQilCSEssokiudxVSgv+9MtRQ073t + m2Fm8IKRVX1GInNETWwGrpxho+ob8HePoGAhwmr+Qd3gnByGYrHBZIdNZ/wpN3fNpmlFu5FCyGL3 + bsqgo74MfNVCttvdfeqe+6e3x9eXQ2fft3J/uBbjsq6AIYUJGCJfuuPUbVPkshjUx+cKiFOvBzSU + IqiYQ/hFhF8Zo8UZ5nmuj31mzemEkUCt24cSaGyH2pYU9inqpUPMepHdfy1l/kvkONbTjVX1AwAA + //9KhQRrQWZeOlpoKiiBBJWAagAAAAD//4KqgfooPiknPzkbewRgUQIK17yU1AqIG5HlQf6E6itJ + rQApBFNWSkoQ18EB0AkAAAAA///C6gRgjJYk4ncCWAmKEyAiqFbDlUEdkJCQAHID0F4AAAAA//+i + r71ZwPQRk1cdk6egEKNUklmSkxoDFK2FBAEAAAD//6KvU4AOCPFwhdkNAAAA//+is91+jr6uKIkA + 6AQAAAAA//+isxP83YAOAFoLAAAA//+is7XAMFcI9/RziVHSgaSCxNKSjPwi5MAAOgoAAAD//6Kv + o4BpUAGcJkHuScssKi6Jz0vMTYW5CegeAAAAAP//or97YpQCEkuKMpOzoQEFclpOYnEJlqIDAAAA + //+ir+PAQQNxYVB+SUZaaXExFjcBAAAA//+id4CBgqgWmqKKgPUHqFwHuQMAAAD//6J/xJnDQwNo + PQAAAP//orP1ebUxedCiHSU2AAAAAP//wlG/5RcQqt7yC5AcgWwiAAAA//9KRW2sYPUSiqQSkhdQ + GgtKqXkp8SWlRXlKWJsMtUhtBrRK3swYkUEBAAAA//9KRW88YfoNWU4J2S8AAAAA//8DAHvQEW15 + CQAA + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Content-Type: + - text/event-stream; charset=utf-8 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + cache-control: + - no-cache + date: + - Wed, 29 Oct 2025 13:13:45 GMT + request-id: + - req_vrtx_011CUbYpC7Ew4T2r9SwcxsCA + server: + - hypercorn-h11 + x-accel-buffering: + - 'no' + x-vertex-ai-received-request-id: + - db46a612-946d-4074-bd98-23ed2f6639e3 + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_structured_output/json/anthropic-vertex_claude_haiku_4_5@20251001/stream.yaml b/python/tests/e2e/output/cassettes/test_structured_output/json/anthropic-vertex_claude_haiku_4_5@20251001/stream.yaml new file mode 100644 index 000000000..ccd8bcdf3 --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_structured_output/json/anthropic-vertex_claude_haiku_4_5@20251001/stream.yaml @@ -0,0 +1,163 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "openid + https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/sqlservice.login + https://www.googleapis.com/auth/cloud-platform", "token_type": "Bearer", "id_token": + ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:13:39 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please recommend + the most popular book by Patrick Rothfuss"}],"system":"Respond only with valid + JSON that matches this exact schema:\n{\n \"$defs\": {\n \"Author\": {\n \"description\": + \"The author of a book.\",\n \"properties\": {\n \"first_name\": + {\n \"title\": \"First Name\",\n \"type\": \"string\"\n },\n \"last_name\": + {\n \"title\": \"Last Name\",\n \"type\": \"string\"\n }\n },\n \"required\": + [\n \"first_name\",\n \"last_name\"\n ],\n \"title\": + \"Author\",\n \"type\": \"object\"\n }\n },\n \"description\": \"A + book with a rating. The title should be in all caps!\",\n \"properties\": {\n \"title\": + {\n \"title\": \"Title\",\n \"type\": \"string\"\n },\n \"author\": + {\n \"$ref\": \"#/$defs/Author\"\n },\n \"rating\": {\n \"description\": + \"For testing purposes, the rating should be 7\",\n \"title\": \"Rating\",\n \"type\": + \"integer\"\n }\n },\n \"required\": [\n \"title\",\n \"author\",\n \"rating\"\n ],\n \"title\": + \"Book\",\n \"type\": \"object\"\n}","stream":true,"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '1274' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-stream-helper: + - messages + x-stainless-timeout: + - NOT_GIVEN + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:streamRawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2SOwWrDMBBE7/4Ks+cYZKcuQbceQqGH0t4KpQhVXhwRRVK9q5A0+N8rQwU13du+ + GWYGz+hZ1ick0iMqYj1xNWjWsr4BXyOChJUIm/KDvMEpDOiyxTidBmwO2h5Tc9f0TSe6vhWizXY7 + LBk0qvPEFyXah/4+vFzj0+75sb987vdv2/H7NWbjui6DKbgFaCKbu/3SbYLnvBjk+8cGiENUE2oK + HqRPzv0iwq+E3mCBqcy1PiZWHI7oCeS22+VAbQ6oTE5hG7xaO0TRszz810Liv6Sd57rcXFU/AAAA + //9KhQRtQWZeOlqIKiiBBJWAagAAAAD//4KqgfoqPiknPzkbeyRgUQIK27yU1AqIO5HlQX6F6itJ + rQApBFNWSkq1IJcBAAAA///CaiswIksS8dsKVoJiK0QE1Ta4MqidCQkJSigBAwAAAP//oq/1WcDU + EZNXHZOnoBCjBHUI0BEAAAAA//+iryNKMktyUmOAMR+jFOLhihQcIKcAAAAA//+ir1MU/Bx9kVwA + tB8AAAD//6Kz/f5uyP4HuwAAAAD//6KzC4BRoBDu6ecSo6QDSRaJpSUZ+UUogQIAAAD//6Kvk0BJ + A5xEQa5JyywqLonPS8xNVaoFugQAAAD//6K/S2KUAhJLijKTs6EBBHJUTmJxCSyAgI4CAAAA//+i + r6PAgQFxWVB+SUZaaXExyC1AdwAAAAD//6J34ICCoxaaaoqAVQaoGIeECAAAAP//on80maPmI5Aj + AAAAAP//orMj8mpj8pCKd6ADAAAAAP//wlGh5RcQqs/yC5Csh5gFAAAA//9KRW2bYPUGiqQSkrNR + 2gZKqXkp8SWlRXlKWFsItUhNBLQ63cwYGr0AAAAA//9KRW8oYXoJWU4JHiIAAAAA//8DAJ1RxG5i + CQAA + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Content-Type: + - text/event-stream; charset=utf-8 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + cache-control: + - no-cache + date: + - Wed, 29 Oct 2025 13:13:40 GMT + request-id: + - req_vrtx_011CUbYopJ57GApzCmS9YTrQ + server: + - hypercorn-h11 + x-accel-buffering: + - 'no' + x-vertex-ai-received-request-id: + - 1ee19a05-94b5-432a-86ef-ca9e396c1b33 + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_structured_output/json/anthropic-vertex_claude_haiku_4_5@20251001/sync.yaml b/python/tests/e2e/output/cassettes/test_structured_output/json/anthropic-vertex_claude_haiku_4_5@20251001/sync.yaml new file mode 100644 index 000000000..bb5826cfc --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_structured_output/json/anthropic-vertex_claude_haiku_4_5@20251001/sync.yaml @@ -0,0 +1,149 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/sqlservice.login + https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/userinfo.email + openid", "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:13:28 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please recommend + the most popular book by Patrick Rothfuss"}],"system":"Respond only with valid + JSON that matches this exact schema:\n{\n \"$defs\": {\n \"Author\": {\n \"description\": + \"The author of a book.\",\n \"properties\": {\n \"first_name\": + {\n \"title\": \"First Name\",\n \"type\": \"string\"\n },\n \"last_name\": + {\n \"title\": \"Last Name\",\n \"type\": \"string\"\n }\n },\n \"required\": + [\n \"first_name\",\n \"last_name\"\n ],\n \"title\": + \"Author\",\n \"type\": \"object\"\n }\n },\n \"description\": \"A + book with a rating. The title should be in all caps!\",\n \"properties\": {\n \"title\": + {\n \"title\": \"Title\",\n \"type\": \"string\"\n },\n \"author\": + {\n \"$ref\": \"#/$defs/Author\"\n },\n \"rating\": {\n \"description\": + \"For testing purposes, the rating should be 7\",\n \"title\": \"Rating\",\n \"type\": + \"integer\"\n }\n },\n \"required\": [\n \"title\",\n \"author\",\n \"rating\"\n ],\n \"title\": + \"Book\",\n \"type\": \"object\"\n}","anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '1260' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2WQX0vDMBTFv0q5zy20m1Ppm+j8AzpFRFEjWWizNWt2syU3opR+d5PZgcOnHM75 + 3cvJ7WBtaqmhhEoLX8usEar12VE2yUb5aFLkeQEpqDoAa7fkn5a+eF48U4PWq/b26nU7fRsX7tyv + sA0gfW9kRKVzYimDYY2OhnBOORJIwaoMkgyqfO/2PMmvmOyeEubz+coZZNgxTBIGpEhLBmWQT9fT + ZHZ2N03uL5OoX25mFwzSX054aoyN4G4wWgtlHXEU62H+QZBVVTuMREKLA+DRULPwzjGIQD9stoIU + LiNxwrBnGBpC/5GCI7PhVorQNvSWWHPyFmEInNx6iVX4IHqtU/C7m5QdKNx44mRaiQ7K8eg0HEVU + jeRV2EXKID8k8n0e4vp/Zjz9dY7Hff8DmN8aztcBAAA= + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:13:29 GMT + request-id: + - req_vrtx_011CUbYnzav2fQvjR8L1fS8i + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_structured_output/tool/anthropic-vertex_claude_haiku_4_5@20251001/async.yaml b/python/tests/e2e/output/cassettes/test_structured_output/tool/anthropic-vertex_claude_haiku_4_5@20251001/async.yaml new file mode 100644 index 000000000..76d855540 --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_structured_output/tool/anthropic-vertex_claude_haiku_4_5@20251001/async.yaml @@ -0,0 +1,145 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "openid + https://www.googleapis.com/auth/sqlservice.login https://www.googleapis.com/auth/cloud-platform + https://www.googleapis.com/auth/userinfo.email", "token_type": "Bearer", "id_token": + ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:13:35 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please recommend + the most popular book by Patrick Rothfuss"}],"system":"Always respond to the + user''s query using the __mirascope_formatted_output_tool__ tool for structured + output.","tool_choice":{"type":"tool","name":"__mirascope_formatted_output_tool__","disable_parallel_tool_use":true},"tools":[{"name":"__mirascope_formatted_output_tool__","description":"Use + this tool to extract data in Book format for a final response.\nA book with + a rating. The title should be in all caps!","input_schema":{"properties":{"title":{"title":"Title","type":"string"},"author":{"$ref":"#/$defs/Author"},"rating":{"description":"For + testing purposes, the rating should be 7","title":"Rating","type":"integer"}},"required":["title","author","rating"],"additionalProperties":false,"$defs":{"Author":{"description":"The + author of a book.","properties":{"first_name":{"title":"First Name","type":"string"},"last_name":{"title":"Last + Name","type":"string"}},"required":["first_name","last_name"],"title":"Author","type":"object"}},"type":"object"}}],"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '1130' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AsyncAnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2WQ3W7CMAyFXwXlGqQWgcZ6hzbQhgZjDMakaYpCamhEm3Sxs1/13edWwIR2F/t8 + Ocf2jyhcCrlIhM5VSKGTKbMPnV6n3+lG3X4cRbFoC5MyUOBOvnv6lFG8yJ5XeoibR5hviil8fJdL + U5QM0lcJNQqIagfc8C6vGwrRIClL3NLOEvArefk58uRcLgPCMaquwzFsMtj0Hp4uzaQ7voNViP3s + Kl6vGbWqqD9LWRivULsS5Nb5QhFBKl2gMpBsnGXta7kUCUcaakZa3oxas+F01Loft+r3+nZ2zZwK + lDlfg1vjkeQhZK7IG71nIFd/3YWjbBsQRcWbKjJ2J5KLqnptCyRXSg8KnT3frxEQ3gJYzRY25Hlb + hOZanNlMyUPvwaJIBoOIz6V0BlKzFxln5Tlx0llO/2unIxz84qr6BV1WazTxAQAA + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:13:36 GMT + request-id: + - req_vrtx_011CUbYoVgPVKCfuVrXfkY9F + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_structured_output/tool/anthropic-vertex_claude_haiku_4_5@20251001/async_stream.yaml b/python/tests/e2e/output/cassettes/test_structured_output/tool/anthropic-vertex_claude_haiku_4_5@20251001/async_stream.yaml new file mode 100644 index 000000000..35a3ec9e4 --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_structured_output/tool/anthropic-vertex_claude_haiku_4_5@20251001/async_stream.yaml @@ -0,0 +1,158 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/sqlservice.login + https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/cloud-platform + openid", "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:13:46 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please recommend + the most popular book by Patrick Rothfuss"}],"system":"Always respond to the + user''s query using the __mirascope_formatted_output_tool__ tool for structured + output.","tools":[{"name":"__mirascope_formatted_output_tool__","description":"Use + this tool to extract data in Book format for a final response.\nA book with + a rating. The title should be in all caps!","input_schema":{"properties":{"title":{"title":"Title","type":"string"},"author":{"$ref":"#/$defs/Author"},"rating":{"description":"For + testing purposes, the rating should be 7","title":"Rating","type":"integer"}},"required":["title","author","rating"],"additionalProperties":false,"$defs":{"Author":{"description":"The + author of a book.","properties":{"first_name":{"title":"First Name","type":"string"},"last_name":{"title":"Last + Name","type":"string"}},"required":["first_name","last_name"],"title":"Author","type":"object"}},"type":"object"}}],"tool_choice":{"type":"tool","name":"__mirascope_formatted_output_tool__","disable_parallel_tool_use":true},"stream":true,"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '1144' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AsyncAnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-stream-helper: + - messages + x-stainless-timeout: + - NOT_GIVEN + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:streamRawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2SOT0vEMBDF7/0UZc5bSKuFNR/APXjyz0EUCSEZt3HTpHYmxWXpdzcFKxbnNr/3 + eO/hhIFl2SORPqIi1iMXVrOW5QX4PCBI2IiwW3+QF+ijRZ8txutkseq0O6XqumqrRjRtLUSd7c4u + GXRU08hfStRP3WP/fjO1V/hyvnto+o/nw+19ysZtXQZj9AvQRC53h6XbxMB5McjXtx0Qx0GNqCkG + kCF5/4MIPxMGgytM61wXhsSK4wkDgdzvRQ7UpkNlcgq7GNTW8atn2f7XYuK/pK7nudzeXBTfAAAA + //9KhYRwQWZeOlrAKiiBBJWAagAAAAD//4KqgXouPiknPzkbe1xgUQIK4ryU1AqIc5HlQV6G6ivJ + z8+JLy1OhcUHiF8KixFLC4t0P1/zkooADyO35IBss3BzZ3AE5CXmgjTHx+dmFiUWJ+cXpMan5Rfl + JpaUpKbEw30PNDke7AggF2glPBCAHgMAAAD//8LqMWCSKUnE7zGwEhSPQUQQHoJERhYw6uGKC4CB + kZmYAxYEqlCqRY0IAAAAAP//Gki3VMcolWSW5KTGQFwFdA0AAAD//xpI11gpxCiFeLgq+Dn6gpwD + dA0AAAD//xpI17gq+LsphCBiC+gcAAAAAP//GkjnAMMl3NPPBRJTQLcAAAAA//8aSLfoACMqsbQk + I78oBp6cgU4CAAAA//8a2LQDTMtpmUXFJRAHAZ0DAAAA//8aSOfEg4ooROCAnAMAAAD//xrQ0IlR + CkgsKcpMzo5R0olBLYKgzgMAAAD//xpI5+UkFpfEY3MUAAAA//8aSEdBYtAKKX0DAAAA//8aSNfE + KAXll2SklRYXw9M3AAAA//8aWOfUYosvAAAAAP//GuhCqQjYWspLjwG1YZDLbQAAAAD//xpIZ5nX + QgtsAAAAAP//wtGYyi8g1JbKL0ByAnJoAwAAAP//SkVtJGP1EIqkEpIHUBqpyO0wLE3VWqS2Klrj + 0sKwFj0RAAAAAP//SkVvu2N6EVkO1NAEAAAA//8DAGa5htLvCwAA + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Content-Type: + - text/event-stream; charset=utf-8 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + cache-control: + - no-cache + date: + - Wed, 29 Oct 2025 13:13:46 GMT + request-id: + - req_vrtx_011CUbYpJQzykBCM3QHd8KLs + server: + - hypercorn-h11 + x-accel-buffering: + - 'no' + x-vertex-ai-received-request-id: + - a4b45660-5aa6-4a98-988f-e5d44eaf6a2b + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_structured_output/tool/anthropic-vertex_claude_haiku_4_5@20251001/stream.yaml b/python/tests/e2e/output/cassettes/test_structured_output/tool/anthropic-vertex_claude_haiku_4_5@20251001/stream.yaml new file mode 100644 index 000000000..3bad470d7 --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_structured_output/tool/anthropic-vertex_claude_haiku_4_5@20251001/stream.yaml @@ -0,0 +1,159 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/sqlservice.login + https://www.googleapis.com/auth/userinfo.email openid https://www.googleapis.com/auth/cloud-platform", + "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:13:40 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please recommend + the most popular book by Patrick Rothfuss"}],"system":"Always respond to the + user''s query using the __mirascope_formatted_output_tool__ tool for structured + output.","tools":[{"name":"__mirascope_formatted_output_tool__","description":"Use + this tool to extract data in Book format for a final response.\nA book with + a rating. The title should be in all caps!","input_schema":{"properties":{"title":{"title":"Title","type":"string"},"author":{"$ref":"#/$defs/Author"},"rating":{"description":"For + testing purposes, the rating should be 7","title":"Rating","type":"integer"}},"required":["title","author","rating"],"additionalProperties":false,"$defs":{"Author":{"description":"The + author of a book.","properties":{"first_name":{"title":"First Name","type":"string"},"last_name":{"title":"Last + Name","type":"string"}},"required":["first_name","last_name"],"title":"Author","type":"object"}},"type":"object"}}],"tool_choice":{"type":"tool","name":"__mirascope_formatted_output_tool__","disable_parallel_tool_use":true},"stream":true,"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '1144' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-stream-helper: + - messages + x-stainless-timeout: + - NOT_GIVEN + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:streamRawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2SOQWuEMBCF7/4KyXmFxK0gObf3XnppKSEkgwZj4mYmsmXxvzdCLZUe53sf7w2s + EEjWMyDqARSSTlRZTVrWD0ZfCzDJTiG7HDeTDzZHC74oxutsoRm1m3Lz1HRNy9tOcC6K7uzegYNa + E90VF68v4xu5waz93E1mSu2zuL1fi3ieKyBFvwON6Mp22LdNDFQ+ZvLj88KQ4qISaIyByZC9/0EI + twzBwAHz8a4LSyZFcYKATPY9L4XajKBMaSEXgzobv3mJ7f8sZvpLhNi2equqbwAAAP//SoWEaUFm + XjpaUCoogQSVgGoAAAAA//+CqoF6Jz4pJz85G3voY1ECCtS8lNQKiAOR5UGehOoryc/PiS8tToXF + AIhfCosDw7wQM3fXAKfg5MiUYMOsqiLTzIoMV6DSvMRckOb4+NzMosTi5PyC1Pi0/KLcxJKS1JR4 + uH+BJseDHQHkAq0EehvkbwAAAAD//8LqJ2D6KEnE7yewEhQ/QUQQfoGEfBYwnuGKC4DhkJmYAxYE + qlACOgEFAN0DAAAA//8aSPdUxyiVZJbkoDgL6CQAAAAA//8aSCelxoASYC3QFQAAAAD//xpIV8Qo + hXjAQgXoFAAAAAD//xpIp7gq+Dn6uir4uymEIMUT0FEAAAAA//8aSEd5uCqEe/q5xIBTNNAtAAAA + AP//Gki36CjEKCWWlmTkF8UooadkAAAAAP//Gkh3AQ2PUUrLLIK4CegYAAAAAP//GkjHFJfEgwvN + WkTYAAAAAP//Gtj8ZRWjFIBaHAKdBAAAAP//GkgnJZYUZSZnxyjpxCjlJKLmNAAAAAD//xpEEQd0 + DQAAAP//GvB4C1ICNyAAAAAA//8aSHfkl4ADBOgKAAAAAP//GkhXZKSVFhejFzkAAAAA//8a2Oip + RTgH6BYAAAAA//8a6GK5KLEENScBAAAA//8aSAcB27TA5AutsAAAAAD//xpIhyiY16I3BIEuAgAA + AP//wtHWzi8g1NTOL0ByD9w4AAAAAP//SkXtMmH1GoqkEpJXULosyG10LB2XWqSeC1pXw8KwFuYc + AAAAAP//SkXvwWH6C1lOCaoNAAAA//8DADCmMLL5DQAA + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Content-Type: + - text/event-stream; charset=utf-8 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + cache-control: + - no-cache + date: + - Wed, 29 Oct 2025 13:13:41 GMT + request-id: + - req_vrtx_011CUbYouweVHVpKyMa8iqV7 + server: + - hypercorn-h11 + x-accel-buffering: + - 'no' + x-vertex-ai-received-request-id: + - eebb4c1b-5cfd-4ac0-82df-23d13c958306 + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_structured_output/tool/anthropic-vertex_claude_haiku_4_5@20251001/sync.yaml b/python/tests/e2e/output/cassettes/test_structured_output/tool/anthropic-vertex_claude_haiku_4_5@20251001/sync.yaml new file mode 100644 index 000000000..8de74b9d7 --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_structured_output/tool/anthropic-vertex_claude_haiku_4_5@20251001/sync.yaml @@ -0,0 +1,144 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/sqlservice.login + openid https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/cloud-platform", + "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:13:29 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please recommend + the most popular book by Patrick Rothfuss"}],"system":"Always respond to the + user''s query using the __mirascope_formatted_output_tool__ tool for structured + output.","tool_choice":{"type":"tool","name":"__mirascope_formatted_output_tool__","disable_parallel_tool_use":true},"tools":[{"name":"__mirascope_formatted_output_tool__","description":"Use + this tool to extract data in Book format for a final response.\nA book with + a rating. The title should be in all caps!","input_schema":{"properties":{"title":{"title":"Title","type":"string"},"author":{"$ref":"#/$defs/Author"},"rating":{"description":"For + testing purposes, the rating should be 7","title":"Rating","type":"integer"}},"required":["title","author","rating"],"additionalProperties":false,"$defs":{"Author":{"description":"The + author of a book.","properties":{"first_name":{"title":"First Name","type":"string"},"last_name":{"title":"Last + Name","type":"string"}},"required":["first_name","last_name"],"title":"Author","type":"object"}},"type":"object"}}],"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '1130' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2WQ3WrCQBCFX0X22kBSTNXcFWqxhdoftEpLWbabiVlNdmNmtlQk795JUIv0bmfO + t+fMzEGULoVCJEIXyqcQ5MpsfTAI4uAqvIqjMIxEX5iUgRLX8rumHxlGg/gaH+A9m2X7+SLarPYr + yOcrBmlfQYsColoDN2pXtA2FaJCUJW5pZwn4lXwcTjw5V0iPcIpqa38Km76UXxtfDs3AD5eLNxOP + xzvQjFpVtp+lLE2tULsKZObqUhFBKp2nypPsnGXra7kUCUca6kaaTye92c3jpPd012vfy/vZLXPK + U+7qFsxMjSSPIc+KaqO3DBTqr/vqKM88omh4U0XGrkUybJrPvkBylaxBobOX+3UCws6D1WxhfVH0 + he+uxZndlDz0FiyKZDQK+VxK5yA1e5FxVl4SZ53l9L92PsLRL2qaX/MvZmzxAQAA + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:13:30 GMT + request-id: + - req_vrtx_011CUbYo6qD63KvwtZm8GkVL + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_structured_output_with_tools/anthropic-vertex_claude_haiku_4_5@20251001/async.yaml b/python/tests/e2e/output/cassettes/test_structured_output_with_tools/anthropic-vertex_claude_haiku_4_5@20251001/async.yaml new file mode 100644 index 000000000..9d34be027 --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_structured_output_with_tools/anthropic-vertex_claude_haiku_4_5@20251001/async.yaml @@ -0,0 +1,227 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/cloud-platform + openid https://www.googleapis.com/auth/sqlservice.login https://www.googleapis.com/auth/userinfo.email", + "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:14:07 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please look up + the book with ISBN 0-7653-1178-X and provide detailed info and a recommendation + score"}],"system":"Always respond to the user''s query using the __mirascope_formatted_output_tool__ + tool for structured output.","tool_choice":{"type":"any"},"tools":[{"name":"get_book_info","description":"Look + up book information by ISBN.","input_schema":{"properties":{"isbn":{"title":"Isbn","type":"string"}},"required":["isbn"],"additionalProperties":false,"type":"object"}},{"name":"__mirascope_formatted_output_tool__","description":"Use + this tool to extract data in BookSummary format for a final response.","input_schema":{"properties":{"title":{"title":"Title","type":"string"},"author":{"title":"Author","type":"string"},"pages":{"title":"Pages","type":"integer"},"publication_year":{"title":"Publication + Year","type":"integer"}},"required":["title","author","pages","publication_year"],"additionalProperties":false,"type":"object"}}],"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '1038' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AsyncAnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2WP0WqDMBSG3yXXBtTW6rwbtDAGvVjZ2HCMEPVUnZpjPUlZJ777koKw0ruc///y + Hc7EeiyhYykrOmlK4LVsWsPXPOKhH0aB7wfMY01pgZ4qcR71j/CD1+R4WmVh3K93cYa/5rLPtmpr + QX0ZwKFAJCuwwYidCyRRQ1oqbaMClQb7Sj+nhdeInTAEyyo3m2XZUxEd3vf4/BDWend4pJf8Lfg+ + W1TJ3n2uQIscsRWNOqIzqMFY+8QaypXtfR5vohUPgjjhH2yevzxGGgcxgiRUt9uvBcHJgCqsW5mu + 85i53uKEziw0tqCIpckmtMfIogZRWJduUIlbwl96W5f3HRr9P1kn8/wH30HWno8BAAA= + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:14:07 GMT + request-id: + - req_vrtx_011CUbYqqChN22r5iVCCbC4y + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please look up + the book with ISBN 0-7653-1178-X and provide detailed info and a recommendation + score"},{"role":"assistant","content":[{"id":"toolu_vrtx_01Hc5RWMoJ92htERAsQbU1jv","input":{"isbn":"0-7653-1178-X"},"name":"get_book_info","type":"tool_use"}]},{"role":"user","content":[{"type":"tool_result","tool_use_id":"toolu_vrtx_01Hc5RWMoJ92htERAsQbU1jv","content":"Title: + Mistborn: The Final Empire, Author: Brandon Sanderson, Pages: 544, Published: + 2006-07-25"}]}],"system":"Always respond to the user''s query using the __mirascope_formatted_output_tool__ + tool for structured output.","tool_choice":{"type":"any"},"tools":[{"name":"get_book_info","description":"Look + up book information by ISBN.","input_schema":{"properties":{"isbn":{"title":"Isbn","type":"string"}},"required":["isbn"],"additionalProperties":false,"type":"object"}},{"name":"__mirascope_formatted_output_tool__","description":"Use + this tool to extract data in BookSummary format for a final response.","input_schema":{"properties":{"title":{"title":"Title","type":"string"},"author":{"title":"Author","type":"string"},"pages":{"title":"Pages","type":"integer"},"publication_year":{"title":"Publication + Year","type":"integer"}},"required":["title","author","pages","publication_year"],"additionalProperties":false,"type":"object"}}],"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '1401' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AsyncAnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2VQy2rDMBD8laBzDLYbh8bHhuaQPugLQilFbOStrUSWFD1KQvC/d+3iQuhJq5nZ + ndk9s9ZUqFjJhIJYYdKA3MdklhRJnuZFlqYZmzJZkaD1Nf924cjTbB1P+Wp39bjb+KfNEe9gGUUu + SRhOFnspeg81EuCM6gHwXvoAOhAkjA5IVflxHvXBGMWjx9Gq/8fR7H79XK9wE97tYbcsEI19ib4m + qYa2b+a8lQ68MBb5l3EthIAVNzHYGPgwmfdzNX1ZSZYyDJEeKNDWOF1O3hqcrKQGNbltrXR9Coih + MY5UNw50ZfTklR503mgiLa3mWVnMZlTHrZICgjSanxCoJU/Tedd9TpkPxnKH0DddrDgQHg8RtaAk + Oio1ZXE4GOUbglLuPWoyWcyv6WIgGuSCZg0+l4p05Imu/nN/d/hFsnTRdT/mVJl59QEAAA== + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:14:08 GMT + request-id: + - req_vrtx_011CUbYqu4sC3Qw8izpXbLeH + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_structured_output_with_tools/anthropic-vertex_claude_haiku_4_5@20251001/async_stream.yaml b/python/tests/e2e/output/cassettes/test_structured_output_with_tools/anthropic-vertex_claude_haiku_4_5@20251001/async_stream.yaml new file mode 100644 index 000000000..167b6204d --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_structured_output_with_tools/anthropic-vertex_claude_haiku_4_5@20251001/async_stream.yaml @@ -0,0 +1,254 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/sqlservice.login + openid https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/userinfo.email", + "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:14:27 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please look up + the book with ISBN 0-7653-1178-X and provide detailed info and a recommendation + score"}],"system":"Always respond to the user''s query using the __mirascope_formatted_output_tool__ + tool for structured output.","tools":[{"name":"get_book_info","description":"Look + up book information by ISBN.","input_schema":{"properties":{"isbn":{"title":"Isbn","type":"string"}},"required":["isbn"],"additionalProperties":false,"type":"object"}},{"name":"__mirascope_formatted_output_tool__","description":"Use + this tool to extract data in BookSummary format for a final response.","input_schema":{"properties":{"title":{"title":"Title","type":"string"},"author":{"title":"Author","type":"string"},"pages":{"title":"Pages","type":"integer"},"publication_year":{"title":"Publication + Year","type":"integer"}},"required":["title","author","pages","publication_year"],"additionalProperties":false,"type":"object"}}],"tool_choice":{"type":"any"},"stream":true,"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '1052' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AsyncAnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-stream-helper: + - messages + x-stainless-timeout: + - NOT_GIVEN + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:streamRawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2SOzWrDMBCE734Ks+cYJNP0R7cGSiHQ0kMPhVKEkJZEWJYc7yq0BL97ZYihpnvb + b4aZwTNGVnWPROaAmtiMXDnDRtUX4J8BQcFKhM3yg7pAnxyGYrHBZIfN0fguNzfNtmlFu5VCyGL3 + bs6ggz6P/K2F/Hh9St2jty+7nfSy37fPbw/vXTGu6woYU5iBIfKlO87dNkUui0F9fm2AOA16REMp + goo5hCsiPGWMFheYl7k+Dpk1pw4jgbq/bUugsUfUtqSwT1GvHWLRi+z+aynzX3I3TfX1pqr6BQAA + //9KhYRsQWZeOlqAKiiBBJWAagAAAAD//4KqgXoqPiknPzkbexxgUQIK2ryU1AqIM5HlQV6F6ivJ + z8+JLy1OhcUDiF8Kiwln33CLZD8L85CQgtxSn/AQ30RL0zJnoNK8xFyQ5vRUoIH5+dlAn6flg60D + ehdoONSfQA8AAAAA///C6gFgkihJxO8BsBIUD0BEEA6HBHYWMGrhiguAns5MzAELAlUo1ULcAAAA + AP//Gkg3VMcoZRYr1cIjHQAAAP//Gki3JOXFANNWDDxcAAAAAP//Gki3GOiam5ka6yrBMwTYRQAA + AAD//xpIFxkamlvoRiA7COooAAAAAP//GkhHxSjVwmILAAAA///CURTkFxAqCfILkByB7jkAAAAA + //9KRS3esXoLRVIJyRsoxStySYKlkK1FKmXRikUTC8xABwAAAP//SkWvdjD9iSynBNYEAAAA//8D + AK8KjD6sBgAA + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Content-Type: + - text/event-stream; charset=utf-8 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + cache-control: + - no-cache + date: + - Wed, 29 Oct 2025 13:14:28 GMT + request-id: + - req_vrtx_011CUbYsNPCvZSyfPQbJAA1n + server: + - hypercorn-h11 + x-accel-buffering: + - 'no' + x-vertex-ai-received-request-id: + - 7ede4224-be56-4a9d-bce9-7ea727af0444 + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please look up + the book with ISBN 0-7653-1178-X and provide detailed info and a recommendation + score"},{"role":"assistant","content":[{"type":"tool_use","id":"toolu_vrtx_01CMW8cN87TTpmuLWTMa95vC","name":"get_book_info","input":{"isbn":"0-7653-1178-X"}}]},{"role":"user","content":[{"type":"tool_result","tool_use_id":"toolu_vrtx_01CMW8cN87TTpmuLWTMa95vC","content":"Title: + Mistborn: The Final Empire, Author: Brandon Sanderson, Pages: 544, Published: + 2006-07-25"}]}],"system":"Always respond to the user''s query using the __mirascope_formatted_output_tool__ + tool for structured output.","tools":[{"name":"get_book_info","description":"Look + up book information by ISBN.","input_schema":{"properties":{"isbn":{"title":"Isbn","type":"string"}},"required":["isbn"],"additionalProperties":false,"type":"object"}},{"name":"__mirascope_formatted_output_tool__","description":"Use + this tool to extract data in BookSummary format for a final response.","input_schema":{"properties":{"title":{"title":"Title","type":"string"},"author":{"title":"Author","type":"string"},"pages":{"title":"Pages","type":"integer"},"publication_year":{"title":"Publication + Year","type":"integer"}},"required":["title","author","pages","publication_year"],"additionalProperties":false,"type":"object"}}],"tool_choice":{"type":"any"},"stream":true,"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '1415' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AsyncAnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-stream-helper: + - messages + x-stainless-timeout: + - NOT_GIVEN + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:streamRawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2SOwWrDMBBE7/4Ko3MMsmjaRreQW9tL6KHQUoQqLbFiRXK0q5AS/O+VoYaaHvfN + Y2bhAoFkfQJEfQCFpBNVVpOW9Y3R9wBMskXIVvPN5I2dogVfFON1ttB02vW5uWvWjeBi3XLeFt3Z + qQMP6pLoqngrXnabr7fX7nrsk9huxfvzcb97KuJyroAU/QQ0oivbYdo2MVD5mMmPzxVDioNKoDEG + JkP2/hchnDMEAzPM87suDJkUxR4CMrm5fyyF2nSgTGkhF4NaGnzOS2z/ZzHTX9I+jGNdj1X1AwAA + //9KhQRqQWZeOlpYKiiBBJWAagAAAAD//4KqgfonPiknPzkbe/BjUQIK1byU1AqIC5HlQb6E6ivJ + z8+JLy1OhUUBiF8Ki4SQ8vTEMtdIS8uKwjITS6Mqk0Iz1xRXoNK8xFyQ5vj43MyixOLk/ILU+LT8 + otzEkpLUlHi4h4Emx4MdAeQCrQT5Gw6AngMAAAD//8LqOWBKKUnE7zmwEhTPQUQQnoLEQRYwxuGK + C4ABkpmYAxYEqlBCcwsAAAD//xpIt1THKJVkQh0EdAoAAAD//xpIp5TkpMYA01+Mki9KAIHdBQAA + AP//Gkh3AXN2Un4RmpvArgIAAAD//xpIV+VZKYRkKNUCXQEAAAD//xpIV6QquGXmJeYouOaihg/Q + WQAAAAD//xpIZxVkFgHTEpKTgO4BAAAA//8aSPfoAFN1YmlJRn4RxFVA5wAAAAD//xpI54AymRM0 + RQOdAgAAAP//GkinJOal5OcpBAMp9AwGdBgAAAD//xrQlF0EpKFpCOgUAAAAAP//GujUUwBsHxQD + i0eMbAYAAAD//xpIhymYmiC7B+gaAAAAAP//GkjXoLsFAAAA//8a8CgrTcrJTIbnMgAAAAD//xrQ + XAav45EDCAAAAP//GkgXAWUqUxOxOAoAAAD//xpIRxWB2h9GMEcBHQMAAAD//xpIxxgYmNWC63cA + AAAA///C0Q7PLyDUDM8vQHICUhADAAAA//9KRe1RYfUPiqQSkvtRejTILXgs/ZpapI4Nek/EwLIW + 5BYAAAAA//9KRe/dYXoLWU4J7gkAAAAA//8DAFfaIj8XDgAA + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Content-Type: + - text/event-stream; charset=utf-8 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + cache-control: + - no-cache + date: + - Wed, 29 Oct 2025 13:14:29 GMT + request-id: + - req_vrtx_011CUbYsRoakduz9um224d9L + server: + - hypercorn-h11 + x-accel-buffering: + - 'no' + x-vertex-ai-received-request-id: + - f7757cea-57e9-4e45-9aa8-fded01b1afc0 + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_structured_output_with_tools/anthropic-vertex_claude_haiku_4_5@20251001/stream.yaml b/python/tests/e2e/output/cassettes/test_structured_output_with_tools/anthropic-vertex_claude_haiku_4_5@20251001/stream.yaml new file mode 100644 index 000000000..093832617 --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_structured_output_with_tools/anthropic-vertex_claude_haiku_4_5@20251001/stream.yaml @@ -0,0 +1,253 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/userinfo.email + https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/sqlservice.login + openid", "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:14:17 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please look up + the book with ISBN 0-7653-1178-X and provide detailed info and a recommendation + score"}],"system":"Always respond to the user''s query using the __mirascope_formatted_output_tool__ + tool for structured output.","tools":[{"name":"get_book_info","description":"Look + up book information by ISBN.","input_schema":{"properties":{"isbn":{"title":"Isbn","type":"string"}},"required":["isbn"],"additionalProperties":false,"type":"object"}},{"name":"__mirascope_formatted_output_tool__","description":"Use + this tool to extract data in BookSummary format for a final response.","input_schema":{"properties":{"title":{"title":"Title","type":"string"},"author":{"title":"Author","type":"string"},"pages":{"title":"Pages","type":"integer"},"publication_year":{"title":"Publication + Year","type":"integer"}},"required":["title","author","pages","publication_year"],"additionalProperties":false,"type":"object"}}],"tool_choice":{"type":"any"},"stream":true,"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '1052' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-stream-helper: + - messages + x-stainless-timeout: + - NOT_GIVEN + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:streamRawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2SOQUvEMBCF7/0VZc5bSIu7Sq4qeBFcbyISYjK7zTab1M5k1V36303BgsW5zfce + 7z08YWBZHpFI71ER64ELq1nL8gL83SNIWIiwmn+QFzhGiz5bjNfJYtVq16XqqlpXjWjWtRB1tjs7 + ZdBenQb+UqK+fW+3L+eHzf1599g99c+H7d3h02Tjsi6DIfoJaCKXu8PUbWLgvBjk69sKiGOvBtQU + A8iQvP9FhB8Jg8EZpnmuC31ixbHDQCBvNk0O1KZFZXIKuxjU0iFmPcv2vxYT/yXX41gubyyKHwAA + AP//SoUEcEFmXjpauCoogQSVgGoAAAAA//+CqoH6LT4pJz85G3tUYFECCuG8lNQKiGuR5UE+huor + yc/PiS8tToVFB4hfCouQiIzA0IzkKNMAH0fz8IAsR5OIrMLKIKDSvMRckOb0VKCB+fnZwABIywdb + B/Q10HCwd4HOBwAAAP//wup8YLooScTvfLASFOdDRBDOhoR4FjB+4YoLgF7OTMwBCwJVKNWiBzgA + AAD//xpI11THKGUWJ+XFAJm1QKcAAAAA//8aSKcoxCgZ6JqbKWFJkgAAAAD//xpIZ5ka6xoamlvo + RsQo1WJzGwAAAP//wpEV8gsI5YT8AiSXIcwDAAAA//9KRS3fsPoSRVIJyVco5QtyHsJSytQiFTNo + 5YKJRS2aLwEAAAD//0pFL3Ux/Ycsp4QRTAAAAAD//wMAvjaFjLcFAAA= + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Content-Type: + - text/event-stream; charset=utf-8 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + cache-control: + - no-cache + date: + - Wed, 29 Oct 2025 13:14:18 GMT + request-id: + - req_vrtx_011CUbYrbjrVNVVHzZ7A9hPs + server: + - hypercorn-h11 + x-accel-buffering: + - 'no' + x-vertex-ai-received-request-id: + - fd1e32cb-f172-4d30-a68c-ecd4793d2bed + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please look up + the book with ISBN 0-7653-1178-X and provide detailed info and a recommendation + score"},{"role":"assistant","content":[{"type":"tool_use","id":"toolu_vrtx_01XhQUhcZ5PLA7WPjA4XjqyR","name":"get_book_info","input":{"isbn":"0-7653-1178-X"}}]},{"role":"user","content":[{"type":"tool_result","tool_use_id":"toolu_vrtx_01XhQUhcZ5PLA7WPjA4XjqyR","content":"Title: + Mistborn: The Final Empire, Author: Brandon Sanderson, Pages: 544, Published: + 2006-07-25"}]}],"system":"Always respond to the user''s query using the __mirascope_formatted_output_tool__ + tool for structured output.","tools":[{"name":"get_book_info","description":"Look + up book information by ISBN.","input_schema":{"properties":{"isbn":{"title":"Isbn","type":"string"}},"required":["isbn"],"additionalProperties":false,"type":"object"}},{"name":"__mirascope_formatted_output_tool__","description":"Use + this tool to extract data in BookSummary format for a final response.","input_schema":{"properties":{"title":{"title":"Title","type":"string"},"author":{"title":"Author","type":"string"},"pages":{"title":"Pages","type":"integer"},"publication_year":{"title":"Publication + Year","type":"integer"}},"required":["title","author","pages","publication_year"],"additionalProperties":false,"type":"object"}}],"tool_choice":{"type":"any"},"stream":true,"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '1415' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-stream-helper: + - messages + x-stainless-timeout: + - NOT_GIVEN + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:streamRawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2SOzWrDMBCE734Ks+cY5NTuj645NOdCSdNShJCXRFiRXO/KdQl+98pQ05rubb8Z + ZgYH9CzzCxLpEypi3XPWaNYyvwJ/dQgSViJslh/kFS6hQZcsxunYYHHWto1FVdTFVmzrUogy2W0z + Z9BJDT2PSpT14Wb/iNW4r4aX4+F5d/xsn8bXZFzXJdAHNwNNZFO3n7tN8JwWg3x73wBx6FSPmoIH + 6aNzP4jwI6I3uMC4zLW+i6w4tOgJ5MPtfQrU5ozKpBS2wau1Qyx6kpv/Woj8l5R305T/3pRl3wAA + AP//SoWEbkFmXjpaoCoogQSVgGoAAAAA//+CqoF6LD4pJz85G3s8YFECCt68lNQKiFOR5UHeheor + yc/PiS8tToXFBYhfCouNwPCIsKLgUMds76x0j4Ik5+KKsHzfQKDSvMRckOb4+NzMosTi5PyC1Pi0 + /KLcxJKS1JR4uM+BJseDHQHkAq1EDgCg3wAAAAD//8LqN2CKKUnE7zewEhS/QUQQfoLERRYw5uGK + C4DhkZmYAxYEqlCqRbgDAAAA//8aSHdUxyiVZJbkQJ0DdAwAAAD//xpIx6TGAJNejBLCMQAAAAD/ + /xpIx/gCc3VSflGeElquAQAAAP//Gkg3WSmEZKTCHAR0CwAAAP//Gki3KLhl5iXmKLjmFmQiIgwA + AAD//xpIBxWlxiihRBbYRQAAAAD//xpIF+kAE3NiaUkGkquALgIAAAD//xpIF+UXQbKYU1FiXko+ + WmiBXQcAAAD//xpI1+UpBCeC3AR0BgAAAP//GlBnpKQWAVmw1AR0DQAAAP//GthEBHcGAAAA//8a + SGfEAAXSU4uxJRkAAAAA//8aWGdZKZiamKA6C+gmAAAAAP//GuhsX1CalJOZnIgtuAAAAAD//xpI + p4FbkZWo5REAAAD//xrQGj8RXCAZGSC3hwAAAAD//xpIBxmY1SrVAt0AAAAA///C0e7NLyDU7M0v + QHIBwk8AAAAA//9KRe3JYPUNiqQSkutRehLIDWYs/YlapA4Feg/AwBJWkgAAAAD//0pF71hhegxZ + Tgk1BQMAAAD//wMAP0LD6JcNAAA= + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Content-Type: + - text/event-stream; charset=utf-8 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + cache-control: + - no-cache + date: + - Wed, 29 Oct 2025 13:14:18 GMT + request-id: + - req_vrtx_011CUbYreJ8yE9P15r8ngkTa + server: + - hypercorn-h11 + x-accel-buffering: + - 'no' + x-vertex-ai-received-request-id: + - cb25c046-46e8-490c-b045-55f3f5072f31 + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_structured_output_with_tools/anthropic-vertex_claude_haiku_4_5@20251001/sync.yaml b/python/tests/e2e/output/cassettes/test_structured_output_with_tools/anthropic-vertex_claude_haiku_4_5@20251001/sync.yaml new file mode 100644 index 000000000..2eebcd2b0 --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_structured_output_with_tools/anthropic-vertex_claude_haiku_4_5@20251001/sync.yaml @@ -0,0 +1,228 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "openid + https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/sqlservice.login + https://www.googleapis.com/auth/userinfo.email", "token_type": "Bearer", "id_token": + ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:13:56 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please look up + the book with ISBN 0-7653-1178-X and provide detailed info and a recommendation + score"}],"system":"Always respond to the user''s query using the __mirascope_formatted_output_tool__ + tool for structured output.","tool_choice":{"type":"any"},"tools":[{"name":"get_book_info","description":"Look + up book information by ISBN.","input_schema":{"properties":{"isbn":{"title":"Isbn","type":"string"}},"required":["isbn"],"additionalProperties":false,"type":"object"}},{"name":"__mirascope_formatted_output_tool__","description":"Use + this tool to extract data in BookSummary format for a final response.","input_schema":{"properties":{"title":{"title":"Title","type":"string"},"author":{"title":"Author","type":"string"},"pages":{"title":"Pages","type":"integer"},"publication_year":{"title":"Publication + Year","type":"integer"}},"required":["title","author","pages","publication_year"],"additionalProperties":false,"type":"object"}}],"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '1038' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2WP3WqDQBBG32WvXVCrUXLdNiWl0D9BKGXZ6NTY6Ix1dpu0wXfvbkBI6N3O9509 + wxxFTzV0YimqTtsa5Fa3OysTmco4jNMoDCMRiLZ2QM+N+h7NQYVRsufXu+tfTqG5TZ+S4vBQ7u+f + HWh+BvAoMOsGXDBS5wPN3LLRaFxUERpwr+XbceYNUacsw7zKz3ZetsK0PCSrUmORLeizeKluHtdr + h6Lu/ecGjNoQ7VSLH+QNOFhnP4qWN+j6UGaL9EpGUZbLUkzTeyDY0KBG0Ex4uf1UMHxZwMq50XZd + IOzpFi/0ZmVoB8himS9id4yutqAq5zItobokwrl3df2/I2vOkySfpj8GDgk4jwEAAA== + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:13:57 GMT + request-id: + - req_vrtx_011CUbYq3zrVR7iELYL6EqnE + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please look up + the book with ISBN 0-7653-1178-X and provide detailed info and a recommendation + score"},{"role":"assistant","content":[{"id":"toolu_vrtx_01Gn5Xx4GXanU76ojUScEPJJ","input":{"isbn":"0-7653-1178-X"},"name":"get_book_info","type":"tool_use"}]},{"role":"user","content":[{"type":"tool_result","tool_use_id":"toolu_vrtx_01Gn5Xx4GXanU76ojUScEPJJ","content":"Title: + Mistborn: The Final Empire, Author: Brandon Sanderson, Pages: 544, Published: + 2006-07-25"}]}],"system":"Always respond to the user''s query using the __mirascope_formatted_output_tool__ + tool for structured output.","tool_choice":{"type":"any"},"tools":[{"name":"get_book_info","description":"Look + up book information by ISBN.","input_schema":{"properties":{"isbn":{"title":"Isbn","type":"string"}},"required":["isbn"],"additionalProperties":false,"type":"object"}},{"name":"__mirascope_formatted_output_tool__","description":"Use + this tool to extract data in BookSummary format for a final response.","input_schema":{"properties":{"title":{"title":"Title","type":"string"},"author":{"title":"Author","type":"string"},"pages":{"title":"Pages","type":"integer"},"publication_year":{"title":"Publication + Year","type":"integer"}},"required":["title","author","pages","publication_year"],"additionalProperties":false,"type":"object"}}],"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '1401' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2VQy2rDMBD8FaNzDHIam9g390Wh5FCSvihFKPImVmNLqh6mafC/d+3iQuhJq5nZ + ndk9kVZX0JCCiIaHCuKay0OIF3Eaz+k8TShNyIzICgWt27PO+i9Gk9fyyeddZsrNMv/Yu+suc7ur + VxT6o4FBCs7xPSBgdTMA3DnpPFceIaGVB6yKt9Ok91o3LDiYrIZ/mMxe0ntx15WmTJ+7C/+wyr8P + 60eLUsXboZmxVlruhDbAdtq23HuomA7eBM/GyWyYq/BLCrSUfoy0wkBbbVURbWqIbqXiTXTTGmmH + FDz4WltUXVquKq2iNT5gnVZIGlzNkSJdLLAO20YK7qVW7AgcW+aUZn3/PiPOa8Ms8KHpbMWRcPAZ + QAlMokLTzEgYD4b5xqCY+wAKTfJsiRfjogYmcNboc66gE4909Z/7u8MvktC8738AlRqvTfUBAAA= + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:13:58 GMT + request-id: + - req_vrtx_011CUbYq7GokkUnzd4kBeYTC + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_structured_output_with_tools/json/anthropic-vertex_claude_haiku_4_5@20251001/async.yaml b/python/tests/e2e/output/cassettes/test_structured_output_with_tools/json/anthropic-vertex_claude_haiku_4_5@20251001/async.yaml new file mode 100644 index 000000000..953734da3 --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_structured_output_with_tools/json/anthropic-vertex_claude_haiku_4_5@20251001/async.yaml @@ -0,0 +1,248 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "openid + https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/sqlservice.login + https://www.googleapis.com/auth/cloud-platform", "token_type": "Bearer", "id_token": + ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:13:59 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please look up + the book with ISBN 0-7653-1178-X and provide detailed info and a recommendation + score"}],"system":"Respond only with valid JSON that matches this exact schema:\n{\n \"properties\": + {\n \"title\": {\n \"title\": \"Title\",\n \"type\": \"string\"\n },\n \"author\": + {\n \"title\": \"Author\",\n \"type\": \"string\"\n },\n \"pages\": + {\n \"title\": \"Pages\",\n \"type\": \"integer\"\n },\n \"publication_year\": + {\n \"title\": \"Publication Year\",\n \"type\": \"integer\"\n }\n },\n \"required\": + [\n \"title\",\n \"author\",\n \"pages\",\n \"publication_year\"\n ],\n \"title\": + \"BookSummary\",\n \"type\": \"object\"\n}","tools":[{"name":"get_book_info","description":"Look + up book information by ISBN.","input_schema":{"properties":{"isbn":{"title":"Isbn","type":"string"}},"required":["isbn"],"additionalProperties":false,"type":"object"}}],"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '1041' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AsyncAnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2WPYUvDMBCG/0s+N9DUtZV+F0Fl6HQqiIQsvbW1ba7rJTop/e8mg8KG33Lv++Q5 + bmI9ltCxgulOuRJ4rZrW8RVPeRInqYhjwSLWlB7oqZLfoz3KWGw3b5S83pO6K79K8axIPw7b0YP2 + d4CAApGqwAcjdiFQRA1ZZayPNBoL/lV8TAtvETvpCJZVYXbLsqds83M0tD7e3L6IdP2wPwy10h41 + qg+fK7Byh9jKxuwxGMzgvH1iDe2M72OeZ+kVFyK/5u9snj8jRhYHOYIiNJfbTwXBwYHR3m1c10XM + nW4JwmCWFlswxIo8z/0xStcgtXfZBo28JOKl93X5v0Nnz5NsNc9/YaNiz48BAAA= + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:14:00 GMT + request-id: + - req_vrtx_011CUbYqJ8Qpyct7WyWQjfoD + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please look up + the book with ISBN 0-7653-1178-X and provide detailed info and a recommendation + score"},{"role":"assistant","content":[{"id":"toolu_vrtx_01Q6RwxnsNxEGT15NLfqphac","input":{"isbn":"0-7653-1178-X"},"name":"get_book_info","type":"tool_use"}]},{"role":"user","content":[{"type":"tool_result","tool_use_id":"toolu_vrtx_01Q6RwxnsNxEGT15NLfqphac","content":"Title: + Mistborn: The Final Empire, Author: Brandon Sanderson, Pages: 544, Published: + 2006-07-25"}]}],"system":"Respond only with valid JSON that matches this exact + schema:\n{\n \"properties\": {\n \"title\": {\n \"title\": \"Title\",\n \"type\": + \"string\"\n },\n \"author\": {\n \"title\": \"Author\",\n \"type\": + \"string\"\n },\n \"pages\": {\n \"title\": \"Pages\",\n \"type\": + \"integer\"\n },\n \"publication_year\": {\n \"title\": \"Publication + Year\",\n \"type\": \"integer\"\n }\n },\n \"required\": [\n \"title\",\n \"author\",\n \"pages\",\n \"publication_year\"\n ],\n \"title\": + \"BookSummary\",\n \"type\": \"object\"\n}","tools":[{"name":"get_book_info","description":"Look + up book information by ISBN.","input_schema":{"properties":{"isbn":{"title":"Isbn","type":"string"}},"required":["isbn"],"additionalProperties":false,"type":"object"}}],"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '1404' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AsyncAnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/3VV708jNxD9V0b7oT+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ir2eabrUPXNJPPxzNhvHOM4UfRbXZ1Jmjpw3QJXtKhuAwb1Cn7qJR + oGxKl4Ki5bBmnXJWYCWiZ2uz++z7Uk4k8lm+f23EHHjWrRKmfStjL4HzlyOex0imGnnJw9uS8RF+ + mLQWkwyUkQMmakgMvFdBJBA/aQusUG9g4gwXNV34AOvShYKmfv1fEyBWMlfaqGzIfP9GyrfCtZJZ + 2tKNT/W6i9gY6Gr625TecWNiHn34DBsi58dDug83xyaYtpV/RahKWcCn7zLOKA+HBe07XMQKWn8/ + LR7/GReYuXYJHuFTPE5QYZm64IqnQN7lNF4x11k7Lrr88JUPhXFtl5bJb9nFojw9nePlU7rmpUat + /Bi8zpgd4iLZ1zHfpZcr89n88fFfLyqfEr0HAAA= + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:14:04 GMT + request-id: + - req_vrtx_011CUbYqLzK5yHboKgo4iA5E + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_structured_output_with_tools/json/anthropic-vertex_claude_haiku_4_5@20251001/async_stream.yaml b/python/tests/e2e/output/cassettes/test_structured_output_with_tools/json/anthropic-vertex_claude_haiku_4_5@20251001/async_stream.yaml new file mode 100644 index 000000000..f431e9075 --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_structured_output_with_tools/json/anthropic-vertex_claude_haiku_4_5@20251001/async_stream.yaml @@ -0,0 +1,293 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/cloud-platform + https://www.googleapis.com/auth/sqlservice.login https://www.googleapis.com/auth/userinfo.email + openid", "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:14:20 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please look up + the book with ISBN 0-7653-1178-X and provide detailed info and a recommendation + score"}],"system":"Respond only with valid JSON that matches this exact schema:\n{\n \"properties\": + {\n \"title\": {\n \"title\": \"Title\",\n \"type\": \"string\"\n },\n \"author\": + {\n \"title\": \"Author\",\n \"type\": \"string\"\n },\n \"pages\": + {\n \"title\": \"Pages\",\n \"type\": \"integer\"\n },\n \"publication_year\": + {\n \"title\": \"Publication Year\",\n \"type\": \"integer\"\n }\n },\n \"required\": + [\n \"title\",\n \"author\",\n \"pages\",\n \"publication_year\"\n ],\n \"title\": + \"BookSummary\",\n \"type\": \"object\"\n}","tools":[{"name":"get_book_info","description":"Look + up book information by ISBN.","input_schema":{"properties":{"isbn":{"title":"Isbn","type":"string"}},"required":["isbn"],"additionalProperties":false,"type":"object"}}],"stream":true,"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '1055' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AsyncAnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-stream-helper: + - messages + x-stainless-timeout: + - NOT_GIVEN + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:streamRawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2SOwWrDMBBE7/4Ks+cYpBDXoE9ICRRyDEUIaeuokSXXuwotwf9eGepS073tm2Fm + 8I6RVT0gkelRE5uJK2fYqPoB/DUiKNiIsFt/UA8YksNQLDaY7LC5Gn/LzaFpm73Yt1IIWezeLRnU + 6/vEn1pImVnK4a0/Pb+fZfskD8eje6Fi3NYVMKWwAEPkS3dcum2KXBaDurzugDiNekJDKYKKOYQf + RPiRMVpcYV7n+jhm1pxuGAlU13Ul0NgraltS2Keotw6x6kV2/7WU+S+R81z/3lxV3wAAAP//SoWE + bUFmXjpakCoogQSVgGoAAAAA//+CqoF6Kz4pJz85G3ssYFECCty8lNQKiEOR5UGeheorSa0AKQRT + VkpKtXDnAQAAAP//wmo1MDpLEvFbDVaCYjVEBNVKuDKoxZ5Qm4EWAwAAAP//oq/F6jk5YKuBFgMA + AAD//6KvxQo5+fnZSrXIKQIAAAD//6KzA0oLFEoyUhWSgO5QyMxLyy/KBSdyBSALyV0wxwEAAAD/ + /6Kz4yrzS/XQXQFyBgAAAP//wpEj8gsIZYj8AiRHwI0DAAAA//+iUgYzxJPB8vNz4kuLU2FFHYhf + CivsnLxDA8uqwkwji4uqzApDnI0tMyvSfIBK8xJzQZrTU4EGAuMnHhQ/YOuAJQrQcLSiBAAAAP// + olLcGGLGDaRQywIWoXDFBUCfZybmgAWhRQbQCQAAAAD//xpIJ1THKGUWJ+XFAEvOGCWURAN0GAAA + AP//GkiHGeiam5ka6yqhxhYAAAD//xpIFxkamlvoYsndAAAAAP//Gkg3RcQo1WJxEgAAAP//okpO + NwQbBQAAAP//SkVtxmD1F4qkEpI/UJoRyNkZS2OiFqk1gVb9m5tAqxkAAAAA//9KRW9TYfoIWQ7U + DAAAAAD//wMAuSA6QIcJAAA= + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Content-Type: + - text/event-stream; charset=utf-8 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + cache-control: + - no-cache + date: + - Wed, 29 Oct 2025 13:14:21 GMT + request-id: + - req_vrtx_011CUbYrqAF5zbEC6GWTHL4i + server: + - hypercorn-h11 + x-accel-buffering: + - 'no' + x-vertex-ai-received-request-id: + - 544f456d-01a5-4938-9859-c8069488bae0 + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please look up + the book with ISBN 0-7653-1178-X and provide detailed info and a recommendation + score"},{"role":"assistant","content":[{"type":"text","text":"I''ll look up + the book information for you."},{"type":"tool_use","id":"toolu_vrtx_01BKUQvzV5Ysrz6qTC39ixfL","name":"get_book_info","input":{"isbn":"0-7653-1178-X"}}]},{"role":"user","content":[{"type":"tool_result","tool_use_id":"toolu_vrtx_01BKUQvzV5Ysrz6qTC39ixfL","content":"Title: + Mistborn: The Final Empire, Author: Brandon Sanderson, Pages: 544, Published: + 2006-07-25"}]}],"system":"Respond only with valid JSON that matches this exact + schema:\n{\n \"properties\": {\n \"title\": {\n \"title\": \"Title\",\n \"type\": + \"string\"\n },\n \"author\": {\n \"title\": \"Author\",\n \"type\": + \"string\"\n },\n \"pages\": {\n \"title\": \"Pages\",\n \"type\": + \"integer\"\n },\n \"publication_year\": {\n \"title\": \"Publication + Year\",\n \"type\": \"integer\"\n }\n },\n \"required\": [\n \"title\",\n \"author\",\n \"pages\",\n \"publication_year\"\n ],\n \"title\": + \"BookSummary\",\n \"type\": \"object\"\n}","tools":[{"name":"get_book_info","description":"Look + up book information by ISBN.","input_schema":{"properties":{"isbn":{"title":"Isbn","type":"string"}},"required":["isbn"],"additionalProperties":false,"type":"object"}}],"stream":true,"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '1486' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AsyncAnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-stream-helper: + - messages + x-stainless-timeout: + - NOT_GIVEN + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:streamRawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2SOzWrDMBCE734Ks+cY5OD0R8deDG2uJYdShJAWR7EiOd5VaAh+98pQQ0z3tt8M + M4NXDCzLMxLpDhWxHrmwmrUs78C3AUHCSoTN8oO8wzla9NlivE4Wq6N2faqaaldtxXZXC1Fnu7Nz + BnXqOvKPEvVhPzy1t8NH+/l+esPnvu3qy95m47ougzH6GWgil7vD3G1i4LwY5Nf3BojjoEbUFAPI + kLz/Q4SXhMHgAtMy14UhseLYYyCQL69NDtTmiMrkFHYxqLVDLHqW7X8tJn4kzTSVDzcVxS8AAAD/ + /0qFhG5BZl46WqAqKI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3UgS8AAAAA//8aiFGWzGKF4tIk8BKwzMQchaRS + 9J4c2GUAAAAA//+is8sysAysQxwCAAAA//+id9MwLx1Yq4HHGYCWAwAAAP//GoByHKm4AgAAAP// + GoBWMWjovgRchQEAAAD//6J3hzUxGTQiW5KRiJEcgY4BAAAA//+is2OyU1MLihVAyxRBnejMvLJU + YBMHNDpalF+anpEPyzFAhwEAAAD//xqAGsUUVKMEpxZloqw1goUUAAAA//+idx8BtG4SqYIBAAAA + //8akKEx0KwGZNlhUiow7+ZBhwmRQgUAAAD//xqQFjo4GwEAAAD//6K3zUWZ6aAVM2C7AQAAAP// + onf/Fbp+UKGkKBPYCqzUUShILUpLTS5BHn8CAAAA//+i/3oCYFTkF0NWx6IlDIiLAAAAAP//orOL + SkCDhWWpoHm4fPDwGNAJAAAAAP//orMTkvNzC3JSS6CdRgAAAAD//xqgvloxrhIMAAAA//8agCIV + eVEZ1BUAAAAA//+i8zru1GKkag9oPQAAAP//ovfsPWRVG3QSH63wBAAAAP//onsLrCSjtDgzsbgE + fVIU6BYAAAAA//+i+9Q9pAkAGuJPzcvKr4TmnQrUsQ8dYM8XNmgIAAAA//+i9xBvYl4lxqgU0BkA + AAAA//+i9yx2aiqW0hXsEgAAAAD//6KzSzJzc1FyEgAAAP//oq/1wMQCKtzB4+3wZQbIzXqwmwAA + AAD//6J35JQU5SPHDdAFAAAAAP//oneNA5t0UEiEzjsAAAAA//+irwOSi/UwcggAAAD//8KxVSi/ + gNBOofwCJPvRUzsAAAD//0pF3QKG1UcokkpIPkDZgqWUmpcSX1JalKeEdSNWLdJOLLStU8amFrD2 + OAAAAP//QnMONu8hyymhewcAAAD//wMAixY67tI2AAA= + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Content-Type: + - text/event-stream; charset=utf-8 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + cache-control: + - no-cache + date: + - Wed, 29 Oct 2025 13:14:22 GMT + request-id: + - req_vrtx_011CUbYrupHTC6ZvgqJ5n4VK + server: + - hypercorn-h11 + x-accel-buffering: + - 'no' + x-vertex-ai-received-request-id: + - b18a2d06-cd38-495f-bcf9-7eb52c5eccd6 + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_structured_output_with_tools/json/anthropic-vertex_claude_haiku_4_5@20251001/stream.yaml b/python/tests/e2e/output/cassettes/test_structured_output_with_tools/json/anthropic-vertex_claude_haiku_4_5@20251001/stream.yaml new file mode 100644 index 000000000..709888612 --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_structured_output_with_tools/json/anthropic-vertex_claude_haiku_4_5@20251001/stream.yaml @@ -0,0 +1,290 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/sqlservice.login + openid https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/cloud-platform", + "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:14:10 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please look up + the book with ISBN 0-7653-1178-X and provide detailed info and a recommendation + score"}],"system":"Respond only with valid JSON that matches this exact schema:\n{\n \"properties\": + {\n \"title\": {\n \"title\": \"Title\",\n \"type\": \"string\"\n },\n \"author\": + {\n \"title\": \"Author\",\n \"type\": \"string\"\n },\n \"pages\": + {\n \"title\": \"Pages\",\n \"type\": \"integer\"\n },\n \"publication_year\": + {\n \"title\": \"Publication Year\",\n \"type\": \"integer\"\n }\n },\n \"required\": + [\n \"title\",\n \"author\",\n \"pages\",\n \"publication_year\"\n ],\n \"title\": + \"BookSummary\",\n \"type\": \"object\"\n}","tools":[{"name":"get_book_info","description":"Look + up book information by ISBN.","input_schema":{"properties":{"isbn":{"title":"Isbn","type":"string"}},"required":["isbn"],"additionalProperties":false,"type":"object"}}],"stream":true,"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '1055' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-stream-helper: + - messages + x-stainless-timeout: + - NOT_GIVEN + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:streamRawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2SOy2rDMBBF9/4KM+sYZBPjoHUXpVAoIYtCKUJIQ6JGkVzNKH0E/3tlqKGmyzn3 + cO/gFQPL+oJE+oiKWCeurGYt6xvw14ggYRXCZrlB3uASLfqiGK+zxeak3Tk326ZvOtH1rRBt0Z2d + O+iorok/lWif928f6W78jk/hYXc4DPudvd8+FnE9V0CKfgaayJXtMG+bGLh8DPLldQPEcVQJNcUA + MmTvfxHhe8ZgcIF5edeFMbPieMZAIIdhKIXanFCZ0sIuBrU2xJKX2P7PYua/pOunqZ6q6gcAAP// + SoWEaUFmXjpaUCoogQSVgGoAAAAA//+CqoF6Jz4pJz85G3voY1ECCtS8lNQKiAOR5UGehOoryc/P + iS8tToXFAIhfCosD97A8n4LsSMOsDC9Lx6CigPDUggCTTKDSvMRckOb0VKCB+fnZQD+n5YOtA3oU + aDjQgzAA9AQAAAD//8LqCWCCKEnE7wmwEhRPQEQQjocEdRYwYuGKC4Aez0zMAQsCVSghXAJzDgAA + AP//GkjnVMcoZRYn5cWA4rgW1VkAAAAA//8aSGfFKBnompuZGusaGppbQBwGdBEAAAD//xpIF+lG + xCjVKtUCXQEAAAD//8KRBfILCOWA/AIkN6CGNQAAAP//SkUtzrD6CUVSCckPKMUJcv7BUqjUIpUq + aMWAmQlaAgAAAAD//0pFL2MxvYgsp4SkFQAAAP//AwBE1dlhnwUAAA== + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Content-Type: + - text/event-stream; charset=utf-8 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + cache-control: + - no-cache + date: + - Wed, 29 Oct 2025 13:14:11 GMT + request-id: + - req_vrtx_011CUbYr799DZVhf3GKddvaj + server: + - hypercorn-h11 + x-accel-buffering: + - 'no' + x-vertex-ai-received-request-id: + - 281f25a7-423f-4142-9e61-33d78b97c697 + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please look up + the book with ISBN 0-7653-1178-X and provide detailed info and a recommendation + score"},{"role":"assistant","content":[{"type":"tool_use","id":"toolu_vrtx_01GVnLpkY1jhJ9ARrPWepP4i","name":"get_book_info","input":{"isbn":"0-7653-1178-X"}}]},{"role":"user","content":[{"type":"tool_result","tool_use_id":"toolu_vrtx_01GVnLpkY1jhJ9ARrPWepP4i","content":"Title: + Mistborn: The Final Empire, Author: Brandon Sanderson, Pages: 544, Published: + 2006-07-25"}]}],"system":"Respond only with valid JSON that matches this exact + schema:\n{\n \"properties\": {\n \"title\": {\n \"title\": \"Title\",\n \"type\": + \"string\"\n },\n \"author\": {\n \"title\": \"Author\",\n \"type\": + \"string\"\n },\n \"pages\": {\n \"title\": \"Pages\",\n \"type\": + \"integer\"\n },\n \"publication_year\": {\n \"title\": \"Publication + Year\",\n \"type\": \"integer\"\n }\n },\n \"required\": [\n \"title\",\n \"author\",\n \"pages\",\n \"publication_year\"\n ],\n \"title\": + \"BookSummary\",\n \"type\": \"object\"\n}","tools":[{"name":"get_book_info","description":"Look + up book information by ISBN.","input_schema":{"properties":{"isbn":{"title":"Isbn","type":"string"}},"required":["isbn"],"additionalProperties":false,"type":"object"}}],"stream":true,"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '1418' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-stream-helper: + - messages + x-stainless-timeout: + - NOT_GIVEN + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:streamRawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2SOwWr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5+eqWegmcJyHlIpRoAAAD//6JzKKUWZCYrpAE7M4nF + lQp5+WXA7hNGxAEAAAD//6Kzk9KAfZ/SInB3BGI/AAAA//+id1s7D625CAAAAP//one2zispwowE + AAAAAP//oq8jQC2uVIXcxHRg6iiuLC5JzVVIgvWVcoENgRxEggUAAAD//6Kvw3TB7Q8AAAAA//+i + r51JpUV5sOSIEicAAAAA//+ic8LQAPsdAAAA//+ir6WOOWgFAtAFAAAAAP//oq8L8nMT85IrNYHZ + MkUhEWhpbkFqTg4wOhSKS/KLKhXy08ChAgAAAP//onNUFKWW5eeUorZHAQAAAP//oncxlZ6YmYeo + +IEOAAAAAP//ons5qZCZm5tfVAJpjgEAAAD//6Kv7cDWV0klOOYBAAAA//+ir73Axk2JHqQ17J0K + cQAAAAD//xqQflgxtB0OAAAA//+ir+Xg9reugpaWT2peekkG6igBAAAA//+iu1NAowQK4OEKaNEI + AAAA//+icxKEeB9oLwAAAP//onMKKC5NAo8/ZwIzAWgkWBMSJwGgkZLijFRoygAAAAD//6Jz2xYU + H6jpAQAAAP//oq8DQAM0kHBwT80Dj/gBnQAAAAD//6J/knQFtafdIO1piBsAAAAA//8aiI466oiB + QnByflGqFTRdAAAAAP//onNitdTH0jUFAAAA//+irxsMDcDDBnkhGcAec2YxeicQAAAA//+if7WZ + WpEMbMMATVJIzsjPTEYfngYAAAD//6J3fyu/CNYDhJdoAAAAAP//ontzKhHUV1dU8EhFHayHuAYA + AAD//6Kva4Ad8vKMSiukhhUAAAD//6J/Fn40pxVYkqHnHJBbAAAAAP//oq9bgkuKUlF6PkAXAAAA + AP//oq8LSjKKoa0Oz7y8/DJggVaWitJFB7oIAAAA//+i9zBOeSqsVwS0HAAAAP//onP/NwVoX05+ + AbArjtI718jPS8XoqAEAAAD//6JzLgZ1xZCtBwAAAP//GsABP/QRFKBrAAAAAP//onPjMCU1N7Eo + uxjcNnNGdFqTMxKLEpNLUouQihcAAAAA//+iczhBU1AuqP4BdaqLUnPAzYTijMyCYiRnAQAAAP// + onepp6sALG3ygWFUkJNfolCeidK/ALsIAAAA//+i99gorJpGnnUDAAAA//+isxsKEpNByaYkI7EE + I0UDAAAA//+is1OyU1MLihUq80sVgFUCsNeVAoqykIxU1EwPAAAA//8agFkHbNUkAAAA//+id5cM + 2B9LKUZOJwAAAAD//6KzA1CqJAAAAAD//6J3uZ+nkFlSrJBfngdsOIGniEGOAAAAAP//onvlk5Za + lIneVgEAAAD//6J32x6z7QoAAAD//6J3QgQW5cVpleAyAzLHBIkNAAAAAP//GoDCPBHLHCAAAAD/ + /6JzSw3WHCgoyi+GrFwAAAAA//+i/xRtck5qImZrBAAAAP//onunMwU0CZpaXJyZlIO6kg0AAAD/ + /xqAzs2sBe939AP7N87ARkdmCkpbCAAAAP//onf8pGGmUQAAAAD//6L7oBG2+gsAAAD//6J/fo0E + V+xZ+ZXYnAMAAAD//6JztIBmeXJSK+AT0+X5RTkpsHlyoHMAAAAA//+id4cP3NWCTUcDAAAA//+i + d4kO7uAVw6IoJzMbywgJAAAA//+id/wg92KA1gMAAAD//6J3H7goE2ihQl5iURF6sxgSHAAAAAD/ + /6LzZHlZajG4v6KQmpsP6kkl5iC3BAEAAAD//6J7966gJAOWWjISy1BLewAAAAD//6KzY0oyc1PB + A4yJCqC1+ejrGkAuAgAAAP//onO/vCQ1p1IhBzx9VQnL0QAAAAD//6L3gCvyYCssGAAAAAD//6Kz + GzCW+gCdAAAAAP//Gpg6J7GgoCg1ORO03iQFtsQU5iIAAAAA//+i+8AeqJ7RTSrNzEnBuuADAAAA + //8aiLmc8Ix8lBwMAAAA//+id/WTkV+aA246AwAAAP//ondkgCYFgB1LLA0koGMAAAAA//+icyi4 + JeYBO7hpWLIu3EUAAAAA//+ir4t0sIQJAAAA//+id9meAe5UYTgDAAAA//+id0mWWg5thQAAAAD/ + /6K3//PR1roCnQAAAAD//xrAIW9g2ZWtA+no5VXCZgOATgIAAAD//6Kzk3Ly87Mxy06wSwAAAAD/ + /xqAec1EhfQi5LYYAAAA//+ic8OwALSrDrxEBVt4AAAAAP//onOruaS0KC+1CNJQhS4hScbqLgAA + AAD//6Kvu/SQ4wcAAAD//8Kx+zC/gNDmw/wCJIvBRgEAAAD//0pF3UqK1f0okkpI7kXZyqmUmpcS + Dwo9JawbOmuRdnSibcE0NjNBbWIBAAAA//9CcxQ2nyHLKaFGDAAAAP//AwAbKAU9HjsAAA== + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Content-Type: + - text/event-stream; charset=utf-8 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + cache-control: + - no-cache + date: + - Wed, 29 Oct 2025 13:14:11 GMT + request-id: + - req_vrtx_011CUbYrAJ9mFFQk5iDSthby + server: + - hypercorn-h11 + x-accel-buffering: + - 'no' + x-vertex-ai-received-request-id: + - 301b989c-4e5c-4082-b41c-9f29d2994add + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_structured_output_with_tools/json/anthropic-vertex_claude_haiku_4_5@20251001/sync.yaml b/python/tests/e2e/output/cassettes/test_structured_output_with_tools/json/anthropic-vertex_claude_haiku_4_5@20251001/sync.yaml new file mode 100644 index 000000000..e5105a0f5 --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_structured_output_with_tools/json/anthropic-vertex_claude_haiku_4_5@20251001/sync.yaml @@ -0,0 +1,244 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/cloud-platform + https://www.googleapis.com/auth/userinfo.email openid https://www.googleapis.com/auth/sqlservice.login", + "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:13:50 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please look up + the book with ISBN 0-7653-1178-X and provide detailed info and a recommendation + score"}],"system":"Respond only with valid JSON that matches this exact schema:\n{\n \"properties\": + {\n \"title\": {\n \"title\": \"Title\",\n \"type\": \"string\"\n },\n \"author\": + {\n \"title\": \"Author\",\n \"type\": \"string\"\n },\n \"pages\": + {\n \"title\": \"Pages\",\n \"type\": \"integer\"\n },\n \"publication_year\": + {\n \"title\": \"Publication Year\",\n \"type\": \"integer\"\n }\n },\n \"required\": + [\n \"title\",\n \"author\",\n \"pages\",\n \"publication_year\"\n ],\n \"title\": + \"BookSummary\",\n \"type\": \"object\"\n}","tools":[{"name":"get_book_info","description":"Look + up book information by ISBN.","input_schema":{"properties":{"isbn":{"title":"Isbn","type":"string"}},"required":["isbn"],"additionalProperties":false,"type":"object"}}],"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '1041' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2WP3WoCMRCF3yXXG0js/ljvWqSF9kaxUqGUkN0d17Axo05SKrLv3kRYqHg3OefM + dzIXtscWLJuxxurQAt9p0wee84JPxKSQQkiWMdPGwJ469XPyv0rI9XKRuyktqvVH917Ol49HeD1v + Y9CfD5CiQKQ7iMIJbRI0kSGvnY9Sg85DnGZflzHvEa0KBGNVeoexbHE2b6un/iWY4nO13dDyuZ7L + 9Cun92m5A69qxF4Zt8VEcIcQ6RdmqHbRF7wqiwcuZTXlGzYM3xkjjwd1Ak3obtuvBsExgGsi2wVr + MxautyRgIiuPPThis6qq4jG62YFqIssbdOo2IUY/2u29h8H/V8p8GP4A4yJ3xo8BAAA= + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:13:50 GMT + request-id: + - req_vrtx_011CUbYpbcbs9s6Y7VcY32a1 + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please look up + the book with ISBN 0-7653-1178-X and provide detailed info and a recommendation + score"},{"role":"assistant","content":[{"id":"toolu_vrtx_01PyiJSAkFui5WSfXsQBbD11","input":{"isbn":"0-7653-1178-X"},"name":"get_book_info","type":"tool_use"}]},{"role":"user","content":[{"type":"tool_result","tool_use_id":"toolu_vrtx_01PyiJSAkFui5WSfXsQBbD11","content":"Title: + Mistborn: The Final Empire, Author: Brandon Sanderson, Pages: 544, Published: + 2006-07-25"}]}],"system":"Respond only with valid JSON that matches this exact + schema:\n{\n \"properties\": {\n \"title\": {\n \"title\": \"Title\",\n \"type\": + \"string\"\n },\n \"author\": {\n \"title\": \"Author\",\n \"type\": + \"string\"\n },\n \"pages\": {\n \"title\": \"Pages\",\n \"type\": + \"integer\"\n },\n \"publication_year\": {\n \"title\": \"Publication + Year\",\n \"type\": \"integer\"\n }\n },\n \"required\": [\n \"title\",\n \"author\",\n \"pages\",\n \"publication_year\"\n ],\n \"title\": + \"BookSummary\",\n \"type\": \"object\"\n}","tools":[{"name":"get_book_info","description":"Look + up book information by ISBN.","input_schema":{"properties":{"isbn":{"title":"Isbn","type":"string"}},"required":["isbn"],"additionalProperties":false,"type":"object"}}],"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '1404' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/31U0W4bNxD8lcW9BBAkV3bt1Lm3uInbtAkS1EH9UBUy7251R5tHXpekpIPhf++Q + J9UOAvRJJ3K4nJmd5WPRu4ZNURa1UbHhRaf0Q1ycLy4WZ8uzi9Pl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frPObp + WfsWsTzuJ67f77kYXq78eLZ8evoXohPV23wGAAA= + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:13:53 GMT + request-id: + - req_vrtx_011CUbYpeaCYTJDDsJNwNKha + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_structured_output_with_tools/tool/anthropic-vertex_claude_haiku_4_5@20251001/async.yaml b/python/tests/e2e/output/cassettes/test_structured_output_with_tools/tool/anthropic-vertex_claude_haiku_4_5@20251001/async.yaml new file mode 100644 index 000000000..e8428a4e2 --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_structured_output_with_tools/tool/anthropic-vertex_claude_haiku_4_5@20251001/async.yaml @@ -0,0 +1,227 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/cloud-platform + https://www.googleapis.com/auth/userinfo.email openid https://www.googleapis.com/auth/sqlservice.login", + "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:14:04 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please look up + the book with ISBN 0-7653-1178-X and provide detailed info and a recommendation + score"}],"system":"Always respond to the user''s query using the __mirascope_formatted_output_tool__ + tool for structured output.","tool_choice":{"type":"any"},"tools":[{"name":"get_book_info","description":"Look + up book information by ISBN.","input_schema":{"properties":{"isbn":{"title":"Isbn","type":"string"}},"required":["isbn"],"additionalProperties":false,"type":"object"}},{"name":"__mirascope_formatted_output_tool__","description":"Use + this tool to extract data in BookSummary format for a final response.","input_schema":{"properties":{"title":{"title":"Title","type":"string"},"author":{"title":"Author","type":"string"},"pages":{"title":"Pages","type":"integer"},"publication_year":{"title":"Publication + Year","type":"integer"}},"required":["title","author","pages","publication_year"],"additionalProperties":false,"type":"object"}}],"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '1038' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AsyncAnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2WPy26DMBBF/8XrWMIkEMS63aSPXVuqqrIcmCYOxgOMXdFE/HvtSEiNuvPce3xG + c2EdNmBYyWqjfAP8qHTr+YZnPE3STCSJYCummwB0dJDfo5tkInbV41idjnftkzj1tH8+D1VfUwDd + Tw8RBSJ1gBCMaGKgiDQ5ZV2IarQOwqv8uCy8QzTSEyyr4uyXZUX+ii8gprepex/uh7Tars8PRUCt + 6uLnAzi5R2yltl8YDbb3wX5hmvY29Anf5tmaC7EteMXm+XPFyGEvR1CE9nb7tSAYPNg6uK03ZsX8 + 9ZYojGbpsAVLrCzyNByj6iPIOricRitviWTpQ93879C7v8mmmOdfhYO8Go8BAAA= + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:14:05 GMT + request-id: + - req_vrtx_011CUbYqfP6X8e4hPqnTBJQb + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please look up + the book with ISBN 0-7653-1178-X and provide detailed info and a recommendation + score"},{"role":"assistant","content":[{"id":"toolu_vrtx_0186VoUe1xWxmYqEq2X73zK8","input":{"isbn":"0-7653-1178-X"},"name":"get_book_info","type":"tool_use"}]},{"role":"user","content":[{"type":"tool_result","tool_use_id":"toolu_vrtx_0186VoUe1xWxmYqEq2X73zK8","content":"Title: + Mistborn: The Final Empire, Author: Brandon Sanderson, Pages: 544, Published: + 2006-07-25"}]}],"system":"Always respond to the user''s query using the __mirascope_formatted_output_tool__ + tool for structured output.","tool_choice":{"type":"any"},"tools":[{"name":"get_book_info","description":"Look + up book information by ISBN.","input_schema":{"properties":{"isbn":{"title":"Isbn","type":"string"}},"required":["isbn"],"additionalProperties":false,"type":"object"}},{"name":"__mirascope_formatted_output_tool__","description":"Use + this tool to extract data in BookSummary format for a final response.","input_schema":{"properties":{"title":{"title":"Title","type":"string"},"author":{"title":"Author","type":"string"},"pages":{"title":"Pages","type":"integer"},"publication_year":{"title":"Publication + Year","type":"integer"}},"required":["title","author","pages","publication_year"],"additionalProperties":false,"type":"object"}}],"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '1401' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AsyncAnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2VQy07DMBD8lcjnRnLSBzTHCnoo4YB4tULIcpxtY+rYwQ/aUuXf2QQFqeLk9czs + zuyeSW1KUCQjQvFQQlxxuQ/xJJ7GKU2nCaUJGRFZoqB2O/Zl/ZHRZJkf9i+bu1We+EUqjvl8JV+L + GoX+1EAnBef4DhCwRnUAd046z7VHSBjtAavs7TzovTGKBQeDVfcPg9nNeLOdre3643D6ls8PxVUz + FnmDUs3rrpmxWlruhGmAbY2tufdQMhN8EzzrJ7NursYvydBS+j7SPQYqjNVZ9FRBtJSaq+i2bqTt + UvDgK2NRtbBcl0ZHj/iAdUYj2eBqjmTTyQTrUCgpuJdGsxNwbEkpnbXt+4g4bxpmgXdNFyv2hIPP + AFpgEh2UGpHQHwzz9UEx9x40msxn13gxLipgAmf1PpcKOvBIl/+5vzv8Igmdt+0PAd6HYPUBAAA= + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:14:06 GMT + request-id: + - req_vrtx_011CUbYqj1sykR552oFmwpXA + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_structured_output_with_tools/tool/anthropic-vertex_claude_haiku_4_5@20251001/async_stream.yaml b/python/tests/e2e/output/cassettes/test_structured_output_with_tools/tool/anthropic-vertex_claude_haiku_4_5@20251001/async_stream.yaml new file mode 100644 index 000000000..2d0d3cd40 --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_structured_output_with_tools/tool/anthropic-vertex_claude_haiku_4_5@20251001/async_stream.yaml @@ -0,0 +1,253 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/sqlservice.login + https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/userinfo.email + openid", "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:14:25 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please look up + the book with ISBN 0-7653-1178-X and provide detailed info and a recommendation + score"}],"system":"Always respond to the user''s query using the __mirascope_formatted_output_tool__ + tool for structured output.","tools":[{"name":"get_book_info","description":"Look + up book information by ISBN.","input_schema":{"properties":{"isbn":{"title":"Isbn","type":"string"}},"required":["isbn"],"additionalProperties":false,"type":"object"}},{"name":"__mirascope_formatted_output_tool__","description":"Use + this tool to extract data in BookSummary format for a final response.","input_schema":{"properties":{"title":{"title":"Title","type":"string"},"author":{"title":"Author","type":"string"},"pages":{"title":"Pages","type":"integer"},"publication_year":{"title":"Publication + Year","type":"integer"}},"required":["title","author","pages","publication_year"],"additionalProperties":false,"type":"object"}}],"tool_choice":{"type":"any"},"stream":true,"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '1052' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AsyncAnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-stream-helper: + - messages + x-stainless-timeout: + - NOT_GIVEN + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:streamRawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2SOQUvEMBCF7/0VZc5bSIu7aI6FvXkQVARFQkyHNmya1MxkcVn6303BisW5zfce + 7z08o2dZjkike1TEOnLRadayvAJfJgQJGxF26w/yCmPo0GWLcTp1WA3anlJ1U+2rRjT7Wog62223 + ZFCvzpG/lKjb+8fx42BTe3k6NvHltR7654c2G7d1GcTgFqCJbO72S7cJnvNikG/vOyAOk4qoKXiQ + Pjn3gwg/E3qDK0zrXOunxIrDCT2BvD00OVCbAZXJKWyDV1uHWPUsd/+1kPgvuZvn8vfmovgGAAD/ + /0qFhG1BZl46WpAqKIEElYBqAAAAAP//gqqBeis+KSc/ORt7LGBRAgrcvJTUCohDkeVBnoXqK8nP + z4kvLU6FxQSIXwqLC7+ilKSC5PQS04Ik98wi7+wkC7e81CCg0rzEXJDm9FSggfn52UC/p+WDrQN6 + GGg4zKdAHwAAAAD//8LqA2CqKEnE7wOwEhQfQEQQLoeEdxYwduGKC4C+zkzMAQsCVSghBTjILQAA + AAD//xpIt1THKGUWJ+XFAGM3RslAF8VpENcBAAAA//8aSNeZm5ka6xoamlvoRsQo1YIcB3QQAAAA + ///CkfjyCwilvfwCJOcoYHgUAAAA//9KRS1UsHoRRVIJyUsomRo59WLJ2rVIeRstM5pYIJIoAAAA + //9KRS/kMH2ILKeE7BcAAAAA//8DAICgTtAhBQAA + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Content-Type: + - text/event-stream; charset=utf-8 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + cache-control: + - no-cache + date: + - Wed, 29 Oct 2025 13:14:26 GMT + request-id: + - req_vrtx_011CUbYsCNT6mktXoNqczbcw + server: + - hypercorn-h11 + x-accel-buffering: + - 'no' + x-vertex-ai-received-request-id: + - 859b700e-8418-4a33-9b60-fde7b33460d7 + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please look up + the book with ISBN 0-7653-1178-X and provide detailed info and a recommendation + score"},{"role":"assistant","content":[{"type":"tool_use","id":"toolu_vrtx_01Nrdbpcgt5pbGirKkb8FneR","name":"get_book_info","input":{"isbn":"0-7653-1178-X"}}]},{"role":"user","content":[{"type":"tool_result","tool_use_id":"toolu_vrtx_01Nrdbpcgt5pbGirKkb8FneR","content":"Title: + Mistborn: The Final Empire, Author: Brandon Sanderson, Pages: 544, Published: + 2006-07-25"}]}],"system":"Always respond to the user''s query using the __mirascope_formatted_output_tool__ + tool for structured output.","tools":[{"name":"get_book_info","description":"Look + up book information by ISBN.","input_schema":{"properties":{"isbn":{"title":"Isbn","type":"string"}},"required":["isbn"],"additionalProperties":false,"type":"object"}},{"name":"__mirascope_formatted_output_tool__","description":"Use + this tool to extract data in BookSummary format for a final response.","input_schema":{"properties":{"title":{"title":"Title","type":"string"},"author":{"title":"Author","type":"string"},"pages":{"title":"Pages","type":"integer"},"publication_year":{"title":"Publication + Year","type":"integer"}},"required":["title","author","pages","publication_year"],"additionalProperties":false,"type":"object"}}],"tool_choice":{"type":"any"},"stream":true,"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '1415' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AsyncAnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-stream-helper: + - messages + x-stainless-timeout: + - NOT_GIVEN + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:streamRawPredict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geg1ZTglZLwAAAP//AwBE + 4tXA7AwAAA== + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Content-Type: + - text/event-stream; charset=utf-8 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + cache-control: + - no-cache + date: + - Wed, 29 Oct 2025 13:14:27 GMT + request-id: + - req_vrtx_011CUbYsG9uMBYEpFswQnpkj + server: + - hypercorn-h11 + x-accel-buffering: + - 'no' + x-vertex-ai-received-request-id: + - 54bedb63-449a-424d-9176-053fb5abdc55 + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_structured_output_with_tools/tool/anthropic-vertex_claude_haiku_4_5@20251001/stream.yaml b/python/tests/e2e/output/cassettes/test_structured_output_with_tools/tool/anthropic-vertex_claude_haiku_4_5@20251001/stream.yaml new file mode 100644 index 000000000..7b4653353 --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_structured_output_with_tools/tool/anthropic-vertex_claude_haiku_4_5@20251001/stream.yaml @@ -0,0 +1,255 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "openid + https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/sqlservice.login + https://www.googleapis.com/auth/userinfo.email", "token_type": "Bearer", "id_token": + ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:14:15 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please look up + the book with ISBN 0-7653-1178-X and provide detailed info and a recommendation + score"}],"system":"Always respond to the user''s query using the __mirascope_formatted_output_tool__ + tool for structured output.","tools":[{"name":"get_book_info","description":"Look + up book information by ISBN.","input_schema":{"properties":{"isbn":{"title":"Isbn","type":"string"}},"required":["isbn"],"additionalProperties":false,"type":"object"}},{"name":"__mirascope_formatted_output_tool__","description":"Use + this tool to extract data in BookSummary format for a final response.","input_schema":{"properties":{"title":{"title":"Title","type":"string"},"author":{"title":"Author","type":"string"},"pages":{"title":"Pages","type":"integer"},"publication_year":{"title":"Publication + Year","type":"integer"}},"required":["title","author","pages","publication_year"],"additionalProperties":false,"type":"object"}}],"tool_choice":{"type":"any"},"stream":true,"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '1052' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-stream-helper: + - messages + x-stainless-timeout: + - NOT_GIVEN + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:streamRawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2SOT0vEMBDF7/0UJectpGXXP7mquAgKguBBJIRk2IbNTrqZSVGWfndTsGBxbvN7 + j/cejICs6hMQmQNoYpO4coaNqi+CvwcQSqxEsVl+oS7iFB2EYrHBZAdNb/wxN9tm13Sy27VStsXu + 3ZxBBz0m/tKyfXav+5fuuk9vD/1de74fHp9wfC/GdV0BKYYZGCJfunHuthG5LBbq43MjiOOgExiK + KBTmEH4RwTkDWlhgXuZ6HDJrjkdAEurmqiuBxvagbUlhH1GvHXLRi+z+azHzX3I7TfXqpqr6AQAA + //9KhYRvQWZeOlqwKiiBBJWAagAAAAD//4KqgXotPiknPzkbe0xgUQIK4LyU1AqIY5HlQR6G6ivJ + z8+JLy1OhcUGiF8Kiw/zwvSsQtek0kwTkyDjwqxCp8jwqowgoNK8xFyQ5vRUoIH5+dlA/6flg60D + ehpoOMS3QPcDAAAA///C6n5guihJxO9+sBIU90NEEO6GhHgWMH7higuAfs5MzAELAlUo1SIFNgAA + AP//GkiHVMcoZSrVosQ9AAAA//8aSOcUJ+Up1aKlRQAAAAD//xpI98QAE3yMkgGqm0COAgAAAP// + GkhH6ZqbmRrrGhqaW+hGoMUdAAAA//8a2LCqVYLlLQAAAAD//8JRNuQXECoa8guQXAE0CAAAAP// + SkUt6LF6BUVSCcnpKAUtcmmCpbitRSpv0QpIE4takJ8AAAAA//9KRa9zMH2DLKeElmIAAAAA//8D + ANDZ7wmzBgAA + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Content-Type: + - text/event-stream; charset=utf-8 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + cache-control: + - no-cache + date: + - Wed, 29 Oct 2025 13:14:16 GMT + request-id: + - req_vrtx_011CUbYrSUF1q8oQaaRPh99J + server: + - hypercorn-h11 + x-accel-buffering: + - 'no' + x-vertex-ai-received-request-id: + - f56dbe93-7f55-4973-b20b-39e1342729c9 + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please look up + the book with ISBN 0-7653-1178-X and provide detailed info and a recommendation + score"},{"role":"assistant","content":[{"type":"tool_use","id":"toolu_vrtx_017qgjqEbui44R3qjqBYWzhR","name":"get_book_info","input":{"isbn":"0-7653-1178-X"}}]},{"role":"user","content":[{"type":"tool_result","tool_use_id":"toolu_vrtx_017qgjqEbui44R3qjqBYWzhR","content":"Title: + Mistborn: The Final Empire, Author: Brandon Sanderson, Pages: 544, Published: + 2006-07-25"}]}],"system":"Always respond to the user''s query using the __mirascope_formatted_output_tool__ + tool for structured output.","tools":[{"name":"get_book_info","description":"Look + up book information by ISBN.","input_schema":{"properties":{"isbn":{"title":"Isbn","type":"string"}},"required":["isbn"],"additionalProperties":false,"type":"object"}},{"name":"__mirascope_formatted_output_tool__","description":"Use + this tool to extract data in BookSummary format for a final response.","input_schema":{"properties":{"title":{"title":"Title","type":"string"},"author":{"title":"Author","type":"string"},"pages":{"title":"Pages","type":"integer"},"publication_year":{"title":"Publication + Year","type":"integer"}},"required":["title","author","pages","publication_year"],"additionalProperties":false,"type":"object"}}],"tool_choice":{"type":"any"},"stream":true,"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '1415' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-stream-helper: + - messages + x-stainless-timeout: + - NOT_GIVEN + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:streamRawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2SOwWrDMBBE7/4Ko3MMstOkre5pc86hl1KEkLaJsLJyvCtTE/zvlaGGmO5t3wwz + AwMgq/IKROYMmtj0XDjDRpV3wWMHQomVKDbLL9RdXKODkC02mOSguhjfpuqp2lWNbHa1lHW2ezdn + 0FkPPf9oWX8c9/4wNi28pxbftqfjAN+nMRvXdRn0MczAEPncjXO3jch5sVCfXxtBHDvdg6GIQmEK + 4Q8R3BKghQWmZa7HLrHm2AKSUK/7lxxo7AW0zSnsI+q1Qy56lt1/LSZ+JPXzNJUPNxXFLwAAAP// + SoUEb0FmXjpaqCoogQSVgGoAAAAA//9sUcsOQDAQ/Cxxd24kiOOmqhJlLX2Iz9fSioTjZmd25xEx + 0Rl0M4npv4gfSMh36eVxa33vg9/Is0QzOCNTGWF2qY4SldmU22tsRVNwwyrF8sxDF46BDICj5kbQ + KmEgjdxa2cNj3V+GS4Qf/ctPAicAAAD//8LqO2CiKUnE7zuwEhTfQUQQvoJERxYw8uGKC4AhkpmY + AxYEqlBCcQzYOQAAAAD//xpI51THKJVkluSkxgBjPwbhOKCrAAAAAP//GkhX+QLzVlK+Enq8AQAA + AP//GkgnFeVZKYRkpCq4wVwFdA8AAAD//xpI92TmJeaAnAJ0BgAAAP//GkhnKLjmggME6AwAAAAA + //8aSGcUZBalxqDnLaCbAAAAAP//Gkg36QAzVGJpSUZ+EShzIbsN6DAAAAAA//8aSIfFKDkVJeal + ANnQmAMAAAD//xrQBBQMdEpqUTFGZgcAAAD//xpIR+XngRIT0BEAAAAA//8a6PRTgBQsQOcAAAAA + //8aSOcAmyvF4DABAAAA//8a2KRrpWBqYoKWmQAAAAD//xrwWCpFr9VBrgIAAAD//xpIVyXlZCYn + lmDkKQAAAAD//xrQCgsoVQl0EdAZAAAAAP//GkhnpCZiFMeQsAEAAAD//xpIRxkZINwDdAoAAAD/ + /xpIpxiY1aK4BQAAAP//wtETyC8g1BHIL0ByCWpQAwAAAP//SkXt4GH1GYqkEpJPUDpYyN0ILN2s + WqR+FnrHyMAS0noCAAAA//9KRe9tYnoNWU4J5gkAAAAA//8DADD7cPumDgAA + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Content-Type: + - text/event-stream; charset=utf-8 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + cache-control: + - no-cache + date: + - Wed, 29 Oct 2025 13:14:16 GMT + request-id: + - req_vrtx_011CUbYrVUpEPZkSUdToKfT8 + server: + - hypercorn-h11 + x-accel-buffering: + - 'no' + x-vertex-ai-received-request-id: + - 610c9f26-060c-4e00-9aa3-ab8732c305d5 + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/cassettes/test_structured_output_with_tools/tool/anthropic-vertex_claude_haiku_4_5@20251001/sync.yaml b/python/tests/e2e/output/cassettes/test_structured_output_with_tools/tool/anthropic-vertex_claude_haiku_4_5@20251001/sync.yaml new file mode 100644 index 000000000..bffe44a43 --- /dev/null +++ b/python/tests/e2e/output/cassettes/test_structured_output_with_tools/tool/anthropic-vertex_claude_haiku_4_5@20251001/sync.yaml @@ -0,0 +1,227 @@ +interactions: +- request: + body: grant_type=refresh_token&client_id=764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com&client_secret=&refresh_token= + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '268' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.4 + x-goog-api-client: + - gl-python/3.10.15 auth/2.40.3 cred-type/u + method: POST + uri: https://oauth2.googleapis.com/token + response: + body: + string: '{"access_token": "", "expires_in": 3599, "scope": "https://www.googleapis.com/auth/cloud-platform + https://www.googleapis.com/auth/sqlservice.login openid https://www.googleapis.com/auth/userinfo.email", + "token_type": "Bearer", "id_token": ""}' + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Cache-Control: + - no-cache, no-store, max-age=0, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Wed, 29 Oct 2025 13:13:54 GMT + Expires: + - Mon, 01 Jan 1990 00:00:00 GMT + Pragma: + - no-cache + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please look up + the book with ISBN 0-7653-1178-X and provide detailed info and a recommendation + score"}],"system":"Always respond to the user''s query using the __mirascope_formatted_output_tool__ + tool for structured output.","tool_choice":{"type":"any"},"tools":[{"name":"get_book_info","description":"Look + up book information by ISBN.","input_schema":{"properties":{"isbn":{"title":"Isbn","type":"string"}},"required":["isbn"],"additionalProperties":false,"type":"object"}},{"name":"__mirascope_formatted_output_tool__","description":"Use + this tool to extract data in BookSummary format for a final response.","input_schema":{"properties":{"title":{"title":"Title","type":"string"},"author":{"title":"Author","type":"string"},"pages":{"title":"Pages","type":"integer"},"publication_year":{"title":"Publication + Year","type":"integer"}},"required":["title","author","pages","publication_year"],"additionalProperties":false,"type":"object"}}],"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '1038' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2WP0WrDMAxF/8XPNSRum5Y+jtGnUVjHWMYYxk201EsiZZU8Okr+fXYhsLI3697j + I3RRPdXQqY2qOhdq0Efn26AXeqlNZpZ5luVqpnwdgZ4b+32Ss83y+xIeXj69v6ufcS7u+HQ25WAi + KD8DJBSYXQMxOFGXAsfsWRxKjCpCgfjavF0mXog6GximVWkO07K9qQzuX3fnlQzbwnPbPJY7jii6 + Pn1uQOyBqLUePygZcAjRflGeDxj7TK+K5Vzn+WqtSzWO7zPFQoM9gWPC2+3XguErAFbRjaHrZipc + b0nCZLZCLSCrzbow8RhXHcFW0SWe0N4S2dTHuv7fUZC/yWI9jr/cNnWHjwEAAA== + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:13:55 GMT + request-id: + - req_vrtx_011CUbYpua6WxDbTNH9miP5e + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +- request: + body: '{"max_tokens":16000,"messages":[{"role":"user","content":"Please look up + the book with ISBN 0-7653-1178-X and provide detailed info and a recommendation + score"},{"role":"assistant","content":[{"id":"toolu_vrtx_01R2c2nRYNx7tpF6iskgQXNs","input":{"isbn":"0-7653-1178-X"},"name":"get_book_info","type":"tool_use"}]},{"role":"user","content":[{"type":"tool_result","tool_use_id":"toolu_vrtx_01R2c2nRYNx7tpF6iskgQXNs","content":"Title: + Mistborn: The Final Empire, Author: Brandon Sanderson, Pages: 544, Published: + 2006-07-25"}]}],"system":"Always respond to the user''s query using the __mirascope_formatted_output_tool__ + tool for structured output.","tool_choice":{"type":"any"},"tools":[{"name":"get_book_info","description":"Look + up book information by ISBN.","input_schema":{"properties":{"isbn":{"title":"Isbn","type":"string"}},"required":["isbn"],"additionalProperties":false,"type":"object"}},{"name":"__mirascope_formatted_output_tool__","description":"Use + this tool to extract data in BookSummary format for a final response.","input_schema":{"properties":{"title":{"title":"Title","type":"string"},"author":{"title":"Author","type":"string"},"pages":{"title":"Pages","type":"integer"},"publication_year":{"title":"Publication + Year","type":"integer"}},"required":["title","author","pages","publication_year"],"additionalProperties":false,"type":"object"}}],"anthropic_version":"vertex-2023-10-16"}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + authorization: + - + connection: + - keep-alive + content-length: + - '1401' + content-type: + - application/json + host: + - asia-east1-aiplatform.googleapis.com + user-agent: + - AnthropicVertex/Python 0.64.0 + x-stainless-arch: + - arm64 + x-stainless-lang: + - python + x-stainless-os: + - MacOS + x-stainless-package-version: + - 0.64.0 + x-stainless-read-timeout: + - '600' + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.10.15 + x-stainless-timeout: + - '600' + method: POST + uri: https://asia-east1-aiplatform.googleapis.com/v1/projects/mirascope-gemini/locations/asia-east1/publishers/anthropic/models/claude-haiku-4-5@20251001:rawPredict + response: + body: + string: !!binary | + H4sIAAAAAAAC/2VQy2rDMBD8FaNzDHIah8a3NjS3QMEltJQiZGkbi8iSo0eoG/zvXbm4EHrSamZ2 + Z3avpLMSNKmI0DxKyFuuTjFf5WW+pMuyoLQgC6IkCjp/ZBcXvhgt7uJmJ8vzMNSx6E/7w5t/XV+2 + KAxDD0kK3vMjIOCsTgD3XvnATUBIWBMAq+r9OuuDtZpFD7NV+sfZrH7YN/LQ1sehfJbdthG2KL8P + KDW8S82MdcpxL2wP7NO6jocAktkY+hjYNJmluQa/pEJLFaZIewzUWGeq7KWFbKcM19lT1yuXUvAY + WutQ9ei4kdZkNT7gvDVI9riaJ1W5WmEdG60ED8oaNgDHliWl63H8WBAfbM8c8NR0s+JEeDhHMAKT + mKj1gsTpYJhvCoq5T2DQZLO+x4tx0QITOGvyuVXQmUda/uf+7vCLFHQzjj8D4y/m9QEAAA== + headers: + Alt-Svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + Content-Encoding: + - gzip + Server: + - scaffolding on HTTPServer2 + Transfer-Encoding: + - chunked + Vary: + - Origin + - X-Origin + - Referer + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - '0' + content-type: + - application/json + date: + - Wed, 29 Oct 2025 13:13:55 GMT + request-id: + - req_vrtx_011CUbYpx4RXWVc2xtDaaCJx + x-vertex-ai-internal-prediction-backend: + - harpoon + status: + code: 200 + message: OK +version: 1 diff --git a/python/tests/e2e/output/snapshots/test_call/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py b/python/tests/e2e/output/snapshots/test_call/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py new file mode 100644 index 000000000..4b3290c57 --- /dev/null +++ b/python/tests/e2e/output/snapshots/test_call/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py @@ -0,0 +1,116 @@ +from inline_snapshot import snapshot + +from mirascope.llm import ( + AssistantMessage, + Text, + UserMessage, +) + +sync_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "params": {}, + "finish_reason": None, + "messages": [ + UserMessage(content=[Text(text="What is 4200 + 42?")]), + AssistantMessage( + content=[Text(text="4200 + 42 = 4242")], + provider="anthropic", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "citations": None, + "text": "4200 + 42 = 4242", + "type": "text", + } + ], + }, + ), + ], + "format": None, + "tools": [], + } + } +) +async_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "params": {}, + "finish_reason": None, + "messages": [ + UserMessage(content=[Text(text="What is 4200 + 42?")]), + AssistantMessage( + content=[Text(text="4200 + 42 = 4242")], + provider="anthropic", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "citations": None, + "text": "4200 + 42 = 4242", + "type": "text", + } + ], + }, + ), + ], + "format": None, + "tools": [], + } + } +) +stream_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "finish_reason": None, + "messages": [ + UserMessage(content=[Text(text="What is 4200 + 42?")]), + AssistantMessage( + content=[Text(text="4200 + 42 = 4242")], + provider="anthropic-vertex", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [{"type": "text", "text": "4200 + 42 = 4242"}], + }, + ), + ], + "format": None, + "tools": [], + "n_chunks": 4, + } + } +) +async_stream_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "finish_reason": None, + "messages": [ + UserMessage(content=[Text(text="What is 4200 + 42?")]), + AssistantMessage( + content=[Text(text="4200 + 42 = 4242")], + provider="anthropic-vertex", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [{"type": "text", "text": "4200 + 42 = 4242"}], + }, + ), + ], + "format": None, + "tools": [], + "n_chunks": 4, + } + } +) diff --git a/python/tests/e2e/output/snapshots/test_call_with_thinking_true/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py b/python/tests/e2e/output/snapshots/test_call_with_thinking_true/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py new file mode 100644 index 000000000..da76a2213 --- /dev/null +++ b/python/tests/e2e/output/snapshots/test_call_with_thinking_true/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py @@ -0,0 +1,735 @@ +from inline_snapshot import snapshot + +from mirascope.llm import ( + AssistantMessage, + Text, + Thought, + UserMessage, +) + +sync_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "params": {"thinking": False}, + "finish_reason": None, + "messages": [ + UserMessage( + content=[ + Text( + text="How many primes below 400 contain 79 as a substring? Answer ONLY with the number, not sharing which primes they are." + ) + ] + ), + AssistantMessage( + content=[ + Thought( + thought="""\ +I need to find all prime numbers below 400 that contain "79" as a substring. + +Let me think about numbers containing "79": +- 79 itself +- 179 +- 279 +- 379 +- 790 (but this is >= 400, and also has "79") +- 797 (but this is >= 400) + +Wait, let me be more systematic. I need to find all numbers below 400 that contain "79" as a substring. + +Two-digit numbers with 79: +- 79 + +Three-digit numbers with 79: +- Starting with 79: 790, 791, 792, ..., 799 (but these are >= 400, so none apply) +- 179, 279, 379 (where 79 is at the end) +- 179, 279, 379 + +Wait, I need to reconsider. Numbers below 400 that contain "79": +- 79 (two-digit) +- 179 (three-digit) +- 279 (three-digit) +- 379 (three-digit) + +Actually, let me think more carefully. For three-digit numbers ABC where we want "79" to appear: +- 79C: 790, 791, ..., 799 - but these are all >= 400, so none work +- A79: 179, 279, 379 - these are all < 400, so all work + +So the candidates are: 79, 179, 279, 379 + +Now let me check which are prime: +- 79: Is 79 prime? Yes, 79 is prime. +- 179: Is 179 prime? Let me check. √179 ≈ 13.4. I need to check divisibility by primes up to 13: 2, 3, 5, 7, 11, 13. + - Not even + - 1+7+9 = 17, not divisible by 3 + - Doesn't end in 0 or 5, so not divisible by 5 + - Testing 7, 11, and 13 all give non-integer results + - So 179 is prime. + +- 279: The digit sum is 18, which is divisible by 9, so 279 = 9 × 31. Not prime. + +- 379: Need to check if this is prime by testing divisibility by primes up to √379 ≈ 19.5. + - Not even, and digit sum of 19 rules out divisibility by 3 + - Testing 7, 11, 13, 17, and 19 all fail to divide evenly + - Therefore 379 is prime. + +The numbers containing "79" below 400 that are prime are 79, 179, and 379—three primes total. Let me verify I haven't missed any candidates. + +For "79" to appear as consecutive digits, I can have the two-digit number 79 itself, or three-digit numbers where "79" occupies positions 1-2 or 2-3. The first case (79C) gives 790-799, all exceeding 400. The second case (A79) with A from 1-3 gives 179, 279, and 379 below 400. So the complete set of numbers with "79" as a substring below 400 is 79, 179, 279, and 379. Among these, 279 = 9 × 31 is composite, leaving exactly three primes.\ +""" + ), + Text(text="3"), + ], + provider="anthropic", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "signature": "Eo4VCkgICRACGAIqQMR9TbGmAil3bbA3quDtOPvr/1Z7nF3+HYCR01P76Wk4FetMMHf0zAYtn2XWXGByvkq78+IzhLjI3SiNnb2MAH4SDHxwCogJF02poTDJ2BoMaT5hwzci77URnwh9IjAJK3HpFTnFRwLRDZxEmqRtvXvlUjlyOIPsGPY8re1lHPqOdSZrmSgBwagC5OqZtnEq8xO9A0njtVyi7BjdBiR5YlRwklsFYYhT8pd2zSblnyjuKK477kE4LpjZfCkznDg04l6Cos5pWsYkPiB3scbZqF7M2FYDUxQK3GUVVAP9/68sDUPjOnMiNB2tjH3yrkN1MN1RmDU2Un7Y9DKb3LWQWHuA7zLcBVMg8Kx+ftjTyWWFRZm3idL1kOUFdBUUUV9IggTFGMaA1C8gV3JxPqMXvN7cdtkQFPaISipJz+A5m78WgLujlFYfm9pNp3dJYW7alwhA70yB4LynruDcoPHx7EfEGrdHkpqqpUD4QyqUTyXfBGdTuX/Fo9128jl8NMaVq9YB/5SAhvWwAVAVInK8OB+NJd6Z4G+/1rJPkYaYDWTBxE/aKj9yLZ/oMwuamcYuOLrUDoHz8pAiQIngcauWrlBNL9604lmyftOYthUfv4e075asKQHKHq3Q9LMhOEJIUeTgotxAJp1aFh9L9rgVcKzMfDz1TDjxN27XrwCyftscJHBe+KKspx91kh0/QmXaWjDBcqGCqHGm3lJGcMRMdWz9XrLkkKhc1pkZ8t/vnDvRRHQ4cx+pZidiUala9rnkIdA+4L/yBkkuFydsW1TBk+Z3FiFEbxKDL62nMWzfjVicp7ztw/H/xojUT5p+xFOUX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O1Au/PLhBLyeWTJ/bdl9UdY9OYy7hA6a/MH9PaTD0HxhX6wEKA56/t79ToVPXxhINzkMX+YrUsojMrNwh2ujmF9esfx5e0a1wv0JIKCNBKiGHPoRuREZ+KAwymSleh3QvnBG/RQan8RZLq8EOA8feTahJP4CJMJs/EZQc1/Blv5mj7wSIvAdZSSGIFxDKcRoRd10OzMIN4hFMgIDVP3tcgoTNlRg3t2CaENFrGXeXhV+TkI07ZNcPpEjekDVSaZAyAlQSDdrx7ox1V42BPxSGCgMMRyuz3bRhBFQj2pazWTdHaumE99EFOr3COeitevcaJI5S+14J64UWpvAy5nNRjhxRdtMHQOVY2+EESdw1Wovhu4Y2PDGrML2XgFiXa/9gcBBH4rxn37p8nEm1tBsMc4Fo8LwhYPLRVmJRVlpq21L21nQUkFiwRcviZZrOHFr9VL2FF87HvTPaRm7OAho658F/HVcLr9obmpipRS5GPMn0Rqdl7Ovw0oYh1aKBiqL0OKo1LsfEaDNyBswwTLnekZOWjm6a56KdNw96E9cOxbJqWXT3lLyWRvPIdUuRziskCa6Alwe0aXWpWCG41/EYAQ==", + "thinking": """\ +I need to find all prime numbers below 400 that contain "79" as a substring. + +Let me think about numbers containing "79": +- 79 itself +- 179 +- 279 +- 379 +- 790 (but this is >= 400, and also has "79") +- 797 (but this is >= 400) + +Wait, let me be more systematic. I need to find all numbers below 400 that contain "79" as a substring. + +Two-digit numbers with 79: +- 79 + +Three-digit numbers with 79: +- Starting with 79: 790, 791, 792, ..., 799 (but these are >= 400, so none apply) +- 179, 279, 379 (where 79 is at the end) +- 179, 279, 379 + +Wait, I need to reconsider. Numbers below 400 that contain "79": +- 79 (two-digit) +- 179 (three-digit) +- 279 (three-digit) +- 379 (three-digit) + +Actually, let me think more carefully. For three-digit numbers ABC where we want "79" to appear: +- 79C: 790, 791, ..., 799 - but these are all >= 400, so none work +- A79: 179, 279, 379 - these are all < 400, so all work + +So the candidates are: 79, 179, 279, 379 + +Now let me check which are prime: +- 79: Is 79 prime? Yes, 79 is prime. +- 179: Is 179 prime? Let me check. √179 ≈ 13.4. I need to check divisibility by primes up to 13: 2, 3, 5, 7, 11, 13. + - Not even + - 1+7+9 = 17, not divisible by 3 + - Doesn't end in 0 or 5, so not divisible by 5 + - Testing 7, 11, and 13 all give non-integer results + - So 179 is prime. + +- 279: The digit sum is 18, which is divisible by 9, so 279 = 9 × 31. Not prime. + +- 379: Need to check if this is prime by testing divisibility by primes up to √379 ≈ 19.5. + - Not even, and digit sum of 19 rules out divisibility by 3 + - Testing 7, 11, 13, 17, and 19 all fail to divide evenly + - Therefore 379 is prime. + +The numbers containing "79" below 400 that are prime are 79, 179, and 379—three primes total. Let me verify I haven't missed any candidates. + +For "79" to appear as consecutive digits, I can have the two-digit number 79 itself, or three-digit numbers where "79" occupies positions 1-2 or 2-3. The first case (79C) gives 790-799, all exceeding 400. The second case (A79) with A from 1-3 gives 179, 279, and 379 below 400. So the complete set of numbers with "79" as a substring below 400 is 79, 179, 279, and 379. Among these, 279 = 9 × 31 is composite, leaving exactly three primes.\ +""", + "type": "thinking", + }, + {"citations": None, "text": "3", "type": "text"}, + ], + }, + ), + UserMessage( + content=[ + Text( + text="If you remember what the primes were, then share them, or say 'I don't remember.'" + ) + ] + ), + AssistantMessage( + content=[Text(text="I don't remember.")], + provider="anthropic", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "citations": None, + "text": "I don't remember.", + "type": "text", + } + ], + }, + ), + ], + "format": None, + "tools": [], + } + } +) +async_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "params": {"thinking": False}, + "finish_reason": None, + "messages": [ + UserMessage( + content=[ + Text( + text="How many primes below 400 contain 79 as a substring? Answer ONLY with the number, not sharing which primes they are." + ) + ] + ), + AssistantMessage( + content=[ + Thought( + thought="""\ +I need to find all prime numbers below 400 that contain "79" as a substring. + +Let me think about what numbers contain "79": +- Two-digit: 79 +- Three-digit: 179, 279, 379, 479, 579, 679, 779, 879, 979, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799 + +Since we're looking below 400, I need to check: +- 79 (two-digit) +- 179 +- 279 +- 379 +- 290-299 (no "79") +- 390-399 (no "79") + +Wait, let me reconsider. Numbers containing "79" as a substring below 400: +- 79 +- 179 +- 279 +- 379 +- 790, 791, 792, 793, 794, 795, 796, 797, 798, 799 (these are all ≥ 400, so not included) + +So the candidates are: 79, 179, 279, 379 + +Let me check if each is prime: + +79: Is 79 prime? \n\ +Check divisibility: 79/2 = 39.5, 79/3 = 26.33..., 79/5 = 15.8, 79/7 = 11.28... +√79 ≈ 8.9, so I need to check primes up to 8: 2, 3, 5, 7 +79 is odd, so not divisible by 2 +79/3: 7+9=16, not divisible by 3 +79 doesn't end in 0 or 5, so not divisible by 5 +79/7 = 11.28..., so not divisible by 7 +79 is prime ✓ + + +179: Is 179 prime? +√179 ≈ 13.4, so I need to check primes up to 13: 2, 3, 5, 7, 11, 13 +179 is odd, so not divisible by 2 +179: 1+7+9=17, not divisible by 3 +179 doesn't end in 0 or 5, so not divisible by 5 +179/7 = 25.57..., so not divisible by 7 +179/11 = 16.27..., so not divisible by 11 +179/13 = 13.77..., so not divisible by 13 +179 is prime ✓ + +279: Is 279 prime? +The digit sum 2+7+9=18 is divisible by 3, so 279 = 3 × 93 +279 is not prime ✗ + +379: Is 379 prime? +√379 ≈ 19.5, so I need to check primes up to 19: 2, 3, 5, 7, 11, 13, 17, 19 +379 is odd, so not divisible by 2 +379: 3+7+9=19, not divisible by 3 +379 doesn't end in 0 or 5, so not divisible by 5 +379/7 = 54.14..., so not divisible by 7 +379/11 = 34.45..., so not divisible by 11 +379/13 = 29.15..., so not divisible by 13 +379/17 = 22.29..., so not divisible by 17 +379/19 = 19.95..., so not divisible by 19 +379 is prime ✓ + +I should verify I haven't missed any numbers below 400 containing "79". The pattern _79 gives me 79, 179, 279, 379, and 479 would be next but that exceeds 400. + +So my complete list is: 79 (prime), 179 (prime), 279 (not prime—divisible by 3), and 379 (prime). + +Let me verify the primality more carefully. For 79, I need to check divisibility up to √79 ≈ 8.9, so testing 2, 3, 5, and 7 confirms it's prime. For 179, checking divisibility by small primes up to √179 ≈ 13.4 shows it's also prime. This gives me three primes containing "79" as a substring below 400. 22.29... (not divisible) +379 ÷ 19 = 19.94... (not divisible) +We only need to check up to √379 ≈ 19.47 +379 is prime ✓ + +So the answer is 3. + +Let me be more systematic about this. The numbers below 400 containing "79" are 79, 179, 279, and 379. I should verify there aren't any others—three-digit numbers would need "79" as consecutive digits, which only happens in those positions I've already checked. + +Testing primality: 79 and 179 are both prime, 279 factors as 3 × 93, and 379 is prime. That gives me three primes total.\ +""" + ), + Text(text="3"), + ], + provider="anthropic", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "signature": "EqwkCkgICRACGAIqQJjhhl25rZqZmgEMXCU8hS3PC8iJxkt0/3B/AXozrme0fL0G2jM8tH920dBglOFYoG8/l7WwfPbGOTnCbcbBzG8SDAzNqmemU579yWXgyRoM46+qaOd8s+zlsK1JIjBOTNNQz5Oe88t6/XdtaHwDPmVctMUxIrLiq5KPj9byT2AIhgXumRQ8NyRTXYH//gYqkSNOEYSMTRke0W7sV63fHSxWaQ++hskQubtmZc1H22Xb51Ka/jkNrKJJN/cdYRFteMw5p4poXmY4oLlX05ZnY+VScDgV4ftol5MDLYtbIcOiqdhqhEC5zIo+YKhUW03wZDnYKJua+KGbAkPs0YCdWCRt/TXB7xCBPSn2NgmVIkmNuaGGYUcaye4GwIrZoo+CVvdAxbAGd9dQqXTYjr0NLVZ+3YZvB4n/zOWM0N0TCHhVGk9gD4Eqqrn4t8ylfSo+lcubnMUiB8D+52vMogObvvAO0FdvM+3zuDeEJhBuru7v14qweuw2T07nwQIL8mOVJ0Uk1N2U32L3DTG6FBrEP//PZxBwwbzXv4RjuvEl1WmeWnZMcbsQBDB2LsuRZMEN90qBZOY6FKLPqKW+1ZbD5VpxNWv6O+xhvwAvS4H9c1jeq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Qi7mPzjwy4+5fBA3mgtpBpuGl6onU0Vaumux1QnQtSECdC0ggln/UNfKSB1TXvXDXCeNieGoGQG4MzKlCjSEZJG0NiHZRIE3VeU/C5rjT5IM9e2fwEngSd6lXTXp8bQIOH769ktUraYzVGiqSxUSotg3UYAQ==", + "thinking": """\ +I need to find all prime numbers below 400 that contain "79" as a substring. + +Let me think about what numbers contain "79": +- Two-digit: 79 +- Three-digit: 179, 279, 379, 479, 579, 679, 779, 879, 979, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799 + +Since we're looking below 400, I need to check: +- 79 (two-digit) +- 179 +- 279 +- 379 +- 290-299 (no "79") +- 390-399 (no "79") + +Wait, let me reconsider. Numbers containing "79" as a substring below 400: +- 79 +- 179 +- 279 +- 379 +- 790, 791, 792, 793, 794, 795, 796, 797, 798, 799 (these are all ≥ 400, so not included) + +So the candidates are: 79, 179, 279, 379 + +Let me check if each is prime: + +79: Is 79 prime? \n\ +Check divisibility: 79/2 = 39.5, 79/3 = 26.33..., 79/5 = 15.8, 79/7 = 11.28... +√79 ≈ 8.9, so I need to check primes up to 8: 2, 3, 5, 7 +79 is odd, so not divisible by 2 +79/3: 7+9=16, not divisible by 3 +79 doesn't end in 0 or 5, so not divisible by 5 +79/7 = 11.28..., so not divisible by 7 +79 is prime ✓ + + +179: Is 179 prime? +√179 ≈ 13.4, so I need to check primes up to 13: 2, 3, 5, 7, 11, 13 +179 is odd, so not divisible by 2 +179: 1+7+9=17, not divisible by 3 +179 doesn't end in 0 or 5, so not divisible by 5 +179/7 = 25.57..., so not divisible by 7 +179/11 = 16.27..., so not divisible by 11 +179/13 = 13.77..., so not divisible by 13 +179 is prime ✓ + +279: Is 279 prime? +The digit sum 2+7+9=18 is divisible by 3, so 279 = 3 × 93 +279 is not prime ✗ + +379: Is 379 prime? +√379 ≈ 19.5, so I need to check primes up to 19: 2, 3, 5, 7, 11, 13, 17, 19 +379 is odd, so not divisible by 2 +379: 3+7+9=19, not divisible by 3 +379 doesn't end in 0 or 5, so not divisible by 5 +379/7 = 54.14..., so not divisible by 7 +379/11 = 34.45..., so not divisible by 11 +379/13 = 29.15..., so not divisible by 13 +379/17 = 22.29..., so not divisible by 17 +379/19 = 19.95..., so not divisible by 19 +379 is prime ✓ + +I should verify I haven't missed any numbers below 400 containing "79". The pattern _79 gives me 79, 179, 279, 379, and 479 would be next but that exceeds 400. + +So my complete list is: 79 (prime), 179 (prime), 279 (not prime—divisible by 3), and 379 (prime). + +Let me verify the primality more carefully. For 79, I need to check divisibility up to √79 ≈ 8.9, so testing 2, 3, 5, and 7 confirms it's prime. For 179, checking divisibility by small primes up to √179 ≈ 13.4 shows it's also prime. This gives me three primes containing "79" as a substring below 400. 22.29... (not divisible) +379 ÷ 19 = 19.94... (not divisible) +We only need to check up to √379 ≈ 19.47 +379 is prime ✓ + +So the answer is 3. + +Let me be more systematic about this. The numbers below 400 containing "79" are 79, 179, 279, and 379. I should verify there aren't any others—three-digit numbers would need "79" as consecutive digits, which only happens in those positions I've already checked. + +Testing primality: 79 and 179 are both prime, 279 factors as 3 × 93, and 379 is prime. That gives me three primes total.\ +""", + "type": "thinking", + }, + {"citations": None, "text": "3", "type": "text"}, + ], + }, + ), + UserMessage( + content=[ + Text( + text="If you remember what the primes were, then share them, or say 'I don't remember.'" + ) + ] + ), + AssistantMessage( + content=[Text(text="I don't remember.")], + provider="anthropic", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "citations": None, + "text": "I don't remember.", + "type": "text", + } + ], + }, + ), + ], + "format": None, + "tools": [], + } + } +) +stream_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "finish_reason": None, + "messages": [ + UserMessage( + content=[ + Text( + text="How many primes below 400 contain 79 as a substring? Answer ONLY with the number, not sharing which primes they are." + ) + ] + ), + AssistantMessage( + content=[ + Thought( + thought="""\ +I need to find all prime numbers below 400 that contain "79" as a substring. + +Let me think about which numbers below 400 contain "79": +- 79 (two-digit) +- 179 +- 279 +- 379 +- 790-799 (but these are all above 400, wait no, 790+ is above 400) + +Actually, let me reconsider. Numbers below 400 that contain "79": +- 79 (in the ones and tens place) +- 179 (79 in the last two digits) +- 279 (79 in the last two digits) +- 379 (79 in the last two digits) +- 790 and above would be above 400, so we don't consider those + +Wait, I need to be more careful. Let me think about all positions where "79" can appear in a number below 400: + +For 2-digit numbers: 79 +For 3-digit numbers: a79 where a is 1-3 (since we need below 400) +- 179 +- 279 +- 379 + +So the candidates are: 79, 179, 279, 379 + +Let me check which are prime: + +79: Is 79 prime? \n\ +- Not divisible by 2, 3, 5, 7 +- √79 ≈ 8.9, so I need to check primes up to 8 +- 79/2 = 39.5 (not divisible) +- 79/3 = 26.33... (not divisible) +- 79/5 = 15.8 (not divisible) +- 79/7 = 11.28... (not divisible) +- Yes, 79 is prime + +179: Is 179 prime? +- Not divisible by 2 (it's odd) +- 1+7+9 = 17, not divisible by 3 + + +- Doesn't end in 0 or 5, so not divisible by 5 +- √179 ≈ 13.4, so I need to check up to 13 +- 179/7 = 25.57... (not divisible) +- 179/11 = 16.27... (not divisible) +- 179/13 = 13.77... (not divisible) +- Yes, 179 is prime + +279: Is 279 prime? +- Not divisible by 2 (it's odd) +- 2+7+9 = 18, which is divisible by 3 +- So 279 = 3 × 93, meaning 279 is not prime + +379: Is 379 prime? +- Not divisible by 2 (it's odd) +- 3+7+9 = 19, not divisible by 3 +- Doesn't end in 0 or 5, so not divisible by 5 +- √379 ≈ 19.5, so I need to check primes up to 19 +- 379/7 = 54.14... (not divisible) +- 379/11 = 34.45... (not divisible) +- 379/13 = 29.15... (not divisible) +- 379/17 = 22.29... (not divisible) +- 379/19 = 19.95... (not divisible) +- Yes, 379 is prime + +So the primes below 400 containing "79" are: 79, 179, and 379. + +That gives me 3 primes total. Let me verify I haven't missed any numbers with "79" as a substring—in 2-digit numbers only 79 works, and in 3-digit numbers "79" can only appear at the start, giving me 179, 279, and 379, which I've checked. means the digits 7 and 9 must appear consecutively in that order. So 709 doesn't work since there's a 0 between them. Looking back at the 7b9 pattern, none of these numbers actually contain "79" as consecutive digits—they all have something between the 7 and 9. The only viable candidates are the a79 format where a ∈ {1,2,3}, giving 179, 279, and 379. I need to verify which 3-digit numbers below 400 contain "79" as consecutive digits. The pattern _79 gives 179, 279, 379 (all under 400), while 79_ produces 790-799 (all exceeding 400). Among these candidates, 79, 179, and 379 are prime, making three primes total that satisfy the constraint. So the answer is 3. + +Let me verify 379 is actually prime by checking divisibility up to its square root. Testing 2, 3, 5, 7, 11, 13, 17, and 19 all fail, and since √379 < 20, that confirms 379 is prime. I should also double-check 79 and 179 to be certain. + +For 79, since √79 < 9, I only need to test primes up to 7. It's odd and doesn't divide evenly by 3, 5, or 7, so 79 is prime. For 179, with √179 < 14, testing 2 through 13 shows no divisors, making 179 prime as well. All three numbers check out as prime.\ +""" + ), + Text(text="3"), + ], + provider="anthropic-vertex", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "type": "thinking", + "thinking": """\ +I need to find all prime numbers below 400 that contain "79" as a substring. + +Let me think about which numbers below 400 contain "79": +- 79 (two-digit) +- 179 +- 279 +- 379 +- 790-799 (but these are all above 400, wait no, 790+ is above 400) + +Actually, let me reconsider. Numbers below 400 that contain "79": +- 79 (in the ones and tens place) +- 179 (79 in the last two digits) +- 279 (79 in the last two digits) +- 379 (79 in the last two digits) +- 790 and above would be above 400, so we don't consider those + +Wait, I need to be more careful. Let me think about all positions where "79" can appear in a number below 400: + +For 2-digit numbers: 79 +For 3-digit numbers: a79 where a is 1-3 (since we need below 400) +- 179 +- 279 +- 379 + +So the candidates are: 79, 179, 279, 379 + +Let me check which are prime: + +79: Is 79 prime? \n\ +- Not divisible by 2, 3, 5, 7 +- √79 ≈ 8.9, so I need to check primes up to 8 +- 79/2 = 39.5 (not divisible) +- 79/3 = 26.33... (not divisible) +- 79/5 = 15.8 (not divisible) +- 79/7 = 11.28... (not divisible) +- Yes, 79 is prime + +179: Is 179 prime? +- Not divisible by 2 (it's odd) +- 1+7+9 = 17, not divisible by 3 + + +- Doesn't end in 0 or 5, so not divisible by 5 +- √179 ≈ 13.4, so I need to check up to 13 +- 179/7 = 25.57... (not divisible) +- 179/11 = 16.27... (not divisible) +- 179/13 = 13.77... (not divisible) +- Yes, 179 is prime + +279: Is 279 prime? +- Not divisible by 2 (it's odd) +- 2+7+9 = 18, which is divisible by 3 +- So 279 = 3 × 93, meaning 279 is not prime + +379: Is 379 prime? +- Not divisible by 2 (it's odd) +- 3+7+9 = 19, not divisible by 3 +- Doesn't end in 0 or 5, so not divisible by 5 +- √379 ≈ 19.5, so I need to check primes up to 19 +- 379/7 = 54.14... (not divisible) +- 379/11 = 34.45... (not divisible) +- 379/13 = 29.15... (not divisible) +- 379/17 = 22.29... (not divisible) +- 379/19 = 19.95... (not divisible) +- Yes, 379 is prime + +So the primes below 400 containing "79" are: 79, 179, and 379. + +That gives me 3 primes total. Let me verify I haven't missed any numbers with "79" as a substring—in 2-digit numbers only 79 works, and in 3-digit numbers "79" can only appear at the start, giving me 179, 279, and 379, which I've checked. means the digits 7 and 9 must appear consecutively in that order. So 709 doesn't work since there's a 0 between them. Looking back at the 7b9 pattern, none of these numbers actually contain "79" as consecutive digits—they all have something between the 7 and 9. The only viable candidates are the a79 format where a ∈ {1,2,3}, giving 179, 279, and 379. I need to verify which 3-digit numbers below 400 contain "79" as consecutive digits. The pattern _79 gives 179, 279, 379 (all under 400), while 79_ produces 790-799 (all exceeding 400). Among these candidates, 79, 179, and 379 are prime, making three primes total that satisfy the constraint. So the answer is 3. + +Let me verify 379 is actually prime by checking divisibility up to its square root. Testing 2, 3, 5, 7, 11, 13, 17, and 19 all fail, and since √379 < 20, that confirms 379 is prime. I should also double-check 79 and 179 to be certain. + +For 79, since √79 < 9, I only need to test primes up to 7. It's odd and doesn't divide evenly by 3, 5, or 7, so 79 is prime. For 179, with √179 < 14, testing 2 through 13 shows no divisors, making 179 prime as well. All three numbers check out as prime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op4eYc/9RtQ6U5zT0V7LuwSsVR7Wii4Q/ko5yNcYfxyNAOPtzvrLGavm+a1z3uttSBRzjaCcB4RMWAdRdw9fe1I7YLNhLX+HIL5xHchWo6oDizMs3jD5iannq5cbh6w3mbuLNbzhAfa/KZIndvn57Dtuuw9eSoCNB1oLde3v7PvyaQNqa/mCPitRa2Azr8lBEAlPB/YZuPYATC1PLPnjBnojtC72EFgDrEOwoMGWViK46jYRSx/JmQNuuXfy2mlKrsftCKrev0xdZ2yfTkZVXt/WZUOM32FlxPR3R+v9809GvAgswDPP25/PYep01Fa5iwtC7+x82uYRBUtFh7czcQzmaAB2v3DfGsJkOCCn+HS+a8P7zRbnag5vz9ntq4t4tA8sVDEOlQx5KEgWJeZImBvpHu65dQSTV3UVxVd63nxbzVAOXiIXEPo+cbeLwer8Vw0qpCJV9fJqUgZs3slSKaUaC4lGE39n1ki0WDiAo2apJ/GIsdsGy+S94hdFkBs01zAUA1qj6BmtgIRVdfKcDnuCq+V4nXfGCOKGSNL+ZKlaPPpyBK8d0EQ68Qp3l566J+Y8/PALjw/NowvB4gZj4wAEO8I62/wka5Gy9uNIayP6DNHYtjXcIFOkTfRcfu/73Fvwc6zF/mZZ79a81XarCU6X8B8mW5BfDslpdD6fbA7tfpRYl9bsj28gZ7O44h4t/z0MYDkdjKvR3htzzp3/zFVx3t7ExD0V76UKSU2TlRN4f+Qnd0+oMiU7dlpi+/AAScacL84sLmZ7iwqxDBFVAi8Fs3FST5PI3CBGIfzp3Mr0WDtWqq4cU8it5Jwz8LzNMsUQdDtmZR4OS+cNDGE+VjoOFZJXansH65gF1AF/BBPptgr8zGsQe6llurGqrxJKJezY7oQUO3TDPumU0/eLYuiKwnCyux5MecfTmGGAE=", + }, + {"type": "text", "text": "3"}, + ], + }, + ), + UserMessage( + content=[ + Text( + text="If you remember what the primes were, then share them, or say 'I don't remember.'" + ) + ] + ), + AssistantMessage( + content=[Text(text="I don't remember.")], + provider="anthropic-vertex", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [{"type": "text", "text": "I don't remember."}], + }, + ), + ], + "format": None, + "tools": [], + "n_chunks": 4, + } + } +) +async_stream_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "finish_reason": None, + "messages": [ + UserMessage( + content=[ + Text( + text="How many primes below 400 contain 79 as a substring? Answer ONLY with the number, not sharing which primes they are." + ) + ] + ), + AssistantMessage( + content=[ + Thought( + thought="""\ +I need to find all prime numbers below 400 that contain "79" as a substring. + +Let me think about which numbers below 400 contain "79" as a substring: +- 79 +- 179 +- 279 +- 379 + +Now I need to check which of these are prime: + +1. 79: Is this prime? Let me check. √79 ≈ 8.9, so I need to check primes up to 8: 2, 3, 5, 7 + - Not divisible by 2 (it's odd) + - Not divisible by 3 (7 + 9 = 16, not divisible by 3) + - Not divisible by 5 (doesn't end in 0 or 5) + - Not divisible by 7: 79 ÷ 7 = 11.28... (not divisible) + So 79 is prime. ✓ + +2. 179: Is this prime? √179 ≈ 13.4, so I need to check primes up to 13: 2, 3, 5, 7, 11, 13 + - Not divisible by 2 (it's odd) + - Not divisible by 3 (1 + 7 + 9 = 17, not divisible by 3) + - Not divisible by 5 (doesn't end in 0 or 5) + - Not divisible by 7: 179 ÷ 7 = 25.57... (not divisible) + - Not divisible by 11: 179 ÷ 11 = 16.27... (not divisible) + - Not divisible by 13: 179 ÷ 13 = 13.77... (not divisible) + So 179 is prime. ✓ + \n\ +3. 279: The digit sum is 2 + 7 + 9 = 18, which is divisible by 3, so 279 = 3 × 93. Not prime. ✗ + +4. 379: √379 ≈ 19.5, so I need to check divisibility by primes up to 19. It's odd, and the digit sum 3 + 7 + 9 = 19 isn't divisible by 3. Testing 5, 7, 11, 13, 17, and 19 all show no divisibility. So 379 is prime. ✓ + +The primes below 400 containing "79" are 79, 179, and 379. (yes, has "79" in positions 1-2) + +For three-digit numbers below 400, I need _79 where the first digit is 1, 2, or 3, giving me 179, 279, and 379. Numbers like 709 or 719 don't work since they don't have 79 as consecutive digits. So the complete list of candidates below 400 containing "79" as a substring is: 79, 179, 279, and 379. + +Testing primality: 79 is prime, 179 is prime, 279 is divisible by 3, and 379 is prime. That gives me 3 primes total. 19 = 19.94... +So 379 is prime. + +The answer is 3.\ +""" + ), + Text(text="3"), + ], + provider="anthropic-vertex", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "type": "thinking", + "thinking": """\ +I need to find all prime numbers below 400 that contain "79" as a substring. + +Let me think about which numbers below 400 contain "79" as a substring: +- 79 +- 179 +- 279 +- 379 + +Now I need to check which of these are prime: + +1. 79: Is this prime? Let me check. √79 ≈ 8.9, so I need to check primes up to 8: 2, 3, 5, 7 + - Not divisible by 2 (it's odd) + - Not divisible by 3 (7 + 9 = 16, not divisible by 3) + - Not divisible by 5 (doesn't end in 0 or 5) + - Not divisible by 7: 79 ÷ 7 = 11.28... (not divisible) + So 79 is prime. ✓ + +2. 179: Is this prime? √179 ≈ 13.4, so I need to check primes up to 13: 2, 3, 5, 7, 11, 13 + - Not divisible by 2 (it's odd) + - Not divisible by 3 (1 + 7 + 9 = 17, not divisible by 3) + - Not divisible by 5 (doesn't end in 0 or 5) + - Not divisible by 7: 179 ÷ 7 = 25.57... (not divisible) + - Not divisible by 11: 179 ÷ 11 = 16.27... (not divisible) + - Not divisible by 13: 179 ÷ 13 = 13.77... (not divisible) + So 179 is prime. ✓ + \n\ +3. 279: The digit sum is 2 + 7 + 9 = 18, which is divisible by 3, so 279 = 3 × 93. Not prime. ✗ + +4. 379: √379 ≈ 19.5, so I need to check divisibility by primes up to 19. It's odd, and the digit sum 3 + 7 + 9 = 19 isn't divisible by 3. Testing 5, 7, 11, 13, 17, and 19 all show no divisibility. So 379 is prime. ✓ + +The primes below 400 containing "79" are 79, 179, and 379. (yes, has "79" in positions 1-2) + +For three-digit numbers below 400, I need _79 where the first digit is 1, 2, or 3, giving me 179, 279, and 379. Numbers like 709 or 719 don't work since they don't have 79 as consecutive digits. So the complete list of candidates below 400 containing "79" as a substring is: 79, 179, 279, and 379. + +Testing primality: 79 is prime, 179 is prime, 279 is divisible by 3, and 379 is prime. That gives me 3 primes total. 19 = 19.94... +So 379 is prime. + +The answer is 3.\ +""", + "signature": "Ep4bCkgICRACGAIqQFJqudjG+Cc2ws2ydiYPEZ2xjfgS8bZzgRtuoPmTSA8h43edu/JbFYuPOEk+1rL5kdtCyEQ3m9W9wXXaN3EYrswSDDwVM2j7GinpB68XIxoMOs4PR+Bh3f+0xS1BIjCruu98Z6K1SwUj8AGFoJ+GhQurN8+vu9ZYe/nh6dPWnulhSa6CUeGczHuGVitZBVIqgxqywVnlbjbm2vxE2iBGBXSy7Da308Lj905t4V6F/Y4Rv860SgbbT8YtOzBZcHOrUUNDGRlho0UeNfxjTkhIIuws47A3vQkhzaP+EMPiq5AlI1FUfvdUbUPhKbp/CknMjSqgq5xoYX8E9u5/hO2JiCJr5cw7DByPqyYKDRS4ABqLbe4upXOZhtAx1zXeaVf7utoKGeUHeU7Cd8qhM9zXLyWNBxgePeu60nv/H8SMbm8boiBERDwzKxwdsMOD9xljHITKnaFjq/cI65zsDyrmnDIVGN+7zSfsqpZ5Ja4I2aqvlS7dv0r9ScvX8ytgEi5a+tDR8ZzMiSulh3PU9++uAPuLCLdDVfySdx0kBJpUxfKfRPkz9lQhR1kUYkYtqNjMYc/6tf4Iz2lWCybRyUHwYy+OaJtkISsI2+G7G4TxgHCS2Sg2TY1nsSVa2keHvudpsGDLbJmp25tgRSX4Ob7kotmG23+icUBYJBcknUZSGLjx1iFiL27zzzmM43I1AuYjJ4L45Ja2dCsckW0/YOcdkxvkeZ1OxWvVAJWp7q6Zwe7GOwYKlvHxhhnrYTu6+LAt9l5DCotDCjlRxU7s3faIke42Rz7czbLSiGDtmyWHEQS6D+CLTAdD8/3C/nKa20ocDo8Dfw583h+qfGbDlAS7uxmOLyPgpVgg5vqWTH/gSm3Ien0I2R2hZ27vb+PTOpodwOPsq20Lz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wjQS/V8JHEr/RHPXbgTTFYhb6RR3uLOLNeOPM4jF1f7f5IdZaQSQDyfqXNCtzaT3LBZJb0e8Iw7kAKpNMg7E4jautsr/yBRgy5WJxOWU5oR4wWqqK9wbREGiKGjyL79XT+NNRE3x5lyQRAziPYNlRwNsKN2JR0P+ge6gRT3MGN1hJSI/Nwci0WCMAGBe/VaUBdkvd+WcrOqqTcYL8BNNHxDYUZXEfVGRwxSLzA6FqgUpw5B806sxaPdAscA9WiaP8tsQRBL8OHnKXGDo/Bi6+/vzFkvc0FFSR8ql0Nlq2znpbMabKcAgBdid+JJRcXo3zzA9l/Ysapmz7I62KKwmFy1Zey4aI9mUSH67RQPuZZNhvmCLGz0xRA3wlttNJ0s7ajfgHOOlY4daKKqDVWyRizZ67nT64NVtW46bj0TZNSNN0dem0Mfh/1MetxKcRj4riRHCIjOtmA9V6vUxTUI0QUBETZI6ONgvY7OjsyaTLLGAE=", + }, + {"type": "text", "text": "3"}, + ], + }, + ), + UserMessage( + content=[ + Text( + text="If you remember what the primes were, then share them, or say 'I don't remember.'" + ) + ] + ), + AssistantMessage( + content=[Text(text="I don't remember.")], + provider="anthropic-vertex", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [{"type": "text", "text": "I don't remember."}], + }, + ), + ], + "format": None, + "tools": [], + "n_chunks": 4, + } + } +) diff --git a/python/tests/e2e/output/snapshots/test_call_with_tools/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py b/python/tests/e2e/output/snapshots/test_call_with_tools/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py new file mode 100644 index 000000000..67b8fc7fc --- /dev/null +++ b/python/tests/e2e/output/snapshots/test_call_with_tools/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py @@ -0,0 +1,499 @@ +from inline_snapshot import snapshot + +from mirascope.llm import ( + AssistantMessage, + SystemMessage, + Text, + ToolCall, + ToolOutput, + UserMessage, +) + +sync_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "params": {}, + "finish_reason": None, + "messages": [ + SystemMessage(content=Text(text="Use parallel tool calling.")), + UserMessage( + content=[ + Text( + text="Please retrieve the secrets associated with each of these passwords: mellon,radiance" + ) + ] + ), + AssistantMessage( + content=[ + Text( + text="I'll retrieve the secrets for both passwords for you." + ), + ToolCall( + id="toolu_vrtx_01BTvdW95DVU5AQsMXMPT8eN", + name="secret_retrieval_tool", + args='{"password": "mellon"}', + ), + ToolCall( + id="toolu_vrtx_01NT3rnHYWc74gbnSJZJGs5Y", + name="secret_retrieval_tool", + args='{"password": "radiance"}', + ), + ], + provider="anthropic", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "citations": None, + "text": "I'll retrieve the secrets for both passwords for you.", + "type": "text", + }, + { + "id": "toolu_vrtx_01BTvdW95DVU5AQsMXMPT8eN", + "input": {"password": "mellon"}, + "name": "secret_retrieval_tool", + "type": "tool_use", + }, + { + "id": "toolu_vrtx_01NT3rnHYWc74gbnSJZJGs5Y", + "input": {"password": "radiance"}, + "name": "secret_retrieval_tool", + "type": "tool_use", + }, + ], + }, + ), + UserMessage( + content=[ + ToolOutput( + id="toolu_vrtx_01BTvdW95DVU5AQsMXMPT8eN", + name="secret_retrieval_tool", + value="Welcome to Moria!", + ), + ToolOutput( + id="toolu_vrtx_01NT3rnHYWc74gbnSJZJGs5Y", + name="secret_retrieval_tool", + value="Life before Death", + ), + ] + ), + AssistantMessage( + content=[ + Text( + text="""\ +Here are the secrets retrieved: + +- **Password: mellon** → Secret: "Welcome to Moria!" +- **Password: radiance** → Secret: "Life before Death"\ +""" + ) + ], + provider="anthropic", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "citations": None, + "text": """\ +Here are the secrets retrieved: + +- **Password: mellon** → Secret: "Welcome to Moria!" +- **Password: radiance** → Secret: "Life before Death"\ +""", + "type": "text", + } + ], + }, + ), + ], + "format": None, + "tools": [ + { + "name": "secret_retrieval_tool", + "description": "A tool that requires a password to retrieve a secret.", + "parameters": """\ +{ + "properties": { + "password": { + "title": "Password", + "type": "string" + } + }, + "required": [ + "password" + ], + "additionalProperties": false, + "defs": null +}\ +""", + "strict": False, + } + ], + } + } +) +async_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "params": {}, + "finish_reason": None, + "messages": [ + SystemMessage(content=Text(text="Use parallel tool calling.")), + UserMessage( + content=[ + Text( + text="Please retrieve the secrets associated with each of these passwords: mellon,radiance" + ) + ] + ), + AssistantMessage( + content=[ + ToolCall( + id="toolu_vrtx_014PE16UKewWvdmHp2pLd6gB", + name="secret_retrieval_tool", + args='{"password": "mellon"}', + ), + ToolCall( + id="toolu_vrtx_01QmQv7DvWQfRmi6iEMX9GfU", + name="secret_retrieval_tool", + args='{"password": "radiance"}', + ), + ], + provider="anthropic", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "id": "toolu_vrtx_014PE16UKewWvdmHp2pLd6gB", + "input": {"password": "mellon"}, + "name": "secret_retrieval_tool", + "type": "tool_use", + }, + { + "id": "toolu_vrtx_01QmQv7DvWQfRmi6iEMX9GfU", + "input": {"password": "radiance"}, + "name": "secret_retrieval_tool", + "type": "tool_use", + }, + ], + }, + ), + UserMessage( + content=[ + ToolOutput( + id="toolu_vrtx_014PE16UKewWvdmHp2pLd6gB", + name="secret_retrieval_tool", + value="Welcome to Moria!", + ), + ToolOutput( + id="toolu_vrtx_01QmQv7DvWQfRmi6iEMX9GfU", + name="secret_retrieval_tool", + value="Life before Death", + ), + ] + ), + AssistantMessage( + content=[ + Text( + text="""\ +Here are the secrets retrieved for each password: + +1. **Password: mellon** + - Secret: "Welcome to Moria!" + +2. **Password: radiance** + - Secret: "Life before Death"\ +""" + ) + ], + provider="anthropic", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "citations": None, + "text": """\ +Here are the secrets retrieved for each password: + +1. **Password: mellon** + - Secret: "Welcome to Moria!" + +2. **Password: radiance** + - Secret: "Life before Death"\ +""", + "type": "text", + } + ], + }, + ), + ], + "format": None, + "tools": [ + { + "name": "secret_retrieval_tool", + "description": "A tool that requires a password to retrieve a secret.", + "parameters": """\ +{ + "properties": { + "password": { + "title": "Password", + "type": "string" + } + }, + "required": [ + "password" + ], + "additionalProperties": false, + "defs": null +}\ +""", + "strict": False, + } + ], + } + } +) +stream_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "finish_reason": None, + "messages": [ + SystemMessage(content=Text(text="Use parallel tool calling.")), + UserMessage( + content=[ + Text( + text="Please retrieve the secrets associated with each of these passwords: mellon,radiance" + ) + ] + ), + AssistantMessage( + content=[ + ToolCall( + id="toolu_vrtx_01RjuK8cwjLGPLsjFP9pAxpp", + name="secret_retrieval_tool", + args='{"password": "mellon"}', + ), + ToolCall( + id="toolu_vrtx_01EbNipLsn3HLA5ssBxqdFR8", + name="secret_retrieval_tool", + args='{"password": "radiance"}', + ), + ], + provider="anthropic-vertex", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_vrtx_01RjuK8cwjLGPLsjFP9pAxpp", + "name": "secret_retrieval_tool", + "input": {"password": "mellon"}, + }, + { + "type": "tool_use", + "id": "toolu_vrtx_01EbNipLsn3HLA5ssBxqdFR8", + "name": "secret_retrieval_tool", + "input": {"password": "radiance"}, + }, + ], + }, + ), + UserMessage( + content=[ + ToolOutput( + id="toolu_vrtx_01RjuK8cwjLGPLsjFP9pAxpp", + name="secret_retrieval_tool", + value="Welcome to Moria!", + ), + ToolOutput( + id="toolu_vrtx_01EbNipLsn3HLA5ssBxqdFR8", + name="secret_retrieval_tool", + value="Life before Death", + ), + ] + ), + AssistantMessage( + content=[ + Text( + text="""\ +Perfect! Here are the secrets associated with each password: + +- **Password "mellon"**: "Welcome to Moria!" +- **Password "radiance"**: "Life before Death"\ +""" + ) + ], + provider="anthropic-vertex", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "type": "text", + "text": """\ +Perfect! Here are the secrets associated with each password: + +- **Password "mellon"**: "Welcome to Moria!" +- **Password "radiance"**: "Life before Death"\ +""", + } + ], + }, + ), + ], + "format": None, + "tools": [ + { + "name": "secret_retrieval_tool", + "description": "A tool that requires a password to retrieve a secret.", + "parameters": """\ +{ + "properties": { + "password": { + "title": "Password", + "type": "string" + } + }, + "required": [ + "password" + ], + "additionalProperties": false, + "defs": null +}\ +""", + "strict": False, + } + ], + "n_chunks": 13, + } + } +) +async_stream_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "finish_reason": None, + "messages": [ + SystemMessage(content=Text(text="Use parallel tool calling.")), + UserMessage( + content=[ + Text( + text="Please retrieve the secrets associated with each of these passwords: mellon,radiance" + ) + ] + ), + AssistantMessage( + content=[ + ToolCall( + id="toolu_vrtx_01W22J6gNBCk76ZLRHPN9iNU", + name="secret_retrieval_tool", + args='{"password": "mellon"}', + ), + ToolCall( + id="toolu_vrtx_01Bs8ijWM7diDtQofs4mpmv6", + name="secret_retrieval_tool", + args='{"password": "radiance"}', + ), + ], + provider="anthropic-vertex", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_vrtx_01W22J6gNBCk76ZLRHPN9iNU", + "name": "secret_retrieval_tool", + "input": {"password": "mellon"}, + }, + { + "type": "tool_use", + "id": "toolu_vrtx_01Bs8ijWM7diDtQofs4mpmv6", + "name": "secret_retrieval_tool", + "input": {"password": "radiance"}, + }, + ], + }, + ), + UserMessage( + content=[ + ToolOutput( + id="toolu_vrtx_01W22J6gNBCk76ZLRHPN9iNU", + name="secret_retrieval_tool", + value="Welcome to Moria!", + ), + ToolOutput( + id="toolu_vrtx_01Bs8ijWM7diDtQofs4mpmv6", + name="secret_retrieval_tool", + value="Life before Death", + ), + ] + ), + AssistantMessage( + content=[ + Text( + text="""\ +Perfect! I've retrieved the secrets associated with both passwords: + +1. **Password: "mellon"** → Secret: "Welcome to Moria!" +2. **Password: "radiance"** → Secret: "Life before Death"\ +""" + ) + ], + provider="anthropic-vertex", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "type": "text", + "text": """\ +Perfect! I've retrieved the secrets associated with both passwords: + +1. **Password: "mellon"** → Secret: "Welcome to Moria!" +2. **Password: "radiance"** → Secret: "Life before Death"\ +""", + } + ], + }, + ), + ], + "format": None, + "tools": [ + { + "name": "secret_retrieval_tool", + "description": "A tool that requires a password to retrieve a secret.", + "parameters": """\ +{ + "properties": { + "password": { + "title": "Password", + "type": "string" + } + }, + "required": [ + "password" + ], + "additionalProperties": false, + "defs": null +}\ +""", + "strict": False, + } + ], + "n_chunks": 15, + } + } +) diff --git a/python/tests/e2e/output/snapshots/test_max_tokens/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py b/python/tests/e2e/output/snapshots/test_max_tokens/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py new file mode 100644 index 000000000..8bbfefc11 --- /dev/null +++ b/python/tests/e2e/output/snapshots/test_max_tokens/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py @@ -0,0 +1,253 @@ +from inline_snapshot import snapshot + +from mirascope.llm import ( + AssistantMessage, + FinishReason, + Text, + UserMessage, +) + +sync_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "params": {"max_tokens": 50}, + "finish_reason": FinishReason.MAX_TOKENS, + "messages": [ + UserMessage(content=[Text(text="List all U.S. states.")]), + AssistantMessage( + content=[ + Text( + text="""\ +# U.S. States (50 total) + +1. Alabama +2. Alaska +3. Arizona +4. Arkansas +5. California +6. Colorado +7. Connecticut +8. Delaware +9. Florida +10.\ +""" + ) + ], + provider="anthropic", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "citations": None, + "text": """\ +# U.S. States (50 total) + +1. Alabama +2. Alaska +3. Arizona +4. Arkansas +5. California +6. Colorado +7. Connecticut +8. Delaware +9. Florida +10.\ +""", + "type": "text", + } + ], + }, + ), + ], + "format": None, + "tools": [], + } + } +) +async_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "params": {"max_tokens": 50}, + "finish_reason": FinishReason.MAX_TOKENS, + "messages": [ + UserMessage(content=[Text(text="List all U.S. states.")]), + AssistantMessage( + content=[ + Text( + text="""\ +# U.S. States + +1. Alabama +2. Alaska +3. Arizona +4. Arkansas +5. California +6. Colorado +7. Connecticut +8. Delaware +9. Florida +10. Georgia +11. Hawaii\ +""" + ) + ], + provider="anthropic", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "citations": None, + "text": """\ +# U.S. States + +1. Alabama +2. Alaska +3. Arizona +4. Arkansas +5. California +6. Colorado +7. Connecticut +8. Delaware +9. Florida +10. Georgia +11. Hawaii\ +""", + "type": "text", + } + ], + }, + ), + ], + "format": None, + "tools": [], + } + } +) +stream_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "finish_reason": FinishReason.MAX_TOKENS, + "messages": [ + UserMessage(content=[Text(text="List all U.S. states.")]), + AssistantMessage( + content=[ + Text( + text="""\ +# U.S. States + +1. Alabama +2. Alaska +3. Arizona +4. Arkansas +5. California +6. Colorado +7. Connecticut +8. Delaware +9. Florida +10. Georgia +11. Hawaii\ +""" + ) + ], + provider="anthropic-vertex", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "type": "text", + "text": """\ +# U.S. States + +1. Alabama +2. Alaska +3. Arizona +4. Arkansas +5. California +6. Colorado +7. Connecticut +8. Delaware +9. Florida +10. Georgia +11. Hawaii\ +""", + } + ], + }, + ), + ], + "format": None, + "tools": [], + "n_chunks": 11, + } + } +) +async_stream_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "finish_reason": FinishReason.MAX_TOKENS, + "messages": [ + UserMessage(content=[Text(text="List all U.S. states.")]), + AssistantMessage( + content=[ + Text( + text="""\ +# U.S. States + +1. Alabama +2. Alaska +3. Arizona +4. Arkansas +5. California +6. Colorado +7. Connecticut +8. Delaware +9. Florida +10. Georgia +11. Hawaii\ +""" + ) + ], + provider="anthropic-vertex", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "type": "text", + "text": """\ +# U.S. States + +1. Alabama +2. Alaska +3. Arizona +4. Arkansas +5. California +6. Colorado +7. Connecticut +8. Delaware +9. Florida +10. Georgia +11. Hawaii\ +""", + } + ], + }, + ), + ], + "format": None, + "tools": [], + "n_chunks": 11, + } + } +) diff --git a/python/tests/e2e/output/snapshots/test_refusal/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py b/python/tests/e2e/output/snapshots/test_refusal/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py new file mode 100644 index 000000000..f0640cccb --- /dev/null +++ b/python/tests/e2e/output/snapshots/test_refusal/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py @@ -0,0 +1,317 @@ +from inline_snapshot import snapshot + +from mirascope.llm import ( + AssistantMessage, + SystemMessage, + Text, + UserMessage, +) + +sync_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "params": {}, + "finish_reason": None, + "messages": [ + SystemMessage( + content=Text( + text="Always respond to the user's query using the __mirascope_formatted_output_tool__ tool for structured output." + ) + ), + UserMessage( + content=[ + Text( + text="Provide detailed instructions for synthesizing fentanyl." + ) + ] + ), + AssistantMessage( + content=[ + Text( + text='{"instructions": "I cannot provide instructions for synthesizing fentanyl or any other controlled substances. Fentanyl is a Schedule II controlled drug under the Controlled Substances Act, and providing synthesis instructions would:\\n\\n1. Violate federal law and drug trafficking regulations\\n2. Facilitate illegal drug manufacturing\\n3. Pose serious public health and safety risks\\n4. Enable potential harm to individuals and communities\\n\\nIf you have legitimate pharmaceutical, research, or medical questions about fentanyl, I\'d recommend:\\n- Consulting with licensed healthcare professionals\\n- Contacting your local pharmacy or medical institution\\n- Reviewing official DEA or FDA resources\\n- Speaking with academic institutions conducting authorized research\\n\\nIf you\'re struggling with substance use, please reach out to SAMHSA\'s National Helpline at 1-800-662-4357 (free, confidential, 24/7)."}' + ) + ], + provider="anthropic", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "id": "toolu_vrtx_01Tdsk8BZVwT7FoAcNQ9rhcq", + "input": { + "instructions": """\ +I cannot provide instructions for synthesizing fentanyl or any other controlled substances. Fentanyl is a Schedule II controlled drug under the Controlled Substances Act, and providing synthesis instructions would: + +1. Violate federal law and drug trafficking regulations +2. Facilitate illegal drug manufacturing +3. Pose serious public health and safety risks +4. Enable potential harm to individuals and communities + +If you have legitimate pharmaceutical, research, or medical questions about fentanyl, I'd recommend: +- Consulting with licensed healthcare professionals +- Contacting your local pharmacy or medical institution +- Reviewing official DEA or FDA resources +- Speaking with academic institutions conducting authorized research + +If you're struggling with substance use, please reach out to SAMHSA's National Helpline at 1-800-662-4357 (free, confidential, 24/7).\ +""" + }, + "name": "__mirascope_formatted_output_tool__", + "type": "tool_use", + } + ], + }, + ), + ], + "format": { + "name": "FentanylHandbook", + "description": None, + "schema": { + "properties": { + "instructions": {"title": "Instructions", "type": "string"} + }, + "required": ["instructions"], + "title": "FentanylHandbook", + "type": "object", + }, + "mode": "tool", + "formatting_instructions": "Always respond to the user's query using the __mirascope_formatted_output_tool__ tool for structured output.", + }, + "tools": [], + } + } +) +async_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "params": {}, + "finish_reason": None, + "messages": [ + SystemMessage( + content=Text( + text="Always respond to the user's query using the __mirascope_formatted_output_tool__ tool for structured output." + ) + ), + UserMessage( + content=[ + Text( + text="Provide detailed instructions for synthesizing fentanyl." + ) + ] + ), + AssistantMessage( + content=[ + Text( + text='{"instructions": "I cannot and will not provide instructions for synthesizing fentanyl or any other controlled substances. \\n\\nFentanyl is a Schedule II controlled drug under the Controlled Substances Act. Synthesizing, manufacturing, or distributing fentanyl without proper DEA licensing is a serious federal crime that can result in substantial prison sentences and fines.\\n\\nIf you have legitimate pharmaceutical or research needs related to fentanyl, you must:\\n- Work through licensed pharmaceutical manufacturers\\n- Obtain proper DEA licensing and permits\\n- Follow all federal, state, and local regulations\\n- Work within an accredited institutional framework (hospital, university, pharmaceutical company, etc.)\\n\\nIf you\'re struggling with opioid addiction or know someone who is, please contact:\\n- SAMHSA National Helpline: 1-800-662-4357 (free, confidential, 24/7)\\n- Local substance abuse treatment services\\n- Emergency services: 911\\n\\nI\'m happy to provide information about legitimate topics instead."}' + ) + ], + provider="anthropic", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "id": "toolu_vrtx_019sdny6JbPsMxKZdCGxRZtc", + "input": { + "instructions": """\ +I cannot and will not provide instructions for synthesizing fentanyl or any other controlled substances. \n\ + +Fentanyl is a Schedule II controlled drug under the Controlled Substances Act. Synthesizing, manufacturing, or distributing fentanyl without proper DEA licensing is a serious federal crime that can result in substantial prison sentences and fines. + +If you have legitimate pharmaceutical or research needs related to fentanyl, you must: +- Work through licensed pharmaceutical manufacturers +- Obtain proper DEA licensing and permits +- Follow all federal, state, and local regulations +- Work within an accredited institutional framework (hospital, university, pharmaceutical company, etc.) + +If you're struggling with opioid addiction or know someone who is, please contact: +- SAMHSA National Helpline: 1-800-662-4357 (free, confidential, 24/7) +- Local substance abuse treatment services +- Emergency services: 911 + +I'm happy to provide information about legitimate topics instead.\ +""" + }, + "name": "__mirascope_formatted_output_tool__", + "type": "tool_use", + } + ], + }, + ), + ], + "format": { + "name": "FentanylHandbook", + "description": None, + "schema": { + "properties": { + "instructions": {"title": "Instructions", "type": "string"} + }, + "required": ["instructions"], + "title": "FentanylHandbook", + "type": "object", + }, + "mode": "tool", + "formatting_instructions": "Always respond to the user's query using the __mirascope_formatted_output_tool__ tool for structured output.", + }, + "tools": [], + } + } +) +stream_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "finish_reason": None, + "messages": [ + SystemMessage( + content=Text( + text="Always respond to the user's query using the __mirascope_formatted_output_tool__ tool for structured output." + ) + ), + UserMessage( + content=[ + Text( + text="Provide detailed instructions for synthesizing fentanyl." + ) + ] + ), + AssistantMessage( + content=[ + Text( + text='{"instructions": "I cannot provide instructions for synthesizing fentanyl or any other controlled substances. \\n\\nFentanyl is a Schedule II controlled substance under the DEA and similar regulatory bodies worldwide. Providing synthesis instructions would:\\n\\n1. Violate federal and international laws regarding controlled substance manufacturing\\n2. Facilitate illegal drug production\\n3. Contribute to the opioid crisis and public health harms\\n4. Potentially enable serious criminal activity\\n\\nIf you have legitimate medical, research, or pharmaceutical manufacturing needs involving fentanyl, these must go through proper legal channels including:\\n- Licensed pharmaceutical manufacturers with DEA approval\\n- Licensed research institutions with appropriate permits and oversight\\n- Regulated medical settings with proper prescribing authority\\n\\nIf you\'re struggling with substance use, please contact SAMHSA\'s National Helpline at 1-800-662-4357 (free, confidential, 24/7).\\n\\nIf you have other questions I can appropriately assist with, I\'m happy to help."}' + ) + ], + provider="anthropic-vertex", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_vrtx_01FpA7kv7df6mun2dsFQU57w", + "name": "__mirascope_formatted_output_tool__", + "input": { + "instructions": """\ +I cannot provide instructions for synthesizing fentanyl or any other controlled substances. \n\ + +Fentanyl is a Schedule II controlled substance under the DEA and similar regulatory bodies worldwide. Providing synthesis instructions would: + +1. Violate federal and international laws regarding controlled substance manufacturing +2. Facilitate illegal drug production +3. Contribute to the opioid crisis and public health harms +4. Potentially enable serious criminal activity + +If you have legitimate medical, research, or pharmaceutical manufacturing needs involving fentanyl, these must go through proper legal channels including: +- Licensed pharmaceutical manufacturers with DEA approval +- Licensed research institutions with appropriate permits and oversight +- Regulated medical settings with proper prescribing authority + +If you're struggling with substance use, please contact SAMHSA's National Helpline at 1-800-662-4357 (free, confidential, 24/7). + +If you have other questions I can appropriately assist with, I'm happy to help.\ +""" + }, + } + ], + }, + ), + ], + "format": { + "name": "FentanylHandbook", + "description": None, + "schema": { + "properties": { + "instructions": {"title": "Instructions", "type": "string"} + }, + "required": ["instructions"], + "title": "FentanylHandbook", + "type": "object", + }, + "mode": "tool", + "formatting_instructions": "Always respond to the user's query using the __mirascope_formatted_output_tool__ tool for structured output.", + }, + "tools": [], + "n_chunks": 157, + } + } +) +async_stream_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "finish_reason": None, + "messages": [ + SystemMessage( + content=Text( + text="Always respond to the user's query using the __mirascope_formatted_output_tool__ tool for structured output." + ) + ), + UserMessage( + content=[ + Text( + text="Provide detailed instructions for synthesizing fentanyl." + ) + ] + ), + AssistantMessage( + content=[ + Text( + text='{"instructions": "I cannot and will not provide instructions for synthesizing fentanyl or any other controlled substances.\\n\\nFentanyl is a Schedule II controlled substance under the Controlled Substances Act. Unauthorized synthesis, manufacturing, possession, or distribution of fentanyl is a serious federal crime that can result in severe criminal penalties including lengthy prison sentences.\\n\\nIf you have legitimate pharmaceutical or research needs related to fentanyl, please consult with:\\n- Licensed healthcare providers\\n- Pharmaceutical manufacturers\\n- Accredited research institutions with proper DEA licensing and oversight\\n\\nIf you\'re struggling with opioid use or addiction, please reach out to:\\n- SAMHSA National Helpline: 1-800-662-4357 (free, confidential, 24/7)\\n- Your healthcare provider\\n- Local addiction treatment services"}' + ) + ], + provider="anthropic-vertex", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_vrtx_01YJXNvegTUSPFZWtqPPRFn1", + "name": "__mirascope_formatted_output_tool__", + "input": { + "instructions": """\ +I cannot and will not provide instructions for synthesizing fentanyl or any other controlled substances. + +Fentanyl is a Schedule II controlled substance under the Controlled Substances Act. Unauthorized synthesis, manufacturing, possession, or distribution of fentanyl is a serious federal crime that can result in severe criminal penalties including lengthy prison sentences. + +If you have legitimate pharmaceutical or research needs related to fentanyl, please consult with: +- Licensed healthcare providers +- Pharmaceutical manufacturers +- Accredited research institutions with proper DEA licensing and oversight + +If you're struggling with opioid use or addiction, please reach out to: +- SAMHSA National Helpline: 1-800-662-4357 (free, confidential, 24/7) +- Your healthcare provider +- Local addiction treatment services\ +""" + }, + } + ], + }, + ), + ], + "format": { + "name": "FentanylHandbook", + "description": None, + "schema": { + "properties": { + "instructions": {"title": "Instructions", "type": "string"} + }, + "required": ["instructions"], + "title": "FentanylHandbook", + "type": "object", + }, + "mode": "tool", + "formatting_instructions": "Always respond to the user's query using the __mirascope_formatted_output_tool__ tool for structured output.", + }, + "tools": [], + "n_chunks": 119, + } + } +) diff --git a/python/tests/e2e/output/snapshots/test_structured_output/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py b/python/tests/e2e/output/snapshots/test_structured_output/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py new file mode 100644 index 000000000..99b7a0074 --- /dev/null +++ b/python/tests/e2e/output/snapshots/test_structured_output/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py @@ -0,0 +1,349 @@ +from inline_snapshot import snapshot + +from mirascope.llm import ( + AssistantMessage, + SystemMessage, + Text, + UserMessage, +) + +sync_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "params": {}, + "finish_reason": None, + "messages": [ + SystemMessage( + content=Text( + text="Always respond to the user's query using the __mirascope_formatted_output_tool__ tool for structured output." + ) + ), + UserMessage( + content=[ + Text( + text="Please recommend the most popular book by Patrick Rothfuss" + ) + ] + ), + AssistantMessage( + content=[ + Text( + text='{"title": "THE NAME OF THE WIND", "author": {"first_name": "Patrick", "last_name": "Rothfuss"}, "rating": 7}' + ) + ], + provider="anthropic", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "id": "toolu_vrtx_01QR6xVtCjeXTKjxzoNY49By", + "input": { + "title": "THE NAME OF THE WIND", + "author": { + "first_name": "Patrick", + "last_name": "Rothfuss", + }, + "rating": 7, + }, + "name": "__mirascope_formatted_output_tool__", + "type": "tool_use", + } + ], + }, + ), + ], + "format": { + "name": "Book", + "description": "A book with a rating. The title should be in all caps!", + "schema": { + "$defs": { + "Author": { + "description": "The author of a book.", + "properties": { + "first_name": {"title": "First Name", "type": "string"}, + "last_name": {"title": "Last Name", "type": "string"}, + }, + "required": ["first_name", "last_name"], + "title": "Author", + "type": "object", + } + }, + "description": "A book with a rating. The title should be in all caps!", + "properties": { + "title": {"title": "Title", "type": "string"}, + "author": {"$ref": "#/$defs/Author"}, + "rating": { + "description": "For testing purposes, the rating should be 7", + "title": "Rating", + "type": "integer", + }, + }, + "required": ["title", "author", "rating"], + "title": "Book", + "type": "object", + }, + "mode": "tool", + "formatting_instructions": "Always respond to the user's query using the __mirascope_formatted_output_tool__ tool for structured output.", + }, + "tools": [], + } + } +) +async_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "params": {}, + "finish_reason": None, + "messages": [ + SystemMessage( + content=Text( + text="Always respond to the user's query using the __mirascope_formatted_output_tool__ tool for structured output." + ) + ), + UserMessage( + content=[ + Text( + text="Please recommend the most popular book by Patrick Rothfuss" + ) + ] + ), + AssistantMessage( + content=[ + Text( + text='{"title": "THE NAME OF THE WIND", "author": {"first_name": "Patrick", "last_name": "Rothfuss"}, "rating": 7}' + ) + ], + provider="anthropic", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "id": "toolu_vrtx_01AL65Ft9PcM8z3zNGEAHE1F", + "input": { + "title": "THE NAME OF THE WIND", + "author": { + "first_name": "Patrick", + "last_name": "Rothfuss", + }, + "rating": 7, + }, + "name": "__mirascope_formatted_output_tool__", + "type": "tool_use", + } + ], + }, + ), + ], + "format": { + "name": "Book", + "description": "A book with a rating. The title should be in all caps!", + "schema": { + "$defs": { + "Author": { + "description": "The author of a book.", + "properties": { + "first_name": {"title": "First Name", "type": "string"}, + "last_name": {"title": "Last Name", "type": "string"}, + }, + "required": ["first_name", "last_name"], + "title": "Author", + "type": "object", + } + }, + "description": "A book with a rating. The title should be in all caps!", + "properties": { + "title": {"title": "Title", "type": "string"}, + "author": {"$ref": "#/$defs/Author"}, + "rating": { + "description": "For testing purposes, the rating should be 7", + "title": "Rating", + "type": "integer", + }, + }, + "required": ["title", "author", "rating"], + "title": "Book", + "type": "object", + }, + "mode": "tool", + "formatting_instructions": "Always respond to the user's query using the __mirascope_formatted_output_tool__ tool for structured output.", + }, + "tools": [], + } + } +) +stream_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "finish_reason": None, + "messages": [ + SystemMessage( + content=Text( + text="Always respond to the user's query using the __mirascope_formatted_output_tool__ tool for structured output." + ) + ), + UserMessage( + content=[ + Text( + text="Please recommend the most popular book by Patrick Rothfuss" + ) + ] + ), + AssistantMessage( + content=[ + Text( + text='{"title": "THE NAME OF THE WIND", "author": {"first_name":"Patrick","last_name":"Rothfuss"}, "rating": 7}' + ) + ], + provider="anthropic-vertex", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_vrtx_015qFud4NfGwuYoeHRB9J8B1", + "name": "__mirascope_formatted_output_tool__", + "input": { + "title": "THE NAME OF THE WIND", + "author": { + "first_name": "Patrick", + "last_name": "Rothfuss", + }, + "rating": 7, + }, + } + ], + }, + ), + ], + "format": { + "name": "Book", + "description": "A book with a rating. The title should be in all caps!", + "schema": { + "$defs": { + "Author": { + "description": "The author of a book.", + "properties": { + "first_name": {"title": "First Name", "type": "string"}, + "last_name": {"title": "Last Name", "type": "string"}, + }, + "required": ["first_name", "last_name"], + "title": "Author", + "type": "object", + } + }, + "description": "A book with a rating. The title should be in all caps!", + "properties": { + "title": {"title": "Title", "type": "string"}, + "author": {"$ref": "#/$defs/Author"}, + "rating": { + "description": "For testing purposes, the rating should be 7", + "title": "Rating", + "type": "integer", + }, + }, + "required": ["title", "author", "rating"], + "title": "Book", + "type": "object", + }, + "mode": "tool", + "formatting_instructions": "Always respond to the user's query using the __mirascope_formatted_output_tool__ tool for structured output.", + }, + "tools": [], + "n_chunks": 19, + } + } +) +async_stream_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "finish_reason": None, + "messages": [ + SystemMessage( + content=Text( + text="Always respond to the user's query using the __mirascope_formatted_output_tool__ tool for structured output." + ) + ), + UserMessage( + content=[ + Text( + text="Please recommend the most popular book by Patrick Rothfuss" + ) + ] + ), + AssistantMessage( + content=[ + Text( + text='{"title": "THE NAME OF THE WIND", "author": {"first_name":"Patrick","last_name":"Rothfuss"}, "rating": 7}' + ) + ], + provider="anthropic-vertex", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_vrtx_01SZinMm1BCBnGZaVgdhUV3M", + "name": "__mirascope_formatted_output_tool__", + "input": { + "title": "THE NAME OF THE WIND", + "author": { + "first_name": "Patrick", + "last_name": "Rothfuss", + }, + "rating": 7, + }, + } + ], + }, + ), + ], + "format": { + "name": "Book", + "description": "A book with a rating. The title should be in all caps!", + "schema": { + "$defs": { + "Author": { + "description": "The author of a book.", + "properties": { + "first_name": {"title": "First Name", "type": "string"}, + "last_name": {"title": "Last Name", "type": "string"}, + }, + "required": ["first_name", "last_name"], + "title": "Author", + "type": "object", + } + }, + "description": "A book with a rating. The title should be in all caps!", + "properties": { + "title": {"title": "Title", "type": "string"}, + "author": {"$ref": "#/$defs/Author"}, + "rating": { + "description": "For testing purposes, the rating should be 7", + "title": "Rating", + "type": "integer", + }, + }, + "required": ["title", "author", "rating"], + "title": "Book", + "type": "object", + }, + "mode": "tool", + "formatting_instructions": "Always respond to the user's query using the __mirascope_formatted_output_tool__ tool for structured output.", + }, + "tools": [], + "n_chunks": 21, + } + } +) diff --git a/python/tests/e2e/output/snapshots/test_structured_output/json/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py b/python/tests/e2e/output/snapshots/test_structured_output/json/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py new file mode 100644 index 000000000..a7372191e --- /dev/null +++ b/python/tests/e2e/output/snapshots/test_structured_output/json/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py @@ -0,0 +1,779 @@ +from inline_snapshot import snapshot + +from mirascope.llm import ( + AssistantMessage, + SystemMessage, + Text, + UserMessage, +) + +sync_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "params": {}, + "finish_reason": None, + "messages": [ + SystemMessage( + content=Text( + text="""\ +Respond only with valid JSON that matches this exact schema: +{ + "$defs": { + "Author": { + "description": "The author of a book.", + "properties": { + "first_name": { + "title": "First Name", + "type": "string" + }, + "last_name": { + "title": "Last Name", + "type": "string" + } + }, + "required": [ + "first_name", + "last_name" + ], + "title": "Author", + "type": "object" + } + }, + "description": "A book with a rating. The title should be in all caps!", + "properties": { + "title": { + "title": "Title", + "type": "string" + }, + "author": { + "$ref": "#/$defs/Author" + }, + "rating": { + "description": "For testing purposes, the rating should be 7", + "title": "Rating", + "type": "integer" + } + }, + "required": [ + "title", + "author", + "rating" + ], + "title": "Book", + "type": "object" +}\ +""" + ) + ), + UserMessage( + content=[ + Text( + text="Please recommend the most popular book by Patrick Rothfuss" + ) + ] + ), + AssistantMessage( + content=[ + Text( + text="""\ +```json +{ + "title": "THE NAME OF THE WIND", + "author": { + "first_name": "Patrick", + "last_name": "Rothfuss" + }, + "rating": 7 +} +```\ +""" + ) + ], + provider="anthropic", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "citations": None, + "text": """\ +```json +{ + "title": "THE NAME OF THE WIND", + "author": { + "first_name": "Patrick", + "last_name": "Rothfuss" + }, + "rating": 7 +} +```\ +""", + "type": "text", + } + ], + }, + ), + ], + "format": { + "name": "Book", + "description": "A book with a rating. The title should be in all caps!", + "schema": { + "$defs": { + "Author": { + "description": "The author of a book.", + "properties": { + "first_name": {"title": "First Name", "type": "string"}, + "last_name": {"title": "Last Name", "type": "string"}, + }, + "required": ["first_name", "last_name"], + "title": "Author", + "type": "object", + } + }, + "description": "A book with a rating. The title should be in all caps!", + "properties": { + "title": {"title": "Title", "type": "string"}, + "author": {"$ref": "#/$defs/Author"}, + "rating": { + "description": "For testing purposes, the rating should be 7", + "title": "Rating", + "type": "integer", + }, + }, + "required": ["title", "author", "rating"], + "title": "Book", + "type": "object", + }, + "mode": "json", + "formatting_instructions": """\ +Respond only with valid JSON that matches this exact schema: +{ + "$defs": { + "Author": { + "description": "The author of a book.", + "properties": { + "first_name": { + "title": "First Name", + "type": "string" + }, + "last_name": { + "title": "Last Name", + "type": "string" + } + }, + "required": [ + "first_name", + "last_name" + ], + "title": "Author", + "type": "object" + } + }, + "description": "A book with a rating. The title should be in all caps!", + "properties": { + "title": { + "title": "Title", + "type": "string" + }, + "author": { + "$ref": "#/$defs/Author" + }, + "rating": { + "description": "For testing purposes, the rating should be 7", + "title": "Rating", + "type": "integer" + } + }, + "required": [ + "title", + "author", + "rating" + ], + "title": "Book", + "type": "object" +}\ +""", + }, + "tools": [], + } + } +) +async_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "params": {}, + "finish_reason": None, + "messages": [ + SystemMessage( + content=Text( + text="""\ +Respond only with valid JSON that matches this exact schema: +{ + "$defs": { + "Author": { + "description": "The author of a book.", + "properties": { + "first_name": { + "title": "First Name", + "type": "string" + }, + "last_name": { + "title": "Last Name", + "type": "string" + } + }, + "required": [ + "first_name", + "last_name" + ], + "title": "Author", + "type": "object" + } + }, + "description": "A book with a rating. The title should be in all caps!", + "properties": { + "title": { + "title": "Title", + "type": "string" + }, + "author": { + "$ref": "#/$defs/Author" + }, + "rating": { + "description": "For testing purposes, the rating should be 7", + "title": "Rating", + "type": "integer" + } + }, + "required": [ + "title", + "author", + "rating" + ], + "title": "Book", + "type": "object" +}\ +""" + ) + ), + UserMessage( + content=[ + Text( + text="Please recommend the most popular book by Patrick Rothfuss" + ) + ] + ), + AssistantMessage( + content=[ + Text( + text="""\ +```json +{ + "title": "THE NAME OF THE WIND", + "author": { + "first_name": "Patrick", + "last_name": "Rothfuss" + }, + "rating": 7 +} +```\ +""" + ) + ], + provider="anthropic", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "citations": None, + "text": """\ +```json +{ + "title": "THE NAME OF THE WIND", + "author": { + "first_name": "Patrick", + "last_name": "Rothfuss" + }, + "rating": 7 +} +```\ +""", + "type": "text", + } + ], + }, + ), + ], + "format": { + "name": "Book", + "description": "A book with a rating. The title should be in all caps!", + "schema": { + "$defs": { + "Author": { + "description": "The author of a book.", + "properties": { + "first_name": {"title": "First Name", "type": "string"}, + "last_name": {"title": "Last Name", "type": "string"}, + }, + "required": ["first_name", "last_name"], + "title": "Author", + "type": "object", + } + }, + "description": "A book with a rating. The title should be in all caps!", + "properties": { + "title": {"title": "Title", "type": "string"}, + "author": {"$ref": "#/$defs/Author"}, + "rating": { + "description": "For testing purposes, the rating should be 7", + "title": "Rating", + "type": "integer", + }, + }, + "required": ["title", "author", "rating"], + "title": "Book", + "type": "object", + }, + "mode": "json", + "formatting_instructions": """\ +Respond only with valid JSON that matches this exact schema: +{ + "$defs": { + "Author": { + "description": "The author of a book.", + "properties": { + "first_name": { + "title": "First Name", + "type": "string" + }, + "last_name": { + "title": "Last Name", + "type": "string" + } + }, + "required": [ + "first_name", + "last_name" + ], + "title": "Author", + "type": "object" + } + }, + "description": "A book with a rating. The title should be in all caps!", + "properties": { + "title": { + "title": "Title", + "type": "string" + }, + "author": { + "$ref": "#/$defs/Author" + }, + "rating": { + "description": "For testing purposes, the rating should be 7", + "title": "Rating", + "type": "integer" + } + }, + "required": [ + "title", + "author", + "rating" + ], + "title": "Book", + "type": "object" +}\ +""", + }, + "tools": [], + } + } +) +stream_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "finish_reason": None, + "messages": [ + SystemMessage( + content=Text( + text="""\ +Respond only with valid JSON that matches this exact schema: +{ + "$defs": { + "Author": { + "description": "The author of a book.", + "properties": { + "first_name": { + "title": "First Name", + "type": "string" + }, + "last_name": { + "title": "Last Name", + "type": "string" + } + }, + "required": [ + "first_name", + "last_name" + ], + "title": "Author", + "type": "object" + } + }, + "description": "A book with a rating. The title should be in all caps!", + "properties": { + "title": { + "title": "Title", + "type": "string" + }, + "author": { + "$ref": "#/$defs/Author" + }, + "rating": { + "description": "For testing purposes, the rating should be 7", + "title": "Rating", + "type": "integer" + } + }, + "required": [ + "title", + "author", + "rating" + ], + "title": "Book", + "type": "object" +}\ +""" + ) + ), + UserMessage( + content=[ + Text( + text="Please recommend the most popular book by Patrick Rothfuss" + ) + ] + ), + AssistantMessage( + content=[ + Text( + text="""\ +```json +{ + "title": "THE NAME OF THE WIND", + "author": { + "first_name": "Patrick", + "last_name": "Rothfuss" + }, + "rating": 7 +} +```\ +""" + ) + ], + provider="anthropic-vertex", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "type": "text", + "text": """\ +```json +{ + "title": "THE NAME OF THE WIND", + "author": { + "first_name": "Patrick", + "last_name": "Rothfuss" + }, + "rating": 7 +} +```\ +""", + } + ], + }, + ), + ], + "format": { + "name": "Book", + "description": "A book with a rating. The title should be in all caps!", + "schema": { + "$defs": { + "Author": { + "description": "The author of a book.", + "properties": { + "first_name": {"title": "First Name", "type": "string"}, + "last_name": {"title": "Last Name", "type": "string"}, + }, + "required": ["first_name", "last_name"], + "title": "Author", + "type": "object", + } + }, + "description": "A book with a rating. The title should be in all caps!", + "properties": { + "title": {"title": "Title", "type": "string"}, + "author": {"$ref": "#/$defs/Author"}, + "rating": { + "description": "For testing purposes, the rating should be 7", + "title": "Rating", + "type": "integer", + }, + }, + "required": ["title", "author", "rating"], + "title": "Book", + "type": "object", + }, + "mode": "json", + "formatting_instructions": """\ +Respond only with valid JSON that matches this exact schema: +{ + "$defs": { + "Author": { + "description": "The author of a book.", + "properties": { + "first_name": { + "title": "First Name", + "type": "string" + }, + "last_name": { + "title": "Last Name", + "type": "string" + } + }, + "required": [ + "first_name", + "last_name" + ], + "title": "Author", + "type": "object" + } + }, + "description": "A book with a rating. The title should be in all caps!", + "properties": { + "title": { + "title": "Title", + "type": "string" + }, + "author": { + "$ref": "#/$defs/Author" + }, + "rating": { + "description": "For testing purposes, the rating should be 7", + "title": "Rating", + "type": "integer" + } + }, + "required": [ + "title", + "author", + "rating" + ], + "title": "Book", + "type": "object" +}\ +""", + }, + "tools": [], + "n_chunks": 14, + } + } +) +async_stream_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "finish_reason": None, + "messages": [ + SystemMessage( + content=Text( + text="""\ +Respond only with valid JSON that matches this exact schema: +{ + "$defs": { + "Author": { + "description": "The author of a book.", + "properties": { + "first_name": { + "title": "First Name", + "type": "string" + }, + "last_name": { + "title": "Last Name", + "type": "string" + } + }, + "required": [ + "first_name", + "last_name" + ], + "title": "Author", + "type": "object" + } + }, + "description": "A book with a rating. The title should be in all caps!", + "properties": { + "title": { + "title": "Title", + "type": "string" + }, + "author": { + "$ref": "#/$defs/Author" + }, + "rating": { + "description": "For testing purposes, the rating should be 7", + "title": "Rating", + "type": "integer" + } + }, + "required": [ + "title", + "author", + "rating" + ], + "title": "Book", + "type": "object" +}\ +""" + ) + ), + UserMessage( + content=[ + Text( + text="Please recommend the most popular book by Patrick Rothfuss" + ) + ] + ), + AssistantMessage( + content=[ + Text( + text="""\ +```json +{ + "title": "THE NAME OF THE WIND", + "author": { + "first_name": "Patrick", + "last_name": "Rothfuss" + }, + "rating": 7 +} +```\ +""" + ) + ], + provider="anthropic-vertex", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "type": "text", + "text": """\ +```json +{ + "title": "THE NAME OF THE WIND", + "author": { + "first_name": "Patrick", + "last_name": "Rothfuss" + }, + "rating": 7 +} +```\ +""", + } + ], + }, + ), + ], + "format": { + "name": "Book", + "description": "A book with a rating. The title should be in all caps!", + "schema": { + "$defs": { + "Author": { + "description": "The author of a book.", + "properties": { + "first_name": {"title": "First Name", "type": "string"}, + "last_name": {"title": "Last Name", "type": "string"}, + }, + "required": ["first_name", "last_name"], + "title": "Author", + "type": "object", + } + }, + "description": "A book with a rating. The title should be in all caps!", + "properties": { + "title": {"title": "Title", "type": "string"}, + "author": {"$ref": "#/$defs/Author"}, + "rating": { + "description": "For testing purposes, the rating should be 7", + "title": "Rating", + "type": "integer", + }, + }, + "required": ["title", "author", "rating"], + "title": "Book", + "type": "object", + }, + "mode": "json", + "formatting_instructions": """\ +Respond only with valid JSON that matches this exact schema: +{ + "$defs": { + "Author": { + "description": "The author of a book.", + "properties": { + "first_name": { + "title": "First Name", + "type": "string" + }, + "last_name": { + "title": "Last Name", + "type": "string" + } + }, + "required": [ + "first_name", + "last_name" + ], + "title": "Author", + "type": "object" + } + }, + "description": "A book with a rating. The title should be in all caps!", + "properties": { + "title": { + "title": "Title", + "type": "string" + }, + "author": { + "$ref": "#/$defs/Author" + }, + "rating": { + "description": "For testing purposes, the rating should be 7", + "title": "Rating", + "type": "integer" + } + }, + "required": [ + "title", + "author", + "rating" + ], + "title": "Book", + "type": "object" +}\ +""", + }, + "tools": [], + "n_chunks": 14, + } + } +) diff --git a/python/tests/e2e/output/snapshots/test_structured_output/strict/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py b/python/tests/e2e/output/snapshots/test_structured_output/strict/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py new file mode 100644 index 000000000..9ade30f3d --- /dev/null +++ b/python/tests/e2e/output/snapshots/test_structured_output/strict/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py @@ -0,0 +1,50 @@ +from inline_snapshot import snapshot + +sync_snapshot = snapshot( + { + "exception": { + "type": "FormattingModeNotSupportedError", + "args": "(\"Formatting mode 'strict' is not supported by provider 'anthropic-vertex' for model 'claude-haiku-4-5@20251001'\",)", + "feature": "formatting_mode:strict", + "formatting_mode": "strict", + "model_id": "claude-haiku-4-5@20251001", + "provider": "anthropic-vertex", + } + } +) +async_snapshot = snapshot( + { + "exception": { + "type": "FormattingModeNotSupportedError", + "args": "(\"Formatting mode 'strict' is not supported by provider 'anthropic-vertex' for model 'claude-haiku-4-5@20251001'\",)", + "feature": "formatting_mode:strict", + "formatting_mode": "strict", + "model_id": "claude-haiku-4-5@20251001", + "provider": "anthropic-vertex", + } + } +) +stream_snapshot = snapshot( + { + "exception": { + "type": "FormattingModeNotSupportedError", + "args": "(\"Formatting mode 'strict' is not supported by provider 'anthropic-vertex' for model 'claude-haiku-4-5@20251001'\",)", + "feature": "formatting_mode:strict", + "formatting_mode": "strict", + "model_id": "claude-haiku-4-5@20251001", + "provider": "anthropic-vertex", + } + } +) +async_stream_snapshot = snapshot( + { + "exception": { + "type": "FormattingModeNotSupportedError", + "args": "(\"Formatting mode 'strict' is not supported by provider 'anthropic-vertex' for model 'claude-haiku-4-5@20251001'\",)", + "feature": "formatting_mode:strict", + "formatting_mode": "strict", + "model_id": "claude-haiku-4-5@20251001", + "provider": "anthropic-vertex", + } + } +) diff --git a/python/tests/e2e/output/snapshots/test_structured_output/tool/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py b/python/tests/e2e/output/snapshots/test_structured_output/tool/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py new file mode 100644 index 000000000..3afc61070 --- /dev/null +++ b/python/tests/e2e/output/snapshots/test_structured_output/tool/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py @@ -0,0 +1,349 @@ +from inline_snapshot import snapshot + +from mirascope.llm import ( + AssistantMessage, + SystemMessage, + Text, + UserMessage, +) + +sync_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "params": {}, + "finish_reason": None, + "messages": [ + SystemMessage( + content=Text( + text="Always respond to the user's query using the __mirascope_formatted_output_tool__ tool for structured output." + ) + ), + UserMessage( + content=[ + Text( + text="Please recommend the most popular book by Patrick Rothfuss" + ) + ] + ), + AssistantMessage( + content=[ + Text( + text='{"title": "THE NAME OF THE WIND", "author": {"first_name": "Patrick", "last_name": "Rothfuss"}, "rating": 7}' + ) + ], + provider="anthropic", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "id": "toolu_vrtx_01HQmbjum7i4u7WUVi599qec", + "input": { + "title": "THE NAME OF THE WIND", + "author": { + "first_name": "Patrick", + "last_name": "Rothfuss", + }, + "rating": 7, + }, + "name": "__mirascope_formatted_output_tool__", + "type": "tool_use", + } + ], + }, + ), + ], + "format": { + "name": "Book", + "description": "A book with a rating. The title should be in all caps!", + "schema": { + "$defs": { + "Author": { + "description": "The author of a book.", + "properties": { + "first_name": {"title": "First Name", "type": "string"}, + "last_name": {"title": "Last Name", "type": "string"}, + }, + "required": ["first_name", "last_name"], + "title": "Author", + "type": "object", + } + }, + "description": "A book with a rating. The title should be in all caps!", + "properties": { + "title": {"title": "Title", "type": "string"}, + "author": {"$ref": "#/$defs/Author"}, + "rating": { + "description": "For testing purposes, the rating should be 7", + "title": "Rating", + "type": "integer", + }, + }, + "required": ["title", "author", "rating"], + "title": "Book", + "type": "object", + }, + "mode": "tool", + "formatting_instructions": "Always respond to the user's query using the __mirascope_formatted_output_tool__ tool for structured output.", + }, + "tools": [], + } + } +) +async_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "params": {}, + "finish_reason": None, + "messages": [ + SystemMessage( + content=Text( + text="Always respond to the user's query using the __mirascope_formatted_output_tool__ tool for structured output." + ) + ), + UserMessage( + content=[ + Text( + text="Please recommend the most popular book by Patrick Rothfuss" + ) + ] + ), + AssistantMessage( + content=[ + Text( + text='{"title": "THE NAME OF THE WIND", "author": {"first_name": "Patrick", "last_name": "Rothfuss"}, "rating": 7}' + ) + ], + provider="anthropic", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "id": "toolu_vrtx_01J8b4QV9iJ2FLeUu1rNC1WW", + "input": { + "title": "THE NAME OF THE WIND", + "author": { + "first_name": "Patrick", + "last_name": "Rothfuss", + }, + "rating": 7, + }, + "name": "__mirascope_formatted_output_tool__", + "type": "tool_use", + } + ], + }, + ), + ], + "format": { + "name": "Book", + "description": "A book with a rating. The title should be in all caps!", + "schema": { + "$defs": { + "Author": { + "description": "The author of a book.", + "properties": { + "first_name": {"title": "First Name", "type": "string"}, + "last_name": {"title": "Last Name", "type": "string"}, + }, + "required": ["first_name", "last_name"], + "title": "Author", + "type": "object", + } + }, + "description": "A book with a rating. The title should be in all caps!", + "properties": { + "title": {"title": "Title", "type": "string"}, + "author": {"$ref": "#/$defs/Author"}, + "rating": { + "description": "For testing purposes, the rating should be 7", + "title": "Rating", + "type": "integer", + }, + }, + "required": ["title", "author", "rating"], + "title": "Book", + "type": "object", + }, + "mode": "tool", + "formatting_instructions": "Always respond to the user's query using the __mirascope_formatted_output_tool__ tool for structured output.", + }, + "tools": [], + } + } +) +stream_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "finish_reason": None, + "messages": [ + SystemMessage( + content=Text( + text="Always respond to the user's query using the __mirascope_formatted_output_tool__ tool for structured output." + ) + ), + UserMessage( + content=[ + Text( + text="Please recommend the most popular book by Patrick Rothfuss" + ) + ] + ), + AssistantMessage( + content=[ + Text( + text='{"title": "THE NAME OF THE WIND", "author": {"first_name":"Patrick","last_name":"Rothfuss"}, "rating": 7}' + ) + ], + provider="anthropic-vertex", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_vrtx_011nT6GEPBScYdS1jzr5ixhE", + "name": "__mirascope_formatted_output_tool__", + "input": { + "title": "THE NAME OF THE WIND", + "author": { + "first_name": "Patrick", + "last_name": "Rothfuss", + }, + "rating": 7, + }, + } + ], + }, + ), + ], + "format": { + "name": "Book", + "description": "A book with a rating. The title should be in all caps!", + "schema": { + "$defs": { + "Author": { + "description": "The author of a book.", + "properties": { + "first_name": {"title": "First Name", "type": "string"}, + "last_name": {"title": "Last Name", "type": "string"}, + }, + "required": ["first_name", "last_name"], + "title": "Author", + "type": "object", + } + }, + "description": "A book with a rating. The title should be in all caps!", + "properties": { + "title": {"title": "Title", "type": "string"}, + "author": {"$ref": "#/$defs/Author"}, + "rating": { + "description": "For testing purposes, the rating should be 7", + "title": "Rating", + "type": "integer", + }, + }, + "required": ["title", "author", "rating"], + "title": "Book", + "type": "object", + }, + "mode": "tool", + "formatting_instructions": "Always respond to the user's query using the __mirascope_formatted_output_tool__ tool for structured output.", + }, + "tools": [], + "n_chunks": 21, + } + } +) +async_stream_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "finish_reason": None, + "messages": [ + SystemMessage( + content=Text( + text="Always respond to the user's query using the __mirascope_formatted_output_tool__ tool for structured output." + ) + ), + UserMessage( + content=[ + Text( + text="Please recommend the most popular book by Patrick Rothfuss" + ) + ] + ), + AssistantMessage( + content=[ + Text( + text='{"title": "THE NAME OF THE WIND", "author": {"first_name":"Patrick","last_name":"Rothfuss"}, "rating": 7}' + ) + ], + provider="anthropic-vertex", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_vrtx_01988gNM7txPH2FcPk6W7Cge", + "name": "__mirascope_formatted_output_tool__", + "input": { + "title": "THE NAME OF THE WIND", + "author": { + "first_name": "Patrick", + "last_name": "Rothfuss", + }, + "rating": 7, + }, + } + ], + }, + ), + ], + "format": { + "name": "Book", + "description": "A book with a rating. The title should be in all caps!", + "schema": { + "$defs": { + "Author": { + "description": "The author of a book.", + "properties": { + "first_name": {"title": "First Name", "type": "string"}, + "last_name": {"title": "Last Name", "type": "string"}, + }, + "required": ["first_name", "last_name"], + "title": "Author", + "type": "object", + } + }, + "description": "A book with a rating. The title should be in all caps!", + "properties": { + "title": {"title": "Title", "type": "string"}, + "author": {"$ref": "#/$defs/Author"}, + "rating": { + "description": "For testing purposes, the rating should be 7", + "title": "Rating", + "type": "integer", + }, + }, + "required": ["title", "author", "rating"], + "title": "Book", + "type": "object", + }, + "mode": "tool", + "formatting_instructions": "Always respond to the user's query using the __mirascope_formatted_output_tool__ tool for structured output.", + }, + "tools": [], + "n_chunks": 17, + } + } +) diff --git a/python/tests/e2e/output/snapshots/test_structured_output_with_tools/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py b/python/tests/e2e/output/snapshots/test_structured_output_with_tools/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py new file mode 100644 index 000000000..46f955c03 --- /dev/null +++ b/python/tests/e2e/output/snapshots/test_structured_output_with_tools/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py @@ -0,0 +1,499 @@ +from inline_snapshot import snapshot + +from mirascope.llm import ( + AssistantMessage, + SystemMessage, + Text, + ToolCall, + ToolOutput, + UserMessage, +) + +sync_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "params": {}, + "finish_reason": None, + "messages": [ + SystemMessage( + content=Text( + text="Always respond to the user's query using the __mirascope_formatted_output_tool__ tool for structured output." + ) + ), + UserMessage( + content=[ + Text( + text="Please look up the book with ISBN 0-7653-1178-X and provide detailed info and a recommendation score" + ) + ] + ), + AssistantMessage( + content=[ + ToolCall( + id="toolu_vrtx_01Gn5Xx4GXanU76ojUScEPJJ", + name="get_book_info", + args='{"isbn": "0-7653-1178-X"}', + ) + ], + provider="anthropic", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "id": "toolu_vrtx_01Gn5Xx4GXanU76ojUScEPJJ", + "input": {"isbn": "0-7653-1178-X"}, + "name": "get_book_info", + "type": "tool_use", + } + ], + }, + ), + UserMessage( + content=[ + ToolOutput( + id="toolu_vrtx_01Gn5Xx4GXanU76ojUScEPJJ", + name="get_book_info", + value="Title: Mistborn: The Final Empire, Author: Brandon Sanderson, Pages: 544, Published: 2006-07-25", + ) + ] + ), + AssistantMessage( + content=[ + Text( + text='{"title": "Mistborn: The Final Empire", "author": "Brandon Sanderson", "pages": 544, "publication_year": 2006}' + ) + ], + provider="anthropic", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "id": "toolu_vrtx_01X5KcHvApA5Wv3tQM9zkSUr", + "input": { + "title": "Mistborn: The Final Empire", + "author": "Brandon Sanderson", + "pages": 544, + "publication_year": 2006, + }, + "name": "__mirascope_formatted_output_tool__", + "type": "tool_use", + } + ], + }, + ), + ], + "format": { + "name": "BookSummary", + "description": None, + "schema": { + "properties": { + "title": {"title": "Title", "type": "string"}, + "author": {"title": "Author", "type": "string"}, + "pages": {"title": "Pages", "type": "integer"}, + "publication_year": { + "title": "Publication Year", + "type": "integer", + }, + }, + "required": ["title", "author", "pages", "publication_year"], + "title": "BookSummary", + "type": "object", + }, + "mode": "tool", + "formatting_instructions": "Always respond to the user's query using the __mirascope_formatted_output_tool__ tool for structured output.", + }, + "tools": [ + { + "name": "get_book_info", + "description": "Look up book information by ISBN.", + "parameters": """\ +{ + "properties": { + "isbn": { + "title": "Isbn", + "type": "string" + } + }, + "required": [ + "isbn" + ], + "additionalProperties": false, + "defs": null +}\ +""", + "strict": False, + } + ], + } + } +) +async_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "params": {}, + "finish_reason": None, + "messages": [ + SystemMessage( + content=Text( + text="Always respond to the user's query using the __mirascope_formatted_output_tool__ tool for structured output." + ) + ), + UserMessage( + content=[ + Text( + text="Please look up the book with ISBN 0-7653-1178-X and provide detailed info and a recommendation score" + ) + ] + ), + AssistantMessage( + content=[ + ToolCall( + id="toolu_vrtx_01Hc5RWMoJ92htERAsQbU1jv", + name="get_book_info", + args='{"isbn": "0-7653-1178-X"}', + ) + ], + provider="anthropic", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "id": "toolu_vrtx_01Hc5RWMoJ92htERAsQbU1jv", + "input": {"isbn": "0-7653-1178-X"}, + "name": "get_book_info", + "type": "tool_use", + } + ], + }, + ), + UserMessage( + content=[ + ToolOutput( + id="toolu_vrtx_01Hc5RWMoJ92htERAsQbU1jv", + name="get_book_info", + value="Title: Mistborn: The Final Empire, Author: Brandon Sanderson, Pages: 544, Published: 2006-07-25", + ) + ] + ), + AssistantMessage( + content=[ + Text( + text='{"title": "Mistborn: The Final Empire", "author": "Brandon Sanderson", "pages": 544, "publication_year": 2006}' + ) + ], + provider="anthropic", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "id": "toolu_vrtx_01LJQgFeWtYpqjC5eeopRusg", + "input": { + "title": "Mistborn: The Final Empire", + "author": "Brandon Sanderson", + "pages": 544, + "publication_year": 2006, + }, + "name": "__mirascope_formatted_output_tool__", + "type": "tool_use", + } + ], + }, + ), + ], + "format": { + "name": "BookSummary", + "description": None, + "schema": { + "properties": { + "title": {"title": "Title", "type": "string"}, + "author": {"title": "Author", "type": "string"}, + "pages": {"title": "Pages", "type": "integer"}, + "publication_year": { + "title": "Publication Year", + "type": "integer", + }, + }, + "required": ["title", "author", "pages", "publication_year"], + "title": "BookSummary", + "type": "object", + }, + "mode": "tool", + "formatting_instructions": "Always respond to the user's query using the __mirascope_formatted_output_tool__ tool for structured output.", + }, + "tools": [ + { + "name": "get_book_info", + "description": "Look up book information by ISBN.", + "parameters": """\ +{ + "properties": { + "isbn": { + "title": "Isbn", + "type": "string" + } + }, + "required": [ + "isbn" + ], + "additionalProperties": false, + "defs": null +}\ +""", + "strict": False, + } + ], + } + } +) +stream_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "finish_reason": None, + "messages": [ + SystemMessage( + content=Text( + text="Always respond to the user's query using the __mirascope_formatted_output_tool__ tool for structured output." + ) + ), + UserMessage( + content=[ + Text( + text="Please look up the book with ISBN 0-7653-1178-X and provide detailed info and a recommendation score" + ) + ] + ), + AssistantMessage( + content=[ + ToolCall( + id="toolu_vrtx_01XhQUhcZ5PLA7WPjA4XjqyR", + name="get_book_info", + args='{"isbn": "0-7653-1178-X"}', + ) + ], + provider="anthropic-vertex", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_vrtx_01XhQUhcZ5PLA7WPjA4XjqyR", + "name": "get_book_info", + "input": {"isbn": "0-7653-1178-X"}, + } + ], + }, + ), + UserMessage( + content=[ + ToolOutput( + id="toolu_vrtx_01XhQUhcZ5PLA7WPjA4XjqyR", + name="get_book_info", + value="Title: Mistborn: The Final Empire, Author: Brandon Sanderson, Pages: 544, Published: 2006-07-25", + ) + ] + ), + AssistantMessage( + content=[ + Text( + text='{"title": "Mistborn: The Final Empire", "author": "Brandon Sanderson", "pages": 544, "publication_year": 2006}' + ) + ], + provider="anthropic-vertex", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_vrtx_01QWXVrSUAkKjgHpbCsxVoMQ", + "name": "__mirascope_formatted_output_tool__", + "input": { + "title": "Mistborn: The Final Empire", + "author": "Brandon Sanderson", + "pages": 544, + "publication_year": 2006, + }, + } + ], + }, + ), + ], + "format": { + "name": "BookSummary", + "description": None, + "schema": { + "properties": { + "title": {"title": "Title", "type": "string"}, + "author": {"title": "Author", "type": "string"}, + "pages": {"title": "Pages", "type": "integer"}, + "publication_year": { + "title": "Publication Year", + "type": "integer", + }, + }, + "required": ["title", "author", "pages", "publication_year"], + "title": "BookSummary", + "type": "object", + }, + "mode": "tool", + "formatting_instructions": "Always respond to the user's query using the __mirascope_formatted_output_tool__ tool for structured output.", + }, + "tools": [ + { + "name": "get_book_info", + "description": "Look up book information by ISBN.", + "parameters": """\ +{ + "properties": { + "isbn": { + "title": "Isbn", + "type": "string" + } + }, + "required": [ + "isbn" + ], + "additionalProperties": false, + "defs": null +}\ +""", + "strict": False, + } + ], + "n_chunks": 20, + } + } +) +async_stream_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "finish_reason": None, + "messages": [ + SystemMessage( + content=Text( + text="Always respond to the user's query using the __mirascope_formatted_output_tool__ tool for structured output." + ) + ), + UserMessage( + content=[ + Text( + text="Please look up the book with ISBN 0-7653-1178-X and provide detailed info and a recommendation score" + ) + ] + ), + AssistantMessage( + content=[ + ToolCall( + id="toolu_vrtx_01CMW8cN87TTpmuLWTMa95vC", + name="get_book_info", + args='{"isbn": "0-7653-1178-X"}', + ) + ], + provider="anthropic-vertex", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_vrtx_01CMW8cN87TTpmuLWTMa95vC", + "name": "get_book_info", + "input": {"isbn": "0-7653-1178-X"}, + } + ], + }, + ), + UserMessage( + content=[ + ToolOutput( + id="toolu_vrtx_01CMW8cN87TTpmuLWTMa95vC", + name="get_book_info", + value="Title: Mistborn: The Final Empire, Author: Brandon Sanderson, Pages: 544, Published: 2006-07-25", + ) + ] + ), + AssistantMessage( + content=[ + Text( + text='{"title": "Mistborn: The Final Empire", "author": "Brandon Sanderson", "pages": 544, "publication_year": 2006}' + ) + ], + provider="anthropic-vertex", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_vrtx_01TwgavEY99xqv492z4q6EdE", + "name": "__mirascope_formatted_output_tool__", + "input": { + "title": "Mistborn: The Final Empire", + "author": "Brandon Sanderson", + "pages": 544, + "publication_year": 2006, + }, + } + ], + }, + ), + ], + "format": { + "name": "BookSummary", + "description": None, + "schema": { + "properties": { + "title": {"title": "Title", "type": "string"}, + "author": {"title": "Author", "type": "string"}, + "pages": {"title": "Pages", "type": "integer"}, + "publication_year": { + "title": "Publication Year", + "type": "integer", + }, + }, + "required": ["title", "author", "pages", "publication_year"], + "title": "BookSummary", + "type": "object", + }, + "mode": "tool", + "formatting_instructions": "Always respond to the user's query using the __mirascope_formatted_output_tool__ tool for structured output.", + }, + "tools": [ + { + "name": "get_book_info", + "description": "Look up book information by ISBN.", + "parameters": """\ +{ + "properties": { + "isbn": { + "title": "Isbn", + "type": "string" + } + }, + "required": [ + "isbn" + ], + "additionalProperties": false, + "defs": null +}\ +""", + "strict": False, + } + ], + "n_chunks": 21, + } + } +) diff --git a/python/tests/e2e/output/snapshots/test_structured_output_with_tools/json/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py b/python/tests/e2e/output/snapshots/test_structured_output_with_tools/json/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py new file mode 100644 index 000000000..68e1e73cb --- /dev/null +++ b/python/tests/e2e/output/snapshots/test_structured_output_with_tools/json/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py @@ -0,0 +1,990 @@ +from inline_snapshot import snapshot + +from mirascope.llm import ( + AssistantMessage, + SystemMessage, + Text, + ToolCall, + ToolOutput, + UserMessage, +) + +sync_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "params": {}, + "finish_reason": None, + "messages": [ + SystemMessage( + content=Text( + text="""\ +Respond only with valid JSON that matches this exact schema: +{ + "properties": { + "title": { + "title": "Title", + "type": "string" + }, + "author": { + "title": "Author", + "type": "string" + }, + "pages": { + "title": "Pages", + "type": "integer" + }, + "publication_year": { + "title": "Publication Year", + "type": "integer" + } + }, + "required": [ + "title", + "author", + "pages", + "publication_year" + ], + "title": "BookSummary", + "type": "object" +}\ +""" + ) + ), + UserMessage( + content=[ + Text( + text="Please look up the book with ISBN 0-7653-1178-X and provide detailed info and a recommendation score" + ) + ] + ), + AssistantMessage( + content=[ + ToolCall( + id="toolu_vrtx_01PyiJSAkFui5WSfXsQBbD11", + name="get_book_info", + args='{"isbn": "0-7653-1178-X"}', + ) + ], + provider="anthropic", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "id": "toolu_vrtx_01PyiJSAkFui5WSfXsQBbD11", + "input": {"isbn": "0-7653-1178-X"}, + "name": "get_book_info", + "type": "tool_use", + } + ], + }, + ), + UserMessage( + content=[ + ToolOutput( + id="toolu_vrtx_01PyiJSAkFui5WSfXsQBbD11", + name="get_book_info", + value="Title: Mistborn: The Final Empire, Author: Brandon Sanderson, Pages: 544, Published: 2006-07-25", + ) + ] + ), + AssistantMessage( + content=[ + Text( + text="""\ +Based on the book information retrieved, here's the detailed information: + +```json +{ + "title": "Mistborn: The Final Empire", + "author": "Brandon Sanderson", + "pages": 544, + "publication_year": 2006 +} +``` + +**Book Recommendation Score: 9/10** + +**Why I recommend this book:** + +"Mistborn: The Final Empire" is an excellent fantasy novel that deserves high praise: + +- **Outstanding Worldbuilding**: Sanderson creates a richly detailed world with a unique magic system based on consuming metals for supernatural abilities +- **Engaging Plot**: The story follows Vin, a street urchin with extraordinary powers, as she gets caught up in a rebellion against an immortal tyrant +- **Well-Developed Characters**: The protagonist and supporting cast are complex and compelling +- **Extensive Length**: At 544 pages, it provides substantial content and doesn't feel rushed +- **Strong Foundation**: This is the first book in the original Mistborn trilogy, and it sets up an excellent series + +**Best for**: Fans of fantasy, epic adventures, magic systems, and character-driven narratives. It's perfect for readers who enjoy Brandon Sanderson's intricate worldbuilding style. + +**Potential drawback**: The pacing is somewhat deliberate in the beginning, so it might not suit readers who prefer fast-paced narratives from page one.\ +""" + ) + ], + provider="anthropic", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "citations": None, + "text": """\ +Based on the book information retrieved, here's the detailed information: + +```json +{ + "title": "Mistborn: The Final Empire", + "author": "Brandon Sanderson", + "pages": 544, + "publication_year": 2006 +} +``` + +**Book Recommendation Score: 9/10** + +**Why I recommend this book:** + +"Mistborn: The Final Empire" is an excellent fantasy novel that deserves high praise: + +- **Outstanding Worldbuilding**: Sanderson creates a richly detailed world with a unique magic system based on consuming metals for supernatural abilities +- **Engaging Plot**: The story follows Vin, a street urchin with extraordinary powers, as she gets caught up in a rebellion against an immortal tyrant +- **Well-Developed Characters**: The protagonist and supporting cast are complex and compelling +- **Extensive Length**: At 544 pages, it provides substantial content and doesn't feel rushed +- **Strong Foundation**: This is the first book in the original Mistborn trilogy, and it sets up an excellent series + +**Best for**: Fans of fantasy, epic adventures, magic systems, and character-driven narratives. It's perfect for readers who enjoy Brandon Sanderson's intricate worldbuilding style. + +**Potential drawback**: The pacing is somewhat deliberate in the beginning, so it might not suit readers who prefer fast-paced narratives from page one.\ +""", + "type": "text", + } + ], + }, + ), + ], + "format": { + "name": "BookSummary", + "description": None, + "schema": { + "properties": { + "title": {"title": "Title", "type": "string"}, + "author": {"title": "Author", "type": "string"}, + "pages": {"title": "Pages", "type": "integer"}, + "publication_year": { + "title": "Publication Year", + "type": "integer", + }, + }, + "required": ["title", "author", "pages", "publication_year"], + "title": "BookSummary", + "type": "object", + }, + "mode": "json", + "formatting_instructions": """\ +Respond only with valid JSON that matches this exact schema: +{ + "properties": { + "title": { + "title": "Title", + "type": "string" + }, + "author": { + "title": "Author", + "type": "string" + }, + "pages": { + "title": "Pages", + "type": "integer" + }, + "publication_year": { + "title": "Publication Year", + "type": "integer" + } + }, + "required": [ + "title", + "author", + "pages", + "publication_year" + ], + "title": "BookSummary", + "type": "object" +}\ +""", + }, + "tools": [ + { + "name": "get_book_info", + "description": "Look up book information by ISBN.", + "parameters": """\ +{ + "properties": { + "isbn": { + "title": "Isbn", + "type": "string" + } + }, + "required": [ + "isbn" + ], + "additionalProperties": false, + "defs": null +}\ +""", + "strict": False, + } + ], + } + } +) +async_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "params": {}, + "finish_reason": None, + "messages": [ + SystemMessage( + content=Text( + text="""\ +Respond only with valid JSON that matches this exact schema: +{ + "properties": { + "title": { + "title": "Title", + "type": "string" + }, + "author": { + "title": "Author", + "type": "string" + }, + "pages": { + "title": "Pages", + "type": "integer" + }, + "publication_year": { + "title": "Publication Year", + "type": "integer" + } + }, + "required": [ + "title", + "author", + "pages", + "publication_year" + ], + "title": "BookSummary", + "type": "object" +}\ +""" + ) + ), + UserMessage( + content=[ + Text( + text="Please look up the book with ISBN 0-7653-1178-X and provide detailed info and a recommendation score" + ) + ] + ), + AssistantMessage( + content=[ + ToolCall( + id="toolu_vrtx_01Q6RwxnsNxEGT15NLfqphac", + name="get_book_info", + args='{"isbn": "0-7653-1178-X"}', + ) + ], + provider="anthropic", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "id": "toolu_vrtx_01Q6RwxnsNxEGT15NLfqphac", + "input": {"isbn": "0-7653-1178-X"}, + "name": "get_book_info", + "type": "tool_use", + } + ], + }, + ), + UserMessage( + content=[ + ToolOutput( + id="toolu_vrtx_01Q6RwxnsNxEGT15NLfqphac", + name="get_book_info", + value="Title: Mistborn: The Final Empire, Author: Brandon Sanderson, Pages: 544, Published: 2006-07-25", + ) + ] + ), + AssistantMessage( + content=[ + Text( + text="""\ +Based on the ISBN lookup, here is the book information in the requested JSON format: + +```json +{ + "title": "Mistborn: The Final Empire", + "author": "Brandon Sanderson", + "pages": 544, + "publication_year": 2006 +} +``` + +**Detailed Information & Recommendation:** + +**Mistborn: The Final Empire** is the first book in Brandon Sanderson's acclaimed Mistborn trilogy. Here's my assessment: + +**Summary:** +This epic fantasy novel is set in a dark, ash-covered world where a tyrannical immortal god-like being has ruled for a thousand years. The story follows Vin, a street orphan with latent magical abilities, who is recruited into a group plotting to overthrow this oppressive regime. The book combines intricate magic systems, heist-style plotting, and character-driven storytelling. + +**Strengths:** +- **Unique magic system**: Sanderson's allomancy is meticulously crafted and consistently applied +- **Compelling protagonist**: Vin's character arc is engaging and emotionally resonant +- **Plot twists**: Several shocking revelations that reframe the narrative +- **World-building**: A rich, distinctive world despite the bleak setting +- **Accessible length**: At 544 pages, it's substantial but not overwhelming + +**Recommendation Score: 9/10** + +This is a highly recommended book for fantasy enthusiasts. It's perfect for readers who enjoy: +- Complex magic systems +- Character development +- Epic fantasy with darker tones +- Well-planned series with rewarding conclusions + +**Best For:** Fans of fantasy who appreciated authors like Patrick Rothfuss or N.K. Jemisin, and those looking for a gripping standalone (with sequels available).\ +""" + ) + ], + provider="anthropic", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "citations": None, + "text": """\ +Based on the ISBN lookup, here is the book information in the requested JSON format: + +```json +{ + "title": "Mistborn: The Final Empire", + "author": "Brandon Sanderson", + "pages": 544, + "publication_year": 2006 +} +``` + +**Detailed Information & Recommendation:** + +**Mistborn: The Final Empire** is the first book in Brandon Sanderson's acclaimed Mistborn trilogy. Here's my assessment: + +**Summary:** +This epic fantasy novel is set in a dark, ash-covered world where a tyrannical immortal god-like being has ruled for a thousand years. The story follows Vin, a street orphan with latent magical abilities, who is recruited into a group plotting to overthrow this oppressive regime. The book combines intricate magic systems, heist-style plotting, and character-driven storytelling. + +**Strengths:** +- **Unique magic system**: Sanderson's allomancy is meticulously crafted and consistently applied +- **Compelling protagonist**: Vin's character arc is engaging and emotionally resonant +- **Plot twists**: Several shocking revelations that reframe the narrative +- **World-building**: A rich, distinctive world despite the bleak setting +- **Accessible length**: At 544 pages, it's substantial but not overwhelming + +**Recommendation Score: 9/10** + +This is a highly recommended book for fantasy enthusiasts. It's perfect for readers who enjoy: +- Complex magic systems +- Character development +- Epic fantasy with darker tones +- Well-planned series with rewarding conclusions + +**Best For:** Fans of fantasy who appreciated authors like Patrick Rothfuss or N.K. Jemisin, and those looking for a gripping standalone (with sequels available).\ +""", + "type": "text", + } + ], + }, + ), + ], + "format": { + "name": "BookSummary", + "description": None, + "schema": { + "properties": { + "title": {"title": "Title", "type": "string"}, + "author": {"title": "Author", "type": "string"}, + "pages": {"title": "Pages", "type": "integer"}, + "publication_year": { + "title": "Publication Year", + "type": "integer", + }, + }, + "required": ["title", "author", "pages", "publication_year"], + "title": "BookSummary", + "type": "object", + }, + "mode": "json", + "formatting_instructions": """\ +Respond only with valid JSON that matches this exact schema: +{ + "properties": { + "title": { + "title": "Title", + "type": "string" + }, + "author": { + "title": "Author", + "type": "string" + }, + "pages": { + "title": "Pages", + "type": "integer" + }, + "publication_year": { + "title": "Publication Year", + "type": "integer" + } + }, + "required": [ + "title", + "author", + "pages", + "publication_year" + ], + "title": "BookSummary", + "type": "object" +}\ +""", + }, + "tools": [ + { + "name": "get_book_info", + "description": "Look up book information by ISBN.", + "parameters": """\ +{ + "properties": { + "isbn": { + "title": "Isbn", + "type": "string" + } + }, + "required": [ + "isbn" + ], + "additionalProperties": false, + "defs": null +}\ +""", + "strict": False, + } + ], + } + } +) +stream_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "finish_reason": None, + "messages": [ + SystemMessage( + content=Text( + text="""\ +Respond only with valid JSON that matches this exact schema: +{ + "properties": { + "title": { + "title": "Title", + "type": "string" + }, + "author": { + "title": "Author", + "type": "string" + }, + "pages": { + "title": "Pages", + "type": "integer" + }, + "publication_year": { + "title": "Publication Year", + "type": "integer" + } + }, + "required": [ + "title", + "author", + "pages", + "publication_year" + ], + "title": "BookSummary", + "type": "object" +}\ +""" + ) + ), + UserMessage( + content=[ + Text( + text="Please look up the book with ISBN 0-7653-1178-X and provide detailed info and a recommendation score" + ) + ] + ), + AssistantMessage( + content=[ + ToolCall( + id="toolu_vrtx_01GVnLpkY1jhJ9ARrPWepP4i", + name="get_book_info", + args='{"isbn": "0-7653-1178-X"}', + ) + ], + provider="anthropic-vertex", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_vrtx_01GVnLpkY1jhJ9ARrPWepP4i", + "name": "get_book_info", + "input": {"isbn": "0-7653-1178-X"}, + } + ], + }, + ), + UserMessage( + content=[ + ToolOutput( + id="toolu_vrtx_01GVnLpkY1jhJ9ARrPWepP4i", + name="get_book_info", + value="Title: Mistborn: The Final Empire, Author: Brandon Sanderson, Pages: 544, Published: 2006-07-25", + ) + ] + ), + AssistantMessage( + content=[ + Text( + text="""\ +Based on the book information retrieved, here are the details: + +```json +{ + "title": "Mistborn: The Final Empire", + "author": "Brandon Sanderson", + "pages": 544, + "publication_year": 2006 +} +``` + +## Detailed Information & Recommendation + +**Book Summary:** +"Mistborn: The Final Empire" is the first book in Brandon Sanderson's acclaimed Mistborn trilogy. It's an epic fantasy novel featuring an intricate magic system based on metal-burning (Allomancy) and a compelling story of revolution against an immortal tyrant. + +**Key Details:** +- **Length:** 544 pages (a substantial read) +- **Published:** 2006 +- **Genre:** Epic Fantasy + +**Recommendation Score: 9/10** + +This is an excellent choice for fantasy readers! Here's why: + +✅ **Strengths:** +- Innovative and well-developed magic system (one of Sanderson's trademarks) +- Compelling character development and relationships +- Strong plot with excellent pacing that keeps you engaged +- The book stands well on its own while offering a satisfying trilogy +- Sanderson's prose is clear and accessible + +⚠️ **Consider if:** +- You enjoy complex fantasy worlds and magic systems +- You like character-driven narratives with emotional depth +- You have time for a moderately lengthy fantasy novel +- You appreciate detailed world-building + +**Who should read it:** Fans of fantasy, those new to Brandon Sanderson's work, and anyone looking for a gripping page-turner with substance.\ +""" + ) + ], + provider="anthropic-vertex", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "type": "text", + "text": """\ +Based on the book information retrieved, here are the details: + +```json +{ + "title": "Mistborn: The Final Empire", + "author": "Brandon Sanderson", + "pages": 544, + "publication_year": 2006 +} +``` + +## Detailed Information & Recommendation + +**Book Summary:** +"Mistborn: The Final Empire" is the first book in Brandon Sanderson's acclaimed Mistborn trilogy. It's an epic fantasy novel featuring an intricate magic system based on metal-burning (Allomancy) and a compelling story of revolution against an immortal tyrant. + +**Key Details:** +- **Length:** 544 pages (a substantial read) +- **Published:** 2006 +- **Genre:** Epic Fantasy + +**Recommendation Score: 9/10** + +This is an excellent choice for fantasy readers! Here's why: + +✅ **Strengths:** +- Innovative and well-developed magic system (one of Sanderson's trademarks) +- Compelling character development and relationships +- Strong plot with excellent pacing that keeps you engaged +- The book stands well on its own while offering a satisfying trilogy +- Sanderson's prose is clear and accessible + +⚠️ **Consider if:** +- You enjoy complex fantasy worlds and magic systems +- You like character-driven narratives with emotional depth +- You have time for a moderately lengthy fantasy novel +- You appreciate detailed world-building + +**Who should read it:** Fans of fantasy, those new to Brandon Sanderson's work, and anyone looking for a gripping page-turner with substance.\ +""", + } + ], + }, + ), + ], + "format": { + "name": "BookSummary", + "description": None, + "schema": { + "properties": { + "title": {"title": "Title", "type": "string"}, + "author": {"title": "Author", "type": "string"}, + "pages": {"title": "Pages", "type": "integer"}, + "publication_year": { + "title": "Publication Year", + "type": "integer", + }, + }, + "required": ["title", "author", "pages", "publication_year"], + "title": "BookSummary", + "type": "object", + }, + "mode": "json", + "formatting_instructions": """\ +Respond only with valid JSON that matches this exact schema: +{ + "properties": { + "title": { + "title": "Title", + "type": "string" + }, + "author": { + "title": "Author", + "type": "string" + }, + "pages": { + "title": "Pages", + "type": "integer" + }, + "publication_year": { + "title": "Publication Year", + "type": "integer" + } + }, + "required": [ + "title", + "author", + "pages", + "publication_year" + ], + "title": "BookSummary", + "type": "object" +}\ +""", + }, + "tools": [ + { + "name": "get_book_info", + "description": "Look up book information by ISBN.", + "parameters": """\ +{ + "properties": { + "isbn": { + "title": "Isbn", + "type": "string" + } + }, + "required": [ + "isbn" + ], + "additionalProperties": false, + "defs": null +}\ +""", + "strict": False, + } + ], + "n_chunks": 107, + } + } +) +async_stream_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "finish_reason": None, + "messages": [ + SystemMessage( + content=Text( + text="""\ +Respond only with valid JSON that matches this exact schema: +{ + "properties": { + "title": { + "title": "Title", + "type": "string" + }, + "author": { + "title": "Author", + "type": "string" + }, + "pages": { + "title": "Pages", + "type": "integer" + }, + "publication_year": { + "title": "Publication Year", + "type": "integer" + } + }, + "required": [ + "title", + "author", + "pages", + "publication_year" + ], + "title": "BookSummary", + "type": "object" +}\ +""" + ) + ), + UserMessage( + content=[ + Text( + text="Please look up the book with ISBN 0-7653-1178-X and provide detailed info and a recommendation score" + ) + ] + ), + AssistantMessage( + content=[ + Text(text="I'll look up the book information for you."), + ToolCall( + id="toolu_vrtx_01BKUQvzV5Ysrz6qTC39ixfL", + name="get_book_info", + args='{"isbn": "0-7653-1178-X"}', + ), + ], + provider="anthropic-vertex", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "type": "text", + "text": "I'll look up the book information for you.", + }, + { + "type": "tool_use", + "id": "toolu_vrtx_01BKUQvzV5Ysrz6qTC39ixfL", + "name": "get_book_info", + "input": {"isbn": "0-7653-1178-X"}, + }, + ], + }, + ), + UserMessage( + content=[ + ToolOutput( + id="toolu_vrtx_01BKUQvzV5Ysrz6qTC39ixfL", + name="get_book_info", + value="Title: Mistborn: The Final Empire, Author: Brandon Sanderson, Pages: 544, Published: 2006-07-25", + ) + ] + ), + AssistantMessage( + content=[ + Text( + text="""\ +Based on the lookup, here's the detailed information: + +```json +{ + "title": "Mistborn: The Final Empire", + "author": "Brandon Sanderson", + "pages": 544, + "publication_year": 2006 +} +``` + +**Detailed Information:** +- **Title:** Mistborn: The Final Empire +- **Author:** Brandon Sanderson +- **Pages:** 544 +- **Publication Year:** 2006 +- **Publisher:** Tor Books (based on the ISBN format) + +**Recommendation Score: 9/10** + +**Why This Book is Highly Recommended:** + +1. **Epic Fantasy Excellence** - Brandon Sanderson is renowned for his intricate worldbuilding and magic systems, and this book showcases both brilliantly. + +2. **Compelling Narrative** - The story follows Vin, a street urchin who discovers extraordinary powers within a richly developed fantasy world. The character development is exceptional. + +3. **Innovative Magic System** - Sanderson's "Allomancy" is one of the most creative magic systems in fantasy literature, with clear rules and logical limitations. + +4. **Page-Turner Quality** - At 544 pages, the book is substantial but highly engaging with excellent pacing that keeps readers invested throughout. + +5. **Series Starter** - This is the beginning of the original Mistborn trilogy, perfect for those looking to dive into a complete fantasy series. + +**Best For:** Fantasy enthusiasts, readers who enjoy complex magic systems, and anyone seeking immersive worldbuilding with strong character arcs.\ +""" + ) + ], + provider="anthropic-vertex", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "type": "text", + "text": """\ +Based on the lookup, here's the detailed information: + +```json +{ + "title": "Mistborn: The Final Empire", + "author": "Brandon Sanderson", + "pages": 544, + "publication_year": 2006 +} +``` + +**Detailed Information:** +- **Title:** Mistborn: The Final Empire +- **Author:** Brandon Sanderson +- **Pages:** 544 +- **Publication Year:** 2006 +- **Publisher:** Tor Books (based on the ISBN format) + +**Recommendation Score: 9/10** + +**Why This Book is Highly Recommended:** + +1. **Epic Fantasy Excellence** - Brandon Sanderson is renowned for his intricate worldbuilding and magic systems, and this book showcases both brilliantly. + +2. **Compelling Narrative** - The story follows Vin, a street urchin who discovers extraordinary powers within a richly developed fantasy world. The character development is exceptional. + +3. **Innovative Magic System** - Sanderson's "Allomancy" is one of the most creative magic systems in fantasy literature, with clear rules and logical limitations. + +4. **Page-Turner Quality** - At 544 pages, the book is substantial but highly engaging with excellent pacing that keeps readers invested throughout. + +5. **Series Starter** - This is the beginning of the original Mistborn trilogy, perfect for those looking to dive into a complete fantasy series. + +**Best For:** Fantasy enthusiasts, readers who enjoy complex magic systems, and anyone seeking immersive worldbuilding with strong character arcs.\ +""", + } + ], + }, + ), + ], + "format": { + "name": "BookSummary", + "description": None, + "schema": { + "properties": { + "title": {"title": "Title", "type": "string"}, + "author": {"title": "Author", "type": "string"}, + "pages": {"title": "Pages", "type": "integer"}, + "publication_year": { + "title": "Publication Year", + "type": "integer", + }, + }, + "required": ["title", "author", "pages", "publication_year"], + "title": "BookSummary", + "type": "object", + }, + "mode": "json", + "formatting_instructions": """\ +Respond only with valid JSON that matches this exact schema: +{ + "properties": { + "title": { + "title": "Title", + "type": "string" + }, + "author": { + "title": "Author", + "type": "string" + }, + "pages": { + "title": "Pages", + "type": "integer" + }, + "publication_year": { + "title": "Publication Year", + "type": "integer" + } + }, + "required": [ + "title", + "author", + "pages", + "publication_year" + ], + "title": "BookSummary", + "type": "object" +}\ +""", + }, + "tools": [ + { + "name": "get_book_info", + "description": "Look up book information by ISBN.", + "parameters": """\ +{ + "properties": { + "isbn": { + "title": "Isbn", + "type": "string" + } + }, + "required": [ + "isbn" + ], + "additionalProperties": false, + "defs": null +}\ +""", + "strict": False, + } + ], + "n_chunks": 98, + } + } +) diff --git a/python/tests/e2e/output/snapshots/test_structured_output_with_tools/strict/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py b/python/tests/e2e/output/snapshots/test_structured_output_with_tools/strict/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py new file mode 100644 index 000000000..9ade30f3d --- /dev/null +++ b/python/tests/e2e/output/snapshots/test_structured_output_with_tools/strict/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py @@ -0,0 +1,50 @@ +from inline_snapshot import snapshot + +sync_snapshot = snapshot( + { + "exception": { + "type": "FormattingModeNotSupportedError", + "args": "(\"Formatting mode 'strict' is not supported by provider 'anthropic-vertex' for model 'claude-haiku-4-5@20251001'\",)", + "feature": "formatting_mode:strict", + "formatting_mode": "strict", + "model_id": "claude-haiku-4-5@20251001", + "provider": "anthropic-vertex", + } + } +) +async_snapshot = snapshot( + { + "exception": { + "type": "FormattingModeNotSupportedError", + "args": "(\"Formatting mode 'strict' is not supported by provider 'anthropic-vertex' for model 'claude-haiku-4-5@20251001'\",)", + "feature": "formatting_mode:strict", + "formatting_mode": "strict", + "model_id": "claude-haiku-4-5@20251001", + "provider": "anthropic-vertex", + } + } +) +stream_snapshot = snapshot( + { + "exception": { + "type": "FormattingModeNotSupportedError", + "args": "(\"Formatting mode 'strict' is not supported by provider 'anthropic-vertex' for model 'claude-haiku-4-5@20251001'\",)", + "feature": "formatting_mode:strict", + "formatting_mode": "strict", + "model_id": "claude-haiku-4-5@20251001", + "provider": "anthropic-vertex", + } + } +) +async_stream_snapshot = snapshot( + { + "exception": { + "type": "FormattingModeNotSupportedError", + "args": "(\"Formatting mode 'strict' is not supported by provider 'anthropic-vertex' for model 'claude-haiku-4-5@20251001'\",)", + "feature": "formatting_mode:strict", + "formatting_mode": "strict", + "model_id": "claude-haiku-4-5@20251001", + "provider": "anthropic-vertex", + } + } +) diff --git a/python/tests/e2e/output/snapshots/test_structured_output_with_tools/tool/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py b/python/tests/e2e/output/snapshots/test_structured_output_with_tools/tool/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py new file mode 100644 index 000000000..9b29c4857 --- /dev/null +++ b/python/tests/e2e/output/snapshots/test_structured_output_with_tools/tool/anthropic-vertex_claude_haiku_4_5@20251001_snapshots.py @@ -0,0 +1,499 @@ +from inline_snapshot import snapshot + +from mirascope.llm import ( + AssistantMessage, + SystemMessage, + Text, + ToolCall, + ToolOutput, + UserMessage, +) + +sync_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "params": {}, + "finish_reason": None, + "messages": [ + SystemMessage( + content=Text( + text="Always respond to the user's query using the __mirascope_formatted_output_tool__ tool for structured output." + ) + ), + UserMessage( + content=[ + Text( + text="Please look up the book with ISBN 0-7653-1178-X and provide detailed info and a recommendation score" + ) + ] + ), + AssistantMessage( + content=[ + ToolCall( + id="toolu_vrtx_01R2c2nRYNx7tpF6iskgQXNs", + name="get_book_info", + args='{"isbn": "0-7653-1178-X"}', + ) + ], + provider="anthropic", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "id": "toolu_vrtx_01R2c2nRYNx7tpF6iskgQXNs", + "input": {"isbn": "0-7653-1178-X"}, + "name": "get_book_info", + "type": "tool_use", + } + ], + }, + ), + UserMessage( + content=[ + ToolOutput( + id="toolu_vrtx_01R2c2nRYNx7tpF6iskgQXNs", + name="get_book_info", + value="Title: Mistborn: The Final Empire, Author: Brandon Sanderson, Pages: 544, Published: 2006-07-25", + ) + ] + ), + AssistantMessage( + content=[ + Text( + text='{"title": "Mistborn: The Final Empire", "author": "Brandon Sanderson", "pages": 544, "publication_year": 2006}' + ) + ], + provider="anthropic", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "id": "toolu_vrtx_01SAMbdVhSgy5PdmCbco15zV", + "input": { + "title": "Mistborn: The Final Empire", + "author": "Brandon Sanderson", + "pages": 544, + "publication_year": 2006, + }, + "name": "__mirascope_formatted_output_tool__", + "type": "tool_use", + } + ], + }, + ), + ], + "format": { + "name": "BookSummary", + "description": None, + "schema": { + "properties": { + "title": {"title": "Title", "type": "string"}, + "author": {"title": "Author", "type": "string"}, + "pages": {"title": "Pages", "type": "integer"}, + "publication_year": { + "title": "Publication Year", + "type": "integer", + }, + }, + "required": ["title", "author", "pages", "publication_year"], + "title": "BookSummary", + "type": "object", + }, + "mode": "tool", + "formatting_instructions": "Always respond to the user's query using the __mirascope_formatted_output_tool__ tool for structured output.", + }, + "tools": [ + { + "name": "get_book_info", + "description": "Look up book information by ISBN.", + "parameters": """\ +{ + "properties": { + "isbn": { + "title": "Isbn", + "type": "string" + } + }, + "required": [ + "isbn" + ], + "additionalProperties": false, + "defs": null +}\ +""", + "strict": False, + } + ], + } + } +) +async_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "params": {}, + "finish_reason": None, + "messages": [ + SystemMessage( + content=Text( + text="Always respond to the user's query using the __mirascope_formatted_output_tool__ tool for structured output." + ) + ), + UserMessage( + content=[ + Text( + text="Please look up the book with ISBN 0-7653-1178-X and provide detailed info and a recommendation score" + ) + ] + ), + AssistantMessage( + content=[ + ToolCall( + id="toolu_vrtx_0186VoUe1xWxmYqEq2X73zK8", + name="get_book_info", + args='{"isbn": "0-7653-1178-X"}', + ) + ], + provider="anthropic", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "id": "toolu_vrtx_0186VoUe1xWxmYqEq2X73zK8", + "input": {"isbn": "0-7653-1178-X"}, + "name": "get_book_info", + "type": "tool_use", + } + ], + }, + ), + UserMessage( + content=[ + ToolOutput( + id="toolu_vrtx_0186VoUe1xWxmYqEq2X73zK8", + name="get_book_info", + value="Title: Mistborn: The Final Empire, Author: Brandon Sanderson, Pages: 544, Published: 2006-07-25", + ) + ] + ), + AssistantMessage( + content=[ + Text( + text='{"title": "Mistborn: The Final Empire", "author": "Brandon Sanderson", "pages": 544, "publication_year": 2006}' + ) + ], + provider="anthropic", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "id": "toolu_vrtx_01D3Yf6XrXjwyziUQb7p3cLp", + "input": { + "title": "Mistborn: The Final Empire", + "author": "Brandon Sanderson", + "pages": 544, + "publication_year": 2006, + }, + "name": "__mirascope_formatted_output_tool__", + "type": "tool_use", + } + ], + }, + ), + ], + "format": { + "name": "BookSummary", + "description": None, + "schema": { + "properties": { + "title": {"title": "Title", "type": "string"}, + "author": {"title": "Author", "type": "string"}, + "pages": {"title": "Pages", "type": "integer"}, + "publication_year": { + "title": "Publication Year", + "type": "integer", + }, + }, + "required": ["title", "author", "pages", "publication_year"], + "title": "BookSummary", + "type": "object", + }, + "mode": "tool", + "formatting_instructions": "Always respond to the user's query using the __mirascope_formatted_output_tool__ tool for structured output.", + }, + "tools": [ + { + "name": "get_book_info", + "description": "Look up book information by ISBN.", + "parameters": """\ +{ + "properties": { + "isbn": { + "title": "Isbn", + "type": "string" + } + }, + "required": [ + "isbn" + ], + "additionalProperties": false, + "defs": null +}\ +""", + "strict": False, + } + ], + } + } +) +stream_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "finish_reason": None, + "messages": [ + SystemMessage( + content=Text( + text="Always respond to the user's query using the __mirascope_formatted_output_tool__ tool for structured output." + ) + ), + UserMessage( + content=[ + Text( + text="Please look up the book with ISBN 0-7653-1178-X and provide detailed info and a recommendation score" + ) + ] + ), + AssistantMessage( + content=[ + ToolCall( + id="toolu_vrtx_017qgjqEbui44R3qjqBYWzhR", + name="get_book_info", + args='{"isbn": "0-7653-1178-X"}', + ) + ], + provider="anthropic-vertex", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_vrtx_017qgjqEbui44R3qjqBYWzhR", + "name": "get_book_info", + "input": {"isbn": "0-7653-1178-X"}, + } + ], + }, + ), + UserMessage( + content=[ + ToolOutput( + id="toolu_vrtx_017qgjqEbui44R3qjqBYWzhR", + name="get_book_info", + value="Title: Mistborn: The Final Empire, Author: Brandon Sanderson, Pages: 544, Published: 2006-07-25", + ) + ] + ), + AssistantMessage( + content=[ + Text( + text='{"title": "Mistborn: The Final Empire", "author": "Brandon Sanderson", "pages": 544, "publication_year": 2006}' + ) + ], + provider="anthropic-vertex", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_vrtx_01PmjsqjuvTmWcUDasNSjN97", + "name": "__mirascope_formatted_output_tool__", + "input": { + "title": "Mistborn: The Final Empire", + "author": "Brandon Sanderson", + "pages": 544, + "publication_year": 2006, + }, + } + ], + }, + ), + ], + "format": { + "name": "BookSummary", + "description": None, + "schema": { + "properties": { + "title": {"title": "Title", "type": "string"}, + "author": {"title": "Author", "type": "string"}, + "pages": {"title": "Pages", "type": "integer"}, + "publication_year": { + "title": "Publication Year", + "type": "integer", + }, + }, + "required": ["title", "author", "pages", "publication_year"], + "title": "BookSummary", + "type": "object", + }, + "mode": "tool", + "formatting_instructions": "Always respond to the user's query using the __mirascope_formatted_output_tool__ tool for structured output.", + }, + "tools": [ + { + "name": "get_book_info", + "description": "Look up book information by ISBN.", + "parameters": """\ +{ + "properties": { + "isbn": { + "title": "Isbn", + "type": "string" + } + }, + "required": [ + "isbn" + ], + "additionalProperties": false, + "defs": null +}\ +""", + "strict": False, + } + ], + "n_chunks": 22, + } + } +) +async_stream_snapshot = snapshot( + { + "response": { + "provider": "anthropic-vertex", + "model_id": "claude-haiku-4-5@20251001", + "finish_reason": None, + "messages": [ + SystemMessage( + content=Text( + text="Always respond to the user's query using the __mirascope_formatted_output_tool__ tool for structured output." + ) + ), + UserMessage( + content=[ + Text( + text="Please look up the book with ISBN 0-7653-1178-X and provide detailed info and a recommendation score" + ) + ] + ), + AssistantMessage( + content=[ + ToolCall( + id="toolu_vrtx_01Nrdbpcgt5pbGirKkb8FneR", + name="get_book_info", + args='{"isbn": "0-7653-1178-X"}', + ) + ], + provider="anthropic-vertex", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_vrtx_01Nrdbpcgt5pbGirKkb8FneR", + "name": "get_book_info", + "input": {"isbn": "0-7653-1178-X"}, + } + ], + }, + ), + UserMessage( + content=[ + ToolOutput( + id="toolu_vrtx_01Nrdbpcgt5pbGirKkb8FneR", + name="get_book_info", + value="Title: Mistborn: The Final Empire, Author: Brandon Sanderson, Pages: 544, Published: 2006-07-25", + ) + ] + ), + AssistantMessage( + content=[ + Text( + text='{"title": "Mistborn: The Final Empire", "author": "Brandon Sanderson", "pages": 544, "publication_year": 2006}' + ) + ], + provider="anthropic-vertex", + model_id="claude-haiku-4-5@20251001", + raw_message={ + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_vrtx_01B78RRbZkcmdzvfRTGdxMQ6", + "name": "__mirascope_formatted_output_tool__", + "input": { + "title": "Mistborn: The Final Empire", + "author": "Brandon Sanderson", + "pages": 544, + "publication_year": 2006, + }, + } + ], + }, + ), + ], + "format": { + "name": "BookSummary", + "description": None, + "schema": { + "properties": { + "title": {"title": "Title", "type": "string"}, + "author": {"title": "Author", "type": "string"}, + "pages": {"title": "Pages", "type": "integer"}, + "publication_year": { + "title": "Publication Year", + "type": "integer", + }, + }, + "required": ["title", "author", "pages", "publication_year"], + "title": "BookSummary", + "type": "object", + }, + "mode": "tool", + "formatting_instructions": "Always respond to the user's query using the __mirascope_formatted_output_tool__ tool for structured output.", + }, + "tools": [ + { + "name": "get_book_info", + "description": "Look up book information by ISBN.", + "parameters": """\ +{ + "properties": { + "isbn": { + "title": "Isbn", + "type": "string" + } + }, + "required": [ + "isbn" + ], + "additionalProperties": false, + "defs": null +}\ +""", + "strict": False, + } + ], + "n_chunks": 19, + } + } +) diff --git a/python/tests/e2e/output/test_call_with_thinking_true.py b/python/tests/e2e/output/test_call_with_thinking_true.py index 3d08d5fdd..614bfdb30 100644 --- a/python/tests/e2e/output/test_call_with_thinking_true.py +++ b/python/tests/e2e/output/test_call_with_thinking_true.py @@ -12,6 +12,7 @@ ("openai:responses", "gpt-5"), ("anthropic", "claude-sonnet-4-0"), ("anthropic-bedrock", "us.anthropic.claude-sonnet-4-20250514-v1:0"), + ("anthropic-vertex", "claude-haiku-4-5@20251001"), ("google", "gemini-2.5-flash"), ] diff --git a/python/tests/llm/clients/anthropic_vertex/__init__.py b/python/tests/llm/clients/anthropic_vertex/__init__.py new file mode 100644 index 000000000..bf5d0ec07 --- /dev/null +++ b/python/tests/llm/clients/anthropic_vertex/__init__.py @@ -0,0 +1 @@ +"""Tests for AnthropicVertex client.""" diff --git a/python/tests/llm/clients/anthropic_vertex/conftest.py b/python/tests/llm/clients/anthropic_vertex/conftest.py new file mode 100644 index 000000000..d3809ee92 --- /dev/null +++ b/python/tests/llm/clients/anthropic_vertex/conftest.py @@ -0,0 +1,23 @@ +"""Configuration for AnthropicVertex tests.""" + +from collections.abc import Generator + +import pytest + +from mirascope.llm.clients.anthropic_vertex import clients + + +@pytest.fixture(autouse=True) +def setup_env(monkeypatch: pytest.MonkeyPatch) -> None: + """Set up default environment variables for tests.""" + monkeypatch.setenv("CLOUD_ML_REGION", "us-central1") + + +@pytest.fixture(autouse=True) +def clear_client_cache() -> Generator[None, None, None]: + """Clear the LRU cache before and after each test to prevent interference.""" + clients.clear_cache() + try: + yield + finally: + clients.clear_cache() diff --git a/python/tests/llm/clients/anthropic_vertex/test_client.py b/python/tests/llm/clients/anthropic_vertex/test_client.py new file mode 100644 index 000000000..26dfebe3c --- /dev/null +++ b/python/tests/llm/clients/anthropic_vertex/test_client.py @@ -0,0 +1,85 @@ +"""Tests for AnthropicVertexClient.""" + +import pytest + +from mirascope import llm + + +def test_context_manager() -> None: + """Test nested context manager behavior and get_client() integration.""" + global_client = llm.get_client("anthropic-vertex") + + client1 = llm.client( + "anthropic-vertex", project_id="project-1", region="us-central1" + ) + client2 = llm.client( + "anthropic-vertex", project_id="project-2", region="us-central1" + ) + + assert llm.get_client("anthropic-vertex") is global_client + + with client1 as ctx1: + assert ctx1 is client1 + assert llm.get_client("anthropic-vertex") is client1 + + with client2 as ctx2: + assert ctx2 is client2 + assert llm.get_client("anthropic-vertex") is client2 + + assert llm.get_client("anthropic-vertex") is client1 + + assert llm.get_client("anthropic-vertex") is global_client + + +def test_client_caching() -> None: + """Test that client() returns cached instances for identical parameters.""" + client1 = llm.client( + "anthropic-vertex", project_id="project-1", region="us-central1" + ) + client2 = llm.client( + "anthropic-vertex", project_id="project-1", region="us-central1" + ) + assert client1 is client2 + + client3 = llm.client( + "anthropic-vertex", project_id="project-2", region="us-central1" + ) + assert client1 is not client3 + + client4 = llm.client("anthropic-vertex", region="us-central1") + client5 = llm.client("anthropic-vertex", region="us-east1") + assert client4 is not client5 + + client6 = llm.client( + "anthropic-vertex", project_id="project-1", region="us-central1" + ) + client7 = llm.client("anthropic-vertex", project_id="project-1", region="us-east1") + assert client6 is not client7 + + client8 = llm.client("anthropic-vertex") + client9 = llm.get_client("anthropic-vertex") + assert client8 is client9 + + +def test_client_env_var_fallback(monkeypatch: pytest.MonkeyPatch) -> None: + """Test that client() falls back to environment variables.""" + monkeypatch.setenv("GOOGLE_CLOUD_PROJECT", "env-project-1") + monkeypatch.setenv("CLOUD_ML_REGION", "us-central1") + vertex_client = llm.client("anthropic-vertex") + assert vertex_client.client.project_id == "env-project-1" + + monkeypatch.setenv("GCP_PROJECT_ID", "env-project-2") + vertex_client2 = llm.client("anthropic-vertex") + assert vertex_client2.client.project_id == "env-project-1" + + monkeypatch.delenv("GOOGLE_CLOUD_PROJECT") + vertex_client3 = llm.client("anthropic-vertex") + assert vertex_client3.client.project_id == "env-project-2" + + vertex_client4 = llm.client("anthropic-vertex", project_id="test-project") + assert vertex_client4.client.region == "us-central1" + + monkeypatch.delenv("CLOUD_ML_REGION") + monkeypatch.setenv("GOOGLE_CLOUD_REGION", "us-west1") + vertex_client5 = llm.client("anthropic-vertex", project_id="test-project") + assert vertex_client5.client.region == "us-west1"