Build AI methods with your coding agent, then run them anywhere: as an MCP for chatbots, as a webapp for people, or via API for your software.
feature/Manifold-out-of-pipelex · L-261005-ebc2ad (#1337)
Louis Choquel64b5129ff583
diff --git a/.claude/skills/add-model/SKILL.md b/.claude/skills/add-model/SKILL.mdindex 0492d8805..b21724ef9 100644--- a/.claude/skills/add-model/SKILL.md+++ b/.claude/skills/add-model/SKILL.md@@ -7,7 +7,7 @@ description: >every backend it lands on, and the changelog entry. Use when the user says "add amodel", "add GPT-X", "add Claude X", "add Gemini X", "new model", "register a model","support model X", "add model to backend", or names a model that no backend TOML- declares yet and wants it available. The Pipelex Manifold catalog is+ declares yet and wants it available. The hosted model catalog isnot in this repository: in the Pipelex workspace, the workspace-level `/add-model`carries a model through them and runs this skill as its pipelex leg.---@@ -16,7 +16,7 @@ description: >A model is added once per backend that serves it. Each backend TOML under `.pipelex/inference/backends/` declares the models that backend can call, the kit copy under `pipelex/kit/configs/` is what ships in the package, and `.pipelex-dev/test_profiles.toml` decides which models the parametrized inference tests can select. Those are the files that declare a model; the steps below also write the changelog, and regenerate the goldens and references that follow from them.-The Pipelex Manifold catalog is not in this repository: the hosted plane carries it. See step 8.+The hosted model catalog is not in this repository: the hosted plane carries it. See step 8.## 1. Establish the facts, from the provider@@ -75,9 +75,9 @@ For an LLM, go past `TestLLMInference` and exercise what the entry declares: `Te- **Changelog.** One bullet under `## [Unreleased]` → `### Added` in `CHANGELOG.md`: the handle, the backends, what it takes and produces, and anything unusual such as a refused parameter.- **Checks.** `make tb` boots the config, which parses and validates the backends `backends.toml` enables — and only those, so an entry added to a disabled backend such as `vertexai` is never read. To validate one, enable that backend in the gitignored `.pipelex/inference/backends_override.toml` for the run, and delete the file afterwards. Then stage your changes (the drift digest reads the git index) and run `make agent-check`.-## 8. The manifold catalog+## 8. The hosted model catalog-This repository cannot add the model to Pipelex Manifold: its catalog lives with the hosted plane. Tell the user so, and say which handle, model ids and capabilities the catalog needs. **In the Pipelex workspace, the workspace-level `/add-model` does that part**, and runs this skill as its pipelex leg.+This repository cannot add the model to the hosted model catalog, which lives with the hosted plane. Tell the user so, and say which handle, model ids and capabilities the catalog needs. **In the Pipelex workspace, the workspace-level `/add-model` does that part**, and runs this skill as its pipelex leg.## Checklist@@ -92,4 +92,4 @@ Show this to the user at the end, each box ticked or explained:- [ ] Deck left alone, or the promotion decided by the user, made after a shipped backend serves the model, and mirrored in `docs/`- [ ] Changelog entry under `[Unreleased]`- [ ] `make tb` and `make agent-check` green-- [ ] Manifold catalog handed off to the hosted plane+- [ ] Hosted model catalog handed off to the hosted planediff --git a/.test_durations b/.test_durationsindex 1d394b23d..e277034c0 100644--- a/.test_durations+++ b/.test_durations@@ -9682,103 +9682,103 @@"tests/unit/pipelex/providers/linkup/test_linkup_worker_error_handling.py::TestLinkupWorkerErrorHandling::test_search_user_action_uses_specific_kind[LinkupAuthenticationError-check_credentials]": 0.0015,"tests/unit/pipelex/providers/linkup/test_linkup_worker_error_handling.py::TestLinkupWorkerErrorHandling::test_search_user_action_uses_specific_kind[LinkupInsufficientCreditError-check_billing]": 0.0016,"tests/unit/pipelex/providers/linkup/test_linkup_worker_error_handling.py::TestLinkupWorkerErrorHandling::test_search_user_action_uses_specific_kind[LinkupTooManyRequestsError-wait_and_retry]": 0.002,- "tests/unit/pipelex/providers/manifold/test_extract_manifold_metadata.py::TestTheRequestIdTheManifoldPathReports::test_prefers_the_pipelex_spelling_over_the_vendor_one": 1.7865,- "tests/unit/pipelex/providers/manifold/test_extract_manifold_metadata.py::TestTheRequestIdTheManifoldPathReports::test_prefers_the_providers_own_request_id_over_any_trace_id": 1.8161,- "tests/unit/pipelex/providers/manifold/test_extract_manifold_metadata.py::TestTheRequestIdTheManifoldPathReports::test_reads_the_pipelex_spelled_trace_id": 1.7887,- "tests/unit/pipelex/providers/manifold/test_extract_manifold_metadata.py::TestTheRequestIdTheManifoldPathReports::test_reports_no_request_id_when_no_provider_was_reached": 1.7992,- "tests/unit/pipelex/providers/manifold/test_manifold_clients.py::TestManifoldCompletionsClient::test_a_handle_from_another_sdk_set_is_refused": 0.0016,- "tests/unit/pipelex/providers/manifold/test_manifold_clients.py::TestManifoldCompletionsClient::test_the_client_gets_the_origin_plus_v1_and_the_token_in_the_service_header": 3.4526,- "tests/unit/pipelex/providers/manifold/test_manifold_clients.py::TestManifoldImageClient::test_debug_is_read_from_the_backend_and_from_nothing_else": 0.049,- "tests/unit/pipelex/providers/manifold/test_manifold_clients.py::TestManifoldImageClient::test_the_vendor_client_is_built_under_the_same_endpoint_rule": 0.0006,- "tests/unit/pipelex/providers/manifold/test_manifold_clients.py::TestManifoldResponsesClient::test_a_handle_from_another_sdk_set_is_refused": 0.0007,- "tests/unit/pipelex/providers/manifold/test_manifold_clients.py::TestManifoldResponsesClient::test_the_client_gets_the_origin_plus_v1_and_the_token_in_the_service_header": 0.0017,- "tests/unit/pipelex/providers/manifold/test_manifold_completions_messages.py::TestManifoldCompletionsMessages::test_a_document_that_is_not_bytes_is_refused[http-url-document]": 0.0012,- "tests/unit/pipelex/providers/manifold/test_manifold_completions_messages.py::TestManifoldCompletionsMessages::test_a_document_that_is_not_bytes_is_refused[local-path-document]": 0.0097,- "tests/unit/pipelex/providers/manifold/test_manifold_completions_messages.py::TestManifoldCompletionsMessages::test_a_document_travels_as_an_image_url_data_url": 0.006,- "tests/unit/pipelex/providers/manifold/test_manifold_completions_messages.py::TestManifoldCompletionsMessages::test_images_become_image_url_parts_at_the_requested_detail[None-auto]": 0.0012,- "tests/unit/pipelex/providers/manifold/test_manifold_completions_messages.py::TestManifoldCompletionsMessages::test_images_become_image_url_parts_at_the_requested_detail[high-high]": 0.0021,- "tests/unit/pipelex/providers/manifold/test_manifold_completions_messages.py::TestManifoldCompletionsMessages::test_images_become_image_url_parts_at_the_requested_detail[low-low]": 0.0011,- "tests/unit/pipelex/providers/manifold/test_manifold_completions_messages.py::TestManifoldCompletionsMessages::test_system_and_user_text": 0.4923,- "tests/unit/pipelex/providers/manifold/test_manifold_endpoint_rule.py::TestManifoldEndpointRule::test_a_trailing_slash_or_surrounding_space_is_forgiven[ https://manifold.example.com ]": 0.0003,- "tests/unit/pipelex/providers/manifold/test_manifold_endpoint_rule.py::TestManifoldEndpointRule::test_a_trailing_slash_or_surrounding_space_is_forgiven[https://manifold.example.com///]": 0.0015,- "tests/unit/pipelex/providers/manifold/test_manifold_endpoint_rule.py::TestManifoldEndpointRule::test_a_trailing_slash_or_surrounding_space_is_forgiven[https://manifold.example.com/]": 0.0034,- "tests/unit/pipelex/providers/manifold/test_manifold_endpoint_rule.py::TestManifoldEndpointRule::test_an_absent_api_key_is_refused_by_name": 0.0003,- "tests/unit/pipelex/providers/manifold/test_manifold_endpoint_rule.py::TestManifoldEndpointRule::test_an_absent_endpoint_is_refused_and_never_defaulted[blank]": 0.0004,- "tests/unit/pipelex/providers/manifold/test_manifold_endpoint_rule.py::TestManifoldEndpointRule::test_an_absent_endpoint_is_refused_and_never_defaulted[empty]": 0.0004,- "tests/unit/pipelex/providers/manifold/test_manifold_endpoint_rule.py::TestManifoldEndpointRule::test_an_absent_endpoint_is_refused_and_never_defaulted[slash-only]": 0.0003,- "tests/unit/pipelex/providers/manifold/test_manifold_endpoint_rule.py::TestManifoldEndpointRule::test_an_absent_endpoint_is_refused_and_never_defaulted[unset]": 0.0004,- "tests/unit/pipelex/providers/manifold/test_manifold_endpoint_rule.py::TestManifoldEndpointRule::test_origin_is_returned_as_declared": 0.55,- "tests/unit/pipelex/providers/manifold/test_manifold_endpoint_rule.py::TestManifoldEndpointRule::test_the_only_header_about_us_is_the_service_token": 0.0871,- "tests/unit/pipelex/providers/manifold/test_manifold_endpoint_rule.py::TestManifoldEndpointRule::test_the_version_segment_is_appended_by_the_factory_not_the_operator": 0.0002,- "tests/unit/pipelex/providers/manifold/test_manifold_extract_worker.py::TestManifoldExtractRequestBody::test_a_non_web_page_model_is_handed_the_bytes_inline": 0.5713,- "tests/unit/pipelex/providers/manifold/test_manifold_extract_worker.py::TestManifoldExtractRequestBody::test_a_web_page_model_is_handed_the_url_itself": 0.0687,- "tests/unit/pipelex/providers/manifold/test_manifold_extract_worker.py::TestManifoldExtractRequestBody::test_a_web_page_model_with_no_document_uri_is_refused_by_name": 0.0059,- "tests/unit/pipelex/providers/manifold/test_manifold_extract_worker.py::TestManifoldExtractRequestBody::test_an_unset_optional_parameter_is_omitted_rather_than_sent_as_null": 0.0053,- "tests/unit/pipelex/providers/manifold/test_manifold_extract_worker.py::TestManifoldExtractRequestBody::test_no_input_at_all_is_refused": 0.0087,- "tests/unit/pipelex/providers/manifold/test_manifold_extract_worker.py::TestManifoldExtractRequestBody::test_the_withdrawn_parameters_are_absent_rather_than_sent_at_their_defaults": 0.5887,- "tests/unit/pipelex/providers/manifold/test_manifold_extract_worker.py::TestManifoldExtractUsageTranslation::test_a_usage_block_the_route_did_not_send_leaves_the_abstract_fallback_in_charge[empty-usage]": 0.0064,- "tests/unit/pipelex/providers/manifold/test_manifold_extract_worker.py::TestManifoldExtractUsageTranslation::test_a_usage_block_the_route_did_not_send_leaves_the_abstract_fallback_in_charge[no-usage]": 0.0029,- "tests/unit/pipelex/providers/manifold/test_manifold_extract_worker.py::TestManifoldExtractUsageTranslation::test_a_usage_block_the_route_did_not_send_leaves_the_abstract_fallback_in_charge[non-numeric-pages]": 0.1053,- "tests/unit/pipelex/providers/manifold/test_manifold_extract_worker.py::TestManifoldExtractUsageTranslation::test_a_usage_block_the_route_did_not_send_leaves_the_abstract_fallback_in_charge[null-usage]": 0.003,- "tests/unit/pipelex/providers/manifold/test_manifold_extract_worker.py::TestManifoldExtractUsageTranslation::test_pages_become_megatokens_in_both_categories": 0.0136,- "tests/unit/pipelex/providers/manifold/test_manifold_img_gen_worker.py::TestManifoldImgGenWorkerFailures::test_a_malformed_success_body_is_wrapped_rather_than_escaping[image-without-data]": 0.0057,- "tests/unit/pipelex/providers/manifold/test_manifold_img_gen_worker.py::TestManifoldImgGenWorkerFailures::test_a_malformed_success_body_is_wrapped_rather_than_escaping[no-images]": 3.4369,- "tests/unit/pipelex/providers/manifold/test_manifold_img_gen_worker.py::TestManifoldImgGenWorkerFailures::test_a_malformed_success_body_is_wrapped_rather_than_escaping[no-size-at-all]": 0.0394,- "tests/unit/pipelex/providers/manifold/test_manifold_img_gen_worker.py::TestManifoldImgGenWorkerFailures::test_a_malformed_success_body_is_wrapped_rather_than_escaping[non-numeric-size]": 0.0033,- "tests/unit/pipelex/providers/manifold/test_manifold_img_gen_worker.py::TestManifoldImgGenWorkerFailures::test_a_non_json_2xx_becomes_a_categorized_error": 0.0041,- "tests/unit/pipelex/providers/manifold/test_manifold_img_gen_worker.py::TestManifoldImgGenWorkerFailures::test_a_provider_status_error_is_classified_rather_than_raised_raw": 0.0886,- "tests/unit/pipelex/providers/manifold/test_manifold_img_gen_worker.py::TestManifoldImgGenWorkerSuccess::test_an_azure_gpt_image_body_becomes_generated_images": 0.5982,- "tests/unit/pipelex/providers/manifold/test_manifold_img_gen_worker.py::TestManifoldImgGenWorkerSuccess::test_input_images_route_to_the_edits_endpoint": 0.0061,- "tests/unit/pipelex/providers/manifold/test_manifold_img_gen_worker.py::TestManifoldImgGenWorkerSuccess::test_several_input_images_travel_as_a_list_not_as_repeated_bare_parts": 0.0026,- "tests/unit/pipelex/providers/manifold/test_manifold_metadata.py::TestManifoldMetadata::test_a_job_with_extras_yields_the_exact_wire_value": 0.0009,- "tests/unit/pipelex/providers/manifold/test_manifold_metadata.py::TestManifoldMetadata::test_a_none_id_is_omitted_and_a_colliding_extras_key_does_not_stand_in_for_it": 0.0003,- "tests/unit/pipelex/providers/manifold/test_manifold_metadata.py::TestManifoldMetadata::test_empty_extras_yield_the_runtime_ids_alone": 0.0006,- "tests/unit/pipelex/providers/manifold/test_manifold_metadata.py::TestManifoldMetadata::test_every_runtime_key_is_a_legal_extras_key_so_a_collision_is_possible": 0.0003,- "tests/unit/pipelex/providers/manifold/test_manifold_metadata.py::TestManifoldMetadata::test_the_encoding_is_compact_json": 0.001,- "tests/unit/pipelex/providers/manifold/test_manifold_metadata.py::TestManifoldMetadata::test_the_header_is_named_by_the_dialect_and_never_by_the_vendor": 0.0725,- "tests/unit/pipelex/providers/manifold/test_manifold_metadata.py::TestManifoldMetadata::test_the_runtime_ids_win_over_colliding_extras_keys": 0.0007,- "tests/unit/pipelex/providers/manifold/test_manifold_metadata.py::TestManifoldMetadata::test_the_value_is_printable_ascii_whatever_went_in[crlf]": 0.0007,- "tests/unit/pipelex/providers/manifold/test_manifold_metadata.py::TestManifoldMetadata::test_the_value_is_printable_ascii_whatever_went_in[del]": 0.0004,- "tests/unit/pipelex/providers/manifold/test_manifold_metadata.py::TestManifoldMetadata::test_the_value_is_printable_ascii_whatever_went_in[lf]": 0.0005,- "tests/unit/pipelex/providers/manifold/test_manifold_metadata.py::TestManifoldMetadata::test_the_value_is_printable_ascii_whatever_went_in[non-ascii]": 0.3701,- "tests/unit/pipelex/providers/manifold/test_manifold_metadata.py::TestManifoldMetadata::test_the_value_is_printable_ascii_whatever_went_in[tab]": 0.0009,- "tests/unit/pipelex/providers/manifold/test_manifold_metadata_scope.py::TestManifoldMetadataScope::test_direct_claude_sends_no_headers_on_the_structured_call": 0.0284,- "tests/unit/pipelex/providers/manifold/test_manifold_metadata_scope.py::TestManifoldMetadataScope::test_direct_claude_sends_no_headers_on_the_text_call[anthropic]": 0.0171,- "tests/unit/pipelex/providers/manifold/test_manifold_metadata_scope.py::TestManifoldMetadataScope::test_direct_claude_sends_no_headers_on_the_text_call[bedrock]": 0.0186,- "tests/unit/pipelex/providers/manifold/test_manifold_metadata_scope.py::TestManifoldMetadataScope::test_direct_claude_sends_no_headers_on_the_text_call[pipelex_gateway]": 0.0137,- "tests/unit/pipelex/providers/manifold/test_manifold_metadata_scope.py::TestManifoldMetadataScope::test_other_backends_extras_carry_no_metadata_header[gateway]": 0.0014,- "tests/unit/pipelex/providers/manifold/test_manifold_metadata_scope.py::TestManifoldMetadataScope::test_other_backends_extras_carry_no_metadata_header[openai-completions]": 0.0757,- "tests/unit/pipelex/providers/manifold/test_manifold_metadata_scope.py::TestManifoldMetadataScope::test_other_backends_extras_carry_no_metadata_header[openai-responses]": 0.0018,- "tests/unit/pipelex/providers/manifold/test_manifold_metadata_scope.py::TestManifoldMetadataScope::test_other_backends_extras_carry_no_metadata_header[portkey]": 0.0024,- "tests/unit/pipelex/providers/manifold/test_manifold_metadata_sdk_paths.py::TestManifoldMetadataSdkPaths::test_a_catalog_header_of_the_same_name_does_not_override_the_job": 0.0019,- "tests/unit/pipelex/providers/manifold/test_manifold_metadata_sdk_paths.py::TestManifoldMetadataSdkPaths::test_claude_behind_manifold_sends_the_header_on_the_structured_call": 0.0099,- "tests/unit/pipelex/providers/manifold/test_manifold_metadata_sdk_paths.py::TestManifoldMetadataSdkPaths::test_claude_behind_manifold_sends_the_header_on_the_text_call": 0.0067,- "tests/unit/pipelex/providers/manifold/test_manifold_metadata_sdk_paths.py::TestManifoldMetadataSdkPaths::test_the_completions_worker_sends_the_header_on_the_sdk_call": 0.0019,- "tests/unit/pipelex/providers/manifold/test_manifold_metadata_sdk_paths.py::TestManifoldMetadataSdkPaths::test_the_extract_route_sends_the_header_on_the_wire": 0.0096,- "tests/unit/pipelex/providers/manifold/test_manifold_metadata_sdk_paths.py::TestManifoldMetadataSdkPaths::test_the_image_worker_sends_the_header_on_both_images_routes[edit]": 0.0017,- "tests/unit/pipelex/providers/manifold/test_manifold_metadata_sdk_paths.py::TestManifoldMetadataSdkPaths::test_the_image_worker_sends_the_header_on_both_images_routes[generate]": 0.0037,- "tests/unit/pipelex/providers/manifold/test_manifold_metadata_sdk_paths.py::TestManifoldMetadataSdkPaths::test_the_openai_substrate_extras_carry_the_header[completions]": 0.0774,- "tests/unit/pipelex/providers/manifold/test_manifold_metadata_sdk_paths.py::TestManifoldMetadataSdkPaths::test_the_openai_substrate_extras_carry_the_header[responses]": 0.0014,- "tests/unit/pipelex/providers/manifold/test_manifold_metadata_sdk_paths.py::TestManifoldMetadataSdkPaths::test_the_search_route_sends_the_header_on_the_wire": 0.0059,- "tests/unit/pipelex/providers/manifold/test_manifold_native_client.py::TestManifoldNativeClientFailures::test_a_2xx_carrying_a_json_scalar_is_refused_with_what_it_was": 0.0057,- "tests/unit/pipelex/providers/manifold/test_manifold_native_client.py::TestManifoldNativeClientFailures::test_a_non_json_2xx_becomes_a_pipelex_error_naming_the_model": 0.0068,- "tests/unit/pipelex/providers/manifold/test_manifold_native_client.py::TestManifoldNativeClientFailures::test_a_status_error_is_classified_rather_than_raised_raw": 0.0951,- "tests/unit/pipelex/providers/manifold/test_manifold_native_client.py::TestManifoldNativeClientRequest::test_a_json_object_body_comes_back_as_a_dict": 0.0069,- "tests/unit/pipelex/providers/manifold/test_manifold_native_client.py::TestManifoldNativeClientRequest::test_the_wire_carries_one_token_header_and_a_body_with_no_routing": 0.428,- "tests/unit/pipelex/providers/manifold/test_manifold_plugin_registrations.py::TestManifoldPluginRegistrations::test_no_anthropic_sdk_is_claimed_under_a_manifold_name": 0.0016,- "tests/unit/pipelex/providers/manifold/test_manifold_plugin_registrations.py::TestManifoldPluginRegistrations::test_the_plugin_claims_exactly_the_manifold_sdk_set": 0.5408,- "tests/unit/pipelex/providers/manifold/test_manifold_plugin_registrations.py::TestManifoldPluginRegistrations::test_the_plugin_is_a_kernel_builtin": 0.0412,- "tests/unit/pipelex/providers/manifold/test_manifold_search_worker.py::TestManifoldSearchRequestBody::test_a_structured_search_sends_the_caller_s_schema": 0.0048,- "tests/unit/pipelex/providers/manifold/test_manifold_search_worker.py::TestManifoldSearchRequestBody::test_the_body_names_the_model_and_carries_no_depth": 0.6623,- "tests/unit/pipelex/providers/manifold/test_manifold_search_worker.py::TestManifoldSearchRequestBody::test_unset_optional_parameters_are_omitted_rather_than_sent_as_null": 0.0034,- "tests/unit/pipelex/providers/manifold/test_manifold_search_worker.py::TestManifoldSearchResponse::test_a_response_with_no_answer_is_refused_rather_than_returned_empty": 0.0014,- "tests/unit/pipelex/providers/manifold/test_manifold_search_worker.py::TestManifoldSearchResponse::test_a_sourced_answer_becomes_the_runtime_s_own_content": 0.0026,- "tests/unit/pipelex/providers/manifold/test_manifold_search_worker.py::TestManifoldSearchResponse::test_a_structured_search_that_found_nothing_says_so": 0.0019,- "tests/unit/pipelex/providers/manifold/test_manifold_search_worker.py::TestManifoldSearchResponse::test_the_usage_key_does_not_stop_the_envelope_being_recognised": 0.0024,- "tests/unit/pipelex/providers/manifold/test_manifold_search_worker.py::TestManifoldSearchUsageTranslation::test_a_usage_block_the_route_did_not_send_leaves_the_categories_untouched[empty-usage]": 0.0012,- "tests/unit/pipelex/providers/manifold/test_manifold_search_worker.py::TestManifoldSearchUsageTranslation::test_a_usage_block_the_route_did_not_send_leaves_the_categories_untouched[non-numeric-searches]": 0.0789,- "tests/unit/pipelex/providers/manifold/test_manifold_search_worker.py::TestManifoldSearchUsageTranslation::test_a_usage_block_the_route_did_not_send_leaves_the_categories_untouched[null-usage]": 0.0019,- "tests/unit/pipelex/providers/manifold/test_manifold_search_worker.py::TestManifoldSearchUsageTranslation::test_searches_become_megatokens_in_both_categories": 0.0053,+ "tests/unit/pipelex/providers/pipelex_hosted/test_extract_pipelex_hosted_metadata.py::TestTheRequestIdThePipelexHostedPathReports::test_prefers_the_pipelex_spelling_over_the_vendor_one": 1.7865,+ "tests/unit/pipelex/providers/pipelex_hosted/test_extract_pipelex_hosted_metadata.py::TestTheRequestIdThePipelexHostedPathReports::test_prefers_the_providers_own_request_id_over_any_trace_id": 1.8161,+ "tests/unit/pipelex/providers/pipelex_hosted/test_extract_pipelex_hosted_metadata.py::TestTheRequestIdThePipelexHostedPathReports::test_reads_the_pipelex_spelled_trace_id": 1.7887,+ "tests/unit/pipelex/providers/pipelex_hosted/test_extract_pipelex_hosted_metadata.py::TestTheRequestIdThePipelexHostedPathReports::test_reports_no_request_id_when_no_provider_was_reached": 1.7992,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_clients.py::TestPipelexHostedCompletionsClient::test_a_handle_from_another_sdk_set_is_refused": 0.0016,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_clients.py::TestPipelexHostedCompletionsClient::test_the_client_gets_the_origin_plus_v1_and_the_token_in_the_service_header": 3.4526,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_clients.py::TestPipelexHostedImageClient::test_debug_is_read_from_the_backend_and_from_nothing_else": 0.049,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_clients.py::TestPipelexHostedImageClient::test_the_vendor_client_is_built_under_the_same_endpoint_rule": 0.0006,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_clients.py::TestPipelexHostedResponsesClient::test_a_handle_from_another_sdk_set_is_refused": 0.0007,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_clients.py::TestPipelexHostedResponsesClient::test_the_client_gets_the_origin_plus_v1_and_the_token_in_the_service_header": 0.0017,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_completions_messages.py::TestPipelexHostedCompletionsMessages::test_a_document_that_is_not_bytes_is_refused[http-url-document]": 0.0012,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_completions_messages.py::TestPipelexHostedCompletionsMessages::test_a_document_that_is_not_bytes_is_refused[local-path-document]": 0.0097,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_completions_messages.py::TestPipelexHostedCompletionsMessages::test_a_document_travels_as_an_image_url_data_url": 0.006,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_completions_messages.py::TestPipelexHostedCompletionsMessages::test_images_become_image_url_parts_at_the_requested_detail[None-auto]": 0.0012,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_completions_messages.py::TestPipelexHostedCompletionsMessages::test_images_become_image_url_parts_at_the_requested_detail[high-high]": 0.0021,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_completions_messages.py::TestPipelexHostedCompletionsMessages::test_images_become_image_url_parts_at_the_requested_detail[low-low]": 0.0011,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_completions_messages.py::TestPipelexHostedCompletionsMessages::test_system_and_user_text": 0.4923,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_endpoint_rule.py::TestPipelexHostedEndpointRule::test_a_trailing_slash_or_surrounding_space_is_forgiven[ https://pipelex_hosted.example.com ]": 0.0003,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_endpoint_rule.py::TestPipelexHostedEndpointRule::test_a_trailing_slash_or_surrounding_space_is_forgiven[https://pipelex_hosted.example.com///]": 0.0015,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_endpoint_rule.py::TestPipelexHostedEndpointRule::test_a_trailing_slash_or_surrounding_space_is_forgiven[https://pipelex_hosted.example.com/]": 0.0034,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_endpoint_rule.py::TestPipelexHostedEndpointRule::test_an_absent_api_key_is_refused_by_name": 0.0003,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_endpoint_rule.py::TestPipelexHostedEndpointRule::test_an_absent_endpoint_is_refused_and_never_defaulted[blank]": 0.0004,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_endpoint_rule.py::TestPipelexHostedEndpointRule::test_an_absent_endpoint_is_refused_and_never_defaulted[empty]": 0.0004,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_endpoint_rule.py::TestPipelexHostedEndpointRule::test_an_absent_endpoint_is_refused_and_never_defaulted[slash-only]": 0.0003,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_endpoint_rule.py::TestPipelexHostedEndpointRule::test_an_absent_endpoint_is_refused_and_never_defaulted[unset]": 0.0004,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_endpoint_rule.py::TestPipelexHostedEndpointRule::test_origin_is_returned_as_declared": 0.55,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_endpoint_rule.py::TestPipelexHostedEndpointRule::test_the_only_header_about_us_is_the_service_token": 0.0871,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_endpoint_rule.py::TestPipelexHostedEndpointRule::test_the_version_segment_is_appended_by_the_factory_not_the_operator": 0.0002,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_extract_worker.py::TestPipelexHostedExtractRequestBody::test_a_non_web_page_model_is_handed_the_bytes_inline": 0.5713,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_extract_worker.py::TestPipelexHostedExtractRequestBody::test_a_web_page_model_is_handed_the_url_itself": 0.0687,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_extract_worker.py::TestPipelexHostedExtractRequestBody::test_a_web_page_model_with_no_document_uri_is_refused_by_name": 0.0059,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_extract_worker.py::TestPipelexHostedExtractRequestBody::test_an_unset_optional_parameter_is_omitted_rather_than_sent_as_null": 0.0053,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_extract_worker.py::TestPipelexHostedExtractRequestBody::test_no_input_at_all_is_refused": 0.0087,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_extract_worker.py::TestPipelexHostedExtractRequestBody::test_the_withdrawn_parameters_are_absent_rather_than_sent_at_their_defaults": 0.5887,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_extract_worker.py::TestPipelexHostedExtractUsageTranslation::test_a_usage_block_the_route_did_not_send_leaves_the_abstract_fallback_in_charge[empty-usage]": 0.0064,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_extract_worker.py::TestPipelexHostedExtractUsageTranslation::test_a_usage_block_the_route_did_not_send_leaves_the_abstract_fallback_in_charge[no-usage]": 0.0029,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_extract_worker.py::TestPipelexHostedExtractUsageTranslation::test_a_usage_block_the_route_did_not_send_leaves_the_abstract_fallback_in_charge[non-numeric-pages]": 0.1053,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_extract_worker.py::TestPipelexHostedExtractUsageTranslation::test_a_usage_block_the_route_did_not_send_leaves_the_abstract_fallback_in_charge[null-usage]": 0.003,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_extract_worker.py::TestPipelexHostedExtractUsageTranslation::test_pages_become_megatokens_in_both_categories": 0.0136,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_img_gen_worker.py::TestPipelexHostedImgGenWorkerFailures::test_a_malformed_success_body_is_wrapped_rather_than_escaping[image-without-data]": 0.0057,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_img_gen_worker.py::TestPipelexHostedImgGenWorkerFailures::test_a_malformed_success_body_is_wrapped_rather_than_escaping[no-images]": 3.4369,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_img_gen_worker.py::TestPipelexHostedImgGenWorkerFailures::test_a_malformed_success_body_is_wrapped_rather_than_escaping[no-size-at-all]": 0.0394,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_img_gen_worker.py::TestPipelexHostedImgGenWorkerFailures::test_a_malformed_success_body_is_wrapped_rather_than_escaping[non-numeric-size]": 0.0033,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_img_gen_worker.py::TestPipelexHostedImgGenWorkerFailures::test_a_non_json_2xx_becomes_a_categorized_error": 0.0041,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_img_gen_worker.py::TestPipelexHostedImgGenWorkerFailures::test_a_provider_status_error_is_classified_rather_than_raised_raw": 0.0886,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_img_gen_worker.py::TestPipelexHostedImgGenWorkerSuccess::test_an_azure_gpt_image_body_becomes_generated_images": 0.5982,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_img_gen_worker.py::TestPipelexHostedImgGenWorkerSuccess::test_input_images_route_to_the_edits_endpoint": 0.0061,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_img_gen_worker.py::TestPipelexHostedImgGenWorkerSuccess::test_several_input_images_travel_as_a_list_not_as_repeated_bare_parts": 0.0026,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_metadata.py::TestPipelexHostedMetadata::test_a_job_with_extras_yields_the_exact_wire_value": 0.0009,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_metadata.py::TestPipelexHostedMetadata::test_a_none_id_is_omitted_and_a_colliding_extras_key_does_not_stand_in_for_it": 0.0003,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_metadata.py::TestPipelexHostedMetadata::test_empty_extras_yield_the_runtime_ids_alone": 0.0006,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_metadata.py::TestPipelexHostedMetadata::test_every_runtime_key_is_a_legal_extras_key_so_a_collision_is_possible": 0.0003,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_metadata.py::TestPipelexHostedMetadata::test_the_encoding_is_compact_json": 0.001,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_metadata.py::TestPipelexHostedMetadata::test_the_header_is_named_by_the_dialect_and_never_by_the_vendor": 0.0725,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_metadata.py::TestPipelexHostedMetadata::test_the_runtime_ids_win_over_colliding_extras_keys": 0.0007,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_metadata.py::TestPipelexHostedMetadata::test_the_value_is_printable_ascii_whatever_went_in[crlf]": 0.0007,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_metadata.py::TestPipelexHostedMetadata::test_the_value_is_printable_ascii_whatever_went_in[del]": 0.0004,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_metadata.py::TestPipelexHostedMetadata::test_the_value_is_printable_ascii_whatever_went_in[lf]": 0.0005,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_metadata.py::TestPipelexHostedMetadata::test_the_value_is_printable_ascii_whatever_went_in[non-ascii]": 0.3701,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_metadata.py::TestPipelexHostedMetadata::test_the_value_is_printable_ascii_whatever_went_in[tab]": 0.0009,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_metadata_scope.py::TestPipelexHostedMetadataScope::test_direct_claude_sends_no_headers_on_the_structured_call": 0.0284,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_metadata_scope.py::TestPipelexHostedMetadataScope::test_direct_claude_sends_no_headers_on_the_text_call[anthropic]": 0.0171,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_metadata_scope.py::TestPipelexHostedMetadataScope::test_direct_claude_sends_no_headers_on_the_text_call[bedrock]": 0.0186,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_metadata_scope.py::TestPipelexHostedMetadataScope::test_direct_claude_sends_no_headers_on_the_text_call[pipelex_gateway]": 0.0137,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_metadata_scope.py::TestPipelexHostedMetadataScope::test_other_backends_extras_carry_no_metadata_header[gateway]": 0.0014,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_metadata_scope.py::TestPipelexHostedMetadataScope::test_other_backends_extras_carry_no_metadata_header[openai-completions]": 0.0757,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_metadata_scope.py::TestPipelexHostedMetadataScope::test_other_backends_extras_carry_no_metadata_header[openai-responses]": 0.0018,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_metadata_scope.py::TestPipelexHostedMetadataScope::test_other_backends_extras_carry_no_metadata_header[portkey]": 0.0024,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_metadata_sdk_paths.py::TestPipelexHostedMetadataSdkPaths::test_a_catalog_header_of_the_same_name_does_not_override_the_job": 0.0019,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_metadata_sdk_paths.py::TestPipelexHostedMetadataSdkPaths::test_claude_behind_pipelex_hosted_sends_the_header_on_the_structured_call": 0.0099,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_metadata_sdk_paths.py::TestPipelexHostedMetadataSdkPaths::test_claude_behind_pipelex_hosted_sends_the_header_on_the_text_call": 0.0067,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_metadata_sdk_paths.py::TestPipelexHostedMetadataSdkPaths::test_the_completions_worker_sends_the_header_on_the_sdk_call": 0.0019,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_metadata_sdk_paths.py::TestPipelexHostedMetadataSdkPaths::test_the_extract_route_sends_the_header_on_the_wire": 0.0096,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_metadata_sdk_paths.py::TestPipelexHostedMetadataSdkPaths::test_the_image_worker_sends_the_header_on_both_images_routes[edit]": 0.0017,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_metadata_sdk_paths.py::TestPipelexHostedMetadataSdkPaths::test_the_image_worker_sends_the_header_on_both_images_routes[generate]": 0.0037,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_metadata_sdk_paths.py::TestPipelexHostedMetadataSdkPaths::test_the_openai_substrate_extras_carry_the_header[completions]": 0.0774,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_metadata_sdk_paths.py::TestPipelexHostedMetadataSdkPaths::test_the_openai_substrate_extras_carry_the_header[responses]": 0.0014,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_metadata_sdk_paths.py::TestPipelexHostedMetadataSdkPaths::test_the_search_route_sends_the_header_on_the_wire": 0.0059,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_native_client.py::TestPipelexHostedNativeClientFailures::test_a_2xx_carrying_a_json_scalar_is_refused_with_what_it_was": 0.0057,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_native_client.py::TestPipelexHostedNativeClientFailures::test_a_non_json_2xx_becomes_a_pipelex_error_naming_the_model": 0.0068,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_native_client.py::TestPipelexHostedNativeClientFailures::test_a_status_error_is_classified_rather_than_raised_raw": 0.0951,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_native_client.py::TestPipelexHostedNativeClientRequest::test_a_json_object_body_comes_back_as_a_dict": 0.0069,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_native_client.py::TestPipelexHostedNativeClientRequest::test_the_wire_carries_one_token_header_and_a_body_with_no_routing": 0.428,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_plugin_registrations.py::TestPipelexHostedPluginRegistrations::test_no_anthropic_sdk_is_claimed_under_a_pipelex_hosted_name": 0.0016,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_plugin_registrations.py::TestPipelexHostedPluginRegistrations::test_the_plugin_claims_exactly_the_pipelex_hosted_sdk_set": 0.5408,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_plugin_registrations.py::TestPipelexHostedPluginRegistrations::test_the_plugin_is_a_kernel_builtin": 0.0412,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_search_worker.py::TestPipelexHostedSearchRequestBody::test_a_structured_search_sends_the_caller_s_schema": 0.0048,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_search_worker.py::TestPipelexHostedSearchRequestBody::test_the_body_names_the_model_and_carries_no_depth": 0.6623,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_search_worker.py::TestPipelexHostedSearchRequestBody::test_unset_optional_parameters_are_omitted_rather_than_sent_as_null": 0.0034,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_search_worker.py::TestPipelexHostedSearchResponse::test_a_response_with_no_answer_is_refused_rather_than_returned_empty": 0.0014,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_search_worker.py::TestPipelexHostedSearchResponse::test_a_sourced_answer_becomes_the_runtime_s_own_content": 0.0026,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_search_worker.py::TestPipelexHostedSearchResponse::test_a_structured_search_that_found_nothing_says_so": 0.0019,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_search_worker.py::TestPipelexHostedSearchResponse::test_the_usage_key_does_not_stop_the_envelope_being_recognised": 0.0024,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_search_worker.py::TestPipelexHostedSearchUsageTranslation::test_a_usage_block_the_route_did_not_send_leaves_the_categories_untouched[empty-usage]": 0.0012,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_search_worker.py::TestPipelexHostedSearchUsageTranslation::test_a_usage_block_the_route_did_not_send_leaves_the_categories_untouched[non-numeric-searches]": 0.0789,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_search_worker.py::TestPipelexHostedSearchUsageTranslation::test_a_usage_block_the_route_did_not_send_leaves_the_categories_untouched[null-usage]": 0.0019,+ "tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_search_worker.py::TestPipelexHostedSearchUsageTranslation::test_searches_become_megatokens_in_both_categories": 0.0053,"tests/unit/pipelex/providers/mistral/test_extract_mistral_metadata.py::TestExtractMistralMetadata::test_authentication_error_carries_status_code_401": 0.0003,"tests/unit/pipelex/providers/mistral/test_extract_mistral_metadata.py::TestExtractMistralMetadata::test_body_without_type_or_code_yields_none_provider_error_code": 0.0004,"tests/unit/pipelex/providers/mistral/test_extract_mistral_metadata.py::TestExtractMistralMetadata::test_extracts_provider_error_code_from_body_top_level": 0.0004,diff --git a/CHANGELOG.md b/CHANGELOG.mdindex e16d3a483..c1f48c8ef 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -9,6 +9,8 @@### Changed+- **The hosted backend's names no longer carry a codename (Breaking)**: the Pipelex-run inference backend is now `pipelex_hosted`, displayed as "Pipelex", where it was `pipelex_manifold`, displayed as "Pipelex Manifold". Its routing profile becomes `all_pipelex_hosted`, the environment variables its messages name become `PIPELEX_HOSTED_ENDPOINT` and `PIPELEX_HOSTED_API_KEY`, the `sdk` values its model specs name become `pipelex_hosted_anthropic`, `pipelex_hosted_completions`, `pipelex_hosted_responses`, `pipelex_hosted_img_gen`, `pipelex_hosted_extract` and `pipelex_hosted_search`, its provider package moves to `pipelex.providers.pipelex_hosted`, and its plugin is named `pipelex_hosted` rather than `manifold`, so a `runtime.plugins.disabled` list naming `manifold` no longer disables it. Its error classes are renamed from `Manifold*` to `PipelexHosted*`, such as `PipelexHostedError` and `PipelexHostedCredentialsError`, with their reference pages, while each keeps the `type` and `title` of its generic family, and its messages now speak of "the Pipelex service". A deployment that declares the backend renames its `backends.toml` table, its file under `inference/backends/`, its routing profile, its environment variables and its model specs' `sdk` values to match.+- **Migration:** `inference-backend@4` reports every backend file under `inference/backends/` that still names one of the hosted backend's former `manifold_*` SDK handles, which keep loading but fail every call because no plugin registers them. It rewrites nothing, since `sdk` is an open value: replace each with its `pipelex_hosted_*` counterpart, and rename the file, the `backends.toml` table and the routing profile by hand. Run `pipelex migrate` to find them.- **The completions image worker's fixed output format comes from its registration**: `OpenAICompletionsImgGenWorker` takes `fixed_output_format`, the one image format a service answers in, rather than inferring it from the backend's name; a request for another format is refused before the call, and a URL answer from a worker built without one is refused as unreadable.- **The Inference SPI table lists every symbol a provider plugin builds on**: `docs/under-the-hood/inference-backend-plugins.md` now publishes, one module per row, the worker contracts with their jobs and outputs, the OpenAI- and Anthropic-protocol factories and workers, the image-generation and prompt-preparation helpers, the error pipeline and the runtime accessors, and `parse_retry_after_seconds` and `error_code_from_body_code_first` become public in `pipelex.cogt.inference.error_classification` for a plugin that distils a plain-HTTP failure itself.- **The Anthropic worker no longer adds a backend's headers by backend name (Breaking)**: a worker built without an `extras_factory` sends nothing extra, whatever its backend, so a backend that relied on the worker adding its request headers must register its own sdk token with an extras factory and name that token in the `sdk` of its model specs, local overrides included; a model left on `anthropic` keeps answering, without those headers.@@ -17,7 +19,7 @@### Fixed-- **A Manifold failure on the extract and search routes reports the service's own message**: `extract_manifold_metadata` takes the message from the response body's `error.message`, or else its top-level `message`, so a refused key now reads `Portkey Error: Invalid API Key. Error Code: 03` rather than httpx's `Client error '401 Unauthorized' for url …`; a body carrying neither, a body that is not JSON and a network failure keep the exception's own text. Because the quota check reads that message, a 429 on those routes whose body names a quota, such as `Monthly quota exceeded`, now classifies as quota exhaustion, to be fixed in billing, rather than as a transient rate limit to retry.+- **A hosted-backend failure on the extract and search routes reports the service's own message**: `extract_pipelex_hosted_metadata` takes the message from the response body's `error.message`, or else its top-level `message`, so a refused key now reads `Portkey Error: Invalid API Key. Error Code: 03` rather than httpx's `Client error '401 Unauthorized' for url …`; a body carrying neither, a body that is not JSON and a network failure keep the exception's own text. Because the quota check reads that message, a 429 on those routes whose body names a quota, such as `Monthly quota exceeded`, now classifies as quota exhaustion, to be fixed in billing, rather than as a transient rate limit to retry.- **A kernel-only boot over a stale configuration file stays kernel-only (Breaking)**: the boot-tolerance replay no longer loads interpreter modules into a `RuntimeBoot` process, because the fix-op applier, the file transaction and their errors moved from `pipelex.pipeline` to the new kernel-layer `pipelex.fix_ops` package; import `FixWriteConflictError` and `FixTransactionError` from `pipelex.fix_ops.exceptions`, and the applier and transaction from `pipelex.fix_ops.applier` and `pipelex.fix_ops.file_transaction`.### Removeddiff --git a/docs/errors/inference-and-providers.md b/docs/errors/inference-and-providers.mdindex d265d98a8..f5a17c10d 100644--- a/docs/errors/inference-and-providers.md+++ b/docs/errors/inference-and-providers.md@@ -100,18 +100,18 @@ own page. Classes are grouped by subsystem.- [`LinkupError`](linkup-error.md) — Linkup- [`LinkupSearchEmptyResultError`](linkup-search-empty-result-error.md) — Linkup search empty result- [`LinkupSearchResponseError`](linkup-search-response-error.md) — Linkup search response-- [`ManifoldCredentialsError`](manifold-credentials-error.md) — Inference backend credentials missing-- [`ManifoldEndpointError`](manifold-endpoint-error.md) — Inference backend endpoint missing-- [`ManifoldError`](manifold-error.md) — Inference backend error-- [`ManifoldExtractResponseError`](manifold-extract-response-error.md) — Extract response unreadable-- [`ManifoldFactoryError`](manifold-factory-error.md) — Inference client setup error-- [`ManifoldSearchEmptyResultError`](manifold-search-empty-result-error.md) — Search returned no result-- [`ManifoldSearchResponseError`](manifold-search-response-error.md) — Search response unreadable- [`MistralExtractResponseError`](mistral-extract-response-error.md) — Mistral extract response- [`MistralModelListingError`](mistral-model-listing-error.md) — Mistral model listing- [`MistralPluginError`](mistral-plugin-error.md) — Mistral plugin- [`MistralWorkerConfigurationError`](mistral-worker-configuration-error.md) — Mistral worker configuration- [`OpenAIClientFactoryError`](open-ai-client-factory-error.md) — OpenAI client factory error+- [`PipelexHostedCredentialsError`](pipelex-hosted-credentials-error.md) — Inference backend credentials missing+- [`PipelexHostedEndpointError`](pipelex-hosted-endpoint-error.md) — Inference backend endpoint missing+- [`PipelexHostedError`](pipelex-hosted-error.md) — Inference backend error+- [`PipelexHostedExtractResponseError`](pipelex-hosted-extract-response-error.md) — Extract response unreadable+- [`PipelexHostedFactoryError`](pipelex-hosted-factory-error.md) — Inference client setup error+- [`PipelexHostedSearchEmptyResultError`](pipelex-hosted-search-empty-result-error.md) — Search returned no result+- [`PipelexHostedSearchResponseError`](pipelex-hosted-search-response-error.md) — Search response unreadable- [`PortkeyCredentialsError`](portkey-credentials-error.md) — Portkey credentials- [`PortkeyError`](portkey-error.md) — Portkey- [`PortkeyFactoryError`](portkey-factory-error.md) — Portkey factorydiff --git a/docs/errors/manifold-credentials-error.md b/docs/errors/pipelex-hosted-credentials-error.mdsimilarity index 57%rename from docs/errors/manifold-credentials-error.mdrename to docs/errors/pipelex-hosted-credentials-error.mdindex a821a5075..389e31a67 100644--- a/docs/errors/manifold-credentials-error.md+++ b/docs/errors/pipelex-hosted-credentials-error.md@@ -1,6 +1,6 @@---title: "Inference backend credentials missing"-description: "Reference for the `ManifoldCredentialsError` Pipelex error class."+description: "Reference for the `PipelexHostedCredentialsError` Pipelex error class."---<!-- pipelex:generated -->@@ -9,11 +9,11 @@ description: "Reference for the `ManifoldCredentialsError` Pipelex error class."| Field | Value ||---|---|-| `error_type` | `ManifoldCredentialsError` |+| `error_type` | `PipelexHostedCredentialsError` || `title` | Inference backend credentials missing || `type_uri` | `https://docs.pipelex.com/latest/errors/inference-backend-credentials-error/` || `error_domain` | _(inherited from parent)_ |-| Defined in | `pipelex.providers.manifold.manifold_exceptions` |-| Parent class | [`ManifoldError`](manifold-error.md) |+| Defined in | `pipelex.providers.pipelex_hosted.pipelex_hosted_exceptions` |+| Parent class | [`PipelexHostedError`](pipelex-hosted-error.md) |[Back to Error Reference](index.md)diff --git a/docs/errors/manifold-endpoint-error.md b/docs/errors/pipelex-hosted-endpoint-error.mdsimilarity index 52%rename from docs/errors/manifold-endpoint-error.mdrename to docs/errors/pipelex-hosted-endpoint-error.mdindex 567ec2ddd..dd1b924ce 100644--- a/docs/errors/manifold-endpoint-error.md+++ b/docs/errors/pipelex-hosted-endpoint-error.md@@ -1,21 +1,21 @@---title: "Inference backend endpoint missing"-description: "Reference for the `ManifoldEndpointError` Pipelex error class."+description: "Reference for the `PipelexHostedEndpointError` Pipelex error class."---<!-- pipelex:generated --># Inference backend endpoint missing-The backend declares no usable endpoint for the Pipelex Manifold service.+The backend declares no usable endpoint for the Pipelex service.| Field | Value ||---|---|-| `error_type` | `ManifoldEndpointError` |+| `error_type` | `PipelexHostedEndpointError` || `title` | Inference backend endpoint missing || `type_uri` | `https://docs.pipelex.com/latest/errors/inference-backend-credentials-error/` || `error_domain` | _(inherited from parent)_ |-| Defined in | `pipelex.providers.manifold.manifold_exceptions` |-| Parent class | [`ManifoldError`](manifold-error.md) |+| Defined in | `pipelex.providers.pipelex_hosted.pipelex_hosted_exceptions` |+| Parent class | [`PipelexHostedError`](pipelex-hosted-error.md) |[Back to Error Reference](index.md)diff --git a/docs/errors/manifold-error.md b/docs/errors/pipelex-hosted-error.mdsimilarity index 65%rename from docs/errors/manifold-error.mdrename to docs/errors/pipelex-hosted-error.mdindex 0227557f3..5592032ea 100644--- a/docs/errors/manifold-error.md+++ b/docs/errors/pipelex-hosted-error.md@@ -1,6 +1,6 @@---title: "Inference backend error"-description: "Reference for the `ManifoldError` Pipelex error class."+description: "Reference for the `PipelexHostedError` Pipelex error class."---<!-- pipelex:generated -->@@ -9,11 +9,11 @@ description: "Reference for the `ManifoldError` Pipelex error class."| Field | Value ||---|---|-| `error_type` | `ManifoldError` |+| `error_type` | `PipelexHostedError` || `title` | Inference backend error || `type_uri` | `https://docs.pipelex.com/latest/errors/cogt-error/` || `error_domain` | _(inherited from parent)_ |-| Defined in | `pipelex.providers.manifold.manifold_exceptions` |+| Defined in | `pipelex.providers.pipelex_hosted.pipelex_hosted_exceptions` || Parent class | [`CogtError`](cogt-error.md) |[Back to Error Reference](index.md)diff --git a/docs/errors/manifold-extract-response-error.md b/docs/errors/pipelex-hosted-extract-response-error.mdsimilarity index 54%rename from docs/errors/manifold-extract-response-error.mdrename to docs/errors/pipelex-hosted-extract-response-error.mdindex d40c3a8fa..8f10e890d 100644--- a/docs/errors/manifold-extract-response-error.md+++ b/docs/errors/pipelex-hosted-extract-response-error.md@@ -1,6 +1,6 @@---title: "Extract response unreadable"-description: "Reference for the `ManifoldExtractResponseError` Pipelex error class."+description: "Reference for the `PipelexHostedExtractResponseError` Pipelex error class."---<!-- pipelex:generated -->@@ -9,11 +9,11 @@ description: "Reference for the `ManifoldExtractResponseError` Pipelex error cla| Field | Value ||---|---|-| `error_type` | `ManifoldExtractResponseError` |+| `error_type` | `PipelexHostedExtractResponseError` || `title` | Extract response unreadable || `type_uri` | `https://docs.pipelex.com/latest/errors/extract-job-failure-error/` || `error_domain` | _(inherited from parent)_ |-| Defined in | `pipelex.providers.manifold.manifold_exceptions` |-| Parent class | [`ManifoldError`](manifold-error.md) |+| Defined in | `pipelex.providers.pipelex_hosted.pipelex_hosted_exceptions` |+| Parent class | [`PipelexHostedError`](pipelex-hosted-error.md) |[Back to Error Reference](index.md)diff --git a/docs/errors/manifold-factory-error.md b/docs/errors/pipelex-hosted-factory-error.mdsimilarity index 54%rename from docs/errors/manifold-factory-error.mdrename to docs/errors/pipelex-hosted-factory-error.mdindex 75f462495..bfb3defbc 100644--- a/docs/errors/manifold-factory-error.md+++ b/docs/errors/pipelex-hosted-factory-error.md@@ -1,6 +1,6 @@---title: "Inference client setup error"-description: "Reference for the `ManifoldFactoryError` Pipelex error class."+description: "Reference for the `PipelexHostedFactoryError` Pipelex error class."---<!-- pipelex:generated -->@@ -9,11 +9,11 @@ description: "Reference for the `ManifoldFactoryError` Pipelex error class."| Field | Value ||---|---|-| `error_type` | `ManifoldFactoryError` |+| `error_type` | `PipelexHostedFactoryError` || `title` | Inference client setup error || `type_uri` | `https://docs.pipelex.com/latest/errors/cogt-error/` || `error_domain` | _(inherited from parent)_ |-| Defined in | `pipelex.providers.manifold.manifold_exceptions` |-| Parent class | [`ManifoldError`](manifold-error.md) |+| Defined in | `pipelex.providers.pipelex_hosted.pipelex_hosted_exceptions` |+| Parent class | [`PipelexHostedError`](pipelex-hosted-error.md) |[Back to Error Reference](index.md)diff --git a/docs/errors/manifold-search-empty-result-error.md b/docs/errors/pipelex-hosted-search-empty-result-error.mdsimilarity index 53%rename from docs/errors/manifold-search-empty-result-error.mdrename to docs/errors/pipelex-hosted-search-empty-result-error.mdindex 54e18a454..7def95856 100644--- a/docs/errors/manifold-search-empty-result-error.md+++ b/docs/errors/pipelex-hosted-search-empty-result-error.md@@ -1,6 +1,6 @@---title: "Search returned no result"-description: "Reference for the `ManifoldSearchEmptyResultError` Pipelex error class."+description: "Reference for the `PipelexHostedSearchEmptyResultError` Pipelex error class."---<!-- pipelex:generated -->@@ -9,11 +9,11 @@ description: "Reference for the `ManifoldSearchEmptyResultError` Pipelex error c| Field | Value ||---|---|-| `error_type` | `ManifoldSearchEmptyResultError` |+| `error_type` | `PipelexHostedSearchEmptyResultError` || `title` | Search returned no result || `type_uri` | `https://docs.pipelex.com/latest/errors/search-job-failure-error/` || `error_domain` | _(inherited from parent)_ |-| Defined in | `pipelex.providers.manifold.manifold_exceptions` |-| Parent class | [`ManifoldError`](manifold-error.md) |+| Defined in | `pipelex.providers.pipelex_hosted.pipelex_hosted_exceptions` |+| Parent class | [`PipelexHostedError`](pipelex-hosted-error.md) |[Back to Error Reference](index.md)diff --git a/docs/errors/manifold-search-response-error.md b/docs/errors/pipelex-hosted-search-response-error.mdsimilarity index 54%rename from docs/errors/manifold-search-response-error.mdrename to docs/errors/pipelex-hosted-search-response-error.mdindex 9e8508257..4a88a1b61 100644--- a/docs/errors/manifold-search-response-error.md+++ b/docs/errors/pipelex-hosted-search-response-error.md@@ -1,6 +1,6 @@---title: "Search response unreadable"-description: "Reference for the `ManifoldSearchResponseError` Pipelex error class."+description: "Reference for the `PipelexHostedSearchResponseError` Pipelex error class."---<!-- pipelex:generated -->@@ -9,11 +9,11 @@ description: "Reference for the `ManifoldSearchResponseError` Pipelex error clas| Field | Value ||---|---|-| `error_type` | `ManifoldSearchResponseError` |+| `error_type` | `PipelexHostedSearchResponseError` || `title` | Search response unreadable || `type_uri` | `https://docs.pipelex.com/latest/errors/search-job-failure-error/` || `error_domain` | _(inherited from parent)_ |-| Defined in | `pipelex.providers.manifold.manifold_exceptions` |-| Parent class | [`ManifoldError`](manifold-error.md) |+| Defined in | `pipelex.providers.pipelex_hosted.pipelex_hosted_exceptions` |+| Parent class | [`PipelexHostedError`](pipelex-hosted-error.md) |[Back to Error Reference](index.md)diff --git a/docs/setup/telemetry.md b/docs/setup/telemetry.mdindex 6c296a963..7abd3f8a1 100644--- a/docs/setup/telemetry.md+++ b/docs/setup/telemetry.md@@ -131,7 +131,7 @@ Anything that names no caller of its own keeps reporting under the `user_id` youThe extras do not depend on that. A run that leaves `user_id` at its default still carries its `extras` onto every capture, under your configured id — knowing which entities a run belongs to and naming its caller are two separate decisions, and you may take one without the other.-The extras also travel with the run's inference calls when they go through Pipelex Manifold. Every request the Manifold backend makes carries one `x-pipelex-metadata` header: a flat JSON object holding the run's extras as they are, plus the run's `user_id` and `pipeline_run_id` and the step's `pipe_run_id`, `pipe_code` and `content_generation_job_id` when it has them, so the service can attribute and log each call. If an extras key has the same name as one of those ids, the run's own value is the one sent, since the extras are yours to set and must not be able to restate whose run it is. No other backend receives this header: a provider you reach directly with your own key gets none of your labels.+The extras also travel with the run's inference calls when they go through Pipelex. Every request the hosted backend makes carries one `x-pipelex-metadata` header: a flat JSON object holding the run's extras as they are, plus the run's `user_id` and `pipeline_run_id` and the step's `pipe_run_id`, `pipe_code` and `content_generation_job_id` when it has them, so the service can attribute and log each call. If an extras key has the same name as one of those ids, the run's own value is the one sent, since the extras are yours to set and must not be able to restate whose run it is. No other backend receives this header: a provider you reach directly with your own key gets none of your labels.```textx-pipelex-metadata: {"org_id":"org_acme","user_id":"user_42","pipeline_run_id":"run_abc","pipe_run_id":"0123456789abcdef","pipe_code":"summarize_doc"}diff --git a/docs/under-the-hood/init-cli-flows.md b/docs/under-the-hood/init-cli-flows.mdindex 27375d90a..7860999d9 100644--- a/docs/under-the-hood/init-cli-flows.md+++ b/docs/under-the-hood/init-cli-flows.md@@ -405,7 +405,7 @@ flowchart TD`check_pending_migrations()` is the one check that takes no `config_dir` at all, and that is deliberate. Every other row reports on a *file* and is scoped to the directory the doctor was pointed at, `--global` included. That one reports on a *command* — it is `pipelex migrate`'s own dry run — and `pipelex migrate` has no `--global`: it walks the global `~/.pipelex/` and the project `.pipelex/` both. Scoping the row narrower would name a command that then rewrites a file the row never mentioned. Every file it reports is named with its full path, so the wider scope stays legible.-`check_backend_files()` loads the backend library once per enabled backend, and loads it with `lenient=True`. The row reports on file shape — an unknown key, a spec that is not a table, a missing per-backend file — so a backend whose gateway model specs were not handed to the loader (the probe fetches nothing) or whose credentials do not resolve is skipped rather than reported: those are the Models row's and the Credentials row's findings. Without leniency the shipped defaults, which ship the manifold backend's override file, would be reported as a backend-configuration error, and because the loader stops at the first backend it cannot load, a malformed file listed after the manifold in `backends.toml` would go unreported. Every probe sees that same first failure, so a failure is charged to the backend the error declares (`backend_name`, stamped by the loader on every error about one backend) or, for an error that declares none, to the backend whose file it names — never to a backend whose name merely appears in the message's prose. `check_models()` attributes the same way and for the same reason: its own load is strict and reaches backends the probe skipped leniently, so it can be the first thing to name a broken backend, and it writes into the very reports this row produced.+`check_backend_files()` loads the backend library once per enabled backend, and loads it with `lenient=True`. The row reports on file shape — an unknown key, a spec that is not a table, a missing per-backend file — so a backend whose credentials do not resolve is skipped rather than reported: that is the Credentials row's finding. Without leniency an enabled backend whose key is not set yet would be reported as a backend-configuration error, and because the loader stops at the first backend it cannot load, a malformed file listed after that backend in `backends.toml` would go unreported. Leniency covers credentials and nothing else: a malformed file stays fatal, and so do the refusals of an enabled backend that declares no model or still carries `model_specs_section`. Every probe sees that same first failure, so a failure is charged to the backend the error declares (`backend_name`, stamped by the loader on every error about one backend) or, for an error that declares none, to the backend whose file it names — never to a backend whose name merely appears in the message's prose. `check_models()` attributes the same way and for the same reason: its own load is strict and reaches backends the probe skipped leniently, so it can be the first thing to name a broken backend, and it writes into the very reports this row produced.### Fix Targetingdiff --git a/pipelex/cogt/model_backends/backend.py b/pipelex/cogt/model_backends/backend.pyindex 95cbcc183..7203ea957 100644--- a/pipelex/cogt/model_backends/backend.py+++ b/pipelex/cogt/model_backends/backend.py@@ -12,14 +12,14 @@ from pipelex.tools.typing.pydantic_utils import empty_dict_factory_of, empty_lisclass PipelexBackend(StrEnum):"""Special Pipelex-managed inference backends."""- MANIFOLD = "pipelex_manifold"+ PIPELEX_HOSTED = "pipelex_hosted"INTERNAL = "internal" # Software-only backend, runs locally without AI@propertydef display_name(self) -> str:match self:- case PipelexBackend.MANIFOLD:- return "Pipelex Manifold"+ case PipelexBackend.PIPELEX_HOSTED:+ return "Pipelex"case PipelexBackend.INTERNAL:return "Internal (software-only)"diff --git a/pipelex/migration/goldens/inference-backend/[email protected] b/pipelex/migration/goldens/inference-backend/[email protected]new file mode 100644index 000000000..f46825eb1--- /dev/null+++ b/pipelex/migration/goldens/inference-backend/[email protected]@@ -0,0 +1,291 @@+################################################################################+# Portkey Configuration+################################################################################+#+# This file defines the model specifications for the Portkey backend.+# It contains model definitions for various AI models.+#+# Configuration structure:+# - Each model is defined in its own section with the model name as the header+# - Headers with dots must be quoted (e.g., ["gpt-4.1"])+# - Model costs are in USD per million tokens (input/output)+#+# Documentation: https://docs.pipelex.com+# Support: https://go.pipelex.com/discord+#+################################################################################++################################################################################+# MODEL DEFAULTS+################################################################################++[defaults]+model_type = "llm"+sdk = "portkey_completions"+structure_method = "instructor/openai_tools"+thinking_mode = "none"++################################################################################+# LANGUAGE MODELS+################################################################################++# --- OpenAI LLMs --------------------------------------------------------------+[gpt-4o-mini]+inputs = ["text", "images", "pdf"]+outputs = ["text", "structured"]+costs = { input = 0.15, output = 0.6 }+sdk = "portkey_responses"+structure_method = "instructor/openai_responses_tools"+thinking_mode = "none"+x-portkey-provider = "@openai"++[gpt-4o]+inputs = ["text", "images", "pdf"]+outputs = ["text", "structured"]+costs = { input = 2.5, output = 10.0 }+sdk = "portkey_responses"+structure_method = "instructor/openai_responses_tools"+thinking_mode = "none"+x-portkey-provider = "@openai"++["gpt-4.1-nano"]+inputs = ["text", "images", "pdf"]+outputs = ["text", "structured"]+costs = { input = 0.1, output = 0.4 }+sdk = "portkey_responses"+structure_method = "instructor/openai_responses_tools"+thinking_mode = "none"+x-portkey-provider = "@openai"++["gpt-4.1-mini"]+inputs = ["text", "images", "pdf"]+outputs = ["text", "structured"]+costs = { input = 0.4, output = 1.6 }+sdk = "portkey_responses"+structure_method = "instructor/openai_responses_tools"+thinking_mode = "none"+x-portkey-provider = "@openai"++["gpt-4.1"]+inputs = ["text", "images", "pdf"]+outputs = ["text", "structured"]+costs = { input = 2, output = 8 }+sdk = "portkey_responses"+structure_method = "instructor/openai_responses_tools"+thinking_mode = "none"+x-portkey-provider = "@openai"++[o1]+inputs = ["text", "images", "pdf"]+outputs = ["text", "structured"]+costs = { input = 15.0, output = 60.0 }+valued_constraints = { fixed_temperature = 1 }+sdk = "portkey_responses"+structure_method = "instructor/openai_responses_tools"+thinking_mode = "manual"+x-portkey-provider = "@openai"++[o3-mini]+inputs = ["text"]+outputs = ["text", "structured"]+costs = { input = 1.1, output = 4.4 }+valued_constraints = { fixed_temperature = 1 }+sdk = "portkey_responses"+structure_method = "instructor/openai_responses_tools"+thinking_mode = "manual"+x-portkey-provider = "@openai"++[o3]+inputs = ["text", "images", "pdf"]+outputs = ["text", "structured"]+costs = { input = 2, output = 8 }+valued_constraints = { fixed_temperature = 1 }+sdk = "portkey_responses"+structure_method = "instructor/openai_responses_tools"+thinking_mode = "manual"+x-portkey-provider = "@openai"++[gpt-5-nano]+inputs = ["text", "images", "pdf"]+outputs = ["text", "structured"]+costs = { input = 0.05, output = 0.4 }+valued_constraints = { fixed_temperature = 1 }+sdk = "portkey_responses"+structure_method = "instructor/openai_responses_tools"+thinking_mode = "manual"+x-portkey-provider = "@openai"++[gpt-5-mini]+inputs = ["text", "images", "pdf"]+outputs = ["text", "structured"]+costs = { input = 0.25, output = 2.0 }+valued_constraints = { fixed_temperature = 1 }+sdk = "portkey_responses"+structure_method = "instructor/openai_responses_tools"+thinking_mode = "manual"+x-portkey-provider = "@openai"++[gpt-5]+inputs = ["text", "images", "pdf"]+outputs = ["text", "structured"]+costs = { input = 1.25, output = 10.0 }+valued_constraints = { fixed_temperature = 1 }+sdk = "portkey_responses"+structure_method = "instructor/openai_responses_tools"+thinking_mode = "manual"+x-portkey-provider = "@openai"++["gpt-5.1"]+inputs = ["text", "images", "pdf"]+outputs = ["text", "structured"]+costs = { input = 1.25, output = 10.0 }+valued_constraints = { fixed_temperature = 1 }+sdk = "portkey_responses"+structure_method = "instructor/openai_responses_tools"+thinking_mode = "manual"+x-portkey-provider = "@openai"++["gpt-5.1-codex"]+inputs = ["text", "images", "pdf"]+outputs = ["text", "structured"]+costs = { input = 1.25, output = 10.0 }+valued_constraints = { fixed_temperature = 1 }+sdk = "portkey_responses"+structure_method = "instructor/openai_responses_tools"+thinking_mode = "manual"+x-portkey-provider = "@openai"++# --- Claude LLMs --------------------------------------------------------------+[claude-3-haiku]+model_id = "claude-3-haiku-20240307"+max_tokens = 4096+inputs = ["text", "images"]+outputs = ["text", "structured"]+max_prompt_images = 100+costs = { input = 0.25, output = 1.25 }+thinking_mode = "none"+x-portkey-provider = "@anthropic"++["claude-3.7-sonnet"]+model_id = "claude-3-7-sonnet-20250219"+max_tokens = 8192+inputs = ["text", "images", "pdf"]+outputs = ["text", "structured"]+max_prompt_images = 100+costs = { input = 3.0, output = 15.0 }+thinking_mode = "manual"+x-portkey-provider = "@anthropic"++[claude-4-sonnet]+model_id = "claude-sonnet-4-20250514"+max_tokens = 64000+inputs = ["text", "images", "pdf"]+outputs = ["text", "structured"]+max_prompt_images = 100+costs = { input = 3.0, output = 15.0 }+thinking_mode = "manual"+x-portkey-provider = "@anthropic"++[claude-4-opus]+model_id = "claude-opus-4-20250514"+max_tokens = 32000+inputs = ["text", "images", "pdf"]+outputs = ["text", "structured"]+max_prompt_images = 100+costs = { input = 3.0, output = 15.0 }+thinking_mode = "manual"+x-portkey-provider = "@anthropic"++["claude-4.1-opus"]+model_id = "claude-opus-4-1-20250805"+max_tokens = 32000+inputs = ["text", "images", "pdf"]+outputs = ["text", "structured"]+max_prompt_images = 100+costs = { input = 3.0, output = 15.0 }+thinking_mode = "manual"+x-portkey-provider = "@anthropic"++["claude-4.5-sonnet"]+model_id = "claude-sonnet-4-5-20250929"+max_tokens = 64000+inputs = ["text", "images", "pdf"]+outputs = ["text", "structured"]+max_prompt_images = 100+costs = { input = 3.0, output = 15.0 }+thinking_mode = "manual"+x-portkey-provider = "@anthropic"++["claude-4.5-haiku"]+model_id = "claude-haiku-4-5-20251001"+max_tokens = 64000+inputs = ["text", "images", "pdf"]+outputs = ["text", "structured"]+max_prompt_images = 100+costs = { input = 1.0, output = 5.0 }+thinking_mode = "manual"+x-portkey-provider = "@anthropic"++["claude-4.5-opus"]+model_id = "claude-opus-4-5-20251101"+max_tokens = 64000+inputs = ["text", "images", "pdf"]+outputs = ["text", "structured"]+max_prompt_images = 100+costs = { input = 5.0, output = 25.0 }+thinking_mode = "manual"+x-portkey-provider = "@anthropic"++["claude-4.6-opus"]+model_id = "claude-opus-4-6"+max_tokens = 64000+inputs = ["text", "images", "pdf"]+outputs = ["text", "structured"]+max_prompt_images = 100+costs = { input = 5.0, output = 25.0 }+thinking_mode = "adaptive"+x-portkey-provider = "@anthropic"++# --- Gemini LLMs --------------------------------------------------------------+["gemini-2.5-pro"]+model_id = "gemini-2.5-pro"+inputs = ["text", "images", "pdf"]+outputs = ["text", "structured"]+max_prompt_images = 3000+costs = { input = 1.25, output = 10.0 }+thinking_mode = "manual"+x-portkey-provider = "@google"++["gemini-2.5-flash"]+model_id = "gemini-2.5-flash"+inputs = ["text", "images", "pdf"]+outputs = ["text", "structured"]+costs = { input = 0.30, output = 2.50 }+thinking_mode = "manual"+x-portkey-provider = "@google"++["gemini-2.5-flash-lite"]+model_id = "gemini-2.5-flash-lite"+inputs = ["text", "images", "pdf"]+outputs = ["text", "structured"]+costs = { input = 0.10, output = 0.40 }+thinking_mode = "manual"+x-portkey-provider = "@google"++["gemini-3.1-pro"]+model_id = "gemini-3.1-pro-preview"+inputs = ["text", "images", "pdf"]+outputs = ["text", "structured"]+max_prompt_images = 3000+costs = { input = 2, output = 12.0 }+thinking_mode = "adaptive"+x-portkey-provider = "@google"++["gemini-3.0-flash"]+model_id = "gemini-3-flash-preview"+inputs = ["text", "images", "pdf"]+outputs = ["text", "structured"]+max_prompt_images = 3000+costs = { input = 0.5, output = 3.0 }+thinking_mode = "adaptive"+x-portkey-provider = "@google"diff --git a/pipelex/migration/goldens/inference-backend/[email protected] b/pipelex/migration/goldens/inference-backend/[email protected]new file mode 100644index 000000000..d05ed258d--- /dev/null+++ b/pipelex/migration/goldens/inference-backend/[email protected]@@ -0,0 +1,157 @@+{+ "surface_id": "inference-backend",+ "schema_version": 4,+ "document_root_is_open": true,+ "paths": {+ "*": {+ "value_type": "table",+ "required": true,+ "open_node": false+ },+ "*.costs": {+ "value_type": "dict[enum, float]",+ "required": false,+ "open_node": true+ },+ "*.costs.*": {+ "value_type": "float",+ "required": true,+ "open_node": false+ },+ "*.enabled": {+ "value_type": "bool",+ "required": false,+ "open_node": false+ },+ "*.endpoint_path": {+ "value_type": "str",+ "required": false,+ "open_node": false+ },+ "*.inputs": {+ "value_type": "list[str]",+ "required": false,+ "open_node": false+ },+ "*.listed_constraints": {+ "value_type": "list[enum]",+ "required": false,+ "enum_members": [+ "max_tokens_must_be_high_enough",+ "temperature_must_be_multiplied_by_2",+ "temperature_unsupported"+ ],+ "open_node": false+ },+ "*.max_prompt_images": {+ "value_type": "int",+ "required": false,+ "open_node": false+ },+ "*.max_tokens": {+ "value_type": "int",+ "required": false,+ "open_node": false+ },+ "*.model_id": {+ "value_type": "str",+ "required": false,+ "open_node": false+ },+ "*.model_type": {+ "value_type": "enum",+ "required": false,+ "enum_members": [+ "doc_gen",+ "img_gen",+ "judgment",+ "llm",+ "search",+ "text_extractor"+ ],+ "open_node": false+ },+ "*.outputs": {+ "value_type": "list[str]",+ "required": false,+ "open_node": false+ },+ "*.rules": {+ "value_type": "dict[enum, str]",+ "required": false,+ "open_node": true+ },+ "*.rules.*": {+ "value_type": "str",+ "required": true,+ "open_node": false+ },+ "*.sdk": {+ "value_type": "str",+ "required": false,+ "open_node": false+ },+ "*.structure_method": {+ "value_type": "enum",+ "required": false,+ "enum_members": [+ "instructor/anthropic_json",+ "instructor/anthropic_reasoning_tools",+ "instructor/anthropic_tools",+ "instructor/bedrock_json",+ "instructor/bedrock_tools",+ "instructor/cerebras_json",+ "instructor/cerebras_tools",+ "instructor/cohere_json_schema",+ "instructor/cohere_tools",+ "instructor/fireworks_json",+ "instructor/fireworks_tools",+ "instructor/genai_structured_outputs",+ "instructor/genai_tools",+ "instructor/json",+ "instructor/json_schema",+ "instructor/md_json",+ "instructor/mistral_structured_outputs",+ "instructor/mistral_tools",+ "instructor/openai_json_o1",+ "instructor/openai_parallel_tools",+ "instructor/openai_responses_tools",+ "instructor/openai_responses_tools_with_inbuilt_tools",+ "instructor/openai_structured_outputs",+ "instructor/openai_tools",+ "instructor/openrouter_structured_outputs",+ "instructor/perplexity_json",+ "instructor/vertexai_json",+ "instructor/vertexai_parallel_tools",+ "instructor/vertexai_tools",+ "instructor/writer_tools"+ ],+ "open_node": false+ },+ "*.thinking_mode": {+ "value_type": "enum",+ "required": false,+ "enum_members": [+ "adaptive",+ "manual",+ "none"+ ],+ "open_node": false+ },+ "*.valued_constraints": {+ "value_type": "dict[enum, any]",+ "required": false,+ "open_node": true+ },+ "*.valued_constraints.*": {+ "value_type": "any",+ "required": true,+ "open_node": false+ },+ "*.variant": {+ "value_type": "str",+ "required": false,+ "open_node": false+ }+ }+}diff --git a/pipelex/migration/ledgers/inference-backend.toml b/pipelex/migration/ledgers/inference-backend.tomlindex 3436812ff..e64f84c4a 100644--- a/pipelex/migration/ledgers/inference-backend.toml+++ b/pipelex/migration/ledgers/inference-backend.toml@@ -11,7 +11,7 @@ id = "inference-backend"title = "Inference backend model definitions"subdirectory = "inference/backends"tier_glob = "*.toml"-current_schema_version = 3+current_schema_version = 4min_supported_schema_version = 0[[migration]]@@ -84,3 +84,34 @@ kind = "remap_value"table_path = ["*"]key = "sdk"mapping = { bedrock_aioboto3 = "bedrock_aioboto" }++# Unsafe for the reason `@3` is: `sdk` is a free string, so the old handles still validate and the boot never+# reaches the ledger. The entry exists so that `pipelex migrate` names each file still carrying one of them.+[[migration]]+id = "inference-backend@4"+to_schema_version = 4+introduced_in = "0.73.0"+breaking = true+safety = "unsafe"+title = "Rename the hosted backend's manifold_* SDK handles to pipelex_hosted_*, by hand"+description = """+The SDK handles of the Pipelex-run hosted backend are renamed from `manifold_anthropic`, \+`manifold_completions`, `manifold_responses`, `manifold_img_gen`, `manifold_extract` and \+`manifold_search` to `pipelex_hosted_anthropic`, `pipelex_hosted_completions`, \+`pipelex_hosted_responses`, `pipelex_hosted_img_gen`, `pipelex_hosted_extract` and \+`pipelex_hosted_search`. A backend file that still names an old handle keeps loading, but every call to \+a model it defines fails, because no plugin registers that SDK any more.+"""+guidance = """+Replace each `manifold_*` value of `sdk` with its `pipelex_hosted_*` counterpart wherever the file sets \+it: in `[defaults]` and in any model table that overrides it. The backend itself is renamed too, from \+`pipelex_manifold` to `pipelex_hosted`, so rename this file to `pipelex_hosted.toml`, and rename the \+`[pipelex_manifold]` table of `backends.toml` and any routing profile naming it; those two files are not \+migration surfaces, so no tool rewrites them.+"""++[[migration.ops]] # `["*"]` is every root table of the file: `[defaults]` and each model alike+kind = "remap_value"+table_path = ["*"]+key = "sdk"+mapping = { manifold_anthropic = "pipelex_hosted_anthropic", manifold_completions = "pipelex_hosted_completions", manifold_responses = "pipelex_hosted_responses", manifold_img_gen = "pipelex_hosted_img_gen", manifold_extract = "pipelex_hosted_extract", manifold_search = "pipelex_hosted_search" }diff --git a/pipelex/providers/builtins.py b/pipelex/providers/builtins.pyindex 0cfd655ce..4118c784f 100644--- a/pipelex/providers/builtins.py+++ b/pipelex/providers/builtins.py@@ -10,10 +10,10 @@ from pipelex.providers.google.google_plugin import GooglePluginfrom pipelex.providers.huggingface.huggingface_plugin import HuggingFacePluginfrom pipelex.providers.linkup.linkup_plugin import LinkupPluginfrom pipelex.providers.log_sinks.log_sink_plugin import LogSinkPlugin-from pipelex.providers.manifold.manifold_plugin import ManifoldPluginfrom pipelex.providers.mistral.mistral_plugin import MistralPluginfrom pipelex.providers.openai.openai_plugin import OpenAIPluginfrom pipelex.providers.openrouter.openrouter_plugin import OpenRouterPlugin+from pipelex.providers.pipelex_hosted.pipelex_hosted_plugin import PipelexHostedPluginfrom pipelex.providers.portkey.portkey_plugin import PortkeyPluginfrom pipelex.providers.pypdfium2.pypdfium2_plugin import Pypdfium2Pluginfrom pipelex.providers.reportlab.reportlab_plugin import ReportlabDocGenPlugin@@ -40,7 +40,7 @@ KERNEL_BUILTIN_PLUGINS: list[PipelexPlugin] = [StoragePlugin(),SecretsPlugin(),OpenAIPlugin(),- ManifoldPlugin(),+ PipelexHostedPlugin(),PortkeyPlugin(),AnthropicPlugin(),MistralPlugin(),diff --git a/pipelex/providers/manifold/__init__.py b/pipelex/providers/pipelex_hosted/__init__.pysimilarity index 100%rename from pipelex/providers/manifold/__init__.pyrename to pipelex/providers/pipelex_hosted/__init__.pydiff --git a/pipelex/providers/manifold/manifold_anthropic_extras.py b/pipelex/providers/pipelex_hosted/pipelex_hosted_anthropic_extras.pysimilarity index 65%rename from pipelex/providers/manifold/manifold_anthropic_extras.pyrename to pipelex/providers/pipelex_hosted/pipelex_hosted_anthropic_extras.pyindex c47de3611..59c7e68f0 100644--- a/pipelex/providers/manifold/manifold_anthropic_extras.py+++ b/pipelex/providers/pipelex_hosted/pipelex_hosted_anthropic_extras.py@@ -1,9 +1,9 @@-"""The per-request extras of a Claude call through the Pipelex Manifold service.+"""The per-request extras of a Claude call through the Pipelex service.Claude reaches the service over the open Anthropic worker, registered here under the package's own-`manifold_anthropic` sdk token with this factory: the worker asks it, per request, what joins the+`pipelex_hosted_anthropic` sdk token with this factory: the worker asks it, per request, what joins thecall, and the answer is the `x-pipelex-metadata` header naming the run and the step (see-`manifold_metadata`). Every other Anthropic path builds the worker without a factory and sends+`pipelex_hosted_metadata`). Every other Anthropic path builds the worker without a factory and sendsnothing of the kind."""@@ -14,14 +14,14 @@ from typing import TYPE_CHECKING, Anyfrom typing_extensions import overridefrom pipelex.plugins.backend_extras_factory import BackendExtrasFactory-from pipelex.providers.manifold.manifold_metadata import make_manifold_metadata_headers+from pipelex.providers.pipelex_hosted.pipelex_hosted_metadata import make_pipelex_hosted_metadata_headersif TYPE_CHECKING:from pipelex.cogt.inference.inference_job_abstract import InferenceJobAbstractfrom pipelex.cogt.model_backends.model_spec import InferenceModelSpec-class ManifoldAnthropicExtrasFactory(BackendExtrasFactory):+class PipelexHostedAnthropicExtrasFactory(BackendExtrasFactory):@overridedef make_extras(self, inference_model: InferenceModelSpec, *, inference_job: InferenceJobAbstract, output_desc: str@@ -32,4 +32,4 @@ class ManifoldAnthropicExtrasFactory(BackendExtrasFactory):the header names the job, not the model or the output."""del inference_model, output_desc- return make_manifold_metadata_headers(job_metadata=inference_job.job_metadata), {}+ return make_pipelex_hosted_metadata_headers(job_metadata=inference_job.job_metadata), {}diff --git a/pipelex/providers/manifold/manifold_completions_factory.py b/pipelex/providers/pipelex_hosted/pipelex_hosted_completions_factory.pysimilarity index 88%rename from pipelex/providers/manifold/manifold_completions_factory.pyrename to pipelex/providers/pipelex_hosted/pipelex_hosted_completions_factory.pyindex ab3935896..a9a923b97 100644--- a/pipelex/providers/manifold/manifold_completions_factory.py+++ b/pipelex/providers/pipelex_hosted/pipelex_hosted_completions_factory.py@@ -1,4 +1,4 @@-"""The Chat Completions factory for the Pipelex Manifold service.+"""The Chat Completions factory for the Pipelex service.**It subclasses `OpenAICompletionsFactory` and carries its own copy of the document override.**Documents travel to a Pipelex-operated gateway as a `ChatCompletionContentPartImageParam` holding a@@ -24,10 +24,10 @@ from pipelex.cogt.document.prompt_document_utils import prep_prompt_documentsfrom pipelex.cogt.image.prompt_image import PromptImageDetailfrom pipelex.cogt.image.prompt_image_utils import prep_prompt_imagesfrom pipelex.config import get_config-from pipelex.providers.manifold.manifold_constants import ManifoldOpenAISdkVariant-from pipelex.providers.manifold.manifold_exceptions import ManifoldFactoryError-from pipelex.providers.manifold.manifold_factory import ManifoldFactoryfrom pipelex.providers.openai.openai_completions_factory import OpenAICompletionsFactory+from pipelex.providers.pipelex_hosted.pipelex_hosted_constants import PipelexHostedOpenAISdkVariant+from pipelex.providers.pipelex_hosted.pipelex_hosted_exceptions import PipelexHostedFactoryError+from pipelex.providers.pipelex_hosted.pipelex_hosted_factory import PipelexHostedFactoryfrom pipelex.tools.uri.prepared_file import PreparedFileBase64, PreparedFileHttpUrl, PreparedFileLocalPathif TYPE_CHECKING:@@ -42,7 +42,7 @@ if TYPE_CHECKING:from pipelex.plugins.model_handle import ModelHandle-class ManifoldCompletionsFactory(OpenAICompletionsFactory):+class PipelexHostedCompletionsFactory(OpenAICompletionsFactory):@overrideasync def make_simple_messages(self,@@ -113,24 +113,24 @@ class ManifoldCompletionsFactory(OpenAICompletionsFactory):# Deferred import: avoid pulling heavy SDK at module-load timeimport openai # ruff: ignore[import-outside-top-level]- if not ManifoldOpenAISdkVariant.is_completions(model_handle.sdk):+ if not PipelexHostedOpenAISdkVariant.is_completions(model_handle.sdk):msg = f"ModelHandle '{model_handle}' is not supported by '{cls.__name__}'"- raise ManifoldFactoryError(msg)+ raise PipelexHostedFactoryError(msg)return openai.AsyncOpenAI(- base_url=ManifoldFactory.get_base_url(backend=backend),+ base_url=PipelexHostedFactory.get_base_url(backend=backend),# Auth travels in the service's own header, not in the OpenAI Authorization one. The SDK# has rejected an empty api_key since 2.34.0, so the slot holds a placeholder the# gateway never reads.- api_key="unused-auth-via-manifold-header",+ api_key="unused-auth-via-hosted-header",# Tier 1 transport retry: set explicitly from config rather than inheriting the SDK# default, so a transport_max_retries override applies to this path too.max_retries=get_config().inference.transport_max_retries,- default_headers=ManifoldFactory.make_auth_headers(backend=backend),+ default_headers=PipelexHostedFactory.make_auth_headers(backend=backend),)@overridedef make_extras(self, inference_model: InferenceModelSpec, *, inference_job: InferenceJobAbstract, output_desc: str) -> tuple[dict[str, str], dict[str, Any]]:- return ManifoldFactory.make_extras(inference_model=inference_model, inference_job=inference_job, output_desc=output_desc)+ return PipelexHostedFactory.make_extras(inference_model=inference_model, inference_job=inference_job, output_desc=output_desc)diff --git a/pipelex/providers/manifold/manifold_constants.py b/pipelex/providers/pipelex_hosted/pipelex_hosted_constants.pysimilarity index 66%rename from pipelex/providers/manifold/manifold_constants.pyrename to pipelex/providers/pipelex_hosted/pipelex_hosted_constants.pyindex b873e9aaf..79cc7d323 100644--- a/pipelex/providers/manifold/manifold_constants.py+++ b/pipelex/providers/pipelex_hosted/pipelex_hosted_constants.py@@ -1,6 +1,6 @@-"""The manifold dialect's names: its sdk set, its two wire headers, and its route paths.+"""The hosted dialect's names: its sdk set, its two wire headers, and its route paths.-Everything the manifold plugin needs to name is named here rather than imported from+Everything the hosted plugin needs to name is named here rather than imported from``providers/portkey/``. The duplication is deliberate — it is theno-intertwining rule from the two-gateways design, and it is what keeps the eventual retirement ofthe Portkey path a module deletion rather than an untangling.@@ -8,29 +8,29 @@ the Portkey path a module deletion rather than an untangling.from enum import StrEnum-# The header the Pipelex Manifold service reads the caller's token from.+# The header the Pipelex service reads the caller's token from.## The gateway is a continuation of the Portkey AI Gateway, and the name its inherited auth layer# answers to is `x-portkey-api-key`. Until 2026-09-03 that was the single word of the vendor's-# vocabulary still on the manifold wire; the gateway now translates this spelling to that one before+# vocabulary still on the hosted wire; the gateway now translates this spelling to that one before# its auth runs (`src/pig/serviceTokenHeader.ts` there), which is what let the rename happen — it# had no runtime-only half. This is the one header the dialect sends about itself, on every# protocol: the OpenAI-substrate factories and the native client put it there directly, and the# Anthropic client reads it from the backend's `auth_header` field, so the value in# `backends.toml` must spell it exactly as this constant does.-MANIFOLD_AUTH_HEADER = "x-pipelex-api-key"+PIPELEX_HOSTED_AUTH_HEADER = "x-pipelex-api-key"# The header that says whose call this is, sent on every request beside the token.## Its value is a flat JSON object of string to string: the run's opaque `extras` and the runtime's-# own ids for the run and the step (see `manifold_metadata`). It differs per job, so unlike the token+# own ids for the run and the step (see `pipelex_hosted_metadata`). It differs per job, so unlike the token# it is never a client default: every path adds it per request. The vendor spelling of the same idea,# `x-portkey-metadata`, is never sent — the gateway reads this name, and the dialect speaks none of# the vendor's vocabulary it does not have to.-MANIFOLD_METADATA_HEADER = "x-pipelex-metadata"+PIPELEX_HOSTED_METADATA_HEADER = "x-pipelex-metadata"# The gateway's response headers, the two spellings of its trace id, are named in-# `manifold_error_metadata`, beside the distiller that reads them. This file names what the dialect+# `pipelex_hosted_error_metadata`, beside the distiller that reads them. This file names what the dialect# *sends*.# The OpenAI and Portkey SDKs both expect their `base_url` to already carry the API version segment@@ -42,40 +42,40 @@ MANIFOLD_METADATA_HEADER = "x-pipelex-metadata"# needs. Verified against the installed SDKs rather than assumed — spike 5 lost a day to a# `/v1`-suffixed endpoint under the Anthropic SDK producing `POST /v1/v1/messages`, which the proxy# forwarded and answered 200-shaped.-MANIFOLD_API_VERSION_SEGMENT = "/v1"+PIPELEX_HOSTED_API_VERSION_SEGMENT = "/v1"# pig's own routes, beneath the version segment. They serve extraction and web search as themselves# rather than dressed as chat completions; their wire contract is frozen gateway-side in# `src/pig/pipelex/schemas.ts`.-MANIFOLD_EXTRACT_ROUTE = "/pipelex/extract"-MANIFOLD_SEARCH_ROUTE = "/pipelex/search"+PIPELEX_HOSTED_EXTRACT_ROUTE = "/pipelex/extract"+PIPELEX_HOSTED_SEARCH_ROUTE = "/pipelex/search"-class ManifoldSdk(StrEnum):- """The sdk values the manifold catalog section may name.+class PipelexHostedSdk(StrEnum):+ """The sdk values the hosted model catalog section may name.- `manifold_anthropic` is the open Anthropic worker with this package's extras factory, which adds+ `pipelex_hosted_anthropic` is the open Anthropic worker with this package's extras factory, which addsthe metadata header to every Claude call."""- ANTHROPIC = "manifold_anthropic"- COMPLETIONS = "manifold_completions"- RESPONSES = "manifold_responses"- IMG_GEN = "manifold_img_gen"- EXTRACT = "manifold_extract"- SEARCH = "manifold_search"+ ANTHROPIC = "pipelex_hosted_anthropic"+ COMPLETIONS = "pipelex_hosted_completions"+ RESPONSES = "pipelex_hosted_responses"+ IMG_GEN = "pipelex_hosted_img_gen"+ EXTRACT = "pipelex_hosted_extract"+ SEARCH = "pipelex_hosted_search"-class ManifoldOpenAISdkVariant(StrEnum):+class PipelexHostedOpenAISdkVariant(StrEnum):"""The two OpenAI-substrate sdks, and which of the two shapes each factory serves.- A factory checks its own variant so that a catalog entry naming `manifold_responses` cannot be+ A factory checks its own variant so that a catalog entry naming `pipelex_hosted_responses` cannot beserved by the completions factory (or the reverse) through a mis-registration — the failurewould otherwise be a wrong request shape at the provider rather than a refusal at build time."""- MANIFOLD_COMPLETIONS = "manifold_completions"- MANIFOLD_RESPONSES = "manifold_responses"+ PIPELEX_HOSTED_COMPLETIONS = "pipelex_hosted_completions"+ PIPELEX_HOSTED_RESPONSES = "pipelex_hosted_responses"@classmethoddef is_completions(cls, sdk: str) -> bool:@@ -84,9 +84,9 @@ class ManifoldOpenAISdkVariant(StrEnum):except ValueError:return Falsematch variant:- case cls.MANIFOLD_COMPLETIONS:+ case cls.PIPELEX_HOSTED_COMPLETIONS:return True- case cls.MANIFOLD_RESPONSES:+ case cls.PIPELEX_HOSTED_RESPONSES:return False@classmethod@@ -96,7 +96,7 @@ class ManifoldOpenAISdkVariant(StrEnum):except ValueError:return Falsematch variant:- case cls.MANIFOLD_COMPLETIONS:+ case cls.PIPELEX_HOSTED_COMPLETIONS:return False- case cls.MANIFOLD_RESPONSES:+ case cls.PIPELEX_HOSTED_RESPONSES:return Truediff --git a/pipelex/providers/manifold/manifold_error_codes.py b/pipelex/providers/pipelex_hosted/pipelex_hosted_error_codes.pysimilarity index 98%rename from pipelex/providers/manifold/manifold_error_codes.pyrename to pipelex/providers/pipelex_hosted/pipelex_hosted_error_codes.pyindex 86e2db740..f4da9e272 100644--- a/pipelex/providers/manifold/manifold_error_codes.py+++ b/pipelex/providers/pipelex_hosted/pipelex_hosted_error_codes.py@@ -1,11 +1,11 @@-"""The Pipelex Manifold service's own error codes, contributed to the runtime's service error vocabulary.+"""The Pipelex service's own error codes, contributed to the runtime's service error vocabulary.The service refuses some requests itself, before any provider sees them, under codes of its own:the ``pig-0N`` family on the LLM routes and the frozen ``pipelex_*`` contract codes on the native``/v1/pipelex/*`` routes. They group into three families by what the caller has to do — arequest-shape limit, a reference that cannot be resolved, a request that cannot be routed — and eachcode becomes one ``ServiceErrorCode`` entry: its category, its action and its advice.-``ManifoldPlugin.register`` contributes ``MANIFOLD_SERVICE_ERROR_CODES``, which the classifier then+``PipelexHostedPlugin.register`` contributes ``PIPELEX_HOSTED_SERVICE_ERROR_CODES``, which the classifier thenconsults ahead of the status ladder.None of these is retryable: the service refused before a provider saw the request, and the identical@@ -231,7 +231,7 @@ class GatewayRoutingRefusal(StrEnum):#: too. Only the gateway's message says which, which is why the rendered#: advice defers to it rather than asserting a deck disagreement (see#: ``_routing_refusal_entry``). Splitting the code is a- #: gateway-side change, filed on ``pipelex-manifold`` as L-260902-701614.+ #: gateway-side change, filed for the hosted plane as L-260902-701614.UNKNOWN_MODEL = "unknown_model"#: ``pig-02`` at HTTP 400 — the model resolves, but to an integration the#: deployment has switched off because a credential variable is unset. Nothing@@ -276,11 +276,11 @@ class GatewayRoutingRefusal(StrEnum):# ladder's reading is as good as any.## Two limits on that sentence, because it is the whole reason the code stays-# out. ``tests/unit/pipelex/providers/manifold/test_manifold_clients.py`` pins-# the manifold clients against the four steering headers by name, while the+# out. ``tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_clients.py`` pins+# the hosted clients against the four steering headers by name, while the# gateway refuses on an *allow*-list — so a ``portkey_ai`` release that starts# sending some other ``x-portkey-*`` header turns every request into a-# ``pig-03`` with that test still green. The manifold image path still travels+# ``pig-03`` with that test still green. The hosted image path still travels# on ``portkey_ai``, which is the one client that could start doing so.# - ``pig-04`` ("this gateway does not serve ``<method> <path>``") is the proxy# policy refusing a path only the catch-all could answer, and it is a 404, so the@@ -455,7 +455,7 @@ def _routing_refusal_entry(*, code: str, refusal: GatewayRoutingRefusal) -> Serv# to three different facts — it serves no such model, the body named none, and the body# could not be parsed at all — and the wire code does not tell them apart. Only the# gateway's own message does, so the advice sends the reader there before it sends them to- # the deck. Splitting the code is the real fix, filed on ``pipelex-manifold`` as+ # the deck. Splitting the code is the real fix, filed for the hosted plane as# L-260902-701614.return ServiceErrorCode(code=code,@@ -514,7 +514,7 @@ def _routing_refusal_entry(*, code: str, refusal: GatewayRoutingRefusal) -> Serv# are disjoint by construction — a code names a bound the request exceeded, a reference that could not# be resolved, or a request that could not be routed, never two of them — and the registrar refuses a# code claimed twice, so a code added to two maps fails the boot rather than picking one silently.-MANIFOLD_SERVICE_ERROR_CODES: tuple[ServiceErrorCode, ...] = (+PIPELEX_HOSTED_SERVICE_ERROR_CODES: tuple[ServiceErrorCode, ...] = (*(_request_limit_entry(code=code, limit=limit) for code, limit in _GATEWAY_REQUEST_LIMIT_BY_CODE.items()),*(_unresolved_reference_entry(code=code, reference=reference) for code, reference in _GATEWAY_UNRESOLVED_REFERENCE_BY_CODE.items()),*(_routing_refusal_entry(code=code, refusal=refusal) for code, refusal in _GATEWAY_ROUTING_REFUSAL_BY_CODE.items()),diff --git a/pipelex/providers/manifold/manifold_error_metadata.py b/pipelex/providers/pipelex_hosted/pipelex_hosted_error_metadata.pysimilarity index 88%rename from pipelex/providers/manifold/manifold_error_metadata.pyrename to pipelex/providers/pipelex_hosted/pipelex_hosted_error_metadata.pyindex faf6a1781..90a35b7d2 100644--- a/pipelex/providers/manifold/manifold_error_metadata.py+++ b/pipelex/providers/pipelex_hosted/pipelex_hosted_error_metadata.py@@ -1,4 +1,4 @@-"""How a failure on the Pipelex Manifold service's native routes is distilled into error metadata.+"""How a failure on the Pipelex service's native routes is distilled into error metadata.The native routes (``/v1/pipelex/extract``, ``/v1/pipelex/search``) are not OpenAI-shaped, so theyare called with plain ``httpx`` rather than through a vendor SDK, and their failures are distilled@@ -23,12 +23,12 @@ from pipelex.cogt.inference.provider_name import ProviderName# away. It is not a no-op for the image path: `extract_gateway_metadata` carries the vendor spelling# as a literal of its own, and the image worker distils its failures through it, so it can only move# once the image path is off `portkey_ai`.-MANIFOLD_TRACE_ID_HEADER = "x-pipelex-trace-id"-MANIFOLD_VENDOR_TRACE_ID_HEADER = "x-portkey-trace-id"+PIPELEX_HOSTED_TRACE_ID_HEADER = "x-pipelex-trace-id"+PIPELEX_HOSTED_VENDOR_TRACE_ID_HEADER = "x-portkey-trace-id"-def extract_manifold_metadata(exc: BaseException) -> ProviderErrorMetadata:- """Distill a raw-httpx failure against the Pipelex Manifold service into metadata.+def extract_pipelex_hosted_metadata(exc: BaseException) -> ProviderErrorMetadata:+ """Distill a raw-httpx failure against the Pipelex service into metadata.Two exception shapes reach here:@@ -46,9 +46,9 @@ def extract_manifold_metadata(exc: BaseException) -> ProviderErrorMetadata:code with ``invalid_request_error``. The gateway's fail-closed ``pig-0N`` shape carries no``type`` at all, so it reads the same either way.- **The request id is read in the manifold dialect's own spelling.** The provider's ``x-request-id``+ **The request id is read in the hosted dialect's own spelling.** The provider's ``x-request-id``comes first when a provider named its call, and the gateway's trace id is the fallback for the- answers that carried none — under ``MANIFOLD_TRACE_ID_HEADER`` before the inherited vendor+ answers that carried none — under ``PIPELEX_HOSTED_TRACE_ID_HEADER`` before the inherited vendorspelling, which holds the same value and is only still read because the gateway still emits it.**The message is the service's own when its body carries one.** ``str(exc)`` on an@@ -71,7 +71,9 @@ def extract_manifold_metadata(exc: BaseException) -> ProviderErrorMetadata:request_id: str | None = Noneretry_after_seconds: float | None = Noneif headers is not None:- request_id_value = headers.get("x-request-id") or headers.get(MANIFOLD_TRACE_ID_HEADER) or headers.get(MANIFOLD_VENDOR_TRACE_ID_HEADER)+ request_id_value = (+ headers.get("x-request-id") or headers.get(PIPELEX_HOSTED_TRACE_ID_HEADER) or headers.get(PIPELEX_HOSTED_VENDOR_TRACE_ID_HEADER)+ )if isinstance(request_id_value, str):request_id = request_id_valueretry_after_seconds = parse_retry_after_seconds(headers.get("retry-after"))diff --git a/pipelex/providers/manifold/manifold_exceptions.py b/pipelex/providers/pipelex_hosted/pipelex_hosted_exceptions.pysimilarity index 81%rename from pipelex/providers/manifold/manifold_exceptions.pyrename to pipelex/providers/pipelex_hosted/pipelex_hosted_exceptions.pyindex d4352260e..cb43fbf7c 100644--- a/pipelex/providers/manifold/manifold_exceptions.py+++ b/pipelex/providers/pipelex_hosted/pipelex_hosted_exceptions.py@@ -16,23 +16,23 @@ _EXTRACT_FAILURE_PAGE = f"{URLs.error_docs_base}/extract-job-failure-error/"_SEARCH_FAILURE_PAGE = f"{URLs.error_docs_base}/search-job-failure-error/"-class ManifoldError(CogtError):+class PipelexHostedError(CogtError):_declared_type_uri = _COGT_ERROR_PAGE_declared_title = "Inference backend error"-class ManifoldFactoryError(ManifoldError):+class PipelexHostedFactoryError(PipelexHostedError):_declared_type_uri = _COGT_ERROR_PAGE_declared_title = "Inference client setup error"-class ManifoldCredentialsError(ManifoldError):+class PipelexHostedCredentialsError(PipelexHostedError):_declared_type_uri = _CREDENTIALS_ERROR_PAGE_declared_title = "Inference backend credentials missing"-class ManifoldEndpointError(ManifoldError):- """The backend declares no usable endpoint for the Pipelex Manifold service.+class PipelexHostedEndpointError(PipelexHostedError):+ """The backend declares no usable endpoint for the Pipelex service.Its own error rather than a credentials one, because the remedy is a different variable andbecause there is deliberately no default to fall back on: an empty-resolving endpoint that@@ -43,16 +43,16 @@ class ManifoldEndpointError(ManifoldError):_declared_title = "Inference backend endpoint missing"-class ManifoldExtractResponseError(ManifoldError):+class PipelexHostedExtractResponseError(PipelexHostedError):_declared_type_uri = _EXTRACT_FAILURE_PAGE_declared_title = "Extract response unreadable"-class ManifoldSearchResponseError(ManifoldError):+class PipelexHostedSearchResponseError(PipelexHostedError):_declared_type_uri = _SEARCH_FAILURE_PAGE_declared_title = "Search response unreadable"-class ManifoldSearchEmptyResultError(ManifoldError):+class PipelexHostedSearchEmptyResultError(PipelexHostedError):_declared_type_uri = _SEARCH_FAILURE_PAGE_declared_title = "Search returned no result"diff --git a/pipelex/providers/manifold/manifold_extract_worker.py b/pipelex/providers/pipelex_hosted/pipelex_hosted_extract_worker.pysimilarity index 78%rename from pipelex/providers/manifold/manifold_extract_worker.pyrename to pipelex/providers/pipelex_hosted/pipelex_hosted_extract_worker.pyindex 7757308ff..4d3db4247 100644--- a/pipelex/providers/manifold/manifold_extract_worker.py+++ b/pipelex/providers/pipelex_hosted/pipelex_hosted_extract_worker.py@@ -1,4 +1,4 @@-"""Document extraction over the Pipelex Manifold service's own route.+"""Document extraction over the Pipelex service's own route.Thin on purpose. The gateway's ``POST /v1/pipelex/extract`` answers in the runtime's *own* model —an ``ExtractOutput`` of ``Page``s, keyed by page index — so the whole response side is one@@ -10,7 +10,7 @@ Two things this worker does that a thinner one would get wrong.**It builds the request body field by field.** Several ``ExtractJobParams`` fields are deliberatelynot part of the contract, and the gateway refuses them at *any* value including their own defaults —so a ``model_dump()`` of the params would send ``should_caption_images=false`` and be refused. See-``manifold_schemas``.+``pipelex_hosted_schemas``.**It translates the service's usage units into the runtime's.** The route reports honest counts(``usage.pages``), and the runtime's cost model is per million tokens. Left untranslated the job@@ -33,11 +33,11 @@ from pipelex.cogt.extract.extract_output import ExtractOutputfrom pipelex.cogt.extract.extract_worker_abstract import ExtractWorkerAbstractfrom pipelex.cogt.inference.error_render import InferenceErrorFamilyfrom pipelex.cogt.usage.token_category import NbTokensByCategoryDict, TokenCategory-from pipelex.providers.manifold.manifold_constants import MANIFOLD_EXTRACT_ROUTE-from pipelex.providers.manifold.manifold_exceptions import ManifoldExtractResponseError-from pipelex.providers.manifold.manifold_native_client import ManifoldNativeClient-from pipelex.providers.manifold.manifold_response_errors import describe_response_validation_error-from pipelex.providers.manifold.manifold_schemas import ManifoldExtractInput, ManifoldExtractParams, ManifoldExtractRequest+from pipelex.providers.pipelex_hosted.pipelex_hosted_constants import PIPELEX_HOSTED_EXTRACT_ROUTE+from pipelex.providers.pipelex_hosted.pipelex_hosted_exceptions import PipelexHostedExtractResponseError+from pipelex.providers.pipelex_hosted.pipelex_hosted_native_client import PipelexHostedNativeClient+from pipelex.providers.pipelex_hosted.pipelex_hosted_response_errors import describe_response_validation_error+from pipelex.providers.pipelex_hosted.pipelex_hosted_schemas import PipelexHostedExtractInput, PipelexHostedExtractParams, PipelexHostedExtractRequestfrom pipelex.runtime_hub import get_storage_providerfrom pipelex.tools.uri.uri_base64 import make_base64_url_from_any_uri@@ -49,10 +49,10 @@ if TYPE_CHECKING:# The runtime prices per million; the route counts pages. One page is one megatoken, in both# categories, which is exactly what the chat costume reports and what the abstract worker's own# fallback would produce — so a cost figure means the same thing on either dialect.-MANIFOLD_UNIT_TOKENS = 1_000_000+PIPELEX_HOSTED_UNIT_TOKENS = 1_000_000-class ManifoldExtractWorker(ExtractWorkerAbstract):+class PipelexHostedExtractWorker(ExtractWorkerAbstract):def __init__(self,sdk_instance: Any,@@ -66,11 +66,11 @@ class ManifoldExtractWorker(ExtractWorkerAbstract):reporting_delegate=reporting_delegate,)- if not isinstance(sdk_instance, ManifoldNativeClient):- msg = f"Provided extraction sdk_instance for {self.__class__.__name__} is not a ManifoldNativeClient: it's a '{type(sdk_instance)}'"+ if not isinstance(sdk_instance, PipelexHostedNativeClient):+ msg = f"Provided extraction sdk_instance for {self.__class__.__name__} is not a PipelexHostedNativeClient: it's a '{type(sdk_instance)}'"raise SdkTypeError(msg)- self.client: ManifoldNativeClient = sdk_instance+ self.client: PipelexHostedNativeClient = sdk_instance@overrideasync def _extract_pages(@@ -79,7 +79,7 @@ class ManifoldExtractWorker(ExtractWorkerAbstract):) -> ExtractOutput:request = await self._make_request(extract_job=extract_job)response_body = await self.client.post_json(- route=MANIFOLD_EXTRACT_ROUTE,+ route=PIPELEX_HOSTED_EXTRACT_ROUTE,body=request.model_dump(exclude_none=True),family=InferenceErrorFamily.EXTRACT,inference_model=self.inference_model,@@ -90,9 +90,9 @@ class ManifoldExtractWorker(ExtractWorkerAbstract):return ExtractOutput.model_validate(response_body)except ValidationError as exc:msg = f"Could not parse the extraction response for model '{self.inference_model.name}': {describe_response_validation_error(exc=exc)}"- raise ManifoldExtractResponseError(msg) from exc+ raise PipelexHostedExtractResponseError(msg) from exc- async def _make_request(self, *, extract_job: ExtractJob) -> ManifoldExtractRequest:+ async def _make_request(self, *, extract_job: ExtractJob) -> PipelexHostedExtractRequest:"""The body, with the input in the form the picked provider can actually reach.Which form that is follows from what the *catalog* says the model takes, not from a list of@@ -103,7 +103,7 @@ class ManifoldExtractWorker(ExtractWorkerAbstract):"""extract_input = extract_job.extract_inputjob_params = extract_job.job_params- params = ManifoldExtractParams(+ params = PipelexHostedExtractParams(max_nb_images=job_params.max_nb_images,render_js=job_params.render_js,include_raw_html=job_params.include_raw_html,@@ -113,25 +113,25 @@ class ManifoldExtractWorker(ExtractWorkerAbstract):if not extract_input.document_uri:msg = f"Extract model '{self.inference_model.name}' fetches web pages and needs a document_uri"raise ExtractInputError(msg)- return ManifoldExtractRequest(+ return PipelexHostedExtractRequest(model=self.inference_model.model_id,- input=ManifoldExtractInput(document_uri=extract_input.document_uri),+ input=PipelexHostedExtractInput(document_uri=extract_input.document_uri),params=params,)storage = get_storage_provider()if image_uri := extract_input.image_uri:base64_url = await make_base64_url_from_any_uri(uri=image_uri, storage_provider=storage)- return ManifoldExtractRequest(+ return PipelexHostedExtractRequest(model=self.inference_model.model_id,- input=ManifoldExtractInput(image_uri=base64_url),+ input=PipelexHostedExtractInput(image_uri=base64_url),params=params,)if document_uri := extract_input.document_uri:base64_url = await make_base64_url_from_any_uri(uri=document_uri, storage_provider=storage)- return ManifoldExtractRequest(+ return PipelexHostedExtractRequest(model=self.inference_model.model_id,- input=ManifoldExtractInput(document_uri=base64_url),+ input=PipelexHostedExtractInput(document_uri=base64_url),params=params,)msg = "No image nor document URI provided in ExtractJob"@@ -148,7 +148,7 @@ class ManifoldExtractWorker(ExtractWorkerAbstract):if not isinstance(nb_pages, int):returnnb_tokens: NbTokensByCategoryDict = {- TokenCategory.INPUT: nb_pages * MANIFOLD_UNIT_TOKENS,- TokenCategory.OUTPUT: nb_pages * MANIFOLD_UNIT_TOKENS,+ TokenCategory.INPUT: nb_pages * PIPELEX_HOSTED_UNIT_TOKENS,+ TokenCategory.OUTPUT: nb_pages * PIPELEX_HOSTED_UNIT_TOKENS,}extract_tokens_usage.nb_tokens_by_category = nb_tokensdiff --git a/pipelex/providers/manifold/manifold_factory.py b/pipelex/providers/pipelex_hosted/pipelex_hosted_factory.pysimilarity index 82%rename from pipelex/providers/manifold/manifold_factory.pyrename to pipelex/providers/pipelex_hosted/pipelex_hosted_factory.pyindex 6814a7d7e..a0476f61d 100644--- a/pipelex/providers/manifold/manifold_factory.py+++ b/pipelex/providers/pipelex_hosted/pipelex_hosted_factory.py@@ -1,14 +1,14 @@-"""How every manifold client is built: the endpoint rule, the token, and the per-request extras.+"""How every hosted client is built: the endpoint rule, the token, and the per-request extras.**The endpoint rule is normative and it is why this class exists at all.** The backend declares the-Pipelex Manifold service's *origin* — scheme, host and port, with no version segment — and each-client appends what its own SDK expects beneath it. See `manifold_constants` for the probe that+Pipelex service's *origin* — scheme, host and port, with no version segment — and each+client appends what its own SDK expects beneath it. See `pipelex_hosted_constants` for the probe thatestablished which SDK appends what.**There is no fallback endpoint, deliberately.** The Portkey-path sibling reads``backend.endpoint or PORTKEY_GATEWAY_URL``, which is right there: an unset endpoint means "use the-vendor's cloud". Copied here it would mean that an empty-resolving ``PIPELEX_MANIFOLD_ENDPOINT``-silently builds a client aimed at ``api.portkey.ai`` carrying the *manifold* service token — a live+vendor's cloud". Copied here it would mean that an empty-resolving ``PIPELEX_HOSTED_ENDPOINT``+silently builds a client aimed at ``api.portkey.ai`` carrying the *Pipelex* service token — a livebillable request to the wrong vendor, with nothing anywhere reporting it. So an absent endpoint is arefusal, and the backend loader's own missing-variable path disables the backend with a namedwarning long before this is reached.@@ -22,9 +22,9 @@ from typing import TYPE_CHECKING, Anyfrom pipelex.cogt.img_gen.img_gen_gemini_mapping import ImgGenGeminiMappingfrom pipelex.cogt.img_gen.img_gen_job import ImgGenJobfrom pipelex.cogt.llm.llm_job import LLMJob-from pipelex.providers.manifold.manifold_constants import MANIFOLD_API_VERSION_SEGMENT, MANIFOLD_AUTH_HEADER-from pipelex.providers.manifold.manifold_exceptions import ManifoldCredentialsError, ManifoldEndpointError-from pipelex.providers.manifold.manifold_metadata import make_manifold_metadata_headers+from pipelex.providers.pipelex_hosted.pipelex_hosted_constants import PIPELEX_HOSTED_API_VERSION_SEGMENT, PIPELEX_HOSTED_AUTH_HEADER+from pipelex.providers.pipelex_hosted.pipelex_hosted_exceptions import PipelexHostedCredentialsError, PipelexHostedEndpointError+from pipelex.providers.pipelex_hosted.pipelex_hosted_metadata import make_pipelex_hosted_metadata_headersif TYPE_CHECKING:from portkey_ai import AsyncPortkey@@ -36,7 +36,7 @@ if TYPE_CHECKING:from pipelex.cogt.model_backends.model_spec import InferenceModelSpec-class ManifoldFactory:+class PipelexHostedFactory:@classmethoddef get_origin(cls, backend: InferenceBackend) -> str:"""The service origin the backend declares, with any trailing slash removed.@@ -48,35 +48,35 @@ class ManifoldFactory:endpoint = (backend.endpoint or "").strip().rstrip("/")if not endpoint:msg = (- f"Backend '{backend.name}' declares no endpoint for the Pipelex Manifold service. "- f"Set PIPELEX_MANIFOLD_ENDPOINT to the service origin (scheme, host and port, with no '/v1'). "+ f"Backend '{backend.name}' declares no endpoint for the Pipelex service. "+ f"Set PIPELEX_HOSTED_ENDPOINT to the service origin (scheme, host and port, with no '/v1'). "f"There is no default: a request built without one would reach a vendor this token is not for.")- raise ManifoldEndpointError(msg)+ raise PipelexHostedEndpointError(msg)return endpoint@classmethoddef get_base_url(cls, backend: InferenceBackend) -> str:"""The origin plus the version segment, for the SDKs that expect one in their `base_url`."""- return f"{cls.get_origin(backend=backend)}{MANIFOLD_API_VERSION_SEGMENT}"+ return f"{cls.get_origin(backend=backend)}{PIPELEX_HOSTED_API_VERSION_SEGMENT}"@classmethoddef get_api_key(cls, backend: InferenceBackend) -> str:if not backend.api_key:- msg = f"Backend '{backend.name}' carries no api_key for the Pipelex Manifold service; set PIPELEX_MANIFOLD_API_KEY"- raise ManifoldCredentialsError(msg)+ msg = f"Backend '{backend.name}' carries no api_key for the Pipelex service; set PIPELEX_HOSTED_API_KEY"+ raise PipelexHostedCredentialsError(msg)return backend.api_key@classmethoddef make_auth_headers(cls, backend: InferenceBackend) -> dict[str, str]:- """The whole of what the manifold dialect puts on the wire about itself: one token header.+ """The whole of what the hosted dialect puts on the wire about itself: one token header.No config id, no provider name, no routing of any kind — the service decides which providerserves a model from the model id in the request body, and refuses a client that tries to sayotherwise. Building this dict by hand rather than through the vendor's header helper is whatmakes that property readable here instead of dependent on a library's constructor defaults."""- return {MANIFOLD_AUTH_HEADER: cls.get_api_key(backend=backend)}+ return {PIPELEX_HOSTED_AUTH_HEADER: cls.get_api_key(backend=backend)}@classmethoddef make_portkey_client(cls, backend: InferenceBackend) -> AsyncPortkey:@@ -85,7 +85,7 @@ class ManifoldFactory:`portkey_ai` is a beta-only dependency of this package: the image worker reuses the vendorSDK's `images.generate` / `images.edit` methods for their multipart serialization, which isthe part that was expensive to get right. Everything else in this package is built on the- OpenAI SDK or on plain HTTP. See the deletion trigger in `manifold_img_gen_worker`.+ OpenAI SDK or on plain HTTP. See the deletion trigger in `pipelex_hosted_img_gen_worker`."""from portkey_ai import AsyncPortkey # ruff: ignore[import-outside-top-level]@@ -131,11 +131,11 @@ class ManifoldFactory:"""The per-request headers and body additions.The headers always include `x-pipelex-metadata`, naming the run and the step this call- serves (see `manifold_metadata`). It is built here, per request, because it differs per job:+ serves (see `pipelex_hosted_metadata`). It is built here, per request, because it differs per job:the token is a client default, this is not.`output_desc` is part of the shared factory signature and is unused on this path: it exists- for the Portkey-path tracing header that names the job, and the manifold dialect sends no+ for the Portkey-path tracing header that names the job, and the hosted dialect sends notracing headers in the beta."""del output_desc@@ -147,7 +147,7 @@ class ManifoldFactory:# provider, and passes the rest through to whichever one it picked.extra_headers.update(inference_model.extra_headers)# After the catalog's headers, so a catalog entry cannot restate whose call this is.- extra_headers.update(make_manifold_metadata_headers(job_metadata=inference_job.job_metadata))+ extra_headers.update(make_pipelex_hosted_metadata_headers(job_metadata=inference_job.job_metadata))if isinstance(inference_job, LLMJob):# Mistral models really want a non-null seed. The spec carries no Mistral-specific fielddiff --git a/pipelex/providers/manifold/manifold_img_gen_worker.py b/pipelex/providers/pipelex_hosted/pipelex_hosted_img_gen_worker.pysimilarity index 90%rename from pipelex/providers/manifold/manifold_img_gen_worker.pyrename to pipelex/providers/pipelex_hosted/pipelex_hosted_img_gen_worker.pyindex 85857a60f..75210c334 100644--- a/pipelex/providers/manifold/manifold_img_gen_worker.py+++ b/pipelex/providers/pipelex_hosted/pipelex_hosted_img_gen_worker.py@@ -1,21 +1,21 @@-"""Image generation and editing through the Pipelex Manifold service.+"""Image generation and editing through the Pipelex service.-**This module is the one place the manifold plugin depends on `portkey_ai`, and the dependency has a-deletion trigger.** The two-gateways design ruled that the manifold plugin must not depend on the+**This module is the one place the hosted plugin depends on `portkey_ai`, and the dependency has a+deletion trigger.** The two-gateways design ruled that the hosted plugin must not depend on thevendor's library — "when Portkey retires as a vendor, the library retires with it" — and theengineering review of 2026-08-25 lifted that rule *for the beta only*, so the image path could reusework that was already proven live rather than being ported first. Reusing `AsyncPortkey` buys onespecific thing: its `images.generate` / `images.edit` methods carry the multipart serialization forimage edits, which is the part that was expensive to get right.-**Delete this dependency when** the manifold image path is ported to the OpenAI SDK — the mapping+**Delete this dependency when** the hosted image path is ported to the OpenAI SDK — the mappingcan be read out of the Portkey SDK's own source. What changes then is this module's client and itsexception arms; nothing else in the package imports the vendor library. Until that happens, the-design page's claim that the manifold plugin does not depend on `portkey_ai` is false, which is why+design page's claim that the hosted plugin does not depend on `portkey_ai` is false, which is whythe lift is written into the design rather than only into a plan.-**The response shapes this worker parses are only the ones the manifold catalog names.** Every-`manifold_img_gen` entry is an Azure GPT Image model, and the gateway's own configuration serves+**The response shapes this worker parses are only the ones the hosted model catalog names.** Every+`pipelex_hosted_img_gen` entry is an Azure GPT Image model, and the gateway's own configuration servesthem from one integration. The Portkey path's worker also carries a Black Forest Labs Flux 2 Probranch and a FAL queue-polling branch; neither has a model on this path, so neither is carried here.A response that matches nothing is refused with what it actually contained, and restoring a branch@@ -45,9 +45,9 @@ from pipelex.cogt.inference.error_classification import UserAction, UserActionKifrom pipelex.cogt.inference.error_classify import classify_inference_errorfrom pipelex.cogt.inference.error_render import InferenceErrorFamily, render_inference_errorfrom pipelex.cogt.usage.token_category import NbTokensByCategoryDict, TokenCategory-from pipelex.providers.manifold.manifold_metadata import make_manifold_metadata_headers-from pipelex.providers.manifold.manifold_response_errors import describe_response_validation_error-from pipelex.providers.manifold.manifold_schemas import ManifoldImgGenAzureGptImage+from pipelex.providers.pipelex_hosted.pipelex_hosted_metadata import make_pipelex_hosted_metadata_headers+from pipelex.providers.pipelex_hosted.pipelex_hosted_response_errors import describe_response_validation_error+from pipelex.providers.pipelex_hosted.pipelex_hosted_schemas import PipelexHostedImgGenAzureGptImageif TYPE_CHECKING:from pipelex.cogt.img_gen.img_gen_job import ImgGenJob@@ -55,7 +55,7 @@ if TYPE_CHECKING:from pipelex.reporting.reporting_protocol import ReportingProtocol-class ManifoldImgGenWorker(ImgGenWorkerAbstract):+class PipelexHostedImgGenWorker(ImgGenWorkerAbstract):def __init__(self,sdk_instance: Any,@@ -97,7 +97,7 @@ class ManifoldImgGenWorker(ImgGenWorkerAbstract):)image_files: list[ImageFileTuple] | None = args_dict.pop("image", None)- extra_headers = make_manifold_metadata_headers(job_metadata=img_gen_job.job_metadata)+ extra_headers = make_pipelex_hosted_metadata_headers(job_metadata=img_gen_job.job_metadata)response_dict = await self._call_images_api(image_files=image_files, args_dict=args_dict, extra_headers=extra_headers)self._record_usage(response_dict=response_dict, img_gen_job=img_gen_job)return self._make_generated_images(response_dict=response_dict)@@ -112,7 +112,7 @@ class ManifoldImgGenWorker(ImgGenWorkerAbstract):vendor client's `metadata` constructor argument is left alone: it would be sent as`x-portkey-metadata`, a name the gateway does not read.- There is no `endpoint_path` here and no config id: the manifold dialect puts the model in the+ There is no `endpoint_path` here and no config id: the hosted dialect puts the model in thebody and lets the gateway decide who serves it, so which *route* is called is the SDKmethod's business and which *provider* answers is the gateway's."""@@ -148,7 +148,7 @@ class ManifoldImgGenWorker(ImgGenWorkerAbstract):# and so falls through the arm above; left raw it is neither a `PipelexError` nor# annotated with the model, which means it escapes the Temporal error bridge and gets# retried, billing a second generation for the same job.- msg = f"The Pipelex Manifold service returned a non-JSON body for model '{self.inference_model.name}'"+ msg = f"The Pipelex service returned a non-JSON body for model '{self.inference_model.name}'"raise ImgGenGenerationError(msg,error_category=InferenceErrorCategory.UNKNOWN,@@ -184,7 +184,7 @@ class ManifoldImgGenWorker(ImgGenWorkerAbstract):def _make_generated_images(self, *, response_dict: dict[str, Any]) -> list[GeneratedImageRawDetails]:try:- azure_gpt_image = ManifoldImgGenAzureGptImage.model_validate(response_dict)+ azure_gpt_image = PipelexHostedImgGenAzureGptImage.model_validate(response_dict)except ValidationError as exc:problems = describe_response_validation_error(exc=exc)msg = f"Could not parse the image generation response for model '{self.inference_model.name}': {problems}"diff --git a/pipelex/providers/manifold/manifold_metadata.py b/pipelex/providers/pipelex_hosted/pipelex_hosted_metadata.pysimilarity index 84%rename from pipelex/providers/manifold/manifold_metadata.pyrename to pipelex/providers/pipelex_hosted/pipelex_hosted_metadata.pyindex 912dab71b..3d2303f67 100644--- a/pipelex/providers/manifold/manifold_metadata.py+++ b/pipelex/providers/pipelex_hosted/pipelex_hosted_metadata.py@@ -1,6 +1,6 @@"""The one header that says whose call this is: `x-pipelex-metadata`, a flat JSON object.-**Why the Manifold dialect sends it.** The Pipelex Manifold service attributes the spend of every+**Why the hosted dialect sends it.** The Pipelex service attributes the spend of everyinference call it serves and logs the call, and neither is possible from the service token alone —one token serves every run a deployment executes, for every caller and every tenant. So each requestthe dialect makes carries, beside the token, a small JSON object naming the run and the step it@@ -33,13 +33,13 @@ from __future__ import annotationsimport jsonfrom typing import TYPE_CHECKING-from pipelex.providers.manifold.manifold_constants import MANIFOLD_METADATA_HEADER+from pipelex.providers.pipelex_hosted.pipelex_hosted_constants import PIPELEX_HOSTED_METADATA_HEADERif TYPE_CHECKING:from pipelex.system.job_metadata import JobMetadata-def make_manifold_metadata(*, job_metadata: JobMetadata) -> dict[str, str]:+def make_pipelex_hosted_metadata(*, job_metadata: JobMetadata) -> dict[str, str]:"""The flat mapping the header carries: the run's extras, then the runtime's own ids over them."""run_metadata = job_metadata.run_metadataruntime_ids: dict[str, str | None] = {@@ -60,7 +60,7 @@ def make_manifold_metadata(*, job_metadata: JobMetadata) -> dict[str, str]:return metadata-def encode_manifold_metadata(*, metadata: dict[str, str]) -> str:+def encode_pipelex_hosted_metadata(*, metadata: dict[str, str]) -> str:"""The header value: compact JSON in printable ASCII only."""encoded = json.dumps(metadata, ensure_ascii=True, separators=(",", ":"))# JSON escapes control characters below 0x20 and, with `ensure_ascii`, everything above 0x7E@@ -68,6 +68,6 @@ def encode_manifold_metadata(*, metadata: dict[str, str]) -> str:return encoded.replace("\x7f", "\\u007f")-def make_manifold_metadata_headers(*, job_metadata: JobMetadata) -> dict[str, str]:- """The one-entry header mapping a manifold request adds for the job it serves."""- return {MANIFOLD_METADATA_HEADER: encode_manifold_metadata(metadata=make_manifold_metadata(job_metadata=job_metadata))}+def make_pipelex_hosted_metadata_headers(*, job_metadata: JobMetadata) -> dict[str, str]:+ """The one-entry header mapping a hosted request adds for the job it serves."""+ return {PIPELEX_HOSTED_METADATA_HEADER: encode_pipelex_hosted_metadata(metadata=make_pipelex_hosted_metadata(job_metadata=job_metadata))}diff --git a/pipelex/providers/manifold/manifold_native_client.py b/pipelex/providers/pipelex_hosted/pipelex_hosted_native_client.pysimilarity index 75%rename from pipelex/providers/manifold/manifold_native_client.pyrename to pipelex/providers/pipelex_hosted/pipelex_hosted_native_client.pyindex b6301fc9f..eac962b34 100644--- a/pipelex/providers/manifold/manifold_native_client.py+++ b/pipelex/providers/pipelex_hosted/pipelex_hosted_native_client.py@@ -1,10 +1,10 @@-"""The HTTP client for the Pipelex Manifold service's own routes.+"""The HTTP client for the Pipelex service's own routes.``POST /v1/pipelex/extract`` and ``POST /v1/pipelex/search`` are not OpenAI-shaped — they servedocument extraction and web search as themselves rather than dressed as chat completions — so theyare called with plain ``httpx`` rather than through a vendor SDK wrapped around a chat body.-**Building the request by hand is what makes the wire readable.** Two properties of the manifold+**Building the request by hand is what makes the wire readable.** Two properties of the hosted dialectdialect live in this one method and can be asserted in a test that reads the request it built: theonly header about us is the service token, and the body carries the model with nothing aboutrouting. A client whose constructor defaults decide the headers cannot say that. The one other@@ -22,10 +22,10 @@ from pipelex.cogt.inference.error_classify import classify_inference_errorfrom pipelex.cogt.inference.error_render import render_inference_errorfrom pipelex.cogt.inference.transport_retry import request_with_transport_retryfrom pipelex.config import get_config-from pipelex.providers.manifold.manifold_error_metadata import extract_manifold_metadata-from pipelex.providers.manifold.manifold_exceptions import ManifoldError-from pipelex.providers.manifold.manifold_factory import ManifoldFactory-from pipelex.providers.manifold.manifold_metadata import make_manifold_metadata_headers+from pipelex.providers.pipelex_hosted.pipelex_hosted_error_metadata import extract_pipelex_hosted_metadata+from pipelex.providers.pipelex_hosted.pipelex_hosted_exceptions import PipelexHostedError+from pipelex.providers.pipelex_hosted.pipelex_hosted_factory import PipelexHostedFactory+from pipelex.providers.pipelex_hosted.pipelex_hosted_metadata import make_pipelex_hosted_metadata_headersif TYPE_CHECKING:from pipelex.cogt.inference.error_render import InferenceErrorFamily@@ -36,15 +36,15 @@ if TYPE_CHECKING:# Generous, and deliberately so: a deep web search or a many-page extraction is a slow call, and the# runtime's own job-level timeouts are the ones that should bound it. Matches the SDK-less image# path's floor rather than inventing a second number.-MANIFOLD_NATIVE_TIMEOUT_SECONDS = 600.0+PIPELEX_HOSTED_NATIVE_TIMEOUT_SECONDS = 600.0-class ManifoldNativeClient:+class PipelexHostedNativeClient:"""One route call, one dict back — or a categorized inference error."""def __init__(self, *, backend: InferenceBackend) -> None:- self.base_url = ManifoldFactory.get_base_url(backend=backend)- self.auth_headers = ManifoldFactory.make_auth_headers(backend=backend)+ self.base_url = PipelexHostedFactory.get_base_url(backend=backend)+ self.auth_headers = PipelexHostedFactory.make_auth_headers(backend=backend)async def post_json(self,@@ -58,7 +58,7 @@ class ManifoldNativeClient:url = f"{self.base_url}{route}"headers = {**self.auth_headers,- **make_manifold_metadata_headers(job_metadata=job_metadata),+ **make_pipelex_hosted_metadata_headers(job_metadata=job_metadata),"Content-Type": "application/json",}@@ -68,7 +68,7 @@ class ManifoldNativeClient:url,headers=headers,json=body,- timeout=MANIFOLD_NATIVE_TIMEOUT_SECONDS,+ timeout=PIPELEX_HOSTED_NATIVE_TIMEOUT_SECONDS,)response.raise_for_status()return response@@ -83,7 +83,7 @@ class ManifoldNativeClient:retry_on_ambiguous_failure=False,)except httpx.HTTPError as exc:- metadata = extract_manifold_metadata(exc)+ metadata = extract_pipelex_hosted_metadata(exc)classification = classify_inference_error(metadata)raise render_inference_error(metadata=metadata,@@ -99,9 +99,9 @@ class ManifoldNativeClient:# A 2xx whose body is not JSON — an intermediary's error page is how this happens. Left# raw it is neither a `PipelexError` nor annotated with the model, so it would escape# the Temporal error bridge and be retried against a call that was already paid for.- msg = f"The Pipelex Manifold service returned a non-JSON body for model '{inference_model.name}'"- raise ManifoldError(msg) from exc+ msg = f"The Pipelex service returned a non-JSON body for model '{inference_model.name}'"+ raise PipelexHostedError(msg) from excif not isinstance(payload, dict):- msg = f"The Pipelex Manifold service returned a '{type(payload).__name__}' rather than an object for model '{inference_model.name}'"- raise ManifoldError(msg)+ msg = f"The Pipelex service returned a '{type(payload).__name__}' rather than an object for model '{inference_model.name}'"+ raise PipelexHostedError(msg)return payload # pyright: ignore[reportUnknownVariableType]diff --git a/pipelex/providers/manifold/manifold_plugin.py b/pipelex/providers/pipelex_hosted/pipelex_hosted_plugin.pysimilarity index 59%rename from pipelex/providers/manifold/manifold_plugin.pyrename to pipelex/providers/pipelex_hosted/pipelex_hosted_plugin.pyindex 4ab527442..2c11a076a 100644--- a/pipelex/providers/manifold/manifold_plugin.py+++ b/pipelex/providers/pipelex_hosted/pipelex_hosted_plugin.py@@ -1,12 +1,12 @@-"""The manifold sdk set, registered.+"""The hosted sdk set, registered.-One registration per ``(family, sdk)`` the Pipelex Manifold service serves. The pairing worth-noticing is ``(IMG_GEN, manifold_completions)``: some image models answer on the Chat Completions+One registration per ``(family, sdk)`` the Pipelex service serves. The pairing worth+noticing is ``(IMG_GEN, pipelex_hosted_completions)``: some image models answer on the Chat Completionsshape rather than on the Images API, and the catalog says which by giving them ``model_type ="img_gen"`` while leaving them on the default completions sdk — so the same sdk name is registeredunder two families, served by two different workers.-Claude reaches the manifold service on ``manifold_anthropic``: the open Anthropic worker, built with+Claude reaches the Pipelex service on ``pipelex_hosted_anthropic``: the open Anthropic worker, built withthe package's extras factory so that every call carries the metadata header, and a client thatauthenticates on whichever header the backend names. A catalog entry left on the plain ``anthropic``sdk would still answer, without the header.@@ -19,8 +19,8 @@ from typing import TYPE_CHECKINGfrom pipelex.plugins.contract import PLUGIN_API_VERSIONfrom pipelex.plugins.inference_backend_registry import InferenceFamily, require_sdkfrom pipelex.plugins.model_handle import ModelHandle-from pipelex.providers.manifold.manifold_constants import ManifoldSdk-from pipelex.providers.manifold.manifold_error_codes import MANIFOLD_SERVICE_ERROR_CODES+from pipelex.providers.pipelex_hosted.pipelex_hosted_constants import PipelexHostedSdk+from pipelex.providers.pipelex_hosted.pipelex_hosted_error_codes import PIPELEX_HOSTED_SERVICE_ERROR_CODESif TYPE_CHECKING:from pipelex.cogt.inference.inference_worker_abstract import InferenceWorkerAbstract@@ -31,7 +31,7 @@ if TYPE_CHECKING:from pipelex.reporting.reporting_protocol import ReportingProtocol-def _make_manifold_anthropic_worker(+def _make_pipelex_hosted_anthropic_worker(*,inference_model: InferenceModelSpec,backend: InferenceBackend,@@ -42,7 +42,9 @@ def _make_manifold_anthropic_worker(from pipelex.providers.anthropic.anthropic_factory import AnthropicFactory, AnthropicSdkVariant # ruff: ignore[import-outside-top-level]from pipelex.providers.anthropic.anthropic_llm_worker import AnthropicLLMWorker # ruff: ignore[import-outside-top-level]- from pipelex.providers.manifold.manifold_anthropic_extras import ManifoldAnthropicExtrasFactory # ruff: ignore[import-outside-top-level]+ from pipelex.providers.pipelex_hosted.pipelex_hosted_anthropic_extras import ( # ruff: ignore[import-outside-top-level]+ PipelexHostedAnthropicExtrasFactory,+ )model_handle = ModelHandle.make_for_inference_model(inference_model=inference_model)sdk_instance = sdk_clients.get_or_create(@@ -54,74 +56,80 @@ def _make_manifold_anthropic_worker(extra_config=backend.extra_config,inference_model=inference_model,reporting_delegate=reporting_delegate,- extras_factory=ManifoldAnthropicExtrasFactory(),+ extras_factory=PipelexHostedAnthropicExtrasFactory(),)-def _make_manifold_completions_worker(+def _make_pipelex_hosted_completions_worker(*,inference_model: InferenceModelSpec,backend: InferenceBackend,sdk_clients: SdkClientRegistry,reporting_delegate: ReportingProtocol | None,) -> InferenceWorkerAbstract:- from pipelex.providers.manifold.manifold_completions_factory import ManifoldCompletionsFactory # ruff: ignore[import-outside-top-level]from pipelex.providers.openai.openai_completions_llm_worker import OpenAICompletionsLLMWorker # ruff: ignore[import-outside-top-level]+ from pipelex.providers.pipelex_hosted.pipelex_hosted_completions_factory import ( # ruff: ignore[import-outside-top-level]+ PipelexHostedCompletionsFactory,+ )model_handle = ModelHandle.make_for_inference_model(inference_model=inference_model)sdk_instance = sdk_clients.get_or_create(handle=model_handle,- build=lambda: ManifoldCompletionsFactory.make_openai_client_for_completions(model_handle=model_handle, backend=backend),+ build=lambda: PipelexHostedCompletionsFactory.make_openai_client_for_completions(model_handle=model_handle, backend=backend),)return OpenAICompletionsLLMWorker(- openai_completions_factory=ManifoldCompletionsFactory(is_http_url_enabled=False),+ openai_completions_factory=PipelexHostedCompletionsFactory(is_http_url_enabled=False),sdk_instance=sdk_instance,inference_model=inference_model,reporting_delegate=reporting_delegate,)-def _make_manifold_responses_worker(+def _make_pipelex_hosted_responses_worker(*,inference_model: InferenceModelSpec,backend: InferenceBackend,sdk_clients: SdkClientRegistry,reporting_delegate: ReportingProtocol | None,) -> InferenceWorkerAbstract:- from pipelex.providers.manifold.manifold_responses_factory import ManifoldResponsesFactory # ruff: ignore[import-outside-top-level]from pipelex.providers.openai.openai_responses_llm_worker import OpenAIResponsesLLMWorker # ruff: ignore[import-outside-top-level]+ from pipelex.providers.pipelex_hosted.pipelex_hosted_responses_factory import ( # ruff: ignore[import-outside-top-level]+ PipelexHostedResponsesFactory,+ )model_handle = ModelHandle.make_for_inference_model(inference_model=inference_model)sdk_instance = sdk_clients.get_or_create(handle=model_handle,- build=lambda: ManifoldResponsesFactory.make_openai_client_for_responses(model_handle=model_handle, backend=backend),+ build=lambda: PipelexHostedResponsesFactory.make_openai_client_for_responses(model_handle=model_handle, backend=backend),)return OpenAIResponsesLLMWorker(- openai_responses_factory=ManifoldResponsesFactory(is_http_url_enabled=False),+ openai_responses_factory=PipelexHostedResponsesFactory(is_http_url_enabled=False),sdk_instance=sdk_instance,inference_model=inference_model,reporting_delegate=reporting_delegate,)-def _make_manifold_completions_img_gen_worker(+def _make_pipelex_hosted_completions_img_gen_worker(*,inference_model: InferenceModelSpec,backend: InferenceBackend,sdk_clients: SdkClientRegistry,reporting_delegate: ReportingProtocol | None,) -> InferenceWorkerAbstract:- from pipelex.providers.manifold.manifold_completions_factory import ManifoldCompletionsFactory # ruff: ignore[import-outside-top-level]from pipelex.providers.openai.openai_completions_img_gen_worker import OpenAICompletionsImgGenWorker # ruff: ignore[import-outside-top-level]+ from pipelex.providers.pipelex_hosted.pipelex_hosted_completions_factory import ( # ruff: ignore[import-outside-top-level]+ PipelexHostedCompletionsFactory,+ )from pipelex.tools.misc.image_utils import ImageFormat # ruff: ignore[import-outside-top-level]model_handle = ModelHandle.make_for_inference_model(inference_model=inference_model)sdk_instance = sdk_clients.get_or_create(handle=model_handle,- build=lambda: ManifoldCompletionsFactory.make_openai_client_for_completions(model_handle=model_handle, backend=backend),+ build=lambda: PipelexHostedCompletionsFactory.make_openai_client_for_completions(model_handle=model_handle, backend=backend),)return OpenAICompletionsImgGenWorker(- openai_completions_factory=ManifoldCompletionsFactory(is_http_url_enabled=False),+ openai_completions_factory=PipelexHostedCompletionsFactory(is_http_url_enabled=False),sdk_instance=sdk_instance,inference_model=inference_model,reporting_delegate=reporting_delegate,@@ -129,41 +137,41 @@ def _make_manifold_completions_img_gen_worker()-def _make_manifold_img_gen_worker(+def _make_pipelex_hosted_img_gen_worker(*,inference_model: InferenceModelSpec,backend: InferenceBackend,sdk_clients: SdkClientRegistry,reporting_delegate: ReportingProtocol | None,) -> InferenceWorkerAbstract:- from pipelex.providers.manifold.manifold_factory import ManifoldFactory # ruff: ignore[import-outside-top-level]- from pipelex.providers.manifold.manifold_img_gen_worker import ManifoldImgGenWorker # ruff: ignore[import-outside-top-level]+ from pipelex.providers.pipelex_hosted.pipelex_hosted_factory import PipelexHostedFactory # ruff: ignore[import-outside-top-level]+ from pipelex.providers.pipelex_hosted.pipelex_hosted_img_gen_worker import PipelexHostedImgGenWorker # ruff: ignore[import-outside-top-level]model_handle = ModelHandle.make_for_inference_model(inference_model=inference_model)sdk_instance = sdk_clients.get_or_create(handle=model_handle,- build=lambda: ManifoldFactory.make_portkey_client(backend=backend),+ build=lambda: PipelexHostedFactory.make_portkey_client(backend=backend),)- return ManifoldImgGenWorker(+ return PipelexHostedImgGenWorker(sdk_instance=sdk_instance,inference_model=inference_model,reporting_delegate=reporting_delegate,)-def _make_manifold_extract_worker(+def _make_pipelex_hosted_extract_worker(*,inference_model: InferenceModelSpec,backend: InferenceBackend,sdk_clients: SdkClientRegistry,reporting_delegate: ReportingProtocol | None,) -> InferenceWorkerAbstract:- from pipelex.providers.manifold.manifold_extract_worker import ManifoldExtractWorker # ruff: ignore[import-outside-top-level]- from pipelex.providers.manifold.manifold_native_client import ManifoldNativeClient # ruff: ignore[import-outside-top-level]+ from pipelex.providers.pipelex_hosted.pipelex_hosted_extract_worker import PipelexHostedExtractWorker # ruff: ignore[import-outside-top-level]+ from pipelex.providers.pipelex_hosted.pipelex_hosted_native_client import PipelexHostedNativeClient # ruff: ignore[import-outside-top-level]model_handle = ModelHandle.make_for_inference_model(inference_model=inference_model)- sdk_instance = sdk_clients.get_or_create(handle=model_handle, build=lambda: ManifoldNativeClient(backend=backend))- return ManifoldExtractWorker(+ sdk_instance = sdk_clients.get_or_create(handle=model_handle, build=lambda: PipelexHostedNativeClient(backend=backend))+ return PipelexHostedExtractWorker(sdk_instance=sdk_instance,extra_config=backend.extra_config,inference_model=inference_model,@@ -171,39 +179,41 @@ def _make_manifold_extract_worker()-def _make_manifold_search_worker(+def _make_pipelex_hosted_search_worker(*,inference_model: InferenceModelSpec,backend: InferenceBackend,sdk_clients: SdkClientRegistry,reporting_delegate: ReportingProtocol | None,) -> InferenceWorkerAbstract:- from pipelex.providers.manifold.manifold_native_client import ManifoldNativeClient # ruff: ignore[import-outside-top-level]- from pipelex.providers.manifold.manifold_search_worker import ManifoldSearchWorker # ruff: ignore[import-outside-top-level]+ from pipelex.providers.pipelex_hosted.pipelex_hosted_native_client import PipelexHostedNativeClient # ruff: ignore[import-outside-top-level]+ from pipelex.providers.pipelex_hosted.pipelex_hosted_search_worker import PipelexHostedSearchWorker # ruff: ignore[import-outside-top-level]model_handle = ModelHandle.make_for_inference_model(inference_model=inference_model)- sdk_instance = sdk_clients.get_or_create(handle=model_handle, build=lambda: ManifoldNativeClient(backend=backend))- return ManifoldSearchWorker(+ sdk_instance = sdk_clients.get_or_create(handle=model_handle, build=lambda: PipelexHostedNativeClient(backend=backend))+ return PipelexHostedSearchWorker(sdk_instance=sdk_instance,inference_model=inference_model,reporting_delegate=reporting_delegate,)-class ManifoldPlugin:- """Built-in driver for the Pipelex Manifold service, serving all inference families."""+class PipelexHostedPlugin:+ """Built-in driver for the Pipelex service, serving all inference families."""- name = "manifold"+ name = "pipelex_hosted"targets_api = PLUGIN_API_VERSIONdef register(self, registrar: PluginRegistrar) -> None:- registrar.add_service_error_codes(codes=MANIFOLD_SERVICE_ERROR_CODES)- registrar.add_inference_backend(family=InferenceFamily.LLM, sdk=ManifoldSdk.ANTHROPIC, make_worker=_make_manifold_anthropic_worker)- registrar.add_inference_backend(family=InferenceFamily.LLM, sdk=ManifoldSdk.COMPLETIONS, make_worker=_make_manifold_completions_worker)- registrar.add_inference_backend(family=InferenceFamily.LLM, sdk=ManifoldSdk.RESPONSES, make_worker=_make_manifold_responses_worker)- registrar.add_inference_backend(family=InferenceFamily.IMG_GEN, sdk=ManifoldSdk.IMG_GEN, make_worker=_make_manifold_img_gen_worker)+ registrar.add_service_error_codes(codes=PIPELEX_HOSTED_SERVICE_ERROR_CODES)+ registrar.add_inference_backend(family=InferenceFamily.LLM, sdk=PipelexHostedSdk.ANTHROPIC, make_worker=_make_pipelex_hosted_anthropic_worker)+ registrar.add_inference_backend(+ family=InferenceFamily.LLM, sdk=PipelexHostedSdk.COMPLETIONS, make_worker=_make_pipelex_hosted_completions_worker+ )+ registrar.add_inference_backend(family=InferenceFamily.LLM, sdk=PipelexHostedSdk.RESPONSES, make_worker=_make_pipelex_hosted_responses_worker)+ registrar.add_inference_backend(family=InferenceFamily.IMG_GEN, sdk=PipelexHostedSdk.IMG_GEN, make_worker=_make_pipelex_hosted_img_gen_worker)registrar.add_inference_backend(- family=InferenceFamily.IMG_GEN, sdk=ManifoldSdk.COMPLETIONS, make_worker=_make_manifold_completions_img_gen_worker+ family=InferenceFamily.IMG_GEN, sdk=PipelexHostedSdk.COMPLETIONS, make_worker=_make_pipelex_hosted_completions_img_gen_worker)- registrar.add_inference_backend(family=InferenceFamily.EXTRACT, sdk=ManifoldSdk.EXTRACT, make_worker=_make_manifold_extract_worker)- registrar.add_inference_backend(family=InferenceFamily.SEARCH, sdk=ManifoldSdk.SEARCH, make_worker=_make_manifold_search_worker)+ registrar.add_inference_backend(family=InferenceFamily.EXTRACT, sdk=PipelexHostedSdk.EXTRACT, make_worker=_make_pipelex_hosted_extract_worker)+ registrar.add_inference_backend(family=InferenceFamily.SEARCH, sdk=PipelexHostedSdk.SEARCH, make_worker=_make_pipelex_hosted_search_worker)diff --git a/pipelex/providers/manifold/manifold_response_errors.py b/pipelex/providers/pipelex_hosted/pipelex_hosted_response_errors.pysimilarity index 100%rename from pipelex/providers/manifold/manifold_response_errors.pyrename to pipelex/providers/pipelex_hosted/pipelex_hosted_response_errors.pydiff --git a/pipelex/providers/manifold/manifold_responses_factory.py b/pipelex/providers/pipelex_hosted/pipelex_hosted_responses_factory.pysimilarity index 68%rename from pipelex/providers/manifold/manifold_responses_factory.pyrename to pipelex/providers/pipelex_hosted/pipelex_hosted_responses_factory.pyindex 2f7d9b856..140b8a05f 100644--- a/pipelex/providers/manifold/manifold_responses_factory.py+++ b/pipelex/providers/pipelex_hosted/pipelex_hosted_responses_factory.py@@ -1,4 +1,4 @@-"""The Responses-API factory for the Pipelex Manifold service.+"""The Responses-API factory for the Pipelex service.Thin, unlike its Chat Completions sibling: the Responses shape carries documents as its own inputparts, so there is no gateway-specific message override to copy. All this class supplies is the@@ -14,10 +14,10 @@ import openaifrom typing_extensions import overridefrom pipelex.config import get_config-from pipelex.providers.manifold.manifold_constants import ManifoldOpenAISdkVariant-from pipelex.providers.manifold.manifold_exceptions import ManifoldFactoryError-from pipelex.providers.manifold.manifold_factory import ManifoldFactoryfrom pipelex.providers.openai.openai_responses_factory import OpenAIResponsesFactory+from pipelex.providers.pipelex_hosted.pipelex_hosted_constants import PipelexHostedOpenAISdkVariant+from pipelex.providers.pipelex_hosted.pipelex_hosted_exceptions import PipelexHostedFactoryError+from pipelex.providers.pipelex_hosted.pipelex_hosted_factory import PipelexHostedFactoryif TYPE_CHECKING:from pipelex.cogt.inference.inference_job_abstract import InferenceJobAbstract@@ -26,7 +26,7 @@ if TYPE_CHECKING:from pipelex.plugins.model_handle import ModelHandle-class ManifoldResponsesFactory(OpenAIResponsesFactory):+class PipelexHostedResponsesFactory(OpenAIResponsesFactory):@classmethoddef make_openai_client_for_responses(cls,@@ -34,24 +34,24 @@ class ManifoldResponsesFactory(OpenAIResponsesFactory):*,backend: InferenceBackend,) -> openai.AsyncOpenAI:- if not ManifoldOpenAISdkVariant.is_responses(model_handle.sdk):+ if not PipelexHostedOpenAISdkVariant.is_responses(model_handle.sdk):msg = f"ModelHandle '{model_handle}' is not supported by '{cls.__name__}'"- raise ManifoldFactoryError(msg)+ raise PipelexHostedFactoryError(msg)return openai.AsyncOpenAI(- base_url=ManifoldFactory.get_base_url(backend=backend),+ base_url=PipelexHostedFactory.get_base_url(backend=backend),# Auth travels in the service's own header, not in the OpenAI Authorization one. The SDK# has rejected an empty api_key since 2.34.0, so the slot holds a placeholder the# gateway never reads.- api_key="unused-auth-via-manifold-header",+ api_key="unused-auth-via-hosted-header",# Tier 1 transport retry: set explicitly from config rather than inheriting the SDK# default, so a transport_max_retries override applies to this path too.max_retries=get_config().inference.transport_max_retries,- default_headers=ManifoldFactory.make_auth_headers(backend=backend),+ default_headers=PipelexHostedFactory.make_auth_headers(backend=backend),)@overridedef make_extras(self, inference_model: InferenceModelSpec, *, inference_job: InferenceJobAbstract, output_desc: str) -> tuple[dict[str, str], dict[str, Any]]:- return ManifoldFactory.make_extras(inference_model=inference_model, inference_job=inference_job, output_desc=output_desc)+ return PipelexHostedFactory.make_extras(inference_model=inference_model, inference_job=inference_job, output_desc=output_desc)diff --git a/pipelex/providers/manifold/manifold_schemas.py b/pipelex/providers/pipelex_hosted/pipelex_hosted_schemas.pysimilarity index 82%rename from pipelex/providers/manifold/manifold_schemas.pyrename to pipelex/providers/pipelex_hosted/pipelex_hosted_schemas.pyindex d447e07d0..bd2002b1a 100644--- a/pipelex/providers/manifold/manifold_schemas.py+++ b/pipelex/providers/pipelex_hosted/pipelex_hosted_schemas.py@@ -1,8 +1,8 @@-"""The wire shapes the manifold plugin sends and reads.+"""The wire shapes the hosted plugin sends and reads.Two groups, and they are owned by different sides.-**The native-route requests** (`ManifoldExtractRequest`, `ManifoldSearchRequest`) are this plugin's+**The native-route requests** (`PipelexHostedExtractRequest`, `PipelexHostedSearchRequest`) are this plugin'shalf of a contract the *gateway* owns and freezes, in `src/pig/pipelex/schemas.ts`. They are writtenout field by field rather than derived from the runtime's job-params models, and that is the point:several fields of `ExtractJobParams` are deliberately absent from the contract and the gateway@@ -21,14 +21,14 @@ from typing import Anyfrom pydantic import BaseModel, ConfigDict, Field-class ManifoldExtractInput(BaseModel):+class PipelexHostedExtractInput(BaseModel):"""Exactly one of the two is set; the gateway refuses neither-or-both."""document_uri: str | None = Noneimage_uri: str | None = None-class ManifoldExtractParams(BaseModel):+class PipelexHostedExtractParams(BaseModel):"""The extract parameters the contract *does* carry.`max_nb_images` keeps the runtime's own semantics — `None` unlimited, `0` none, `N` a per-page@@ -41,13 +41,13 @@ class ManifoldExtractParams(BaseModel):include_raw_html: bool | None = None-class ManifoldExtractRequest(BaseModel):+class PipelexHostedExtractRequest(BaseModel):model: str- input: ManifoldExtractInput- params: ManifoldExtractParams | None = None+ input: PipelexHostedExtractInput+ params: PipelexHostedExtractParams | None = None-class ManifoldSearchRequest(BaseModel):+class PipelexHostedSearchRequest(BaseModel):"""Flat, and with no `depth`: the model id carries it — `linkup/standard` versus `linkup/deep`."""model: str@@ -62,7 +62,7 @@ class ManifoldSearchRequest(BaseModel):output_schema: dict[str, Any] | None = None-class ManifoldImgGenAzureGptImageDatum(BaseModel):+class PipelexHostedImgGenAzureGptImageDatum(BaseModel):"""One generated image.`b64_json` is optional here although Azure always sends it on a successful generation, so that a@@ -75,7 +75,7 @@ class ManifoldImgGenAzureGptImageDatum(BaseModel):b64_json: str | None = None-class ManifoldImgGenAzureGptImage(BaseModel):+class PipelexHostedImgGenAzureGptImage(BaseModel):"""The Azure GPT Image response, as the gateway forwards it unchanged.`size` and `output_format` arrive as Azure wrote them and are what the runtime needs to build a@@ -86,4 +86,4 @@ class ManifoldImgGenAzureGptImage(BaseModel):size: str = Field(description="Size of the image, as WIDTHxHEIGHT")output_format: str = Field(description="Output format of the image")- data: list[ManifoldImgGenAzureGptImageDatum] = []+ data: list[PipelexHostedImgGenAzureGptImageDatum] = []diff --git a/pipelex/providers/manifold/manifold_search_worker.py b/pipelex/providers/pipelex_hosted/pipelex_hosted_search_worker.pysimilarity index 84%rename from pipelex/providers/manifold/manifold_search_worker.pyrename to pipelex/providers/pipelex_hosted/pipelex_hosted_search_worker.pyindex 6c1516904..a0f666de1 100644--- a/pipelex/providers/manifold/manifold_search_worker.py+++ b/pipelex/providers/pipelex_hosted/pipelex_hosted_search_worker.py@@ -1,4 +1,4 @@-"""Web search over the Pipelex Manifold service's own route.+"""Web search over the Pipelex service's own route.Thin, like its extraction sibling, and for the same reason: ``POST /v1/pipelex/search`` answers withthe search itself rather than with a chat completion whose message content is a JSON string that has@@ -8,7 +8,7 @@ to be decoded before it means anything.and a second source for a decision the gateway takes from one place is a source of disagreement, notof flexibility.-**Usage arrives as searches and has to become tokens.** See ``manifold_extract_worker`` for the+**Usage arrives as searches and has to become tokens.** See ``pipelex_hosted_extract_worker`` for thewhole of that reasoning; the failure it prevents is a cost of zero reported with no error at all."""@@ -26,11 +26,11 @@ from pipelex.cogt.search.structured_search_payload import extract_structured_seafrom pipelex.cogt.usage.token_category import NbTokensByCategoryDict, TokenCategoryfrom pipelex.core.stuffs.document_content import DocumentContentfrom pipelex.core.stuffs.search_result_content import SearchResultContent-from pipelex.providers.manifold.manifold_constants import MANIFOLD_SEARCH_ROUTE-from pipelex.providers.manifold.manifold_exceptions import ManifoldSearchEmptyResultError, ManifoldSearchResponseError-from pipelex.providers.manifold.manifold_extract_worker import MANIFOLD_UNIT_TOKENS-from pipelex.providers.manifold.manifold_native_client import ManifoldNativeClient-from pipelex.providers.manifold.manifold_schemas import ManifoldSearchRequest+from pipelex.providers.pipelex_hosted.pipelex_hosted_constants import PIPELEX_HOSTED_SEARCH_ROUTE+from pipelex.providers.pipelex_hosted.pipelex_hosted_exceptions import PipelexHostedSearchEmptyResultError, PipelexHostedSearchResponseError+from pipelex.providers.pipelex_hosted.pipelex_hosted_extract_worker import PIPELEX_HOSTED_UNIT_TOKENS+from pipelex.providers.pipelex_hosted.pipelex_hosted_native_client import PipelexHostedNativeClient+from pipelex.providers.pipelex_hosted.pipelex_hosted_schemas import PipelexHostedSearchRequestif TYPE_CHECKING:from pipelex.cogt.model_backends.model_spec import InferenceModelSpec@@ -39,7 +39,7 @@ if TYPE_CHECKING:from pipelex.tools.typing.pydantic_utils import BaseModelTypeVar-class ManifoldSearchWorker(SearchWorkerAbstract):+class PipelexHostedSearchWorker(SearchWorkerAbstract):def __init__(self,sdk_instance: Any,@@ -48,11 +48,11 @@ class ManifoldSearchWorker(SearchWorkerAbstract):):super().__init__(inference_model=inference_model, reporting_delegate=reporting_delegate)- if not isinstance(sdk_instance, ManifoldNativeClient):- msg = f"Provided search sdk_instance for {self.__class__.__name__} is not a ManifoldNativeClient: it's a '{type(sdk_instance)}'"+ if not isinstance(sdk_instance, PipelexHostedNativeClient):+ msg = f"Provided search sdk_instance for {self.__class__.__name__} is not a PipelexHostedNativeClient: it's a '{type(sdk_instance)}'"raise SdkTypeError(msg)- self.client: ManifoldNativeClient = sdk_instance+ self.client: PipelexHostedNativeClient = sdk_instance@overrideasync def _search_sourced_answer(@@ -64,7 +64,7 @@ class ManifoldSearchWorker(SearchWorkerAbstract):answer: Any = response_body.get("answer")if not isinstance(answer, str):msg = f"The search response for model '{self.inference_model.name}' carries no answer"- raise ManifoldSearchResponseError(+ raise PipelexHostedSearchResponseError(msg,error_category=InferenceErrorCategory.UNKNOWN,user_action=UserAction(@@ -116,7 +116,7 @@ class ManifoldSearchWorker(SearchWorkerAbstract):# The response was an object but carried no structured payload: the search ran and found# nothing to fill the output structure with. That is the query's fault, not the model's.msg = f"The structured search for model '{self.inference_model.name}' returned an empty structured result"- raise ManifoldSearchEmptyResultError(+ raise PipelexHostedSearchEmptyResultError(msg,error_category=InferenceErrorCategory.UNKNOWN,user_action=UserAction(@@ -129,7 +129,7 @@ class ManifoldSearchWorker(SearchWorkerAbstract):async def _call_search(self, *, search_job: SearchJob, output_schema: dict[str, Any] | None) -> dict[str, Any]:job_params = search_job.job_paramssearch_setting = job_params.search_setting- request = ManifoldSearchRequest(+ request = PipelexHostedSearchRequest(model=self.inference_model.model_id,query=search_job.query,include_images=search_setting.include_images,@@ -142,7 +142,7 @@ class ManifoldSearchWorker(SearchWorkerAbstract):output_schema=output_schema,)response_body = await self.client.post_json(- route=MANIFOLD_SEARCH_ROUTE,+ route=PIPELEX_HOSTED_SEARCH_ROUTE,body=request.model_dump(exclude_none=True),family=InferenceErrorFamily.SEARCH,inference_model=self.inference_model,@@ -162,7 +162,7 @@ class ManifoldSearchWorker(SearchWorkerAbstract):if not isinstance(nb_searches, int):returnnb_tokens: NbTokensByCategoryDict = {- TokenCategory.INPUT: nb_searches * MANIFOLD_UNIT_TOKENS,- TokenCategory.OUTPUT: nb_searches * MANIFOLD_UNIT_TOKENS,+ TokenCategory.INPUT: nb_searches * PIPELEX_HOSTED_UNIT_TOKENS,+ TokenCategory.OUTPUT: nb_searches * PIPELEX_HOSTED_UNIT_TOKENS,}search_tokens_usage.nb_tokens_by_category = nb_tokensdiff --git a/pipelex/system/job_metadata.py b/pipelex/system/job_metadata.pyindex b1fadb47e..4c5066827 100644--- a/pipelex/system/job_metadata.py+++ b/pipelex/system/job_metadata.py@@ -168,7 +168,7 @@ class RunMetadata(BaseModel):# The opaque labels the host attaches to this run. Never read by name;# telemetry forwards the whole mapping as the groups of each capture, and- # the Manifold dialect forwards it in its `x-pipelex-metadata` header+ # the hosted dialect forwards it in its `x-pipelex-metadata` header# — see `pipelex.system.run_extras` for why the host's own concepts# (organization, tenant, plan tier) deliberately do not cross this boundary,# and for the charset and the size bound.diff --git a/pipelex/system/run_extras.py b/pipelex/system/run_extras.pyindex f9d4ad530..feb8d95f4 100644--- a/pipelex/system/run_extras.py+++ b/pipelex/system/run_extras.py@@ -19,10 +19,10 @@ is the backend that supports grouping. So whatever is put here is a live groupkey in those projects and a span attribute on every OpenTelemetry export, and thebounds below are shaped by that consumer.-The inference gateway is the other reader. Every call the Pipelex Manifold+The Pipelex service is the other reader. Every call the hosteddialect makes carries the mapping, whole, in its `x-pipelex-metadata` header,-beside the runtime's own ids for the run and the step, so the gateway can-attribute the call's spend and log it (`pipelex.providers.manifold.manifold_metadata`).+beside the runtime's own ids for the run and the step, so the service can+attribute the call's spend and log it (`pipelex.providers.pipelex_hosted.pipelex_hosted_metadata`).The runtime's ids win when an extras key collides with one of them — every one oftheir names (`user_id`, `pipeline_run_id`, `pipe_run_id`, `pipe_code`,`content_generation_job_id`) fits the key charset below — because this mapping isdiff --git a/subject_grants.toml b/subject_grants.tomlindex 48576087e..c7da0cfdc 100644--- a/subject_grants.toml+++ b/subject_grants.toml@@ -4960,62 +4960,6 @@ rationale = "Factory from source: builds the sink from the config; single operanparam = "config"rationale = "Factory from source: builds the sink from the config; single operand, the LogSinkFactoryFn shape."-["pipelex/providers/manifold/manifold_completions_factory.py::ManifoldCompletionsFactory.make_openai_client_for_completions"]-param = "model_handle"-rationale = "Factory from source: builds the result from the model_handle; single operand."--["pipelex/providers/manifold/manifold_constants.py::ManifoldOpenAISdkVariant.is_completions"]-param = "sdk"-rationale = "Predicate on the sdk; single operand."--["pipelex/providers/manifold/manifold_constants.py::ManifoldOpenAISdkVariant.is_responses"]-param = "sdk"-rationale = "Predicate on the sdk; single operand."--["pipelex/providers/manifold/manifold_error_metadata.py::extract_manifold_metadata"]-param = "exc"-rationale = "Extracts from the exc; single operand."--["pipelex/providers/manifold/manifold_factory.py::ManifoldFactory._make_gemini_image_config"]-param = "taxonomy"-rationale = "Builds the image_config block from the Gemini aspect-ratio taxonomy; the job params and model name stay keyword-only."--["pipelex/providers/manifold/manifold_factory.py::ManifoldFactory.get_api_key"]-param = "backend"-rationale = "Derives the value from the backend config; single operand."--["pipelex/providers/manifold/manifold_factory.py::ManifoldFactory.get_base_url"]-param = "backend"-rationale = "Derives the value from the backend config; single operand."--["pipelex/providers/manifold/manifold_factory.py::ManifoldFactory.get_origin"]-param = "backend"-rationale = "Derives the value from the backend config; single operand."--["pipelex/providers/manifold/manifold_factory.py::ManifoldFactory.is_debug_enabled"]-param = "backend"-rationale = "Predicate: reports whether debug logging is enabled for the backend; single operand."--["pipelex/providers/manifold/manifold_factory.py::ManifoldFactory.make_auth_headers"]-param = "backend"-rationale = "Factory from source: builds the result from the backend; single operand."--["pipelex/providers/manifold/manifold_factory.py::ManifoldFactory.make_extras"]-param = "inference_model"-rationale = "Factory from source: builds the result from the inference_model; single operand."--["pipelex/providers/manifold/manifold_factory.py::ManifoldFactory.make_portkey_client"]-param = "backend"-rationale = "Factory from source: builds the result from the backend; single operand."--["pipelex/providers/manifold/manifold_plugin.py::ManifoldPlugin.register"]-param = "registrar"-rationale = "Plugin protocol register: the registrar is the sole sink the plugin populates."--["pipelex/providers/manifold/manifold_responses_factory.py::ManifoldResponsesFactory.make_openai_client_for_responses"]-param = "model_handle"-rationale = "Factory from source: builds the result from the model_handle; single operand."-["pipelex/providers/mistral/mistral_config.py::MistralConfig.get_reasoning_level"]param = "effort"rationale = "Maps the reasoning effort to a provider reasoning level; single operand."@@ -5160,6 +5104,62 @@ rationale = "Factory from source: builds the result from the extra_config; singlparam = "registrar"rationale = "Plugin protocol register: the registrar is the sole sink the plugin populates."+["pipelex/providers/pipelex_hosted/pipelex_hosted_completions_factory.py::PipelexHostedCompletionsFactory.make_openai_client_for_completions"]+param = "model_handle"+rationale = "Factory from source: builds the result from the model_handle; single operand."++["pipelex/providers/pipelex_hosted/pipelex_hosted_constants.py::PipelexHostedOpenAISdkVariant.is_completions"]+param = "sdk"+rationale = "Predicate on the sdk; single operand."++["pipelex/providers/pipelex_hosted/pipelex_hosted_constants.py::PipelexHostedOpenAISdkVariant.is_responses"]+param = "sdk"+rationale = "Predicate on the sdk; single operand."++["pipelex/providers/pipelex_hosted/pipelex_hosted_error_metadata.py::extract_pipelex_hosted_metadata"]+param = "exc"+rationale = "Extracts from the exc; single operand."++["pipelex/providers/pipelex_hosted/pipelex_hosted_factory.py::PipelexHostedFactory._make_gemini_image_config"]+param = "taxonomy"+rationale = "Builds the image_config block from the Gemini aspect-ratio taxonomy; the job params and model name stay keyword-only."++["pipelex/providers/pipelex_hosted/pipelex_hosted_factory.py::PipelexHostedFactory.get_api_key"]+param = "backend"+rationale = "Derives the value from the backend config; single operand."++["pipelex/providers/pipelex_hosted/pipelex_hosted_factory.py::PipelexHostedFactory.get_base_url"]+param = "backend"+rationale = "Derives the value from the backend config; single operand."++["pipelex/providers/pipelex_hosted/pipelex_hosted_factory.py::PipelexHostedFactory.get_origin"]+param = "backend"+rationale = "Derives the value from the backend config; single operand."++["pipelex/providers/pipelex_hosted/pipelex_hosted_factory.py::PipelexHostedFactory.is_debug_enabled"]+param = "backend"+rationale = "Predicate: reports whether debug logging is enabled for the backend; single operand."++["pipelex/providers/pipelex_hosted/pipelex_hosted_factory.py::PipelexHostedFactory.make_auth_headers"]+param = "backend"+rationale = "Factory from source: builds the result from the backend; single operand."++["pipelex/providers/pipelex_hosted/pipelex_hosted_factory.py::PipelexHostedFactory.make_extras"]+param = "inference_model"+rationale = "Factory from source: builds the result from the inference_model; single operand."++["pipelex/providers/pipelex_hosted/pipelex_hosted_factory.py::PipelexHostedFactory.make_portkey_client"]+param = "backend"+rationale = "Factory from source: builds the result from the backend; single operand."++["pipelex/providers/pipelex_hosted/pipelex_hosted_plugin.py::PipelexHostedPlugin.register"]+param = "registrar"+rationale = "Plugin protocol register: the registrar is the sole sink the plugin populates."++["pipelex/providers/pipelex_hosted/pipelex_hosted_responses_factory.py::PipelexHostedResponsesFactory.make_openai_client_for_responses"]+param = "model_handle"+rationale = "Factory from source: builds the result from the model_handle; single operand."+["pipelex/providers/portkey/portkey_completions_factory.py::PortkeyCompletionsFactory.make_portkey_openai_client_for_completions"]param = "model_handle"rationale = "Factory from source: builds the result from the model_handle; single operand."diff --git a/tests/data/errors/error_identity.txt b/tests/data/errors/error_identity.txtindex cc2bf1cc2..d58f23404 100644--- a/tests/data/errors/error_identity.txt+++ b/tests/data/errors/error_identity.txt@@ -162,13 +162,6 @@ LinkupSearchResponseError | Linkup search response | https://docs.pipelex.com/laListWhereSingularError | List where singular | https://docs.pipelex.com/latest/errors/list-where-singular-error/LogSinkHeaderValueError | Log sink header value holds a line break | https://docs.pipelex.com/latest/errors/log-sink-header-value-error/LogSinkVariableError | Log sink variable did not resolve | https://docs.pipelex.com/latest/errors/log-sink-variable-error/-ManifoldCredentialsError | Inference backend credentials missing | https://docs.pipelex.com/latest/errors/inference-backend-credentials-error/-ManifoldEndpointError | Inference backend endpoint missing | https://docs.pipelex.com/latest/errors/inference-backend-credentials-error/-ManifoldError | Inference backend error | https://docs.pipelex.com/latest/errors/cogt-error/-ManifoldExtractResponseError | Extract response unreadable | https://docs.pipelex.com/latest/errors/extract-job-failure-error/-ManifoldFactoryError | Inference client setup error | https://docs.pipelex.com/latest/errors/cogt-error/-ManifoldSearchEmptyResultError | Search returned no result | https://docs.pipelex.com/latest/errors/search-job-failure-error/-ManifoldSearchResponseError | Search response unreadable | https://docs.pipelex.com/latest/errors/search-job-failure-error/MethodDependencyFetchError | Method dependency fetch | https://docs.pipelex.com/latest/errors/method-dependency-fetch-error/MethodFetchDisabledError | Method fetch disabled | https://docs.pipelex.com/latest/errors/method-fetch-disabled-error/MethodFetchError | Method fetch | https://docs.pipelex.com/latest/errors/method-fetch-error/@@ -256,6 +249,13 @@ PipelexBridgeDispatchError | Pipelex bridge dispatch | https://docs.pipelex.com/PipelexCLIError | Pipelex CLI | https://docs.pipelex.com/latest/errors/pipelex-cli-error/PipelexConfigError | Pipelex config | https://docs.pipelex.com/latest/errors/pipelex-config-error/PipelexError | Pipelex error | https://docs.pipelex.com/latest/errors/pipelex-error/+PipelexHostedCredentialsError | Inference backend credentials missing | https://docs.pipelex.com/latest/errors/inference-backend-credentials-error/+PipelexHostedEndpointError | Inference backend endpoint missing | https://docs.pipelex.com/latest/errors/inference-backend-credentials-error/+PipelexHostedError | Inference backend error | https://docs.pipelex.com/latest/errors/cogt-error/+PipelexHostedExtractResponseError | Extract response unreadable | https://docs.pipelex.com/latest/errors/extract-job-failure-error/+PipelexHostedFactoryError | Inference client setup error | https://docs.pipelex.com/latest/errors/cogt-error/+PipelexHostedSearchEmptyResultError | Search returned no result | https://docs.pipelex.com/latest/errors/search-job-failure-error/+PipelexHostedSearchResponseError | Search response unreadable | https://docs.pipelex.com/latest/errors/search-job-failure-error/PipelexRuntimeBridgeError | Pipelex runtime bridge | https://docs.pipelex.com/latest/errors/pipelex-runtime-bridge-error/PipelexSetupError | Pipelex setup | https://docs.pipelex.com/latest/errors/pipelex-setup-error/PipelexUnexpectedError | Unexpected internal error | https://docs.pipelex.com/latest/errors/pipelex-unexpected-error/diff --git a/tests/unit/pipelex/cogt/img_gen/test_img_gen_worker_config_faults.py b/tests/unit/pipelex/cogt/img_gen/test_img_gen_worker_config_faults.pyindex 354e814ed..67ee8eb48 100644--- a/tests/unit/pipelex/cogt/img_gen/test_img_gen_worker_config_faults.py+++ b/tests/unit/pipelex/cogt/img_gen/test_img_gen_worker_config_faults.py@@ -25,8 +25,8 @@ from pipelex.plugins.model_handle import ModelHandlefrom pipelex.providers.azure_rest.azure_img_gen_worker import AzureImgGenWorkerfrom pipelex.providers.fal.fal_img_gen_worker import FalImgGenWorkerfrom pipelex.providers.huggingface.huggingface_img_gen_worker import HuggingFaceImgGenWorker-from pipelex.providers.manifold.manifold_img_gen_worker import ManifoldImgGenWorkerfrom pipelex.providers.openai.openai_img_gen_worker import OpenAIImgGenWorker+from pipelex.providers.pipelex_hosted.pipelex_hosted_img_gen_worker import PipelexHostedImgGenWorkerfrom tests.unit.pipelex.cogt.img_gen.conftest import make_img_gen_jobif TYPE_CHECKING:@@ -67,10 +67,10 @@ def _make_worker(mocker: MockerFixture, *, worker_kind: str, rules: ImgGenModelRreturn OpenAIImgGenWorker(sdk_instance=mocker.MagicMock(spec=AsyncOpenAI), inference_model=_model(backend_name="openai", sdk="openai_img_gen", rules=rules))- case "manifold":- return ManifoldImgGenWorker(+ case "pipelex_hosted":+ return PipelexHostedImgGenWorker(sdk_instance=mocker.MagicMock(spec=AsyncPortkey),- inference_model=_model(backend_name="pipelex_manifold", sdk="manifold_img_gen", rules=rules),+ inference_model=_model(backend_name="pipelex_hosted", sdk="pipelex_hosted_img_gen", rules=rules),)case "fal":return FalImgGenWorker(@@ -101,14 +101,14 @@ class TestImgGenWorkerConfigFaults:("worker_kind", "rules", "error_match"),[("openai", None, "does not have rules configured"),- ("manifold", None, "does not have rules configured"),+ ("pipelex_hosted", None, "does not have rules configured"),("fal", None, "does not have rules configured"),("huggingface", None, "does not have rules configured"),("azure", None, "does not have rules configured"),("fal", PROMPT_ONLY_RULES, "must include a 'model_choice' entry"),("huggingface", PROMPT_ONLY_RULES, "must include a 'model_choice' entry"),("openai", UNKNOWN_ASPECT_RATIO_RULES, "unknown aspect_ratio taxonomy 'gemini_9_turbo'"),- ("manifold", UNKNOWN_ASPECT_RATIO_RULES, "unknown aspect_ratio taxonomy 'gemini_9_turbo'"),+ ("pipelex_hosted", UNKNOWN_ASPECT_RATIO_RULES, "unknown aspect_ratio taxonomy 'gemini_9_turbo'"),("azure", UNKNOWN_ASPECT_RATIO_RULES, "unknown aspect_ratio taxonomy 'gemini_9_turbo'"),("openai", UNKNOWN_PROMPT_RULES, "unknown prompt taxonomy 'weird'"),("fal", UNKNOWN_PROMPT_RULES, "unknown prompt taxonomy 'weird'"),diff --git a/tests/unit/pipelex/cogt/img_gen/test_img_gen_worker_factory.py b/tests/unit/pipelex/cogt/img_gen/test_img_gen_worker_factory.pyindex 738adb53c..fc3f49542 100644--- a/tests/unit/pipelex/cogt/img_gen/test_img_gen_worker_factory.py+++ b/tests/unit/pipelex/cogt/img_gen/test_img_gen_worker_factory.py@@ -51,12 +51,12 @@ def build_builtin_inference_backend_registry() -> InferenceBackendRegistry:FACTORY_MODULE = "pipelex.cogt.img_gen.img_gen_worker_factory"-MANIFOLD_CLIENT = "pipelex.providers.manifold.manifold_factory.ManifoldFactory.make_portkey_client"+PIPELEX_HOSTED_CLIENT = "pipelex.providers.pipelex_hosted.pipelex_hosted_factory.PipelexHostedFactory.make_portkey_client"OPENAI_CLIENT = "pipelex.providers.openai.openai_client_factory.OpenAIClientFactory.make_openai_client"GOOGLE_CLIENT = "pipelex.providers.google.google_factory.GoogleFactory.make_google_client"HUGGINGFACE_PROVIDER = "pipelex.providers.huggingface.huggingface_factory.HuggingFaceFactory.make_huggingface_inference_provider"-MANIFOLD_WORKER = "pipelex.providers.manifold.manifold_img_gen_worker.ManifoldImgGenWorker"+PIPELEX_HOSTED_WORKER = "pipelex.providers.pipelex_hosted.pipelex_hosted_img_gen_worker.PipelexHostedImgGenWorker"FAL_WORKER = "pipelex.providers.fal.fal_img_gen_worker.FalImgGenWorker"HUGGINGFACE_WORKER = "pipelex.providers.huggingface.huggingface_img_gen_worker.HuggingFaceImgGenWorker"OPENAI_WORKER = "pipelex.providers.openai.openai_img_gen_worker.OpenAIImgGenWorker"@@ -110,7 +110,7 @@ class TestImgGenWorkerFactory:@pytest.mark.parametrize(("sdk", "client_target", "worker_target", "factory_cls", "http_flag", "passes_model_handle"),[- pytest.param("manifold_img_gen", MANIFOLD_CLIENT, MANIFOLD_WORKER, None, None, False, id="manifold_img_gen"),+ pytest.param("pipelex_hosted_img_gen", PIPELEX_HOSTED_CLIENT, PIPELEX_HOSTED_WORKER, None, None, False, id="pipelex_hosted_img_gen"),pytest.param("openai_img_gen", OPENAI_CLIENT, OPENAI_WORKER, None, None, True, id="openai_img_gen"),pytest.param("blackboxai_img_gen", OPENAI_CLIENT, COMPLETIONS_WORKER, BlackboxaiCompletionsFactory, True, True, id="blackboxai_img_gen"),pytest.param("openrouter_img_gen", OPENAI_CLIENT, COMPLETIONS_WORKER, OpenRouterCompletionsFactory, True, True, id="openrouter_img_gen"),@@ -229,12 +229,12 @@ class TestImgGenWorkerFactory:"""A pre-seeded registry entry is reused: the client factory must not be called."""backend = make_backend()registry = patch_hub_getters(mocker, backend=backend)- inference_model = make_img_gen_model_spec(sdk="manifold_img_gen")+ inference_model = make_img_gen_model_spec(sdk="pipelex_hosted_img_gen")model_handle = ModelHandle.make_for_inference_model(inference_model=inference_model)cached_client = mocker.MagicMock(name="cached_client")registry.set(model_handle=model_handle, sdk_instance=cached_client)- client_factory_mock = mocker.patch(MANIFOLD_CLIENT)- worker_cls_mock = mocker.patch(MANIFOLD_WORKER)+ client_factory_mock = mocker.patch(PIPELEX_HOSTED_CLIENT)+ worker_cls_mock = mocker.patch(PIPELEX_HOSTED_WORKER)ImgGenWorkerFactory.make_img_gen_worker(inference_model=inference_model)diff --git a/tests/unit/pipelex/cogt/inference/test_model_not_allowed.py b/tests/unit/pipelex/cogt/inference/test_model_not_allowed.pyindex 4bd774855..479ef388d 100644--- a/tests/unit/pipelex/cogt/inference/test_model_not_allowed.py+++ b/tests/unit/pipelex/cogt/inference/test_model_not_allowed.py@@ -50,7 +50,7 @@ from pipelex.cogt.inference.error_classify import classify_inference_errorfrom pipelex.cogt.inference.error_render import InferenceErrorFamily, render_inference_errorfrom pipelex.cogt.inference.provider_name import ProviderNamefrom pipelex.pipe_run.exceptions import PipeRouterError-from pipelex.providers.manifold.manifold_error_metadata import extract_manifold_metadata+from pipelex.providers.pipelex_hosted.pipelex_hosted_error_metadata import extract_pipelex_hosted_metadatafrom pipelex.system.pipe_run_mode import PipeRunModeif TYPE_CHECKING:@@ -121,7 +121,7 @@ def _as_the_anthropic_sdk_raises_it(*, status_code: int, body: dict[str, Any]) -def _as_plain_httpx_raises_it(*, status_code: int, body: dict[str, Any]) -> BaseException:- """The Manifold service's native ``/v1/pipelex/*`` routes, which the runtime calls over plain ``httpx``."""+ """The Pipelex service's native ``/v1/pipelex/*`` routes, which the runtime calls over plain ``httpx``."""request = httpx.Request("POST", f"{_ORIGIN}/v1/pipelex/extract")response = httpx.Response(status_code=status_code, request=request, json=body)return httpx.HTTPStatusError(f"Client error '{status_code}'", request=request, response=response)@@ -185,7 +185,7 @@ class TestTheCodeSurvivesEveryExtractHop:pytest.param(_as_the_openai_sdk_raises_it, extract_openai_metadata, id="openai-substrate"),pytest.param(_as_the_anthropic_sdk_raises_it, extract_anthropic_metadata, id="anthropic-driver"),pytest.param(_as_the_portkey_sdk_raises_it, extract_gateway_metadata, id="portkey-substrate"),- pytest.param(_as_plain_httpx_raises_it, extract_manifold_metadata, id="native-routes-httpx"),+ pytest.param(_as_plain_httpx_raises_it, extract_pipelex_hosted_metadata, id="native-routes-httpx"),],)def test_the_refusal_through_every_hop(diff --git a/tests/unit/pipelex/cogt/model_backends/test_backend_boot_tolerance.py b/tests/unit/pipelex/cogt/model_backends/test_backend_boot_tolerance.pyindex cd55bb497..50ba3a9bb 100644--- a/tests/unit/pipelex/cogt/model_backends/test_backend_boot_tolerance.py+++ b/tests/unit/pipelex/cogt/model_backends/test_backend_boot_tolerance.py@@ -266,7 +266,7 @@ class TestThePreviousReleaseKit:As that release left it, its `backends.toml` enables the Pipelex Gateway over a comment-only file andits active routing profile sends every model there: that is refused, naming the backend, rather thanbooted with every model silently missing from the deck. Once the user disables that table and picks- another profile, as the changelog says, the rest loads: the disabled Manifold table, which carries a key+ another profile, as the changelog says, the rest loads: the disabled table of the hosted backend under its former name, which carries a keythe backend blueprint does not define, is skipped before its variables are substituted or its file isread, and only the active routing profile is validated against the enabled backends."""diff --git a/tests/unit/pipelex/cogt/model_backends/test_backend_retired_model_specs_section.py b/tests/unit/pipelex/cogt/model_backends/test_backend_retired_model_specs_section.pyindex faa948492..794c9b914 100644--- a/tests/unit/pipelex/cogt/model_backends/test_backend_retired_model_specs_section.py+++ b/tests/unit/pipelex/cogt/model_backends/test_backend_retired_model_specs_section.py@@ -9,10 +9,10 @@ from pipelex.cogt.model_backends.backend_library import InferenceBackendLibraryfrom pipelex.tools.secrets.env_secrets_provider import EnvSecretsProviderBACKENDS_TOML_TEMPLATE = """-[pipelex_manifold]-display_name = "Pipelex Manifold"+[pipelex_hosted]+display_name = "Pipelex"enabled = {enabled}-model_specs_section = "manifold_model_specs"+model_specs_section = "pipelex_hosted_model_specs"api_key = "sk-not-a-real-key""""@@ -23,7 +23,7 @@ class TestBackendRetiredModelSpecsSection:def _load(self, *, tmp_path: Path, enabled: bool, lenient: bool = False) -> InferenceBackendLibrary:backends_dir = tmp_path / "backends"backends_dir.mkdir()- (backends_dir / "pipelex_manifold.toml").write_text(COMMENT_ONLY_BACKEND_TOML)+ (backends_dir / "pipelex_hosted.toml").write_text(COMMENT_ONLY_BACKEND_TOML)base_path = tmp_path / "backends.toml"base_path.write_text(BACKENDS_TOML_TEMPLATE.format(enabled=str(enabled).lower()))library = InferenceBackendLibrary.make_empty()@@ -41,9 +41,9 @@ class TestBackendRetiredModelSpecsSection:self._load(tmp_path=tmp_path, enabled=True, lenient=lenient)message = str(refused.value)- assert "pipelex_manifold" in message+ assert "pipelex_hosted" in messageassert "model_specs_section" in message- assert "backends/pipelex_manifold.toml" in message+ assert "backends/pipelex_hosted.toml" in messagedef test_a_disabled_backend_naming_it_is_skipped(self, tmp_path: Path) -> None:library = self._load(tmp_path=tmp_path, enabled=False)diff --git a/tests/unit/pipelex/cogt/model_routing/test_routing_profile_optional_routes.py b/tests/unit/pipelex/cogt/model_routing/test_routing_profile_optional_routes.pyindex e2a2497be..423246c11 100644--- a/tests/unit/pipelex/cogt/model_routing/test_routing_profile_optional_routes.py+++ b/tests/unit/pipelex/cogt/model_routing/test_routing_profile_optional_routes.py@@ -70,11 +70,11 @@ class TestRoutingProfileOptionalRoutes:"""`jev-*` sends every versioned judgment model to its backend while that backend is enabled."""routing_profile = RoutingProfile(name="test_profile",- default="pipelex_manifold",+ default="pipelex_hosted",optional_routes={"jev-*": "typesafe"},)- result = routing_profile.get_backend_match_for_model(enabled_backends=["pipelex_manifold", "typesafe"], model_name="jev-1.13.0")+ result = routing_profile.get_backend_match_for_model(enabled_backends=["pipelex_hosted", "typesafe"], model_name="jev-1.13.0")assert result is not Noneassert result.backend_name == "typesafe"@@ -90,12 +90,12 @@ class TestRoutingProfileOptionalRoutes:"""routing_profile = RoutingProfile(name="test_profile",- default="pipelex_manifold",+ default="pipelex_hosted",routes={"gpt-*": "openai"},optional_routes={"jev-*": "typesafe"},)- routing_profile.get_backend_match_for_model(enabled_backends=["pipelex_manifold", "openai", "typesafe"], model_name="jev-1.13.0")+ routing_profile.get_backend_match_for_model(enabled_backends=["pipelex_hosted", "openai", "typesafe"], model_name="jev-1.13.0")assert routing_profile.routes == {"gpt-*": "openai"}assert routing_profile.optional_routes == {"jev-*": "typesafe"}diff --git a/tests/unit/pipelex/kit/test_deck_variants.py b/tests/unit/pipelex/kit/test_deck_variants.pyindex 62cbb6337..f485aa683 100644--- a/tests/unit/pipelex/kit/test_deck_variants.py+++ b/tests/unit/pipelex/kit/test_deck_variants.py@@ -9,7 +9,7 @@ every variant through the same loader the runtime uses and holds it to the shippthe kit's backend files, because handle retirement is how a parked deck actually goes stale.The second check is scoped to the handles only the variant names. A handle the shipped deck names-too is not held to them here: some are served only through Pipelex Manifold, with no backend section+too is not held to them here: some are served only through Pipelex, with no backend sectionof their own, and the shipped deck's default aliases have their own guard in `test_shipped_deck_defaults.py`."""diff --git a/tests/unit/pipelex/migration/test_hosted_sdk_by_hand_entry.py b/tests/unit/pipelex/migration/test_hosted_sdk_by_hand_entry.pynew file mode 100644index 000000000..39cfed57a--- /dev/null+++ b/tests/unit/pipelex/migration/test_hosted_sdk_by_hand_entry.py@@ -0,0 +1,90 @@+"""The `inference-backend@4` entry, exercised on the files it is about.++The entry is `unsafe`: it rewrites nothing and only reports a backend file that still names one of the+hosted backend's former `manifold_*` SDK handles. No reference document the ledger gates replay over+carries those values, so a typo in its mapping would pass every gate and the entry would go silent on the+very files it exists for. These tests hand it such files.+"""++from typing import Any++import pytest++from pipelex.migration.engine import apply_ops_over_text, replay_ledger_over_text+from pipelex.migration.ledger import MigrationLedger, load_ledger, packaged_migration_dir+from pipelex.migration.plan import BlockedEntryReason+from pipelex.providers.pipelex_hosted.pipelex_hosted_constants import PipelexHostedSdk+from pipelex.tools.misc.toml_utils import load_toml_from_content++SURFACE_ID = "inference-backend"+ENTRY_ID = "inference-backend@4"++STALE_HOSTED_FILE = """\+[defaults]+model_type = "llm"+sdk = "manifold_completions"++["claude-4.5-sonnet"]+sdk = "manifold_anthropic"+inputs = ["text", "images"]+outputs = ["text", "structured"]+costs = { input = 3.0, output = 15.0 }++["gpt-image-1"]+model_type = "img_gen"+sdk = "manifold_img_gen"+inputs = ["text"]+outputs = ["image"]+costs = { input = 5.0, output = 40.0 }+"""++# The handles the entry renames, closed at the set that shipped: a hosted sdk added later never had a+# former spelling, so it belongs in no pair here.+RENAMED_HANDLES = (+ ("manifold_anthropic", "pipelex_hosted_anthropic"),+ ("manifold_completions", "pipelex_hosted_completions"),+ ("manifold_responses", "pipelex_hosted_responses"),+ ("manifold_img_gen", "pipelex_hosted_img_gen"),+ ("manifold_extract", "pipelex_hosted_extract"),+ ("manifold_search", "pipelex_hosted_search"),+)+++def _ledger() -> MigrationLedger:+ return load_ledger(migration_dir=packaged_migration_dir(), surface_id=SURFACE_ID)+++class TestTheHostedSdkByHandEntry:+ def test_a_stale_file_is_reported_and_left_untouched(self) -> None:+ replay = replay_ledger_over_text(ledger=_ledger(), text=STALE_HOSTED_FILE)++ assert replay.steps == []+ assert [blocked.entry_id for blocked in replay.blocked] == [ENTRY_ID]+ assert replay.blocked[0].reason == BlockedEntryReason.UNSAFE+ assert replay.blocked[0].guidance is not None+ assert "pipelex_hosted" in replay.blocked[0].guidance+ assert replay.text == STALE_HOSTED_FILE++ def test_the_operations_rewrite_every_stale_handle_to_the_current_one(self) -> None:+ """What the guidance tells the user to write is what the operations would have written."""+ entry = next(entry for entry in _ledger().migration if entry.id == ENTRY_ID)++ migrated: dict[str, Any] = load_toml_from_content(apply_ops_over_text(text=STALE_HOSTED_FILE, ops=entry.ops).text)++ assert migrated["defaults"]["sdk"] == PipelexHostedSdk.COMPLETIONS+ assert migrated["claude-4.5-sonnet"]["sdk"] == PipelexHostedSdk.ANTHROPIC+ assert migrated["gpt-image-1"]["sdk"] == PipelexHostedSdk.IMG_GEN++ @pytest.mark.parametrize(("former", "current"), RENAMED_HANDLES)+ def test_every_former_handle_maps_to_its_current_one(self, former: str, current: str) -> None:+ entry = next(entry for entry in _ledger().migration if entry.id == ENTRY_ID)+ stale = f'[defaults]\nsdk = "{former}"\n'++ migrated: dict[str, Any] = load_toml_from_content(apply_ops_over_text(text=stale, ops=entry.ops).text)++ assert migrated["defaults"]["sdk"] == current++ @pytest.mark.parametrize(("former", "current"), RENAMED_HANDLES)+ def test_every_target_is_a_handle_the_plugin_registers(self, former: str, current: str) -> None:+ assert former not in set(PipelexHostedSdk)+ assert current in set(PipelexHostedSdk)diff --git a/tests/unit/pipelex/plugins/test_inference_backend_coverage.py b/tests/unit/pipelex/plugins/test_inference_backend_coverage.pyindex f20819ac1..a66f35c36 100644--- a/tests/unit/pipelex/plugins/test_inference_backend_coverage.py+++ b/tests/unit/pipelex/plugins/test_inference_backend_coverage.py@@ -37,8 +37,8 @@ EXPECTED_BACKENDS: list[tuple[InferenceFamily, str]] = [(InferenceFamily.LLM, "azure_openai"),(InferenceFamily.LLM, "openai_responses"),(InferenceFamily.LLM, "azure_openai_responses"),- (InferenceFamily.LLM, "manifold_completions"),- (InferenceFamily.LLM, "manifold_responses"),+ (InferenceFamily.LLM, "pipelex_hosted_completions"),+ (InferenceFamily.LLM, "pipelex_hosted_responses"),(InferenceFamily.LLM, "portkey_completions"),(InferenceFamily.LLM, "portkey_responses"),(InferenceFamily.LLM, "anthropic"),@@ -48,8 +48,8 @@ EXPECTED_BACKENDS: list[tuple[InferenceFamily, str]] = [(InferenceFamily.LLM, "bedrock_aioboto"),(InferenceFamily.LLM, "google"),# IMG_GEN- (InferenceFamily.IMG_GEN, "manifold_img_gen"),- (InferenceFamily.IMG_GEN, "manifold_completions"),+ (InferenceFamily.IMG_GEN, "pipelex_hosted_img_gen"),+ (InferenceFamily.IMG_GEN, "pipelex_hosted_completions"),(InferenceFamily.IMG_GEN, "openai_img_gen"),(InferenceFamily.IMG_GEN, "blackboxai_img_gen"),(InferenceFamily.IMG_GEN, "openrouter_img_gen"),@@ -58,14 +58,14 @@ EXPECTED_BACKENDS: list[tuple[InferenceFamily, str]] = [(InferenceFamily.IMG_GEN, "azure_rest_img_gen"),(InferenceFamily.IMG_GEN, "google"),# EXTRACT- (InferenceFamily.EXTRACT, "manifold_extract"),+ (InferenceFamily.EXTRACT, "pipelex_hosted_extract"),(InferenceFamily.EXTRACT, "mistral"),(InferenceFamily.EXTRACT, "pypdfium2"),(InferenceFamily.EXTRACT, "docling_sdk"),(InferenceFamily.EXTRACT, "linkup_fetch"),# SEARCH(InferenceFamily.SEARCH, "linkup"),- (InferenceFamily.SEARCH, "manifold_search"),+ (InferenceFamily.SEARCH, "pipelex_hosted_search"),# JUDGMENT(InferenceFamily.JUDGMENT, "typesafe"),]@@ -88,13 +88,13 @@ class TestInferenceBackendCoverage:pytest.param([(InferenceFamily.EXTRACT, "linkup_fetch"), (InferenceFamily.SEARCH, "linkup")], "linkup", id="linkup"),pytest.param([- (InferenceFamily.LLM, "manifold_completions"),- (InferenceFamily.IMG_GEN, "manifold_img_gen"),- (InferenceFamily.EXTRACT, "manifold_extract"),- (InferenceFamily.SEARCH, "manifold_search"),+ (InferenceFamily.LLM, "pipelex_hosted_completions"),+ (InferenceFamily.IMG_GEN, "pipelex_hosted_img_gen"),+ (InferenceFamily.EXTRACT, "pipelex_hosted_extract"),+ (InferenceFamily.SEARCH, "pipelex_hosted_search"),],- "manifold",- id="manifold",+ "pipelex_hosted",+ id="pipelex_hosted",),],)diff --git a/tests/unit/pipelex/providers/anthropic/test_anthropic_client_auth.py b/tests/unit/pipelex/providers/anthropic/test_anthropic_client_auth.pyindex 0e1a010bf..c22ea722f 100644--- a/tests/unit/pipelex/providers/anthropic/test_anthropic_client_auth.py+++ b/tests/unit/pipelex/providers/anthropic/test_anthropic_client_auth.py@@ -2,12 +2,12 @@The anthropic SDK carries its key in `x-api-key`. That is right for Anthropic itself and for theAnthropic-compatible vendors, and wrong for a backend that fronts the protocol behind a gateway-which authenticates on a header of its own — the Pipelex Manifold service reads `x-pipelex-api-key`+which authenticates on a header of its own — the Pipelex service reads `x-pipelex-api-key`(or an `Authorization` bearer) and never looks at `x-api-key`, so a key left in the SDK's own slotreaches it as an anonymous request. A backend says which header carries its key with the`auth_header` extra-config field; these tests pin both paths and the refusal.-This lives in `providers/anthropic/` rather than in the manifold package deliberately: the driver is+This lives in `providers/anthropic/` rather than in the hosted package deliberately: the driver isshared with the plain BYOK Anthropic backend and outlives the Portkey retirement. The gate is thebackend's own declaration, so a BYOK backend takes the unchanged path.@@ -32,8 +32,8 @@ from pipelex.providers.anthropic.anthropic_factory import AnthropicFactoryif TYPE_CHECKING:from pytest_mock import MockerFixture-_MANIFOLD_AUTH_HEADER = "x-pipelex-api-key"-_MANIFOLD_ORIGIN = "https://manifold.example.com"+_PIPELEX_HOSTED_AUTH_HEADER = "x-pipelex-api-key"+_PIPELEX_HOSTED_ORIGIN = "https://pipelex_hosted.example.com"def _model_handle() -> ModelHandle:@@ -62,30 +62,30 @@ class TestAnthropicClientAuth:_patch_config(mocker)mock_client = mocker.patch("pipelex.providers.anthropic.anthropic_factory.AsyncAnthropic")backend = InferenceBackend(- name="pipelex_manifold",- endpoint=_MANIFOLD_ORIGIN,- api_key="manifold-service-token",- extra_config={"auth_header": _MANIFOLD_AUTH_HEADER},+ name="pipelex_hosted",+ endpoint=_PIPELEX_HOSTED_ORIGIN,+ api_key="hosted-service-token",+ extra_config={"auth_header": _PIPELEX_HOSTED_AUTH_HEADER},)AnthropicFactory.make_anthropic_client(model_handle=_model_handle(), backend=backend)kwargs = mock_client.call_args.kwargs- assert kwargs["default_headers"] == {_MANIFOLD_AUTH_HEADER: "manifold-service-token"}+ assert kwargs["default_headers"] == {_PIPELEX_HOSTED_AUTH_HEADER: "hosted-service-token"}# The SDK refuses an empty api_key, so the slot holds a placeholder rather than the token.- assert kwargs["api_key"] != "manifold-service-token"+ assert kwargs["api_key"] != "hosted-service-token"assert kwargs["api_key"]# The origin, not the origin plus `/v1`: this SDK appends its own `/v1/messages`.- assert kwargs["base_url"] == _MANIFOLD_ORIGIN+ assert kwargs["base_url"] == _PIPELEX_HOSTED_ORIGINdef test_auth_header_without_a_key_is_refused(self, mocker: MockerFixture) -> None:_patch_config(mocker)mocker.patch("pipelex.providers.anthropic.anthropic_factory.AsyncAnthropic")backend = InferenceBackend(- name="pipelex_manifold",- endpoint=_MANIFOLD_ORIGIN,+ name="pipelex_hosted",+ endpoint=_PIPELEX_HOSTED_ORIGIN,api_key=None,- extra_config={"auth_header": _MANIFOLD_AUTH_HEADER},+ extra_config={"auth_header": _PIPELEX_HOSTED_AUTH_HEADER},)with pytest.raises(AnthropicFactoryError, match="auth_header"):diff --git a/tests/unit/pipelex/providers/manifold/test_manifold_service_error_codes_boot.py b/tests/unit/pipelex/providers/manifold/test_manifold_service_error_codes_boot.pydeleted file mode 100644index 614d4f507..000000000--- a/tests/unit/pipelex/providers/manifold/test_manifold_service_error_codes_boot.py+++ /dev/null@@ -1,20 +0,0 @@-"""The session's boot installs the Manifold service's refusal codes on the hub, where classification reads them.--The package's other tests hand the classifier the Manifold vocabulary through the autouse fixture, which-patches the classifier's binding; this one reads the hub's own accessor, which that fixture leaves alone,-so it fails if the plugin stops contributing its codes or the boot stops installing them.-"""--from __future__ import annotations--from pipelex.providers.manifold.manifold_error_codes import MANIFOLD_SERVICE_ERROR_CODES-from pipelex.runtime_hub import get_optional_service_error_vocabulary---class TestManifoldServiceErrorCodesBoot:- def test_boot_installs_every_manifold_code_on_the_hub(self) -> None:- vocabulary = get_optional_service_error_vocabulary()-- assert vocabulary is not None- missing = {entry.code for entry in MANIFOLD_SERVICE_ERROR_CODES} - set(vocabulary.codes)- assert not missing, f"The booted vocabulary lacks Manifold codes: {sorted(missing)}"diff --git a/tests/unit/pipelex/providers/openai/test_openai_completions_img_gen_worker_output_format.py b/tests/unit/pipelex/providers/openai/test_openai_completions_img_gen_worker_output_format.pyindex 689dd679c..82146d8a1 100644--- a/tests/unit/pipelex/providers/openai/test_openai_completions_img_gen_worker_output_format.py+++ b/tests/unit/pipelex/providers/openai/test_openai_completions_img_gen_worker_output_format.py@@ -17,9 +17,9 @@ from pipelex.plugins.inference_backend_registry import InferenceFamilyfrom pipelex.plugins.model_handle import ModelHandlefrom pipelex.plugins.registrar import PluginRegistrarfrom pipelex.providers.blackboxai.blackboxai_plugin import BlackboxaiPlugin-from pipelex.providers.manifold.manifold_plugin import ManifoldPluginfrom pipelex.providers.openai.openai_completions_img_gen_worker import OpenAICompletionsImgGenWorkerfrom pipelex.providers.openrouter.openrouter_plugin import OpenRouterPlugin+from pipelex.providers.pipelex_hosted.pipelex_hosted_plugin import PipelexHostedPluginfrom pipelex.tools.misc.image_utils import ImageFormatif TYPE_CHECKING:@@ -111,11 +111,11 @@ class TestEachRegistrationPassesItsFormat:@pytest.mark.parametrize(("plugin", "sdk", "expected"),[- (ManifoldPlugin(), "manifold_completions", ImageFormat.PNG),+ (PipelexHostedPlugin(), "pipelex_hosted_completions", ImageFormat.PNG),(BlackboxaiPlugin(), "blackboxai_img_gen", ImageFormat.JPEG),(OpenRouterPlugin(), "openrouter_img_gen", None),],- ids=["manifold", "blackboxai", "openrouter"],+ ids=["pipelex_hosted", "blackboxai", "openrouter"],)def test_the_registration_builds_the_worker_with_its_format(self, mocker: MockerFixture, plugin: Any, sdk: str, expected: ImageFormat | Nonediff --git a/tests/unit/pipelex/providers/manifold/conftest.py b/tests/unit/pipelex/providers/pipelex_hosted/conftest.pysimilarity index 56%rename from tests/unit/pipelex/providers/manifold/conftest.pyrename to tests/unit/pipelex/providers/pipelex_hosted/conftest.pyindex 99bd19843..8068fa96c 100644--- a/tests/unit/pipelex/providers/manifold/conftest.py+++ b/tests/unit/pipelex/providers/pipelex_hosted/conftest.py@@ -1,21 +1,21 @@-"""Fixtures shared by the Manifold provider's unit tests."""+"""Fixtures shared by the hosted provider's unit tests."""import pytestfrom pytest_mock import MockerFixturefrom pipelex.cogt.inference.service_error_vocabulary import ServiceErrorVocabulary-from pipelex.providers.manifold.manifold_error_codes import MANIFOLD_SERVICE_ERROR_CODES+from pipelex.providers.pipelex_hosted.pipelex_hosted_error_codes import PIPELEX_HOSTED_SERVICE_ERROR_CODES@pytest.fixture(autouse=True)-def manifold_service_error_vocabulary(mocker: MockerFixture) -> ServiceErrorVocabulary:- """Hand the classifier the vocabulary the Manifold plugin contributes, as a booted runtime has it.+def pipelex_hosted_service_error_vocabulary(mocker: MockerFixture) -> ServiceErrorVocabulary:+ """Hand the classifier the vocabulary the hosted plugin contributes, as a booted runtime has it.- The Manifold service's own refusal codes are classified only because the plugin contributes them+ The Pipelex service's own refusal codes are classified only because the plugin contributes themthrough the service error vocabulary, so every test here classifies against exactly thatvocabulary, stated rather than inherited from whatever the session's boot registered. A test thatneeds the status ladder alone patches the same accessor to return ``None``."""- vocabulary = ServiceErrorVocabulary({entry.code: entry for entry in MANIFOLD_SERVICE_ERROR_CODES})+ vocabulary = ServiceErrorVocabulary({entry.code: entry for entry in PIPELEX_HOSTED_SERVICE_ERROR_CODES})mocker.patch("pipelex.cogt.inference.error_classify.get_optional_service_error_vocabulary", return_value=vocabulary)return vocabularydiff --git a/tests/unit/pipelex/providers/manifold/test_data.py b/tests/unit/pipelex/providers/pipelex_hosted/test_data.pysimilarity index 66%rename from tests/unit/pipelex/providers/manifold/test_data.pyrename to tests/unit/pipelex/providers/pipelex_hosted/test_data.pyindex ab65dc482..408cc48ec 100644--- a/tests/unit/pipelex/providers/manifold/test_data.py+++ b/tests/unit/pipelex/providers/pipelex_hosted/test_data.py@@ -1,4 +1,4 @@-"""Job metadata the manifold tests hand to a request, the header value it must produce, and catalog entries with the extras they yield."""+"""Job metadata the hosted tests hand to a request, the header value it must produce, and catalog entries with the extras they yield."""from typing import Any, ClassVar@@ -7,7 +7,7 @@ from pipelex.cogt.img_gen.img_gen_job_components import AspectRatio, SizeTierfrom pipelex.system.job_metadata import JobMetadata, RunMetadata-class ManifoldMetadataTestData:+class PipelexHostedMetadataTestData:"""A job whose run carries host labels, and the exact `x-pipelex-metadata` value it yields.The expected value is written out as the wire string rather than rebuilt from the job, so a@@ -35,8 +35,8 @@ class ManifoldMetadataTestData:)-class ManifoldExtrasBySpecTestData:- """Manifold catalog entries, written as the tables a catalog holds, and the body extras each must produce.+class PipelexHostedExtrasBySpecTestData:+ """Hosted catalog entries, written as the tables a catalog holds, and the body extras each must produce.The Gemini image entries carry no `model_id`, as the hosted catalog serves them: the spec'smodel id then defaults to the handle, which does not start with `gemini`, so only the spec's@@ -47,35 +47,40 @@ class ManifoldExtrasBySpecTestData:GEMINI_IMAGE_CASES: ClassVar[list[tuple[str, dict[str, Any], AspectRatio, SizeTier | ImageSize | None, dict[str, str]]]] = [("nano-banana",- {"model_type": "img_gen", "sdk": "manifold_completions", "rules": {"aspect_ratio": "gemini_2_5"}},+ {"model_type": "img_gen", "sdk": "pipelex_hosted_completions", "rules": {"aspect_ratio": "gemini_2_5"}},AspectRatio.LANDSCAPE_16_9,None,{"aspect_ratio": "16:9"},),("nano-banana-pro",- {"model_type": "img_gen", "sdk": "manifold_completions", "rules": {"aspect_ratio": "gemini_3_pro"}},+ {"model_type": "img_gen", "sdk": "pipelex_hosted_completions", "rules": {"aspect_ratio": "gemini_3_pro"}},AspectRatio.PORTRAIT_9_16,SizeTier.TWO_K,{"aspect_ratio": "9:16", "image_size": "2K"},),("nano-banana-2",- {"model_type": "img_gen", "sdk": "manifold_completions", "rules": {"aspect_ratio": "gemini_3_flash"}},+ {"model_type": "img_gen", "sdk": "pipelex_hosted_completions", "rules": {"aspect_ratio": "gemini_3_flash"}},AspectRatio.LANDSCAPE_4_1,SizeTier.FOUR_K,{"aspect_ratio": "4:1", "image_size": "4K"},),("nano-banana-2-lite",- {"model_type": "img_gen", "sdk": "manifold_completions", "rules": {"aspect_ratio": "gemini_3_flash_lite"}},+ {"model_type": "img_gen", "sdk": "pipelex_hosted_completions", "rules": {"aspect_ratio": "gemini_3_flash_lite"}},AspectRatio.SQUARE,SizeTier.ONE_K,{"aspect_ratio": "1:1", "image_size": "1K"},),("nano-banana",- {"model_type": "img_gen", "sdk": "manifold_completions", "model_id": "gemini-2.5-flash-image", "rules": {"aspect_ratio": "gemini_2_5"}},+ {+ "model_type": "img_gen",+ "sdk": "pipelex_hosted_completions",+ "model_id": "gemini-2.5-flash-image",+ "rules": {"aspect_ratio": "gemini_2_5"},+ },AspectRatio.PORTRAIT_3_4,None,{"aspect_ratio": "3:4"},@@ -87,12 +92,12 @@ class ManifoldExtrasBySpecTestData:("gpt_image_legacy","gpt-image-1",- {"model_type": "img_gen", "sdk": "manifold_img_gen", "rules": {"model_choice": "model_name", "aspect_ratio": "gpt_image_legacy"}},+ {"model_type": "img_gen", "sdk": "pipelex_hosted_img_gen", "rules": {"model_choice": "model_name", "aspect_ratio": "gpt_image_legacy"}},),("gpt_image_2","gpt-image-2",- {"model_type": "img_gen", "sdk": "manifold_img_gen", "rules": {"model_choice": "model_name", "aspect_ratio": "gpt_image_2"}},+ {"model_type": "img_gen", "sdk": "pipelex_hosted_img_gen", "rules": {"model_choice": "model_name", "aspect_ratio": "gpt_image_2"}},),]@@ -103,32 +108,32 @@ class ManifoldExtrasBySpecTestData:("unknown_taxonomy","nano-banana-next",- {"model_type": "img_gen", "sdk": "manifold_completions", "rules": {"aspect_ratio": "gemini_from_the_future"}},+ {"model_type": "img_gen", "sdk": "pipelex_hosted_completions", "rules": {"aspect_ratio": "gemini_from_the_future"}},"unknown aspect_ratio taxonomy 'gemini_from_the_future'",),("gemini_id_without_rules","gemini-lookalike",- {"model_type": "img_gen", "sdk": "manifold_completions", "model_id": "gemini-2.5-flash-image"},+ {"model_type": "img_gen", "sdk": "pipelex_hosted_completions", "model_id": "gemini-2.5-flash-image"},"declares no aspect_ratio rule",),("rules_without_aspect_ratio","nano-banana-bare",- {"model_type": "img_gen", "sdk": "manifold_completions", "rules": {"prompt": "positive_only"}},+ {"model_type": "img_gen", "sdk": "pipelex_hosted_completions", "rules": {"prompt": "positive_only"}},"declares no aspect_ratio rule",),]# (topic, handle, catalog entry, whether the job gets a seed): the Mistral seed still keys on the model id's prefix,- # which the one manifold Mistral handle carries whether or not the entry names the provider's id.+ # which the one hosted Mistral handle carries whether or not the entry names the provider's id.MISTRAL_SEED_CASES: ClassVar[list[tuple[str, str, dict[str, Any], bool]]] = [- ("mistral_handle_only", "mistral-large", {"sdk": "manifold_completions", "structure_method": "instructor/mistral_tools"}, True),+ ("mistral_handle_only", "mistral-large", {"sdk": "pipelex_hosted_completions", "structure_method": "instructor/mistral_tools"}, True),("mistral_provider_id","mistral-large",- {"sdk": "manifold_completions", "model_id": "Mistral-Large-3", "structure_method": "instructor/mistral_tools"},+ {"sdk": "pipelex_hosted_completions", "model_id": "Mistral-Large-3", "structure_method": "instructor/mistral_tools"},True,),- ("not_mistral", "gpt-4o", {"sdk": "manifold_responses"}, False),+ ("not_mistral", "gpt-4o", {"sdk": "pipelex_hosted_responses"}, False),]diff --git a/tests/unit/pipelex/providers/manifold/test_extract_manifold_metadata.py b/tests/unit/pipelex/providers/pipelex_hosted/test_extract_pipelex_hosted_metadata.pysimilarity index 72%rename from tests/unit/pipelex/providers/manifold/test_extract_manifold_metadata.pyrename to tests/unit/pipelex/providers/pipelex_hosted/test_extract_pipelex_hosted_metadata.pyindex 09a2023ce..da51f9e4d 100644--- a/tests/unit/pipelex/providers/manifold/test_extract_manifold_metadata.py+++ b/tests/unit/pipelex/providers/pipelex_hosted/test_extract_pipelex_hosted_metadata.py@@ -1,6 +1,6 @@-"""Which header `extract_manifold_metadata` takes the request id from, and in what order.+"""Which header `extract_pipelex_hosted_metadata` takes the request id from, and in what order.-The manifold gateway stamps its trace id on every answer a provider gave, and since the header+The Pipelex service stamps its trace id on every answer a provider gave, and since the headerspellings were given a pipelex vocabulary it emits that id twice: under `x-pipelex-trace-id`, thespelling the dialect owns, and under `x-portkey-trace-id`, the inherited one it still carries forthe vendor SDK on the image path. The two always hold the same value, so the precedence below is@@ -16,22 +16,22 @@ from __future__ import annotationsimport httpx-from pipelex.providers.manifold.manifold_error_metadata import extract_manifold_metadata+from pipelex.providers.pipelex_hosted.pipelex_hosted_error_metadata import extract_pipelex_hosted_metadata-_ORIGIN = "https://manifold.example.com"+_ORIGIN = "https://pipelex_hosted.example.com"def _refusal_with_headers(headers: dict[str, str]) -> httpx.HTTPStatusError:- """A native-route failure as the manifold client raises it: plain httpx, no vendor SDK."""+ """A native-route failure as the hosted client raises it: plain httpx, no vendor SDK."""request = httpx.Request("POST", f"{_ORIGIN}/v1/pipelex/extract")response = httpx.Response(status_code=502, request=request, headers=headers)return httpx.HTTPStatusError("Server error '502 Bad Gateway'", request=request, response=response)-class TestTheRequestIdTheManifoldPathReports:+class TestTheRequestIdThePipelexHostedPathReports:def test_reads_the_pipelex_spelled_trace_id(self) -> None:"""The spelling the dialect owns, alone on the response — where the gateway is heading."""- metadata = extract_manifold_metadata(_refusal_with_headers({"x-pipelex-trace-id": "trace-pipelex"}))+ metadata = extract_pipelex_hosted_metadata(_refusal_with_headers({"x-pipelex-trace-id": "trace-pipelex"}))assert metadata.request_id == "trace-pipelex"@@ -39,13 +39,13 @@ class TestTheRequestIdTheManifoldPathReports:"""Both spellings on the wire is what the gateway emits today, with one value under each."""headers = {"x-portkey-trace-id": "trace-vendor", "x-pipelex-trace-id": "trace-pipelex"}- metadata = extract_manifold_metadata(_refusal_with_headers(headers))+ metadata = extract_pipelex_hosted_metadata(_refusal_with_headers(headers))assert metadata.request_id == "trace-pipelex"def test_still_reads_the_vendor_spelling_while_the_gateway_emits_it(self) -> None:"""The fallback is harmless until the gateway drops the inherited spelling, and useful until then."""- metadata = extract_manifold_metadata(_refusal_with_headers({"x-portkey-trace-id": "trace-vendor"}))+ metadata = extract_pipelex_hosted_metadata(_refusal_with_headers({"x-portkey-trace-id": "trace-vendor"}))assert metadata.request_id == "trace-vendor"@@ -53,12 +53,12 @@ class TestTheRequestIdTheManifoldPathReports:"""A provider answered and named its call; that id, not the gateway's, is the one to quote."""headers = {"x-request-id": "provider-1", "x-pipelex-trace-id": "trace-pipelex", "x-portkey-trace-id": "trace-vendor"}- metadata = extract_manifold_metadata(_refusal_with_headers(headers))+ metadata = extract_pipelex_hosted_metadata(_refusal_with_headers(headers))assert metadata.request_id == "provider-1"def test_reports_no_request_id_when_no_provider_was_reached(self) -> None:"""A refusal the gateway raised before trying a provider carries neither trace spelling."""- metadata = extract_manifold_metadata(_refusal_with_headers({}))+ metadata = extract_pipelex_hosted_metadata(_refusal_with_headers({}))assert metadata.request_id is Nonediff --git a/tests/unit/pipelex/providers/manifold/test_manifold_clients.py b/tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_clients.pysimilarity index 64%rename from tests/unit/pipelex/providers/manifold/test_manifold_clients.pyrename to tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_clients.pyindex d7c875c3a..16ea8cc32 100644--- a/tests/unit/pipelex/providers/manifold/test_manifold_clients.py+++ b/tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_clients.py@@ -1,4 +1,4 @@-"""What each manifold client is handed at construction.+"""What each hosted client is handed at construction.Three SDKs sit under this package and they do not agree about `base_url`: `AsyncOpenAI` and`AsyncPortkey` both expect the version segment in it (their own defaults are@@ -20,19 +20,19 @@ import pytestfrom pipelex.cogt.model_backends.backend import InferenceBackendfrom pipelex.plugins.model_handle import ModelHandle-from pipelex.providers.manifold.manifold_completions_factory import ManifoldCompletionsFactory-from pipelex.providers.manifold.manifold_constants import ManifoldSdk-from pipelex.providers.manifold.manifold_exceptions import ManifoldFactoryError-from pipelex.providers.manifold.manifold_factory import ManifoldFactory-from pipelex.providers.manifold.manifold_responses_factory import ManifoldResponsesFactory+from pipelex.providers.pipelex_hosted.pipelex_hosted_completions_factory import PipelexHostedCompletionsFactory+from pipelex.providers.pipelex_hosted.pipelex_hosted_constants import PipelexHostedSdk+from pipelex.providers.pipelex_hosted.pipelex_hosted_exceptions import PipelexHostedFactoryError+from pipelex.providers.pipelex_hosted.pipelex_hosted_factory import PipelexHostedFactory+from pipelex.providers.pipelex_hosted.pipelex_hosted_responses_factory import PipelexHostedResponsesFactoryif TYPE_CHECKING:from collections.abc import Mappingfrom pytest_mock import MockerFixture-_ORIGIN = "https://manifold.example.com"-_TOKEN = "manifold-service-token"+_ORIGIN = "https://pipelex_hosted.example.com"+_TOKEN = "hosted-service-token"_AUTH_HEADER = "x-pipelex-api-key"# Anything that would tell the service who should serve the model. None of it belongs on this path:@@ -42,11 +42,11 @@ _ROUTING_MARKERS = ("x-portkey-config", "x-portkey-provider", "x-portkey-virtualdef _backend() -> InferenceBackend:- return InferenceBackend(name="pipelex_manifold", endpoint=_ORIGIN, api_key=_TOKEN)+ return InferenceBackend(name="pipelex_hosted", endpoint=_ORIGIN, api_key=_TOKEN)-def _handle(sdk: ManifoldSdk) -> ModelHandle:- return ModelHandle(sdk=str(sdk), backend="pipelex_manifold")+def _handle(sdk: PipelexHostedSdk) -> ModelHandle:+ return ModelHandle(sdk=str(sdk), backend="pipelex_hosted")def _patch_config(mocker: MockerFixture, module: str) -> None:@@ -58,15 +58,15 @@ def _patch_config(mocker: MockerFixture, module: str) -> None:def _assert_no_routing(kwargs: Mapping[str, Any]) -> None:rendered = str(kwargs).lower()for marker in _ROUTING_MARKERS:- assert marker not in rendered, f"the manifold client was handed a routing marker: {marker}"+ assert marker not in rendered, f"the hosted client was handed a routing marker: {marker}"-class TestManifoldCompletionsClient:+class TestPipelexHostedCompletionsClient:def test_the_client_gets_the_origin_plus_v1_and_the_token_in_the_service_header(self, mocker: MockerFixture) -> None:- _patch_config(mocker, "pipelex.providers.manifold.manifold_completions_factory")+ _patch_config(mocker, "pipelex.providers.pipelex_hosted.pipelex_hosted_completions_factory")mock_openai = mocker.patch("openai.AsyncOpenAI")- ManifoldCompletionsFactory.make_openai_client_for_completions(_handle(ManifoldSdk.COMPLETIONS), backend=_backend())+ PipelexHostedCompletionsFactory.make_openai_client_for_completions(_handle(PipelexHostedSdk.COMPLETIONS), backend=_backend())kwargs = mock_openai.call_args.kwargsassert kwargs["base_url"] == f"{_ORIGIN}/v1"@@ -79,19 +79,19 @@ class TestManifoldCompletionsClient:_assert_no_routing(kwargs)def test_a_handle_from_another_sdk_set_is_refused(self, mocker: MockerFixture) -> None:- _patch_config(mocker, "pipelex.providers.manifold.manifold_completions_factory")+ _patch_config(mocker, "pipelex.providers.pipelex_hosted.pipelex_hosted_completions_factory")mocker.patch("openai.AsyncOpenAI")- with pytest.raises(ManifoldFactoryError):- ManifoldCompletionsFactory.make_openai_client_for_completions(_handle(ManifoldSdk.RESPONSES), backend=_backend())+ with pytest.raises(PipelexHostedFactoryError):+ PipelexHostedCompletionsFactory.make_openai_client_for_completions(_handle(PipelexHostedSdk.RESPONSES), backend=_backend())-class TestManifoldResponsesClient:+class TestPipelexHostedResponsesClient:def test_the_client_gets_the_origin_plus_v1_and_the_token_in_the_service_header(self, mocker: MockerFixture) -> None:- _patch_config(mocker, "pipelex.providers.manifold.manifold_responses_factory")+ _patch_config(mocker, "pipelex.providers.pipelex_hosted.pipelex_hosted_responses_factory")mock_openai = mocker.patch("openai.AsyncOpenAI")- ManifoldResponsesFactory.make_openai_client_for_responses(_handle(ManifoldSdk.RESPONSES), backend=_backend())+ PipelexHostedResponsesFactory.make_openai_client_for_responses(_handle(PipelexHostedSdk.RESPONSES), backend=_backend())kwargs = mock_openai.call_args.kwargsassert kwargs["base_url"] == f"{_ORIGIN}/v1"@@ -100,14 +100,14 @@ class TestManifoldResponsesClient:_assert_no_routing(kwargs)def test_a_handle_from_another_sdk_set_is_refused(self, mocker: MockerFixture) -> None:- _patch_config(mocker, "pipelex.providers.manifold.manifold_responses_factory")+ _patch_config(mocker, "pipelex.providers.pipelex_hosted.pipelex_hosted_responses_factory")mocker.patch("openai.AsyncOpenAI")- with pytest.raises(ManifoldFactoryError):- ManifoldResponsesFactory.make_openai_client_for_responses(_handle(ManifoldSdk.COMPLETIONS), backend=_backend())+ with pytest.raises(PipelexHostedFactoryError):+ PipelexHostedResponsesFactory.make_openai_client_for_responses(_handle(PipelexHostedSdk.COMPLETIONS), backend=_backend())-class TestManifoldImageClient:+class TestPipelexHostedImageClient:def test_the_vendor_client_is_built_under_the_same_endpoint_rule(self, mocker: MockerFixture) -> None:"""`AsyncPortkey` is a beta-only dependency of the image path, and it obeys the same rule.@@ -116,7 +116,7 @@ class TestManifoldImageClient:"""mock_portkey = mocker.patch("portkey_ai.AsyncPortkey")- ManifoldFactory.make_portkey_client(_backend())+ PipelexHostedFactory.make_portkey_client(_backend())kwargs = mock_portkey.call_args.kwargsassert kwargs["base_url"] == f"{_ORIGIN}/v1"@@ -128,10 +128,10 @@ class TestManifoldImageClient:The Portkey-path sibling routes this through the telemetry manager's Portkey-pathknobs; reading those here would make a change meant for the cloud path silently alter the- manifold one.+ hosted one."""mocker.patch("portkey_ai.AsyncPortkey")- backend = InferenceBackend(name="pipelex_manifold", endpoint=_ORIGIN, api_key=_TOKEN, extra_config={"debug": True})+ backend = InferenceBackend(name="pipelex_hosted", endpoint=_ORIGIN, api_key=_TOKEN, extra_config={"debug": True})- assert ManifoldFactory.is_debug_enabled(backend) is True- assert ManifoldFactory.is_debug_enabled(_backend()) is False+ assert PipelexHostedFactory.is_debug_enabled(backend) is True+ assert PipelexHostedFactory.is_debug_enabled(_backend()) is Falsediff --git a/tests/unit/pipelex/providers/manifold/test_manifold_completions_messages.py b/tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_completions_messages.pysimilarity index 88%rename from tests/unit/pipelex/providers/manifold/test_manifold_completions_messages.pyrename to tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_completions_messages.pyindex b8cf3fd89..d8cbc1277 100644--- a/tests/unit/pipelex/providers/manifold/test_manifold_completions_messages.py+++ b/tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_completions_messages.py@@ -1,4 +1,4 @@-"""`ManifoldCompletionsFactory.make_simple_messages` — the override for a Pipelex-operated gateway.+"""`PipelexHostedCompletionsFactory.make_simple_messages` — the override for a Pipelex-operated gateway.Documents travel to a Pipelex-operated gateway as a `ChatCompletionContentPartImageParam` holding adata URL, not as the OpenAI file part the base class sends: the gateway translates that part into@@ -12,14 +12,14 @@ from typing import TYPE_CHECKING, Anyimport pytestfrom pipelex.cogt.image.prompt_image import PromptImageDetail-from pipelex.providers.manifold.manifold_completions_factory import ManifoldCompletionsFactory+from pipelex.providers.pipelex_hosted.pipelex_hosted_completions_factory import PipelexHostedCompletionsFactoryfrom pipelex.tools.misc.filetype_utils import FileTypefrom pipelex.tools.uri.prepared_file import PreparedFileBase64, PreparedFileHttpUrl, PreparedFileLocalPathif TYPE_CHECKING:from pytest_mock import MockerFixture-_FACTORY_NAMESPACE = "pipelex.providers.manifold.manifold_completions_factory"+_FACTORY_NAMESPACE = "pipelex.providers.pipelex_hosted.pipelex_hosted_completions_factory"_PNG_FILE_TYPE = FileType(extension="png", mime="image/png")_PDF_FILE_TYPE = FileType(extension="pdf", mime="application/pdf")@@ -44,9 +44,9 @@ def _make_llm_job(@pytest.mark.asyncio(loop_scope="class")-class TestManifoldCompletionsMessages:+class TestPipelexHostedCompletionsMessages:async def test_system_and_user_text(self, mocker: MockerFixture) -> None:- factory = ManifoldCompletionsFactory(is_http_url_enabled=False)+ factory = PipelexHostedCompletionsFactory(is_http_url_enabled=False)llm_job = _make_llm_job(mocker, system_text="You are concise.", user_text="Summarize this.")messages = await factory.make_simple_messages(llm_job=llm_job)@@ -58,7 +58,7 @@ class TestManifoldCompletionsMessages:async def test_a_document_travels_as_an_image_url_data_url(self, mocker: MockerFixture) -> None:"""The whole reason this override exists, and the reason it is not the base class's."""- factory = ManifoldCompletionsFactory(is_http_url_enabled=False)+ factory = PipelexHostedCompletionsFactory(is_http_url_enabled=False)llm_job = _make_llm_job(mocker, user_text="Read this doc.", has_documents=True)prep = mocker.patch(f"{_FACTORY_NAMESPACE}.prep_prompt_documents",@@ -91,7 +91,7 @@ class TestManifoldCompletionsMessages:image_detail: PromptImageDetail | None,expected_detail: str,) -> None:- factory = ManifoldCompletionsFactory(is_http_url_enabled=False)+ factory = PipelexHostedCompletionsFactory(is_http_url_enabled=False)llm_job = _make_llm_job(mocker, user_text="Look at these.", has_images=True, image_detail=image_detail)prep = mocker.patch(f"{_FACTORY_NAMESPACE}.prep_prompt_images",@@ -126,7 +126,7 @@ class TestManifoldCompletionsMessages:prepped_document: PreparedFileHttpUrl | PreparedFileLocalPath,expected_match: str,) -> None:- factory = ManifoldCompletionsFactory(is_http_url_enabled=False)+ factory = PipelexHostedCompletionsFactory(is_http_url_enabled=False)llm_job = _make_llm_job(mocker, user_text="text", has_documents=True)mocker.patch(f"{_FACTORY_NAMESPACE}.prep_prompt_documents", new_callable=mocker.AsyncMock, return_value=[prepped_document])diff --git a/tests/unit/pipelex/providers/manifold/test_manifold_endpoint_rule.py b/tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_endpoint_rule.pysimilarity index 59%rename from tests/unit/pipelex/providers/manifold/test_manifold_endpoint_rule.pyrename to tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_endpoint_rule.pyindex e8d26357a..4c54fd57e 100644--- a/tests/unit/pipelex/providers/manifold/test_manifold_endpoint_rule.py+++ b/tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_endpoint_rule.py@@ -1,6 +1,6 @@"""The endpoint rule, and the fallback that must not exist.-The backend declares the Pipelex Manifold service's **origin** — scheme, host and port, with no+The backend declares the Pipelex service's **origin** — scheme, host and port, with noversion segment — and each client appends what its own SDK expects beneath it. The rule is normativerather than advisory because getting it wrong is not loud: a `/v1`-suffixed endpoint under theAnthropic SDK produces `POST /v1/v1/messages`, which a gateway forwards and a provider answers with@@ -9,8 +9,8 @@ a 200-shaped failure.**The absent-endpoint case is the one worth a test of its own.** The Portkey-path sibling reads`backend.endpoint or PORTKEY_GATEWAY_URL`, which is correct there — an unset endpoint means "use thevendor's cloud". The same line on this path would mean that an empty-resolving-`PIPELEX_MANIFOLD_ENDPOINT` silently builds a client aimed at `api.portkey.ai` carrying the-*manifold* service token: a live billable request to the wrong vendor, with nothing anywhere+`PIPELEX_HOSTED_ENDPOINT` silently builds a client aimed at `api.portkey.ai` carrying the+*Pipelex* service token: a live billable request to the wrong vendor, with nothing anywherereporting it. There is no symptom to notice, which is why the refusal is pinned here."""@@ -19,48 +19,48 @@ from __future__ import annotationsimport pytestfrom pipelex.cogt.model_backends.backend import InferenceBackend-from pipelex.providers.manifold.manifold_exceptions import ManifoldCredentialsError, ManifoldEndpointError-from pipelex.providers.manifold.manifold_factory import ManifoldFactory+from pipelex.providers.pipelex_hosted.pipelex_hosted_exceptions import PipelexHostedCredentialsError, PipelexHostedEndpointError+from pipelex.providers.pipelex_hosted.pipelex_hosted_factory import PipelexHostedFactory-_ORIGIN = "https://manifold.example.com"-_TOKEN = "manifold-service-token"+_ORIGIN = "https://pipelex_hosted.example.com"+_TOKEN = "hosted-service-token"def _backend(*, endpoint: str | None = _ORIGIN, api_key: str | None = _TOKEN) -> InferenceBackend:- return InferenceBackend(name="pipelex_manifold", endpoint=endpoint, api_key=api_key)+ return InferenceBackend(name="pipelex_hosted", endpoint=endpoint, api_key=api_key)-class TestManifoldEndpointRule:+class TestPipelexHostedEndpointRule:def test_origin_is_returned_as_declared(self) -> None:- assert ManifoldFactory.get_origin(_backend()) == _ORIGIN+ assert PipelexHostedFactory.get_origin(_backend()) == _ORIGIN@pytest.mark.parametrize("declared", [f"{_ORIGIN}/", f"{_ORIGIN}///", f" {_ORIGIN} "])def test_a_trailing_slash_or_surrounding_space_is_forgiven(self, declared: str) -> None:"""The one shape of a correct answer a human types by accident, normalized rather than refused."""- assert ManifoldFactory.get_origin(_backend(endpoint=declared)) == _ORIGIN+ assert PipelexHostedFactory.get_origin(_backend(endpoint=declared)) == _ORIGINdef test_the_version_segment_is_appended_by_the_factory_not_the_operator(self) -> None:- assert ManifoldFactory.get_base_url(_backend()) == f"{_ORIGIN}/v1"+ assert PipelexHostedFactory.get_base_url(_backend()) == f"{_ORIGIN}/v1"@pytest.mark.parametrize("declared", [None, "", " ", "/"], ids=["unset", "empty", "blank", "slash-only"])def test_an_absent_endpoint_is_refused_and_never_defaulted(self, declared: str | None) -> None:- with pytest.raises(ManifoldEndpointError) as exc_info:- ManifoldFactory.get_origin(_backend(endpoint=declared))+ with pytest.raises(PipelexHostedEndpointError) as exc_info:+ PipelexHostedFactory.get_origin(_backend(endpoint=declared))# The vendor's cloud must appear nowhere in the outcome — neither as a value nor as a hint.assert "portkey" not in exc_info.value.message.lower()- assert "PIPELEX_MANIFOLD_ENDPOINT" in exc_info.value.message+ assert "PIPELEX_HOSTED_ENDPOINT" in exc_info.value.messagedef test_an_absent_api_key_is_refused_by_name(self) -> None:- with pytest.raises(ManifoldCredentialsError, match="PIPELEX_MANIFOLD_API_KEY"):- ManifoldFactory.get_api_key(_backend(api_key=None))+ with pytest.raises(PipelexHostedCredentialsError, match="PIPELEX_HOSTED_API_KEY"):+ PipelexHostedFactory.get_api_key(_backend(api_key=None))def test_the_only_header_about_us_is_the_service_token(self) -> None:"""One header, no routing.- The manifold dialect says nothing on the wire about which provider should serve a model —+ The hosted dialect says nothing on the wire about which provider should serve a model —the service decides that from the model id in the body and refuses a client that tries tosay otherwise. Asserting the whole dict rather than one key is what makes a header addedlater a red test rather than a silent widening."""- assert ManifoldFactory.make_auth_headers(_backend()) == {"x-pipelex-api-key": _TOKEN}+ assert PipelexHostedFactory.make_auth_headers(_backend()) == {"x-pipelex-api-key": _TOKEN}diff --git a/tests/unit/pipelex/providers/manifold/test_manifold_error_message.py b/tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_error_message.pysimilarity index 77%rename from tests/unit/pipelex/providers/manifold/test_manifold_error_message.pyrename to tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_error_message.pyindex f62284bbd..86a8d6141 100644--- a/tests/unit/pipelex/providers/manifold/test_manifold_error_message.py+++ b/tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_error_message.py@@ -1,4 +1,4 @@-"""Which message `extract_manifold_metadata` reports for a failure on the manifold native routes.+"""Which message `extract_pipelex_hosted_metadata` reports for a failure on the hosted native routes.`str()` of an `httpx.HTTPStatusError` is httpx's generic sentence, `Client error '401 Unauthorized'for url …`, which never says why the service refused. The gateway and the native routes explain@@ -14,15 +14,15 @@ from typing import Anyimport httpximport pytest-from pipelex.providers.manifold.manifold_error_metadata import extract_manifold_metadata+from pipelex.providers.pipelex_hosted.pipelex_hosted_error_metadata import extract_pipelex_hosted_metadata-_URL = "https://manifold.example.com/v1/pipelex/extract"+_URL = "https://pipelex_hosted.example.com/v1/pipelex/extract"_HTTPX_SENTENCE = f"Client error '401 Unauthorized' for url '{_URL}'"_GATEWAY_MESSAGE = "Portkey Error: Invalid API Key. Error Code: 03"def _status_error(*, json_body: Any | None = None, text_body: str | None = None, status_code: int = 401) -> httpx.HTTPStatusError:- """A native-route refusal as the manifold client raises it: `raise_for_status()` on a plain httpx response."""+ """A native-route refusal as the hosted client raises it: `raise_for_status()` on a plain httpx response."""request = httpx.Request("POST", _URL)if json_body is not None:response = httpx.Response(status_code=status_code, request=request, json=json_body)@@ -31,12 +31,12 @@ def _status_error(*, json_body: Any | None = None, text_body: str | None = None,return httpx.HTTPStatusError(_HTTPX_SENTENCE, request=request, response=response)-class TestTheMessageTheManifoldPathReports:+class TestTheMessageThePipelexHostedPathReports:def test_reports_the_gateways_own_message(self) -> None:"""The body the gateway sends for a refused key, verbatim — its explanation is what reaches the user."""body = {"status": "failure", "message": _GATEWAY_MESSAGE, "error": {"message": _GATEWAY_MESSAGE, "code": "03"}}- metadata = extract_manifold_metadata(_status_error(json_body=body))+ metadata = extract_pipelex_hosted_metadata(_status_error(json_body=body))assert metadata.message == _GATEWAY_MESSAGEassert metadata.provider_error_code == "03"@@ -45,14 +45,14 @@ class TestTheMessageTheManifoldPathReports:def test_prefers_the_nested_error_message_over_the_top_level_one(self) -> None:body = {"message": "top-level", "error": {"message": "nested", "code": "pig-01"}}- metadata = extract_manifold_metadata(_status_error(json_body=body))+ metadata = extract_pipelex_hosted_metadata(_status_error(json_body=body))assert metadata.message == "nested"def test_reads_the_top_level_message_when_the_error_object_has_none(self) -> None:body = {"message": "top-level", "error": {"code": "pig-01"}}- metadata = extract_manifold_metadata(_status_error(json_body=body))+ metadata = extract_pipelex_hosted_metadata(_status_error(json_body=body))assert metadata.message == "top-level"@@ -67,12 +67,12 @@ class TestTheMessageTheManifoldPathReports:],)def test_falls_back_to_the_exception_text_when_the_body_explains_nothing(self, topic: str, json_body: Any) -> None:- metadata = extract_manifold_metadata(_status_error(json_body=json_body))+ metadata = extract_pipelex_hosted_metadata(_status_error(json_body=json_body))assert metadata.message == _HTTPX_SENTENCE, topicdef test_falls_back_to_the_exception_text_when_the_body_is_not_json(self) -> None:- metadata = extract_manifold_metadata(_status_error(text_body="<html>Unauthorized</html>"))+ metadata = extract_pipelex_hosted_metadata(_status_error(text_body="<html>Unauthorized</html>"))assert metadata.message == _HTTPX_SENTENCEassert metadata.body is None@@ -81,7 +81,7 @@ class TestTheMessageTheManifoldPathReports:"""A connect or timeout failure has no response, hence no body to read a message from."""exc = httpx.ConnectError("connection refused", request=httpx.Request("POST", _URL))- metadata = extract_manifold_metadata(exc)+ metadata = extract_pipelex_hosted_metadata(exc)assert metadata.message == "connection refused"assert metadata.status_code is None@@ -97,13 +97,13 @@ class TestTheQuotaReadingOfANativeRoute429:def test_a_429_whose_body_names_a_quota_is_quota_exhaustion(self) -> None:body = {"error": {"message": "Monthly quota exceeded for this workspace"}}- metadata = extract_manifold_metadata(_status_error(json_body=body, status_code=429))+ metadata = extract_pipelex_hosted_metadata(_status_error(json_body=body, status_code=429))assert metadata.is_quota_exhaustiondef test_a_429_whose_body_names_no_quota_stays_a_rate_limit(self) -> None:body = {"error": {"message": "Too many requests, slow down"}}- metadata = extract_manifold_metadata(_status_error(json_body=body, status_code=429))+ metadata = extract_pipelex_hosted_metadata(_status_error(json_body=body, status_code=429))assert not metadata.is_quota_exhaustiondiff --git a/tests/unit/pipelex/providers/manifold/test_manifold_extract_worker.py b/tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_extract_worker.pysimilarity index 82%rename from tests/unit/pipelex/providers/manifold/test_manifold_extract_worker.pyrename to tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_extract_worker.pyindex f2342e5a3..12561bccc 100644--- a/tests/unit/pipelex/providers/manifold/test_manifold_extract_worker.py+++ b/tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_extract_worker.py@@ -24,7 +24,7 @@ import pytestfrom pipelex.cogt.extract.exceptions import ExtractInputErrorfrom pipelex.cogt.usage.token_category import NbTokensByCategoryDict, TokenCategory-from pipelex.providers.manifold.manifold_extract_worker import MANIFOLD_UNIT_TOKENS, ManifoldExtractWorker+from pipelex.providers.pipelex_hosted.pipelex_hosted_extract_worker import PIPELEX_HOSTED_UNIT_TOKENS, PipelexHostedExtractWorkerif TYPE_CHECKING:from pytest_mock import MockerFixture@@ -37,12 +37,12 @@ def _make_worker(*,is_web_page_supported: bool = False,response_body: dict[str, Any] | None = None,-) -> ManifoldExtractWorker:- worker = object.__new__(ManifoldExtractWorker)+) -> PipelexHostedExtractWorker:+ worker = object.__new__(PipelexHostedExtractWorker)model = mocker.MagicMock()model.model_id = "adi/prebuilt-layout"model.name = "azure-document-intelligence"- model.desc = "test-manifold-extract"+ model.desc = "test-hosted-extract"model.is_web_page_supported_for_extract = is_web_page_supportedworker.inference_model = modelclient = mocker.MagicMock()@@ -51,7 +51,7 @@ def _make_worker(return worker-def _post_json(worker: ManifoldExtractWorker) -> Any:+def _post_json(worker: PipelexHostedExtractWorker) -> Any:"""The stand-in for the native client, as `Any` so its mock attributes typecheck."""return worker.client.post_json@@ -68,16 +68,16 @@ def _make_extract_job(mocker: MockerFixture, *, document_uri: str | None = None,@pytest.mark.asyncio(loop_scope="class")-class TestManifoldExtractRequestBody:+class TestPipelexHostedExtractRequestBody:async def test_the_withdrawn_parameters_are_absent_rather_than_sent_at_their_defaults(self, mocker: MockerFixture) -> None:"""`should_caption_images=false` is refused by the gateway exactly as loudly as `true` is."""worker = _make_worker(mocker)mocker.patch(- "pipelex.providers.manifold.manifold_extract_worker.make_base64_url_from_any_uri",+ "pipelex.providers.pipelex_hosted.pipelex_hosted_extract_worker.make_base64_url_from_any_uri",new_callable=mocker.AsyncMock,return_value=_PDF_BYTES_URL,)- mocker.patch("pipelex.providers.manifold.manifold_extract_worker.get_storage_provider")+ mocker.patch("pipelex.providers.pipelex_hosted.pipelex_hosted_extract_worker.get_storage_provider")await worker._extract_pages(_make_extract_job(mocker, document_uri="/local/report.pdf")) # ruff: ignore[private-member-access] # pyright: ignore[reportPrivateUsage]@@ -90,11 +90,11 @@ class TestManifoldExtractRequestBody:"""The gateway refuses `render_js` on a provider that cannot honour it, null included."""worker = _make_worker(mocker)mocker.patch(- "pipelex.providers.manifold.manifold_extract_worker.make_base64_url_from_any_uri",+ "pipelex.providers.pipelex_hosted.pipelex_hosted_extract_worker.make_base64_url_from_any_uri",new_callable=mocker.AsyncMock,return_value=_PDF_BYTES_URL,)- mocker.patch("pipelex.providers.manifold.manifold_extract_worker.get_storage_provider")+ mocker.patch("pipelex.providers.pipelex_hosted.pipelex_hosted_extract_worker.get_storage_provider")await worker._extract_pages(_make_extract_job(mocker, document_uri="/local/report.pdf")) # ruff: ignore[private-member-access] # pyright: ignore[reportPrivateUsage]@@ -107,7 +107,7 @@ class TestManifoldExtractRequestBody:"""The gateway fetches `https:` on this path; turning the page into bytes here would fetch it twice."""worker = _make_worker(mocker, is_web_page_supported=True)fetch = mocker.patch(- "pipelex.providers.manifold.manifold_extract_worker.make_base64_url_from_any_uri",+ "pipelex.providers.pipelex_hosted.pipelex_hosted_extract_worker.make_base64_url_from_any_uri",new_callable=mocker.AsyncMock,)@@ -120,11 +120,11 @@ class TestManifoldExtractRequestBody:async def test_a_non_web_page_model_is_handed_the_bytes_inline(self, mocker: MockerFixture) -> None:worker = _make_worker(mocker)fetch = mocker.patch(- "pipelex.providers.manifold.manifold_extract_worker.make_base64_url_from_any_uri",+ "pipelex.providers.pipelex_hosted.pipelex_hosted_extract_worker.make_base64_url_from_any_uri",new_callable=mocker.AsyncMock,return_value=_PDF_BYTES_URL,)- mocker.patch("pipelex.providers.manifold.manifold_extract_worker.get_storage_provider")+ mocker.patch("pipelex.providers.pipelex_hosted.pipelex_hosted_extract_worker.get_storage_provider")await worker._extract_pages(_make_extract_job(mocker, document_uri="pipelex-storage://bucket/report.pdf")) # ruff: ignore[private-member-access] # pyright: ignore[reportPrivateUsage]@@ -140,14 +140,14 @@ class TestManifoldExtractRequestBody:async def test_no_input_at_all_is_refused(self, mocker: MockerFixture) -> None:worker = _make_worker(mocker)- mocker.patch("pipelex.providers.manifold.manifold_extract_worker.get_storage_provider")+ mocker.patch("pipelex.providers.pipelex_hosted.pipelex_hosted_extract_worker.get_storage_provider")with pytest.raises(ExtractInputError):await worker._extract_pages(_make_extract_job(mocker)) # ruff: ignore[private-member-access] # pyright: ignore[reportPrivateUsage]@pytest.mark.asyncio(loop_scope="class")-class TestManifoldExtractUsageTranslation:+class TestPipelexHostedExtractUsageTranslation:async def test_pages_become_megatokens_in_both_categories(self, mocker: MockerFixture) -> None:"""The figure the Portkey path reports for the same work, from a different unit.@@ -158,11 +158,11 @@ class TestManifoldExtractUsageTranslation:"""worker = _make_worker(mocker)mocker.patch(- "pipelex.providers.manifold.manifold_extract_worker.make_base64_url_from_any_uri",+ "pipelex.providers.pipelex_hosted.pipelex_hosted_extract_worker.make_base64_url_from_any_uri",new_callable=mocker.AsyncMock,return_value=_PDF_BYTES_URL,)- mocker.patch("pipelex.providers.manifold.manifold_extract_worker.get_storage_provider")+ mocker.patch("pipelex.providers.pipelex_hosted.pipelex_hosted_extract_worker.get_storage_provider")job = _make_extract_job(mocker, document_uri="/local/report.pdf")usage = mocker.MagicMock()job.job_report.extract_tokens_usage = usage@@ -170,8 +170,8 @@ class TestManifoldExtractUsageTranslation:await worker._extract_pages(job) # ruff: ignore[private-member-access] # pyright: ignore[reportPrivateUsage]assert usage.nb_tokens_by_category == {- TokenCategory.INPUT: 3 * MANIFOLD_UNIT_TOKENS,- TokenCategory.OUTPUT: 3 * MANIFOLD_UNIT_TOKENS,+ TokenCategory.INPUT: 3 * PIPELEX_HOSTED_UNIT_TOKENS,+ TokenCategory.OUTPUT: 3 * PIPELEX_HOSTED_UNIT_TOKENS,}@pytest.mark.parametrize(@@ -192,11 +192,11 @@ class TestManifoldExtractUsageTranslation:"""Silence here is correct: `ExtractWorkerAbstract` counts the pages it received instead."""worker = _make_worker(mocker, response_body=response_body)mocker.patch(- "pipelex.providers.manifold.manifold_extract_worker.make_base64_url_from_any_uri",+ "pipelex.providers.pipelex_hosted.pipelex_hosted_extract_worker.make_base64_url_from_any_uri",new_callable=mocker.AsyncMock,return_value=_PDF_BYTES_URL,)- mocker.patch("pipelex.providers.manifold.manifold_extract_worker.get_storage_provider")+ mocker.patch("pipelex.providers.pipelex_hosted.pipelex_hosted_extract_worker.get_storage_provider")job = _make_extract_job(mocker, document_uri="/local/report.pdf")usage = mocker.MagicMock()empty_categories: NbTokensByCategoryDict = {}diff --git a/tests/unit/pipelex/providers/manifold/test_manifold_extras_by_spec.py b/tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_extras_by_spec.pysimilarity index 74%rename from tests/unit/pipelex/providers/manifold/test_manifold_extras_by_spec.pyrename to tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_extras_by_spec.pyindex 5fbc3fd78..8b0f9681d 100644--- a/tests/unit/pipelex/providers/manifold/test_manifold_extras_by_spec.py+++ b/tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_extras_by_spec.py@@ -13,8 +13,8 @@ from pipelex.cogt.llm.llm_job_components import LLMJobConfig, LLMJobParams, LLMJfrom pipelex.cogt.llm.llm_prompt import LLMPromptfrom pipelex.cogt.model_backends.backend import PipelexBackendfrom pipelex.cogt.model_backends.model_spec_factory import InferenceModelSpecBlueprint, InferenceModelSpecFactory-from pipelex.providers.manifold.manifold_factory import ManifoldFactory-from tests.unit.pipelex.providers.manifold.test_data import ManifoldExtrasBySpecTestData, ManifoldMetadataTestData+from pipelex.providers.pipelex_hosted.pipelex_hosted_factory import PipelexHostedFactory+from tests.unit.pipelex.providers.pipelex_hosted.test_data import PipelexHostedExtrasBySpecTestData, PipelexHostedMetadataTestDataif TYPE_CHECKING:from pipelex.cogt.image.image_size import ImageSize@@ -22,9 +22,9 @@ if TYPE_CHECKING:def _spec(*, handle: str, entry: dict[str, Any]) -> InferenceModelSpec:- """The spec the manifold backend would build from this catalog table, through the real factory."""+ """The spec the hosted backend would build from this catalog table, through the real factory."""return InferenceModelSpecFactory.make_inference_model_spec(- PipelexBackend.MANIFOLD,+ PipelexBackend.PIPELEX_HOSTED,name=handle,blueprint=InferenceModelSpecBlueprint.model_validate(entry),backend_listed_constraints=[],@@ -34,7 +34,7 @@ def _spec(*, handle: str, entry: dict[str, Any]) -> InferenceModelSpec:def _img_gen_job(*, aspect_ratio: AspectRatio, size: SizeTier | ImageSize | None) -> ImgGenJob:return ImgGenJob(- job_metadata=ManifoldMetadataTestData.JOB_METADATA,+ job_metadata=PipelexHostedMetadataTestData.JOB_METADATA,img_gen_prompt=ImgGenPrompt(positive_text="a lighthouse at dusk"),job_params=ImgGenJobParams(aspect_ratio=aspect_ratio, size=size, background=Background.AUTO),job_config=ImgGenJobConfig(is_sync_mode=True),@@ -44,7 +44,7 @@ def _img_gen_job(*, aspect_ratio: AspectRatio, size: SizeTier | ImageSize | Nonedef _llm_job() -> LLMJob:return LLMJob(- job_metadata=ManifoldMetadataTestData.JOB_METADATA,+ job_metadata=PipelexHostedMetadataTestData.JOB_METADATA,llm_prompt=LLMPrompt(user_text="ping"),job_params=LLMJobParams(temperature=0.5),job_config=LLMJobConfig(schema_reask_max_attempts=1),@@ -52,10 +52,10 @@ def _llm_job() -> LLMJob:)-class TestManifoldExtrasBySpec:+class TestPipelexHostedExtrasBySpec:@pytest.mark.parametrize(("handle", "entry", "aspect_ratio", "size", "expected_image_config"),- ManifoldExtrasBySpecTestData.GEMINI_IMAGE_CASES,+ PipelexHostedExtrasBySpecTestData.GEMINI_IMAGE_CASES,)def test_gemini_image_spec_gets_image_config(self,@@ -69,13 +69,13 @@ class TestManifoldExtrasBySpec:spec = _spec(handle=handle, entry=entry)assert spec.model_id == entry.get("model_id", handle)- _, extra_body = ManifoldFactory.make_extras(spec, inference_job=_img_gen_job(aspect_ratio=aspect_ratio, size=size), output_desc="Image")+ _, extra_body = PipelexHostedFactory.make_extras(spec, inference_job=_img_gen_job(aspect_ratio=aspect_ratio, size=size), output_desc="Image")assert extra_body == {"image_config": expected_image_config}@pytest.mark.parametrize(("topic", "handle", "entry"),- ManifoldExtrasBySpecTestData.NON_GEMINI_IMAGE_CASES,+ PipelexHostedExtrasBySpecTestData.NON_GEMINI_IMAGE_CASES,)def test_non_gemini_image_spec_gets_no_image_config(self,@@ -86,7 +86,7 @@ class TestManifoldExtrasBySpec:"""A spec whose rules name a non-Gemini taxonomy gets no `image_config`."""spec = _spec(handle=handle, entry=entry)- _, extra_body = ManifoldFactory.make_extras(+ _, extra_body = PipelexHostedFactory.make_extras(spec, inference_job=_img_gen_job(aspect_ratio=AspectRatio.SQUARE, size=SizeTier.ONE_K), output_desc="Image")@@ -95,7 +95,7 @@ class TestManifoldExtrasBySpec:@pytest.mark.parametrize("size", [None, SizeTier.ONE_K])@pytest.mark.parametrize(("topic", "handle", "entry", "error_match"),- ManifoldExtrasBySpecTestData.UNDECIDABLE_IMAGE_CASES,+ PipelexHostedExtrasBySpecTestData.UNDECIDABLE_IMAGE_CASES,)def test_undecidable_image_spec_is_refused_as_a_configuration_fault(self,@@ -109,20 +109,22 @@ class TestManifoldExtrasBySpec:spec = _spec(handle=handle, entry=entry)with pytest.raises(ImgGenParameterError, match=error_match) as exc_info:- ManifoldFactory.make_extras(spec, inference_job=_img_gen_job(aspect_ratio=AspectRatio.SQUARE, size=size), output_desc="Image")+ PipelexHostedFactory.make_extras(spec, inference_job=_img_gen_job(aspect_ratio=AspectRatio.SQUARE, size=size), output_desc="Image")assert exc_info.value.error_category == InferenceErrorCategory.CONFIGURATIONdef test_size_beyond_the_gemini_taxonomy_is_refused(self) -> None:"""A handle-only Gemini spec still checks the request against its taxonomy's grids."""- spec = _spec(handle="nano-banana", entry=ManifoldExtrasBySpecTestData.GEMINI_IMAGE_CASES[0][1])+ spec = _spec(handle="nano-banana", entry=PipelexHostedExtrasBySpecTestData.GEMINI_IMAGE_CASES[0][1])with pytest.raises(ImgGenParameterError, match="does not support image size '2K'"):- ManifoldFactory.make_extras(spec, inference_job=_img_gen_job(aspect_ratio=AspectRatio.SQUARE, size=SizeTier.TWO_K), output_desc="Image")+ PipelexHostedFactory.make_extras(+ spec, inference_job=_img_gen_job(aspect_ratio=AspectRatio.SQUARE, size=SizeTier.TWO_K), output_desc="Image"+ )@pytest.mark.parametrize(("topic", "handle", "entry", "expects_seed"),- ManifoldExtrasBySpecTestData.MISTRAL_SEED_CASES,+ PipelexHostedExtrasBySpecTestData.MISTRAL_SEED_CASES,)def test_mistral_seed_follows_the_model_id_prefix(self,@@ -131,10 +133,10 @@ class TestManifoldExtrasBySpec:entry: dict[str, Any],expects_seed: bool,) -> None:- """The Mistral seed is sent for the manifold Mistral handle with or without a provider model id, and only for it."""+ """The Mistral seed is sent for the hosted Mistral handle with or without a provider model id, and only for it."""spec = _spec(handle=handle, entry=entry)- _, extra_body = ManifoldFactory.make_extras(spec, inference_job=_llm_job(), output_desc="text")+ _, extra_body = PipelexHostedFactory.make_extras(spec, inference_job=_llm_job(), output_desc="text")if expects_seed:assert set(extra_body) == {"seed"}diff --git a/tests/unit/pipelex/providers/manifold/test_manifold_img_gen_worker.py b/tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_img_gen_worker.pysimilarity index 90%rename from tests/unit/pipelex/providers/manifold/test_manifold_img_gen_worker.pyrename to tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_img_gen_worker.pyindex 81933dcfb..2a0979012 100644--- a/tests/unit/pipelex/providers/manifold/test_manifold_img_gen_worker.py+++ b/tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_img_gen_worker.py@@ -22,8 +22,8 @@ from portkey_ai.api_resources import exceptions as portkey_excfrom pipelex.cogt.exceptions import ImgGenGenerationError, InferenceErrorCategoryfrom pipelex.cogt.inference.error_classification import UserActionKind-from pipelex.providers.manifold.manifold_img_gen_worker import ManifoldImgGenWorker-from tests.unit.pipelex.providers.manifold.test_data import ManifoldMetadataTestData+from pipelex.providers.pipelex_hosted.pipelex_hosted_img_gen_worker import PipelexHostedImgGenWorker+from tests.unit.pipelex.providers.pipelex_hosted.test_data import PipelexHostedMetadataTestDataif TYPE_CHECKING:from pytest_mock import MockerFixture@@ -39,12 +39,12 @@ _AZURE_GPT_IMAGE_BODY = {}-def _make_worker(mocker: MockerFixture) -> ManifoldImgGenWorker:- worker = object.__new__(ManifoldImgGenWorker)+def _make_worker(mocker: MockerFixture) -> PipelexHostedImgGenWorker:+ worker = object.__new__(PipelexHostedImgGenWorker)model = mocker.MagicMock()model.model_id = "gpt-image-1"model.name = "gpt-image-1"- model.desc = "test-manifold-img-gen"+ model.desc = "test-hosted-img-gen"model.rules = mocker.MagicMock()worker.inference_model = modelclient = mocker.MagicMock()@@ -54,24 +54,24 @@ def _make_worker(mocker: MockerFixture) -> ManifoldImgGenWorker:return worker-def _images(worker: ManifoldImgGenWorker) -> Any:+def _images(worker: PipelexHostedImgGenWorker) -> Any:"""The stand-in for the vendor client's Images resource, as `Any` so its mocks typecheck."""return worker.portkey_client.imagesdef _make_img_gen_job(mocker: MockerFixture) -> Any:job = mocker.MagicMock()- job.img_gen_prompt.positive_text = "a manifold, rendered"+ job.img_gen_prompt.positive_text = "a torus, rendered"job.job_report.img_gen_tokens_usage = None- job.job_metadata = ManifoldMetadataTestData.JOB_METADATA+ job.job_metadata = PipelexHostedMetadataTestData.JOB_METADATAreturn jobdef _patch_args_factory(mocker: MockerFixture, *, args: dict[str, Any] | None = None) -> None:mocker.patch(- "pipelex.providers.manifold.manifold_img_gen_worker.ImgGenArgsFactory.make_args_for_model",+ "pipelex.providers.pipelex_hosted.pipelex_hosted_img_gen_worker.ImgGenArgsFactory.make_args_for_model",new_callable=mocker.AsyncMock,- return_value=args if args is not None else {"prompt": "a manifold, rendered"},+ return_value=args if args is not None else {"prompt": "a torus, rendered"},)@@ -92,7 +92,7 @@ def _make_response(mocker: MockerFixture, body: dict[str, Any]) -> Any:@pytest.mark.asyncio(loop_scope="class")-class TestManifoldImgGenWorkerSuccess:+class TestPipelexHostedImgGenWorkerSuccess:async def test_an_azure_gpt_image_body_becomes_generated_images(self, mocker: MockerFixture) -> None:worker = _make_worker(mocker)_patch_args_factory(mocker)@@ -136,7 +136,7 @@ class TestManifoldImgGenWorkerSuccess:@pytest.mark.asyncio(loop_scope="class")-class TestManifoldImgGenWorkerFailures:+class TestPipelexHostedImgGenWorkerFailures:async def test_a_non_json_2xx_becomes_a_categorized_error(self, mocker: MockerFixture) -> None:"""The arm with no symptom: a decode failure is not an `APIError` and catches nowhere else."""worker = _make_worker(mocker)@@ -154,7 +154,7 @@ class TestManifoldImgGenWorkerFailures:async def test_a_provider_status_error_is_classified_rather_than_raised_raw(self, mocker: MockerFixture) -> None:worker = _make_worker(mocker)_patch_args_factory(mocker)- request = httpx.Request("POST", "https://manifold.example.com/v1/images/generations")+ request = httpx.Request("POST", "https://pipelex_hosted.example.com/v1/images/generations")response = httpx.Response(status_code=429, request=request, headers={"x-request-id": "mf-1"})_images(worker).generate.side_effect = portkey_exc.RateLimitError(message="http 429",diff --git a/tests/unit/pipelex/providers/manifold/test_manifold_metadata.py b/tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_metadata.pysimilarity index 68%rename from tests/unit/pipelex/providers/manifold/test_manifold_metadata.pyrename to tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_metadata.pyindex 7193bb1e6..1fb22bd9a 100644--- a/tests/unit/pipelex/providers/manifold/test_manifold_metadata.py+++ b/tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_metadata.py@@ -1,6 +1,6 @@"""The `x-pipelex-metadata` value: its exact shape, who wins a collision, and why it cannot forge a line.-The header is how the Manifold gateway attributes spend and logs a call, so its value is asserted as+The header is how The Pipelex service attributes spend and logs a call, so its value is asserted asthe wire string. The collision rule is the security-relevant one: `extras` is caller data whose keycharset admits every one of the runtime's key names, so a label named `user_id` must never restatethe run's identity to the service that bills for it.@@ -12,15 +12,15 @@ import jsonimport pytest-from pipelex.providers.manifold.manifold_constants import MANIFOLD_AUTH_HEADER, MANIFOLD_METADATA_HEADER-from pipelex.providers.manifold.manifold_metadata import (- encode_manifold_metadata,- make_manifold_metadata,- make_manifold_metadata_headers,+from pipelex.providers.pipelex_hosted.pipelex_hosted_constants import PIPELEX_HOSTED_AUTH_HEADER, PIPELEX_HOSTED_METADATA_HEADER+from pipelex.providers.pipelex_hosted.pipelex_hosted_metadata import (+ encode_pipelex_hosted_metadata,+ make_pipelex_hosted_metadata,+ make_pipelex_hosted_metadata_headers,)from pipelex.system.job_metadata import JobMetadata, RunMetadatafrom pipelex.system.run_extras import RUN_EXTRAS_KEY_PATTERN-from tests.unit.pipelex.providers.manifold.test_data import ManifoldMetadataTestData+from tests.unit.pipelex.providers.pipelex_hosted.test_data import PipelexHostedMetadataTestData_RUNTIME_KEYS = ("user_id", "pipeline_run_id", "pipe_run_id", "pipe_code", "content_generation_job_id")@@ -47,16 +47,16 @@ def _job_metadata()-class TestManifoldMetadata:+class TestPipelexHostedMetadata:def test_the_header_is_named_by_the_dialect_and_never_by_the_vendor(self) -> None:- assert MANIFOLD_METADATA_HEADER == "x-pipelex-metadata"- assert MANIFOLD_METADATA_HEADER != MANIFOLD_AUTH_HEADER+ assert PIPELEX_HOSTED_METADATA_HEADER == "x-pipelex-metadata"+ assert PIPELEX_HOSTED_METADATA_HEADER != PIPELEX_HOSTED_AUTH_HEADERdef test_a_job_with_extras_yields_the_exact_wire_value(self) -> None:- headers = make_manifold_metadata_headers(job_metadata=ManifoldMetadataTestData.JOB_METADATA)+ headers = make_pipelex_hosted_metadata_headers(job_metadata=PipelexHostedMetadataTestData.JOB_METADATA)- assert headers == {MANIFOLD_METADATA_HEADER: ManifoldMetadataTestData.EXPECTED_HEADER_VALUE}- decoded = json.loads(headers[MANIFOLD_METADATA_HEADER])+ assert headers == {PIPELEX_HOSTED_METADATA_HEADER: PipelexHostedMetadataTestData.EXPECTED_HEADER_VALUE}+ decoded = json.loads(headers[PIPELEX_HOSTED_METADATA_HEADER])assert decoded == {"org_id": "org_acme","api_key_id": "key_123",@@ -80,7 +80,7 @@ class TestManifoldMetadata:content_generation_job_id="real_cgj",)- metadata = make_manifold_metadata(job_metadata=job_metadata)+ metadata = make_pipelex_hosted_metadata(job_metadata=job_metadata)assert metadata == {"org_id": "org_acme",@@ -95,15 +95,15 @@ class TestManifoldMetadata:"""An id the job lacks is absent, never `null`, and never filled by the caller's label of that name."""job_metadata = _job_metadata(extras={"pipe_code": "spoofed_pipe", "org_id": "org_acme"})- metadata = make_manifold_metadata(job_metadata=job_metadata)+ metadata = make_pipelex_hosted_metadata(job_metadata=job_metadata)assert metadata == {"org_id": "org_acme", "user_id": "user_42", "pipeline_run_id": "run_abc"}- assert "null" not in make_manifold_metadata_headers(job_metadata=job_metadata)[MANIFOLD_METADATA_HEADER]+ assert "null" not in make_pipelex_hosted_metadata_headers(job_metadata=job_metadata)[PIPELEX_HOSTED_METADATA_HEADER]def test_empty_extras_yield_the_runtime_ids_alone(self) -> None:- headers = make_manifold_metadata_headers(job_metadata=_job_metadata(pipe_code="p", pipe_run_id="r"))+ headers = make_pipelex_hosted_metadata_headers(job_metadata=_job_metadata(pipe_code="p", pipe_run_id="r"))- assert headers == {MANIFOLD_METADATA_HEADER: '{"user_id":"user_42","pipeline_run_id":"run_abc","pipe_run_id":"r","pipe_code":"p"}'}+ assert headers == {PIPELEX_HOSTED_METADATA_HEADER: '{"user_id":"user_42","pipeline_run_id":"run_abc","pipe_run_id":"r","pipe_code":"p"}'}@pytest.mark.parametrize("hostile_user_id",@@ -112,10 +112,10 @@ class TestManifoldMetadata:)def test_the_value_is_printable_ascii_whatever_went_in(self, hostile_user_id: str) -> None:"""`user_id` has no charset of its own, so the encoding is what keeps the header one line."""- value = make_manifold_metadata_headers(job_metadata=_job_metadata(user_id=hostile_user_id))[MANIFOLD_METADATA_HEADER]+ value = make_pipelex_hosted_metadata_headers(job_metadata=_job_metadata(user_id=hostile_user_id))[PIPELEX_HOSTED_METADATA_HEADER]assert all(0x20 <= ord(char) <= 0x7E for char in value), valueassert json.loads(value)["user_id"] == hostile_user_iddef test_the_encoding_is_compact_json(self) -> None:- assert encode_manifold_metadata(metadata={"a": "1", "b": "2"}) == '{"a":"1","b":"2"}'+ assert encode_pipelex_hosted_metadata(metadata={"a": "1", "b": "2"}) == '{"a":"1","b":"2"}'diff --git a/tests/unit/pipelex/providers/manifold/test_manifold_metadata_scope.py b/tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_metadata_scope.pysimilarity index 88%rename from tests/unit/pipelex/providers/manifold/test_manifold_metadata_scope.pyrename to tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_metadata_scope.pyindex e69d00297..888aaf77f 100644--- a/tests/unit/pipelex/providers/manifold/test_manifold_metadata_scope.py+++ b/tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_metadata_scope.py@@ -1,9 +1,9 @@-"""Only the manifold dialect sends `x-pipelex-metadata`: no direct-provider or Portkey path does.+"""Only the hosted dialect sends `x-pipelex-metadata`: no direct-provider or Portkey path does.The run's identity and the host's labels are forwarded to our own gateway, which bills and logs thecall; a vendor reached directly with the caller's own key has no use for them and must not receivethem. The Anthropic worker is the path most at risk, because it serves both a direct Anthropic-backend and Claude behind Manifold from the same code: only the extras factory the manifold package+backend and Claude behind the Pipelex service from the same code: only the extras factory the hosted packagebuilds it with adds the header, so a worker built without one sends nothing, whatever its backend."""@@ -20,12 +20,12 @@ from pipelex.cogt.llm.llm_job_components import LLMJobConfig, LLMJobParams, LLMJfrom pipelex.cogt.llm.llm_prompt import LLMPromptfrom pipelex.cogt.llm.structured_output import StructureMethodfrom pipelex.providers.anthropic.anthropic_llm_worker import AnthropicLLMWorker-from pipelex.providers.manifold.manifold_constants import MANIFOLD_METADATA_HEADERfrom pipelex.providers.openai.openai_completions_factory import OpenAICompletionsFactoryfrom pipelex.providers.openai.openai_responses_factory import OpenAIResponsesFactory+from pipelex.providers.pipelex_hosted.pipelex_hosted_constants import PIPELEX_HOSTED_METADATA_HEADERfrom pipelex.providers.portkey.portkey_factory import PortkeyFactoryfrom tests.helpers.instructor_test_utils import DummySchema-from tests.unit.pipelex.providers.manifold.test_data import ManifoldMetadataTestData+from tests.unit.pipelex.providers.pipelex_hosted.test_data import PipelexHostedMetadataTestDataif TYPE_CHECKING:from pytest_mock import MockerFixture@@ -37,7 +37,7 @@ class _RequestCapturedError(Exception):def _llm_job() -> LLMJob:return LLMJob(- job_metadata=ManifoldMetadataTestData.JOB_METADATA,+ job_metadata=PipelexHostedMetadataTestData.JOB_METADATA,llm_prompt=LLMPrompt(user_text="ping"),job_params=LLMJobParams(temperature=0.5),job_config=LLMJobConfig(schema_reask_max_attempts=1),@@ -87,7 +87,7 @@ def _tool_call_message() -> Message:@pytest.mark.asyncio(loop_scope="class")-class TestManifoldMetadataScope:+class TestPipelexHostedMetadataScope:@pytest.mark.parametrize("factory",[@@ -103,10 +103,10 @@ class TestManifoldMetadataScope:extra_headers, _ = factory.make_extras(inference_model=model, inference_job=_llm_job(), output_desc="text")- assert MANIFOLD_METADATA_HEADER not in extra_headers+ assert PIPELEX_HOSTED_METADATA_HEADER not in extra_headersassert "x-portkey-metadata" not in extra_headers- @pytest.mark.parametrize("backend_name", ["anthropic", "bedrock", "pipelex_manifold"])+ @pytest.mark.parametrize("backend_name", ["anthropic", "bedrock", "pipelex_hosted"])async def test_a_plain_anthropic_worker_sends_no_headers_on_the_text_call(self, mocker: MockerFixture, backend_name: str) -> None:sdk_client = AsyncAnthropic(api_key="test-key")stream = mocker.MagicMock(side_effect=_RequestCapturedError)@@ -118,7 +118,7 @@ class TestManifoldMetadataScope:assert "extra_headers" not in stream.call_args.kwargs- @pytest.mark.parametrize("backend_name", ["anthropic", "pipelex_manifold"])+ @pytest.mark.parametrize("backend_name", ["anthropic", "pipelex_hosted"])async def test_a_plain_anthropic_worker_sends_no_headers_on_the_structured_call(self, mocker: MockerFixture, backend_name: str) -> None:sdk_client = AsyncAnthropic(api_key="test-key")create = mocker.AsyncMock(return_value=_tool_call_message())@@ -129,4 +129,4 @@ class TestManifoldMetadataScope:await_args = create.await_argsassert await_args is not None- assert MANIFOLD_METADATA_HEADER not in str(await_args.kwargs.get("extra_headers"))+ assert PIPELEX_HOSTED_METADATA_HEADER not in str(await_args.kwargs.get("extra_headers"))diff --git a/tests/unit/pipelex/providers/manifold/test_manifold_metadata_sdk_paths.py b/tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_metadata_sdk_paths.pysimilarity index 73%rename from tests/unit/pipelex/providers/manifold/test_manifold_metadata_sdk_paths.pyrename to tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_metadata_sdk_paths.pyindex 40021e8b8..111e59bda 100644--- a/tests/unit/pipelex/providers/manifold/test_manifold_metadata_sdk_paths.py+++ b/tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_metadata_sdk_paths.py@@ -1,10 +1,10 @@-"""Every path the manifold dialect calls the service on carries `x-pipelex-metadata` for its job.+"""Every path the hosted dialect calls the service on carries `x-pipelex-metadata` for its job.The header differs per job, so it cannot be a client default: each path adds it per request, andeach is pinned here where the request leaves the runtime — the kwargs handed to the SDK call, or theheaders handed to `httpx` on the native routes. The paths are the OpenAI-substrate chat completions(text, and image generation over completions) and responses, the vendor-SDK image path, the native-extract and search routes, and Claude over the Anthropic worker the package registers as `manifold_anthropic`.+extract and search routes, and Claude over the Anthropic worker the package registers as `pipelex_hosted_anthropic`."""from __future__ import annotations@@ -22,23 +22,23 @@ from pipelex.cogt.llm.llm_prompt import LLMPromptfrom pipelex.cogt.llm.structured_output import StructureMethodfrom pipelex.cogt.model_backends.backend import InferenceBackend, PipelexBackendfrom pipelex.providers.anthropic.anthropic_llm_worker import AnthropicLLMWorker-from pipelex.providers.manifold.manifold_anthropic_extras import ManifoldAnthropicExtrasFactory-from pipelex.providers.manifold.manifold_completions_factory import ManifoldCompletionsFactory-from pipelex.providers.manifold.manifold_constants import MANIFOLD_METADATA_HEADER-from pipelex.providers.manifold.manifold_extract_worker import ManifoldExtractWorker-from pipelex.providers.manifold.manifold_img_gen_worker import ManifoldImgGenWorker-from pipelex.providers.manifold.manifold_native_client import ManifoldNativeClient-from pipelex.providers.manifold.manifold_responses_factory import ManifoldResponsesFactory-from pipelex.providers.manifold.manifold_search_worker import ManifoldSearchWorkerfrom pipelex.providers.openai.openai_completions_llm_worker import OpenAICompletionsLLMWorker+from pipelex.providers.pipelex_hosted.pipelex_hosted_anthropic_extras import PipelexHostedAnthropicExtrasFactory+from pipelex.providers.pipelex_hosted.pipelex_hosted_completions_factory import PipelexHostedCompletionsFactory+from pipelex.providers.pipelex_hosted.pipelex_hosted_constants import PIPELEX_HOSTED_METADATA_HEADER+from pipelex.providers.pipelex_hosted.pipelex_hosted_extract_worker import PipelexHostedExtractWorker+from pipelex.providers.pipelex_hosted.pipelex_hosted_img_gen_worker import PipelexHostedImgGenWorker+from pipelex.providers.pipelex_hosted.pipelex_hosted_native_client import PipelexHostedNativeClient+from pipelex.providers.pipelex_hosted.pipelex_hosted_responses_factory import PipelexHostedResponsesFactory+from pipelex.providers.pipelex_hosted.pipelex_hosted_search_worker import PipelexHostedSearchWorkerfrom tests.helpers.instructor_test_utils import DummySchema-from tests.unit.pipelex.providers.manifold.test_data import ManifoldMetadataTestData+from tests.unit.pipelex.providers.pipelex_hosted.test_data import PipelexHostedMetadataTestDataif TYPE_CHECKING:from pytest_mock import MockerFixture-_EXPECTED = {MANIFOLD_METADATA_HEADER: ManifoldMetadataTestData.EXPECTED_HEADER_VALUE}-_ORIGIN = "https://manifold.example.com"+_EXPECTED = {PIPELEX_HOSTED_METADATA_HEADER: PipelexHostedMetadataTestData.EXPECTED_HEADER_VALUE}+_ORIGIN = "https://pipelex_hosted.example.com"class _RequestCapturedError(Exception):@@ -47,7 +47,7 @@ class _RequestCapturedError(Exception):def _llm_job() -> LLMJob:return LLMJob(- job_metadata=ManifoldMetadataTestData.JOB_METADATA,+ job_metadata=PipelexHostedMetadataTestData.JOB_METADATA,llm_prompt=LLMPrompt(user_text="ping"),job_params=LLMJobParams(temperature=0.5),job_config=LLMJobConfig(schema_reask_max_attempts=1),@@ -55,7 +55,7 @@ def _llm_job() -> LLMJob:)-def _model(mocker: MockerFixture, *, backend_name: str = PipelexBackend.MANIFOLD, model_id: str = "gpt-4o") -> Any:+def _model(mocker: MockerFixture, *, backend_name: str = PipelexBackend.PIPELEX_HOSTED, model_id: str = "gpt-4o") -> Any:model = mocker.MagicMock()model.desc = "test-model-desc"model.model_id = model_id@@ -67,8 +67,8 @@ def _model(mocker: MockerFixture, *, backend_name: str = PipelexBackend.MANIFOLDreturn model-def _native_client() -> ManifoldNativeClient:- return ManifoldNativeClient(backend=InferenceBackend(name="pipelex_manifold", endpoint=_ORIGIN, api_key="token"))+def _native_client() -> PipelexHostedNativeClient:+ return PipelexHostedNativeClient(backend=InferenceBackend(name="pipelex_hosted", endpoint=_ORIGIN, api_key="token"))def _patch_httpx_post(mocker: MockerFixture, *, json_body: dict[str, Any]) -> Any:@@ -83,7 +83,7 @@ def _anthropic_worker(mocker: MockerFixture, *, sdk_client: AsyncAnthropic, backmodel = _model(mocker, backend_name=backend_name, model_id="claude-test")model.structure_method = StructureMethod.INSTRUCTOR_ANTHROPIC_TOOLSworker.inference_model = model- worker.extras_factory = ManifoldAnthropicExtrasFactory()+ worker.extras_factory = PipelexHostedAnthropicExtrasFactory()worker.default_max_tokens = 4096worker.instructor_for_objects = from_anthropic(client=sdk_client, mode=StructureMethod.INSTRUCTOR_ANTHROPIC_TOOLS.as_instructor_mode())config = mocker.MagicMock()@@ -106,10 +106,10 @@ def _tool_call_message() -> Message:@pytest.mark.asyncio(loop_scope="class")-class TestManifoldMetadataSdkPaths:+class TestPipelexHostedMetadataSdkPaths:@pytest.mark.parametrize("factory",- [ManifoldCompletionsFactory(is_http_url_enabled=False), ManifoldResponsesFactory(is_http_url_enabled=False)],+ [PipelexHostedCompletionsFactory(is_http_url_enabled=False), PipelexHostedResponsesFactory(is_http_url_enabled=False)],ids=["completions", "responses"],)async def test_the_openai_substrate_extras_carry_the_header(self, mocker: MockerFixture, factory: Any) -> None:@@ -120,9 +120,9 @@ class TestManifoldMetadataSdkPaths:async def test_a_catalog_header_of_the_same_name_does_not_override_the_job(self, mocker: MockerFixture) -> None:model = _model(mocker)- model.extra_headers = {"anthropic-beta": "some-beta", MANIFOLD_METADATA_HEADER: '{"user_id":"catalog"}'}+ model.extra_headers = {"anthropic-beta": "some-beta", PIPELEX_HOSTED_METADATA_HEADER: '{"user_id":"catalog"}'}- extra_headers, _ = ManifoldCompletionsFactory(is_http_url_enabled=False).make_extras(+ extra_headers, _ = PipelexHostedCompletionsFactory(is_http_url_enabled=False).make_extras(inference_model=model, inference_job=_llm_job(), output_desc="text")@@ -131,7 +131,7 @@ class TestManifoldMetadataSdkPaths:async def test_the_completions_worker_sends_the_header_on_the_sdk_call(self, mocker: MockerFixture) -> None:worker = object.__new__(OpenAICompletionsLLMWorker)worker.inference_model = _model(mocker)- worker.openai_completions_factory = ManifoldCompletionsFactory(is_http_url_enabled=False)+ worker.openai_completions_factory = PipelexHostedCompletionsFactory(is_http_url_enabled=False)client = mocker.MagicMock()client.chat.completions.create = mocker.AsyncMock(side_effect=_RequestCapturedError)worker.openai_client_for_text = client@@ -147,19 +147,19 @@ class TestManifoldMetadataSdkPaths:ids=["generate", "edit"],)async def test_the_image_worker_sends_the_header_on_both_images_routes(self, mocker: MockerFixture, args: dict[str, Any], route: str) -> None:- worker = object.__new__(ManifoldImgGenWorker)+ worker = object.__new__(PipelexHostedImgGenWorker)worker.inference_model = _model(mocker, model_id="gpt-image-1")client: Any = mocker.MagicMock()client.images.generate = mocker.AsyncMock(side_effect=_RequestCapturedError)client.images.edit = mocker.AsyncMock(side_effect=_RequestCapturedError)worker.portkey_client = clientmocker.patch(- "pipelex.providers.manifold.manifold_img_gen_worker.ImgGenArgsFactory.make_args_for_model",+ "pipelex.providers.pipelex_hosted.pipelex_hosted_img_gen_worker.ImgGenArgsFactory.make_args_for_model",new_callable=mocker.AsyncMock,return_value=args,)job = mocker.MagicMock()- job.job_metadata = ManifoldMetadataTestData.JOB_METADATA+ job.job_metadata = PipelexHostedMetadataTestData.JOB_METADATAwith pytest.raises(_RequestCapturedError):await worker._gen_image_list(img_gen_job=job, nb_images=1) # ruff: ignore[private-member-access] # pyright: ignore[reportPrivateUsage]@@ -168,13 +168,13 @@ class TestManifoldMetadataSdkPaths:async def test_the_extract_route_sends_the_header_on_the_wire(self, mocker: MockerFixture) -> None:post = _patch_httpx_post(mocker, json_body={"pages": {}})- worker = object.__new__(ManifoldExtractWorker)+ worker = object.__new__(PipelexHostedExtractWorker)model = _model(mocker, model_id="firecrawl/scrape")model.is_web_page_supported_for_extract = Trueworker.inference_model = modelworker.client = _native_client()job = mocker.MagicMock()- job.job_metadata = ManifoldMetadataTestData.JOB_METADATA+ job.job_metadata = PipelexHostedMetadataTestData.JOB_METADATAjob.extract_input.document_uri = "https://example.com/page"job.job_params.max_nb_images = Nonejob.job_params.render_js = None@@ -183,16 +183,16 @@ class TestManifoldMetadataSdkPaths:await worker._extract_pages(job) # ruff: ignore[private-member-access] # pyright: ignore[reportPrivateUsage]- assert post.call_args.kwargs["headers"][MANIFOLD_METADATA_HEADER] == ManifoldMetadataTestData.EXPECTED_HEADER_VALUE+ assert post.call_args.kwargs["headers"][PIPELEX_HOSTED_METADATA_HEADER] == PipelexHostedMetadataTestData.EXPECTED_HEADER_VALUEasync def test_the_search_route_sends_the_header_on_the_wire(self, mocker: MockerFixture) -> None:- post = _patch_httpx_post(mocker, json_body={"answer": "a manifold is a space", "sources": []})- worker = object.__new__(ManifoldSearchWorker)+ post = _patch_httpx_post(mocker, json_body={"answer": "a torus is a surface", "sources": []})+ worker = object.__new__(PipelexHostedSearchWorker)worker.inference_model = _model(mocker, model_id="linkup/standard")worker.client = _native_client()job = mocker.MagicMock()- job.job_metadata = ManifoldMetadataTestData.JOB_METADATA- job.query = "what is a manifold"+ job.job_metadata = PipelexHostedMetadataTestData.JOB_METADATA+ job.query = "what is a torus"job.job_params.search_setting.include_images = Falsejob.job_params.search_setting.include_inline_citations = Falsejob.job_params.search_setting.max_results = 10@@ -204,13 +204,13 @@ class TestManifoldMetadataSdkPaths:await worker._search_sourced_answer(job) # ruff: ignore[private-member-access] # pyright: ignore[reportPrivateUsage]- assert post.call_args.kwargs["headers"][MANIFOLD_METADATA_HEADER] == ManifoldMetadataTestData.EXPECTED_HEADER_VALUE+ assert post.call_args.kwargs["headers"][PIPELEX_HOSTED_METADATA_HEADER] == PipelexHostedMetadataTestData.EXPECTED_HEADER_VALUE- async def test_claude_behind_manifold_sends_the_header_on_the_text_call(self, mocker: MockerFixture) -> None:+ async def test_claude_behind_pipelex_hosted_sends_the_header_on_the_text_call(self, mocker: MockerFixture) -> None:sdk_client = AsyncAnthropic(api_key="test-key")stream = mocker.MagicMock(side_effect=_RequestCapturedError)mocker.patch.object(sdk_client.messages, "stream", new=stream)- worker = _anthropic_worker(mocker, sdk_client=sdk_client, backend_name=PipelexBackend.MANIFOLD)+ worker = _anthropic_worker(mocker, sdk_client=sdk_client, backend_name=PipelexBackend.PIPELEX_HOSTED)worker.anthropic_async_client = sdk_clientwith pytest.raises(_RequestCapturedError):@@ -218,12 +218,12 @@ class TestManifoldMetadataSdkPaths:assert stream.call_args.kwargs["extra_headers"] == _EXPECTED- async def test_claude_behind_manifold_sends_the_header_on_the_structured_call(self, mocker: MockerFixture) -> None:+ async def test_claude_behind_pipelex_hosted_sends_the_header_on_the_structured_call(self, mocker: MockerFixture) -> None:"""Through a real instructor client, so what is asserted is what reaches the SDK's `messages.create`."""sdk_client = AsyncAnthropic(api_key="test-key")create = mocker.AsyncMock(return_value=_tool_call_message())mocker.patch.object(sdk_client.messages, "create", new=create)- worker = _anthropic_worker(mocker, sdk_client=sdk_client, backend_name=PipelexBackend.MANIFOLD)+ worker = _anthropic_worker(mocker, sdk_client=sdk_client, backend_name=PipelexBackend.PIPELEX_HOSTED)await worker._gen_object(_llm_job(), schema=DummySchema) # ruff: ignore[private-member-access] # pyright: ignore[reportPrivateUsage]diff --git a/tests/unit/pipelex/providers/manifold/test_manifold_native_client.py b/tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_native_client.pysimilarity index 80%rename from tests/unit/pipelex/providers/manifold/test_manifold_native_client.pyrename to tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_native_client.pyindex ccfc2f73e..72e3311ee 100644--- a/tests/unit/pipelex/providers/manifold/test_manifold_native_client.py+++ b/tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_native_client.py@@ -22,25 +22,25 @@ import pytestfrom pipelex.cogt.exceptions import CogtErrorfrom pipelex.cogt.inference.error_render import InferenceErrorFamilyfrom pipelex.cogt.model_backends.backend import InferenceBackend-from pipelex.providers.manifold.manifold_exceptions import ManifoldError-from pipelex.providers.manifold.manifold_native_client import ManifoldNativeClient-from tests.unit.pipelex.providers.manifold.test_data import ManifoldMetadataTestData+from pipelex.providers.pipelex_hosted.pipelex_hosted_exceptions import PipelexHostedError+from pipelex.providers.pipelex_hosted.pipelex_hosted_native_client import PipelexHostedNativeClient+from tests.unit.pipelex.providers.pipelex_hosted.test_data import PipelexHostedMetadataTestDataif TYPE_CHECKING:from pytest_mock import MockerFixture-_ORIGIN = "https://manifold.example.com"-_TOKEN = "manifold-service-token"+_ORIGIN = "https://pipelex_hosted.example.com"+_TOKEN = "hosted-service-token"-def _client() -> ManifoldNativeClient:- return ManifoldNativeClient(backend=InferenceBackend(name="pipelex_manifold", endpoint=_ORIGIN, api_key=_TOKEN))+def _client() -> PipelexHostedNativeClient:+ return PipelexHostedNativeClient(backend=InferenceBackend(name="pipelex_hosted", endpoint=_ORIGIN, api_key=_TOKEN))def _inference_model(mocker: MockerFixture) -> Any:model = mocker.MagicMock()model.name = "linkup-sourced-answer"- model.desc = "test-manifold-search"+ model.desc = "test-hosted-search"return model@@ -61,16 +61,16 @@ def _response(*, status_code: int = 200, json_body: Any = None, text_body: str |@pytest.mark.asyncio(loop_scope="class")-class TestManifoldNativeClientRequest:+class TestPipelexHostedNativeClientRequest:async def test_the_wire_carries_one_token_header_and_a_body_with_no_routing(self, mocker: MockerFixture) -> None:post = _patch_transport(mocker, _response(json_body={"answer": "ok"}))await _client().post_json(route="/pipelex/search",- body={"model": "linkup/standard", "query": "what is a manifold"},+ body={"model": "linkup/standard", "query": "what is a torus"},family=InferenceErrorFamily.SEARCH,inference_model=_inference_model(mocker),- job_metadata=ManifoldMetadataTestData.JOB_METADATA,+ job_metadata=PipelexHostedMetadataTestData.JOB_METADATA,)assert post.call_args.args[0] == f"{_ORIGIN}/v1/pipelex/search"@@ -79,10 +79,10 @@ class TestManifoldNativeClientRequest:# metadata header says whose call this is, not anything about us or about routing.assert headers == {"x-pipelex-api-key": _TOKEN,- "x-pipelex-metadata": ManifoldMetadataTestData.EXPECTED_HEADER_VALUE,+ "x-pipelex-metadata": PipelexHostedMetadataTestData.EXPECTED_HEADER_VALUE,"Content-Type": "application/json",}- assert post.call_args.kwargs["json"] == {"model": "linkup/standard", "query": "what is a manifold"}+ assert post.call_args.kwargs["json"] == {"model": "linkup/standard", "query": "what is a torus"}async def test_a_json_object_body_comes_back_as_a_dict(self, mocker: MockerFixture) -> None:_patch_transport(mocker, _response(json_body={"answer": "ok", "sources": []}))@@ -92,24 +92,24 @@ class TestManifoldNativeClientRequest:body={"model": "linkup/standard", "query": "q"},family=InferenceErrorFamily.SEARCH,inference_model=_inference_model(mocker),- job_metadata=ManifoldMetadataTestData.JOB_METADATA,+ job_metadata=PipelexHostedMetadataTestData.JOB_METADATA,)assert result == {"answer": "ok", "sources": []}@pytest.mark.asyncio(loop_scope="class")-class TestManifoldNativeClientFailures:+class TestPipelexHostedNativeClientFailures:async def test_a_non_json_2xx_becomes_a_pipelex_error_naming_the_model(self, mocker: MockerFixture) -> None:_patch_transport(mocker, _response(text_body="<html><body>502 Bad Gateway</body></html>"))- with pytest.raises(ManifoldError) as exc_info:+ with pytest.raises(PipelexHostedError) as exc_info:await _client().post_json(route="/pipelex/search",body={"model": "linkup/standard", "query": "q"},family=InferenceErrorFamily.SEARCH,inference_model=_inference_model(mocker),- job_metadata=ManifoldMetadataTestData.JOB_METADATA,+ job_metadata=PipelexHostedMetadataTestData.JOB_METADATA,)assert "linkup-sourced-answer" in exc_info.value.message@@ -117,13 +117,13 @@ class TestManifoldNativeClientFailures:async def test_a_2xx_carrying_a_json_scalar_is_refused_with_what_it_was(self, mocker: MockerFixture) -> None:_patch_transport(mocker, _response(json_body=["not", "an", "object"]))- with pytest.raises(ManifoldError, match="list"):+ with pytest.raises(PipelexHostedError, match="list"):await _client().post_json(route="/pipelex/search",body={"model": "linkup/standard", "query": "q"},family=InferenceErrorFamily.SEARCH,inference_model=_inference_model(mocker),- job_metadata=ManifoldMetadataTestData.JOB_METADATA,+ job_metadata=PipelexHostedMetadataTestData.JOB_METADATA,)async def test_a_status_error_is_classified_rather_than_raised_raw(self, mocker: MockerFixture) -> None:@@ -135,5 +135,5 @@ class TestManifoldNativeClientFailures:body={"model": "linkup/standard", "query": "q"},family=InferenceErrorFamily.SEARCH,inference_model=_inference_model(mocker),- job_metadata=ManifoldMetadataTestData.JOB_METADATA,+ job_metadata=PipelexHostedMetadataTestData.JOB_METADATA,)diff --git a/tests/unit/pipelex/providers/manifold/test_manifold_plugin_registrations.py b/tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_plugin_registrations.pysimilarity index 59%rename from tests/unit/pipelex/providers/manifold/test_manifold_plugin_registrations.pyrename to tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_plugin_registrations.pyindex 40697dca4..9551aa3b1 100644--- a/tests/unit/pipelex/providers/manifold/test_manifold_plugin_registrations.py+++ b/tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_plugin_registrations.py@@ -1,16 +1,16 @@-"""What the manifold plugin claims, stated in one place.+"""What the hosted plugin claims, stated in one place.-These sdk names are a contract with a file in another repository: the catalog's `sdk` column-(`manifold_models.toml`) has to name exactly these strings, and a mismatch is not a startup error —+These sdk names are a contract with a file in another repository: the `sdk` column of the hosted+plane's model catalog has to name exactly these strings, and a mismatch is not a startup error —it is an `InferenceBackendNotFoundError` at the first request against that model, which is to say inproduction, for one model, on whatever day someone first uses it. The claim is cheap to pin andexpensive to discover.-Two of the entries are worth reading rather than skimming. `(IMG_GEN, manifold_completions)` is the+Two of the entries are worth reading rather than skimming. `(IMG_GEN, pipelex_hosted_completions)` is thesame sdk name registered under a second family, because some image models answer on the ChatCompletions shape rather than on the Images API and the catalog says which by giving them`model_type = "img_gen"` while leaving them on the default completions sdk. And Claude has a token of-its own, `manifold_anthropic`, rather than the plain `anthropic` the open Anthropic plugin owns: it is+its own, `pipelex_hosted_anthropic`, rather than the plain `anthropic` the open Anthropic plugin owns: it isthe same worker built with the package's extras factory, which is what adds the metadata header."""@@ -26,8 +26,8 @@ from pipelex.plugins.model_handle import ModelHandlefrom pipelex.plugins.registrar import PluginRegistrarfrom pipelex.providers.anthropic.anthropic_llm_worker import AnthropicLLMWorkerfrom pipelex.providers.builtins import KERNEL_BUILTIN_PLUGINS-from pipelex.providers.manifold.manifold_anthropic_extras import ManifoldAnthropicExtrasFactory-from pipelex.providers.manifold.manifold_plugin import ManifoldPlugin+from pipelex.providers.pipelex_hosted.pipelex_hosted_anthropic_extras import PipelexHostedAnthropicExtrasFactory+from pipelex.providers.pipelex_hosted.pipelex_hosted_plugin import PipelexHostedPluginif TYPE_CHECKING:from collections.abc import Callable@@ -35,13 +35,13 @@ if TYPE_CHECKING:from pytest_mock import MockerFixture_EXPECTED_KEYS = {- (InferenceFamily.LLM, "manifold_anthropic"),- (InferenceFamily.LLM, "manifold_completions"),- (InferenceFamily.LLM, "manifold_responses"),- (InferenceFamily.IMG_GEN, "manifold_img_gen"),- (InferenceFamily.IMG_GEN, "manifold_completions"),- (InferenceFamily.EXTRACT, "manifold_extract"),- (InferenceFamily.SEARCH, "manifold_search"),+ (InferenceFamily.LLM, "pipelex_hosted_anthropic"),+ (InferenceFamily.LLM, "pipelex_hosted_completions"),+ (InferenceFamily.LLM, "pipelex_hosted_responses"),+ (InferenceFamily.IMG_GEN, "pipelex_hosted_img_gen"),+ (InferenceFamily.IMG_GEN, "pipelex_hosted_completions"),+ (InferenceFamily.EXTRACT, "pipelex_hosted_extract"),+ (InferenceFamily.SEARCH, "pipelex_hosted_search"),}@@ -54,11 +54,11 @@ def _registrar(mocker: MockerFixture) -> PluginRegistrar:return PluginRegistrar(config=mocker.MagicMock())-class TestManifoldPluginRegistrations:- def test_the_plugin_claims_exactly_the_manifold_sdk_set(self, mocker: MockerFixture) -> None:+class TestPipelexHostedPluginRegistrations:+ def test_the_plugin_claims_exactly_the_pipelex_hosted_sdk_set(self, mocker: MockerFixture) -> None:registrar = _registrar(mocker)- ManifoldPlugin().register(registrar)+ PipelexHostedPlugin().register(registrar)assert set(registrar.inference_backends) == _EXPECTED_KEYS@@ -66,29 +66,29 @@ class TestManifoldPluginRegistrations:"""The open Anthropic plugin owns `anthropic`; claiming it here would fail the boot on a duplicate."""registrar = _registrar(mocker)- ManifoldPlugin().register(registrar)+ PipelexHostedPlugin().register(registrar)- assert all(sdk.startswith("manifold_") for _, sdk in registrar.inference_backends)+ assert all(sdk.startswith("pipelex_hosted_") for _, sdk in registrar.inference_backends)def test_claude_is_built_with_the_metadata_extras_factory(self, mocker: MockerFixture) -> None:registrar = _registrar(mocker)- ManifoldPlugin().register(registrar)- make_worker = registrar.inference_backends[InferenceFamily.LLM, "manifold_anthropic"]+ PipelexHostedPlugin().register(registrar)+ make_worker = registrar.inference_backends[InferenceFamily.LLM, "pipelex_hosted_anthropic"]model = mocker.MagicMock()- model.sdk = "manifold_anthropic"+ model.sdk = "pipelex_hosted_anthropic"model.max_tokens = 4096model.get_instructor_mode.return_value = None- backend = InferenceBackend(name="pipelex_manifold", endpoint="https://manifold.example.com", api_key="token")+ backend = InferenceBackend(name="pipelex_hosted", endpoint="https://pipelex_hosted.example.com", api_key="token")sdk_clients = mocker.MagicMock()sdk_clients.get_or_create.side_effect = _build_now- mocker.patch.object(ModelHandle, "make_for_inference_model", return_value=mocker.MagicMock(sdk="manifold_anthropic"))+ mocker.patch.object(ModelHandle, "make_for_inference_model", return_value=mocker.MagicMock(sdk="pipelex_hosted_anthropic"))worker = make_worker(inference_model=model, backend=backend, sdk_clients=sdk_clients, reporting_delegate=None)assert isinstance(worker, AnthropicLLMWorker)- assert isinstance(worker.extras_factory, ManifoldAnthropicExtrasFactory)+ assert isinstance(worker.extras_factory, PipelexHostedAnthropicExtrasFactory)assert isinstance(worker.anthropic_async_client, AsyncAnthropic)def test_the_plugin_is_a_kernel_builtin(self) -> None:- """Registered beside the gateway plugin, so a manifold-declared backend needs no plugin install."""- assert any(isinstance(plugin, ManifoldPlugin) for plugin in KERNEL_BUILTIN_PLUGINS)+ """Registered beside the gateway plugin, so a hosted-declared backend needs no plugin install."""+ assert any(isinstance(plugin, PipelexHostedPlugin) for plugin in KERNEL_BUILTIN_PLUGINS)diff --git a/tests/unit/pipelex/providers/manifold/test_manifold_request_limits.py b/tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_request_limits.pysimilarity index 94%rename from tests/unit/pipelex/providers/manifold/test_manifold_request_limits.pyrename to tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_request_limits.pyindex 67f5857a3..6477546bc 100644--- a/tests/unit/pipelex/providers/manifold/test_manifold_request_limits.py+++ b/tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_request_limits.py@@ -1,14 +1,14 @@-"""The Manifold service's request-shape refusals, from the wire code to the rendered advice.+"""The Pipelex service's request-shape refusals, from the wire code to the rendered advice.-The Pipelex Manifold service bounds what a request may weigh and how deeply it may+The Pipelex service bounds what a request may weigh and how deeply it maynest, and refuses anything over those bounds with codes of its own: ``pig-07`` (thebody is over its byte cap, at 413), ``pig-08`` (the body's size cannot be read — achunked body, or an unreadable ``Content-Length`` — at 411), ``pig-10`` (a``pipelex-storage://`` object over its cap, at 413) and ``pig-11`` (the body nestsdeeper than the gateway's depth limit, at 400).-These codes are the service's wire contract, so the Manifold plugin owns them: each-is a ``GatewayRequestLimit`` member in ``manifold_error_codes``, contributed as one+These codes are the service's wire contract, so the hosted plugin owns them: each+is a ``GatewayRequestLimit`` member in ``pipelex_hosted_error_codes``, contributed as oneentry of the service error vocabulary that ``classify_inference_error`` consultsahead of the status ladder. Without that entry the Classify step falls through tothe generic ladder, and a caller who sent something too large reads "the provider@@ -16,7 +16,7 @@ rejected the request" rather than "the request was too large". These tests pin twhole chain: the code is in the vocabulary under the right member, it survivesevery Extract hop that can carry it, it classifies as a caller/limit error that isnever retried, and the Render step says which limit was hit. The package's-``conftest.py`` hands the classifier the Manifold vocabulary.+``conftest.py`` hands the classifier the hosted vocabulary.**The code is the discriminator, not the provider.** A request reaches the gatewaythrough several SDKs — the Portkey substrate, plain ``httpx`` on the native routes,@@ -55,18 +55,18 @@ from pipelex.cogt.inference.error_classification import (from pipelex.cogt.inference.error_classify import ClassificationResult, classify_inference_errorfrom pipelex.cogt.inference.error_render import InferenceErrorFamily, render_inference_errorfrom pipelex.cogt.inference.provider_name import ProviderName-from pipelex.providers.manifold.manifold_error_codes import (+from pipelex.providers.pipelex_hosted.pipelex_hosted_error_codes import (_GATEWAY_REQUEST_LIMIT_BY_CODE, # pyright: ignore[reportPrivateUsage]GatewayRequestLimit,)-from pipelex.providers.manifold.manifold_error_metadata import extract_manifold_metadata+from pipelex.providers.pipelex_hosted.pipelex_hosted_error_metadata import extract_pipelex_hosted_metadataif TYPE_CHECKING:from pytest_mock import MockerFixturefrom pipelex.cogt.inference.service_error_vocabulary import ServiceErrorVocabulary-_ORIGIN = "https://manifold.example.com"+_ORIGIN = "https://pipelex_hosted.example.com"def _refusal_body(message: str, code: str) -> dict[str, Any]:@@ -112,7 +112,7 @@ def _as_the_portkey_sdk_raises_it(*, status_code: int, body: dict[str, Any]) ->def _as_the_openai_sdk_raises_it(*, status_code: int, body: dict[str, Any]) -> BaseException:"""Build the exception through the OpenAI SDK's own factory, for the same reason as above.- This is the hop a gateway or manifold *chat* call actually takes: both plugins+ This is the hop a gateway or hosted *chat* call actually takes: both pluginsbuild an ``OpenAICompletionsLLMWorker`` / ``OpenAIResponsesLLMWorker`` over aclient pointed at the service, so an LLM-route refusal is distilled by``extract_openai_metadata`` and never by ``extract_gateway_metadata``.@@ -155,7 +155,7 @@ def _classified_limit(result: ClassificationResult) -> GatewayRequestLimit | Nonclass TestTheCodeIsRecognized:- """Each code is in the Manifold vocabulary, under the family member that names its limit."""+ """Each code is in the hosted vocabulary, under the family member that names its limit."""@pytest.mark.parametrize(("code", "expected"),@@ -167,10 +167,10 @@ class TestTheCodeIsRecognized:],)def test_each_limit_code_maps_to_its_kind(- self, code: str, expected: GatewayRequestLimit, manifold_service_error_vocabulary: ServiceErrorVocabulary+ self, code: str, expected: GatewayRequestLimit, pipelex_hosted_service_error_vocabulary: ServiceErrorVocabulary) -> None:assert _request_limit(code) == expected- assert manifold_service_error_vocabulary.lookup(code=code) is not None+ assert pipelex_hosted_service_error_vocabulary.lookup(code=code) is not None@pytest.mark.parametrize("code", [None, "pig-01", "pig-09", "invalid_request_error", "PIG-07", ""])def test_any_other_code_is_not_a_request_limit(self, code: str | None) -> None:@@ -224,7 +224,7 @@ class TestTheCodeSurvivesEveryExtractHop:response = httpx.Response(status_code=400, request=request, json=_BODY_TOO_DEEP_BODY)exc = httpx.HTTPStatusError("Client error '400 Bad Request'", request=request, response=response)- metadata = extract_manifold_metadata(exc)+ metadata = extract_pipelex_hosted_metadata(exc)assert metadata.provider_error_code == "pig-11"assert _request_limit(metadata.provider_error_code) == GatewayRequestLimit.BODY_TOO_DEEP@@ -247,7 +247,7 @@ class TestTheCodeSurvivesEveryExtractHop:],)def test_through_the_openai_substrate_that_carries_every_chat_call(self, body: dict[str, Any], expected: GatewayRequestLimit) -> None:- """The hop a gateway or manifold LLM call actually takes.+ """The hop a gateway or hosted LLM call actually takes.Both plugins build an ``OpenAICompletionsLLMWorker`` over a client pointedat the service, so a chat-route refusal is distilled by@@ -305,7 +305,7 @@ class TestClassification:assert _classified_limit(result) is Noneassert result.category == InferenceErrorCategory.CONFIGURATION- def test_without_the_manifold_vocabulary_the_code_is_left_to_the_status_ladder(self, mocker: MockerFixture) -> None:+ def test_without_the_pipelex_hosted_vocabulary_the_code_is_left_to_the_status_ladder(self, mocker: MockerFixture) -> None:"""The codes classify only because the plugin contributes them: a runtime without it reads the bare status."""mocker.patch("pipelex.cogt.inference.error_classify.get_optional_service_error_vocabulary", return_value=None)@@ -401,7 +401,7 @@ class TestTheSameLimitOnTheNativeRoutes:response = httpx.Response(status_code=413, request=request, json=_native_route_refusal_body("over the limit", code))exc = httpx.HTTPStatusError("Client error '413 Payload Too Large'", request=request, response=response)- metadata = extract_manifold_metadata(exc)+ metadata = extract_pipelex_hosted_metadata(exc)result = classify_inference_error(metadata)assert metadata.provider_error_code == code@@ -471,7 +471,7 @@ class TestTheSameLimitOnTheNativeRoutes:response = httpx.Response(status_code=400, request=request, json=body)exc = httpx.HTTPStatusError("Client error '400 Bad Request'", request=request, response=response)- metadata = extract_manifold_metadata(exc)+ metadata = extract_pipelex_hosted_metadata(exc)assert metadata.provider_error_code == "pipelex_document_host_refused"assert _request_limit(metadata.provider_error_code) is Nonediff --git a/tests/unit/pipelex/providers/manifold/test_manifold_routing_refusals.py b/tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_routing_refusals.pysimilarity index 94%rename from tests/unit/pipelex/providers/manifold/test_manifold_routing_refusals.pyrename to tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_routing_refusals.pyindex 150aa0255..b6839e823 100644--- a/tests/unit/pipelex/providers/manifold/test_manifold_routing_refusals.py+++ b/tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_routing_refusals.py@@ -1,6 +1,6 @@-"""The Manifold service's routing refusals, from the wire code to the rendered advice.+"""The Pipelex service's routing refusals, from the wire code to the rendered advice.-Before a request can reach a provider the Pipelex Manifold service has to decide+Before a request can reach a provider the Pipelex service has to decide*which* provider: it reads the model out of the request, looks it up in its ownrouting table, and hands the call to the integration that serves it. When thatresolution fails it refuses the request itself, with codes of its own — ``pig-01``@@ -9,8 +9,8 @@ off for want of a credential, ``pig-05`` when a native-protocol path names a modanother provider serves, and ``pig-06`` when a model reaches a route its providerdoes not serve.-These codes are the service's wire contract, so the Manifold plugin owns them: each-is a ``GatewayRoutingRefusal`` member in ``manifold_error_codes``, contributed as one+These codes are the service's wire contract, so the hosted plugin owns them: each+is a ``GatewayRoutingRefusal`` member in ``pipelex_hosted_error_codes``, contributed as oneentry of the service error vocabulary that ``classify_inference_error`` consultsahead of the status ladder (the package's ``conftest.py`` hands the classifier thatvocabulary). Every ``pig-`` code answers HTTP 400, so without its entry the@@ -52,8 +52,8 @@ would hide an unset variable. The same call ``STORAGE_NOT_SERVED`` anddecision is pinned below rather than left to a comment. Neither is produced todayby a client talking to a Pipelex-operated service: ``pig-03`` refuses client-siderouting forms that-``tests/unit/pipelex/providers/manifold/test_manifold_clients.py`` pins the-manifold clients against by name, and ``pig-04`` refuses a path the service does+``tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_clients.py`` pins the+hosted clients against by name, and ``pig-04`` refuses a path the service doesnot mount at all. Two limits on the first half, recorded beside the map ratherthan implied here: that test names four headers while the service refuses on anallow-list, and the gateway img-gen worker does send ``x-portkey-config``, which@@ -63,8 +63,8 @@ Portkey's cloud reads and one of our gateways would refuse.Extract hop is pinned for it. It is raised only on a native Google protocol path(``/v1/<v1|v1alpha|v1beta>/models/<model>:generateContent`` or its``streamGenerateContent`` twin), and no worker speaks that protocol to-the service: both the gateway and manifold plugins build their LLM workers on the-OpenAI substrate, and ``ManifoldNativeClient`` serves only the ``/v1/pipelex/*``+the service: both the gateway and hosted plugins build their LLM workers on the+OpenAI substrate, and ``PipelexHostedNativeClient`` serves only the ``/v1/pipelex/*``extract and search routes. The map entry costs nothing and is right the day anative Google path is wired — but the Google Extract hop would not carry the codeeven then, which the last case in ``TestTheCodeSurvivesEveryExtractHop`` pins as@@ -97,14 +97,14 @@ from pipelex.cogt.inference.error_classify import ClassificationResult, classifyfrom pipelex.cogt.inference.error_render import InferenceErrorFamily, render_inference_errorfrom pipelex.cogt.inference.provider_name import ProviderNamefrom pipelex.pipe_operators.exceptions import PipeOperatorModelAvailabilityError-from pipelex.providers.manifold.manifold_error_codes import (+from pipelex.providers.pipelex_hosted.pipelex_hosted_error_codes import (_GATEWAY_REQUEST_LIMIT_BY_CODE, # pyright: ignore[reportPrivateUsage]_GATEWAY_ROUTING_REFUSAL_BY_CODE, # pyright: ignore[reportPrivateUsage]_GATEWAY_UNRESOLVED_REFERENCE_BY_CODE, # pyright: ignore[reportPrivateUsage]- MANIFOLD_SERVICE_ERROR_CODES,+ PIPELEX_HOSTED_SERVICE_ERROR_CODES,GatewayRoutingRefusal,)-from pipelex.providers.manifold.manifold_error_metadata import extract_manifold_metadata+from pipelex.providers.pipelex_hosted.pipelex_hosted_error_metadata import extract_pipelex_hosted_metadatafrom pipelex.system.pipe_run_mode import PipeRunModeif TYPE_CHECKING:@@ -112,7 +112,7 @@ if TYPE_CHECKING:from pipelex.cogt.inference.service_error_vocabulary import ServiceErrorVocabulary-_ORIGIN = "https://manifold.example.com"+_ORIGIN = "https://pipelex_hosted.example.com"# Every code in the family, paired with the member it must reach. Reused by the# recognition, classification and rendering cases so a code added to the map@@ -176,7 +176,7 @@ def _as_the_portkey_sdk_raises_it(*, status_code: int, body: dict[str, Any]) ->def _as_the_openai_sdk_raises_it(*, status_code: int, body: dict[str, Any]) -> BaseException:"""Build the exception through the OpenAI SDK's own factory, for the same reason as above.- This is the hop a gateway or manifold *chat* call actually takes: both plugins+ This is the hop a gateway or hosted *chat* call actually takes: both pluginsbuild an ``OpenAICompletionsLLMWorker`` / ``OpenAIResponsesLLMWorker`` over aclient pointed at the service, so an LLM-route refusal is distilled by``extract_openai_metadata`` and never by ``extract_gateway_metadata``.@@ -244,14 +244,14 @@ def _rendered_detail(class TestTheCodeIsRecognized:- """Each code is in the Manifold vocabulary, under the family member that names the routing decision."""+ """Each code is in the hosted vocabulary, under the family member that names the routing decision."""@pytest.mark.parametrize(("code", "expected"), _EVERY_CODE_AND_MEMBER)def test_each_code_maps_to_its_member(- self, code: str, expected: GatewayRoutingRefusal, manifold_service_error_vocabulary: ServiceErrorVocabulary+ self, code: str, expected: GatewayRoutingRefusal, pipelex_hosted_service_error_vocabulary: ServiceErrorVocabulary) -> None:assert _routing_refusal(code) == expected- assert manifold_service_error_vocabulary.lookup(code=code) is not None+ assert pipelex_hosted_service_error_vocabulary.lookup(code=code) is not None@pytest.mark.parametrize("member", list(GatewayRoutingRefusal))def test_every_member_is_reachable_from_a_wire_code(self, member: GatewayRoutingRefusal) -> None:@@ -290,10 +290,10 @@ class TestTheCodeIsRecognized:assert _routing_refusal(_classified_code(classify_inference_error(_envelope(code)))) is Nonedef test_the_substrates_model_not_allowed_refusal_is_not_the_services_to_contribute(- self, manifold_service_error_vocabulary: ServiceErrorVocabulary+ self, pipelex_hosted_service_error_vocabulary: ServiceErrorVocabulary) -> None:- """Core reads ``model_not_allowed_error`` itself, so the Manifold vocabulary must not claim it too."""- assert manifold_service_error_vocabulary.lookup(code=MODEL_NOT_ALLOWED_ERROR_CODE) is None+ """Core reads ``model_not_allowed_error`` itself, so the hosted vocabulary must not claim it too."""+ assert pipelex_hosted_service_error_vocabulary.lookup(code=MODEL_NOT_ALLOWED_ERROR_CODE) is None@pytest.mark.parametrize("provider", list(ProviderName))def test_the_code_is_read_whichever_provider_reported_it(self, provider: ProviderName) -> None:@@ -329,7 +329,7 @@ class TestTheCodeSurvivesEveryExtractHop:@pytest.mark.parametrize(("code", "expected"), _EVERY_CODE_AND_MEMBER)def test_through_the_openai_substrate_that_carries_every_chat_call(self, code: str, expected: GatewayRoutingRefusal) -> None:- """The hop a gateway or manifold LLM call actually takes.+ """The hop a gateway or hosted LLM call actually takes.That hop reads ``type`` before ``code``, which is right for the vendor italso serves — it recovers these because the fail-closed envelope carries no@@ -351,7 +351,7 @@ class TestTheCodeSurvivesEveryExtractHop:response = httpx.Response(status_code=400, request=request, json=_fail_closed_refusal_body("provider does not serve extract", "pig-06"))exc = httpx.HTTPStatusError("Client error '400 Bad Request'", request=request, response=response)- metadata = extract_manifold_metadata(exc)+ metadata = extract_pipelex_hosted_metadata(exc)assert metadata.provider_error_code == "pig-06"assert _routing_refusal(metadata.provider_error_code) == GatewayRoutingRefusal.UNSERVED_CAPABILITY@@ -372,7 +372,7 @@ class TestTheCodeSurvivesEveryExtractHop:``pig-05`` is raised only on the native Google protocol path, and no workerspeaks that protocol to the gateway today — both service plugins build their- LLM workers on the OpenAI substrate, and ``ManifoldNativeClient`` serves only+ LLM workers on the OpenAI substrate, and ``PipelexHostedNativeClient`` serves onlythe ``/v1/pipelex/*`` routes. So the map entry is correct and unreachable.Were that path wired, the code would still not arrive: Google's Extract hop@@ -443,7 +443,7 @@ class TestClassification:assert result.category == InferenceErrorCategory.CONTENTassert result.user_action_kind == UserActionKind.CHANGE_INPUT- def test_without_the_manifold_vocabulary_an_unserved_model_is_a_plain_400(self, mocker: MockerFixture) -> None:+ def test_without_the_pipelex_hosted_vocabulary_an_unserved_model_is_a_plain_400(self, mocker: MockerFixture) -> None:"""The family classifies only because the plugin contributes it: a runtime without it reads the bare status."""mocker.patch("pipelex.cogt.inference.error_classify.get_optional_service_error_vocabulary", return_value=None)@@ -632,7 +632,7 @@ class TestTheThreeGatewayFamiliesDoNotShadowEachOther:The registrar refuses a code claimed twice at boot; this states the sameproperty of the contribution itself, without a boot."""- contributed = [entry.code for entry in MANIFOLD_SERVICE_ERROR_CODES]+ contributed = [entry.code for entry in PIPELEX_HOSTED_SERVICE_ERROR_CODES]assert len(contributed) == len(set(contributed))assert set(contributed) == set(_GATEWAY_REQUEST_LIMIT_BY_CODE) | set(_GATEWAY_UNRESOLVED_REFERENCE_BY_CODE) | set(diff --git a/tests/unit/pipelex/providers/manifold/test_manifold_search_worker.py b/tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_search_worker.pysimilarity index 85%rename from tests/unit/pipelex/providers/manifold/test_manifold_search_worker.pyrename to tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_search_worker.pyindex 58e711d52..6136a5131 100644--- a/tests/unit/pipelex/providers/manifold/test_manifold_search_worker.py+++ b/tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_search_worker.py@@ -19,16 +19,16 @@ from pydantic import BaseModelfrom pipelex.cogt.usage.token_category import NbTokensByCategoryDict, TokenCategoryfrom pipelex.core.stuffs.search_result_content import SearchResultContent-from pipelex.providers.manifold.manifold_exceptions import ManifoldSearchEmptyResultError, ManifoldSearchResponseError-from pipelex.providers.manifold.manifold_extract_worker import MANIFOLD_UNIT_TOKENS-from pipelex.providers.manifold.manifold_search_worker import ManifoldSearchWorker+from pipelex.providers.pipelex_hosted.pipelex_hosted_exceptions import PipelexHostedSearchEmptyResultError, PipelexHostedSearchResponseError+from pipelex.providers.pipelex_hosted.pipelex_hosted_extract_worker import PIPELEX_HOSTED_UNIT_TOKENS+from pipelex.providers.pipelex_hosted.pipelex_hosted_search_worker import PipelexHostedSearchWorkerif TYPE_CHECKING:from pytest_mock import MockerFixture_SOURCED_ANSWER = {- "answer": "A manifold is a topological space that locally resembles Euclidean space.",- "sources": [{"name": "Manifold", "url": "https://example.com/manifold", "snippet": "locally Euclidean"}],+ "answer": "A torus is a surface shaped like a ring.",+ "sources": [{"name": "Torus", "url": "https://example.com/torus", "snippet": "ring-shaped surface"}],"usage": {"searches": 1},}@@ -37,12 +37,12 @@ class _Capital(BaseModel):city: str-def _make_worker(mocker: MockerFixture, *, response_body: dict[str, Any] | None = None) -> ManifoldSearchWorker:- worker = object.__new__(ManifoldSearchWorker)+def _make_worker(mocker: MockerFixture, *, response_body: dict[str, Any] | None = None) -> PipelexHostedSearchWorker:+ worker = object.__new__(PipelexHostedSearchWorker)model = mocker.MagicMock()model.model_id = "linkup/standard"model.name = "linkup-sourced-answer"- model.desc = "test-manifold-search"+ model.desc = "test-hosted-search"worker.inference_model = modelclient = mocker.MagicMock()client.post_json = mocker.AsyncMock(return_value=response_body if response_body is not None else _SOURCED_ANSWER)@@ -50,14 +50,14 @@ def _make_worker(mocker: MockerFixture, *, response_body: dict[str, Any] | Nonereturn worker-def _post_json(worker: ManifoldSearchWorker) -> Any:+def _post_json(worker: PipelexHostedSearchWorker) -> Any:"""The stand-in for the native client, as `Any` so its mock attributes typecheck."""return worker.client.post_jsondef _make_search_job(mocker: MockerFixture) -> Any:job = mocker.MagicMock()- job.query = "what is a manifold"+ job.query = "what is a torus"job.job_params.search_setting.include_images = Falsejob.job_params.search_setting.include_inline_citations = Falsejob.job_params.search_setting.max_results = 10@@ -70,7 +70,7 @@ def _make_search_job(mocker: MockerFixture) -> Any:@pytest.mark.asyncio(loop_scope="class")-class TestManifoldSearchRequestBody:+class TestPipelexHostedSearchRequestBody:async def test_the_body_names_the_model_and_carries_no_depth(self, mocker: MockerFixture) -> None:worker = _make_worker(mocker)@@ -79,7 +79,7 @@ class TestManifoldSearchRequestBody:call = _post_json(worker).call_args.kwargsassert call["route"] == "/pipelex/search"assert call["body"]["model"] == "linkup/standard"- assert call["body"]["query"] == "what is a manifold"+ assert call["body"]["query"] == "what is a torus"assert "depth" not in call["body"]async def test_unset_optional_parameters_are_omitted_rather_than_sent_as_null(self, mocker: MockerFixture) -> None:@@ -102,27 +102,27 @@ class TestManifoldSearchRequestBody:@pytest.mark.asyncio(loop_scope="class")-class TestManifoldSearchResponse:+class TestPipelexHostedSearchResponse:async def test_a_sourced_answer_becomes_the_runtime_s_own_content(self, mocker: MockerFixture) -> None:worker = _make_worker(mocker)result = await worker._search_sourced_answer(_make_search_job(mocker)) # ruff: ignore[private-member-access] # pyright: ignore[reportPrivateUsage]assert isinstance(result, SearchResultContent)- assert result.answer.startswith("A manifold is")- assert [source.url for source in result.sources] == ["https://example.com/manifold"]+ assert result.answer.startswith("A torus is")+ assert [source.url for source in result.sources] == ["https://example.com/torus"]async def test_a_response_with_no_answer_is_refused_rather_than_returned_empty(self, mocker: MockerFixture) -> None:worker = _make_worker(mocker, response_body={"sources": [], "usage": {"searches": 1}})- with pytest.raises(ManifoldSearchResponseError):+ with pytest.raises(PipelexHostedSearchResponseError):await worker._search_sourced_answer(_make_search_job(mocker)) # ruff: ignore[private-member-access] # pyright: ignore[reportPrivateUsage]async def test_a_structured_search_that_found_nothing_says_so(self, mocker: MockerFixture) -> None:"""The query's fault, not the model's — which is why it carries CHANGE_INPUT."""worker = _make_worker(mocker, response_body={"data": None, "sources": [], "usage": {"searches": 1}})- with pytest.raises(ManifoldSearchEmptyResultError):+ with pytest.raises(PipelexHostedSearchEmptyResultError):await worker._search_structured(_make_search_job(mocker), schema=_Capital) # ruff: ignore[private-member-access] # pyright: ignore[reportPrivateUsage]async def test_the_usage_key_does_not_stop_the_envelope_being_recognised(self, mocker: MockerFixture) -> None:@@ -144,7 +144,7 @@ class TestManifoldSearchResponse:@pytest.mark.asyncio(loop_scope="class")-class TestManifoldSearchUsageTranslation:+class TestPipelexHostedSearchUsageTranslation:async def test_searches_become_megatokens_in_both_categories(self, mocker: MockerFixture) -> None:"""The same cost figure the Portkey path reports, which is what makes the two comparable."""worker = _make_worker(mocker, response_body={**_SOURCED_ANSWER, "usage": {"searches": 2}})@@ -155,8 +155,8 @@ class TestManifoldSearchUsageTranslation:await worker._search_sourced_answer(job) # ruff: ignore[private-member-access] # pyright: ignore[reportPrivateUsage]assert usage.nb_tokens_by_category == {- TokenCategory.INPUT: 2 * MANIFOLD_UNIT_TOKENS,- TokenCategory.OUTPUT: 2 * MANIFOLD_UNIT_TOKENS,+ TokenCategory.INPUT: 2 * PIPELEX_HOSTED_UNIT_TOKENS,+ TokenCategory.OUTPUT: 2 * PIPELEX_HOSTED_UNIT_TOKENS,}@pytest.mark.parametrize(diff --git a/tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_service_error_codes_boot.py b/tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_service_error_codes_boot.pynew file mode 100644index 000000000..02c4e6d10--- /dev/null+++ b/tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_service_error_codes_boot.py@@ -0,0 +1,20 @@+"""The session's boot installs the Pipelex service's refusal codes on the hub, where classification reads them.++The package's other tests hand the classifier the hosted vocabulary through the autouse fixture, which+patches the classifier's binding; this one reads the hub's own accessor, which that fixture leaves alone,+so it fails if the plugin stops contributing its codes or the boot stops installing them.+"""++from __future__ import annotations++from pipelex.providers.pipelex_hosted.pipelex_hosted_error_codes import PIPELEX_HOSTED_SERVICE_ERROR_CODES+from pipelex.runtime_hub import get_optional_service_error_vocabulary+++class TestPipelexHostedServiceErrorCodesBoot:+ def test_boot_installs_every_pipelex_hosted_code_on_the_hub(self) -> None:+ vocabulary = get_optional_service_error_vocabulary()++ assert vocabulary is not None+ missing = {entry.code for entry in PIPELEX_HOSTED_SERVICE_ERROR_CODES} - set(vocabulary.codes)+ assert not missing, f"The booted vocabulary lacks the Pipelex service's codes: {sorted(missing)}"diff --git a/tests/unit/pipelex/providers/manifold/test_manifold_spi_imports.py b/tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_spi_imports.pysimilarity index 95%rename from tests/unit/pipelex/providers/manifold/test_manifold_spi_imports.pyrename to tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_spi_imports.pyindex 9840ee7a0..ba8ec0f48 100644--- a/tests/unit/pipelex/providers/manifold/test_manifold_spi_imports.py+++ b/tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_spi_imports.py@@ -16,8 +16,8 @@ from pathlib import Path_TESTS_ROOT = next(parent for parent in Path(__file__).resolve().parents if parent.name == "tests")_REPO_ROOT = _TESTS_ROOT.parent-_PACKAGE_DIR = _REPO_ROOT / "pipelex" / "providers" / "manifold"-_PACKAGE_MODULE = "pipelex.providers.manifold"+_PACKAGE_DIR = _REPO_ROOT / "pipelex" / "providers" / "pipelex_hosted"+_PACKAGE_MODULE = "pipelex.providers.pipelex_hosted"_SPI_PAGE = _REPO_ROOT / "docs" / "under-the-hood" / "inference-backend-plugins.md"_SPI_ROW = re.compile(r"^\| (?P<symbols>`[^|]+`) \| `(?P<module>[\w.]+)` \| ")@@ -47,7 +47,7 @@ def _core_imports() -> list[tuple[str, str, str]]:return imports-class TestManifoldReachesCoreOnlyThroughTheSpi:+class TestPipelexHostedReachesCoreOnlyThroughTheSpi:def test_the_spi_table_parses(self) -> None:"""Guards the guard: a table the regex stopped reading would let every import through."""published = _published_symbols()diff --git a/tests/unit/pipelex/providers/manifold/test_manifold_unresolved_references.py b/tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_unresolved_references.pysimilarity index 95%rename from tests/unit/pipelex/providers/manifold/test_manifold_unresolved_references.pyrename to tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_unresolved_references.pyindex 0304e718e..00288e657 100644--- a/tests/unit/pipelex/providers/manifold/test_manifold_unresolved_references.py+++ b/tests/unit/pipelex/providers/pipelex_hosted/test_pipelex_hosted_unresolved_references.py@@ -1,15 +1,15 @@-"""The Manifold service's unresolvable-reference refusals, from the wire code to the rendered advice.+"""The Pipelex service's unresolvable-reference refusals, from the wire code to the rendered advice.A request may name a file rather than carry it — a ``pipelex-storage://`` key the-Pipelex Manifold service resolves for the caller, or a document URL it fetches on+Pipelex service resolves for the caller, or a document URL it fetches ontheir behalf. When it cannot turn that reference into bytes it refuses the requestitself, with codes of its own: ``pig-09`` on the LLM routes, where its ``pig-0N``family has one fail-closed slot for "cannot resolve" and the message carries thedifference, and a named ``pipelex_*`` contract code on the native``/v1/pipelex/*`` routes for each distinct cause.-These codes are the service's wire contract, so the Manifold plugin owns them: each-is a ``GatewayUnresolvedReference`` member in ``manifold_error_codes``, contributed+These codes are the service's wire contract, so the hosted plugin owns them: each+is a ``GatewayUnresolvedReference`` member in ``pipelex_hosted_error_codes``, contributedas one entry of the service error vocabulary that ``classify_inference_error``consults ahead of the status ladder (the package's ``conftest.py`` hands theclassifier that vocabulary). Without that entry the Classify step falls through to@@ -56,18 +56,18 @@ from pipelex.cogt.inference.error_classification import (from pipelex.cogt.inference.error_classify import ClassificationResult, classify_inference_errorfrom pipelex.cogt.inference.error_render import InferenceErrorFamily, render_inference_errorfrom pipelex.cogt.inference.provider_name import ProviderName-from pipelex.providers.manifold.manifold_error_codes import (+from pipelex.providers.pipelex_hosted.pipelex_hosted_error_codes import (_GATEWAY_REQUEST_LIMIT_BY_CODE, # pyright: ignore[reportPrivateUsage]_GATEWAY_UNRESOLVED_REFERENCE_BY_CODE, # pyright: ignore[reportPrivateUsage]GatewayRequestLimit,GatewayUnresolvedReference,)-from pipelex.providers.manifold.manifold_error_metadata import extract_manifold_metadata+from pipelex.providers.pipelex_hosted.pipelex_hosted_error_metadata import extract_pipelex_hosted_metadataif TYPE_CHECKING:from pipelex.cogt.inference.service_error_vocabulary import ServiceErrorVocabulary-_ORIGIN = "https://manifold.example.com"+_ORIGIN = "https://pipelex_hosted.example.com"# Every code in the family, paired with the member it must reach. Reused by the# recognition, classification and rendering cases so a code added to the map@@ -150,7 +150,7 @@ def _as_the_portkey_sdk_raises_it(*, status_code: int, body: dict[str, Any]) ->def _as_the_openai_sdk_raises_it(*, status_code: int, body: dict[str, Any]) -> BaseException:"""Build the exception through the OpenAI SDK's own factory, for the same reason as above.- This is the hop a gateway or manifold *chat* call actually takes: both plugins+ This is the hop a gateway or hosted *chat* call actually takes: both pluginsbuild an ``OpenAICompletionsLLMWorker`` / ``OpenAIResponsesLLMWorker`` over aclient pointed at the service, so an LLM-route refusal is distilled by``extract_openai_metadata`` and never by ``extract_gateway_metadata``.@@ -204,14 +204,14 @@ def _rendered_detail(metadata: ProviderErrorMetadata, *, family: InferenceErrorFclass TestTheCodeIsRecognized:- """Each code is in the Manifold vocabulary, under the family member that names its remedy."""+ """Each code is in the hosted vocabulary, under the family member that names its remedy."""@pytest.mark.parametrize(("code", "expected"), _EVERY_CODE_AND_MEMBER)def test_each_code_maps_to_its_member(- self, code: str, expected: GatewayUnresolvedReference, manifold_service_error_vocabulary: ServiceErrorVocabulary+ self, code: str, expected: GatewayUnresolvedReference, pipelex_hosted_service_error_vocabulary: ServiceErrorVocabulary) -> None:assert _unresolved_reference(code) == expected- assert manifold_service_error_vocabulary.lookup(code=code) is not None+ assert pipelex_hosted_service_error_vocabulary.lookup(code=code) is not None@pytest.mark.parametrize("member", list(GatewayUnresolvedReference))def test_every_member_is_reachable_from_a_wire_code(self, member: GatewayUnresolvedReference) -> None:@@ -298,7 +298,7 @@ class TestTheCodeSurvivesEveryExtractHop:response = httpx.Response(status_code=400, request=request, json=_native_route_refusal_body("refused", code))exc = httpx.HTTPStatusError("Client error '400 Bad Request'", request=request, response=response)- metadata = extract_manifold_metadata(exc)+ metadata = extract_pipelex_hosted_metadata(exc)assert metadata.provider_error_code == codeassert _unresolved_reference(metadata.provider_error_code) == expected@@ -315,7 +315,7 @@ class TestTheCodeSurvivesEveryExtractHop:assert _unresolved_reference(metadata.provider_error_code) == GatewayUnresolvedReference.REFERENCE_UNRESOLVEDdef test_through_the_openai_substrate_that_carries_every_chat_call(self) -> None:- """The hop a gateway or manifold LLM call actually takes.+ """The hop a gateway or hosted LLM call actually takes.That hop reads ``type`` before ``code``, which is right for the vendor italso serves — it recovers ``pig-09`` because the fail-closed envelopediff --git a/tests/unit/pipelex/providers/test_instructor_retry_shapes.py b/tests/unit/pipelex/providers/test_instructor_retry_shapes.pyindex 74ea60ba7..7d1d3c46d 100644--- a/tests/unit/pipelex/providers/test_instructor_retry_shapes.py+++ b/tests/unit/pipelex/providers/test_instructor_retry_shapes.py@@ -257,7 +257,7 @@ class TestInstructorRetryShapes:inference_model = mocker.MagicMock()inference_model.name = _MODEL_HANDLEinference_model.model_id = _WIRE_ID- inference_model.desc = f"{_MODEL_HANDLE} → SDK[manifold_completions]•Backend[pipelex_manifold]•Model[{_WIRE_ID}]"+ inference_model.desc = f"{_MODEL_HANDLE} → SDK[pipelex_hosted_completions]•Backend[pipelex_hosted]•Model[{_WIRE_ID}]"inference_model.thinking_mode = Noneinference_model.listed_constraints = []worker.inference_model = inference_modeldiff --git a/wip/judgment-family/design.md b/wip/judgment-family/design.mdindex 82ed9f120..b3fb930f3 100644--- a/wip/judgment-family/design.md+++ b/wip/judgment-family/design.md@@ -195,7 +195,7 @@ The order is set by what each step needs from the one before.1. `mthds` — the standard change: the native set in `docs/spec/native-concepts.md`, the `PipeJudge` operator in the language reference, and the two projection questions from Part 2.2. `pipelex` — natives, family, operator, backend, in that order, each independently mergeable: the natives change stands alone, the family is testable with a fake worker before any vendor code exists, and the operator needs both.3. After a `pipelex` release — the schema copies through the `mthds-schema-sync` skill (`mthds`, `vscode-pipelex`, `mthds-ui`), the corpus through `mthds-corpus-sync`, the projection corpus in `mthds-js` and `mthds-python`, a node rendering for the new operator in `mthds-ui`, and the operator lists the authoring skills in `pipelex-plugins` and `mthds-plugins` teach from.-4. The hosted plane — `pipelex-server/temporal/` registers an activity for the new leaf and a queue for it, and the pin moves across `pipelex-server` in one commit. Nothing else: ratification decided the plane does not serve this family on a Pipelex-held key, so there is no `pipelex-manifold` route and no `pipelex-remote-config` entry to write, and a hosted run reaches a judgment model on the customer's own key or not at all.+4. The hosted plane — `pipelex-server/temporal/` registers an activity for the new leaf and a queue for it, and the pin moves across `pipelex-server` in one commit. Nothing else: ratification decided the plane does not serve this family on a Pipelex-held key, so there is no hosted inference route and no `pipelex-remote-config` entry to write, and a hosted run reaches a judgment model on the customer's own key or not at all.## Ratified decisions@@ -204,7 +204,7 @@ Ratified by Louis on 2026-09-20. The vendor-dependency question that stood here- **The natives are `Choice` and `Rating`**, and `YesNo` gains its optional `probability`. `Rating` keeps the word the language already owns, against the vendor's "Score", which reads as an exact magnitude — the reading the vendor's own limitations page warns against.- **The whole optional surface is pinned on day one**: `probability` on `YesNo`; `confidence` and `probabilities` on `Choice`; `confidence`, `probabilities` and `position` on `Rating`. The smaller alternative above — the verdict and one scalar apiece — was the fallback against resistance from the standard, and this workspace owns the standard, so there is none to trade against. A method can read a distribution, and fall back to the second most probable option, from the day the natives exist.- **The operator's template field is `question`, with `prompt` accepted as a synonym**, as Part 1 now specifies. `question` is canonical and is what every layer below the parser speaks; `prompt` exists because every other inference operator calls its template that, so an author reaching for it is right about the language and wrong only about this operator.-- **The family is bring-your-own-key, permanently.** The hosted plane does not serve judgments: no Pipelex-held vendor key, no Manifold route, no remote-config entry, and therefore no default the kit can ship. `PipeJudge` names its model or says that none is configured, and the docs teach that a judgment names its own model. This is the settled design rather than a state waiting on the plane, which is what Part 3's `choice_default` paragraph and route step 4 now record.+- **The family is bring-your-own-key, permanently.** The hosted plane does not serve judgments: no Pipelex-held vendor key, no hosted inference route, no remote-config entry, and therefore no default the kit can ship. `PipeJudge` names its model or says that none is configured, and the docs teach that a judgment names its own model. This is the settled design rather than a state waiting on the plane, which is what Part 3's `choice_default` paragraph and route step 4 now record.## Deferreddiff --git a/wip/judgment-family/plan.md b/wip/judgment-family/plan.mdindex 6d8accf61..8469a1512 100644--- a/wip/judgment-family/plan.md+++ b/wip/judgment-family/plan.md@@ -183,7 +183,7 @@ Item: L-260919-406599, "Run judgments from a bundle with the PipeJudge operator"- The natives are `Choice` and `Rating`, and `YesNo` gains an optional `probability`.- Every optional member is pinned on day one: `probability` on `YesNo`; `confidence` and `probabilities` on `Choice`; `confidence`, `probabilities` and `position` on `Rating`. The contents, the renderers, the pinned blueprints, codegen's native expansion and both projection corpora carry the full set.- The operator's template field is `question`, and `prompt` parses as a synonym of it. Exactly one may be set; both is a validation error naming `question`; `question` is what the blueprint carries and what the builder and the agent CLI emit.-- The family is bring-your-own-key permanently, so no kit default exists to resolve and the operator names its model or says none is configured. The error message and the docs state it as the design rather than as a temporary gap, and no `pipelex-manifold` or `pipelex-remote-config` work belongs to this campaign.+- The family is bring-your-own-key permanently, so no kit default exists to resolve and the operator names its model or says none is configured. The error message and the docs state it as the design rather than as a temporary gap, and no hosted inference or `pipelex-remote-config` work belongs to this campaign.- [ ] **Natives in the engine.** `NativeConceptCode` members and every exhaustive match over them, `ChoiceContent` and `RatingContent` with their renderers, the optional `probability` on `YesNoContent` (strict, like `yes_no`), the pinned blueprints and `PINNED_NATIVES_MTHDS_VERSION`, the concept factory, `CoreRegistryModels.STUFF`, the input shaper and the out-of-matrix set as the standard decided, codegen's native expansion, and `docs/building-methods/concepts/native-concepts.md`. Run `make test-ts-gates` if an emitter moved, and `trace-input-semantics` since the structure side changed. If this step alone makes a reviewable diff, land it as its own pull request under the same item.- [ ] **Kernel.** `pipelex/kernel/judgment_ops.py` (`resolve_judgment_setting`, `run_judgment`) and `judgment_results.py`: render the question, build the state from the inputs by name as checkpoint 1 settled it, send a batch of one, apply the threshold, warn when a threshold has no probability to apply to, build the native content, store it. Tests cover state building per content kind and the threshold at and around its boundary. Add the arm to `tests/unit/pipelex/kernel/test_kernel_boot_contract.py` and the row to `docs/under-the-hood/pipelex-kernel.md`, and acknowledge the `pipelex-kernel-docs` drift contract.