diff --git a/crates/model-connector/tests/wire_golden_v5.rs b/crates/model-connector/tests/wire_golden_v5.rs index c25c5b2..4afd54a 100644 --- a/crates/model-connector/tests/wire_golden_v5.rs +++ b/crates/model-connector/tests/wire_golden_v5.rs @@ -114,6 +114,15 @@ fn completed() -> TransportOutcome { } } +fn input_reasoning_state() -> InputItem { + let reasoning = (0x80..=0xff_u8).collect::>(); + InputItem::ReasoningState { + provider: "anthropic-messages".to_string(), + model: "claude-opus-4-5".to_string(), + state: reasoning, + } +} + #[test] fn wire_golden_v5() { let invocation = invocation(); @@ -123,14 +132,7 @@ fn wire_golden_v5() { // The reasoning bytes are all >= 0x80 so a byte-array encoding cannot pass // for MessagePack bin. let reasoning = || (0x80..=0xff_u8).collect::>(); - assert_wire( - "input_reasoning_state.mp", - &InputItem::ReasoningState { - provider: "anthropic-messages".to_string(), - model: "claude-opus-4-5".to_string(), - state: reasoning(), - }, - ); + assert_wire("input_reasoning_state.mp", &input_reasoning_state()); let transported = TransportResult { schema_id: RESULT_SCHEMA_ID.to_string(), @@ -263,6 +265,7 @@ fn the_golden_carriage_frame_decrypts_and_validates_under_the_fixed_key() { /// as an array of integers. #[test] fn reasoning_state_is_messagepack_bin() { + assert_wire("input_reasoning_state.mp", &input_reasoning_state()); let golden = std::fs::read(fixtures().join("input_reasoning_state.mp")).unwrap(); let marker = golden.windows(3).any(|window| window == [0xc4, 0x80, 0x80]); assert!(marker, "state must be a bin 8 of 128 bytes starting 0x80");