1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
Compiling llmrust v0.1.0 (D:\halowor\llmrust)
Finished `test` profile [unoptimized + debuginfo] target(s) in 8.64s
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::omitted_stop_is_not_serialized ... 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::anthropic::tests::response_with_non_text_blocks_is_tolerated ... ok
test providers::anthropic::tests::stop_sequences_are_forwarded ... ok
test providers::anthropic::tests::response_tool_use_block_parsed_into_tool_calls ... ok
test providers::anthropic::tests::tools_serialize_with_input_schema ... ok
test providers::anthropic::tests::stream_text_deltas_have_no_tool_calls ... ok
test providers::anthropic::tests::text_message_serializes_as_plain_string ... ok
test providers::anthropic::tests::stream_reconstructs_tool_calls ... ok
test providers::compat::tests::compat_stream_done_still_returns_done_chunk ... ok
test providers::compat::tests::assistant_tool_call_message_omits_empty_content ... ok
test providers::compat::tests::compat_stream_ignores_non_data_lines ... ok
test providers::compat::tests::embed_error_response_parses_message ... ok
test providers::compat::tests::embed_response_falls_back_to_request_model ... ok
test providers::compat::tests::embed_request_serializes_correctly ... ok
test providers::compat::tests::embed_response_parses_correctly ... ok
test providers::anthropic::tests::split_messages_concatenates_multiple_system_messages ... ok
test providers::anthropic::tests::image_message_serializes_as_content_blocks ... ok
test providers::compat::tests::omits_unset_sampling_params ... ok
test providers::compat::tests::compat_stream_malformed_data_returns_parse_error ... ok
test providers::compat::tests::openai_compatible_embed_via_lmrs_client_strips_prefix ... 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::google::tests::json_mode_sets_response_mime_type ... 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::tool_message_serializes_with_id ... ok
test providers::compat::tests::user_image_message_serializes_as_content_parts ... ok
test providers::google::tests::concurrent_same_name_tool_calls_get_unique_ids ... ok
test providers::google::tests::data_url_maps_to_inline_data ... ok
test providers::google::tests::empty_generation_config_returns_none ... 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::gemini_logprobs_parsed_into_logprobs ... ok
test providers::google::tests::json_schema_sets_response_schema ... ok
test providers::google::tests::json_tool_result_is_passed_through_as_object ... ok
test providers::google::tests::roundtrip_resolves_name_from_tool_call_id ... ok
test providers::google::tests::logprobs_map_to_gemini_fields ... ok
test providers::google::tests::response_function_call_part_parsed ... ok
test providers::google::tests::stream_and_chat_produce_same_id_format ... ok
test providers::compat::tests::stream_accumulates_tool_call_fragments ... ok
test providers::google::tests::stream_surfaces_function_call_as_tool_calls ... ok
test providers::google::tests::stream_text_chunk_has_no_tool_calls ... ok
test providers::google::tests::text_content_maps_to_text_part ... ok
test providers::google::tests::tool_choice_maps_to_gemini_mode ... ok
test providers::google::tests::tool_messages_build_function_call_and_response ... 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::http::tests::builds_hosted_client_with_overall_timeout ... ok
test providers::retry::tests::backoff_jitter_is_random ... ok
test providers::http::tests::builds_local_client_without_overall_timeout ... ok
test providers::retry::tests::backoff_produces_increasing_delays ... ok
test providers::retry::tests::backoff_respects_max ... 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::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::stream_util::tests::strips_crlf_line_endings ... 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_text_and_tool_use ... ok
test proxy::anthropic_proxy::tests::image_content_block_converts ... ok
test proxy::anthropic_proxy::tests::response_with_text_builds_correctly ... ok
test proxy::anthropic_proxy::tests::non_stream_rejects_model_no_slash ... ok
test proxy::anthropic_proxy::tests::response_with_tool_use_builds_correctly ... ok
test proxy::anthropic_proxy::tests::stop_reason_normalization ... 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::stream_rejects_model_no_slash ... ok
test proxy::anthropic_proxy::tests::stream_state_emits_message_start_and_stop ... ok
test proxy::anthropic_proxy::tests::stream_state_handles_tool_calls ... ok
test proxy::anthropic_proxy::tests::system_prompt_text_converts ... ok
test proxy::anthropic_proxy::tests::system_prompt_blocks_converts ... 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::tools_and_tool_choice_convert ... ok
test proxy::anthropic_proxy::tests::tool_use_in_assistant_converts ... ok
test proxy::anthropic_proxy::tests::two_tools_block_indices ... ok
test proxy::tests::convert_request_accepts_legacy_functions_and_function_call ... ok
test proxy::tests::convert_request_accepts_missing_n ... ok
test proxy::tests::convert_request_accepts_n_one ... ok
test proxy::tests::convert_request_accepts_string_stop_sequence ... ok
test proxy::tests::auth_wrong_token_returns_401 ... ok
test proxy::tests::auth_malformed_header_returns_401 ... ok
test proxy::tests::convert_request_forwards_advanced_openai_fields ... ok
test proxy::tests::convert_request_forwards_tools_and_tool_choice ... ok
test proxy::tests::auth_missing_header_returns_401 ... ok
test proxy::tests::convert_request_handles_tool_role ... ok
test proxy::tests::convert_request_prefers_modern_tools_over_legacy_functions ... ok
test proxy::tests::convert_request_rejects_empty_messages ... ok
test proxy::tests::auth_valid_token_passes_through ... 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_normal_text_still_emits_role_and_done ... ok
test proxy::tests::openai_stream_tool_calls_still_serialize ... ok
test proxy::tests::openai_stream_usage_only_emits_when_requested ... ok
test proxy::tests::openai_stream_usage_only_skipped_when_not_requested ... ok
test proxy::tests::split_model_helper_handles_valid_input ... ok
test proxy::tests::router_can_be_built ... ok
test proxy::tests::proxy_accepts_string_stop_sequence ... ok
test proxy::tests::proxy_accepts_multimodal_content ... ok
test proxy::tests::split_model_helper_rejects_invalid_input ... ok
test proxy::tests::stream_forwards_tool_calls ... ok
test proxy::tests::unknown_provider_returns_404 ... ok
test proxy::tests::stream_omits_usage_without_stream_options ... ok
test proxy::tests::stream_forwards_finish_reason_and_usage ... ok
test router::tests::all_deployments_fail_returns_last_error ... ok
test router::tests::cooldown_fail_open_when_all_deployments_are_cooling ... ok
test router::tests::cooldown_not_marked_for_api_400 ... ok
test router::tests::cooldown_not_marked_for_parse_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 router::tests::unknown_group_routes_directly ... ok
test types::tests::chat_request_from_messages_sets_messages ... 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_parts_serialize_as_openai_array ... ok
test types::tests::content_text_serializes_as_string ... 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 providers::compat::tests::openai_compatible_embed_posts_to_embeddings_endpoint ... ok
test providers::compat::tests::openai_provider_embed_strips_prefix_with_real_wrapper ... ok
test providers::compat::tests::openai_compatible_embed_sends_dimensions_user_and_extra ... ok
test providers::compat::tests::openai_compatible_embed_maps_api_error ... ok
test router::tests::cooldown_expires_and_retries_primary ... ok
test router::tests::successful_deployment_clears_cooldown ... ok
test providers::retry::tests::retry_provider_retries_transient_embedding_failure ... ok
test providers::retry::tests::retries_and_succeeds ... ok
test providers::retry::tests::exhausts_retries ... ok
test providers::retry::tests::stream_retries_and_succeeds ... ok
test result: ok. 169 passed; 0 failed; 0 ignored; 0 measured; 2 filtered out; finished in 1.39s
Running tests\agent_docs_validation.rs (target\debug\deps\agent_docs_validation-ec189a8eff819b14.exe)
running 9 tests
test capabilities_json_exists_and_is_valid ... ok
test capabilities_json_description_has_disclaimer ... ok
test capabilities_json_n_policy ... ok
test capabilities_json_has_name_and_version ... ok
test capabilities_md_has_disclaimer ... ok
test capabilities_json_providers_complete ... ok
test capabilities_json_proxy_auth_config ... ok
test examples_readme_lists_only_registered_examples ... ok
test agent_docs_free_of_dangerous_phrases ... ok
test result: ok. 9 passed; 0 failed; 0 ignored; 0 measured; 1 filtered out; finished in 0.00s
Running tests\contract_tests.rs (target\debug\deps\contract_tests-63d0af0f1c3ac5e7.exe)
running 16 tests
test model_routing_contracts::accepts_provider_model_format ... ok
test model_routing_contracts::rejects_empty_provider ... ok
test model_routing_contracts::unknown_provider_returns_proper_error ... ok
test stream_contracts::stream_collect_full_stores_finish_reason ... ok
test model_routing_contracts::rejects_model_without_provider_prefix ... ok
test model_routing_contracts::forwards_model_name_without_provider_prefix ... ok
test stream_contracts::stream_collect_full_stores_model_name ... ok
test stream_contracts::stream_collect_full_stores_text ... ok
test stream_contracts::stream_collect_full_stores_tool_calls ... ok
test proxy_n_policy_contracts::n_policy_rejects_n_zero ... ok
test proxy_n_policy_contracts::n_policy_rejects_n_greater_than_one ... ok
test proxy_n_policy_contracts::n_policy_accepts_missing_n ... ok
test stream_contracts::stream_collect_full_stores_usage ... ok
test proxy_n_policy_contracts::n_policy_accepts_n_one ... ok
test model_routing_contracts::rejects_empty_model ... ok
test stream_contracts::stream_collect_propagates_error ... ok
test result: ok. 16 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running tests\embeddings_contract_tests.rs (target\debug\deps\embeddings_contract_tests-1fec179ac04ab415.exe)
running 9 tests
test embeddings_contracts::embed_rejects_empty_model ... ok
test embeddings_contracts::embed_rejects_model_without_provider_prefix ... ok
test embeddings_contracts::embed_rejects_empty_provider ... ok
test embeddings_contracts::embed_unknown_provider_returns_unknown_provider ... ok
test embeddings_contracts::embed_with_strips_provider_prefix ... ok
test embeddings_contracts::embedding_request_batch_sets_multiple_inputs ... ok
test embeddings_contracts::embedding_request_builders_set_optional_fields ... ok
test embeddings_contracts::embedding_request_new_sets_single_input ... ok
test embeddings_contracts::unsupported_provider_returns_unsupported ... ok
test result: ok. 9 passed; 0 failed; 0 ignored; 0 measured; 1 filtered out; finished in 0.00s
Running tests\integration_tests.rs (target\debug\deps\integration_tests-699ab8e7e261d17f.exe)
running 21 tests
test tests::test_chat_request_default_no_stream ... ok
test tests::test_chat_request_builder ... ok
test tests::test_convenience_chat_and_stream_set_internal_model ... ok
test tests::test_from_env_registers_ollama_always ... ok
test tests::test_lmrs_client_parse_model_invalid ... ok
test tests::test_lmrs_client_parse_model_rejects_empty_parts ... ok
test tests::test_lmrs_client_parse_model_valid ... ok
test tests::test_lmrs_client_providers_empty ... ok
test tests::test_lmrs_client_set_moonshot ... ok
test tests::test_lmrs_client_set_multiple_providers ... ok
test tests::test_lmrs_client_set_ollama_custom_url ... ok
test tests::test_lmrs_client_set_ollama_default ... ok
test tests::test_lmrs_client_set_openai ... ok
test tests::test_lmrs_client_set_openai_compatible ... ok
test tests::test_lmrs_client_set_openrouter ... ok
test tests::test_message_serialization ... ok
test tests::test_prelude_reexports_compile ... ok
test tests::test_role_serialization ... ok
test tests::test_lmrs_client_set_google ... ok
test tests::test_lmrs_client_set_all_seven_providers ... ok
test tests::test_message_constructors ... ok
test result: ok. 21 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests llmrust
running 9 tests
test src\lib.rs - (line 57) ... ignored
test src\providers\retry.rs - providers::retry (line 19) ... ignored
test src\proxy\mod.rs - proxy::default_cors (line 311) ... ignored
test src\lib.rs - LmrsClient::from_env (line 131) - compile ... ok
test src\lib.rs - (line 21) - compile ... ok
test src\router.rs - router (line 35) - compile ... ok
test src\proxy\mod.rs - proxy (line 9) - compile ... ok
test src\prelude.rs - prelude (line 3) ... ok
test src\types.rs - types::ChatRequest (line 545) ... ok
test result: ok. 6 passed; 0 failed; 3 ignored; 0 measured; 1 filtered out; finished in 0.88s