   Compiling llmrust v0.1.0 (D:\halowor\llmrust)
    Finished `test` profile [unoptimized + debuginfo] target(s) in 9.21s
     Running unittests src\lib.rs (target\debug\deps\llmrust-1a9c57464c2ad480.exe)

running 169 tests
test providers::anthropic::tests::http_url_image_becomes_url_block ... ok
test providers::anthropic::tests::data_url_image_becomes_base64_block ... ok
test providers::anthropic::tests::tool_choice_maps_to_anthropic ... ok
test providers::anthropic::tests::image_message_serializes_as_content_blocks ... ok
test providers::anthropic::tests::assistant_tool_calls_and_results_serialize_as_blocks ... ok
test providers::anthropic::tests::split_messages_extracts_system_text ... ok
test providers::compat::tests::omits_unset_sampling_params ... ok
test providers::anthropic::tests::text_message_serializes_as_plain_string ... ok
test providers::anthropic::tests::stream_text_deltas_have_no_tool_calls ... ok
test providers::anthropic::tests::response_tool_use_block_parsed_into_tool_calls ... ok
test providers::compat::tests::embed_response_parses_correctly ... ok
test providers::compat::tests::assistant_tool_call_message_omits_empty_content ... ok
test providers::anthropic::tests::tools_serialize_with_input_schema ... ok
test providers::anthropic::tests::stream_reconstructs_tool_calls ... ok
test providers::compat::tests::compat_stream_ignores_non_data_lines ... ok
test providers::compat::tests::compat_stream_malformed_data_returns_parse_error ... ok
test providers::anthropic::tests::split_messages_concatenates_multiple_system_messages ... ok
test providers::anthropic::tests::stop_sequences_are_forwarded ... ok
test providers::compat::tests::embed_request_serializes_correctly ... ok
test providers::compat::tests::compat_stream_done_still_returns_done_chunk ... ok
test providers::compat::tests::embed_error_response_parses_message ... ok
test providers::anthropic::tests::response_with_non_text_blocks_is_tolerated ... ok
test providers::compat::tests::embed_response_falls_back_to_request_model ... ok
test providers::anthropic::tests::omitted_stop_is_not_serialized ... ok
test providers::compat::tests::parses_logprobs_from_response ... ok
test providers::compat::tests::parses_tool_calls_from_response ... ok
test providers::compat::tests::serializes_sampling_params_and_response_format ... ok
test providers::compat::tests::openai_compatible_embed_via_lmrs_client_strips_prefix ... ok
test providers::compat::tests::serializes_tools_and_tool_choice ... ok
test providers::compat::tests::stream_without_tool_calls_has_none ... ok
test providers::compat::tests::stream_accumulates_tool_call_fragments ... ok
test providers::compat::tests::tool_message_serializes_with_id ... ok
test providers::compat::tests::user_image_message_serializes_as_content_parts ... ok
test providers::google::tests::data_url_maps_to_inline_data ... ok
test providers::google::tests::function_declarations_serialize ... ok
test providers::google::tests::generation_config_forwards_sampling_params ... ok
test providers::google::tests::http_image_url_is_skipped ... ok
test providers::google::tests::logprobs_map_to_gemini_fields ... ok
test providers::google::tests::json_schema_sets_response_schema ... ok
test providers::google::tests::gemini_logprobs_parsed_into_logprobs ... ok
test providers::google::tests::concurrent_same_name_tool_calls_get_unique_ids ... ok
test providers::google::tests::response_function_call_part_parsed ... ok
test providers::google::tests::empty_generation_config_returns_none ... ok
test providers::google::tests::json_mode_sets_response_mime_type ... ok
test providers::google::tests::json_tool_result_is_passed_through_as_object ... ok
test providers::google::tests::text_content_maps_to_text_part ... ok
test providers::google::tests::roundtrip_resolves_name_from_tool_call_id ... ok
test providers::google::tests::stream_and_chat_produce_same_id_format ... ok
test providers::google::tests::stream_surfaces_function_call_as_tool_calls ... ok
test providers::google::tests::tool_messages_build_function_call_and_response ... ok
test providers::google::tests::tool_choice_maps_to_gemini_mode ... ok
test providers::google::tests::stream_text_chunk_has_no_tool_calls ... ok
test providers::ollama::tests::ollama_stream_ignores_empty_lines ... ok
test providers::ollama::tests::ollama_stream_malformed_json_returns_parse_error ... ok
test providers::ollama::tests::ollama_stream_valid_chunk_still_parses ... ok
test providers::retry::tests::backoff_jitter_is_random ... ok
test providers::http::tests::builds_local_client_without_overall_timeout ... ok
test providers::http::tests::builds_hosted_client_with_overall_timeout ... ok
test providers::retry::tests::backoff_respects_max ... ok
test providers::retry::tests::backoff_produces_increasing_delays ... ok
test providers::retry::tests::does_not_retry_4xx ... ok
test providers::retry::tests::retry_provider_delegates_embed ... ok
test providers::retry::tests::retry_provider_keeps_unsupported_for_chat_only_provider ... ok
test providers::retry::tests::succeeds_on_first_try ... ok
test providers::stream_util::tests::strips_crlf_line_endings ... ok
test proxy::anthropic_proxy::tests::response_with_text_builds_correctly ... ok
test providers::stream_util::tests::reassembles_line_split_across_chunks ... ok
test providers::stream_util::tests::reassembles_multibyte_utf8_split_across_chunks ... ok
test providers::stream_util::tests::splits_multiple_lines_and_flushes_tail ... ok
test providers::tests::n_greater_than_one_is_unsupported ... ok
test providers::tests::n_one_or_none_is_supported ... ok
test providers::tests::provider_config_debug_masks_sensitive_fields ... ok
test proxy::anthropic_proxy::tests::error_response_serializes_correctly ... ok
test proxy::anthropic_proxy::tests::response_with_tool_use_builds_correctly ... ok
test proxy::anthropic_proxy::tests::image_content_block_converts ... ok
test proxy::anthropic_proxy::tests::non_stream_rejects_model_no_slash ... ok
test proxy::anthropic_proxy::tests::response_with_text_and_tool_use ... ok
test proxy::anthropic_proxy::tests::same_chunk_text_and_tool_closes_text_before_tool_start ... ok
test proxy::anthropic_proxy::tests::stream_rejects_empty_model ... ok
test proxy::anthropic_proxy::tests::stream_error_does_not_flush_normal_message_stop ... ok
test proxy::anthropic_proxy::tests::stream_rejects_empty_provider ... ok
test proxy::anthropic_proxy::tests::stop_reason_normalization ... ok
test proxy::anthropic_proxy::tests::stream_rejects_model_no_slash ... ok
test proxy::anthropic_proxy::tests::stream_state_emits_message_start_and_stop ... ok
test proxy::anthropic_proxy::tests::system_prompt_blocks_converts ... ok
test proxy::anthropic_proxy::tests::system_prompt_text_converts ... ok
test proxy::anthropic_proxy::tests::stream_state_handles_tool_calls ... ok
test proxy::anthropic_proxy::tests::text_request_converts ... ok
test proxy::anthropic_proxy::tests::text_then_tool_block_indices ... ok
test proxy::anthropic_proxy::tests::tool_choice_any_maps_to_required ... ok
test proxy::anthropic_proxy::tests::text_tool_text_block_indices_no_reuse ... ok
test proxy::anthropic_proxy::tests::tool_choice_tool_maps_to_function ... ok
test proxy::anthropic_proxy::tests::tool_only_block_index_starts_at_zero ... ok
test proxy::anthropic_proxy::tests::tool_result_converts ... ok
test proxy::anthropic_proxy::tests::tool_use_in_assistant_converts ... ok
test proxy::anthropic_proxy::tests::tools_and_tool_choice_convert ... ok
test proxy::anthropic_proxy::tests::two_tools_block_indices ... ok
test proxy::tests::convert_request_accepts_missing_n ... ok
test proxy::tests::convert_request_accepts_legacy_functions_and_function_call ... ok
test proxy::tests::convert_request_accepts_n_one ... ok
test proxy::tests::convert_request_accepts_string_stop_sequence ... ok
test proxy::tests::auth_malformed_header_returns_401 ... ok
test proxy::tests::auth_wrong_token_returns_401 ... ok
test proxy::tests::auth_missing_header_returns_401 ... ok
test proxy::tests::convert_request_forwards_tools_and_tool_choice ... ok
test proxy::tests::convert_request_forwards_advanced_openai_fields ... ok
test proxy::tests::auth_valid_token_passes_through ... ok
test proxy::tests::convert_request_handles_tool_role ... ok
test proxy::tests::convert_request_rejects_empty_messages ... ok
test proxy::tests::convert_request_prefers_modern_tools_over_legacy_functions ... ok
test proxy::tests::convert_request_rejects_n_greater_than_one ... ok
test proxy::tests::convert_request_rejects_n_zero ... ok
test proxy::tests::empty_messages_returns_400 ... ok
test proxy::tests::invalid_model_format_returns_400 ... ok
test proxy::tests::invalid_role_returns_400 ... ok
test proxy::tests::malformed_json_returns_proxy_error_body ... ok
test proxy::tests::non_stream_chat_with_mock_provider ... ok
test proxy::tests::openai_stream_error_event_is_emitted_before_done ... ok
test proxy::tests::openai_stream_error_stops_after_first_error ... ok
test proxy::tests::non_stream_forwards_tool_calls_and_finish_reason ... ok
test proxy::tests::openai_stream_tool_calls_still_serialize ... ok
test proxy::tests::openai_stream_normal_text_still_emits_role_and_done ... ok
test proxy::tests::openai_stream_usage_only_skipped_when_not_requested ... ok
test proxy::tests::openai_stream_usage_only_emits_when_requested ... ok
test proxy::tests::router_can_be_built ... ok
test proxy::tests::split_model_helper_handles_valid_input ... ok
test proxy::tests::split_model_helper_rejects_invalid_input ... ok
test proxy::tests::proxy_accepts_multimodal_content ... ok
test proxy::tests::proxy_accepts_string_stop_sequence ... ok
test proxy::tests::stream_forwards_tool_calls ... ok
test proxy::tests::unknown_provider_returns_404 ... ok
test proxy::tests::stream_forwards_finish_reason_and_usage ... ok
test proxy::tests::stream_omits_usage_without_stream_options ... ok
test router::tests::cooldown_fail_open_when_all_deployments_are_cooling ... ok
test router::tests::cooldown_not_marked_for_parse_error ... ok
test router::tests::cooldown_not_marked_for_api_400 ... ok
test router::tests::all_deployments_fail_returns_last_error ... ok
test proxy::tests::upstream_rate_limit_uses_openai_error_type ... ok
test router::tests::cooldown_skips_recently_failed_primary ... ok
test router::tests::default_router_does_not_skip_failed_primary ... ok
test router::tests::falls_back_on_transient_error ... ok
test router::tests::permanent_error_is_not_retried ... ok
test router::tests::round_robin_rotates_start ... ok
test router::tests::stream_falls_back_on_transient_error ... ok
test router::tests::stream_initial_failure_marks_cooldown ... ok
test types::tests::chat_request_from_messages_sets_messages ... ok
test router::tests::unknown_group_routes_directly ... ok
test types::tests::chat_request_sampling_builders_set_fields ... ok
test types::tests::chat_response_serializes_logprobs_only_when_present ... ok
test types::tests::content_deserializes_from_string_and_array ... ok
test types::tests::content_text_serializes_as_string ... ok
test types::tests::content_parts_serialize_as_openai_array ... ok
test types::tests::message_user_with_image_holds_parts ... ok
test types::tests::response_format_serializes_as_openai_wire_format ... ok
test types::tests::stream_chunk_serializes_tool_calls_only_when_present ... ok
test types::tests::tool_choice_function_serializes_as_object ... ok
test types::tests::tool_choice_mode_serializes_as_string ... ok
test types::tests::tool_message_has_role_and_id ... ok
test types::tests::tool_serializes_with_function_schema ... ok
test router::tests::successful_deployment_clears_cooldown ... ok
test router::tests::cooldown_expires_and_retries_primary ... ok
test providers::retry::tests::retry_provider_retries_transient_embedding_failure ... ok
test providers::compat::tests::openai_provider_embed_strips_prefix_with_real_wrapper ... FAILED
test providers::compat::tests::openai_compatible_embed_sends_dimensions_user_and_extra ... FAILED
test providers::compat::tests::openai_compatible_embed_posts_to_embeddings_endpoint ... FAILED
test providers::compat::tests::openai_compatible_embed_maps_api_error ... FAILED
test providers::retry::tests::exhausts_retries ... ok
test providers::retry::tests::retries_and_succeeds ... ok
test providers::retry::tests::stream_retries_and_succeeds ... ok

