payi 0.1.0a109__tar.gz → 0.1.0a111__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.

Potentially problematic release.


This version of payi might be problematic. Click here for more details.

Files changed (202) hide show
  1. payi-0.1.0a111/.release-please-manifest.json +3 -0
  2. {payi-0.1.0a109 → payi-0.1.0a111}/CHANGELOG.md +17 -0
  3. {payi-0.1.0a109 → payi-0.1.0a111}/PKG-INFO +2 -1
  4. {payi-0.1.0a109 → payi-0.1.0a111}/pyproject.toml +2 -1
  5. {payi-0.1.0a109 → payi-0.1.0a111}/requirements-dev.lock +16 -0
  6. {payi-0.1.0a109 → payi-0.1.0a111}/requirements.lock +18 -0
  7. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/_version.py +1 -1
  8. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/lib/AnthropicInstrumentor.py +67 -20
  9. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/lib/BedrockInstrumentor.py +35 -1
  10. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/lib/VertexRequest.py +3 -1
  11. payi-0.1.0a111/src/payi/lib/data/cohere_embed_english_v3.json +30706 -0
  12. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/lib/instrument.py +4 -2
  13. payi-0.1.0a109/.release-please-manifest.json +0 -3
  14. {payi-0.1.0a109 → payi-0.1.0a111}/.gitignore +0 -0
  15. {payi-0.1.0a109 → payi-0.1.0a111}/CONTRIBUTING.md +0 -0
  16. {payi-0.1.0a109 → payi-0.1.0a111}/LICENSE +0 -0
  17. {payi-0.1.0a109 → payi-0.1.0a111}/README.md +0 -0
  18. {payi-0.1.0a109 → payi-0.1.0a111}/SECURITY.md +0 -0
  19. {payi-0.1.0a109 → payi-0.1.0a111}/api.md +0 -0
  20. {payi-0.1.0a109 → payi-0.1.0a111}/bin/check-release-environment +0 -0
  21. {payi-0.1.0a109 → payi-0.1.0a111}/bin/publish-pypi +0 -0
  22. {payi-0.1.0a109 → payi-0.1.0a111}/examples/.keep +0 -0
  23. {payi-0.1.0a109 → payi-0.1.0a111}/mypy.ini +0 -0
  24. {payi-0.1.0a109 → payi-0.1.0a111}/noxfile.py +0 -0
  25. {payi-0.1.0a109 → payi-0.1.0a111}/release-please-config.json +0 -0
  26. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/__init__.py +0 -0
  27. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/_base_client.py +0 -0
  28. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/_client.py +0 -0
  29. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/_compat.py +0 -0
  30. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/_constants.py +0 -0
  31. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/_exceptions.py +0 -0
  32. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/_files.py +0 -0
  33. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/_models.py +0 -0
  34. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/_qs.py +0 -0
  35. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/_resource.py +0 -0
  36. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/_response.py +0 -0
  37. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/_streaming.py +0 -0
  38. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/_types.py +0 -0
  39. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/_utils/__init__.py +0 -0
  40. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/_utils/_logs.py +0 -0
  41. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/_utils/_proxy.py +0 -0
  42. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/_utils/_reflection.py +0 -0
  43. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/_utils/_resources_proxy.py +0 -0
  44. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/_utils/_streams.py +0 -0
  45. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/_utils/_sync.py +0 -0
  46. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/_utils/_transform.py +0 -0
  47. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/_utils/_typing.py +0 -0
  48. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/_utils/_utils.py +0 -0
  49. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/lib/.keep +0 -0
  50. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/lib/GoogleGenAiInstrumentor.py +0 -0
  51. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/lib/OpenAIInstrumentor.py +0 -0
  52. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/lib/Stopwatch.py +0 -0
  53. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/lib/VertexInstrumentor.py +0 -0
  54. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/lib/helpers.py +0 -0
  55. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/lib/version_helper.py +0 -0
  56. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/pagination.py +0 -0
  57. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/py.typed +0 -0
  58. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/resources/__init__.py +0 -0
  59. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/resources/categories/__init__.py +0 -0
  60. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/resources/categories/categories.py +0 -0
  61. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/resources/categories/fixed_cost_resources.py +0 -0
  62. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/resources/categories/resources.py +0 -0
  63. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/resources/ingest.py +0 -0
  64. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/resources/limits/__init__.py +0 -0
  65. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/resources/limits/limits.py +0 -0
  66. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/resources/limits/tags.py +0 -0
  67. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/resources/requests/__init__.py +0 -0
  68. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/resources/requests/request_id/__init__.py +0 -0
  69. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/resources/requests/request_id/properties.py +0 -0
  70. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/resources/requests/request_id/request_id.py +0 -0
  71. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/resources/requests/request_id/result.py +0 -0
  72. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/resources/requests/requests.py +0 -0
  73. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/resources/requests/response_id/__init__.py +0 -0
  74. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/resources/requests/response_id/properties.py +0 -0
  75. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/resources/requests/response_id/response_id.py +0 -0
  76. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/resources/requests/response_id/result.py +0 -0
  77. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/resources/use_cases/__init__.py +0 -0
  78. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/resources/use_cases/definitions/__init__.py +0 -0
  79. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/resources/use_cases/definitions/definitions.py +0 -0
  80. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/resources/use_cases/definitions/kpis.py +0 -0
  81. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/resources/use_cases/definitions/limit_config.py +0 -0
  82. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/resources/use_cases/definitions/version.py +0 -0
  83. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/resources/use_cases/kpis.py +0 -0
  84. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/resources/use_cases/properties.py +0 -0
  85. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/resources/use_cases/use_cases.py +0 -0
  86. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/__init__.py +0 -0
  87. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/bulk_ingest_response.py +0 -0
  88. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/categories/__init__.py +0 -0
  89. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/categories/fixed_cost_resource_create_params.py +0 -0
  90. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/categories/resource_create_params.py +0 -0
  91. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/categories/resource_list_params.py +0 -0
  92. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/category_delete_resource_response.py +0 -0
  93. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/category_delete_response.py +0 -0
  94. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/category_list_params.py +0 -0
  95. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/category_list_resources_params.py +0 -0
  96. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/category_resource_response.py +0 -0
  97. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/category_response.py +0 -0
  98. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/cost_data.py +0 -0
  99. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/cost_details.py +0 -0
  100. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/default_response.py +0 -0
  101. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/ingest_bulk_params.py +0 -0
  102. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/ingest_event_param.py +0 -0
  103. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/ingest_response.py +0 -0
  104. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/ingest_units_params.py +0 -0
  105. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/limit_create_params.py +0 -0
  106. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/limit_history_response.py +0 -0
  107. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/limit_list_params.py +0 -0
  108. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/limit_list_response.py +0 -0
  109. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/limit_reset_params.py +0 -0
  110. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/limit_response.py +0 -0
  111. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/limit_update_params.py +0 -0
  112. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/limits/__init__.py +0 -0
  113. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/limits/limit_tags.py +0 -0
  114. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/limits/tag_create_params.py +0 -0
  115. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/limits/tag_create_response.py +0 -0
  116. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/limits/tag_delete_response.py +0 -0
  117. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/limits/tag_list_response.py +0 -0
  118. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/limits/tag_remove_params.py +0 -0
  119. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/limits/tag_remove_response.py +0 -0
  120. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/limits/tag_update_params.py +0 -0
  121. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/limits/tag_update_response.py +0 -0
  122. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/pay_i_common_models_api_router_header_info_param.py +0 -0
  123. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/request_result.py +0 -0
  124. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/requests/__init__.py +0 -0
  125. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/requests/request_id/__init__.py +0 -0
  126. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/requests/request_id/property_update_params.py +0 -0
  127. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/requests/response_id/__init__.py +0 -0
  128. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/requests/response_id/property_update_params.py +0 -0
  129. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/requests_data.py +0 -0
  130. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/shared/__init__.py +0 -0
  131. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/shared/evaluation_response.py +0 -0
  132. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/shared/ingest_units.py +0 -0
  133. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/shared/pay_i_common_models_budget_management_cost_details_base.py +0 -0
  134. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/shared/pay_i_common_models_budget_management_create_limit_base.py +0 -0
  135. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/shared/properties_response.py +0 -0
  136. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/shared/xproxy_error.py +0 -0
  137. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/shared/xproxy_result.py +0 -0
  138. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/shared_params/__init__.py +0 -0
  139. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/shared_params/ingest_units.py +0 -0
  140. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/shared_params/pay_i_common_models_budget_management_create_limit_base.py +0 -0
  141. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/total_cost_data.py +0 -0
  142. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/use_case_instance_response.py +0 -0
  143. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/use_cases/__init__.py +0 -0
  144. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/use_cases/definition_create_params.py +0 -0
  145. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/use_cases/definition_list_params.py +0 -0
  146. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/use_cases/definition_update_params.py +0 -0
  147. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/use_cases/definitions/__init__.py +0 -0
  148. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/use_cases/definitions/kpi_create_params.py +0 -0
  149. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/use_cases/definitions/kpi_create_response.py +0 -0
  150. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/use_cases/definitions/kpi_delete_response.py +0 -0
  151. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/use_cases/definitions/kpi_list_params.py +0 -0
  152. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/use_cases/definitions/kpi_list_response.py +0 -0
  153. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/use_cases/definitions/kpi_retrieve_response.py +0 -0
  154. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/use_cases/definitions/kpi_update_params.py +0 -0
  155. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/use_cases/definitions/kpi_update_response.py +0 -0
  156. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/use_cases/definitions/limit_config_create_params.py +0 -0
  157. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/use_cases/kpi_list_params.py +0 -0
  158. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/use_cases/kpi_list_response.py +0 -0
  159. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/use_cases/kpi_update_params.py +0 -0
  160. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/use_cases/property_update_params.py +0 -0
  161. {payi-0.1.0a109 → payi-0.1.0a111}/src/payi/types/use_cases/use_case_definition.py +0 -0
  162. {payi-0.1.0a109 → payi-0.1.0a111}/tests/__init__.py +0 -0
  163. {payi-0.1.0a109 → payi-0.1.0a111}/tests/api_resources/__init__.py +0 -0
  164. {payi-0.1.0a109 → payi-0.1.0a111}/tests/api_resources/categories/__init__.py +0 -0
  165. {payi-0.1.0a109 → payi-0.1.0a111}/tests/api_resources/categories/test_fixed_cost_resources.py +0 -0
  166. {payi-0.1.0a109 → payi-0.1.0a111}/tests/api_resources/categories/test_resources.py +0 -0
  167. {payi-0.1.0a109 → payi-0.1.0a111}/tests/api_resources/limits/__init__.py +0 -0
  168. {payi-0.1.0a109 → payi-0.1.0a111}/tests/api_resources/limits/test_tags.py +0 -0
  169. {payi-0.1.0a109 → payi-0.1.0a111}/tests/api_resources/requests/__init__.py +0 -0
  170. {payi-0.1.0a109 → payi-0.1.0a111}/tests/api_resources/requests/request_id/__init__.py +0 -0
  171. {payi-0.1.0a109 → payi-0.1.0a111}/tests/api_resources/requests/request_id/test_properties.py +0 -0
  172. {payi-0.1.0a109 → payi-0.1.0a111}/tests/api_resources/requests/request_id/test_result.py +0 -0
  173. {payi-0.1.0a109 → payi-0.1.0a111}/tests/api_resources/requests/response_id/__init__.py +0 -0
  174. {payi-0.1.0a109 → payi-0.1.0a111}/tests/api_resources/requests/response_id/test_properties.py +0 -0
  175. {payi-0.1.0a109 → payi-0.1.0a111}/tests/api_resources/requests/response_id/test_result.py +0 -0
  176. {payi-0.1.0a109 → payi-0.1.0a111}/tests/api_resources/test_categories.py +0 -0
  177. {payi-0.1.0a109 → payi-0.1.0a111}/tests/api_resources/test_ingest.py +0 -0
  178. {payi-0.1.0a109 → payi-0.1.0a111}/tests/api_resources/test_limits.py +0 -0
  179. {payi-0.1.0a109 → payi-0.1.0a111}/tests/api_resources/test_use_cases.py +0 -0
  180. {payi-0.1.0a109 → payi-0.1.0a111}/tests/api_resources/use_cases/__init__.py +0 -0
  181. {payi-0.1.0a109 → payi-0.1.0a111}/tests/api_resources/use_cases/definitions/__init__.py +0 -0
  182. {payi-0.1.0a109 → payi-0.1.0a111}/tests/api_resources/use_cases/definitions/test_kpis.py +0 -0
  183. {payi-0.1.0a109 → payi-0.1.0a111}/tests/api_resources/use_cases/definitions/test_limit_config.py +0 -0
  184. {payi-0.1.0a109 → payi-0.1.0a111}/tests/api_resources/use_cases/definitions/test_version.py +0 -0
  185. {payi-0.1.0a109 → payi-0.1.0a111}/tests/api_resources/use_cases/test_definitions.py +0 -0
  186. {payi-0.1.0a109 → payi-0.1.0a111}/tests/api_resources/use_cases/test_kpis.py +0 -0
  187. {payi-0.1.0a109 → payi-0.1.0a111}/tests/api_resources/use_cases/test_properties.py +0 -0
  188. {payi-0.1.0a109 → payi-0.1.0a111}/tests/conftest.py +0 -0
  189. {payi-0.1.0a109 → payi-0.1.0a111}/tests/sample_file.txt +0 -0
  190. {payi-0.1.0a109 → payi-0.1.0a111}/tests/test_client.py +0 -0
  191. {payi-0.1.0a109 → payi-0.1.0a111}/tests/test_deepcopy.py +0 -0
  192. {payi-0.1.0a109 → payi-0.1.0a111}/tests/test_extract_files.py +0 -0
  193. {payi-0.1.0a109 → payi-0.1.0a111}/tests/test_files.py +0 -0
  194. {payi-0.1.0a109 → payi-0.1.0a111}/tests/test_models.py +0 -0
  195. {payi-0.1.0a109 → payi-0.1.0a111}/tests/test_qs.py +0 -0
  196. {payi-0.1.0a109 → payi-0.1.0a111}/tests/test_required_args.py +0 -0
  197. {payi-0.1.0a109 → payi-0.1.0a111}/tests/test_response.py +0 -0
  198. {payi-0.1.0a109 → payi-0.1.0a111}/tests/test_streaming.py +0 -0
  199. {payi-0.1.0a109 → payi-0.1.0a111}/tests/test_transform.py +0 -0
  200. {payi-0.1.0a109 → payi-0.1.0a111}/tests/test_utils/test_proxy.py +0 -0
  201. {payi-0.1.0a109 → payi-0.1.0a111}/tests/test_utils/test_typing.py +0 -0
  202. {payi-0.1.0a109 → payi-0.1.0a111}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.1.0-alpha.111"
