embed-client 4.0.52__tar.gz → 4.0.53__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {embed_client-4.0.52/embed_client.egg-info → embed_client-4.0.53}/PKG-INFO +3 -1
- {embed_client-4.0.52 → embed_client-4.0.53}/README.md +2 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/api_format.md +1 -1
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client/__init__.py +1 -1
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client/embedding_client.py +169 -7
- {embed_client-4.0.52 → embed_client-4.0.53/embed_client.egg-info}/PKG-INFO +3 -1
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client.egg-info/SOURCES.txt +1 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/pyproject.toml +1 -1
- embed_client-4.0.53/tests/test_input_limit_commands_client.py +232 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/CONFIGURATION.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/LICENSE +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/MANIFEST.in +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/basic_auth.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/http.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/http_8001_test.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/http_correct.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/http_simple.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/http_test.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/http_token.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/http_token_correct.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/http_token_roles.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/http_token_roles_token_roles.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/http_token_token_roles.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/https.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/https_8001_test.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/https_api_test.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/https_simple.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/https_test.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/https_token.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/https_token_8001.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/https_token_roles.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/https_token_roles_token_roles.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/https_token_token_roles.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/jwt.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/mtls.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/mtls_8001.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/mtls_8001_test.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/mtls_correct.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/mtls_roles.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/mtls_roles_token_roles.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/mtls_test.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/mtls_token_roles.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/mtls_via_adapter.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/roles.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/test_http_simple.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/test_http_token.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/test_http_token_roles.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/test_https_simple.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/test_https_token.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/test_https_token_roles.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/test_mtls_roles.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/test_mtls_simple.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/test_server_http.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/test_server_https.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/configs/test_server_mtls.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/BUGREPORT_queue_manager_daemonic.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/IDENTIFIER_ANALYSIS_REPORT.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/PROPOSAL_SERVER_REQUEST_COALESCING.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/PROPOSAL_TWO_CHANNEL_OR_PUSH.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/SERVER_MODES_AND_CLIENT.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/client_integration_guide.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/coverage_report.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/error_500_analysis.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/error_handling_complete.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/error_handling_issue.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/_template/README.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/_template/example_global_step/example_tactical_step/example_atomic_step.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/_template/example_global_step/example_tactical_step/spec.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/_template/example_global_step/spec.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/_template/spec.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/baseline_audit_and_contract_capture/migration_baseline_deliverable/ATOMIC_STEPS_INDEX.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/baseline_audit_and_contract_capture/migration_baseline_deliverable/freeze-migration-baseline-evidence-links.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/baseline_audit_and_contract_capture/migration_baseline_deliverable/spec.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/baseline_audit_and_contract_capture/spec.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/documentation_normalization/spec.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/ATOMIC_STEPS_INDEX.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-01.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-02.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-03.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-04.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-05.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-06.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-07.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-08.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-09.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-10.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-11.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-12.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-13.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-14.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-15.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-16.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-17.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-18.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-19.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-20.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-21.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/documentation_normalization/steps/DN-AT-22.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/plan.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/production_migration_and_legacy_removal/canonical_client_migration/ATOMIC_STEPS_INDEX.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/production_migration_and_legacy_removal/canonical_client_migration/PARALLEL_WAVES.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/production_migration_and_legacy_removal/canonical_client_migration/atomic-01-port-constants-and-exceptions.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/production_migration_and_legacy_removal/canonical_client_migration/atomic-02-port-embedding-client-helpers-and-status-store.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/production_migration_and_legacy_removal/canonical_client_migration/atomic-03-port-embedding-client-core.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/production_migration_and_legacy_removal/canonical_client_migration/atomic-04-package-init-version-and-canonical-exports.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/production_migration_and_legacy_removal/canonical_client_migration/atomic-05-remove-legacy-async-stack-and-adapter-transport.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/production_migration_and_legacy_removal/canonical_client_migration/atomic-06-remove-testing-client-and-duplicate-helpers.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/production_migration_and_legacy_removal/canonical_client_migration/atomic-07-rewire-cli-factory-and-minimal-entry-points.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/production_migration_and_legacy_removal/canonical_client_migration/spec.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/production_migration_and_legacy_removal/spec.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/README.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/rv_automated_security_matrix/spec.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/rv_canonical_mtls_real_server_gate/spec.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/rv_localhost_vectorization/spec.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/rv_packaging_and_prereqs/spec.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/rv_pypi_publication/spec.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/rv_surviving_examples_executable/spec.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/spec.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/ATOMIC_STEPS_INDEX.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/placeholder-corrective-rv01-security-matrix.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/placeholder-corrective-rv02-vectorization.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/placeholder-corrective-rv03-broken-example.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/placeholder-corrective-rv04-canonical-gate.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/placeholder-corrective-rv05-packaging.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/placeholder-corrective-rv06-duplicate-version-or-auth.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/rv01-execute-automated-security-matrix.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/rv02-execute-localhost-vectorization-mtls-8001.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/rv03-execute-surviving-examples-sweep.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/rv04-execute-canonical-mtls-real-server-gate.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/rv04-supplementary-pytest-canonical-example-contract.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/rv05-build-artifacts-twine-version-gate.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/release_validation_and_pypi_publication/steps/rv06-pypi-upload.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/spec.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/tests_scripts_and_dependency_cleanup/spec.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/tests_scripts_and_dependency_cleanup/steps/ATOMIC_STEPS_INDEX.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/tests_scripts_and_dependency_cleanup/steps/align-package-version-with-pyproject-metadata.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/tests_scripts_and_dependency_cleanup/steps/canonical-localhost-8001-mtls-example-and-execution-tests.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/tests_scripts_and_dependency_cleanup/steps/consolidate-pytest-configuration-single-source.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/tests_scripts_and_dependency_cleanup/steps/consolidate-redundant-coverage-test-modules.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/tests_scripts_and_dependency_cleanup/steps/delete-or-replace-skipped-auth-and-ssl-test-modules.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/tests_scripts_and_dependency_cleanup/steps/extract-async-client-adapter-tests-remove-legacy-aiohttp.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/tests_scripts_and_dependency_cleanup/steps/fix-or-remove-embed-client-auth-examples.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/tests_scripts_and_dependency_cleanup/steps/normalize-pyproject-runtime-deps-and-optional-extras.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/tests_scripts_and_dependency_cleanup/steps/replace-hardcoded-venv-site-packages-in-scripts-and-tests.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/specs/server_client_convergence_and_release/tests_scripts_and_dependency_cleanup/tasks/tsc_linter_exclusions_and_migration_inventory.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/tech_spec/branches/documentation_normalization/README.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/tech_spec/branches/documentation_normalization/tasks/doc_alignment_verification_and_closure.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/tech_spec/branches/documentation_normalization/tasks/doc_guides_examples_canonical_mtls.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/tech_spec/branches/documentation_normalization/tasks/doc_legacy_tree_prune_and_governance.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/docs/tech_spec/branches/documentation_normalization/tasks/doc_root_metadata_and_pypi_surface.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client/__main__.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client/adapter_config_factory.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client/adapter_config_normalizer.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client/adapter_generator_bridge.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client/auth.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client/cli.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client/cli_core.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client/client_factory.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client/client_factory_examples.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client/client_factory_helpers.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client/config.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client/config_defaults.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client/config_examples.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client/config_generator.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client/config_generator_cli.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client/config_presets.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client/config_validator.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client/config_validator_cli.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client/constants.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client/demo_cli.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client/demo_security_cli.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client/embed_file_output_validate.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client/embed_file_status_store.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client/embedding_client_helpers.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client/example_async_usage.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client/example_async_usage_demo.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client/example_async_usage_ru.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client/example_async_usage_ru_demo.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client/exceptions.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client/identifier_types.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client/json_embed_file_preflight.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client/local_json_embed_file.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client/md_embed_file_prep.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client/response_normalizer.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client/response_parsers.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client/security_cli.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client/security_cli_core.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client/ssl_examples.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client/ssl_manager.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client.egg-info/dependency_links.txt +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client.egg-info/entry_points.txt +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client.egg-info/requires.txt +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/embed_client.egg-info/top_level.txt +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/examples/README.md +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/examples/__init__.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/examples/async_testing_client_example.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/examples/canonical_mtls_localhost_8001.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/examples/configs/http_simple.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/examples/configs/https_token.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/examples/configs/mtls_roles.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/examples/data/embed_file_json_array_sample.json +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/examples/embed_file_json_local.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/examples/security_examples.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/examples/security_examples_ru.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/setup.cfg +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/tests/test_adapter_integration.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/tests/test_adapter_phase1.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/tests/test_adapter_phase2.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/tests/test_all_security_modes.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/tests/test_async_client_adapter.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/tests/test_async_client_real.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/tests/test_async_client_real_fixtures.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/tests/test_async_client_stress.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/tests/test_async_client_stress_new.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/tests/test_async_client_stress_updated.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/tests/test_auth_manager.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/tests/test_canonical_mtls_example.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/tests/test_cli_embed_file_json.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/tests/test_cli_exit_codes_insecure.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/tests/test_client_factory.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/tests/test_client_factory_convenience.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/tests/test_client_factory_integration.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/tests/test_config.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/tests/test_embed_file_aggregation_method.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/tests/test_embed_file_output_validate.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/tests/test_embed_immediate_mode.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/tests/test_example_async_usage.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/tests/test_json_embed_file_preflight.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/tests/test_local_json_embed_file.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/tests/test_md_embed_file_prep.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/tests/test_security_matrix.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/tests/test_ssl_manager.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/tests/test_structured_terminal_error.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/tests/test_terminal_delivery_events.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/tests/test_vectorization_modes_client.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/tests/test_wait_for_job_ws_fallback.py +0 -0
- {embed_client-4.0.52 → embed_client-4.0.53}/tests/test_with_auth.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: embed-client
|
|
3
|
-
Version: 4.0.
|
|
3
|
+
Version: 4.0.53
|
|
4
4
|
Summary: Async client for the Embedding Service API. Canonical class: EmbeddingClient (JSON-RPC via mcp-proxy-adapter >=8.10).
|
|
5
5
|
Author-email: Vasiliy Zdanovskiy <vasilyvz@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -110,6 +110,8 @@ Resolution order (server): provider given -> must be known, model omitted -> the
|
|
|
110
110
|
|
|
111
111
|
Error codes (`error.data.code` / `error.data.kind`, surfaced unchanged): `-32602` `UNKNOWN_PROVIDER`, `UNKNOWN_MODEL`, `UNSUPPORTED_DIMENSION`, `PROVIDER_REQUIRED`; `-32003` `EXTERNAL_UNAVAILABLE`, `EXTERNAL_UPSTREAM_FAILURE`, `EXTERNAL_BAD_RESPONSE`, `EXTERNAL_INVALID_REQUEST`; `-32001` `MODEL_LOADING` (retry); `-32004` `OWN_MODEL_DISABLED`; `-32005` `GPU_DISABLED`; `-32603` `MODEL_LOAD_FAILED`, `NO_GPU_AVAILABLE`. **`model_offload()`** moves the resident local model VRAM -> RAM (pinned against the GPU watcher) and **`model_load(model=None, device=None, wait=None)`** moves it back (`wait=False` returns at once while the load continues, `wait=True` blocks until it is in VRAM); neither takes a provider. Refusals of `model_offload`/`model_load`/`default_model` arrive as **`EmbedAPIError`** carrying the server error object. Every embed result carries `provider`, `model`, `dimension` and `backend`; external results also carry `usage`.
|
|
112
112
|
|
|
113
|
+
**Input-limit table (server input_limit_* commands):** **`input_limit_add(provider, model, max_input_tokens, tokenizer, max_inputs_per_request=None, max_total_tokens_per_request=None, source=None)`** adds a manual row (`-32602` `INPUT_LIMIT_EXISTS`, `LOCAL_LIMIT_FROM_MODEL`); **`input_limit_delete(provider, model)`** removes a row (`-32602` `INPUT_LIMIT_NOT_FOUND`); **`input_limit_update(provider, model, *, <named cells>)`** changes only the cells passed explicitly (`None` sends null, which only the three nullable cells accept; `-32602` `INPUT_LIMIT_NOT_FOUND`, `INPUT_LIMIT_EMPTY_UPDATE`, `LOCAL_LIMIT_FROM_MODEL`); **`input_limit_list(provider=None)`** returns `{rows: [...]}` sorted by `(provider, model)` with each row's `origin` (`module` | `manual`). Mutating commands may also return `-32603` `INPUT_LIMIT_PERSIST_FAILED`. Refusals arrive as **`EmbedAPIError`**. The client does not validate these parameters.
|
|
114
|
+
|
|
113
115
|
## Documentation
|
|
114
116
|
|
|
115
117
|
- **[CONFIGURATION.md](CONFIGURATION.md)** — JSON config schema, protocols, validation
|
|
@@ -63,6 +63,8 @@ Resolution order (server): provider given -> must be known, model omitted -> the
|
|
|
63
63
|
|
|
64
64
|
Error codes (`error.data.code` / `error.data.kind`, surfaced unchanged): `-32602` `UNKNOWN_PROVIDER`, `UNKNOWN_MODEL`, `UNSUPPORTED_DIMENSION`, `PROVIDER_REQUIRED`; `-32003` `EXTERNAL_UNAVAILABLE`, `EXTERNAL_UPSTREAM_FAILURE`, `EXTERNAL_BAD_RESPONSE`, `EXTERNAL_INVALID_REQUEST`; `-32001` `MODEL_LOADING` (retry); `-32004` `OWN_MODEL_DISABLED`; `-32005` `GPU_DISABLED`; `-32603` `MODEL_LOAD_FAILED`, `NO_GPU_AVAILABLE`. **`model_offload()`** moves the resident local model VRAM -> RAM (pinned against the GPU watcher) and **`model_load(model=None, device=None, wait=None)`** moves it back (`wait=False` returns at once while the load continues, `wait=True` blocks until it is in VRAM); neither takes a provider. Refusals of `model_offload`/`model_load`/`default_model` arrive as **`EmbedAPIError`** carrying the server error object. Every embed result carries `provider`, `model`, `dimension` and `backend`; external results also carry `usage`.
|
|
65
65
|
|
|
66
|
+
**Input-limit table (server input_limit_* commands):** **`input_limit_add(provider, model, max_input_tokens, tokenizer, max_inputs_per_request=None, max_total_tokens_per_request=None, source=None)`** adds a manual row (`-32602` `INPUT_LIMIT_EXISTS`, `LOCAL_LIMIT_FROM_MODEL`); **`input_limit_delete(provider, model)`** removes a row (`-32602` `INPUT_LIMIT_NOT_FOUND`); **`input_limit_update(provider, model, *, <named cells>)`** changes only the cells passed explicitly (`None` sends null, which only the three nullable cells accept; `-32602` `INPUT_LIMIT_NOT_FOUND`, `INPUT_LIMIT_EMPTY_UPDATE`, `LOCAL_LIMIT_FROM_MODEL`); **`input_limit_list(provider=None)`** returns `{rows: [...]}` sorted by `(provider, model)` with each row's `origin` (`module` | `manual`). Mutating commands may also return `-32603` `INPUT_LIMIT_PERSIST_FAILED`. Refusals arrive as **`EmbedAPIError`**. The client does not validate these parameters.
|
|
67
|
+
|
|
66
68
|
## Documentation
|
|
67
69
|
|
|
68
70
|
- **[CONFIGURATION.md](CONFIGURATION.md)** — JSON config schema, protocols, validation
|
|
@@ -31,7 +31,7 @@ Use **`response_parsers`** helpers when consuming raw **`cmd`** responses.
|
|
|
31
31
|
**Method:** `embed_file`
|
|
32
32
|
**Params (high level):** `input_file` (path on the **embedding server** host), `format` (`lines` | `json_array`), optional `model`, `dimension`, `device`, `error_policy`, `aggregation_method`.
|
|
33
33
|
|
|
34
|
-
`aggregation_method` (optional; one of `mean_normalized`, `weighted_mean_by_tokens_normalized`, or omitted/`None`) is resolved server-side by priority call → config → constant, applied per line/array entry
|
|
34
|
+
`aggregation_method` (optional; one of `mean_normalized`, `weighted_mean_by_tokens_normalized`, or omitted/`None`) is accepted for any effective provider (`local` or a macsc provider). For the local model it is resolved server-side by priority call → config → constant, applied per line/array entry. For a nonlocal provider an entry longer than the provider's input limit is split and aggregated server-side; when omitted the method is `weighted_mean_by_tokens_normalized` (`method_source` `provider_default`). The client does not validate it. Same semantics as `EmbeddingClient.embed`'s own `aggregation_method` parameter. See the server's `EMBED_REQUEST_LIFECYCLE.md` "Aggregation method resolution" for the full chain.
|
|
35
35
|
|
|
36
36
|
The wire shape matches the server command: **`input_file`** is always the server-visible path. For a client-staged file, call **`upload_file`**, then **`get_upload_session(transfer_id)`** and use the returned **`storage_path`** as **`input_file`** (same pattern as the reference integration tests).
|
|
37
37
|
|
|
@@ -42,6 +42,8 @@ except ImportError: # pragma: no cover - older adapter builds
|
|
|
42
42
|
_POLL_COMPLETED_STATES = ("completed", "success")
|
|
43
43
|
_POLL_FAILED_STATES = ("failed", "error")
|
|
44
44
|
_POLL_STOPPED_STATES = ("stopped", "cancelled", "canceled")
|
|
45
|
+
# Marks an input_limit_update cell that the caller did not name (distinct from null).
|
|
46
|
+
_NOT_GIVEN: Any = object()
|
|
45
47
|
|
|
46
48
|
|
|
47
49
|
def _is_ws_closed_before_terminal(exc: BaseException) -> bool:
|
|
@@ -686,8 +688,11 @@ class EmbeddingClient:
|
|
|
686
688
|
error_policy: 'fail_fast' or 'continue'; default from server
|
|
687
689
|
device: 'auto', 'cpu', 'cuda', 'cuda:0'; default from server
|
|
688
690
|
aggregation_method: How to combine part vectors when a text is
|
|
689
|
-
longer than the model can read.
|
|
690
|
-
text past the limit is refused rather than
|
|
691
|
+
longer than the model can read. For the local model, ``None``
|
|
692
|
+
embeds directly and a text past the limit is refused rather than
|
|
693
|
+
truncated. For a nonlocal provider a text past its input limit is
|
|
694
|
+
split and aggregated server-side, with the default
|
|
695
|
+
``weighted_mean_by_tokens_normalized`` when this is omitted.
|
|
691
696
|
parts: One entry per text: a list of parts to combine, or ``None``
|
|
692
697
|
to let the server derive the parts from the text itself.
|
|
693
698
|
wait: If True, wait for job completion and return results (via /ws).
|
|
@@ -716,8 +721,15 @@ class EmbeddingClient:
|
|
|
716
721
|
EXTERNAL_BAD_RESPONSE, EXTERNAL_INVALID_REQUEST; -32001
|
|
717
722
|
MODEL_LOADING (retry); -32004 OWN_MODEL_DISABLED; -32005
|
|
718
723
|
GPU_DISABLED; -32603 MODEL_LOAD_FAILED, NO_GPU_AVAILABLE.
|
|
719
|
-
``
|
|
720
|
-
|
|
724
|
+
``aggregation_method`` and ``parts`` are accepted for any
|
|
725
|
+
effective provider. A text longer than a nonlocal provider's input
|
|
726
|
+
limit is split and aggregated server-side: with no
|
|
727
|
+
``aggregation_method`` the default is
|
|
728
|
+
``weighted_mean_by_tokens_normalized`` (reported as
|
|
729
|
+
``method_source`` ``provider_default``); it is never refused for
|
|
730
|
+
lack of a method. ``device`` is accepted only with the effective
|
|
731
|
+
provider ``"local"``. The client does not validate these
|
|
732
|
+
parameters; it forwards them as given.
|
|
721
733
|
|
|
722
734
|
Returns:
|
|
723
735
|
If wait=False: ``{"job_id", "status", "message"}``; when the server hit
|
|
@@ -1179,9 +1191,12 @@ class EmbeddingClient:
|
|
|
1179
1191
|
input_file: Absolute path to UTF-8 file on the **server** filesystem.
|
|
1180
1192
|
file_format: ``lines`` or ``json_array`` (maps to server param ``format``).
|
|
1181
1193
|
model, dimension, device, error_policy: Same semantics as :meth:`embed`.
|
|
1182
|
-
aggregation_method: Same semantics as :meth:`embed`:
|
|
1183
|
-
|
|
1184
|
-
|
|
1194
|
+
aggregation_method: Same semantics as :meth:`embed`: accepted for any
|
|
1195
|
+
provider; for a nonlocal provider an over-limit entry is split
|
|
1196
|
+
and aggregated server-side (default
|
|
1197
|
+
``weighted_mean_by_tokens_normalized``). For the local model it
|
|
1198
|
+
is resolved by priority call -> config -> constant when omitted;
|
|
1199
|
+
applied per-item, one line/array entry at a time.
|
|
1185
1200
|
provider: Same semantics as :meth:`embed` (``"local"`` or a live
|
|
1186
1201
|
macsc provider id; sent only when not ``None``; resolution order
|
|
1187
1202
|
and error codes as documented there).
|
|
@@ -1570,6 +1585,153 @@ class EmbeddingClient:
|
|
|
1570
1585
|
params["wait"] = wait
|
|
1571
1586
|
return await self._service_command("model_load", params)
|
|
1572
1587
|
|
|
1588
|
+
async def input_limit_add(
|
|
1589
|
+
self,
|
|
1590
|
+
provider: str,
|
|
1591
|
+
model: str,
|
|
1592
|
+
max_input_tokens: int,
|
|
1593
|
+
tokenizer: str,
|
|
1594
|
+
max_inputs_per_request: Optional[int] = None,
|
|
1595
|
+
max_total_tokens_per_request: Optional[int] = None,
|
|
1596
|
+
source: Optional[str] = None,
|
|
1597
|
+
) -> Dict[str, Any]:
|
|
1598
|
+
"""Add a manual input-limit row for (provider, model).
|
|
1599
|
+
|
|
1600
|
+
Cells not given are omitted from the request (server default: null for
|
|
1601
|
+
the three nullable cells). The client does not validate the values.
|
|
1602
|
+
|
|
1603
|
+
Args:
|
|
1604
|
+
provider: Provider id (``"local"`` or a macsc provider id).
|
|
1605
|
+
model: Model id under that provider.
|
|
1606
|
+
max_input_tokens: Positive integer limit; ``"model"`` is the only
|
|
1607
|
+
value the local row accepts, so a number on ``local`` is refused.
|
|
1608
|
+
tokenizer: Tokenizer name (enum ``cl100k_base``).
|
|
1609
|
+
max_inputs_per_request: Positive integer or ``None``.
|
|
1610
|
+
max_total_tokens_per_request: Positive integer or ``None``.
|
|
1611
|
+
source: Free-text provenance of the limit, or ``None``.
|
|
1612
|
+
|
|
1613
|
+
Returns:
|
|
1614
|
+
``{provider, model, row: {max_input_tokens, tokenizer,
|
|
1615
|
+
max_inputs_per_request, max_total_tokens_per_request, source,
|
|
1616
|
+
origin: "manual"}}``.
|
|
1617
|
+
|
|
1618
|
+
Raises:
|
|
1619
|
+
EmbedAPIError: -32602 INPUT_LIMIT_EXISTS (row already present),
|
|
1620
|
+
-32602 LOCAL_LIMIT_FROM_MODEL (numeric limit on ``local``),
|
|
1621
|
+
-32602 validation (unknown, missing, type or value; expected/got),
|
|
1622
|
+
-32603 INPUT_LIMIT_PERSIST_FAILED (table and file unchanged).
|
|
1623
|
+
"""
|
|
1624
|
+
params: Dict[str, Any] = {
|
|
1625
|
+
"provider": provider,
|
|
1626
|
+
"model": model,
|
|
1627
|
+
"max_input_tokens": max_input_tokens,
|
|
1628
|
+
"tokenizer": tokenizer,
|
|
1629
|
+
}
|
|
1630
|
+
if max_inputs_per_request is not None:
|
|
1631
|
+
params["max_inputs_per_request"] = max_inputs_per_request
|
|
1632
|
+
if max_total_tokens_per_request is not None:
|
|
1633
|
+
params["max_total_tokens_per_request"] = max_total_tokens_per_request
|
|
1634
|
+
if source is not None:
|
|
1635
|
+
params["source"] = source
|
|
1636
|
+
return await self._service_command("input_limit_add", params)
|
|
1637
|
+
|
|
1638
|
+
async def input_limit_delete(self, provider: str, model: str) -> Dict[str, Any]:
|
|
1639
|
+
"""Delete the input-limit row for (provider, model).
|
|
1640
|
+
|
|
1641
|
+
A row registered by a module is remembered as deleted (not re-added at
|
|
1642
|
+
startup); a manual row with no module row is removed.
|
|
1643
|
+
|
|
1644
|
+
Args:
|
|
1645
|
+
provider: Provider id.
|
|
1646
|
+
model: Model id under that provider.
|
|
1647
|
+
|
|
1648
|
+
Returns:
|
|
1649
|
+
``{provider, model, deleted: true, origin_was}``.
|
|
1650
|
+
|
|
1651
|
+
Raises:
|
|
1652
|
+
EmbedAPIError: -32602 INPUT_LIMIT_NOT_FOUND (no such row), -32602
|
|
1653
|
+
validation, -32603 INPUT_LIMIT_PERSIST_FAILED (unchanged).
|
|
1654
|
+
"""
|
|
1655
|
+
return await self._service_command(
|
|
1656
|
+
"input_limit_delete", {"provider": provider, "model": model}
|
|
1657
|
+
)
|
|
1658
|
+
|
|
1659
|
+
async def input_limit_update(
|
|
1660
|
+
self,
|
|
1661
|
+
provider: str,
|
|
1662
|
+
model: str,
|
|
1663
|
+
*,
|
|
1664
|
+
max_input_tokens: Any = _NOT_GIVEN,
|
|
1665
|
+
tokenizer: Any = _NOT_GIVEN,
|
|
1666
|
+
max_inputs_per_request: Any = _NOT_GIVEN,
|
|
1667
|
+
max_total_tokens_per_request: Any = _NOT_GIVEN,
|
|
1668
|
+
source: Any = _NOT_GIVEN,
|
|
1669
|
+
) -> Dict[str, Any]:
|
|
1670
|
+
"""Change only the named cells of the input-limit row for (provider, model).
|
|
1671
|
+
|
|
1672
|
+
Only the cells passed explicitly are sent; every other cell of the row
|
|
1673
|
+
stays unchanged. Passing ``None`` sends null, which the server accepts
|
|
1674
|
+
only for ``max_inputs_per_request``, ``max_total_tokens_per_request`` and
|
|
1675
|
+
``source``. Updating a module row makes it a manual row (manual override).
|
|
1676
|
+
Calling with no cells sends none, and the server refuses it with
|
|
1677
|
+
INPUT_LIMIT_EMPTY_UPDATE.
|
|
1678
|
+
|
|
1679
|
+
Args:
|
|
1680
|
+
provider: Provider id.
|
|
1681
|
+
model: Model id under that provider.
|
|
1682
|
+
max_input_tokens: Positive integer; refused on ``local``
|
|
1683
|
+
(LOCAL_LIMIT_FROM_MODEL).
|
|
1684
|
+
tokenizer: Tokenizer name (enum ``cl100k_base``).
|
|
1685
|
+
max_inputs_per_request: Positive integer or ``None``.
|
|
1686
|
+
max_total_tokens_per_request: Positive integer or ``None``.
|
|
1687
|
+
source: Free-text provenance or ``None``.
|
|
1688
|
+
|
|
1689
|
+
Returns:
|
|
1690
|
+
``{provider, model, row: {all cells}, changed: [names of the cells
|
|
1691
|
+
whose value changed], origin: "manual"}``.
|
|
1692
|
+
|
|
1693
|
+
Raises:
|
|
1694
|
+
EmbedAPIError: -32602 INPUT_LIMIT_NOT_FOUND (no such row),
|
|
1695
|
+
-32602 INPUT_LIMIT_EMPTY_UPDATE (no cell named),
|
|
1696
|
+
-32602 LOCAL_LIMIT_FROM_MODEL, -32602 validation (unknown cell,
|
|
1697
|
+
type or value; expected/got), -32603 INPUT_LIMIT_PERSIST_FAILED
|
|
1698
|
+
(unchanged).
|
|
1699
|
+
"""
|
|
1700
|
+
named = {
|
|
1701
|
+
"max_input_tokens": max_input_tokens,
|
|
1702
|
+
"tokenizer": tokenizer,
|
|
1703
|
+
"max_inputs_per_request": max_inputs_per_request,
|
|
1704
|
+
"max_total_tokens_per_request": max_total_tokens_per_request,
|
|
1705
|
+
"source": source,
|
|
1706
|
+
}
|
|
1707
|
+
params: Dict[str, Any] = {"provider": provider, "model": model}
|
|
1708
|
+
for name, value in named.items():
|
|
1709
|
+
if value is not _NOT_GIVEN:
|
|
1710
|
+
params[name] = value
|
|
1711
|
+
return await self._service_command("input_limit_update", params)
|
|
1712
|
+
|
|
1713
|
+
async def input_limit_list(self, provider: Optional[str] = None) -> Dict[str, Any]:
|
|
1714
|
+
"""List input-limit rows, sorted by (provider, model), unique by key.
|
|
1715
|
+
|
|
1716
|
+
Reads no model and makes no provider call. Deletion marks are not shown.
|
|
1717
|
+
|
|
1718
|
+
Args:
|
|
1719
|
+
provider: Optional provider filter; sent only when not ``None``.
|
|
1720
|
+
|
|
1721
|
+
Returns:
|
|
1722
|
+
``{rows: [{provider, model, max_input_tokens, tokenizer,
|
|
1723
|
+
max_inputs_per_request, max_total_tokens_per_request, source,
|
|
1724
|
+
origin: "module" | "manual"}]}``; a provider with no rows gives
|
|
1725
|
+
``rows: []``.
|
|
1726
|
+
|
|
1727
|
+
Raises:
|
|
1728
|
+
EmbedAPIError: -32602 validation (unknown parameter, value).
|
|
1729
|
+
"""
|
|
1730
|
+
params: Dict[str, Any] = {}
|
|
1731
|
+
if provider is not None:
|
|
1732
|
+
params["provider"] = provider
|
|
1733
|
+
return await self._service_command("input_limit_list", params)
|
|
1734
|
+
|
|
1573
1735
|
async def list_commands(self) -> Dict[str, Any]:
|
|
1574
1736
|
"""
|
|
1575
1737
|
List available commands.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: embed-client
|
|
3
|
-
Version: 4.0.
|
|
3
|
+
Version: 4.0.53
|
|
4
4
|
Summary: Async client for the Embedding Service API. Canonical class: EmbeddingClient (JSON-RPC via mcp-proxy-adapter >=8.10).
|
|
5
5
|
Author-email: Vasiliy Zdanovskiy <vasilyvz@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -110,6 +110,8 @@ Resolution order (server): provider given -> must be known, model omitted -> the
|
|
|
110
110
|
|
|
111
111
|
Error codes (`error.data.code` / `error.data.kind`, surfaced unchanged): `-32602` `UNKNOWN_PROVIDER`, `UNKNOWN_MODEL`, `UNSUPPORTED_DIMENSION`, `PROVIDER_REQUIRED`; `-32003` `EXTERNAL_UNAVAILABLE`, `EXTERNAL_UPSTREAM_FAILURE`, `EXTERNAL_BAD_RESPONSE`, `EXTERNAL_INVALID_REQUEST`; `-32001` `MODEL_LOADING` (retry); `-32004` `OWN_MODEL_DISABLED`; `-32005` `GPU_DISABLED`; `-32603` `MODEL_LOAD_FAILED`, `NO_GPU_AVAILABLE`. **`model_offload()`** moves the resident local model VRAM -> RAM (pinned against the GPU watcher) and **`model_load(model=None, device=None, wait=None)`** moves it back (`wait=False` returns at once while the load continues, `wait=True` blocks until it is in VRAM); neither takes a provider. Refusals of `model_offload`/`model_load`/`default_model` arrive as **`EmbedAPIError`** carrying the server error object. Every embed result carries `provider`, `model`, `dimension` and `backend`; external results also carry `usage`.
|
|
112
112
|
|
|
113
|
+
**Input-limit table (server input_limit_* commands):** **`input_limit_add(provider, model, max_input_tokens, tokenizer, max_inputs_per_request=None, max_total_tokens_per_request=None, source=None)`** adds a manual row (`-32602` `INPUT_LIMIT_EXISTS`, `LOCAL_LIMIT_FROM_MODEL`); **`input_limit_delete(provider, model)`** removes a row (`-32602` `INPUT_LIMIT_NOT_FOUND`); **`input_limit_update(provider, model, *, <named cells>)`** changes only the cells passed explicitly (`None` sends null, which only the three nullable cells accept; `-32602` `INPUT_LIMIT_NOT_FOUND`, `INPUT_LIMIT_EMPTY_UPDATE`, `LOCAL_LIMIT_FROM_MODEL`); **`input_limit_list(provider=None)`** returns `{rows: [...]}` sorted by `(provider, model)` with each row's `origin` (`module` | `manual`). Mutating commands may also return `-32603` `INPUT_LIMIT_PERSIST_FAILED`. Refusals arrive as **`EmbedAPIError`**. The client does not validate these parameters.
|
|
114
|
+
|
|
113
115
|
## Documentation
|
|
114
116
|
|
|
115
117
|
- **[CONFIGURATION.md](CONFIGURATION.md)** — JSON config schema, protocols, validation
|
|
@@ -222,6 +222,7 @@ tests/test_embed_file_aggregation_method.py
|
|
|
222
222
|
tests/test_embed_file_output_validate.py
|
|
223
223
|
tests/test_embed_immediate_mode.py
|
|
224
224
|
tests/test_example_async_usage.py
|
|
225
|
+
tests/test_input_limit_commands_client.py
|
|
225
226
|
tests/test_json_embed_file_preflight.py
|
|
226
227
|
tests/test_local_json_embed_file.py
|
|
227
228
|
tests/test_md_embed_file_prep.py
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "embed-client"
|
|
7
|
-
version = "4.0.
|
|
7
|
+
version = "4.0.53"
|
|
8
8
|
description = """Async client for the Embedding Service API. Canonical class: EmbeddingClient (JSON-RPC via mcp-proxy-adapter >=8.10).
|
|
9
9
|
|
|
10
10
|
Public API highlights:
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Client unit tests for the input-limit table commands (bug 9149570e).
|
|
3
|
+
|
|
4
|
+
EmbeddingClient.input_limit_add / input_limit_delete / input_limit_update /
|
|
5
|
+
input_limit_list send the matrix cells of each command over the existing
|
|
6
|
+
service-command path and return the result data, or raise EmbedAPIError
|
|
7
|
+
carrying the server error. The transport is stubbed (no network, no billable
|
|
8
|
+
call).
|
|
9
|
+
|
|
10
|
+
Author: Vasiliy Zdanovskiy
|
|
11
|
+
email: vasilyvz@gmail.com
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
from unittest.mock import AsyncMock
|
|
15
|
+
|
|
16
|
+
import pytest
|
|
17
|
+
|
|
18
|
+
from embed_client.embedding_client import EmbeddingClient
|
|
19
|
+
from embed_client.exceptions import EmbedAPIError
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def _client() -> EmbeddingClient:
|
|
23
|
+
return EmbeddingClient(protocol="http", host="127.0.0.1", port=8080)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def _ok(data):
|
|
27
|
+
return {"result": {"success": True, "data": data}}
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def _row(**overrides):
|
|
31
|
+
row = {
|
|
32
|
+
"max_input_tokens": 8000,
|
|
33
|
+
"tokenizer": "cl100k_base",
|
|
34
|
+
"max_inputs_per_request": 2048,
|
|
35
|
+
"max_total_tokens_per_request": 300000,
|
|
36
|
+
"source": "unit",
|
|
37
|
+
}
|
|
38
|
+
row.update(overrides)
|
|
39
|
+
return row
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
@pytest.mark.asyncio
|
|
43
|
+
async def test_input_limit_add_sends_required_cells_and_returns_data():
|
|
44
|
+
client = _client()
|
|
45
|
+
data = {
|
|
46
|
+
"provider": "pipeline_test",
|
|
47
|
+
"model": "pipeline-test-model",
|
|
48
|
+
"row": {**_row(), "origin": "manual"},
|
|
49
|
+
}
|
|
50
|
+
client.client.jsonrpc_call = AsyncMock(return_value=_ok(data))
|
|
51
|
+
|
|
52
|
+
assert await client.input_limit_add(
|
|
53
|
+
"pipeline_test", "pipeline-test-model", 8000, "cl100k_base"
|
|
54
|
+
) == data
|
|
55
|
+
method, params = client.client.jsonrpc_call.await_args.args
|
|
56
|
+
assert method == "input_limit_add"
|
|
57
|
+
assert params == {
|
|
58
|
+
"provider": "pipeline_test",
|
|
59
|
+
"model": "pipeline-test-model",
|
|
60
|
+
"max_input_tokens": 8000,
|
|
61
|
+
"tokenizer": "cl100k_base",
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
@pytest.mark.asyncio
|
|
66
|
+
async def test_input_limit_add_sends_optional_cells_only_when_given():
|
|
67
|
+
client = _client()
|
|
68
|
+
client.client.jsonrpc_call = AsyncMock(return_value=_ok({}))
|
|
69
|
+
|
|
70
|
+
await client.input_limit_add(
|
|
71
|
+
"p",
|
|
72
|
+
"m",
|
|
73
|
+
8000,
|
|
74
|
+
"cl100k_base",
|
|
75
|
+
max_inputs_per_request=2048,
|
|
76
|
+
max_total_tokens_per_request=300000,
|
|
77
|
+
source="doc",
|
|
78
|
+
)
|
|
79
|
+
_method, params = client.client.jsonrpc_call.await_args.args
|
|
80
|
+
assert params == {
|
|
81
|
+
"provider": "p",
|
|
82
|
+
"model": "m",
|
|
83
|
+
"max_input_tokens": 8000,
|
|
84
|
+
"tokenizer": "cl100k_base",
|
|
85
|
+
"max_inputs_per_request": 2048,
|
|
86
|
+
"max_total_tokens_per_request": 300000,
|
|
87
|
+
"source": "doc",
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
@pytest.mark.asyncio
|
|
92
|
+
async def test_input_limit_add_raises_api_error_with_server_error():
|
|
93
|
+
client = _client()
|
|
94
|
+
refusal = {
|
|
95
|
+
"code": -32602,
|
|
96
|
+
"message": "input limit row already exists",
|
|
97
|
+
"data": {
|
|
98
|
+
"code": "INPUT_LIMIT_EXISTS",
|
|
99
|
+
"provider": "p",
|
|
100
|
+
"model": "m",
|
|
101
|
+
"origin": "module",
|
|
102
|
+
},
|
|
103
|
+
}
|
|
104
|
+
client.client.jsonrpc_call = AsyncMock(
|
|
105
|
+
return_value={"result": {"success": False, "error": refusal}}
|
|
106
|
+
)
|
|
107
|
+
with pytest.raises(EmbedAPIError) as info:
|
|
108
|
+
await client.input_limit_add("p", "m", 8000, "cl100k_base")
|
|
109
|
+
assert info.value.error == refusal
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
@pytest.mark.asyncio
|
|
113
|
+
async def test_input_limit_delete_sends_provider_and_model_only():
|
|
114
|
+
client = _client()
|
|
115
|
+
data = {"provider": "p", "model": "m", "deleted": True, "origin_was": "manual"}
|
|
116
|
+
client.client.jsonrpc_call = AsyncMock(return_value=_ok(data))
|
|
117
|
+
|
|
118
|
+
assert await client.input_limit_delete("p", "m") == data
|
|
119
|
+
method, params = client.client.jsonrpc_call.await_args.args
|
|
120
|
+
assert (method, params) == ("input_limit_delete", {"provider": "p", "model": "m"})
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
@pytest.mark.asyncio
|
|
124
|
+
async def test_input_limit_delete_raises_api_error_when_row_absent():
|
|
125
|
+
client = _client()
|
|
126
|
+
refusal = {
|
|
127
|
+
"code": -32602,
|
|
128
|
+
"message": "input limit row not found",
|
|
129
|
+
"data": {"code": "INPUT_LIMIT_NOT_FOUND", "provider": "p", "model": "m"},
|
|
130
|
+
}
|
|
131
|
+
client.client.jsonrpc_call = AsyncMock(return_value={"error": refusal})
|
|
132
|
+
with pytest.raises(EmbedAPIError) as info:
|
|
133
|
+
await client.input_limit_delete("p", "m")
|
|
134
|
+
assert info.value.error == refusal
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
@pytest.mark.asyncio
|
|
138
|
+
async def test_input_limit_update_sends_only_the_named_cells():
|
|
139
|
+
client = _client()
|
|
140
|
+
data = {
|
|
141
|
+
"provider": "p",
|
|
142
|
+
"model": "m",
|
|
143
|
+
"row": _row(max_input_tokens=4000),
|
|
144
|
+
"changed": ["max_input_tokens"],
|
|
145
|
+
"origin": "manual",
|
|
146
|
+
}
|
|
147
|
+
client.client.jsonrpc_call = AsyncMock(return_value=_ok(data))
|
|
148
|
+
|
|
149
|
+
assert await client.input_limit_update("p", "m", max_input_tokens=4000) == data
|
|
150
|
+
method, params = client.client.jsonrpc_call.await_args.args
|
|
151
|
+
assert method == "input_limit_update"
|
|
152
|
+
assert params == {"provider": "p", "model": "m", "max_input_tokens": 4000}
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
@pytest.mark.asyncio
|
|
156
|
+
async def test_input_limit_update_sends_null_for_explicit_none_only():
|
|
157
|
+
client = _client()
|
|
158
|
+
client.client.jsonrpc_call = AsyncMock(return_value=_ok({}))
|
|
159
|
+
|
|
160
|
+
await client.input_limit_update(
|
|
161
|
+
"p", "m", max_inputs_per_request=None, source="new"
|
|
162
|
+
)
|
|
163
|
+
_method, params = client.client.jsonrpc_call.await_args.args
|
|
164
|
+
assert params == {
|
|
165
|
+
"provider": "p",
|
|
166
|
+
"model": "m",
|
|
167
|
+
"max_inputs_per_request": None,
|
|
168
|
+
"source": "new",
|
|
169
|
+
}
|
|
170
|
+
assert "max_input_tokens" not in params
|
|
171
|
+
assert "tokenizer" not in params
|
|
172
|
+
assert "max_total_tokens_per_request" not in params
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
@pytest.mark.asyncio
|
|
176
|
+
async def test_input_limit_update_with_no_cells_sends_none_and_server_refuses():
|
|
177
|
+
client = _client()
|
|
178
|
+
refusal = {
|
|
179
|
+
"code": -32602,
|
|
180
|
+
"message": "no cell named",
|
|
181
|
+
"data": {"code": "INPUT_LIMIT_EMPTY_UPDATE", "violation": "missing"},
|
|
182
|
+
}
|
|
183
|
+
client.client.jsonrpc_call = AsyncMock(return_value={"error": refusal})
|
|
184
|
+
with pytest.raises(EmbedAPIError) as info:
|
|
185
|
+
await client.input_limit_update("p", "m")
|
|
186
|
+
_method, params = client.client.jsonrpc_call.await_args.args
|
|
187
|
+
assert params == {"provider": "p", "model": "m"}
|
|
188
|
+
assert info.value.error == refusal
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
@pytest.mark.asyncio
|
|
192
|
+
async def test_input_limit_update_forwards_invalid_value_unchanged():
|
|
193
|
+
client = _client()
|
|
194
|
+
client.client.jsonrpc_call = AsyncMock(
|
|
195
|
+
return_value={"result": {"success": False, "error": {"code": -32602}}}
|
|
196
|
+
)
|
|
197
|
+
with pytest.raises(EmbedAPIError):
|
|
198
|
+
await client.input_limit_update("p", "m", max_input_tokens=None)
|
|
199
|
+
_method, params = client.client.jsonrpc_call.await_args.args
|
|
200
|
+
assert params == {"provider": "p", "model": "m", "max_input_tokens": None}
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
@pytest.mark.asyncio
|
|
204
|
+
async def test_input_limit_list_without_filter_sends_no_parameters():
|
|
205
|
+
client = _client()
|
|
206
|
+
data = {"rows": [{"provider": "local", "model": "x", "origin": "module"}]}
|
|
207
|
+
client.client.jsonrpc_call = AsyncMock(return_value=_ok(data))
|
|
208
|
+
|
|
209
|
+
assert await client.input_limit_list() == data
|
|
210
|
+
method, params = client.client.jsonrpc_call.await_args.args
|
|
211
|
+
assert (method, params) == ("input_limit_list", {})
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
@pytest.mark.asyncio
|
|
215
|
+
async def test_input_limit_list_sends_provider_filter_when_given():
|
|
216
|
+
client = _client()
|
|
217
|
+
client.client.jsonrpc_call = AsyncMock(return_value=_ok({"rows": []}))
|
|
218
|
+
|
|
219
|
+
assert await client.input_limit_list(provider="openai") == {"rows": []}
|
|
220
|
+
method, params = client.client.jsonrpc_call.await_args.args
|
|
221
|
+
assert (method, params) == ("input_limit_list", {"provider": "openai"})
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
@pytest.mark.asyncio
|
|
225
|
+
async def test_input_limit_commands_raise_api_error_on_jsonrpc_error():
|
|
226
|
+
client = _client()
|
|
227
|
+
error = {"code": -32603, "message": "persist failed", "data": {
|
|
228
|
+
"code": "INPUT_LIMIT_PERSIST_FAILED"}}
|
|
229
|
+
client.client.jsonrpc_call = AsyncMock(return_value={"error": error})
|
|
230
|
+
with pytest.raises(EmbedAPIError) as info:
|
|
231
|
+
await client.input_limit_list()
|
|
232
|
+
assert info.value.error == error
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|