diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 081e178..9bb247c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -119,6 +119,12 @@ jobs: - name: Run TypeScript tests run: make test-typescript + - name: Install payloads dependencies + run: cd payloads && pnpm install + + - name: Run payloads tests + run: cd payloads && pnpm test + test-python: runs-on: ubuntu-latest diff --git a/crates/lingua/src/universal/response.rs b/crates/lingua/src/universal/response.rs index 42d63ac..3391ae3 100644 --- a/crates/lingua/src/universal/response.rs +++ b/crates/lingua/src/universal/response.rs @@ -43,7 +43,8 @@ pub struct UniversalUsage { /// Tokens written to cache during this request pub prompt_cache_creation_tokens: Option, - /// Tokens used for reasoning in completion (OpenAI: completion_tokens_details.reasoning_tokens, Google: thoughtsTokenCount) + /// Reasoning/thinking tokens used in the completion. + /// `Some(n)` only when `n > 0`; otherwise `None`. pub completion_reasoning_tokens: Option, } @@ -215,10 +216,12 @@ impl UniversalUsage { .and_then(|d| d.get("cached_tokens")) .and_then(Value::as_i64), prompt_cache_creation_tokens: None, // OpenAI doesn't report cache creation tokens + // Treat 0 as None: 0 reasoning tokens means "no reasoning" = semantically None completion_reasoning_tokens: usage .get("completion_tokens_details") .and_then(|d| d.get("reasoning_tokens")) - .and_then(Value::as_i64), + .and_then(Value::as_i64) + .filter(|&v| v > 0), }, ProviderFormat::Responses => Self { prompt_tokens: usage.get("input_tokens").and_then(Value::as_i64), @@ -228,10 +231,12 @@ impl UniversalUsage { .and_then(|d| d.get("cached_tokens")) .and_then(Value::as_i64), prompt_cache_creation_tokens: None, + // Treat 0 as None: 0 reasoning tokens means "no reasoning" = semantically None completion_reasoning_tokens: usage .get("output_tokens_details") .and_then(|d| d.get("reasoning_tokens")) - .and_then(Value::as_i64), + .and_then(Value::as_i64) + .filter(|&v| v > 0), }, ProviderFormat::Anthropic => Self { prompt_tokens: usage.get("input_tokens").and_then(Value::as_i64), @@ -319,19 +324,14 @@ impl UniversalUsage { serde_json::json!(prompt + completion), ); - if let Some(cached_tokens) = self.prompt_cached_tokens { - map.insert( - "input_tokens_details".into(), - serde_json::json!({ "cached_tokens": cached_tokens }), - ); - } - - if let Some(reasoning_tokens) = self.completion_reasoning_tokens { - map.insert( - "output_tokens_details".into(), - serde_json::json!({ "reasoning_tokens": reasoning_tokens }), - ); - } + map.insert( + "input_tokens_details".into(), + serde_json::json!({ "cached_tokens": self.prompt_cached_tokens.unwrap_or(0) }), + ); + map.insert( + "output_tokens_details".into(), + serde_json::json!({ "reasoning_tokens": self.completion_reasoning_tokens.unwrap_or(0) }), + ); Value::Object(map) } diff --git a/payloads/package.json b/payloads/package.json index 3328192..abc1b4f 100644 --- a/payloads/package.json +++ b/payloads/package.json @@ -12,11 +12,16 @@ "format": "prettier --write .", "format:check": "prettier --check .", "test": "vitest run", - "test:watch": "vitest" + "test:watch": "vitest", + "test:transforms": "vitest run scripts/transforms", + "test:transforms:update": "vitest run scripts/transforms -u", + "test:transforms:watch": "vitest scripts/transforms", + "lingua-capture": "tsx scripts/transforms/lingua-capture.ts" }, "dependencies": { "@anthropic-ai/sdk": "^0.71.2", "@aws-sdk/client-bedrock-runtime": "^3.700.0", + "@braintrust/lingua-wasm": "workspace:*", "@google/genai": "^1.34.0", "openai": "^6.16.0" }, diff --git a/payloads/scripts/capture.ts b/payloads/scripts/capture.ts index 4f2b760..cc86718 100644 --- a/payloads/scripts/capture.ts +++ b/payloads/scripts/capture.ts @@ -1,6 +1,6 @@ #!/usr/bin/env tsx -import { mkdirSync } from "fs"; +import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs"; import { join } from "path"; import { needsRegeneration, updateCache } from "./cache-utils"; import { saveAllFiles } from "./file-manager"; @@ -25,6 +25,7 @@ const allProviders = [ interface CaptureOptions { list: boolean; force: boolean; + failing: boolean; filter?: string; providers?: string[]; cases?: string[]; @@ -36,6 +37,7 @@ function parseArguments(): CaptureOptions { const options: CaptureOptions = { list: false, force: false, + failing: false, }; for (let i = 0; i < args.length; i++) { @@ -48,6 +50,9 @@ function parseArguments(): CaptureOptions { case "--force": options.force = true; break; + case "--failing": + options.failing = true; + break; case "--filter": if (i + 1 < args.length) { options.filter = args[i + 1]; @@ -87,7 +92,7 @@ function parseArguments(): CaptureOptions { if (arg.startsWith("--")) { console.error(`Unknown option: ${arg}`); console.error( - "Available options: --list, --force, --filter, --providers, --cases, --stream" + "Available options: --list, --force, --failing, --filter, --providers, --cases, --stream" ); process.exit(1); } @@ -104,6 +109,22 @@ interface CaseToRun { executor: ProviderExecutor; } +const FAILURES_FILE = ".failures.json"; + +function loadFailures(outputDir: string): Set { + const failuresPath = join(outputDir, FAILURES_FILE); + if (!existsSync(failuresPath)) { + return new Set(); + } + const data = JSON.parse(readFileSync(failuresPath, "utf-8")); + return new Set(data); +} + +function saveFailures(outputDir: string, failures: string[]): void { + const failuresPath = join(outputDir, FAILURES_FILE); + writeFileSync(failuresPath, JSON.stringify(failures, null, 2)); +} + function getAllCases(options: CaptureOptions): CaseToRun[] { const cases: CaseToRun[] = []; @@ -157,13 +178,28 @@ async function main() { const outputDir = join(__dirname, "..", "snapshots"); mkdirSync(outputDir, { recursive: true }); + // Filter to only failing cases if --failing is passed + let filteredCases = allCases; + if (options.failing) { + const previousFailures = loadFailures(outputDir); + if (previousFailures.size === 0) { + console.log("No previous failures recorded."); + return; + } + filteredCases = allCases.filter((c) => + previousFailures.has(`${c.provider}/${c.caseName}`) + ); + console.log(`Retrying ${filteredCases.length} previously failed cases...`); + } + // Filter cases that need to be run const casesToRun: CaseToRun[] = []; const skippedCases: CaseToRun[] = []; - for (const case_ of allCases) { + for (const case_ of filteredCases) { if ( !options.force && + !options.failing && !needsRegeneration( outputDir, case_.provider, @@ -267,6 +303,15 @@ async function main() { } } + // Save failures for --failing retry + const failureKeys = failed.map( + (f) => `${f.case_.provider}/${f.case_.caseName}` + ); + saveFailures(outputDir, failureKeys); + if (failed.length > 0) { + console.log(`\n💡 Run with --failing to retry failed cases`); + } + console.log(`\nCapture complete! Results saved to: ${outputDir}`); } diff --git a/payloads/scripts/transforms/__snapshots__/transforms.test.ts.snap b/payloads/scripts/transforms/__snapshots__/transforms.test.ts.snap new file mode 100644 index 0000000..3529e11 --- /dev/null +++ b/payloads/scripts/transforms/__snapshots__/transforms.test.ts.snap @@ -0,0 +1,1796 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`anthropic → chat-completions > complexReasoningRequest > request 1`] = ` +{ + "max_completion_tokens": 20000, + "messages": [ + { + "content": "There is a digital clock, with minutes and hours in the form of 00:00. The clock shows all times from 00:00 to 23:59 and repeating. Imagine you had a list of all these times. Which digit(s) is the most common and which is the rarest? Can you find their percentage?", + "role": "user", + }, + ], + "model": "claude-sonnet-4-20250514", +} +`; + +exports[`anthropic → chat-completions > complexReasoningRequest > response 1`] = ` +{ + "content": [ + { + "text": "1440 times (00:00 to 23:59) times 4 digits each = 5760 digits in total. + +Count by digit (0–9): + +- H1 (tens of hours): 0 appears 600 times, 1 appears 600 times, 2 appears 240 times. +- H2 (units of hours): 0,1,2,3 each appear 180 times; 4,5,6,7,8,9 each appear 120 times. +- M1 (tens of minutes): digits 0–5 each appear 240 times; digits 6–9 appear 0 times. +- M2 (units of minutes): each digit 0–9 appears 144 times. + +Sum per digit across all positions: +- 0: 600 + 180 + 240 + 144 = 1164 +- 1: 600 + 180 + 240 + 144 = 1164 +- 2: 240 + 180 + 240 + 144 = 804 +- 3: 0 + 180 + 240 + 144 = 564 +- 4: 0 + 120 + 240 + 144 = 504 +- 5: 0 + 120 + 240 + 144 = 504 +- 6: 0 + 120 + 0 + 144 = 264 +- 7: 0 + 120 + 0 + 144 = 264 +- 8: 0 + 120 + 0 + 144 = 264 +- 9: 0 + 120 + 0 + 144 = 264 + +Percentages of the 5760 digits: +- 0 or 1: 1164 / 5760 = 97/480 ≈ 20.21% +- 2: 804 / 5760 = 67/480 ≈ 13.96% +- 3: 564 / 5760 = 47/480 ≈ 9.79% +- 4 or 5: 504 / 5760 = 7/80 = 8.75% +- 6, 7, 8, 9: 264 / 5760 = 11/240 ≈ 4.58% + +Conclusion: +- Most common digits: 0 and 1, each about 20.21%. +- Rarest digits: 6, 7, 8, and 9, each about 4.58%.", + "type": "text", + }, + ], + "id": "msg_transformed", + "model": "gpt-5-nano-2025-08-07", + "role": "assistant", + "stop_reason": "end_turn", + "type": "message", + "usage": { + "cache_read_input_tokens": 0, + "input_tokens": 74, + "output_tokens": 13596, + }, +} +`; + +exports[`anthropic → chat-completions > multimodalRequest > request 1`] = ` +{ + "max_completion_tokens": 300, + "messages": [ + { + "content": [ + { + "text": "What do you see in this image?", + "type": "text", + }, + { + "image_url": { + "url": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxMUExYUFBQXFxYWGRsZGhkZGBgZIBgjIBYYGBkbGhkhHikhHx4mHhsYIjIiJiosLy8wGSA1OjUuOSkuLywBCgoKDg0OGxAQHDAmISYsMC4uLi40MC4uLi4uNy4uLiwsNy4xLi4sLi4uLi4wLi4wLi4uLC4uLi4uLi4uLi4uLP/AABEIAOAA4QMBIgACEQEDEQH/xAAcAAACAwEBAQEAAAAAAAAAAAAABgQFBwMBAgj/xABLEAACAQMABgYFCQQIBQQDAAABAgMABBEFBhIhMUETUWFxgZEHIjKhsRQjQlJicpLB0TOCsvAkQ1NUc6LC4RY0RJPSFSWD4jVjo//EABsBAAIDAQEBAAAAAAAAAAAAAAADAQIEBQYH/8QAMREAAgIBAwICCQQDAQEAAAAAAAECEQMSITEEUUFxBRMiYYGRobHRMkLB8BRS4fEj/9oADAMBAAIRAxEAPwDcaKKKACiik/TnpJ0daytDJK3SIcMqRu2DjODgccUAOFFJlh6T9FynHykRk/2itH72GKm6361paWZuo1E42kVQjjDFmCj1wDuoAXfStrZNEY7G0OLicbRccYo8kFgeROG38gDzxVH6ItKNa3M2j55CwlxLCzE+s2D0gyTxO446wx51S2ulDe3tzdsjIfUiVX4oAuWXzrrpnRYmCsrGOWI7UUi8UYEEeGQK5+T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NfoSWJWGCAR1EAjyqvn1etHBV7eFg3EGNDnv3VbUJeCDdmUay6HTRcaXdiduHCxzRGQEMx3RzBt+CWwDy4V20UDDo+SyvNHXZM220skUPTBnckiRXQnePVIz1U9n0d6M/ucXHOBtBT3qDg+IpoVQBgbgKixiik7M01A1KtpbGFri0aOX1lfPSxF9liquyZG9lAO/r6q0LRej44IlhiUJGgwqjJwPGplFQWCiiigD//Z", + }, + "type": "image_url", + }, + ], + "role": "user", + }, + ], + "model": "claude-sonnet-4-20250514", +} +`; + +exports[`anthropic → chat-completions > multimodalRequest > response 1`] = ` +{ + "content": [ + { + "text": "This image features a Pokémon character known for its distinct blue-green skin and large, leafy plant on its back. It has big red eyes and a cute, round face. The character is often associated with nature and is a beginner-level Pokémon in the series.", + "type": "text", + }, + ], + "id": "msg_transformed", + "model": "gpt-4o-mini-2024-07-18", + "role": "assistant", + "stop_reason": "end_turn", + "type": "message", + "usage": { + "cache_read_input_tokens": 0, + "input_tokens": 8515, + "output_tokens": 51, + }, +} +`; + +exports[`anthropic → chat-completions > reasoningRequest > request 1`] = ` +{ + "max_completion_tokens": 20000, + "messages": [ + { + "content": "Solve this step by step: If a train travels 60 mph for 2 hours, then 80 mph for 1 hour, what's the average speed?", + "role": "user", + }, + ], + "model": "claude-sonnet-4-20250514", +} +`; + +exports[`anthropic → chat-completions > reasoningRequest > response 1`] = ` +{ + "content": [ + { + "text": "Step 1: Compute distances +- Distance1 = 60 mph × 2 h = 120 miles +- Distance2 = 80 mph × 1 h = 80 miles + +Step 2: Total distance +- Total distance = 120 + 80 = 200 miles + +Step 3: Total time +- Total time = 2 h + 1 h = 3 h + +Step 4: Average speed +- Average speed = Total distance / Total time = 200 miles / 3 h = 200/3 mph ≈ 66.7 mph + +Answer: 200/3 mph (about 66 2/3 mph).", + "type": "text", + }, + ], + "id": "msg_transformed", + "model": "gpt-5-nano-2025-08-07", + "role": "assistant", + "stop_reason": "end_turn", + "type": "message", + "usage": { + "cache_read_input_tokens": 0, + "input_tokens": 38, + "output_tokens": 659, + }, +} +`; + +exports[`anthropic → chat-completions > reasoningRequestTruncated > request 1`] = ` +{ + "max_completion_tokens": 100, + "messages": [ + { + "content": "Solve this step by step: If a train travels 60 mph for 2 hours, then 80 mph for 1 hour, what's the average speed?", + "role": "user", + }, + ], + "model": "claude-sonnet-4-20250514", +} +`; + +exports[`anthropic → chat-completions > reasoningRequestTruncated > response 1`] = ` +{ + "content": [ + { + "text": "To find the average speed of the train over the entire trip, we can use the formula for average speed: + +\\[ +\\text{Average Speed} = \\frac{\\text{Total Distance}}{\\text{Total Time}} +\\] + +### Step 1: Calculate the distance traveled at each speed. + +1. **Travel at 60 mph for 2 hours:** + \\[ + \\text{Distance} = \\text{Speed} \\times \\text{Time} = 60 \\", + "type": "text", + }, + ], + "id": "msg_transformed", + "model": "gpt-4o-mini-2024-07-18", + "role": "assistant", + "stop_reason": "max_tokens", + "type": "message", + "usage": { + "cache_read_input_tokens": 0, + "input_tokens": 39, + "output_tokens": 100, + }, +} +`; + +exports[`anthropic → chat-completions > reasoningWithOutput > request 1`] = ` +{ + "max_completion_tokens": 20000, + "messages": [ + { + "content": "What color is the sky?", + "role": "user", + }, + ], + "model": "claude-sonnet-4-20250514", +} +`; + +exports[`anthropic → chat-completions > reasoningWithOutput > response 1`] = ` +{ + "content": [ + { + "text": "Usually blue during a clear day. That’s because sunlight (white light) scatters off the atmosphere, and the shorter blue wavelengths scatter more than the others. + +Colors can change: +- Sunrise/sunset: red/orange/pink (sunlight passes through more air, longer wavelengths dominate) +- Cloudy/overcast: gray +- Night: dark/black (stars may be visible) + +Sometimes, in storms the sky can look greenish-gray. + +If you tell me your location and time of day, I can give a more specific guess for the sky color right now.", + "type": "text", + }, + ], + "id": "msg_transformed", + "model": "gpt-5-nano-2025-08-07", + "role": "assistant", + "stop_reason": "end_turn", + "type": "message", + "usage": { + "cache_read_input_tokens": 0, + "input_tokens": 12, + "output_tokens": 765, + }, +} +`; + +exports[`anthropic → chat-completions > simpleRequest > request 1`] = ` +{ + "max_completion_tokens": 20000, + "messages": [ + { + "content": "What is the capital of France?", + "role": "user", + }, + ], + "model": "claude-sonnet-4-20250514", +} +`; + +exports[`anthropic → chat-completions > simpleRequest > response 1`] = ` +{ + "content": [ + { + "text": "Paris.", + "type": "text", + }, + ], + "id": "msg_transformed", + "model": "gpt-5-nano-2025-08-07", + "role": "assistant", + "stop_reason": "end_turn", + "type": "message", + "usage": { + "cache_read_input_tokens": 0, + "input_tokens": 13, + "output_tokens": 139, + }, +} +`; + +exports[`anthropic → chat-completions > toolCallRequest > request 1`] = ` +{ + "max_completion_tokens": 20000, + "messages": [ + { + "content": "What's the weather like in San Francisco?", + "role": "user", + }, + ], + "model": "claude-sonnet-4-20250514", + "tool_choice": "auto", + "tools": [ + { + "function": { + "description": "Get the current weather for a location", + "name": "get_weather", + "parameters": { + "properties": { + "location": { + "description": "The city and state, e.g. San Francisco, CA", + "type": "string", + }, + }, + "required": [ + "location", + ], + "type": "object", + }, + }, + "type": "function", + }, + ], +} +`; + +exports[`anthropic → chat-completions > toolCallRequest > response 1`] = ` +{ + "content": [ + { + "id": "call_Y01ca17t4IsAFQ4PSryUqAmj", + "input": { + "location": "San Francisco, CA", + }, + "name": "get_weather", + "type": "tool_use", + }, + ], + "id": "msg_transformed", + "model": "gpt-5-nano-2025-08-07", + "role": "assistant", + "stop_reason": "tool_use", + "type": "message", + "usage": { + "cache_read_input_tokens": 0, + "input_tokens": 148, + "output_tokens": 218, + }, +} +`; + +exports[`anthropic → responses > complexReasoningRequest > request 1`] = ` +{ + "input": [ + { + "content": "There is a digital clock, with minutes and hours in the form of 00:00. The clock shows all times from 00:00 to 23:59 and repeating. Imagine you had a list of all these times. Which digit(s) is the most common and which is the rarest? Can you find their percentage?", + "role": "user", + }, + ], + "max_output_tokens": 20000, + "model": "claude-sonnet-4-20250514", +} +`; + +exports[`anthropic → responses > complexReasoningRequest > response 1`] = ` +{ + "content": [ + { + "text": "To find the most common and rarest digits in a digital clock from 00:00 to 23:59, let's break down the analysis. + +### Total Times +The total number of times displayed on the clock is from 00:00 to 23:59, which is \\(24 \\times 60 = 1440\\) minutes. + +### Counting Each Digit +In a 24-hour digital clock format (HH:MM), we need to consider each position of the time. The times can be broken down into: + +- **Hours:** 00 to 23 (2 digits) +- **Minutes:** 00 to 59 (2 digits) + +#### Breaking down the counts: +1. **Hour Positions (HH)** + - 00, 01, 02, ..., 09 (10 times): Each of these has: + - '0': 10 times (from 00, 01, ..., 09) + - '1': 10 times (from 10, 11, 12, ..., 19) + - '2': 4 times (from 20, 21, 22, 23) + - Total digits for HH: + - '0' appears 10 + 0 = 10 times + - '1' appears 10 + 1 = 11 times + - '2' appears 4 + 1 = 5 times + +2. **Minute Positions (MM)** + - 00 to 59 (60 times): Each digit is counted by the number system. + - Tens digit: '0' (0-9) appears 10 times, '1' (10-19) appears 10 times, '2' (20-29) appears 10 times, '3' (30-39) appears 10 times, '4' (40-49) appears 10 times, '5' (50-59) appears 10 times + - Units digit: '0' to '9' appears exactly 6 times for each digit: + - '0': 6 times (00, 10, 20, 30, 40, 50) + - '1': 6 times, 2: 6 times, ..., 9: 6 times + +#### Combining Counts +Now let's sum them: + +- **Total Counts:** + - '0': HH (10) + MM (10) + Units (6) = **26** + - '1': HH (10) + Units (6) = **16** + - '2': HH (5) + MM (10) + Units (6) = **21** + - '3': MM (10) + Units (6) = **16** + - '4': MM (10) + Units (6) = **16** + - '5': MM (10) + Units (6) = **16** + - '6': Units (6) = **6** + - '7': Units (6) = **6** + - '8': Units (6) = **6** + - '9': Units (6) = **6** + +### Conclusion +From the counts: +- **Most common digit:** '0' appears **26 times**. +- **Rarest digits:** '6', '7', '8', and '9', each appears **6 times**. + +### Percentage Calculation +- **Percentage of most common digit ('0'):** + \\[ + \\frac{26}{1440} \\times 100 \\approx 1.81\\% + \\] + +- **Percentage of rarest digits ('6', '7', '8', '9'):** + \\[ + \\frac{6}{1440} \\times 100 \\approx 0.42\\% + \\] + +### Summary +- **Most common digit:** '0' (1.81%) +- **Rarest digits:** '6', '7', '8', '9' (0.42% each)", + "type": "text", + }, + ], + "id": "msg_transformed", + "model": "gpt-4o-mini-2024-07-18", + "role": "assistant", + "stop_reason": "end_turn", + "type": "message", + "usage": { + "cache_read_input_tokens": 0, + "input_tokens": 75, + "output_tokens": 840, + }, +} +`; + +exports[`anthropic → responses > multimodalRequest > request 1`] = ` +{ + "input": [ + { + "content": [ + { + "text": "What do you see in this image?", + "type": "input_text", + }, + { + "image_url": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxMUExYUFBQXFxYWGRsZGhkZGBgZIBgjIBYYGBkbGhkhHikhHx4mHhsYIjIiJiosLy8wGSA1OjUuOSkuLywBCgoKDg0OGxAQHDAmISYsMC4uLi40MC4uLi4uNy4uLiwsNy4xLi4sLi4uLi4wLi4wLi4uLC4uLi4uLi4uLi4uLP/AABEIAOAA4QMBIgACEQEDEQH/xAAcAAACAwEBAQEAAAAAAAAAAAAABgQFBwMBAgj/xABLEAACAQMABgYFCQQIBQQDAAABAgMABBEFBhIhMUETUWFxgZEHIjKhsRQjQlJicpLB0TOCsvAkQ1NUc6LC4RY0RJPSFSWD4jVjo//EABsBAAIDAQEBAAAAAAAAAAAAAAADAQIEBQYH/8QAMREAAgIBAwICCQQDAQEAAAAAAAECEQMSITEEUUFxBRMiYYGRobHRMkLB8BRS4fEj/9oADAMBAAIRAxEAPwDcaKKKACiik/TnpJ0daytDJK3SIcMqRu2DjODgccUAOFFJlh6T9FynHykRk/2itH72GKm6361paWZuo1E42kVQjjDFmCj1wDuoAXfStrZNEY7G0OLicbRccYo8kFgeROG38gDzxVH6ItKNa3M2j55CwlxLCzE+s2D0gyTxO446wx51S2ulDe3tzdsjIfUiVX4oAuWXzrrpnRYmCsrGOWI7UUi8UYEEeGQK5+TrVDNofHj+TPLNU68DeKKy3QnpOeICPSMLqw3dPEpeN+0gb1Pn4U3WWvejZcbN7Bv5NIqHybBrdGSkri7Hpp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20UDDo+SyvNHXZM220skUPTBnckiRXQnePVIz1U9n0d6M/ucXHOBtBT3qDg+IpoVQBgbgKixiik7M01A1KtpbGFri0aOX1lfPSxF9liquyZG9lAO/r6q0LRej44IlhiUJGgwqjJwPGplFQWCiiigD//Z", + "type": "input_image", + }, + ], + "role": "user", + }, + ], + "max_output_tokens": 300, + "model": "claude-sonnet-4-20250514", +} +`; + +exports[`anthropic → responses > multimodalRequest > response 1`] = ` +{ + "content": [ + { + "text": "The image features a character known as Bulbasaur, which is a Pokémon. Bulbasaur has a green body with darker green spots and large plant-like features on its back, resembling a bulb. It has red eyes and a friendly expression, typical of many Pokémon characters.", + "type": "text", + }, + ], + "id": "msg_transformed", + "model": "gpt-4o-mini-2024-07-18", + "role": "assistant", + "stop_reason": "end_turn", + "type": "message", + "usage": { + "cache_read_input_tokens": 0, + "input_tokens": 8515, + "output_tokens": 56, + }, +} +`; + +exports[`anthropic → responses > reasoningRequest > request 1`] = ` +{ + "input": [ + { + "content": "Solve this step by step: If a train travels 60 mph for 2 hours, then 80 mph for 1 hour, what's the average speed?", + "role": "user", + }, + ], + "max_output_tokens": 20000, + "model": "claude-sonnet-4-20250514", +} +`; + +exports[`anthropic → responses > reasoningRequest > response 1`] = ` +{ + "content": [ + { + "text": "To find the average speed of the train, we need to calculate the total distance traveled and the total time taken. + +**Step 1: Calculate the distance for each part of the journey.** + +1. **For the first part:** + - Speed = 60 mph + - Time = 2 hours + - Distance = Speed × Time = 60 mph × 2 hours = 120 miles + +2. **For the second part:** + - Speed = 80 mph + - Time = 1 hour + - Distance = Speed × Time = 80 mph × 1 hour = 80 miles + +**Step 2: Calculate the total distance.** +- Total Distance = Distance from first part + Distance from second part +- Total Distance = 120 miles + 80 miles = 200 miles + +**Step 3: Calculate the total time.** +- Total Time = Time for first part + Time for second part +- Total Time = 2 hours + 1 hour = 3 hours + +**Step 4: Calculate the average speed.** +- Average Speed = Total Distance / Total Time +- Average Speed = 200 miles / 3 hours ≈ 66.67 mph + +Thus, the average speed of the train is approximately **66.67 mph**.", + "type": "text", + }, + ], + "id": "msg_transformed", + "model": "gpt-4o-mini-2024-07-18", + "role": "assistant", + "stop_reason": "end_turn", + "type": "message", + "usage": { + "cache_read_input_tokens": 0, + "input_tokens": 39, + "output_tokens": 269, + }, +} +`; + +exports[`anthropic → responses > reasoningRequestTruncated > request 1`] = ` +{ + "input": [ + { + "content": "Solve this step by step: If a train travels 60 mph for 2 hours, then 80 mph for 1 hour, what's the average speed?", + "role": "user", + }, + ], + "max_output_tokens": 100, + "model": "claude-sonnet-4-20250514", +} +`; + +exports[`anthropic → responses > reasoningRequestTruncated > response 1`] = ` +{ + "content": [ + { + "text": "To find the average speed of the train over the entire trip, we first need to calculate the total distance traveled and the total time taken. + +### Step 1: Calculate Distance for Each Segment + +1. **First Segment** (60 mph for 2 hours) + \\[ + \\text{Distance}_1 = \\text{Speed} \\times \\text{Time} = 60 \\, \\text{mph} \\times 2 \\, \\text{hours} = 120", + "type": "text", + }, + ], + "id": "msg_transformed", + "model": "gpt-4o-mini-2024-07-18", + "role": "assistant", + "stop_reason": "max_tokens", + "type": "message", + "usage": { + "cache_read_input_tokens": 0, + "input_tokens": 39, + "output_tokens": 100, + }, +} +`; + +exports[`anthropic → responses > reasoningWithOutput > request 1`] = ` +{ + "input": [ + { + "content": "What color is the sky?", + "role": "user", + }, + ], + "max_output_tokens": 20000, + "model": "claude-sonnet-4-20250514", +} +`; + +exports[`anthropic → responses > reasoningWithOutput > response 1`] = ` +{ + "content": [ + { + "text": "The color of the sky appears blue during the day due to Rayleigh scattering, where shorter wavelengths of light (blue) scatter more than longer wavelengths (red). At sunrise and sunset, the sky can exhibit shades of orange, pink, and purple due to the angle of the sun and atmospheric conditions. At night, the sky appears dark, often speckled with stars.", + "type": "text", + }, + ], + "id": "msg_transformed", + "model": "gpt-4o-mini-2024-07-18", + "role": "assistant", + "stop_reason": "end_turn", + "type": "message", + "usage": { + "cache_read_input_tokens": 0, + "input_tokens": 13, + "output_tokens": 76, + }, +} +`; + +exports[`anthropic → responses > simpleRequest > request 1`] = ` +{ + "input": [ + { + "content": "What is the capital of France?", + "role": "user", + }, + ], + "max_output_tokens": 20000, + "model": "claude-sonnet-4-20250514", +} +`; + +exports[`anthropic → responses > simpleRequest > response 1`] = ` +{ + "content": [ + { + "text": "The capital of France is Paris.", + "type": "text", + }, + ], + "id": "msg_transformed", + "model": "gpt-4o-mini-2024-07-18", + "role": "assistant", + "stop_reason": "end_turn", + "type": "message", + "usage": { + "cache_read_input_tokens": 0, + "input_tokens": 14, + "output_tokens": 8, + }, +} +`; + +exports[`anthropic → responses > toolCallRequest > request 1`] = ` +{ + "input": [ + { + "content": "What's the weather like in San Francisco?", + "role": "user", + }, + ], + "max_output_tokens": 20000, + "model": "claude-sonnet-4-20250514", + "tool_choice": "auto", + "tools": [ + { + "description": "Get the current weather for a location", + "name": "get_weather", + "parameters": { + "properties": { + "location": { + "description": "The city and state, e.g. San Francisco, CA", + "type": "string", + }, + }, + "required": [ + "location", + ], + "type": "object", + }, + "type": "function", + }, + ], +} +`; + +exports[`anthropic → responses > toolCallRequest > response 1`] = ` +{ + "content": [ + { + "id": "call_1Tzb1VJiHdkBnXO3RVkOxGFL", + "input": { + "location": "San Francisco, CA", + }, + "name": "get_weather", + "type": "tool_use", + }, + ], + "id": "msg_transformed", + "model": "gpt-4o-mini-2024-07-18", + "role": "assistant", + "stop_reason": "tool_use", + "type": "message", + "usage": { + "cache_read_input_tokens": 0, + "input_tokens": 61, + "output_tokens": 18, + }, +} +`; + +exports[`chat-completions → anthropic > complexReasoningRequest > request 1`] = ` +{ + "max_tokens": 20000, + "messages": [ + { + "content": "There is a digital clock, with minutes and hours in the form of 00:00. The clock shows all times from 00:00 to 23:59 and repeating. Imagine you had a list of all these times. Which digit(s) is the most common and which is the rarest? Can you find their percentage?", + "role": "user", + }, + ], + "model": "gpt-4o-mini", +} +`; + +exports[`chat-completions → anthropic > complexReasoningRequest > response 1`] = ` +{ + "choices": [ + { + "finish_reason": "stop", + "index": 0, + "message": { + "annotations": [], + "content": "I need to count how often each digit (0-9) appears in all possible times from 00:00 to 23:59. + +Let me break this down by position: + +**Hours (00 to 23):** +- First digit of hours: 0 (00-09), 1 (10-19), 2 (20-23) +- Second digit of hours: 0-9 for 00-09, 10-19, and 20-23 + +**Minutes (00 to 59):** +- First digit of minutes: 0-5 +- Second digit of minutes: 0-9 + +Let me count systematically: + +**Total times:** 24 hours × 60 minutes = 1,440 times +**Total digit positions:** 1,440 × 4 digits = 5,760 total digits + +**Counting each digit:** + +**Digit 0:** +- Hours first position: 10 times (00-09) × 60 minutes = 600 +- Hours second position: 6 times per hour (00, 10, 20) × 60 minutes = 360 +- Minutes first position: 1 time per minute (00-09, 30-39, 50-59) × 24 hours × 1 = 240 +- Minutes second position: 6 times per hour (x0 minutes) × 24 hours = 144 +- Total: 600 + 360 + 240 + 144 = **1,344** + +**Digit 1:** +- Hours first position: 10 times (10-19) × 60 minutes = 600 +- Hours second position: 6 times per hour (01, 11, 21) × 60 minutes = 360 +- Minutes first position: 10 times per hour (10-19) × 24 hours = 240 +- Minutes second position: 6 times per hour (x1 minutes) × 24 hours = 144 +- Total: 600 + 360 + 240 + 144 = **1,344** + +**Digit 2:** +- Hours first position: 4 times (20-23) × 60 minutes = 240 +- Hours second position: 6 times per hour (02, 12, 22) × 60 minutes = 360 +- Minutes first position: 10 times per hour (20-29) × 24 hours = 240 +- Minutes second position: 6 times per hour (x2 minutes) × 24 hours = 144 +- Total: 240 + 360 + 240 + 144 = **984** + +**Digit 3:** +- Hours first position: 0 times = 0 +- Hours second position: 6 times per hour (03, 13, 23) × 60 minutes = 360 +- Minutes first position: 10 times per hour (30-39) × 24 hours = 240 +- Minutes second position: 6 times per hour (x3 minutes) × 24 hours = 144 +- Total: 0 + 360 + 240 + 144 = **744** + +**Digit 4:** +- Hours first position: 0 times = 0 +- Hours second position: 6 times per hour (04, 14) × 60 minutes = 360 +- Minutes first position: 10 times per hour (40-49) × 24 hours = 240 +- Minutes second position: 6 times per hour (x4 minutes) × 24 hours = 144 +- Total: 0 + 360 + 240 + 144 = **744** + +**Digit 5:** +- Hours first position: 0 times = 0 +- Hours second position: 6 times per hour (05, 15) × 60 minutes = 360 +- Minutes first position: 10 times per hour (50-59) × 24 hours = 240 +- Minutes second position: 6 times per hour (x5 minutes) × 24 hours = 144 +- Total: 0 + 360 + 240 + 144 = **744** + +**Digits 6, 7, 8, 9:** +- Hours first position: 0 times each = 0 +- Hours second position: 4 times per hour each (06, 16) × 60 minutes = 240 each +- Minutes first position: 0 times each (no 60-69, 70-79, 80-89, 90-99) = 0 each +- Minutes second position: 6 times per hour each × 24 hours = 144 each +- Total each: 0 + 240 + 0 + 144 = **384** + +**Results:** +- **Most common:** 0 and 1 (tied) with 1,344 occurrences = **23.33%** each +- **Rarest:** 6, 7, 8, and 9 (tied) with 384 occurrences = **6.67%** each + +The digits 0 and 1 are most common because they appear frequently in the hours (00-09 and 10-19), while digits 6-9 are rarest because they can't appear in the tens place of minutes (no minutes 60-99) and appear less frequently in hours.", + "role": "assistant", + }, + }, + ], + "created": 0, + "id": "chatcmpl-transformed", + "model": "claude-sonnet-4-20250514", + "object": "chat.completion", + "usage": { + "completion_tokens": 1271, + "prompt_tokens": 80, + "prompt_tokens_details": { + "cached_tokens": 0, + }, + "total_tokens": 1351, + }, +} +`; + +exports[`chat-completions → anthropic > multimodalRequest > request 1`] = ` +{ + "max_tokens": 300, + "messages": [ + { + "content": [ + { + "text": "What do you see in this image?", + "type": "text", + }, + { + "source": { + "type": "url", + "url": "https://t3.ftcdn.net/jpg/02/36/99/22/360_F_236992283_sNOxCVQeFLd5pdqaKGh8DRGMZy7P4XKm.jpg", + }, + "type": "image", + }, + ], + "role": "user", + }, + ], + "model": "gpt-4o-mini", +} +`; + +exports[`chat-completions → anthropic > multimodalRequest > response 1`] = ` +{ + "choices": [ + { + "finish_reason": "stop", + "index": 0, + "message": { + "annotations": [], + "content": "I see an adorable tabby kitten lying on its side on what appears to be a wooden floor. The kitten has beautiful striped gray and brown markings, large golden-yellow eyes, and distinctive pointed ears. Its head is tilted at a charming angle as it looks directly at the camera, giving it an endearing and playful expression. The kitten appears to be quite young, with soft fluffy fur and that sweet, innocent look that young cats have. In the blurred background, there appears to be some furniture, possibly including wooden elements like chairs or shelving. The lighting in the photo is warm and natural, creating a cozy domestic setting that perfectly captures this precious moment with the kitten.", + "role": "assistant", + }, + }, + ], + "created": 0, + "id": "chatcmpl-transformed", + "model": "claude-sonnet-4-20250514", + "object": "chat.completion", + "usage": { + "completion_tokens": 152, + "prompt_tokens": 278, + "prompt_tokens_details": { + "cached_tokens": 0, + }, + "total_tokens": 430, + }, +} +`; + +exports[`chat-completions → anthropic > reasoningRequest > request 1`] = ` +{ + "max_tokens": 4096, + "messages": [ + { + "content": "Solve this step by step: If a train travels 60 mph for 2 hours, then 80 mph for 1 hour, what's the average speed?", + "role": "user", + }, + ], + "model": "gpt-4o-mini", +} +`; + +exports[`chat-completions → anthropic > reasoningRequest > response 1`] = ` +{ + "choices": [ + { + "finish_reason": "stop", + "index": 0, + "message": { + "annotations": [], + "content": "I'll solve this step by step using the formula: Average speed = Total distance ÷ Total time + +**Step 1: Calculate distance for each segment** + +Segment 1: 60 mph for 2 hours +- Distance = speed × time = 60 × 2 = 120 miles + +Segment 2: 80 mph for 1 hour +- Distance = speed × time = 80 × 1 = 80 miles + +**Step 2: Find totals** +- Total distance = 120 + 80 = 200 miles +- Total time = 2 + 1 = 3 hours + +**Step 3: Calculate average speed** +Average speed = Total distance ÷ Total time +Average speed = 200 miles ÷ 3 hours = 66.67 mph + +**Answer: The average speed is 66.67 mph (or 66⅔ mph)** + +Note: The average speed (66.67 mph) is not simply the arithmetic mean of the two speeds (70 mph) because the train spent different amounts of time at each speed.", + "role": "assistant", + }, + }, + ], + "created": 0, + "id": "chatcmpl-transformed", + "model": "claude-sonnet-4-20250514", + "object": "chat.completion", + "usage": { + "completion_tokens": 261, + "prompt_tokens": 45, + "prompt_tokens_details": { + "cached_tokens": 0, + }, + "total_tokens": 306, + }, +} +`; + +exports[`chat-completions → anthropic > reasoningRequestTruncated > request 1`] = ` +{ + "max_tokens": 100, + "messages": [ + { + "content": "Solve this step by step: If a train travels 60 mph for 2 hours, then 80 mph for 1 hour, what's the average speed?", + "role": "user", + }, + ], + "model": "gpt-4o-mini", +} +`; + +exports[`chat-completions → anthropic > reasoningRequestTruncated > response 1`] = ` +{ + "choices": [ + { + "finish_reason": "length", + "index": 0, + "message": { + "annotations": [], + "content": "I'll solve this step by step using the formula: Average speed = Total distance ÷ Total time + +**Step 1: Calculate distance for each segment** + +First segment: +- Speed = 60 mph +- Time = 2 hours +- Distance = 60 × 2 = 120 miles + +Second segment: +- Speed = 80 mph +- Time = 1 hour +- Distance = 80 × ", + "role": "assistant", + }, + }, + ], + "created": 0, + "id": "chatcmpl-transformed", + "model": "claude-sonnet-4-20250514", + "object": "chat.completion", + "usage": { + "completion_tokens": 100, + "prompt_tokens": 45, + "prompt_tokens_details": { + "cached_tokens": 0, + }, + "total_tokens": 145, + }, +} +`; + +exports[`chat-completions → anthropic > reasoningWithOutput > request 1`] = ` +{ + "max_tokens": 4096, + "messages": [ + { + "content": "What color is the sky?", + "role": "user", + }, + ], + "model": "gpt-4o-mini", +} +`; + +exports[`chat-completions → anthropic > reasoningWithOutput > response 1`] = ` +{ + "choices": [ + { + "finish_reason": "stop", + "index": 0, + "message": { + "annotations": [], + "content": "The sky appears blue during the day under normal weather conditions. This is due to a phenomenon called Rayleigh scattering, where molecules in Earth's atmosphere scatter blue light from the sun more than other colors. + +Of course, the sky's color can change depending on conditions - it can appear red, orange, or pink during sunrise and sunset, gray during overcast weather, or nearly black at night.", + "role": "assistant", + }, + }, + ], + "created": 0, + "id": "chatcmpl-transformed", + "model": "claude-sonnet-4-20250514", + "object": "chat.completion", + "usage": { + "completion_tokens": 87, + "prompt_tokens": 13, + "prompt_tokens_details": { + "cached_tokens": 0, + }, + "total_tokens": 100, + }, +} +`; + +exports[`chat-completions → anthropic > simpleRequest > request 1`] = ` +{ + "max_tokens": 4096, + "messages": [ + { + "content": "What is the capital of France?", + "role": "user", + }, + ], + "model": "gpt-4o-mini", + "temperature": 1, + "thinking": { + "budget_tokens": 1024, + "type": "enabled", + }, +} +`; + +exports[`chat-completions → anthropic > simpleRequest > response 1`] = ` +{ + "choices": [ + { + "finish_reason": "stop", + "index": 0, + "message": { + "annotations": [], + "content": "The capital of France is Paris.", + "reasoning": "This is a straightforward factual question about geography. The capital of France is Paris. This is a well-established fact and there's no ambiguity or controversy around it.", + "reasoning_signature": "EtcCCkYICxgCKkCdIXUyVg3DaxfLI8Hie56Ksu41ye5HUj9fwp1vbLCo1cKu/Sk5K90qFnozb2HxfjmifzJ3Sae/P1wH3A56rUp/Egz2qyGq7ZdRr9EocJcaDANqdJZUKkxkABGX6SIwCsbRol95Vel2Etd4f9Bta2w2eDsLXIj47H4nKqt6x01867xq+ZGaOXbt6NRaQ1ItKr4BZnUNdD2Sbyl0pV3E+FgqWnoNLCBqXZhKAy4uTvSwVEFMGFRm0fKnc1h+cw8vQPX4DIxyyZ9SqAdu9Q0D9v787H4pz/EiY1SuReIMgdU2nAMVRgbIfQPDbbTEL/9QDrjtEalFaCIIARjAoxQbhgs3AxQMVSOWiB/ZNcrtE5Shx255yHae36X8kMt8JetT/tNbg6u1K1QnS/5U5pla9KTyscYKTjdmmnvTLdq2vAJ/sPb8nDkYEljnmo5ev3EU3RgB", + "role": "assistant", + }, + }, + ], + "created": 0, + "id": "chatcmpl-transformed", + "model": "claude-sonnet-4-20250514", + "object": "chat.completion", + "usage": { + "completion_tokens": 55, + "prompt_tokens": 43, + "prompt_tokens_details": { + "cached_tokens": 0, + }, + "total_tokens": 98, + }, +} +`; + +exports[`chat-completions → anthropic > toolCallRequest > request 1`] = ` +{ + "max_tokens": 4096, + "messages": [ + { + "content": "What's the weather like in San Francisco?", + "role": "user", + }, + ], + "model": "gpt-4o-mini", + "tool_choice": { + "type": "auto", + }, + "tools": [ + { + "description": "Get the current weather for a location", + "input_schema": { + "properties": { + "location": { + "description": "The city and state, e.g. San Francisco, CA", + "type": "string", + }, + }, + "required": [ + "location", + ], + "type": "object", + }, + "name": "get_weather", + }, + ], +} +`; + +exports[`chat-completions → anthropic > toolCallRequest > response 1`] = ` +{ + "choices": [ + { + "finish_reason": "tool_calls", + "index": 0, + "message": { + "annotations": [], + "content": "I'll check the current weather in San Francisco for you.", + "role": "assistant", + "tool_calls": [ + { + "function": { + "arguments": "{"location":"San Francisco, CA"}", + "name": "get_weather", + }, + "id": "toolu_01UDUGC3YdtpQ8bkdZQMpGMq", + "type": "function", + }, + ], + }, + }, + ], + "created": 0, + "id": "chatcmpl-transformed", + "model": "claude-sonnet-4-20250514", + "object": "chat.completion", + "usage": { + "completion_tokens": 69, + "prompt_tokens": 402, + "prompt_tokens_details": { + "cached_tokens": 0, + }, + "total_tokens": 471, + }, +} +`; + +exports[`responses → anthropic > complexReasoningRequest > request 1`] = ` +{ + "max_tokens": 20000, + "messages": [ + { + "content": "There is a digital clock, with minutes and hours in the form of 00:00. The clock shows all times from 00:00 to 23:59 and repeating. Imagine you had a list of all these times. Which digit(s) is the most common and which is the rarest? Can you find their percentage?", + "role": "user", + }, + ], + "model": "gpt-5-nano", + "temperature": 1, + "thinking": { + "budget_tokens": 15000, + "type": "enabled", + }, +} +`; + +exports[`responses → anthropic > complexReasoningRequest > response 1`] = ` +{ + "created_at": 0, + "id": "resp_transformed", + "model": "claude-sonnet-4-20250514", + "object": "response", + "output": [ + { + "encrypted_content": "ErEoCkYICxgCKkA8IUxkFpYSDEe46RWryjG+s3U8CFLAnp587Um2wuTeU8x2/DeBGe37TyJWDn/ByJ6VBq0ckjMXhD8CxaytkUKDEgyqMSPdADtVflQxIAYaDOBn4ZUxh+J8c+NSTiIw3buNNvJyCfMe5bqD/i3o0b9cNDYyy9AXSd17xmYls35pnVxX2ZDQlZOy0yazo4vIKpgn8DOs+vi8Tv5L/7RdUuxQVkcYgiksfHDGJtT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BmQVI5IrMDc8s9C6xFs3inms5Sa8AkWa/qXcg5P81ogyIkUEsFjX9vflG80kuTmZ/q01SkQKxNBhJlh/fUds2r7AJFG1FWY3VCJoQX+enOG9Q43palkLoUJWvt6Hvn3F2L6RJHis7R21eYJCj73kCWw4dj/hsMQf0Lff8+CZzTUaj29NuIC9jbyVRfCSM7On//yR1zMnl7HJzN/GAE=", + "summary": [ + { + "text": "I need to analyze all the times from 00:00 to 23:59 and count how often each digit (0-9) appears. + +Let me break this down systematically: + +The format is HH:MM where: +- HH ranges from 00 to 23 (24 hours) +- MM ranges from 00 to 59 (60 minutes) + +So there are 24 × 60 = 1440 different times. + +Each time has 4 digits, so there are 1440 × 4 = 5760 total digit positions. + +Let me count each digit: + +For the hours (HH): +- First digit of hour (tens place): + - 0: appears in 00-09 (10 times) for each of the 60 minutes = 10 × 60 = 600 times + - 1: appears in 10-19 (10 times) for each of the 60 minutes = 10 × 60 = 600 times + - 2: appears in 20-23 (4 times) for each of the 60 minutes = 4 × 60 = 240 times + - 3,4,5,6,7,8,9: don't appear in the tens place of hours + +- Second digit of hour (ones place): + - 0: appears in 00, 10, 20 for each of the 60 minutes = 3 × 60 = 180 times + - 1: appears in 01, 11, 21 for each of the 60 minutes = 3 × 60 = 180 times + - 2: appears in 02, 12, 22 for each of the 60 minutes = 3 × 60 = 180 times + - 3: appears in 03, 13, 23 for each of the 60 minutes = 3 × 60 = 180 times + - 4-7: each appears in two hours (like 04, 14) for each of the 60 minutes = 2 × 60 = 120 times each + - 8: appears in 08, 18 for each of the 60 minutes = 2 × 60 = 120 times + +For the minutes (MM), digits 0-9 each appear equally across all 24 hours. The tens place cycles through 0-5 six times per hour, and the ones place cycles through 0-9 six times per hour, giving each digit 24 × 6 = 144 occurrences in both the tens and ones positions of minutes. 10 times) for each of the 24 hours = 10 × 24 = 240 times. The digits 4 and 5 follow the same pattern in the 40-49 and 50-59 ranges respectively, each appearing 240 times. Digits 6 through 9 never appear in the tens position of minutes. + +For the ones place of minutes, 0 shows up in 00, 10, 20, 30, 40, 50 across all 24 hours, totaling 144 occurrences. The digit 1 appears similarly in 01, 11, 21, 31, 41, and continues this pattern. × 24 = 144 times. The digits 6 through 9 follow the same pattern—each appears in six different minute values (06, 16, 26, 36, 46, 56 for digit 6, and so on) across all 24 hours, giving 144 occurrences for each digit. + +Now I need to tally the total appearances for each digit across all positions. Digits 0 and 1 appear most frequently, with 1,164 occurrences each—they show up in the hour tens place 600 times, hour ones 180 times, minute tens 240 times, and minute ones 144 times. Digit 2 appears 804 times total, while digits 3 and 4 appear less frequently at 564 and 504 times respectively since they don't appear in the hour tens position. Digit 5 follows a similar pattern to 4, appearing in the hour ones 120 times, minute tens 240 times, and minute ones 144 times. + +Digits 6 through 9 are the least common, each appearing only 264 times—they're restricted to the hour ones position (120 times) and minute ones position (144 times). The sum across all digits is 5,760, confirming the calculation. This means digits 0 and 1 represent about 20.21% of all digit occurrences, while digits 6-9 each account for roughly 4.58%.", + "type": "summary_text", + }, + ], + "type": "reasoning", + }, + { + "content": [ + { + "annotations": [], + "logprobs": [], + "text": "Looking at this systematically, I need to count how often each digit (0-9) appears across all times from 00:00 to 23:59. + +There are 24 hours × 60 minutes = 1,440 different times, and each time has 4 digits, giving us 5,760 total digit positions. + +Let me break this down by position: + +**Hours (HH):** +- Tens place: 0 (00-09), 1 (10-19), 2 (20-23) +- Ones place: 0-9 in various patterns + +**Minutes (MM):** +- Tens place: 0-5 (00-59) +- Ones place: 0-9 in cycles + +**Counting each digit:** + +**Digit 0:** 1,164 occurrences +- Hour tens: 600 (00-09, 60 minutes each) +- Hour ones: 180 (00, 10, 20, 60 minutes each) +- Minute tens: 240 (00-09, 24 hours each) +- Minute ones: 144 (x0, x0, x0... pattern, 24 hours each) + +**Digit 1:** 1,164 occurrences +- Hour tens: 600 (10-19, 60 minutes each) +- Hour ones: 180 (01, 11, 21, 60 minutes each) +- Minute tens: 240 (10-19, 24 hours each) +- Minute ones: 144 (x1 pattern, 24 hours each) + +**Digit 2:** 804 occurrences +- Hour tens: 240 (20-23, 60 minutes each) +- Hour ones: 180 (02, 12, 22, 60 minutes each) +- Minute tens: 240 (20-29, 24 hours each) +- Minute ones: 144 (x2 pattern, 24 hours each) + +**Digits 3:** 564 occurrences +**Digits 4-5:** 504 occurrences each +**Digits 6-9:** 264 occurrences each + +**Results:** +- **Most common:** 0 and 1 (tied) - 1,164 occurrences = **20.21%** +- **Least common:** 6, 7, 8, and 9 (tied) - 264 occurrences = **4.58%** + +The digits 0 and 1 dominate because they appear frequently in the hour tens position (covering 20 of the 24 hours), while digits 6-9 never appear in either tens position and only show up in the ones positions.", + "type": "output_text", + }, + ], + "role": "assistant", + "status": "completed", + "type": "message", + }, + ], + "output_text": "Looking at this systematically, I need to count how often each digit (0-9) appears across all times from 00:00 to 23:59. + +There are 24 hours × 60 minutes = 1,440 different times, and each time has 4 digits, giving us 5,760 total digit positions. + +Let me break this down by position: + +**Hours (HH):** +- Tens place: 0 (00-09), 1 (10-19), 2 (20-23) +- Ones place: 0-9 in various patterns + +**Minutes (MM):** +- Tens place: 0-5 (00-59) +- Ones place: 0-9 in cycles + +**Counting each digit:** + +**Digit 0:** 1,164 occurrences +- Hour tens: 600 (00-09, 60 minutes each) +- Hour ones: 180 (00, 10, 20, 60 minutes each) +- Minute tens: 240 (00-09, 24 hours each) +- Minute ones: 144 (x0, x0, x0... pattern, 24 hours each) + +**Digit 1:** 1,164 occurrences +- Hour tens: 600 (10-19, 60 minutes each) +- Hour ones: 180 (01, 11, 21, 60 minutes each) +- Minute tens: 240 (10-19, 24 hours each) +- Minute ones: 144 (x1 pattern, 24 hours each) + +**Digit 2:** 804 occurrences +- Hour tens: 240 (20-23, 60 minutes each) +- Hour ones: 180 (02, 12, 22, 60 minutes each) +- Minute tens: 240 (20-29, 24 hours each) +- Minute ones: 144 (x2 pattern, 24 hours each) + +**Digits 3:** 564 occurrences +**Digits 4-5:** 504 occurrences each +**Digits 6-9:** 264 occurrences each + +**Results:** +- **Most common:** 0 and 1 (tied) - 1,164 occurrences = **20.21%** +- **Least common:** 6, 7, 8, and 9 (tied) - 264 occurrences = **4.58%** + +The digits 0 and 1 dominate because they appear frequently in the hour tens position (covering 20 of the 24 hours), while digits 6-9 never appear in either tens position and only show up in the ones positions.", + "parallel_tool_calls": false, + "status": "completed", + "tool_choice": "none", + "tools": [], + "usage": { + "input_tokens": 109, + "input_tokens_details": { + "cached_tokens": 0, + }, + "output_tokens": 3043, + "output_tokens_details": { + "reasoning_tokens": 0, + }, + "total_tokens": 3152, + }, +} +`; + +exports[`responses → anthropic > multimodalRequest > request 1`] = ` +{ + "max_tokens": 300, + "messages": [ + { + "content": [ + { + "text": "What do you see in this image?", + "type": "text", + }, + { + "source": { + "type": "url", + "url": "https://t3.ftcdn.net/jpg/02/36/99/22/360_F_236992283_sNOxCVQeFLd5pdqaKGh8DRGMZy7P4XKm.jpg", + }, + "type": "image", + }, + ], + "role": "user", + }, + ], + "model": "gpt-5-nano", +} +`; + +exports[`responses → anthropic > multimodalRequest > response 1`] = ` +{ + "created_at": 0, + "id": "resp_transformed", + "model": "claude-sonnet-4-20250514", + "object": "response", + "output": [ + { + "content": [ + { + "annotations": [], + "logprobs": [], + "text": "I see an adorable young tabby kitten lying on what appears to be a wooden floor. The kitten has beautiful striped markings in gray and brown tones, with distinctive large yellow-green eyes that are looking directly at the camera. The kitten is positioned on its side in a relaxed, playful pose with its head tilted at a charming angle. Its ears are perked up and alert, and you can see its small pink nose and whiskers clearly. In the blurred background, there appears to be some furniture, possibly wooden chairs or a table. The lighting in the photo is soft and warm, creating a cozy, intimate feeling that perfectly captures this sweet moment with the kitten.", + "type": "output_text", + }, + ], + "role": "assistant", + "status": "completed", + "type": "message", + }, + ], + "output_text": "I see an adorable young tabby kitten lying on what appears to be a wooden floor. The kitten has beautiful striped markings in gray and brown tones, with distinctive large yellow-green eyes that are looking directly at the camera. The kitten is positioned on its side in a relaxed, playful pose with its head tilted at a charming angle. Its ears are perked up and alert, and you can see its small pink nose and whiskers clearly. In the blurred background, there appears to be some furniture, possibly wooden chairs or a table. The lighting in the photo is soft and warm, creating a cozy, intimate feeling that perfectly captures this sweet moment with the kitten.", + "parallel_tool_calls": false, + "status": "completed", + "tool_choice": "none", + "tools": [], + "usage": { + "input_tokens": 278, + "input_tokens_details": { + "cached_tokens": 0, + }, + "output_tokens": 151, + "output_tokens_details": { + "reasoning_tokens": 0, + }, + "total_tokens": 429, + }, +} +`; + +exports[`responses → anthropic > reasoningRequest > request 1`] = ` +{ + "max_tokens": 4096, + "messages": [ + { + "content": "Solve this step by step: If a train travels 60 mph for 2 hours, then 80 mph for 1 hour, what's the average speed?", + "role": "user", + }, + ], + "model": "gpt-5-nano", + "temperature": 1, + "thinking": { + "budget_tokens": 3072, + "type": "enabled", + }, +} +`; + +exports[`responses → anthropic > reasoningRequest > response 1`] = ` +{ + "created_at": 0, + "id": "resp_transformed", + "model": "claude-sonnet-4-20250514", + "object": "response", + "output": [ + { + "encrypted_content": "EooHCkYICxgCKkAf/+k3sfdt5oisAA2hvTbFQLm+CItHqUUf0tbGEPs1d31nJRrxrdntR87LSUXvF+PJBDn86MFmFOMzxW4BZ/GrEgxTNNcTVYONg2p9rgYaDMS8Ppz16FiQvLMrVSIwMEBArCL5Wyv5Mmea01sBzoM5+Bn5S73T0z5Ey77mY2O70glS/3uEU8gthco9YdVJKvEFQ1zqvQRJ6bmaWOI9rRw3c/8me2qPaOdeN6Q1/rGw0iVyd61wZ96+1oX7sfh3eKS3IGDO5pSP+r4OhqoFtc/H2JMo3Z7dW5KX77HWDpcbdkHIiP9URy+M1lczMtzbAvQrxPVG2MhZj4YfrlRe7UbcIiuNbOnfQWG9bCre8xy45K1z+SQgXxNydQpqJ4WqhldicWkec1dp313V0CLiXZWH6Zfp9+80bQCFnDNYjYvcAmACbbmeGAjS4CHrm7aIol3aq9sBRnuWlCQbO6U55KJVHBgVYR23hcrvBTJTQZicPRuJw1DfjbvZTFI6pA/j9y6Dz/praFwHkeTT7V6RyogQJJ70HnGRgSRf2pv1l0TP1Gp7K1q+gCSvhHeV9lj7c4HvimHa+6aeGi+0J7Zpbgw/4cLFem4UpNxbhOvAvZSJ7j37HFyL1CbD/W27M0bXLzWlDNF5PzaQI4laDjILh9VYdvHTi8ynzNYDoKUcqDahu+fFmybFWO7l7ohXMNIkD81VrhnJbgRFDysqP1WNTqSNDGqLfBjp3CfRVKfqvwQGb9nWMHMlJsgZs21cOXQz8uLPIhOTyVBzoIskLhPXxGe54Doo6LCKDmI6RP6co1ShVXEABJ4FZkGdMEfJwP+6mIBt0TIFw61/TUgxsWB6QyQeFIOPybjHmF10qbDKcnx72A0Rqvg7oSyvPTiaEPJiyQV17Xv82M89DkDdF5fWSoDXpD5LfIM/9+S2oH/SzvhiBLAAy4/CyVPRqBUlIKkpdKXu7scRam0qyZS0ZmVLFfdIwvtNrBuv1FvEctb/ZMrbILFJp++4cyjnc/+noUX4CNGOorZ8U0a4qMkNbMKDcYJdEpytIUisGRHVBYxgCi+Qz+Tx/GjJu47MxHYXh3GldEvIrwLhdU8nWM+DxLs7Lt4ySij2feoCPCULusR9gGXBhbvt2D+iBz+fJXa8NrklNMZkQnvQT5K3NisODClwd7ACLDkrHD8Py3GX8pRk2ToZAH3jGAE=", + "summary": [ + { + "text": "To find the average speed, I need to calculate the total distance traveled and divide it by the total time taken. + +Let me break this down: + +First part of the journey: +- Speed: 60 mph +- Time: 2 hours +- Distance = Speed × Time = 60 × 2 = 120 miles + +Second part of the journey: +- Speed: 80 mph +- Time: 1 hour +- Distance = Speed × Time = 80 × 1 = 80 miles + +Total distance = 120 + 80 = 200 miles +Total time = 2 + 1 = 3 hours + +Average speed = Total distance ÷ Total time = 200 ÷ 3 = 66.67 mph (rounded to 2 decimal places) + +Let me double-check this: +- First segment: 60 mph × 2 hours = 120 miles +- Second segment: 80 mph × 1 hour = 80 miles +- Total: 200 miles in 3 hours +- Average: 200/3 = 66⅔ mph ≈ 66.67 mph + +Yes, that's correct.", + "type": "summary_text", + }, + ], + "type": "reasoning", + }, + { + "content": [ + { + "annotations": [], + "logprobs": [], + "text": "I'll solve this step-by-step using the formula: Average Speed = Total Distance ÷ Total Time + +**Step 1: Calculate distance for each segment** + +First segment: +- Speed = 60 mph +- Time = 2 hours +- Distance = 60 × 2 = 120 miles + +Second segment: +- Speed = 80 mph +- Time = 1 hour +- Distance = 80 × 1 = 80 miles + +**Step 2: Find totals** + +Total distance = 120 + 80 = 200 miles +Total time = 2 + 1 = 3 hours + +**Step 3: Calculate average speed** + +Average speed = Total distance ÷ Total time +Average speed = 200 miles ÷ 3 hours = 66.67 mph + +**Answer: The average speed is 66.67 mph (or 66⅔ mph)**", + "type": "output_text", + }, + ], + "role": "assistant", + "status": "completed", + "type": "message", + }, + ], + "output_text": "I'll solve this step-by-step using the formula: Average Speed = Total Distance ÷ Total Time + +**Step 1: Calculate distance for each segment** + +First segment: +- Speed = 60 mph +- Time = 2 hours +- Distance = 60 × 2 = 120 miles + +Second segment: +- Speed = 80 mph +- Time = 1 hour +- Distance = 80 × 1 = 80 miles + +**Step 2: Find totals** + +Total distance = 120 + 80 = 200 miles +Total time = 2 + 1 = 3 hours + +**Step 3: Calculate average speed** + +Average speed = Total distance ÷ Total time +Average speed = 200 miles ÷ 3 hours = 66.67 mph + +**Answer: The average speed is 66.67 mph (or 66⅔ mph)**", + "parallel_tool_calls": false, + "status": "completed", + "tool_choice": "none", + "tools": [], + "usage": { + "input_tokens": 74, + "input_tokens_details": { + "cached_tokens": 0, + }, + "output_tokens": 511, + "output_tokens_details": { + "reasoning_tokens": 0, + }, + "total_tokens": 585, + }, +} +`; + +exports[`responses → anthropic > reasoningRequestTruncated > request 1`] = ` +{ + "max_tokens": 100, + "messages": [ + { + "content": "Solve this step by step: If a train travels 60 mph for 2 hours, then 80 mph for 1 hour, what's the average speed?", + "role": "user", + }, + ], + "model": "gpt-5-nano", + "temperature": 1, + "thinking": { + "budget_tokens": 1024, + "type": "enabled", + }, +} +`; + +exports[`responses → anthropic > reasoningWithOutput > request 1`] = ` +{ + "max_tokens": 4096, + "messages": [ + { + "content": "What color is the sky?", + "role": "user", + }, + ], + "model": "gpt-5-nano", + "temperature": 1, + "thinking": { + "budget_tokens": 1024, + "type": "enabled", + }, +} +`; + +exports[`responses → anthropic > reasoningWithOutput > response 1`] = ` +{ + "created_at": 0, + "id": "resp_transformed", + "model": "claude-sonnet-4-20250514", + "object": "response", + "output": [ + { + "encrypted_content": "EuUGCkYICxgCKkBB+eX22CK0b06mGqZZbMv0k1l5dz27fb2vtxw36OiqZ5hO0WlpvNzjo/kAEsKsETlgvDb3Ox0dgV4LgPOlg2wZEgwxp2whJKzIIDkIPqEaDOGdNlvVmcwXEqbJHiIwD4WP0Npp721Hwz3QLy7aqlo1os3D0cPiZZAy3UPKZE2ZbDnpepILnOskeqEo1EEgKswFC4f1UMD0IRftFMgEZSKCgwWEpLgtULkjWrz6/qgxZxKfqLjgJVsQnF/qcEWpp5JjCyqbQjA+/qhl6ODHzJIMAdBkumLceLTxUylr63LXlWQrDcCQTLp/O5Mvzhfycj5qxxbGo1seRGarTBmydg3S9H3LlRUIiF6xGUlMNxsqGnD3g6ESefJhdK4UKWc+Sitqvi3vOJcHCjeGzWI5PQr9CwwvDbnh7IebM7dx1bsC5pSE9XHs4tfA2+jHNMaU/wY5FI++Cdkle7PI7/2IrlMQg+5kdZ4N9SZVKW1yA1glEYpvbMegyl4QHRcH8sh0H1MJ9sSkdDqyS1IPxkfxcHanaKd7gIfNuv9Xsa/jkHOcgMrmBrC7hh/DSkSBenwi9kIt9ElHyJWDE3PRFGDzd/PytXdG61wtPtJnqyP38T/oFUn6jYe9e3RMWQeOJRaHLWgbSnf5dBi7HNbWHzlavgwEKl05XyC7WLybyG/+Fw71YXc+G3nN1zO4PKHdPSRIR53VXUp9nq2T1iNs1jjkfDtI/ofCY+u9FQUYf+KRFJN+iTUYff6/RZNNkgJSRM+BS2h2ivLxSPggOoBUqANKR3S0ttyL+yZWrFY7GpQ7huBU7+CU3jG9h10TawSo04MYtLfC7g0k6wtk02negHii3sd9Cve8w8PfINbXollBF3d+t8+K7CprssPBmHztNfbNNJcuRc+C0x0FqJW3BQFSOJYUbSw1gKpB4i3J+ZgPB4HbBC0YWe+OCfAbbD3qHZkyal9oA9zOVukGkiU6V11iZs9sGjQUFZjyHKulx+LkcHtiwDZe+RgrQFU1p64AKP9jW6BBexWk+XYzqaASq2thC5cFX88Lib5kBc0ycRBy3ZW7YgWUnOCu+fZohq9vo3oPnvQ+cllMgL4gL90tzRkaDN4Xa4GdJZI2K7flxytv83pg2cwq5TT5FQpD/tPM8MYYAQ==", + "summary": [ + { + "text": "This is a straightforward question about the color of the sky. The sky appears blue during the day under normal clear weather conditions. This is due to a phenomenon called Rayleigh scattering, where shorter blue wavelengths of light are scattered more by molecules in Earth's atmosphere than longer wavelengths like red. + +However, the sky can appear different colors at different times and under different conditions: +- Blue during a clear day +- Various shades of red, orange, pink, and purple during sunrise and sunset +- Gray or white when cloudy +- Dark/black at night +- Sometimes green during certain weather phenomena + +I should give the most common/typical answer while acknowledging it can vary.", + "type": "summary_text", + }, + ], + "type": "reasoning", + }, + { + "content": [ + { + "annotations": [], + "logprobs": [], + "text": "The sky is typically blue during the day. This blue color occurs because of the way sunlight interacts with Earth's atmosphere - shorter blue wavelengths of light are scattered more than other colors by the tiny molecules in the air. + +However, the sky can appear different colors depending on conditions: +- Red, orange, or pink during sunrise and sunset +- Gray or white when cloudy +- Dark blue to black at night +- Sometimes dramatic colors during storms or other weather events", + "type": "output_text", + }, + ], + "role": "assistant", + "status": "completed", + "type": "message", + }, + ], + "output_text": "The sky is typically blue during the day. This blue color occurs because of the way sunlight interacts with Earth's atmosphere - shorter blue wavelengths of light are scattered more than other colors by the tiny molecules in the air. + +However, the sky can appear different colors depending on conditions: +- Red, orange, or pink during sunrise and sunset +- Gray or white when cloudy +- Dark blue to black at night +- Sometimes dramatic colors during storms or other weather events", + "parallel_tool_calls": false, + "status": "completed", + "tool_choice": "none", + "tools": [], + "usage": { + "input_tokens": 42, + "input_tokens_details": { + "cached_tokens": 0, + }, + "output_tokens": 258, + "output_tokens_details": { + "reasoning_tokens": 0, + }, + "total_tokens": 300, + }, +} +`; + +exports[`responses → anthropic > simpleRequest > request 1`] = ` +{ + "max_tokens": 4096, + "messages": [ + { + "content": "What is the capital of France?", + "role": "user", + }, + ], + "model": "gpt-5-nano", + "temperature": 1, + "thinking": { + "budget_tokens": 1024, + "type": "enabled", + }, +} +`; + +exports[`responses → anthropic > simpleRequest > response 1`] = ` +{ + "created_at": 0, + "id": "resp_transformed", + "model": "claude-sonnet-4-20250514", + "object": "response", + "output": [ + { + "encrypted_content": "ErgCCkYICxgCKkDAcAhMIaE3za7R+jLBO4RA0fkGL5aFbum0oHigdpj1dsb9boZ43P4FDr6LxJR254S2ywAopiH3X4j6ppTeWcW5EgzL+t1/IG5QQn3bIEgaDEAn4pb8I/rFYD96bSIwqKqtw1KIV1fLg2iUixWAa8I2tcjvsPNvjmdsJWrMNGr0pqDG+6sw5vk6I9xQom2LKp8B9qIqdQr6vAVEdJWQ2NCrdE/hQhe0O2wrQ3NCjRFDaB3F6sZe8vB0vFgGTGVJK7HdTO7eVnO6ydUDwqTjXRCYqTG0wLOthalPjvRDxzxPr3CacrcaNiU8a3AOcWzgmDZx/bU7tUwt3w53XbNTwCHJYqxs1WJyMdIB8iLs5M7SMcQ6+VOsUH9uVkxEFlfRYtiAio4DMsdt5Yn5e8YCOBAuGAE=", + "summary": [ + { + "text": "This is a straightforward factual question about geography. The capital of France is Paris. This is basic knowledge that I can answer directly.", + "type": "summary_text", + }, + ], + "type": "reasoning", + }, + { + "content": [ + { + "annotations": [], + "logprobs": [], + "text": "The capital of France is Paris.", + "type": "output_text", + }, + ], + "role": "assistant", + "status": "completed", + "type": "message", + }, + ], + "output_text": "The capital of France is Paris.", + "parallel_tool_calls": false, + "status": "completed", + "tool_choice": "none", + "tools": [], + "usage": { + "input_tokens": 43, + "input_tokens_details": { + "cached_tokens": 0, + }, + "output_tokens": 46, + "output_tokens_details": { + "reasoning_tokens": 0, + }, + "total_tokens": 89, + }, +} +`; + +exports[`responses → anthropic > toolCallRequest > request 1`] = ` +{ + "max_tokens": 4096, + "messages": [ + { + "content": "What's the weather like in San Francisco?", + "role": "user", + }, + ], + "model": "gpt-5-nano", + "tool_choice": { + "type": "auto", + }, + "tools": [ + { + "description": "Get the current weather for a location", + "input_schema": { + "properties": { + "location": { + "description": "The city and state, e.g. San Francisco, CA", + "type": "string", + }, + }, + "required": [ + "location", + ], + "type": "object", + }, + "name": "get_weather", + "strict": false, + }, + ], +} +`; + +exports[`responses → anthropic > toolCallRequest > response 1`] = ` +{ + "created_at": 0, + "id": "resp_transformed", + "model": "claude-sonnet-4-20250514", + "object": "response", + "output": [ + { + "content": [ + { + "annotations": [], + "logprobs": [], + "text": "I'll check the current weather in San Francisco for you.", + "type": "output_text", + }, + ], + "role": "assistant", + "status": "completed", + "type": "message", + }, + { + "arguments": "{"location":"San Francisco, CA"}", + "call_id": "toolu_01RYyweGHhGo3FJwJQpxCsgA", + "name": "get_weather", + "status": "completed", + "type": "function_call", + }, + ], + "output_text": "I'll check the current weather in San Francisco for you.", + "parallel_tool_calls": false, + "status": "completed", + "tool_choice": "none", + "tools": [], + "usage": { + "input_tokens": 402, + "input_tokens_details": { + "cached_tokens": 0, + }, + "output_tokens": 69, + "output_tokens_details": { + "reasoning_tokens": 0, + }, + "total_tokens": 471, + }, +} +`; diff --git a/payloads/scripts/transforms/helpers.ts b/payloads/scripts/transforms/helpers.ts new file mode 100644 index 0000000..4e0df53 --- /dev/null +++ b/payloads/scripts/transforms/helpers.ts @@ -0,0 +1,159 @@ +import { readFileSync } from "fs"; +import { join } from "path"; +import { + transform_request, + transform_response, + validate_anthropic_request, + validate_anthropic_response, + validate_chat_completions_request, + validate_chat_completions_response, + validate_responses_request, + validate_responses_response, +} from "@braintrust/lingua-wasm"; +import { allTestCases, getCaseNames, getCaseForProvider } from "../../cases"; + +export type SourceFormat = "chat-completions" | "responses" | "anthropic"; +export type WasmFormat = "OpenAI" | "Responses" | "Anthropic"; + +export interface TransformPair { + source: SourceFormat; + target: SourceFormat; + wasmSource: WasmFormat; + wasmTarget: WasmFormat; +} + +export const TRANSFORM_PAIRS: TransformPair[] = [ + { + source: "chat-completions", + target: "anthropic", + wasmSource: "OpenAI", + wasmTarget: "Anthropic", + }, + { + source: "responses", + target: "anthropic", + wasmSource: "Responses", + wasmTarget: "Anthropic", + }, + { + source: "anthropic", + target: "chat-completions", + wasmSource: "Anthropic", + wasmTarget: "OpenAI", + }, + { + source: "anthropic", + target: "responses", + wasmSource: "Anthropic", + wasmTarget: "Responses", + }, +]; + +// Validation functions by format +const REQUEST_VALIDATORS: Record unknown> = { + "chat-completions": validate_chat_completions_request, + responses: validate_responses_request, + anthropic: validate_anthropic_request, +}; + +const RESPONSE_VALIDATORS: Record unknown> = { + "chat-completions": validate_chat_completions_response, + responses: validate_responses_response, + anthropic: validate_anthropic_response, +}; + +interface TransformResultData { + passThrough?: boolean; + transformed?: boolean; + data: unknown; + sourceFormat?: string; +} + +function isTransformResultData(value: unknown): value is TransformResultData { + return typeof value === "object" && value !== null && "data" in value; +} + +// Transform and validate request +export function transformAndValidateRequest( + input: unknown, + wasmTarget: WasmFormat, + targetFormat: SourceFormat +): unknown { + const result = transform_request(JSON.stringify(input), wasmTarget); + if (!isTransformResultData(result)) { + throw new Error("Invalid transform result"); + } + const json = JSON.stringify(result.data); + + // Validate against Lingua's schema (derived from OpenAPI specs) + REQUEST_VALIDATORS[targetFormat](json); + + return result.data; +} + +// Validate and load response from file +export function loadAndValidateResponse( + path: string, + format: SourceFormat +): unknown { + const json = readFileSync(path, "utf-8"); + + // Validate against Lingua's schema + RESPONSE_VALIDATORS[format](json); + + return JSON.parse(json); +} + +// Map WasmFormat to SourceFormat for validation +const WASM_TO_SOURCE: Record = { + OpenAI: "chat-completions", + Responses: "responses", + Anthropic: "anthropic", +}; + +// Transform and validate response +export function transformResponseData( + response: unknown, + wasmSource: WasmFormat +): unknown { + const result = transform_response(JSON.stringify(response), wasmSource); + if (!isTransformResultData(result)) { + throw new Error("Invalid transform result"); + } + const json = JSON.stringify(result.data); + + // Validate transformed response against source format's schema + const sourceFormat = WASM_TO_SOURCE[wasmSource]; + RESPONSE_VALIDATORS[sourceFormat](json); + + return result.data; +} + +// Export validators for capture script +export { RESPONSE_VALIDATORS }; + +// Shared utilities for capture and test scripts +export const TRANSFORMS_DIR = join(__dirname, "../../transforms"); + +export const isParamCase = (name: string) => name.endsWith("Param"); + +export function getResponsePath( + source: string, + target: string, + caseName: string +): string { + return join(TRANSFORMS_DIR, `${source}_to_${target}`, `${caseName}.json`); +} + +export function getTransformableCases( + pair: TransformPair, + filter?: string +): string[] { + return getCaseNames(allTestCases).filter((caseName) => { + if (isParamCase(caseName)) return false; + if (filter && !caseName.includes(filter)) return false; + const sourceCase = getCaseForProvider(allTestCases, caseName, pair.source); + const testCase = allTestCases[caseName]; + return sourceCase != null && !testCase?.expect; + }); +} diff --git a/payloads/scripts/transforms/lingua-capture.ts b/payloads/scripts/transforms/lingua-capture.ts new file mode 100644 index 0000000..db60a09 --- /dev/null +++ b/payloads/scripts/transforms/lingua-capture.ts @@ -0,0 +1,126 @@ +#!/usr/bin/env tsx + +import { existsSync, mkdirSync, writeFileSync } from "fs"; +import { dirname } from "path"; +import Anthropic from "@anthropic-ai/sdk"; +import OpenAI from "openai"; +import { allTestCases, getCaseForProvider } from "../../cases"; +import { + TRANSFORM_PAIRS, + TRANSFORMS_DIR, + RESPONSE_VALIDATORS, + transformAndValidateRequest, + getTransformableCases, + getResponsePath, + type SourceFormat, +} from "./helpers"; + +// Models to substitute (source models may not exist on target provider) +const TARGET_MODELS: Record = { + anthropic: "claude-sonnet-4-20250514", + "chat-completions": "gpt-5-nano", + responses: "gpt-5-nano", +}; + +// Direct SDK clients +const anthropic = new Anthropic(); +const openai = new OpenAI(); + +/* eslint-disable @typescript-eslint/consistent-type-assertions -- SDK methods require specific param types, validation done by transformAndValidateRequest */ +// Direct SDK calls (request already validated by transformAndValidateRequest) +async function callProvider( + format: SourceFormat, + request: Record +): Promise { + switch (format) { + case "anthropic": + return anthropic.messages.create( + request as unknown as Anthropic.MessageCreateParams, + { headers: { "anthropic-beta": "structured-outputs-2025-11-13" } } + ); + case "chat-completions": + return openai.chat.completions.create( + request as unknown as OpenAI.ChatCompletionCreateParams + ); + case "responses": + return openai.responses.create( + request as unknown as OpenAI.Responses.ResponseCreateParams + ); + } +} +/* eslint-enable @typescript-eslint/consistent-type-assertions */ + +async function main() { + const args = process.argv.slice(2); + const force = args.includes("--force"); + const filter = args.find((a) => !a.startsWith("--")); + + mkdirSync(TRANSFORMS_DIR, { recursive: true }); + + let captured = 0, + skipped = 0, + failed = 0; + + for (const pair of TRANSFORM_PAIRS) { + const cases = getTransformableCases(pair, filter); + + for (const caseName of cases) { + const responsePath = getResponsePath(pair.source, pair.target, caseName); + mkdirSync(dirname(responsePath), { recursive: true }); + + if (existsSync(responsePath) && !force) { + console.log( + `⏭️ ${pair.source} → ${pair.target} / ${caseName} (exists)` + ); + skipped++; + continue; + } + + const input = getCaseForProvider(allTestCases, caseName, pair.source); + + try { + // 1. Transform + validate request against target schema + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- transformAndValidateRequest returns validated object + const request = transformAndValidateRequest( + input, + pair.wasmTarget, + pair.target + ) as Record; + + // 2. Override model for target provider + request.model = TARGET_MODELS[pair.target]; + + // 3. Call SDK directly + const response = await callProvider(pair.target, request); + + // 4. Validate response against target schema before saving + const responseJson = JSON.stringify(response, null, 2); + RESPONSE_VALIDATORS[pair.target](responseJson); + + // 5. Save validated response + writeFileSync(responsePath, responseJson); + console.log(`✅ ${pair.source} → ${pair.target} / ${caseName}`); + captured++; + } catch (e) { + // Save error response + const errorObj = e && typeof e === "object" ? e : {}; + const errorData = { + error: e instanceof Error ? e.message : String(e), + name: e instanceof Error ? e.name : undefined, + // Include response body if available (API errors often have useful details) + ...("response" in errorObj ? { response: errorObj.response } : {}), + }; + writeFileSync(responsePath, JSON.stringify(errorData, null, 2)); + console.error(`❌ ${pair.source} → ${pair.target} / ${caseName}: ${e}`); + failed++; + } + } + } + + console.log( + `\nDone: ${captured} captured, ${skipped} skipped, ${failed} failed` + ); + process.exit(failed > 0 ? 1 : 0); +} + +main(); diff --git a/payloads/scripts/transforms/transforms.test.ts b/payloads/scripts/transforms/transforms.test.ts new file mode 100644 index 0000000..09a9a8f --- /dev/null +++ b/payloads/scripts/transforms/transforms.test.ts @@ -0,0 +1,97 @@ +import { describe, test, expect } from "vitest"; +import { existsSync, readFileSync } from "fs"; +import { join } from "path"; +import { allTestCases, getCaseForProvider } from "../../cases"; +import { + TRANSFORM_PAIRS, + TRANSFORMS_DIR, + transformAndValidateRequest, + transformResponseData, + loadAndValidateResponse, + getTransformableCases, + getResponsePath, +} from "./helpers"; + +const API_TEST_TIMEOUT = 30000; + +// Load expected transformation errors (provider incompatibilities) +const ERRORS_PATH = join(TRANSFORMS_DIR, "transform_errors.json"); +const transformErrors: Record> = existsSync( + ERRORS_PATH +) + ? JSON.parse(readFileSync(ERRORS_PATH, "utf-8")) + : {}; + +// Explicitly skipped tests (add here only if intentionally not supported) +// Format: "source_to_target_caseName" +const SKIPPED_TESTS = new Set([ + // Add entries here with comments explaining why +]); + +function getTestKey(source: string, target: string, caseName: string): string { + return `${source}_to_${target}_${caseName}`; +} + +for (const pair of TRANSFORM_PAIRS) { + describe(`${pair.source} → ${pair.target}`, () => { + const cases = getTransformableCases(pair); + + for (const caseName of cases) { + const testKey = getTestKey(pair.source, pair.target, caseName); + const responsePath = getResponsePath(pair.source, pair.target, caseName); + + // Only skip if explicitly listed + if (SKIPPED_TESTS.has(testKey)) { + test.skip(caseName, () => {}); + continue; + } + + test( + caseName, + () => { + const pairKey = `${pair.source}_to_${pair.target}`; + + try { + // Fail if response file missing (should have been captured) + if (!existsSync(responsePath)) { + throw new Error( + `Missing response file: ${responsePath}\n` + + `Run 'pnpm transforms:capture ${caseName}' to capture, ` + + `or add "${testKey}" to SKIPPED_TESTS if intentionally skipped.` + ); + } + const input = getCaseForProvider( + allTestCases, + caseName, + pair.source + ); + + // 1. Transform request + validate against target schema + const request = transformAndValidateRequest( + input, + pair.wasmTarget, + pair.target + ); + expect(request).toMatchSnapshot("request"); + + // 2. Load response + validate against target schema + const response = loadAndValidateResponse(responsePath, pair.target); + + // 3. Transform response back → snapshot + const output = transformResponseData(response, pair.wasmSource); + expect(output).toMatchSnapshot("response"); + } catch (e) { + // Check if this is an expected error (known provider incompatibility) + const errorReason = transformErrors[pairKey]?.[caseName]; + if (errorReason) { + // Known error - pass the test + return; + } + throw e; // Unknown error - fail + } + }, + API_TEST_TIMEOUT + ); + } + }); +} diff --git a/payloads/transforms/anthropic_to_chat-completions/complexReasoningRequest.json b/payloads/transforms/anthropic_to_chat-completions/complexReasoningRequest.json new file mode 100644 index 0000000..1bc04a6 --- /dev/null +++ b/payloads/transforms/anthropic_to_chat-completions/complexReasoningRequest.json @@ -0,0 +1,35 @@ +{ + "id": "chatcmpl-D3BLX5x9yKK54dX0RjeeZcB7YPbfU", + "object": "chat.completion", + "created": 1769650971, + "model": "gpt-5-nano-2025-08-07", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "1440 times (00:00 to 23:59) times 4 digits each = 5760 digits in total.\n\nCount by digit (0–9):\n\n- H1 (tens of hours): 0 appears 600 times, 1 appears 600 times, 2 appears 240 times.\n- H2 (units of hours): 0,1,2,3 each appear 180 times; 4,5,6,7,8,9 each appear 120 times.\n- M1 (tens of minutes): digits 0–5 each appear 240 times; digits 6–9 appear 0 times.\n- M2 (units of minutes): each digit 0–9 appears 144 times.\n\nSum per digit across all positions:\n- 0: 600 + 180 + 240 + 144 = 1164\n- 1: 600 + 180 + 240 + 144 = 1164\n- 2: 240 + 180 + 240 + 144 = 804\n- 3: 0 + 180 + 240 + 144 = 564\n- 4: 0 + 120 + 240 + 144 = 504\n- 5: 0 + 120 + 240 + 144 = 504\n- 6: 0 + 120 + 0 + 144 = 264\n- 7: 0 + 120 + 0 + 144 = 264\n- 8: 0 + 120 + 0 + 144 = 264\n- 9: 0 + 120 + 0 + 144 = 264\n\nPercentages of the 5760 digits:\n- 0 or 1: 1164 / 5760 = 97/480 ≈ 20.21%\n- 2: 804 / 5760 = 67/480 ≈ 13.96%\n- 3: 564 / 5760 = 47/480 ≈ 9.79%\n- 4 or 5: 504 / 5760 = 7/80 = 8.75%\n- 6, 7, 8, 9: 264 / 5760 = 11/240 ≈ 4.58%\n\nConclusion:\n- Most common digits: 0 and 1, each about 20.21%.\n- Rarest digits: 6, 7, 8, and 9, each about 4.58%.", + "refusal": null, + "annotations": [] + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 74, + "completion_tokens": 13596, + "total_tokens": 13670, + "prompt_tokens_details": { + "cached_tokens": 0, + "audio_tokens": 0 + }, + "completion_tokens_details": { + "reasoning_tokens": 13056, + "audio_tokens": 0, + "accepted_prediction_tokens": 0, + "rejected_prediction_tokens": 0 + } + }, + "service_tier": "default", + "system_fingerprint": null +} \ No newline at end of file diff --git a/payloads/transforms/anthropic_to_chat-completions/multimodalRequest.json b/payloads/transforms/anthropic_to_chat-completions/multimodalRequest.json new file mode 100644 index 0000000..956d9f9 --- /dev/null +++ b/payloads/transforms/anthropic_to_chat-completions/multimodalRequest.json @@ -0,0 +1,36 @@ +{ + "id": "chatcmpl-D3Aa5GVzhmbtiZ4YWnIxgensE4gFg", + "object": "chat.completion", + "created": 1769648029, + "model": "gpt-4o-mini-2024-07-18", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "This image features a Pokémon character known for its distinct blue-green skin and large, leafy plant on its back. It has big red eyes and a cute, round face. The character is often associated with nature and is a beginner-level Pokémon in the series.", + "refusal": null, + "annotations": [] + }, + "logprobs": null, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 8515, + "completion_tokens": 51, + "total_tokens": 8566, + "prompt_tokens_details": { + "cached_tokens": 0, + "audio_tokens": 0 + }, + "completion_tokens_details": { + "reasoning_tokens": 0, + "audio_tokens": 0, + "accepted_prediction_tokens": 0, + "rejected_prediction_tokens": 0 + } + }, + "service_tier": "default", + "system_fingerprint": "fp_3683ee3deb" +} \ No newline at end of file diff --git a/payloads/transforms/anthropic_to_chat-completions/reasoningRequest.json b/payloads/transforms/anthropic_to_chat-completions/reasoningRequest.json new file mode 100644 index 0000000..bd2543c --- /dev/null +++ b/payloads/transforms/anthropic_to_chat-completions/reasoningRequest.json @@ -0,0 +1,35 @@ +{ + "id": "chatcmpl-D3BLKqd79W3DJHUENamWfq204RGee", + "object": "chat.completion", + "created": 1769650958, + "model": "gpt-5-nano-2025-08-07", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "Step 1: Compute distances\n- Distance1 = 60 mph × 2 h = 120 miles\n- Distance2 = 80 mph × 1 h = 80 miles\n\nStep 2: Total distance\n- Total distance = 120 + 80 = 200 miles\n\nStep 3: Total time\n- Total time = 2 h + 1 h = 3 h\n\nStep 4: Average speed\n- Average speed = Total distance / Total time = 200 miles / 3 h = 200/3 mph ≈ 66.7 mph\n\nAnswer: 200/3 mph (about 66 2/3 mph).", + "refusal": null, + "annotations": [] + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 38, + "completion_tokens": 659, + "total_tokens": 697, + "prompt_tokens_details": { + "cached_tokens": 0, + "audio_tokens": 0 + }, + "completion_tokens_details": { + "reasoning_tokens": 512, + "audio_tokens": 0, + "accepted_prediction_tokens": 0, + "rejected_prediction_tokens": 0 + } + }, + "service_tier": "default", + "system_fingerprint": null +} \ No newline at end of file diff --git a/payloads/transforms/anthropic_to_chat-completions/reasoningRequestTruncated.json b/payloads/transforms/anthropic_to_chat-completions/reasoningRequestTruncated.json new file mode 100644 index 0000000..0615a9f --- /dev/null +++ b/payloads/transforms/anthropic_to_chat-completions/reasoningRequestTruncated.json @@ -0,0 +1,36 @@ +{ + "id": "chatcmpl-D3Aa3l9B3osC8Dm6C8xoq958PkEO6", + "object": "chat.completion", + "created": 1769648027, + "model": "gpt-4o-mini-2024-07-18", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "To find the average speed of the train over the entire trip, we can use the formula for average speed:\n\n\\[\n\\text{Average Speed} = \\frac{\\text{Total Distance}}{\\text{Total Time}}\n\\]\n\n### Step 1: Calculate the distance traveled at each speed.\n\n1. **Travel at 60 mph for 2 hours:**\n \\[\n \\text{Distance} = \\text{Speed} \\times \\text{Time} = 60 \\", + "refusal": null, + "annotations": [] + }, + "logprobs": null, + "finish_reason": "length" + } + ], + "usage": { + "prompt_tokens": 39, + "completion_tokens": 100, + "total_tokens": 139, + "prompt_tokens_details": { + "cached_tokens": 0, + "audio_tokens": 0 + }, + "completion_tokens_details": { + "reasoning_tokens": 0, + "audio_tokens": 0, + "accepted_prediction_tokens": 0, + "rejected_prediction_tokens": 0 + } + }, + "service_tier": "default", + "system_fingerprint": "fp_1590f93f9d" +} \ No newline at end of file diff --git a/payloads/transforms/anthropic_to_chat-completions/reasoningWithOutput.json b/payloads/transforms/anthropic_to_chat-completions/reasoningWithOutput.json new file mode 100644 index 0000000..ac9d31e --- /dev/null +++ b/payloads/transforms/anthropic_to_chat-completions/reasoningWithOutput.json @@ -0,0 +1,35 @@ +{ + "id": "chatcmpl-D3BNfc3tJcbYfhAjn2ia8PMFr4lHD", + "object": "chat.completion", + "created": 1769651103, + "model": "gpt-5-nano-2025-08-07", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "Usually blue during a clear day. That’s because sunlight (white light) scatters off the atmosphere, and the shorter blue wavelengths scatter more than the others.\n\nColors can change:\n- Sunrise/sunset: red/orange/pink (sunlight passes through more air, longer wavelengths dominate)\n- Cloudy/overcast: gray\n- Night: dark/black (stars may be visible)\n\nSometimes, in storms the sky can look greenish-gray.\n\nIf you tell me your location and time of day, I can give a more specific guess for the sky color right now.", + "refusal": null, + "annotations": [] + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 12, + "completion_tokens": 765, + "total_tokens": 777, + "prompt_tokens_details": { + "cached_tokens": 0, + "audio_tokens": 0 + }, + "completion_tokens_details": { + "reasoning_tokens": 640, + "audio_tokens": 0, + "accepted_prediction_tokens": 0, + "rejected_prediction_tokens": 0 + } + }, + "service_tier": "default", + "system_fingerprint": null +} \ No newline at end of file diff --git a/payloads/transforms/anthropic_to_chat-completions/simpleRequest.json b/payloads/transforms/anthropic_to_chat-completions/simpleRequest.json new file mode 100644 index 0000000..2a3bf12 --- /dev/null +++ b/payloads/transforms/anthropic_to_chat-completions/simpleRequest.json @@ -0,0 +1,35 @@ +{ + "id": "chatcmpl-D3BLGLmKpaWMsyLwcZjb1heVV0FKU", + "object": "chat.completion", + "created": 1769650954, + "model": "gpt-5-nano-2025-08-07", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "Paris.", + "refusal": null, + "annotations": [] + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 13, + "completion_tokens": 139, + "total_tokens": 152, + "prompt_tokens_details": { + "cached_tokens": 0, + "audio_tokens": 0 + }, + "completion_tokens_details": { + "reasoning_tokens": 128, + "audio_tokens": 0, + "accepted_prediction_tokens": 0, + "rejected_prediction_tokens": 0 + } + }, + "service_tier": "default", + "system_fingerprint": null +} \ No newline at end of file diff --git a/payloads/transforms/anthropic_to_chat-completions/toolCallRequest.json b/payloads/transforms/anthropic_to_chat-completions/toolCallRequest.json new file mode 100644 index 0000000..c656e58 --- /dev/null +++ b/payloads/transforms/anthropic_to_chat-completions/toolCallRequest.json @@ -0,0 +1,45 @@ +{ + "id": "chatcmpl-D3BLSfTZkdtmjwX8zNZy6iyGGQbqS", + "object": "chat.completion", + "created": 1769650966, + "model": "gpt-5-nano-2025-08-07", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": null, + "tool_calls": [ + { + "id": "call_Y01ca17t4IsAFQ4PSryUqAmj", + "type": "function", + "function": { + "name": "get_weather", + "arguments": "{\"location\":\"San Francisco, CA\"}" + } + } + ], + "refusal": null, + "annotations": [] + }, + "finish_reason": "tool_calls" + } + ], + "usage": { + "prompt_tokens": 148, + "completion_tokens": 218, + "total_tokens": 366, + "prompt_tokens_details": { + "cached_tokens": 0, + "audio_tokens": 0 + }, + "completion_tokens_details": { + "reasoning_tokens": 192, + "audio_tokens": 0, + "accepted_prediction_tokens": 0, + "rejected_prediction_tokens": 0 + } + }, + "service_tier": "default", + "system_fingerprint": null +} \ No newline at end of file diff --git a/payloads/transforms/anthropic_to_responses/complexReasoningRequest.json b/payloads/transforms/anthropic_to_responses/complexReasoningRequest.json new file mode 100644 index 0000000..b907cb2 --- /dev/null +++ b/payloads/transforms/anthropic_to_responses/complexReasoningRequest.json @@ -0,0 +1,72 @@ +{ + "id": "resp_05933cc5f12755ee00697ab06b7ebc81a1b0fc2bbe456106c5", + "object": "response", + "created_at": 1769648235, + "status": "completed", + "background": false, + "billing": { + "payer": "developer" + }, + "completed_at": 1769648250, + "error": null, + "frequency_penalty": 0, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": 20000, + "max_tool_calls": null, + "model": "gpt-4o-mini-2024-07-18", + "output": [ + { + "id": "msg_05933cc5f12755ee00697ab06c1c1881a199cf2dda57bb8368", + "type": "message", + "status": "completed", + "content": [ + { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "To find the most common and rarest digits in a digital clock from 00:00 to 23:59, let's break down the analysis.\n\n### Total Times\nThe total number of times displayed on the clock is from 00:00 to 23:59, which is \\(24 \\times 60 = 1440\\) minutes.\n\n### Counting Each Digit\nIn a 24-hour digital clock format (HH:MM), we need to consider each position of the time. The times can be broken down into:\n\n- **Hours:** 00 to 23 (2 digits)\n- **Minutes:** 00 to 59 (2 digits)\n\n#### Breaking down the counts:\n1. **Hour Positions (HH)**\n - 00, 01, 02, ..., 09 (10 times): Each of these has:\n - '0': 10 times (from 00, 01, ..., 09)\n - '1': 10 times (from 10, 11, 12, ..., 19)\n - '2': 4 times (from 20, 21, 22, 23)\n - Total digits for HH:\n - '0' appears 10 + 0 = 10 times\n - '1' appears 10 + 1 = 11 times\n - '2' appears 4 + 1 = 5 times\n \n2. **Minute Positions (MM)**\n - 00 to 59 (60 times): Each digit is counted by the number system.\n - Tens digit: '0' (0-9) appears 10 times, '1' (10-19) appears 10 times, '2' (20-29) appears 10 times, '3' (30-39) appears 10 times, '4' (40-49) appears 10 times, '5' (50-59) appears 10 times\n - Units digit: '0' to '9' appears exactly 6 times for each digit:\n - '0': 6 times (00, 10, 20, 30, 40, 50)\n - '1': 6 times, 2: 6 times, ..., 9: 6 times\n\n#### Combining Counts\nNow let's sum them:\n\n- **Total Counts:**\n - '0': HH (10) + MM (10) + Units (6) = **26**\n - '1': HH (10) + Units (6) = **16**\n - '2': HH (5) + MM (10) + Units (6) = **21**\n - '3': MM (10) + Units (6) = **16**\n - '4': MM (10) + Units (6) = **16**\n - '5': MM (10) + Units (6) = **16**\n - '6': Units (6) = **6**\n - '7': Units (6) = **6**\n - '8': Units (6) = **6**\n - '9': Units (6) = **6**\n\n### Conclusion\nFrom the counts:\n- **Most common digit:** '0' appears **26 times**.\n- **Rarest digits:** '6', '7', '8', and '9', each appears **6 times**.\n\n### Percentage Calculation\n- **Percentage of most common digit ('0'):**\n \\[\n \\frac{26}{1440} \\times 100 \\approx 1.81\\%\n \\]\n\n- **Percentage of rarest digits ('6', '7', '8', '9'):**\n \\[\n \\frac{6}{1440} \\times 100 \\approx 0.42\\%\n \\]\n\n### Summary\n- **Most common digit:** '0' (1.81%)\n- **Rarest digits:** '6', '7', '8', '9' (0.42% each)" + } + ], + "role": "assistant" + } + ], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": null, + "summary": null + }, + "safety_identifier": null, + "service_tier": "default", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "text" + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": { + "input_tokens": 75, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 840, + "output_tokens_details": { + "reasoning_tokens": 0 + }, + "total_tokens": 915 + }, + "user": null, + "metadata": {}, + "output_text": "To find the most common and rarest digits in a digital clock from 00:00 to 23:59, let's break down the analysis.\n\n### Total Times\nThe total number of times displayed on the clock is from 00:00 to 23:59, which is \\(24 \\times 60 = 1440\\) minutes.\n\n### Counting Each Digit\nIn a 24-hour digital clock format (HH:MM), we need to consider each position of the time. The times can be broken down into:\n\n- **Hours:** 00 to 23 (2 digits)\n- **Minutes:** 00 to 59 (2 digits)\n\n#### Breaking down the counts:\n1. **Hour Positions (HH)**\n - 00, 01, 02, ..., 09 (10 times): Each of these has:\n - '0': 10 times (from 00, 01, ..., 09)\n - '1': 10 times (from 10, 11, 12, ..., 19)\n - '2': 4 times (from 20, 21, 22, 23)\n - Total digits for HH:\n - '0' appears 10 + 0 = 10 times\n - '1' appears 10 + 1 = 11 times\n - '2' appears 4 + 1 = 5 times\n \n2. **Minute Positions (MM)**\n - 00 to 59 (60 times): Each digit is counted by the number system.\n - Tens digit: '0' (0-9) appears 10 times, '1' (10-19) appears 10 times, '2' (20-29) appears 10 times, '3' (30-39) appears 10 times, '4' (40-49) appears 10 times, '5' (50-59) appears 10 times\n - Units digit: '0' to '9' appears exactly 6 times for each digit:\n - '0': 6 times (00, 10, 20, 30, 40, 50)\n - '1': 6 times, 2: 6 times, ..., 9: 6 times\n\n#### Combining Counts\nNow let's sum them:\n\n- **Total Counts:**\n - '0': HH (10) + MM (10) + Units (6) = **26**\n - '1': HH (10) + Units (6) = **16**\n - '2': HH (5) + MM (10) + Units (6) = **21**\n - '3': MM (10) + Units (6) = **16**\n - '4': MM (10) + Units (6) = **16**\n - '5': MM (10) + Units (6) = **16**\n - '6': Units (6) = **6**\n - '7': Units (6) = **6**\n - '8': Units (6) = **6**\n - '9': Units (6) = **6**\n\n### Conclusion\nFrom the counts:\n- **Most common digit:** '0' appears **26 times**.\n- **Rarest digits:** '6', '7', '8', and '9', each appears **6 times**.\n\n### Percentage Calculation\n- **Percentage of most common digit ('0'):**\n \\[\n \\frac{26}{1440} \\times 100 \\approx 1.81\\%\n \\]\n\n- **Percentage of rarest digits ('6', '7', '8', '9'):**\n \\[\n \\frac{6}{1440} \\times 100 \\approx 0.42\\%\n \\]\n\n### Summary\n- **Most common digit:** '0' (1.81%)\n- **Rarest digits:** '6', '7', '8', '9' (0.42% each)" +} \ No newline at end of file diff --git a/payloads/transforms/anthropic_to_responses/multimodalRequest.json b/payloads/transforms/anthropic_to_responses/multimodalRequest.json new file mode 100644 index 0000000..061527e --- /dev/null +++ b/payloads/transforms/anthropic_to_responses/multimodalRequest.json @@ -0,0 +1,72 @@ +{ + "id": "resp_0d30603bee3a8e7500697aafaa2454819da0e9223905de6eca", + "object": "response", + "created_at": 1769648042, + "status": "completed", + "background": false, + "billing": { + "payer": "developer" + }, + "completed_at": 1769648044, + "error": null, + "frequency_penalty": 0, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": 300, + "max_tool_calls": null, + "model": "gpt-4o-mini-2024-07-18", + "output": [ + { + "id": "msg_0d30603bee3a8e7500697aafab5188819d90e6ab9155e21ea4", + "type": "message", + "status": "completed", + "content": [ + { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "The image features a character known as Bulbasaur, which is a Pokémon. Bulbasaur has a green body with darker green spots and large plant-like features on its back, resembling a bulb. It has red eyes and a friendly expression, typical of many Pokémon characters." + } + ], + "role": "assistant" + } + ], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": null, + "summary": null + }, + "safety_identifier": null, + "service_tier": "default", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "text" + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": { + "input_tokens": 8515, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 56, + "output_tokens_details": { + "reasoning_tokens": 0 + }, + "total_tokens": 8571 + }, + "user": null, + "metadata": {}, + "output_text": "The image features a character known as Bulbasaur, which is a Pokémon. Bulbasaur has a green body with darker green spots and large plant-like features on its back, resembling a bulb. It has red eyes and a friendly expression, typical of many Pokémon characters." +} \ No newline at end of file diff --git a/payloads/transforms/anthropic_to_responses/reasoningRequest.json b/payloads/transforms/anthropic_to_responses/reasoningRequest.json new file mode 100644 index 0000000..a09315e --- /dev/null +++ b/payloads/transforms/anthropic_to_responses/reasoningRequest.json @@ -0,0 +1,72 @@ +{ + "id": "resp_0e75a8ed9a28db5f00697aafa0e390819fb6d4c1352586e599", + "object": "response", + "created_at": 1769648032, + "status": "completed", + "background": false, + "billing": { + "payer": "developer" + }, + "completed_at": 1769648038, + "error": null, + "frequency_penalty": 0, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": 20000, + "max_tool_calls": null, + "model": "gpt-4o-mini-2024-07-18", + "output": [ + { + "id": "msg_0e75a8ed9a28db5f00697aafa183d8819f83e5bb1380a86dfe", + "type": "message", + "status": "completed", + "content": [ + { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "To find the average speed of the train, we need to calculate the total distance traveled and the total time taken.\n\n**Step 1: Calculate the distance for each part of the journey.**\n\n1. **For the first part:**\n - Speed = 60 mph\n - Time = 2 hours\n - Distance = Speed × Time = 60 mph × 2 hours = 120 miles\n\n2. **For the second part:**\n - Speed = 80 mph\n - Time = 1 hour\n - Distance = Speed × Time = 80 mph × 1 hour = 80 miles\n\n**Step 2: Calculate the total distance.**\n- Total Distance = Distance from first part + Distance from second part\n- Total Distance = 120 miles + 80 miles = 200 miles\n\n**Step 3: Calculate the total time.**\n- Total Time = Time for first part + Time for second part\n- Total Time = 2 hours + 1 hour = 3 hours\n\n**Step 4: Calculate the average speed.**\n- Average Speed = Total Distance / Total Time\n- Average Speed = 200 miles / 3 hours ≈ 66.67 mph\n\nThus, the average speed of the train is approximately **66.67 mph**." + } + ], + "role": "assistant" + } + ], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": null, + "summary": null + }, + "safety_identifier": null, + "service_tier": "default", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "text" + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": { + "input_tokens": 39, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 269, + "output_tokens_details": { + "reasoning_tokens": 0 + }, + "total_tokens": 308 + }, + "user": null, + "metadata": {}, + "output_text": "To find the average speed of the train, we need to calculate the total distance traveled and the total time taken.\n\n**Step 1: Calculate the distance for each part of the journey.**\n\n1. **For the first part:**\n - Speed = 60 mph\n - Time = 2 hours\n - Distance = Speed × Time = 60 mph × 2 hours = 120 miles\n\n2. **For the second part:**\n - Speed = 80 mph\n - Time = 1 hour\n - Distance = Speed × Time = 80 mph × 1 hour = 80 miles\n\n**Step 2: Calculate the total distance.**\n- Total Distance = Distance from first part + Distance from second part\n- Total Distance = 120 miles + 80 miles = 200 miles\n\n**Step 3: Calculate the total time.**\n- Total Time = Time for first part + Time for second part\n- Total Time = 2 hours + 1 hour = 3 hours\n\n**Step 4: Calculate the average speed.**\n- Average Speed = Total Distance / Total Time\n- Average Speed = 200 miles / 3 hours ≈ 66.67 mph\n\nThus, the average speed of the train is approximately **66.67 mph**." +} \ No newline at end of file diff --git a/payloads/transforms/anthropic_to_responses/reasoningRequestTruncated.json b/payloads/transforms/anthropic_to_responses/reasoningRequestTruncated.json new file mode 100644 index 0000000..66a1204 --- /dev/null +++ b/payloads/transforms/anthropic_to_responses/reasoningRequestTruncated.json @@ -0,0 +1,74 @@ +{ + "id": "resp_0f6a8c7916cef90800697aafa5f6088196931daecd19c99d8d", + "object": "response", + "created_at": 1769648037, + "status": "incomplete", + "background": false, + "billing": { + "payer": "developer" + }, + "completed_at": null, + "error": null, + "frequency_penalty": 0, + "incomplete_details": { + "reason": "max_output_tokens" + }, + "instructions": null, + "max_output_tokens": 100, + "max_tool_calls": null, + "model": "gpt-4o-mini-2024-07-18", + "output": [ + { + "id": "msg_0f6a8c7916cef90800697aafa6f68c819699ca469f30219b7b", + "type": "message", + "status": "incomplete", + "content": [ + { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "To find the average speed of the train over the entire trip, we first need to calculate the total distance traveled and the total time taken.\n\n### Step 1: Calculate Distance for Each Segment\n\n1. **First Segment** (60 mph for 2 hours)\n \\[\n \\text{Distance}_1 = \\text{Speed} \\times \\text{Time} = 60 \\, \\text{mph} \\times 2 \\, \\text{hours} = 120" + } + ], + "role": "assistant" + } + ], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": null, + "summary": null + }, + "safety_identifier": null, + "service_tier": "default", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "text" + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": { + "input_tokens": 39, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 100, + "output_tokens_details": { + "reasoning_tokens": 0 + }, + "total_tokens": 139 + }, + "user": null, + "metadata": {}, + "output_text": "To find the average speed of the train over the entire trip, we first need to calculate the total distance traveled and the total time taken.\n\n### Step 1: Calculate Distance for Each Segment\n\n1. **First Segment** (60 mph for 2 hours)\n \\[\n \\text{Distance}_1 = \\text{Speed} \\times \\text{Time} = 60 \\, \\text{mph} \\times 2 \\, \\text{hours} = 120" +} \ No newline at end of file diff --git a/payloads/transforms/anthropic_to_responses/reasoningWithOutput.json b/payloads/transforms/anthropic_to_responses/reasoningWithOutput.json new file mode 100644 index 0000000..3fad6bd --- /dev/null +++ b/payloads/transforms/anthropic_to_responses/reasoningWithOutput.json @@ -0,0 +1,72 @@ +{ + "id": "resp_05d74363027f2e8400697aafb2285881a39c4cd96ee6fd67c9", + "object": "response", + "created_at": 1769648050, + "status": "completed", + "background": false, + "billing": { + "payer": "developer" + }, + "completed_at": 1769648052, + "error": null, + "frequency_penalty": 0, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": 20000, + "max_tool_calls": null, + "model": "gpt-4o-mini-2024-07-18", + "output": [ + { + "id": "msg_05d74363027f2e8400697aafb26dbc81a3a954957a3c2bcc5c", + "type": "message", + "status": "completed", + "content": [ + { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "The color of the sky appears blue during the day due to Rayleigh scattering, where shorter wavelengths of light (blue) scatter more than longer wavelengths (red). At sunrise and sunset, the sky can exhibit shades of orange, pink, and purple due to the angle of the sun and atmospheric conditions. At night, the sky appears dark, often speckled with stars." + } + ], + "role": "assistant" + } + ], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": null, + "summary": null + }, + "safety_identifier": null, + "service_tier": "default", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "text" + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": { + "input_tokens": 13, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 76, + "output_tokens_details": { + "reasoning_tokens": 0 + }, + "total_tokens": 89 + }, + "user": null, + "metadata": {}, + "output_text": "The color of the sky appears blue during the day due to Rayleigh scattering, where shorter wavelengths of light (blue) scatter more than longer wavelengths (red). At sunrise and sunset, the sky can exhibit shades of orange, pink, and purple due to the angle of the sun and atmospheric conditions. At night, the sky appears dark, often speckled with stars." +} \ No newline at end of file diff --git a/payloads/transforms/anthropic_to_responses/simpleRequest.json b/payloads/transforms/anthropic_to_responses/simpleRequest.json new file mode 100644 index 0000000..899a3e6 --- /dev/null +++ b/payloads/transforms/anthropic_to_responses/simpleRequest.json @@ -0,0 +1,72 @@ +{ + "id": "resp_0cff2930f774e07500697aaf9fe7d481a1a404ee8a6b7bcb13", + "object": "response", + "created_at": 1769648031, + "status": "completed", + "background": false, + "billing": { + "payer": "developer" + }, + "completed_at": 1769648032, + "error": null, + "frequency_penalty": 0, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": 20000, + "max_tool_calls": null, + "model": "gpt-4o-mini-2024-07-18", + "output": [ + { + "id": "msg_0cff2930f774e07500697aafa0936081a1b4e753ad5f1bcd79", + "type": "message", + "status": "completed", + "content": [ + { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "The capital of France is Paris." + } + ], + "role": "assistant" + } + ], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": null, + "summary": null + }, + "safety_identifier": null, + "service_tier": "default", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "text" + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": { + "input_tokens": 14, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 8, + "output_tokens_details": { + "reasoning_tokens": 0 + }, + "total_tokens": 22 + }, + "user": null, + "metadata": {}, + "output_text": "The capital of France is Paris." +} \ No newline at end of file diff --git a/payloads/transforms/anthropic_to_responses/toolCallRequest.json b/payloads/transforms/anthropic_to_responses/toolCallRequest.json new file mode 100644 index 0000000..602b0af --- /dev/null +++ b/payloads/transforms/anthropic_to_responses/toolCallRequest.json @@ -0,0 +1,86 @@ +{ + "id": "resp_07a2d88aa9053a3d00697aafa91cc081a3af05f35e06744235", + "object": "response", + "created_at": 1769648041, + "status": "completed", + "background": false, + "billing": { + "payer": "developer" + }, + "completed_at": 1769648041, + "error": null, + "frequency_penalty": 0, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": 20000, + "max_tool_calls": null, + "model": "gpt-4o-mini-2024-07-18", + "output": [ + { + "id": "fc_07a2d88aa9053a3d00697aafa9e3e081a3a1f9db335d7127d5", + "type": "function_call", + "status": "completed", + "arguments": "{\"location\":\"San Francisco, CA\"}", + "call_id": "call_1Tzb1VJiHdkBnXO3RVkOxGFL", + "name": "get_weather" + } + ], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": null, + "summary": null + }, + "safety_identifier": null, + "service_tier": "default", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "text" + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [ + { + "type": "function", + "description": "Get the current weather for a location", + "name": "get_weather", + "parameters": { + "properties": { + "location": { + "description": "The city and state, e.g. San Francisco, CA", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object", + "additionalProperties": false + }, + "strict": true + } + ], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": { + "input_tokens": 61, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 18, + "output_tokens_details": { + "reasoning_tokens": 0 + }, + "total_tokens": 79 + }, + "user": null, + "metadata": {}, + "output_text": "" +} \ No newline at end of file diff --git a/payloads/transforms/chat-completions_to_anthropic/complexReasoningRequest.json b/payloads/transforms/chat-completions_to_anthropic/complexReasoningRequest.json new file mode 100644 index 0000000..4fd1061 --- /dev/null +++ b/payloads/transforms/chat-completions_to_anthropic/complexReasoningRequest.json @@ -0,0 +1,25 @@ +{ + "model": "claude-sonnet-4-20250514", + "id": "msg_014dtzjaLF215TRvwzZProUv", + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "I need to count how often each digit (0-9) appears in all possible times from 00:00 to 23:59.\n\nLet me break this down by position:\n\n**Hours (00 to 23):**\n- First digit of hours: 0 (00-09), 1 (10-19), 2 (20-23)\n- Second digit of hours: 0-9 for 00-09, 10-19, and 20-23\n\n**Minutes (00 to 59):**\n- First digit of minutes: 0-5 \n- Second digit of minutes: 0-9\n\nLet me count systematically:\n\n**Total times:** 24 hours × 60 minutes = 1,440 times\n**Total digit positions:** 1,440 × 4 digits = 5,760 total digits\n\n**Counting each digit:**\n\n**Digit 0:**\n- Hours first position: 10 times (00-09) × 60 minutes = 600\n- Hours second position: 6 times per hour (00, 10, 20) × 60 minutes = 360\n- Minutes first position: 1 time per minute (00-09, 30-39, 50-59) × 24 hours × 1 = 240\n- Minutes second position: 6 times per hour (x0 minutes) × 24 hours = 144\n- Total: 600 + 360 + 240 + 144 = **1,344**\n\n**Digit 1:**\n- Hours first position: 10 times (10-19) × 60 minutes = 600\n- Hours second position: 6 times per hour (01, 11, 21) × 60 minutes = 360\n- Minutes first position: 10 times per hour (10-19) × 24 hours = 240\n- Minutes second position: 6 times per hour (x1 minutes) × 24 hours = 144\n- Total: 600 + 360 + 240 + 144 = **1,344**\n\n**Digit 2:**\n- Hours first position: 4 times (20-23) × 60 minutes = 240\n- Hours second position: 6 times per hour (02, 12, 22) × 60 minutes = 360\n- Minutes first position: 10 times per hour (20-29) × 24 hours = 240\n- Minutes second position: 6 times per hour (x2 minutes) × 24 hours = 144\n- Total: 240 + 360 + 240 + 144 = **984**\n\n**Digit 3:**\n- Hours first position: 0 times = 0\n- Hours second position: 6 times per hour (03, 13, 23) × 60 minutes = 360\n- Minutes first position: 10 times per hour (30-39) × 24 hours = 240\n- Minutes second position: 6 times per hour (x3 minutes) × 24 hours = 144\n- Total: 0 + 360 + 240 + 144 = **744**\n\n**Digit 4:**\n- Hours first position: 0 times = 0\n- Hours second position: 6 times per hour (04, 14) × 60 minutes = 360\n- Minutes first position: 10 times per hour (40-49) × 24 hours = 240\n- Minutes second position: 6 times per hour (x4 minutes) × 24 hours = 144\n- Total: 0 + 360 + 240 + 144 = **744**\n\n**Digit 5:**\n- Hours first position: 0 times = 0\n- Hours second position: 6 times per hour (05, 15) × 60 minutes = 360\n- Minutes first position: 10 times per hour (50-59) × 24 hours = 240\n- Minutes second position: 6 times per hour (x5 minutes) × 24 hours = 144\n- Total: 0 + 360 + 240 + 144 = **744**\n\n**Digits 6, 7, 8, 9:**\n- Hours first position: 0 times each = 0\n- Hours second position: 4 times per hour each (06, 16) × 60 minutes = 240 each\n- Minutes first position: 0 times each (no 60-69, 70-79, 80-89, 90-99) = 0 each\n- Minutes second position: 6 times per hour each × 24 hours = 144 each\n- Total each: 0 + 240 + 0 + 144 = **384**\n\n**Results:**\n- **Most common:** 0 and 1 (tied) with 1,344 occurrences = **23.33%** each\n- **Rarest:** 6, 7, 8, and 9 (tied) with 384 occurrences = **6.67%** each\n\nThe digits 0 and 1 are most common because they appear frequently in the hours (00-09 and 10-19), while digits 6-9 are rarest because they can't appear in the tens place of minutes (no minutes 60-99) and appear less frequently in hours." + } + ], + "stop_reason": "end_turn", + "stop_sequence": null, + "usage": { + "input_tokens": 80, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": { + "ephemeral_5m_input_tokens": 0, + "ephemeral_1h_input_tokens": 0 + }, + "output_tokens": 1271, + "service_tier": "standard" + } +} \ No newline at end of file diff --git a/payloads/transforms/chat-completions_to_anthropic/multimodalRequest.json b/payloads/transforms/chat-completions_to_anthropic/multimodalRequest.json new file mode 100644 index 0000000..fc7a060 --- /dev/null +++ b/payloads/transforms/chat-completions_to_anthropic/multimodalRequest.json @@ -0,0 +1,25 @@ +{ + "model": "claude-sonnet-4-20250514", + "id": "msg_01Gm1CpnrpnzQ2x5RhERiHzK", + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "I see an adorable tabby kitten lying on its side on what appears to be a wooden floor. The kitten has beautiful striped gray and brown markings, large golden-yellow eyes, and distinctive pointed ears. Its head is tilted at a charming angle as it looks directly at the camera, giving it an endearing and playful expression. The kitten appears to be quite young, with soft fluffy fur and that sweet, innocent look that young cats have. In the blurred background, there appears to be some furniture, possibly including wooden elements like chairs or shelving. The lighting in the photo is warm and natural, creating a cozy domestic setting that perfectly captures this precious moment with the kitten." + } + ], + "stop_reason": "end_turn", + "stop_sequence": null, + "usage": { + "input_tokens": 278, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": { + "ephemeral_5m_input_tokens": 0, + "ephemeral_1h_input_tokens": 0 + }, + "output_tokens": 152, + "service_tier": "standard" + } +} \ No newline at end of file diff --git a/payloads/transforms/chat-completions_to_anthropic/reasoningRequest.json b/payloads/transforms/chat-completions_to_anthropic/reasoningRequest.json new file mode 100644 index 0000000..46e4fab --- /dev/null +++ b/payloads/transforms/chat-completions_to_anthropic/reasoningRequest.json @@ -0,0 +1,25 @@ +{ + "model": "claude-sonnet-4-20250514", + "id": "msg_01MNLWLT3S3nKNt55ufXwTqX", + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "I'll solve this step by step using the formula: Average speed = Total distance ÷ Total time\n\n**Step 1: Calculate distance for each segment**\n\nSegment 1: 60 mph for 2 hours\n- Distance = speed × time = 60 × 2 = 120 miles\n\nSegment 2: 80 mph for 1 hour \n- Distance = speed × time = 80 × 1 = 80 miles\n\n**Step 2: Find totals**\n- Total distance = 120 + 80 = 200 miles\n- Total time = 2 + 1 = 3 hours\n\n**Step 3: Calculate average speed**\nAverage speed = Total distance ÷ Total time\nAverage speed = 200 miles ÷ 3 hours = 66.67 mph\n\n**Answer: The average speed is 66.67 mph (or 66⅔ mph)**\n\nNote: The average speed (66.67 mph) is not simply the arithmetic mean of the two speeds (70 mph) because the train spent different amounts of time at each speed." + } + ], + "stop_reason": "end_turn", + "stop_sequence": null, + "usage": { + "input_tokens": 45, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": { + "ephemeral_5m_input_tokens": 0, + "ephemeral_1h_input_tokens": 0 + }, + "output_tokens": 261, + "service_tier": "standard" + } +} \ No newline at end of file diff --git a/payloads/transforms/chat-completions_to_anthropic/reasoningRequestTruncated.json b/payloads/transforms/chat-completions_to_anthropic/reasoningRequestTruncated.json new file mode 100644 index 0000000..b5499d7 --- /dev/null +++ b/payloads/transforms/chat-completions_to_anthropic/reasoningRequestTruncated.json @@ -0,0 +1,25 @@ +{ + "model": "claude-sonnet-4-20250514", + "id": "msg_0129j9pUrvtYR1euUq6Aj49G", + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "I'll solve this step by step using the formula: Average speed = Total distance ÷ Total time\n\n**Step 1: Calculate distance for each segment**\n\nFirst segment:\n- Speed = 60 mph\n- Time = 2 hours\n- Distance = 60 × 2 = 120 miles\n\nSecond segment:\n- Speed = 80 mph \n- Time = 1 hour\n- Distance = 80 × " + } + ], + "stop_reason": "max_tokens", + "stop_sequence": null, + "usage": { + "input_tokens": 45, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": { + "ephemeral_5m_input_tokens": 0, + "ephemeral_1h_input_tokens": 0 + }, + "output_tokens": 100, + "service_tier": "standard" + } +} \ No newline at end of file diff --git a/payloads/transforms/chat-completions_to_anthropic/reasoningWithOutput.json b/payloads/transforms/chat-completions_to_anthropic/reasoningWithOutput.json new file mode 100644 index 0000000..c0a2861 --- /dev/null +++ b/payloads/transforms/chat-completions_to_anthropic/reasoningWithOutput.json @@ -0,0 +1,25 @@ +{ + "model": "claude-sonnet-4-20250514", + "id": "msg_01KLaCdE8FytaXvoPmSMz2xf", + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "The sky appears blue during the day under normal weather conditions. This is due to a phenomenon called Rayleigh scattering, where molecules in Earth's atmosphere scatter blue light from the sun more than other colors.\n\nOf course, the sky's color can change depending on conditions - it can appear red, orange, or pink during sunrise and sunset, gray during overcast weather, or nearly black at night." + } + ], + "stop_reason": "end_turn", + "stop_sequence": null, + "usage": { + "input_tokens": 13, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": { + "ephemeral_5m_input_tokens": 0, + "ephemeral_1h_input_tokens": 0 + }, + "output_tokens": 87, + "service_tier": "standard" + } +} \ No newline at end of file diff --git a/payloads/transforms/chat-completions_to_anthropic/simpleRequest.json b/payloads/transforms/chat-completions_to_anthropic/simpleRequest.json new file mode 100644 index 0000000..fcee27e --- /dev/null +++ b/payloads/transforms/chat-completions_to_anthropic/simpleRequest.json @@ -0,0 +1,30 @@ +{ + "model": "claude-sonnet-4-20250514", + "id": "msg_01Xrc4PPLmZt1YmHHBUPqbG6", + "type": "message", + "role": "assistant", + "content": [ + { + "type": "thinking", + "thinking": "This is a straightforward factual question about geography. The capital of France is Paris. This is a well-established fact and there's no ambiguity or controversy around it.", + "signature": "EtcCCkYICxgCKkCdIXUyVg3DaxfLI8Hie56Ksu41ye5HUj9fwp1vbLCo1cKu/Sk5K90qFnozb2HxfjmifzJ3Sae/P1wH3A56rUp/Egz2qyGq7ZdRr9EocJcaDANqdJZUKkxkABGX6SIwCsbRol95Vel2Etd4f9Bta2w2eDsLXIj47H4nKqt6x01867xq+ZGaOXbt6NRaQ1ItKr4BZnUNdD2Sbyl0pV3E+FgqWnoNLCBqXZhKAy4uTvSwVEFMGFRm0fKnc1h+cw8vQPX4DIxyyZ9SqAdu9Q0D9v787H4pz/EiY1SuReIMgdU2nAMVRgbIfQPDbbTEL/9QDrjtEalFaCIIARjAoxQbhgs3AxQMVSOWiB/ZNcrtE5Shx255yHae36X8kMt8JetT/tNbg6u1K1QnS/5U5pla9KTyscYKTjdmmnvTLdq2vAJ/sPb8nDkYEljnmo5ev3EU3RgB" + }, + { + "type": "text", + "text": "The capital of France is Paris." + } + ], + "stop_reason": "end_turn", + "stop_sequence": null, + "usage": { + "input_tokens": 43, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": { + "ephemeral_5m_input_tokens": 0, + "ephemeral_1h_input_tokens": 0 + }, + "output_tokens": 55, + "service_tier": "standard" + } +} \ No newline at end of file diff --git a/payloads/transforms/chat-completions_to_anthropic/toolCallRequest.json b/payloads/transforms/chat-completions_to_anthropic/toolCallRequest.json new file mode 100644 index 0000000..9b69b55 --- /dev/null +++ b/payloads/transforms/chat-completions_to_anthropic/toolCallRequest.json @@ -0,0 +1,33 @@ +{ + "model": "claude-sonnet-4-20250514", + "id": "msg_01RFUznj44pJd5nANf3wpThi", + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "I'll check the current weather in San Francisco for you." + }, + { + "type": "tool_use", + "id": "toolu_01UDUGC3YdtpQ8bkdZQMpGMq", + "name": "get_weather", + "input": { + "location": "San Francisco, CA" + } + } + ], + "stop_reason": "tool_use", + "stop_sequence": null, + "usage": { + "input_tokens": 402, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": { + "ephemeral_5m_input_tokens": 0, + "ephemeral_1h_input_tokens": 0 + }, + "output_tokens": 69, + "service_tier": "standard" + } +} \ No newline at end of file diff --git a/payloads/transforms/responses_to_anthropic/complexReasoningRequest.json b/payloads/transforms/responses_to_anthropic/complexReasoningRequest.json new file mode 100644 index 0000000..7454937 --- /dev/null +++ b/payloads/transforms/responses_to_anthropic/complexReasoningRequest.json @@ -0,0 +1,30 @@ +{ + "model": "claude-sonnet-4-20250514", + "id": "msg_01SmZ7JnCWmJWfdHH9auoxiH", + "type": "message", + "role": "assistant", + "content": [ + { + "type": "thinking", + "thinking": "I need to analyze all the times from 00:00 to 23:59 and count how often each digit (0-9) appears.\n\nLet me break this down systematically:\n\nThe format is HH:MM where:\n- HH ranges from 00 to 23 (24 hours)\n- MM ranges from 00 to 59 (60 minutes)\n\nSo there are 24 × 60 = 1440 different times.\n\nEach time has 4 digits, so there are 1440 × 4 = 5760 total digit positions.\n\nLet me count each digit:\n\nFor the hours (HH):\n- First digit of hour (tens place):\n - 0: appears in 00-09 (10 times) for each of the 60 minutes = 10 × 60 = 600 times\n - 1: appears in 10-19 (10 times) for each of the 60 minutes = 10 × 60 = 600 times \n - 2: appears in 20-23 (4 times) for each of the 60 minutes = 4 × 60 = 240 times\n - 3,4,5,6,7,8,9: don't appear in the tens place of hours\n\n- Second digit of hour (ones place):\n - 0: appears in 00, 10, 20 for each of the 60 minutes = 3 × 60 = 180 times\n - 1: appears in 01, 11, 21 for each of the 60 minutes = 3 × 60 = 180 times\n - 2: appears in 02, 12, 22 for each of the 60 minutes = 3 × 60 = 180 times\n - 3: appears in 03, 13, 23 for each of the 60 minutes = 3 × 60 = 180 times\n - 4-7: each appears in two hours (like 04, 14) for each of the 60 minutes = 2 × 60 = 120 times each\n - 8: appears in 08, 18 for each of the 60 minutes = 2 × 60 = 120 times\n\nFor the minutes (MM), digits 0-9 each appear equally across all 24 hours. The tens place cycles through 0-5 six times per hour, and the ones place cycles through 0-9 six times per hour, giving each digit 24 × 6 = 144 occurrences in both the tens and ones positions of minutes. 10 times) for each of the 24 hours = 10 × 24 = 240 times. The digits 4 and 5 follow the same pattern in the 40-49 and 50-59 ranges respectively, each appearing 240 times. Digits 6 through 9 never appear in the tens position of minutes.\n\nFor the ones place of minutes, 0 shows up in 00, 10, 20, 30, 40, 50 across all 24 hours, totaling 144 occurrences. The digit 1 appears similarly in 01, 11, 21, 31, 41, and continues this pattern. × 24 = 144 times. The digits 6 through 9 follow the same pattern—each appears in six different minute values (06, 16, 26, 36, 46, 56 for digit 6, and so on) across all 24 hours, giving 144 occurrences for each digit.\n\nNow I need to tally the total appearances for each digit across all positions. Digits 0 and 1 appear most frequently, with 1,164 occurrences each—they show up in the hour tens place 600 times, hour ones 180 times, minute tens 240 times, and minute ones 144 times. Digit 2 appears 804 times total, while digits 3 and 4 appear less frequently at 564 and 504 times respectively since they don't appear in the hour tens position. Digit 5 follows a similar pattern to 4, appearing in the hour ones 120 times, minute tens 240 times, and minute ones 144 times.\n\nDigits 6 through 9 are the least common, each appearing only 264 times—they're restricted to the hour ones position (120 times) and minute ones position (144 times). The sum across all digits is 5,760, confirming the calculation. This means digits 0 and 1 represent about 20.21% of all digit occurrences, while digits 6-9 each account for roughly 4.58%.", + "signature": "ErEoCkYICxgCKkA8IUxkFpYSDEe46RWryjG+s3U8CFLAnp587Um2wuTeU8x2/DeBGe37Ty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0C20WFYilNkfUagQZlKdCOUg+jlfIeKI/cLclAuA67TVkhLYAdbcGDwC0wLfyHI8IQWCfIjx4dk22wsbXlKgcYjPutwWxoIMg7oASk3Qd5/N8Hr0CREQhKlPGMbPkKAjm0D+5RIwiuKmupkH1ETqrUPRtTHd+BgT28JnBiiC5Q5kdP2IBmQVI5IrMDc8s9C6xFs3inms5Sa8AkWa/qXcg5P81ogyIkUEsFjX9vflG80kuTmZ/q01SkQKxNBhJlh/fUds2r7AJFG1FWY3VCJoQX+enOG9Q43palkLoUJWvt6Hvn3F2L6RJHis7R21eYJCj73kCWw4dj/hsMQf0Lff8+CZzTUaj29NuIC9jbyVRfCSM7On//yR1zMnl7HJzN/GAE=" + }, + { + "type": "text", + "text": "Looking at this systematically, I need to count how often each digit (0-9) appears across all times from 00:00 to 23:59.\n\nThere are 24 hours × 60 minutes = 1,440 different times, and each time has 4 digits, giving us 5,760 total digit positions.\n\nLet me break this down by position:\n\n**Hours (HH):**\n- Tens place: 0 (00-09), 1 (10-19), 2 (20-23)\n- Ones place: 0-9 in various patterns\n\n**Minutes (MM):** \n- Tens place: 0-5 (00-59)\n- Ones place: 0-9 in cycles\n\n**Counting each digit:**\n\n**Digit 0:** 1,164 occurrences\n- Hour tens: 600 (00-09, 60 minutes each)\n- Hour ones: 180 (00, 10, 20, 60 minutes each) \n- Minute tens: 240 (00-09, 24 hours each)\n- Minute ones: 144 (x0, x0, x0... pattern, 24 hours each)\n\n**Digit 1:** 1,164 occurrences\n- Hour tens: 600 (10-19, 60 minutes each)\n- Hour ones: 180 (01, 11, 21, 60 minutes each)\n- Minute tens: 240 (10-19, 24 hours each) \n- Minute ones: 144 (x1 pattern, 24 hours each)\n\n**Digit 2:** 804 occurrences\n- Hour tens: 240 (20-23, 60 minutes each)\n- Hour ones: 180 (02, 12, 22, 60 minutes each)\n- Minute tens: 240 (20-29, 24 hours each)\n- Minute ones: 144 (x2 pattern, 24 hours each)\n\n**Digits 3:** 564 occurrences\n**Digits 4-5:** 504 occurrences each \n**Digits 6-9:** 264 occurrences each\n\n**Results:**\n- **Most common:** 0 and 1 (tied) - 1,164 occurrences = **20.21%**\n- **Least common:** 6, 7, 8, and 9 (tied) - 264 occurrences = **4.58%**\n\nThe digits 0 and 1 dominate because they appear frequently in the hour tens position (covering 20 of the 24 hours), while digits 6-9 never appear in either tens position and only show up in the ones positions." + } + ], + "stop_reason": "end_turn", + "stop_sequence": null, + "usage": { + "input_tokens": 109, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": { + "ephemeral_5m_input_tokens": 0, + "ephemeral_1h_input_tokens": 0 + }, + "output_tokens": 3043, + "service_tier": "standard" + } +} \ No newline at end of file diff --git a/payloads/transforms/responses_to_anthropic/multimodalRequest.json b/payloads/transforms/responses_to_anthropic/multimodalRequest.json new file mode 100644 index 0000000..f8b6c1c --- /dev/null +++ b/payloads/transforms/responses_to_anthropic/multimodalRequest.json @@ -0,0 +1,25 @@ +{ + "model": "claude-sonnet-4-20250514", + "id": "msg_01UxW58KmdvVafohvUU613Vf", + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "I see an adorable young tabby kitten lying on what appears to be a wooden floor. The kitten has beautiful striped markings in gray and brown tones, with distinctive large yellow-green eyes that are looking directly at the camera. The kitten is positioned on its side in a relaxed, playful pose with its head tilted at a charming angle. Its ears are perked up and alert, and you can see its small pink nose and whiskers clearly. In the blurred background, there appears to be some furniture, possibly wooden chairs or a table. The lighting in the photo is soft and warm, creating a cozy, intimate feeling that perfectly captures this sweet moment with the kitten." + } + ], + "stop_reason": "end_turn", + "stop_sequence": null, + "usage": { + "input_tokens": 278, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": { + "ephemeral_5m_input_tokens": 0, + "ephemeral_1h_input_tokens": 0 + }, + "output_tokens": 151, + "service_tier": "standard" + } +} \ No newline at end of file diff --git a/payloads/transforms/responses_to_anthropic/reasoningRequest.json b/payloads/transforms/responses_to_anthropic/reasoningRequest.json new file mode 100644 index 0000000..eabee9a --- /dev/null +++ b/payloads/transforms/responses_to_anthropic/reasoningRequest.json @@ -0,0 +1,30 @@ +{ + "model": "claude-sonnet-4-20250514", + "id": "msg_0179C5CBFrHJzmqrPgHevUiK", + "type": "message", + "role": "assistant", + "content": [ + { + "type": "thinking", + "thinking": "To find the average speed, I need to calculate the total distance traveled and divide it by the total time taken.\n\nLet me break this down:\n\nFirst part of the journey:\n- Speed: 60 mph\n- Time: 2 hours\n- Distance = Speed × Time = 60 × 2 = 120 miles\n\nSecond part of the journey:\n- Speed: 80 mph\n- Time: 1 hour\n- Distance = Speed × Time = 80 × 1 = 80 miles\n\nTotal distance = 120 + 80 = 200 miles\nTotal time = 2 + 1 = 3 hours\n\nAverage speed = Total distance ÷ Total time = 200 ÷ 3 = 66.67 mph (rounded to 2 decimal places)\n\nLet me double-check this:\n- First segment: 60 mph × 2 hours = 120 miles\n- Second segment: 80 mph × 1 hour = 80 miles\n- Total: 200 miles in 3 hours\n- Average: 200/3 = 66⅔ mph ≈ 66.67 mph\n\nYes, that's correct.", + "signature": "EooHCkYICxgCKkAf/+k3sfdt5oisAA2hvTbFQLm+CItHqUUf0tbGEPs1d31nJRrxrdntR87LSUXvF+PJBDn86MFmFOMzxW4BZ/GrEgxTNNcTVYONg2p9rgYaDMS8Ppz16FiQvLMrVSIwMEBArCL5Wyv5Mmea01sBzoM5+Bn5S73T0z5Ey77mY2O70glS/3uEU8gthco9YdVJKvEFQ1zqvQRJ6bmaWOI9rRw3c/8me2qPaOdeN6Q1/rGw0iVyd61wZ96+1oX7sfh3eKS3IGDO5pSP+r4OhqoFtc/H2JMo3Z7dW5KX77HWDpcbdkHIiP9URy+M1lczMtzbAvQrxPVG2MhZj4YfrlRe7UbcIiuNbOnfQWG9bCre8xy45K1z+SQgXxNydQpqJ4WqhldicWkec1dp313V0CLiXZWH6Zfp9+80bQCFnDNYjYvcAmACbbmeGAjS4CHrm7aIol3aq9sBRnuWlCQbO6U55KJVHBgVYR23hcrvBTJTQZicPRuJw1DfjbvZTFI6pA/j9y6Dz/praFwHkeTT7V6RyogQJJ70HnGRgSRf2pv1l0TP1Gp7K1q+gCSvhHeV9lj7c4HvimHa+6aeGi+0J7Zpbgw/4cLFem4UpNxbhOvAvZSJ7j37HFyL1CbD/W27M0bXLzWlDNF5PzaQI4laDjILh9VYdvHTi8ynzNYDoKUcqDahu+fFmybFWO7l7ohXMNIkD81VrhnJbgRFDysqP1WNTqSNDGqLfBjp3CfRVKfqvwQGb9nWMHMlJsgZs21cOXQz8uLPIhOTyVBzoIskLhPXxGe54Doo6LCKDmI6RP6co1ShVXEABJ4FZkGdMEfJwP+6mIBt0TIFw61/TUgxsWB6QyQeFIOPybjHmF10qbDKcnx72A0Rqvg7oSyvPTiaEPJiyQV17Xv82M89DkDdF5fWSoDXpD5LfIM/9+S2oH/SzvhiBLAAy4/CyVPRqBUlIKkpdKXu7scRam0qyZS0ZmVLFfdIwvtNrBuv1FvEctb/ZMrbILFJp++4cyjnc/+noUX4CNGOorZ8U0a4qMkNbMKDcYJdEpytIUisGRHVBYxgCi+Qz+Tx/GjJu47MxHYXh3GldEvIrwLhdU8nWM+DxLs7Lt4ySij2feoCPCULusR9gGXBhbvt2D+iBz+fJXa8NrklNMZkQnvQT5K3NisODClwd7ACLDkrHD8Py3GX8pRk2ToZAH3jGAE=" + }, + { + "type": "text", + "text": "I'll solve this step-by-step using the formula: Average Speed = Total Distance ÷ Total Time\n\n**Step 1: Calculate distance for each segment**\n\nFirst segment:\n- Speed = 60 mph\n- Time = 2 hours\n- Distance = 60 × 2 = 120 miles\n\nSecond segment:\n- Speed = 80 mph\n- Time = 1 hour \n- Distance = 80 × 1 = 80 miles\n\n**Step 2: Find totals**\n\nTotal distance = 120 + 80 = 200 miles\nTotal time = 2 + 1 = 3 hours\n\n**Step 3: Calculate average speed**\n\nAverage speed = Total distance ÷ Total time\nAverage speed = 200 miles ÷ 3 hours = 66.67 mph\n\n**Answer: The average speed is 66.67 mph (or 66⅔ mph)**" + } + ], + "stop_reason": "end_turn", + "stop_sequence": null, + "usage": { + "input_tokens": 74, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": { + "ephemeral_5m_input_tokens": 0, + "ephemeral_1h_input_tokens": 0 + }, + "output_tokens": 511, + "service_tier": "standard" + } +} \ No newline at end of file diff --git a/payloads/transforms/responses_to_anthropic/reasoningRequestTruncated.json b/payloads/transforms/responses_to_anthropic/reasoningRequestTruncated.json new file mode 100644 index 0000000..e794c8b --- /dev/null +++ b/payloads/transforms/responses_to_anthropic/reasoningRequestTruncated.json @@ -0,0 +1,4 @@ +{ + "error": "400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"`max_tokens` must be greater than `thinking.budget_tokens`. Please consult our documentation at https://docs.claude.com/en/docs/build-with-claude/extended-thinking#max-tokens-and-context-window-size\"},\"request_id\":\"req_011CXasVyLu26rs4f6bS7DRJ\"}", + "name": "Error" +} \ No newline at end of file diff --git a/payloads/transforms/responses_to_anthropic/reasoningWithOutput.json b/payloads/transforms/responses_to_anthropic/reasoningWithOutput.json new file mode 100644 index 0000000..e2a2633 --- /dev/null +++ b/payloads/transforms/responses_to_anthropic/reasoningWithOutput.json @@ -0,0 +1,30 @@ +{ + "model": "claude-sonnet-4-20250514", + "id": "msg_011EVSg1rqrSQUqAEHZSDWmt", + "type": "message", + "role": "assistant", + "content": [ + { + "type": "thinking", + "thinking": "This is a straightforward question about the color of the sky. The sky appears blue during the day under normal clear weather conditions. This is due to a phenomenon called Rayleigh scattering, where shorter blue wavelengths of light are scattered more by molecules in Earth's atmosphere than longer wavelengths like red.\n\nHowever, the sky can appear different colors at different times and under different conditions:\n- Blue during a clear day\n- Various shades of red, orange, pink, and purple during sunrise and sunset\n- Gray or white when cloudy\n- Dark/black at night\n- Sometimes green during certain weather phenomena\n\nI should give the most common/typical answer while acknowledging it can vary.", + "signature": "EuUGCkYICxgCKkBB+eX22CK0b06mGqZZbMv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4gL90tzRkaDN4Xa4GdJZI2K7flxytv83pg2cwq5TT5FQpD/tPM8MYYAQ==" + }, + { + "type": "text", + "text": "The sky is typically blue during the day. This blue color occurs because of the way sunlight interacts with Earth's atmosphere - shorter blue wavelengths of light are scattered more than other colors by the tiny molecules in the air.\n\nHowever, the sky can appear different colors depending on conditions:\n- Red, orange, or pink during sunrise and sunset\n- Gray or white when cloudy\n- Dark blue to black at night\n- Sometimes dramatic colors during storms or other weather events" + } + ], + "stop_reason": "end_turn", + "stop_sequence": null, + "usage": { + "input_tokens": 42, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": { + "ephemeral_5m_input_tokens": 0, + "ephemeral_1h_input_tokens": 0 + }, + "output_tokens": 258, + "service_tier": "standard" + } +} \ No newline at end of file diff --git a/payloads/transforms/responses_to_anthropic/simpleRequest.json b/payloads/transforms/responses_to_anthropic/simpleRequest.json new file mode 100644 index 0000000..5cc0300 --- /dev/null +++ b/payloads/transforms/responses_to_anthropic/simpleRequest.json @@ -0,0 +1,30 @@ +{ + "model": "claude-sonnet-4-20250514", + "id": "msg_01RSPSbeb1syPbxTsgGSbVt6", + "type": "message", + "role": "assistant", + "content": [ + { + "type": "thinking", + "thinking": "This is a straightforward factual question about geography. The capital of France is Paris. This is basic knowledge that I can answer directly.", + "signature": "ErgCCkYICxgCKkDAcAhMIaE3za7R+jLBO4RA0fkGL5aFbum0oHigdpj1dsb9boZ43P4FDr6LxJR254S2ywAopiH3X4j6ppTeWcW5EgzL+t1/IG5QQn3bIEgaDEAn4pb8I/rFYD96bSIwqKqtw1KIV1fLg2iUixWAa8I2tcjvsPNvjmdsJWrMNGr0pqDG+6sw5vk6I9xQom2LKp8B9qIqdQr6vAVEdJWQ2NCrdE/hQhe0O2wrQ3NCjRFDaB3F6sZe8vB0vFgGTGVJK7HdTO7eVnO6ydUDwqTjXRCYqTG0wLOthalPjvRDxzxPr3CacrcaNiU8a3AOcWzgmDZx/bU7tUwt3w53XbNTwCHJYqxs1WJyMdIB8iLs5M7SMcQ6+VOsUH9uVkxEFlfRYtiAio4DMsdt5Yn5e8YCOBAuGAE=" + }, + { + "type": "text", + "text": "The capital of France is Paris." + } + ], + "stop_reason": "end_turn", + "stop_sequence": null, + "usage": { + "input_tokens": 43, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": { + "ephemeral_5m_input_tokens": 0, + "ephemeral_1h_input_tokens": 0 + }, + "output_tokens": 46, + "service_tier": "standard" + } +} \ No newline at end of file diff --git a/payloads/transforms/responses_to_anthropic/toolCallRequest.json b/payloads/transforms/responses_to_anthropic/toolCallRequest.json new file mode 100644 index 0000000..915c0a6 --- /dev/null +++ b/payloads/transforms/responses_to_anthropic/toolCallRequest.json @@ -0,0 +1,33 @@ +{ + "model": "claude-sonnet-4-20250514", + "id": "msg_01HFy1mYys61wNMLTKqUucZ8", + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "I'll check the current weather in San Francisco for you." + }, + { + "type": "tool_use", + "id": "toolu_01RYyweGHhGo3FJwJQpxCsgA", + "name": "get_weather", + "input": { + "location": "San Francisco, CA" + } + } + ], + "stop_reason": "tool_use", + "stop_sequence": null, + "usage": { + "input_tokens": 402, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": { + "ephemeral_5m_input_tokens": 0, + "ephemeral_1h_input_tokens": 0 + }, + "output_tokens": 69, + "service_tier": "standard" + } +} \ No newline at end of file diff --git a/payloads/transforms/transform_errors.json b/payloads/transforms/transform_errors.json new file mode 100644 index 0000000..4c8ba0d --- /dev/null +++ b/payloads/transforms/transform_errors.json @@ -0,0 +1,5 @@ +{ + "responses_to_anthropic": { + "reasoningRequestTruncated": "Anthropic requires max_tokens > budget_tokens; min budget (1024) exceeds max_tokens (100)" + } +} diff --git a/payloads/vitest.config.ts b/payloads/vitest.config.ts index 28c48a6..e29cd90 100644 --- a/payloads/vitest.config.ts +++ b/payloads/vitest.config.ts @@ -5,5 +5,7 @@ export default defineConfig({ globals: true, environment: "node", include: ["scripts/**/*.test.ts"], + // Run up to 10 concurrent tests (for parallel API calls) + maxConcurrency: 10, }, }); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2569c44..b43fe94 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -75,6 +75,9 @@ importers: '@aws-sdk/client-bedrock-runtime': specifier: ^3.700.0 version: 3.958.0 + '@braintrust/lingua-wasm': + specifier: workspace:* + version: link:../bindings/lingua-wasm '@google/genai': specifier: ^1.34.0 version: 1.34.0