3
+ }
@@ -1,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-alpha.111 (2025-08-18)
4
+
5
+ Full Changelog: [v0.1.0-alpha.110...v0.1.0-alpha.111](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.110...v0.1.0-alpha.111)
6
+
7
+ ### Features
8
+
9
+ * anthropic large context, cohere english v3 embed, amazon titan v1 text embed ([#356](https://github.com/Pay-i/pay-i-python/issues/356)) ([9a3549e](https://github.com/Pay-i/pay-i-python/commit/9a3549e1abd284d1647d7c63fa3cdff01ac14a98))
10
+
11
+ ## 0.1.0-alpha.110 (2025-08-09)
12
+
13
+ Full Changelog: [v0.1.0-alpha.109...v0.1.0-alpha.110](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.109...v0.1.0-alpha.110)
14
+
15
+ ### Chores
16
+
17
+ * **internal:** update comment in script ([62f3d00](https://github.com/Pay-i/pay-i-python/commit/62f3d00cbe71bc217f13b9e354a53b9d42dd8c27))
18
+ * update @stainless-api/prism-cli to v5.15.0 ([87fc0ef](https://github.com/Pay-i/pay-i-python/commit/87fc0ef32878b5ba1c4003d4c392ce31f8cfde86))
19
+
3
20
  ## 0.1.0-alpha.109 (2025-08-06)
4
21
 
5
22
  Full Changelog: [v0.1.0-alpha.108...v0.1.0-alpha.109](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.108...v0.1.0-alpha.109)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: payi
3
- Version: 0.1.0a109
3
+ Version: 0.1.0a111
4
4
  Summary: The official Python library for the payi API
5
5
  Project-URL: Homepage, https://github.com/Pay-i/pay-i-python
6
6
  Project-URL: Repository, https://github.com/Pay-i/pay-i-python
@@ -29,6 +29,7 @@ Requires-Dist: nest-asyncio>=1.6.0
29
29
  Requires-Dist: pydantic<3,>=1.9.0
30
30
  Requires-Dist: sniffio
31
31
  Requires-Dist: tiktoken>=0.8.0
32
+ Requires-Dist: tokenizers>=0.21.4
32
33
  Requires-Dist: typing-extensions<5,>=4.10
33
34
  Requires-Dist: wrapt>=1.17.2
34
35
  Provides-Extra: aiohttp
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "payi"
3
- version = "0.1.0-alpha.109"
3
+ version = "0.1.0-alpha.111"
4
4
  description = "The official Python library for the payi API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -17,6 +17,7 @@ dependencies = [
17
17
  "wrapt>=1.17.2",
18
18
  "tiktoken>=0.8.0",
19
19
  "nest-asyncio>=1.6.0",
20
+ "tokenizers>=0.21.4"
20
21
  ]
21
22
  requires-python = ">= 3.8"
22
23
  classifiers = [
@@ -47,12 +47,17 @@ exceptiongroup==1.2.2
47
47
  execnet==2.1.1
48
48
  # via pytest-xdist
49
49
  filelock==3.12.4
50
+ # via huggingface-hub
50
51
  # via virtualenv
51
52
  frozenlist==1.6.2
52
53
  # via aiohttp
53
54
  # via aiosignal
55
+ fsspec==2025.7.0
56
+ # via huggingface-hub
54
57
  h11==0.16.0
55
58
  # via httpcore
59
+ hf-xet==1.1.7
60
+ # via huggingface-hub
56
61
  httpcore==1.0.9
57
62
  # via httpx
58
63
  httpx==0.28.1
@@ -61,6 +66,8 @@ httpx==0.28.1
61
66
  # via respx
62
67
  httpx-aiohttp==0.1.8
63
68
  # via payi
69
+ huggingface-hub==0.34.4
70
+ # via tokenizers
64
71
  idna==3.4
65
72
  # via anyio
66
73
  # via httpx
@@ -85,6 +92,7 @@ nodeenv==1.8.0
85
92
  # via pyright
86
93
  nox==2023.4.22
87
94
  packaging==23.2
95
+ # via huggingface-hub
88
96
  # via nox
89
97
  # via pytest
90
98
  platformdirs==3.11.0
@@ -110,9 +118,12 @@ python-dateutil==2.8.2
110
118
  # via time-machine
111
119
  pytz==2023.3.post1
112
120
  # via dirty-equals
121
+ pyyaml==6.0.2
122
+ # via huggingface-hub
113
123
  regex==2024.11.6
114
124
  # via tiktoken
115
125
  requests==2.32.3
126
+ # via huggingface-hub
116
127
  # via tiktoken
117
128
  respx==0.22.0
118
129
  rich==13.7.1
@@ -127,11 +138,16 @@ sniffio==1.3.0
127
138
  tiktoken==0.8.0
128
139
  # via payi
129
140
  time-machine==2.9.0
141
+ tokenizers==0.21.4
142
+ # via payi
130
143
  tomli==2.0.2
131
144
  # via mypy
132
145
  # via pytest
146
+ tqdm==4.67.1
147
+ # via huggingface-hub
133
148
  typing-extensions==4.12.2
134
149
  # via anyio
150
+ # via huggingface-hub
135
151
  # via multidict
136
152
  # via mypy
137
153
  # via payi
@@ -36,11 +36,17 @@ distro==1.8.0
36
36
  # via payi
37
37
  exceptiongroup==1.2.2
38
38
  # via anyio
39
+ filelock==3.19.1
40
+ # via huggingface-hub
39
41
  frozenlist==1.6.2
40
42
  # via aiohttp
41
43
  # via aiosignal
44
+ fsspec==2025.7.0
45
+ # via huggingface-hub
42
46
  h11==0.16.0
43
47
  # via httpcore
48
+ hf-xet==1.1.7
49
+ # via huggingface-hub
44
50
  httpcore==1.0.9
45
51
  # via httpx
46
52
  httpx==0.28.1
@@ -48,6 +54,8 @@ httpx==0.28.1
48
54
  # via payi
49
55
  httpx-aiohttp==0.1.8
50
56
  # via payi
57
+ huggingface-hub==0.34.4
58
+ # via tokenizers
51
59
  idna==3.4
52
60
  # via anyio
53
61
  # via httpx
@@ -58,6 +66,8 @@ multidict==6.4.4
58
66
  # via yarl
59
67
  nest-asyncio==1.6.0
60
68
  # via payi
69
+ packaging==25.0
70
+ # via huggingface-hub
61
71
  propcache==0.3.1
62
72
  # via aiohttp
63
73
  # via yarl
@@ -65,17 +75,25 @@ pydantic==2.10.3
65
75
  # via payi
66
76
  pydantic-core==2.27.1
67
77
  # via pydantic
78
+ pyyaml==6.0.2
79
+ # via huggingface-hub
68
80
  regex==2024.11.6
69
81
  # via tiktoken
70
82
  requests==2.32.3
83
+ # via huggingface-hub
71
84
  # via tiktoken
72
85
  sniffio==1.3.0
73
86
  # via anyio
74
87
  # via payi
75
88
  tiktoken==0.8.0
76
89
  # via payi
90
+ tokenizers==0.21.4
91
+ # via payi
92
+ tqdm==4.67.1
93
+ # via huggingface-hub
77
94
  typing-extensions==4.12.2
78
95
  # via anyio
96
+ # via huggingface-hub
79
97
  # via multidict
80
98
  # via payi
81
99
  # via pydantic
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "payi"
4
- __version__ = "0.1.0-alpha.109" # x-release-please-version
4
+ __version__ = "0.1.0-alpha.111" # x-release-please-version
@@ -45,6 +45,18 @@ class AnthropicInstrumentor:
45
45
  stream_messages_wrapper(instrumentor),
46
46
  )
47
47
 
48
+ wrap_function_wrapper(
49
+ "anthropic.resources.beta.messages",
50
+ "Messages.create",
51
+ messages_wrapper(instrumentor),
52
+ )
53
+
54
+ wrap_function_wrapper(
55
+ "anthropic.resources.beta.messages",
56
+ "Messages.stream",
57
+ stream_messages_wrapper(instrumentor),
58
+ )
59
+
48
60
  wrap_function_wrapper(
49
61
  "anthropic.resources.messages",
50
62
  "AsyncMessages.create",
@@ -57,6 +69,18 @@ class AnthropicInstrumentor:
57
69
  astream_messages_wrapper(instrumentor),
58
70
  )
59
71
 
72
+ wrap_function_wrapper(
73
+ "anthropic.resources.beta.messages",
74
+ "AsyncMessages.create",
75
+ amessages_wrapper(instrumentor),
76
+ )
77
+
78
+ wrap_function_wrapper(
79
+ "anthropic.resources.beta.messages",
80
+ "AsyncMessages.stream",
81
+ astream_messages_wrapper(instrumentor),
82
+ )
83
+
60
84
  except Exception as e:
61
85
  instrumentor._logger.debug(f"Error instrumenting anthropic: {e}")
62
86
  return
@@ -220,23 +244,52 @@ class _AnthropicProviderRequest(_ProviderRequest):
220
244
 
221
245
  return True
222
246
 
223
- def anthropic_process_synchronous_response(request: _ProviderRequest, response: 'dict[str, Any]', log_prompt_and_response: bool, assign_id: bool) -> Any:
224
- usage = response['usage']
247
+ def anthropic_process_compute_input_cost(request: _ProviderRequest, usage: 'dict[str, Any]') -> int:
225
248
  input = usage['input_tokens']
226
- output = usage['output_tokens']
227
249
  units: dict[str, Units] = request._ingest["units"]
228
250
 
229
251
  cache_creation_input_tokens = usage.get("cache_creation_input_tokens", 0)
230
- if cache_creation_input_tokens > 0:
231
- units["text_cache_write"] = Units(input=cache_creation_input_tokens, output=0)
252
+ cache_read_input_tokens = usage.get("cache_read_input_tokens", 0)
253
+
254
+ total_input_tokens = input + cache_creation_input_tokens + cache_read_input_tokens
255
+
256
+ request._is_large_context = total_input_tokens > 200000
257
+ large_context = "_large_context" if request._is_large_context else ""
258
+
259
+ cache_creation: dict[str, int] = usage.get("cache_creation", {})
260
+ ephemeral_5m_input_tokens: Optional[int] = None
261
+ ephemeral_1h_input_tokens: Optional[int] = None
262
+ textCacheWriteAdded = False
263
+
264
+ if cache_creation:
265
+ ephemeral_5m_input_tokens = cache_creation.get("ephemeral_5m_input_tokens", 0)
266
+ if ephemeral_5m_input_tokens > 0:
267
+ textCacheWriteAdded = True
268
+ units["text_cache_write"+large_context] = Units(input=ephemeral_5m_input_tokens, output=0)
269
+
270
+ ephemeral_1h_input_tokens = cache_creation.get("ephemeral_1h_input_tokens", 0)
271
+ if ephemeral_1h_input_tokens > 0:
272
+ textCacheWriteAdded = True
273
+ units["text_cache_write_1h"+large_context] = Units(input=ephemeral_1h_input_tokens, output=0)
274
+
275
+ if textCacheWriteAdded is False and cache_creation_input_tokens > 0:
276
+ units["text_cache_write"+large_context] = Units(input=cache_creation_input_tokens, output=0)
232
277
 
233
278
  cache_read_input_tokens = usage.get("cache_read_input_tokens", 0)
234
279
  if cache_read_input_tokens > 0:
235
- units["text_cache_read"] = Units(input=cache_read_input_tokens, output=0)
280
+ units["text_cache_read"+large_context] = Units(input=cache_read_input_tokens, output=0)
236
281
 
237
- input = _PayiInstrumentor.update_for_vision(input, units, request._estimated_prompt_tokens)
282
+ return _PayiInstrumentor.update_for_vision(input, units, request._estimated_prompt_tokens, is_large_context=request._is_large_context)
238
283
 
239
- units["text"] = Units(input=input, output=output)
284
+ def anthropic_process_synchronous_response(request: _ProviderRequest, response: 'dict[str, Any]', log_prompt_and_response: bool, assign_id: bool) -> Any:
285
+ usage = response['usage']
286
+ units: dict[str, Units] = request._ingest["units"]
287
+
288
+ input_tokens = anthropic_process_compute_input_cost(request, usage)
289
+ output = usage['output_tokens']
290
+
291
+ large_context = "_large_context" if request._is_large_context else ""
292
+ units["text"+large_context] = Units(input=input_tokens, output=output)
240
293
 
241
294
  content = response.get('content', [])
242
295
  if content:
@@ -277,31 +330,25 @@ def anthropic_process_chunk(request: _ProviderRequest, chunk: 'dict[str, Any]',
277
330
  usage = message['usage']
278
331
  units = request._ingest["units"]
279
332
 
280
- input = _PayiInstrumentor.update_for_vision(usage['input_tokens'], units, request._estimated_prompt_tokens)
281
-
282
- units["text"] = Units(input=input, output=0)
283
-
284
- text_cache_write: int = usage.get("cache_creation_input_tokens", 0)
285
- if text_cache_write > 0:
286
- units["text_cache_write"] = Units(input=text_cache_write, output=0)
333
+ input = anthropic_process_compute_input_cost(request, usage)
287
334
 
288
- text_cache_read: int = usage.get("cache_read_input_tokens", 0)
289
- if text_cache_read > 0:
290
- units["text_cache_read"] = Units(input=text_cache_read, output=0)
335
+ large_context = "_large_context" if request._is_large_context else ""
336
+ units["text"+large_context] = Units(input=input, output=0)
291
337
 
292
338
  request._instrumentor._logger.debug(f"Anthropic streaming captured {input} input tokens, ")
293
339
 
294
340
  elif type == "message_delta":
295
341
  usage = chunk.get('usage', {})
296
342
  ingest = True
343
+ large_context = "_large_context" if request._is_large_context else ""
297
344
 
298
345
  # Web search will return an updated input tokens value at the end of streaming
299
346
  input_tokens = usage.get('input_tokens', None)
300
347
  if input_tokens is not None:
301
348
  request._instrumentor._logger.debug(f"Anthropic streaming finished, updated input tokens: {input_tokens}")
302
- request._ingest["units"]["text"]["input"] = input_tokens
349
+ request._ingest["units"]["text"+large_context]["input"] = input_tokens
303
350
 
304
- request._ingest["units"]["text"]["output"] = usage.get('output_tokens', 0)
351
+ request._ingest["units"]["text"+large_context]["output"] = usage.get('output_tokens', 0)
305
352
 
306
353
  request._instrumentor._logger.debug(f"Anthropic streaming finished: output tokens {usage.get('output_tokens', 0)} ")
307
354
 
@@ -5,6 +5,7 @@ from functools import wraps
5
5
  from typing_extensions import override
6
6
 
7
7
  from wrapt import ObjectProxy, wrap_function_wrapper # type: ignore
8
+ from tokenizers import Tokenizer # type: ignore
8
9
 
9
10
  from payi.lib.helpers import PayiCategories, PayiHeaderNames, payi_aws_bedrock_url
10
11
  from payi.types.ingest_units_params import Units
@@ -102,6 +103,8 @@ def _redirect_to_payi(request: Any, event_name: str, **_: 'dict[str, Any]') -> N
102
103
 
103
104
 
104
105
  class InvokeResponseWrapper(ObjectProxy): # type: ignore
106
+ _cohere_embed_english_v3_tokenizer: Optional[Tokenizer] = None
107
+
105
108
  def __init__(
106
109
  self,
107
110
  response: Any,
@@ -160,6 +163,25 @@ class InvokeResponseWrapper(ObjectProxy): # type: ignore
160
163
 
161
164
  bedrock_converse_process_synchronous_function_call(self._request, response)
162
165
 
166
+ elif self._request._is_amazon_titan_embed_text_v1:
167
+ input = response.get('inputTextTokenCount', 0)
168
+ units["text"] = Units(input=input, output=0)
169
+
170
+ elif self._request._is_cohere_embed_english_v3:
171
+ texts: list[str] = response.get("texts", [])
172
+ if texts and len(texts) > 0:
173
+ text = " ".join(texts)
174
+
175
+ if self._cohere_embed_english_v3_tokenizer is None:
176
+ current_dir = os.path.dirname(os.path.abspath(__file__))
177
+ tokenizer_path = os.path.join(current_dir, "data", "cohere_embed_english_v3.json")
178
+ self._cohere_embed_english_v3_tokenizer = Tokenizer.from_file(tokenizer_path) # type: ignore
179
+
180
+ tokens: list = self._cohere_embed_english_v3_tokenizer.encode(text, add_special_tokens=False).tokens # type: ignore
181
+
182
+ if tokens and isinstance(tokens, list):
183
+ units["text"] = Units(input=len(tokens), output=0) # type: ignore
184
+
163
185
  if self._log_prompt_and_response:
164
186
  ingest["provider_response_json"] = data.decode('utf-8') # type: ignore
165
187
 
@@ -287,6 +309,8 @@ class _BedrockInvokeProviderRequest(_BedrockProviderRequest):
287
309
  self._is_anthropic: bool = 'anthropic' in model_id
288
310
  self._is_nova: bool = 'nova' in model_id
289
311
  self._is_meta: bool = 'meta' in model_id
312
+ self._is_amazon_titan_embed_text_v1: bool = 'amazon.titan-embed-text-v1' == model_id
313
+ self._is_cohere_embed_english_v3: bool = 'cohere.embed-english-v3' == model_id
290
314
 
291
315
  @override
292
316
  def process_request(self, instance: Any, extra_headers: 'dict[str, str]', args: Sequence[Any], kwargs: Any) -> bool:
@@ -302,7 +326,17 @@ class _BedrockInvokeProviderRequest(_BedrockProviderRequest):
302
326
  anthropic_has_image_and_get_texts(self, messages)
303
327
  except Exception as e:
304
328
  self._instrumentor._logger.debug(f"Bedrock invoke error processing request body: {e}")
305
-
329
+ elif self._is_cohere_embed_english_v3:
330
+ try:
331
+ body = json.loads( kwargs.get("body", ""))
332
+ input_type = body.get("input_type", "")
333
+ if input_type == 'image':
334
+ images = body.get("images", [])
335
+ if (len(images) > 0):
336
+ # only supports one image according to docs
337
+ self._ingest["units"]["vision"] = Units(input=1, output=0)
338
+ except Exception as e:
339
+ self._instrumentor._logger.debug(f"Bedrock invoke error processing request body: {e}")
306
340
  return True
307
341
 
308
342
  @override
@@ -148,7 +148,7 @@ class _VertexRequest(_ProviderRequest): # type: ignore
148
148
  return model.startswith("gemini-1.")
149
149
 
150
150
  def is_large_context_token_model(model: str, input_tokens: int) -> bool:
151
- return model.startswith("gemini-2.5-pro") and input_tokens > 200_000
151
+ return model.startswith("gemini-2.5-pro") and input_tokens > 200000
152
152
 
153
153
  def add_units(request: _ProviderRequest, key: str, input: Optional[int] = None, output: Optional[int] = None) -> None:
154
154
  if key not in request._ingest["units"]:
@@ -172,6 +172,7 @@ class _VertexRequest(_ProviderRequest): # type: ignore
172
172
 
173
173
  if is_character_billing_model(model):
174
174
  if input > 128000:
175
+ self._is_large_context = True
175
176
  large_context = "_large_context"
176
177
 
177
178
  # gemini 1.0 and 1.5 units are reported in characters, per second, per image, etc...
@@ -222,6 +223,7 @@ class _VertexRequest(_ProviderRequest): # type: ignore
222
223
  thinking_token_count = usage.get("thoughts_token_count", 0)
223
224
 
224
225
  if is_large_context_token_model(model, input):
226
+ self._is_large_context = True
225
227
  large_context = "_large_context"
226
228
 
227
229
  cache_details: dict[str, int] = {}