From e98721e478f20ce463150fd1848f0bb28c429814 Mon Sep 17 00:00:00 2001 From: Tan Jia Huei Date: Tue, 3 Nov 2026 16:50:15 +0000 Subject: [PATCH 01/15] test: Preserve provider recording and reference evidence --- ...therai-chat_completions-non_stream-00.yaml | 37 + ...togetherai-chat_completions-stream-00.yaml | 40 + ...therai-chat_completions-non_stream-00.yaml | 37 + ...togetherai-chat_completions-stream-00.yaml | 42 + ...therai-chat_completions-non_stream-00.yaml | 37 + ...togetherai-chat_completions-stream-00.yaml | 40 + ...therai-chat_completions-non_stream-00.yaml | 203 + ...togetherai-chat_completions-stream-00.yaml | 208 + ...-01a1a245-9ce3-7d00-ade4-ac8377b653cd.yaml | 42 + .../gemini-text-stream/manifest.json | 42 + ...-01a1a247-77d3-7502-818d-fd7c1de887b7.yaml | 54 + .../together-llama-text-stream/manifest.json | 42 + ...-01a1a24c-855d-7172-8cb3-817eee18c561.yaml | 108 + ...-01a1a24c-8976-7ed0-8e69-8a1c23475c34.yaml | 126 + .../manifest.json | 49 + ...-01a1a248-2266-7e50-80b3-62907aa5672c.yaml | 107 + .../manifest.json | 42 + ...-01a1a24c-7a36-7343-9fb3-382d9c837eb0.yaml | 658 +++ .../manifest.json | 47 + ...-01a1a248-064f-7a73-93d8-785d24ef18ed.yaml | 64 + ...-01a1a248-07bc-7902-a857-dd91295a0326.yaml | 72 + .../manifest.json | 48 + ...-01a1a24a-3863-70e2-a3ee-c5adb12fa1b3.yaml | 85 + ...-01a1a24a-3a24-7980-bea2-5cafea924fdb.yaml | 93 + .../together-qwen-text-stream/manifest.json | 49 + ...-01a1a247-81fd-7ea3-8432-9278146a93ff.yaml | 104 + ...-01a1a247-8559-7771-8432-233c32264740.yaml | 115 + ...-01a1a247-876e-77e2-a985-1c36e8e19aaa.yaml | 118 + .../manifest.json | 53 + ...-01a1a24a-4303-7b72-aa70-50419a2fc77f.yaml | 517 ++ ...-01a1a24a-4736-7262-a255-44276689cb8a.yaml | 427 ++ ...-01a1a24a-4a25-7a90-b268-cb9166d814a1.yaml | 496 ++ .../together-qwen-tools-stream/manifest.json | 54 + ...-01a1a245-8b96-7d82-8d1b-5b8d749fbdb5.yaml | 4759 +++++++++++++++++ .../together-text-stream/manifest.json | 42 + .../anthropic-messages-stream-00.yaml | 290 + .../anthropic-messages-stream-01.yaml | 354 ++ .../openai-chat_completions-stream-00.yaml | 197 + .../openai-chat_completions-stream-01.yaml | 240 + .../openai-responses-stream-00.yaml | 301 ++ .../openai-responses-stream-01.yaml | 372 ++ ...togetherai-chat_completions-stream-00.yaml | 211 + ...togetherai-chat_completions-stream-01.yaml | 255 + .../anthropic-messages-stream-00.yaml | 261 + .../anthropic-messages-stream-01.yaml | 324 ++ .../openai-chat_completions-stream-00.yaml | 178 + .../openai-chat_completions-stream-01.yaml | 221 + .../openai-responses-stream-00.yaml | 274 + .../openai-responses-stream-01.yaml | 340 ++ ...togetherai-chat_completions-stream-00.yaml | 190 + ...togetherai-chat_completions-stream-01.yaml | 234 + tests/cassettes/reference_pr76/manifest.json | 348 ++ ...togetherai-chat_completions-stream-00.yaml | 162 + ...togetherai-chat_completions-stream-01.yaml | 1540 ++++++ .../vllm-chat_completions-stream-00.yaml | 155 + .../vllm-chat_completions-stream-01.yaml | 1512 ++++++ .../vllm-messages-stream-00.yaml | 259 + .../vllm-messages-stream-01.yaml | 2234 ++++++++ .../vllm-responses-stream-00.yaml | 301 ++ .../vllm-responses-stream-01.yaml | 2200 ++++++++ .../anthropic-messages-non_stream-00.yaml | 51 + .../anthropic-messages-non_stream-01.yaml | 60 + .../anthropic-messages-stream-00.yaml | 186 + .../anthropic-messages-stream-01.yaml | 214 + ...openai-chat_completions-non_stream-00.yaml | 58 + ...openai-chat_completions-non_stream-01.yaml | 65 + .../openai-chat_completions-stream-00.yaml | 140 + .../openai-chat_completions-stream-01.yaml | 162 + .../openai-responses-non_stream-00.yaml | 102 + .../openai-responses-non_stream-01.yaml | 115 + .../openai-responses-stream-00.yaml | 200 + .../openai-responses-stream-01.yaml | 230 + ...therai-chat_completions-non_stream-00.yaml | 61 + ...therai-chat_completions-non_stream-01.yaml | 68 + ...togetherai-chat_completions-stream-00.yaml | 138 + ...togetherai-chat_completions-stream-01.yaml | 160 + .../anthropic-messages-stream-00.yaml | 288 + .../anthropic-messages-stream-01.yaml | 329 ++ .../anthropic-messages-stream-02.yaml | 364 ++ .../openai-chat_completions-stream-00.yaml | 201 + .../openai-chat_completions-stream-01.yaml | 239 + .../openai-chat_completions-stream-02.yaml | 269 + .../tool_call/openai-responses-stream-00.yaml | 328 ++ .../tool_call/openai-responses-stream-01.yaml | 365 ++ .../tool_call/openai-responses-stream-02.yaml | 407 ++ ...togetherai-chat_completions-stream-00.yaml | 211 + ...togetherai-chat_completions-stream-01.yaml | 254 + ...togetherai-chat_completions-stream-02.yaml | 273 + .../anthropic-messages-stream-00.yaml | 167 + .../anthropic-messages-stream-01.yaml | 222 + .../openai-chat_completions-stream-00.yaml | 134 + .../openai-chat_completions-stream-01.yaml | 168 + .../openai-responses-stream-00.yaml | 179 + .../openai-responses-stream-01.yaml | 250 + ...togetherai-chat_completions-stream-00.yaml | 138 + ...togetherai-chat_completions-stream-01.yaml | 175 + .../anthropic-messages-stream-00.yaml | 137 + .../anthropic-messages-stream-01.yaml | 268 + .../openai-chat_completions-stream-00.yaml | 98 + .../openai-chat_completions-stream-01.yaml | 194 + .../openai-responses-stream-00.yaml | 151 + .../openai-responses-stream-01.yaml | 289 + ...togetherai-chat_completions-stream-00.yaml | 102 + ...togetherai-chat_completions-stream-01.yaml | 200 + 104 files changed, 30420 insertions(+) create mode 100644 tests/cassettes/errors/context_length_exceeded/togetherai-chat_completions-non_stream-00.yaml create mode 100644 tests/cassettes/errors/context_length_exceeded/togetherai-chat_completions-stream-00.yaml create mode 100644 tests/cassettes/errors/invalid_api_key/togetherai-chat_completions-non_stream-00.yaml create mode 100644 tests/cassettes/errors/invalid_api_key/togetherai-chat_completions-stream-00.yaml create mode 100644 tests/cassettes/errors/model_not_found/togetherai-chat_completions-non_stream-00.yaml create mode 100644 tests/cassettes/errors/model_not_found/togetherai-chat_completions-stream-00.yaml create mode 100644 tests/cassettes/errors/not_found/togetherai-chat_completions-non_stream-00.yaml create mode 100644 tests/cassettes/errors/not_found/togetherai-chat_completions-stream-00.yaml create mode 100644 tests/cassettes/provider_recordings/2026-11-03/gemini-text-stream/2026-11-03-01a1a245-9ce3-7d00-ade4-ac8377b653cd.yaml create mode 100644 tests/cassettes/provider_recordings/2026-11-03/gemini-text-stream/manifest.json create mode 100644 tests/cassettes/provider_recordings/2026-11-03/together-llama-text-stream/2026-11-03-01a1a247-77d3-7502-818d-fd7c1de887b7.yaml create mode 100644 tests/cassettes/provider_recordings/2026-11-03/together-llama-text-stream/manifest.json create mode 100644 tests/cassettes/provider_recordings/2026-11-03/together-qwen-parallel-nonstream-explicit/2026-11-03-01a1a24c-855d-7172-8cb3-817eee18c561.yaml create mode 100644 tests/cassettes/provider_recordings/2026-11-03/together-qwen-parallel-nonstream-explicit/2026-11-03-01a1a24c-8976-7ed0-8e69-8a1c23475c34.yaml create mode 100644 tests/cassettes/provider_recordings/2026-11-03/together-qwen-parallel-nonstream-explicit/manifest.json create mode 100644 tests/cassettes/provider_recordings/2026-11-03/together-qwen-parallel-nonstream/2026-11-03-01a1a248-2266-7e50-80b3-62907aa5672c.yaml create mode 100644 tests/cassettes/provider_recordings/2026-11-03/together-qwen-parallel-nonstream/manifest.json create mode 100644 tests/cassettes/provider_recordings/2026-11-03/together-qwen-parallel-stream-explicit/2026-11-03-01a1a24c-7a36-7343-9fb3-382d9c837eb0.yaml create mode 100644 tests/cassettes/provider_recordings/2026-11-03/together-qwen-parallel-stream-explicit/manifest.json create mode 100644 tests/cassettes/provider_recordings/2026-11-03/together-qwen-text-nonstream/2026-11-03-01a1a248-064f-7a73-93d8-785d24ef18ed.yaml create mode 100644 tests/cassettes/provider_recordings/2026-11-03/together-qwen-text-nonstream/2026-11-03-01a1a248-07bc-7902-a857-dd91295a0326.yaml create mode 100644 tests/cassettes/provider_recordings/2026-11-03/together-qwen-text-nonstream/manifest.json create mode 100644 tests/cassettes/provider_recordings/2026-11-03/together-qwen-text-stream/2026-11-03-01a1a24a-3863-70e2-a3ee-c5adb12fa1b3.yaml create mode 100644 tests/cassettes/provider_recordings/2026-11-03/together-qwen-text-stream/2026-11-03-01a1a24a-3a24-7980-bea2-5cafea924fdb.yaml create mode 100644 tests/cassettes/provider_recordings/2026-11-03/together-qwen-text-stream/manifest.json create mode 100644 tests/cassettes/provider_recordings/2026-11-03/together-qwen-tools-nonstream/2026-11-03-01a1a247-81fd-7ea3-8432-9278146a93ff.yaml create mode 100644 tests/cassettes/provider_recordings/2026-11-03/together-qwen-tools-nonstream/2026-11-03-01a1a247-8559-7771-8432-233c32264740.yaml create mode 100644 tests/cassettes/provider_recordings/2026-11-03/together-qwen-tools-nonstream/2026-11-03-01a1a247-876e-77e2-a985-1c36e8e19aaa.yaml create mode 100644 tests/cassettes/provider_recordings/2026-11-03/together-qwen-tools-nonstream/manifest.json create mode 100644 tests/cassettes/provider_recordings/2026-11-03/together-qwen-tools-stream/2026-11-03-01a1a24a-4303-7b72-aa70-50419a2fc77f.yaml create mode 100644 tests/cassettes/provider_recordings/2026-11-03/together-qwen-tools-stream/2026-11-03-01a1a24a-4736-7262-a255-44276689cb8a.yaml create mode 100644 tests/cassettes/provider_recordings/2026-11-03/together-qwen-tools-stream/2026-11-03-01a1a24a-4a25-7a90-b268-cb9166d814a1.yaml create mode 100644 tests/cassettes/provider_recordings/2026-11-03/together-qwen-tools-stream/manifest.json create mode 100644 tests/cassettes/provider_recordings/2026-11-03/together-text-stream/2026-11-03-01a1a245-8b96-7d82-8d1b-5b8d749fbdb5.yaml create mode 100644 tests/cassettes/provider_recordings/2026-11-03/together-text-stream/manifest.json create mode 100644 tests/cassettes/reference_pr76/input_image_base64/anthropic-messages-stream-00.yaml create mode 100644 tests/cassettes/reference_pr76/input_image_base64/anthropic-messages-stream-01.yaml create mode 100644 tests/cassettes/reference_pr76/input_image_base64/openai-chat_completions-stream-00.yaml create mode 100644 tests/cassettes/reference_pr76/input_image_base64/openai-chat_completions-stream-01.yaml create mode 100644 tests/cassettes/reference_pr76/input_image_base64/openai-responses-stream-00.yaml create mode 100644 tests/cassettes/reference_pr76/input_image_base64/openai-responses-stream-01.yaml create mode 100644 tests/cassettes/reference_pr76/input_image_base64/togetherai-chat_completions-stream-00.yaml create mode 100644 tests/cassettes/reference_pr76/input_image_base64/togetherai-chat_completions-stream-01.yaml create mode 100644 tests/cassettes/reference_pr76/input_image_remote_url/anthropic-messages-stream-00.yaml create mode 100644 tests/cassettes/reference_pr76/input_image_remote_url/anthropic-messages-stream-01.yaml create mode 100644 tests/cassettes/reference_pr76/input_image_remote_url/openai-chat_completions-stream-00.yaml create mode 100644 tests/cassettes/reference_pr76/input_image_remote_url/openai-chat_completions-stream-01.yaml create mode 100644 tests/cassettes/reference_pr76/input_image_remote_url/openai-responses-stream-00.yaml create mode 100644 tests/cassettes/reference_pr76/input_image_remote_url/openai-responses-stream-01.yaml create mode 100644 tests/cassettes/reference_pr76/input_image_remote_url/togetherai-chat_completions-stream-00.yaml create mode 100644 tests/cassettes/reference_pr76/input_image_remote_url/togetherai-chat_completions-stream-01.yaml create mode 100644 tests/cassettes/reference_pr76/manifest.json create mode 100644 tests/cassettes/reference_pr76/reasoning_raw/togetherai-chat_completions-stream-00.yaml create mode 100644 tests/cassettes/reference_pr76/reasoning_raw/togetherai-chat_completions-stream-01.yaml create mode 100644 tests/cassettes/reference_pr76/reasoning_raw/vllm-chat_completions-stream-00.yaml create mode 100644 tests/cassettes/reference_pr76/reasoning_raw/vllm-chat_completions-stream-01.yaml create mode 100644 tests/cassettes/reference_pr76/reasoning_raw/vllm-messages-stream-00.yaml create mode 100644 tests/cassettes/reference_pr76/reasoning_raw/vllm-messages-stream-01.yaml create mode 100644 tests/cassettes/reference_pr76/reasoning_raw/vllm-responses-stream-00.yaml create mode 100644 tests/cassettes/reference_pr76/reasoning_raw/vllm-responses-stream-01.yaml create mode 100644 tests/cassettes/reference_pr76/simple_text/anthropic-messages-non_stream-00.yaml create mode 100644 tests/cassettes/reference_pr76/simple_text/anthropic-messages-non_stream-01.yaml create mode 100644 tests/cassettes/reference_pr76/simple_text/anthropic-messages-stream-00.yaml create mode 100644 tests/cassettes/reference_pr76/simple_text/anthropic-messages-stream-01.yaml create mode 100644 tests/cassettes/reference_pr76/simple_text/openai-chat_completions-non_stream-00.yaml create mode 100644 tests/cassettes/reference_pr76/simple_text/openai-chat_completions-non_stream-01.yaml create mode 100644 tests/cassettes/reference_pr76/simple_text/openai-chat_completions-stream-00.yaml create mode 100644 tests/cassettes/reference_pr76/simple_text/openai-chat_completions-stream-01.yaml create mode 100644 tests/cassettes/reference_pr76/simple_text/openai-responses-non_stream-00.yaml create mode 100644 tests/cassettes/reference_pr76/simple_text/openai-responses-non_stream-01.yaml create mode 100644 tests/cassettes/reference_pr76/simple_text/openai-responses-stream-00.yaml create mode 100644 tests/cassettes/reference_pr76/simple_text/openai-responses-stream-01.yaml create mode 100644 tests/cassettes/reference_pr76/simple_text/togetherai-chat_completions-non_stream-00.yaml create mode 100644 tests/cassettes/reference_pr76/simple_text/togetherai-chat_completions-non_stream-01.yaml create mode 100644 tests/cassettes/reference_pr76/simple_text/togetherai-chat_completions-stream-00.yaml create mode 100644 tests/cassettes/reference_pr76/simple_text/togetherai-chat_completions-stream-01.yaml create mode 100644 tests/cassettes/reference_pr76/tool_call/anthropic-messages-stream-00.yaml create mode 100644 tests/cassettes/reference_pr76/tool_call/anthropic-messages-stream-01.yaml create mode 100644 tests/cassettes/reference_pr76/tool_call/anthropic-messages-stream-02.yaml create mode 100644 tests/cassettes/reference_pr76/tool_call/openai-chat_completions-stream-00.yaml create mode 100644 tests/cassettes/reference_pr76/tool_call/openai-chat_completions-stream-01.yaml create mode 100644 tests/cassettes/reference_pr76/tool_call/openai-chat_completions-stream-02.yaml create mode 100644 tests/cassettes/reference_pr76/tool_call/openai-responses-stream-00.yaml create mode 100644 tests/cassettes/reference_pr76/tool_call/openai-responses-stream-01.yaml create mode 100644 tests/cassettes/reference_pr76/tool_call/openai-responses-stream-02.yaml create mode 100644 tests/cassettes/reference_pr76/tool_call/togetherai-chat_completions-stream-00.yaml create mode 100644 tests/cassettes/reference_pr76/tool_call/togetherai-chat_completions-stream-01.yaml create mode 100644 tests/cassettes/reference_pr76/tool_call/togetherai-chat_completions-stream-02.yaml create mode 100644 tests/cassettes/reference_pr76/tool_call_choice/anthropic-messages-stream-00.yaml create mode 100644 tests/cassettes/reference_pr76/tool_call_choice/anthropic-messages-stream-01.yaml create mode 100644 tests/cassettes/reference_pr76/tool_call_choice/openai-chat_completions-stream-00.yaml create mode 100644 tests/cassettes/reference_pr76/tool_call_choice/openai-chat_completions-stream-01.yaml create mode 100644 tests/cassettes/reference_pr76/tool_call_choice/openai-responses-stream-00.yaml create mode 100644 tests/cassettes/reference_pr76/tool_call_choice/openai-responses-stream-01.yaml create mode 100644 tests/cassettes/reference_pr76/tool_call_choice/togetherai-chat_completions-stream-00.yaml create mode 100644 tests/cassettes/reference_pr76/tool_call_choice/togetherai-chat_completions-stream-01.yaml create mode 100644 tests/cassettes/reference_pr76/tool_call_parallel/anthropic-messages-stream-00.yaml create mode 100644 tests/cassettes/reference_pr76/tool_call_parallel/anthropic-messages-stream-01.yaml create mode 100644 tests/cassettes/reference_pr76/tool_call_parallel/openai-chat_completions-stream-00.yaml create mode 100644 tests/cassettes/reference_pr76/tool_call_parallel/openai-chat_completions-stream-01.yaml create mode 100644 tests/cassettes/reference_pr76/tool_call_parallel/openai-responses-stream-00.yaml create mode 100644 tests/cassettes/reference_pr76/tool_call_parallel/openai-responses-stream-01.yaml create mode 100644 tests/cassettes/reference_pr76/tool_call_parallel/togetherai-chat_completions-stream-00.yaml create mode 100644 tests/cassettes/reference_pr76/tool_call_parallel/togetherai-chat_completions-stream-01.yaml diff --git a/tests/cassettes/errors/context_length_exceeded/togetherai-chat_completions-non_stream-00.yaml b/tests/cassettes/errors/context_length_exceeded/togetherai-chat_completions-non_stream-00.yaml new file mode 100644 index 0000000..a1a3a06 --- /dev/null +++ b/tests/cassettes/errors/context_length_exceeded/togetherai-chat_completions-non_stream-00.yaml @@ -0,0 +1,37 @@ +filename: 2026-10-15-01a13eab-b246-7602-aecb-9d5fe615d9e4 +request: + body: + max_completion_tokens: 16 + messages: + - content: + - text: Reply with OK. x + type: text + role: user + model: gpt-4.1-mini + reasoning: + enabled: false + stream: false + headers: + accept: application/json + accept-encoding: gzip, deflate + authorization: Bearer *** + connection: keep-alive + content-length: '600171' + content-type: application/json + user-agent: AsyncOpenAI/Python 2.53.0 + x-run-id: errors/context_length_exceeded/togetherai-chat_completions-non_stream-00.yaml + method: POST + path: /v1/chat/completions + query_params: {} +request_id: 01a13eab-b246-7602-aecb-9d5fe615d9e4 +response: + body: "{\n \"id\": \"p5Ja3GU-3pDw3Z-a4ad70bd0d65ce2a\",\n \"error\": {\n \"\ + message\": \"The input (300016 tokens) is longer than the model's context length\ + \ (262144 tokens).\",\n \"type\": \"invalid_request_error\",\n \"param\"\ + : null,\n \"code\": null\n }\n}" + headers: + connection: keep-alive + content-length: '239' + content-type: application/json; charset=utf-8 + status_code: 400 +timestamp: '2026-10-15T08:26:42.118379+00:00' diff --git a/tests/cassettes/errors/context_length_exceeded/togetherai-chat_completions-stream-00.yaml b/tests/cassettes/errors/context_length_exceeded/togetherai-chat_completions-stream-00.yaml new file mode 100644 index 0000000..4252929 --- /dev/null +++ b/tests/cassettes/errors/context_length_exceeded/togetherai-chat_completions-stream-00.yaml @@ -0,0 +1,40 @@ +filename: 2026-10-15-01a13eab-a682-7d50-8f8f-a1430e6a65c6 +request: + body: + max_completion_tokens: 16 + messages: + - content: + - text: Reply with OK. x + type: text + role: user + model: gpt-4.1-mini + reasoning: + enabled: false + stream: true + stream_options: + include_obfuscation: false + include_usage: true + headers: + accept: application/json + accept-encoding: gzip, deflate + authorization: Bearer *** + connection: keep-alive + content-length: '600210' + content-type: application/json + user-agent: AsyncOpenAI/Python 2.53.0 + x-run-id: errors/context_length_exceeded/togetherai-chat_completions-stream-00.yaml + method: POST + path: /v1/chat/completions + query_params: {} +request_id: 01a13eab-a682-7d50-8f8f-a1430e6a65c6 +response: + body: "{\n \"id\": \"p5Ja2FC-3pDw3Z-a4ad70aaacc7ce2a\",\n \"error\": {\n \"\ + message\": \"The input (300016 tokens) is longer than the model's context length\ + \ (262144 tokens).\",\n \"type\": \"invalid_request_error\",\n \"param\"\ + : null,\n \"code\": null\n }\n}" + headers: + connection: keep-alive + content-length: '239' + content-type: application/json; charset=utf-8 + status_code: 400 +timestamp: '2026-10-15T08:26:39.106719+00:00' diff --git a/tests/cassettes/errors/invalid_api_key/togetherai-chat_completions-non_stream-00.yaml b/tests/cassettes/errors/invalid_api_key/togetherai-chat_completions-non_stream-00.yaml new file mode 100644 index 0000000..ae4ce74 --- /dev/null +++ b/tests/cassettes/errors/invalid_api_key/togetherai-chat_completions-non_stream-00.yaml @@ -0,0 +1,37 @@ +filename: 2026-10-15-01a13eae-0c09-7540-8c89-70457af0f5e9 +request: + body: + max_completion_tokens: 16 + messages: + - content: + - text: Say hello. + type: text + role: user + model: gpt-4.1-mini + reasoning: + enabled: false + stream: false + headers: + accept: application/json + accept-encoding: gzip, deflate + authorization: Bearer *** + connection: keep-alive + content-length: '224' + content-type: application/json + user-agent: AsyncOpenAI/Python 2.53.0 + x-run-id: errors/invalid_api_key/togetherai-chat_completions-non_stream-00.yaml + method: POST + path: /v1/chat/completions + query_params: {} +request_id: 01a13eae-0c09-7540-8c89-70457af0f5e9 +response: + body: "{\n \"id\": \"p5Japo4-fdNmn-a4ad747fd85bf916\",\n \"error\": {\n \"\ + message\": \"Invalid API key provided. You can find your API key at https://api.together.ai/settings/api-keys.\"\ + ,\n \"type\": \"invalid_request_error\",\n \"param\": null,\n \"code\"\ + : \"invalid_api_key\"\n }\n}" + headers: + connection: keep-alive + content-length: '264' + content-type: application/json; charset=utf-8 + status_code: 401 +timestamp: '2026-10-15T08:29:16.169576+00:00' diff --git a/tests/cassettes/errors/invalid_api_key/togetherai-chat_completions-stream-00.yaml b/tests/cassettes/errors/invalid_api_key/togetherai-chat_completions-stream-00.yaml new file mode 100644 index 0000000..1a9b11c --- /dev/null +++ b/tests/cassettes/errors/invalid_api_key/togetherai-chat_completions-stream-00.yaml @@ -0,0 +1,42 @@ +filename: 2026-10-15-01a13eae-0ad6-7971-aa99-a8882b116c45 +request: + body: + max_completion_tokens: 1024 + messages: + - content: + - text: 'Write one short sentence ' + type: text + - text: about the ocean. + type: text + role: user + model: gpt-4.1-nano + reasoning: + enabled: false + stream: true + stream_options: + include_obfuscation: false + include_usage: true + headers: + accept: application/json + accept-encoding: gzip, deflate + authorization: Bearer *** + connection: keep-alive + content-length: '263' + content-type: application/json + user-agent: AsyncOpenAI/Python 2.53.0 + x-run-id: errors/invalid_api_key/togetherai-chat_completions-stream-00.yaml + method: POST + path: /v1/chat/completions + query_params: {} +request_id: 01a13eae-0ad6-7971-aa99-a8882b116c45 +response: + body: "{\n \"id\": \"p5Japdv-3pDw3Z-a4ad747e2bcff916\",\n \"error\": {\n \"\ + message\": \"Invalid API key provided. You can find your API key at https://api.together.ai/settings/api-keys.\"\ + ,\n \"type\": \"invalid_request_error\",\n \"param\": null,\n \"code\"\ + : \"invalid_api_key\"\n }\n}" + headers: + connection: keep-alive + content-length: '265' + content-type: application/json; charset=utf-8 + status_code: 401 +timestamp: '2026-10-15T08:29:15.862031+00:00' diff --git a/tests/cassettes/errors/model_not_found/togetherai-chat_completions-non_stream-00.yaml b/tests/cassettes/errors/model_not_found/togetherai-chat_completions-non_stream-00.yaml new file mode 100644 index 0000000..4336160 --- /dev/null +++ b/tests/cassettes/errors/model_not_found/togetherai-chat_completions-non_stream-00.yaml @@ -0,0 +1,37 @@ +filename: 2026-10-15-01a13eae-3b83-7901-94f3-f8e7c000f715 +request: + body: + max_completion_tokens: 16 + messages: + - content: + - text: Say hello. + type: text + role: user + model: molto-model-that-does-not-exist + reasoning: + enabled: false + stream: false + headers: + accept: application/json + accept-encoding: gzip, deflate + authorization: Bearer *** + connection: keep-alive + content-length: '176' + content-type: application/json + user-agent: AsyncOpenAI/Python 2.53.0 + x-run-id: errors/model_not_found/togetherai-chat_completions-non_stream-00.yaml + method: POST + path: /v1/chat/completions + query_params: {} +request_id: 01a13eae-3b83-7901-94f3-f8e7c000f715 +response: + body: "{\n \"id\": \"p5JatLG-2kFHot-a4ad74cbda10db51\",\n \"error\": {\n \"\ + message\": \"Unable to access model molto/nonexistent-cassette-model. Please visit\ + \ https://api.together.ai/models to view the list of supported models.\",\n \ + \ \"type\": \"invalid_request_error\",\n \"param\": null,\n \"code\": \"\ + model_not_available\"\n }\n}" + headers: + connection: keep-alive + content-type: application/json; charset=utf-8 + status_code: 404 +timestamp: '2026-10-15T08:29:28.323716+00:00' diff --git a/tests/cassettes/errors/model_not_found/togetherai-chat_completions-stream-00.yaml b/tests/cassettes/errors/model_not_found/togetherai-chat_completions-stream-00.yaml new file mode 100644 index 0000000..556d2a5 --- /dev/null +++ b/tests/cassettes/errors/model_not_found/togetherai-chat_completions-stream-00.yaml @@ -0,0 +1,40 @@ +filename: 2026-10-15-01a13eae-36f4-7502-999e-3094dba8a769 +request: + body: + max_completion_tokens: 1024 + messages: + - content: + - text: Hi + type: text + role: user + model: kimi + reasoning: + enabled: false + stream: true + stream_options: + include_obfuscation: false + include_usage: true + headers: + accept: application/json + accept-encoding: gzip, deflate + authorization: Bearer *** + connection: keep-alive + content-length: '215' + content-type: application/json + user-agent: AsyncOpenAI/Python 2.53.0 + x-run-id: errors/model_not_found/togetherai-chat_completions-stream-00.yaml + method: POST + path: /v1/chat/completions + query_params: {} +request_id: 01a13eae-36f4-7502-999e-3094dba8a769 +response: + body: "{\n \"id\": \"p5Jat7R-2kFHot-a4ad74c4cf9adb51\",\n \"error\": {\n \"\ + message\": \"Unable to access model molto/nonexistent-cassette-model. Please visit\ + \ https://api.together.ai/models to view the list of supported models.\",\n \ + \ \"type\": \"invalid_request_error\",\n \"param\": null,\n \"code\": \"\ + model_not_available\"\n }\n}" + headers: + connection: keep-alive + content-type: application/json; charset=utf-8 + status_code: 404 +timestamp: '2026-10-15T08:29:27.156104+00:00' diff --git a/tests/cassettes/errors/not_found/togetherai-chat_completions-non_stream-00.yaml b/tests/cassettes/errors/not_found/togetherai-chat_completions-non_stream-00.yaml new file mode 100644 index 0000000..e2083d0 --- /dev/null +++ b/tests/cassettes/errors/not_found/togetherai-chat_completions-non_stream-00.yaml @@ -0,0 +1,203 @@ +filename: 2026-10-15-01a13eae-6d4d-77f3-b238-5ba4e9debcd8 +request: + body: + max_completion_tokens: 16 + messages: + - content: + - text: Say hello. + type: text + role: user + model: gpt-4.1-mini + reasoning: + enabled: false + stream: false + headers: + accept: application/json + accept-encoding: gzip, deflate + authorization: Bearer *** + connection: keep-alive + content-length: '224' + content-type: application/json + user-agent: AsyncOpenAI/Python 2.53.0 + x-run-id: errors/not_found/togetherai-chat_completions-non_stream-00.yaml + method: POST + path: /v1/nonexistent-cassette-route/chat/completions + query_params: {} +request_id: 01a13eae-6d4d-77f3-b238-5ba4e9debcd8 +response: + body: "Together