failures:

---- providers::compat::tests::openai_provider_embed_strips_prefix_with_real_wrapper stdout ----

thread 'providers::compat::tests::openai_provider_embed_strips_prefix_with_real_wrapper' (14288) panicked at src\providers\compat.rs:1243:14:
embed should succeed via real OpenAIProvider: Api { status: 502, message: "" }

---- providers::compat::tests::openai_compatible_embed_sends_dimensions_user_and_extra stdout ----

thread 'providers::compat::tests::openai_compatible_embed_sends_dimensions_user_and_extra' (27436) panicked at src\providers\compat.rs:1187:43:
embed should succeed: Api { status: 502, message: "" }

---- providers::compat::tests::openai_compatible_embed_posts_to_embeddings_endpoint stdout ----

thread 'providers::compat::tests::openai_compatible_embed_posts_to_embeddings_endpoint' (21392) panicked at src\providers\compat.rs:1165:43:
embed should succeed: Api { status: 502, message: "" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- providers::compat::tests::openai_compatible_embed_maps_api_error stdout ----

thread 'providers::compat::tests::openai_compatible_embed_maps_api_error' (4852) panicked at src\providers\compat.rs:1201:9:
expected Api 400, got: Api { status: 502, message: "" }


failures:
    providers::compat::tests::openai_compatible_embed_maps_api_error
    providers::compat::tests::openai_compatible_embed_posts_to_embeddings_endpoint
    providers::compat::tests::openai_compatible_embed_sends_dimensions_user_and_extra
    providers::compat::tests::openai_provider_embed_strips_prefix_with_real_wrapper

test result: FAILED. 165 passed; 4 failed; 0 ignored; 0 measured; 2 filtered out; finished in 1.36s

error: test failed, to rerun pass `--lib`
