mirascope 2.0.0a5__py3-none-any.whl → 2.0.1__py3-none-any.whl
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.
- mirascope/__init__.py +10 -1
- mirascope/_stubs.py +363 -0
- mirascope/api/__init__.py +8 -0
- mirascope/api/_generated/__init__.py +285 -2
- mirascope/api/_generated/annotations/__init__.py +33 -0
- mirascope/api/_generated/annotations/client.py +506 -0
- mirascope/api/_generated/annotations/raw_client.py +1414 -0
- mirascope/api/_generated/annotations/types/__init__.py +31 -0
- mirascope/api/_generated/annotations/types/annotations_create_request_label.py +5 -0
- mirascope/api/_generated/annotations/types/annotations_create_response.py +48 -0
- mirascope/api/_generated/annotations/types/annotations_create_response_label.py +5 -0
- mirascope/api/_generated/annotations/types/annotations_get_response.py +48 -0
- mirascope/api/_generated/annotations/types/annotations_get_response_label.py +5 -0
- mirascope/api/_generated/annotations/types/annotations_list_request_label.py +5 -0
- mirascope/api/_generated/annotations/types/annotations_list_response.py +21 -0
- mirascope/api/_generated/annotations/types/annotations_list_response_annotations_item.py +50 -0
- mirascope/api/_generated/annotations/types/annotations_list_response_annotations_item_label.py +5 -0
- mirascope/api/_generated/annotations/types/annotations_update_request_label.py +5 -0
- mirascope/api/_generated/annotations/types/annotations_update_response.py +48 -0
- mirascope/api/_generated/annotations/types/annotations_update_response_label.py +5 -0
- mirascope/api/_generated/api_keys/__init__.py +12 -2
- mirascope/api/_generated/api_keys/client.py +77 -0
- mirascope/api/_generated/api_keys/raw_client.py +422 -39
- mirascope/api/_generated/api_keys/types/__init__.py +7 -1
- mirascope/api/_generated/api_keys/types/api_keys_create_response.py +4 -12
- mirascope/api/_generated/api_keys/types/api_keys_get_response.py +4 -12
- mirascope/api/_generated/api_keys/types/api_keys_list_all_for_org_response_item.py +40 -0
- mirascope/api/_generated/api_keys/types/api_keys_list_response_item.py +4 -12
- mirascope/api/_generated/client.py +42 -0
- mirascope/api/_generated/core/client_wrapper.py +2 -14
- mirascope/api/_generated/core/datetime_utils.py +1 -3
- mirascope/api/_generated/core/file.py +2 -5
- mirascope/api/_generated/core/http_client.py +36 -112
- mirascope/api/_generated/core/jsonable_encoder.py +1 -3
- mirascope/api/_generated/core/pydantic_utilities.py +19 -74
- mirascope/api/_generated/core/query_encoder.py +1 -3
- mirascope/api/_generated/core/serialization.py +4 -10
- mirascope/api/_generated/docs/client.py +2 -6
- mirascope/api/_generated/docs/raw_client.py +51 -5
- mirascope/api/_generated/environment.py +3 -3
- mirascope/api/_generated/environments/__init__.py +6 -0
- mirascope/api/_generated/environments/client.py +117 -0
- mirascope/api/_generated/environments/raw_client.py +530 -51
- mirascope/api/_generated/environments/types/__init__.py +10 -0
- mirascope/api/_generated/environments/types/environments_create_response.py +1 -3
- mirascope/api/_generated/environments/types/environments_get_analytics_response.py +60 -0
- mirascope/api/_generated/environments/types/environments_get_analytics_response_top_functions_item.py +24 -0
- mirascope/api/_generated/environments/types/environments_get_analytics_response_top_models_item.py +22 -0
- mirascope/api/_generated/environments/types/environments_get_response.py +1 -3
- mirascope/api/_generated/environments/types/environments_list_response_item.py +1 -3
- mirascope/api/_generated/environments/types/environments_update_response.py +1 -3
- mirascope/api/_generated/errors/__init__.py +8 -0
- mirascope/api/_generated/errors/bad_request_error.py +1 -2
- mirascope/api/_generated/errors/conflict_error.py +1 -2
- mirascope/api/_generated/errors/forbidden_error.py +1 -5
- mirascope/api/_generated/errors/internal_server_error.py +1 -6
- mirascope/api/_generated/errors/not_found_error.py +1 -5
- mirascope/api/_generated/errors/payment_required_error.py +15 -0
- mirascope/api/_generated/errors/service_unavailable_error.py +14 -0
- mirascope/api/_generated/errors/too_many_requests_error.py +15 -0
- mirascope/api/_generated/errors/unauthorized_error.py +11 -0
- mirascope/api/_generated/functions/__init__.py +39 -0
- mirascope/api/_generated/functions/client.py +647 -0
- mirascope/api/_generated/functions/raw_client.py +1890 -0
- mirascope/api/_generated/functions/types/__init__.py +53 -0
- mirascope/api/_generated/functions/types/functions_create_request_dependencies_value.py +20 -0
- mirascope/api/_generated/functions/types/functions_create_response.py +37 -0
- mirascope/api/_generated/functions/types/functions_create_response_dependencies_value.py +20 -0
- mirascope/api/_generated/functions/types/functions_find_by_hash_response.py +39 -0
- mirascope/api/_generated/functions/types/functions_find_by_hash_response_dependencies_value.py +20 -0
- mirascope/api/_generated/functions/types/functions_get_by_env_response.py +53 -0
- mirascope/api/_generated/functions/types/functions_get_by_env_response_dependencies_value.py +22 -0
- mirascope/api/_generated/functions/types/functions_get_response.py +37 -0
- mirascope/api/_generated/functions/types/functions_get_response_dependencies_value.py +20 -0
- mirascope/api/_generated/functions/types/functions_list_by_env_response.py +25 -0
- mirascope/api/_generated/functions/types/functions_list_by_env_response_functions_item.py +56 -0
- mirascope/api/_generated/functions/types/functions_list_by_env_response_functions_item_dependencies_value.py +22 -0
- mirascope/api/_generated/functions/types/functions_list_response.py +21 -0
- mirascope/api/_generated/functions/types/functions_list_response_functions_item.py +41 -0
- mirascope/api/_generated/functions/types/functions_list_response_functions_item_dependencies_value.py +20 -0
- mirascope/api/_generated/health/client.py +2 -6
- mirascope/api/_generated/health/raw_client.py +51 -5
- mirascope/api/_generated/health/types/health_check_response.py +1 -3
- mirascope/api/_generated/organization_invitations/__init__.py +33 -0
- mirascope/api/_generated/organization_invitations/client.py +546 -0
- mirascope/api/_generated/organization_invitations/raw_client.py +1519 -0
- mirascope/api/_generated/organization_invitations/types/__init__.py +53 -0
- mirascope/api/_generated/organization_invitations/types/organization_invitations_accept_response.py +34 -0
- mirascope/api/_generated/organization_invitations/types/organization_invitations_accept_response_role.py +7 -0
- mirascope/api/_generated/organization_invitations/types/organization_invitations_create_request_role.py +7 -0
- mirascope/api/_generated/organization_invitations/types/organization_invitations_create_response.py +48 -0
- mirascope/api/_generated/organization_invitations/types/organization_invitations_create_response_role.py +7 -0
- mirascope/api/_generated/organization_invitations/types/organization_invitations_create_response_status.py +7 -0
- mirascope/api/_generated/organization_invitations/types/organization_invitations_get_response.py +48 -0
- mirascope/api/_generated/organization_invitations/types/organization_invitations_get_response_role.py +7 -0
- mirascope/api/_generated/organization_invitations/types/organization_invitations_get_response_status.py +7 -0
- mirascope/api/_generated/organization_invitations/types/organization_invitations_list_response_item.py +48 -0
- mirascope/api/_generated/organization_invitations/types/organization_invitations_list_response_item_role.py +7 -0
- mirascope/api/_generated/organization_invitations/types/organization_invitations_list_response_item_status.py +7 -0
- mirascope/api/_generated/organization_memberships/__init__.py +19 -0
- mirascope/api/_generated/organization_memberships/client.py +302 -0
- mirascope/api/_generated/organization_memberships/raw_client.py +736 -0
- mirascope/api/_generated/organization_memberships/types/__init__.py +27 -0
- mirascope/api/_generated/organization_memberships/types/organization_memberships_list_response_item.py +33 -0
- mirascope/api/_generated/organization_memberships/types/organization_memberships_list_response_item_role.py +7 -0
- mirascope/api/_generated/organization_memberships/types/organization_memberships_update_request_role.py +7 -0
- mirascope/api/_generated/organization_memberships/types/organization_memberships_update_response.py +31 -0
- mirascope/api/_generated/organization_memberships/types/organization_memberships_update_response_role.py +7 -0
- mirascope/api/_generated/organizations/__init__.py +26 -0
- mirascope/api/_generated/organizations/client.py +465 -0
- mirascope/api/_generated/organizations/raw_client.py +1799 -108
- mirascope/api/_generated/organizations/types/__init__.py +48 -0
- mirascope/api/_generated/organizations/types/organizations_create_payment_intent_response.py +24 -0
- mirascope/api/_generated/organizations/types/organizations_create_response.py +4 -3
- mirascope/api/_generated/organizations/types/organizations_create_response_role.py +1 -3
- mirascope/api/_generated/organizations/types/organizations_get_response.py +4 -3
- mirascope/api/_generated/organizations/types/organizations_get_response_role.py +1 -3
- mirascope/api/_generated/organizations/types/organizations_list_response_item.py +4 -3
- mirascope/api/_generated/organizations/types/organizations_list_response_item_role.py +1 -3
- mirascope/api/_generated/organizations/types/organizations_preview_subscription_change_request_target_plan.py +7 -0
- mirascope/api/_generated/organizations/types/organizations_preview_subscription_change_response.py +47 -0
- mirascope/api/_generated/organizations/types/organizations_preview_subscription_change_response_validation_errors_item.py +33 -0
- mirascope/api/_generated/organizations/types/organizations_preview_subscription_change_response_validation_errors_item_resource.py +7 -0
- mirascope/api/_generated/organizations/types/organizations_router_balance_response.py +24 -0
- mirascope/api/_generated/organizations/types/organizations_subscription_response.py +53 -0
- mirascope/api/_generated/organizations/types/organizations_subscription_response_current_plan.py +7 -0
- mirascope/api/_generated/organizations/types/organizations_subscription_response_payment_method.py +26 -0
- mirascope/api/_generated/organizations/types/organizations_subscription_response_scheduled_change.py +34 -0
- mirascope/api/_generated/organizations/types/organizations_subscription_response_scheduled_change_target_plan.py +7 -0
- mirascope/api/_generated/organizations/types/organizations_update_response.py +4 -3
- mirascope/api/_generated/organizations/types/organizations_update_response_role.py +1 -3
- mirascope/api/_generated/organizations/types/organizations_update_subscription_request_target_plan.py +7 -0
- mirascope/api/_generated/organizations/types/organizations_update_subscription_response.py +35 -0
- mirascope/api/_generated/project_memberships/__init__.py +25 -0
- mirascope/api/_generated/project_memberships/client.py +437 -0
- mirascope/api/_generated/project_memberships/raw_client.py +1039 -0
- mirascope/api/_generated/project_memberships/types/__init__.py +29 -0
- mirascope/api/_generated/project_memberships/types/project_memberships_create_request_role.py +7 -0
- mirascope/api/_generated/project_memberships/types/project_memberships_create_response.py +35 -0
- mirascope/api/_generated/project_memberships/types/project_memberships_create_response_role.py +7 -0
- mirascope/api/_generated/project_memberships/types/project_memberships_list_response_item.py +33 -0
- mirascope/api/_generated/project_memberships/types/project_memberships_list_response_item_role.py +7 -0
- mirascope/api/_generated/project_memberships/types/project_memberships_update_request_role.py +7 -0
- mirascope/api/_generated/project_memberships/types/project_memberships_update_response.py +35 -0
- mirascope/api/_generated/project_memberships/types/project_memberships_update_response_role.py +7 -0
- mirascope/api/_generated/projects/__init__.py +2 -12
- mirascope/api/_generated/projects/client.py +17 -71
- mirascope/api/_generated/projects/raw_client.py +295 -51
- mirascope/api/_generated/projects/types/__init__.py +1 -6
- mirascope/api/_generated/projects/types/projects_create_response.py +3 -9
- mirascope/api/_generated/projects/types/projects_get_response.py +3 -9
- mirascope/api/_generated/projects/types/projects_list_response_item.py +3 -9
- mirascope/api/_generated/projects/types/projects_update_response.py +3 -9
- mirascope/api/_generated/reference.md +3619 -182
- mirascope/api/_generated/tags/__init__.py +19 -0
- mirascope/api/_generated/tags/client.py +504 -0
- mirascope/api/_generated/tags/raw_client.py +1288 -0
- mirascope/api/_generated/tags/types/__init__.py +17 -0
- mirascope/api/_generated/tags/types/tags_create_response.py +41 -0
- mirascope/api/_generated/tags/types/tags_get_response.py +41 -0
- mirascope/api/_generated/tags/types/tags_list_response.py +23 -0
- mirascope/api/_generated/tags/types/tags_list_response_tags_item.py +41 -0
- mirascope/api/_generated/tags/types/tags_update_response.py +41 -0
- mirascope/api/_generated/token_cost/__init__.py +7 -0
- mirascope/api/_generated/token_cost/client.py +160 -0
- mirascope/api/_generated/token_cost/raw_client.py +264 -0
- mirascope/api/_generated/token_cost/types/__init__.py +8 -0
- mirascope/api/_generated/token_cost/types/token_cost_calculate_request_usage.py +54 -0
- mirascope/api/_generated/token_cost/types/token_cost_calculate_response.py +52 -0
- mirascope/api/_generated/traces/__init__.py +42 -0
- mirascope/api/_generated/traces/client.py +941 -0
- mirascope/api/_generated/traces/raw_client.py +2177 -23
- mirascope/api/_generated/traces/types/__init__.py +60 -0
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item.py +4 -11
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item_resource.py +2 -6
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item_resource_attributes_item.py +1 -3
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item_resource_attributes_item_value.py +8 -24
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item_resource_attributes_item_value_array_value.py +2 -6
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item_resource_attributes_item_value_kvlist_value.py +3 -9
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item_resource_attributes_item_value_kvlist_value_values_item.py +2 -6
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item_scope_spans_item.py +3 -9
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item_scope_spans_item_scope.py +4 -8
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item_scope_spans_item_scope_attributes_item.py +2 -6
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item_scope_spans_item_scope_attributes_item_value.py +8 -24
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item_scope_spans_item_scope_attributes_item_value_array_value.py +2 -6
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item_scope_spans_item_scope_attributes_item_value_kvlist_value.py +3 -9
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item_scope_spans_item_scope_attributes_item_value_kvlist_value_values_item.py +1 -3
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item_scope_spans_item_spans_item.py +6 -18
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item_scope_spans_item_spans_item_attributes_item.py +3 -9
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item_scope_spans_item_spans_item_attributes_item_value.py +8 -24
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item_scope_spans_item_spans_item_attributes_item_value_array_value.py +2 -6
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item_scope_spans_item_spans_item_attributes_item_value_kvlist_value.py +2 -6
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item_scope_spans_item_spans_item_attributes_item_value_kvlist_value_values_item.py +1 -3
- mirascope/api/_generated/traces/types/traces_create_request_resource_spans_item_scope_spans_item_spans_item_status.py +2 -6
- mirascope/api/_generated/traces/types/traces_create_response.py +2 -5
- mirascope/api/_generated/traces/types/traces_create_response_partial_success.py +3 -9
- mirascope/api/_generated/traces/types/traces_get_analytics_summary_response.py +60 -0
- mirascope/api/_generated/traces/types/traces_get_analytics_summary_response_top_functions_item.py +24 -0
- mirascope/api/_generated/traces/types/traces_get_analytics_summary_response_top_models_item.py +22 -0
- mirascope/api/_generated/traces/types/traces_get_trace_detail_by_env_response.py +33 -0
- mirascope/api/_generated/traces/types/traces_get_trace_detail_by_env_response_spans_item.py +88 -0
- mirascope/api/_generated/traces/types/traces_get_trace_detail_response.py +33 -0
- mirascope/api/_generated/traces/types/traces_get_trace_detail_response_spans_item.py +88 -0
- mirascope/api/_generated/traces/types/traces_list_by_function_hash_response.py +25 -0
- mirascope/api/_generated/traces/types/traces_list_by_function_hash_response_traces_item.py +44 -0
- mirascope/api/_generated/traces/types/traces_search_by_env_request_attribute_filters_item.py +26 -0
- mirascope/api/_generated/traces/types/traces_search_by_env_request_attribute_filters_item_operator.py +7 -0
- mirascope/api/_generated/traces/types/traces_search_by_env_request_sort_by.py +7 -0
- mirascope/api/_generated/traces/types/traces_search_by_env_request_sort_order.py +7 -0
- mirascope/api/_generated/traces/types/traces_search_by_env_response.py +26 -0
- mirascope/api/_generated/traces/types/traces_search_by_env_response_spans_item.py +50 -0
- mirascope/api/_generated/traces/types/traces_search_request_attribute_filters_item.py +26 -0
- mirascope/api/_generated/traces/types/traces_search_request_attribute_filters_item_operator.py +7 -0
- mirascope/api/_generated/traces/types/traces_search_request_sort_by.py +7 -0
- mirascope/api/_generated/traces/types/traces_search_request_sort_order.py +5 -0
- mirascope/api/_generated/traces/types/traces_search_response.py +26 -0
- mirascope/api/_generated/traces/types/traces_search_response_spans_item.py +50 -0
- mirascope/api/_generated/types/__init__.py +48 -0
- mirascope/api/_generated/types/already_exists_error.py +1 -3
- mirascope/api/_generated/types/bad_request_error_body.py +50 -0
- mirascope/api/_generated/types/click_house_error.py +22 -0
- mirascope/api/_generated/types/database_error.py +1 -3
- mirascope/api/_generated/types/date.py +3 -0
- mirascope/api/_generated/types/http_api_decode_error.py +1 -3
- mirascope/api/_generated/types/immutable_resource_error.py +22 -0
- mirascope/api/_generated/types/internal_server_error_body.py +49 -0
- mirascope/api/_generated/types/issue.py +1 -3
- mirascope/api/_generated/types/issue_tag.py +1 -8
- mirascope/api/_generated/types/not_found_error_body.py +1 -3
- mirascope/api/_generated/types/number_from_string.py +3 -0
- mirascope/api/_generated/types/permission_denied_error.py +1 -3
- mirascope/api/_generated/types/permission_denied_error_tag.py +1 -3
- mirascope/api/_generated/types/plan_limit_exceeded_error.py +32 -0
- mirascope/api/_generated/types/plan_limit_exceeded_error_tag.py +7 -0
- mirascope/api/_generated/types/pricing_unavailable_error.py +23 -0
- mirascope/api/_generated/types/property_key_key.py +1 -3
- mirascope/api/_generated/types/rate_limit_error.py +31 -0
- mirascope/api/_generated/types/rate_limit_error_tag.py +5 -0
- mirascope/api/_generated/types/service_unavailable_error_body.py +24 -0
- mirascope/api/_generated/types/service_unavailable_error_tag.py +7 -0
- mirascope/api/_generated/types/stripe_error.py +20 -0
- mirascope/api/_generated/types/subscription_past_due_error.py +31 -0
- mirascope/api/_generated/types/subscription_past_due_error_tag.py +7 -0
- mirascope/api/_generated/types/unauthorized_error_body.py +21 -0
- mirascope/api/_generated/types/unauthorized_error_tag.py +5 -0
- mirascope/api/settings.py +19 -1
- mirascope/llm/__init__.py +55 -8
- mirascope/llm/calls/__init__.py +2 -1
- mirascope/llm/calls/calls.py +3 -1
- mirascope/llm/calls/decorator.py +21 -7
- mirascope/llm/content/tool_call.py +6 -0
- mirascope/llm/content/tool_output.py +22 -5
- mirascope/llm/exceptions.py +284 -71
- mirascope/llm/formatting/__init__.py +19 -2
- mirascope/llm/formatting/format.py +219 -30
- mirascope/llm/formatting/output_parser.py +178 -0
- mirascope/llm/formatting/partial.py +80 -7
- mirascope/llm/formatting/primitives.py +192 -0
- mirascope/llm/formatting/types.py +21 -64
- mirascope/llm/mcp/__init__.py +2 -2
- mirascope/llm/mcp/mcp_client.py +130 -0
- mirascope/llm/messages/__init__.py +3 -0
- mirascope/llm/messages/_utils.py +34 -0
- mirascope/llm/models/__init__.py +5 -0
- mirascope/llm/models/models.py +137 -69
- mirascope/llm/{providers/base → models}/params.py +16 -37
- mirascope/llm/models/thinking_config.py +61 -0
- mirascope/llm/prompts/_utils.py +0 -32
- mirascope/llm/prompts/decorator.py +16 -5
- mirascope/llm/prompts/prompts.py +131 -68
- mirascope/llm/providers/__init__.py +18 -2
- mirascope/llm/providers/anthropic/__init__.py +3 -21
- mirascope/llm/providers/anthropic/_utils/__init__.py +2 -0
- mirascope/llm/providers/anthropic/_utils/beta_decode.py +22 -11
- mirascope/llm/providers/anthropic/_utils/beta_encode.py +75 -25
- mirascope/llm/providers/anthropic/_utils/decode.py +22 -11
- mirascope/llm/providers/anthropic/_utils/encode.py +82 -20
- mirascope/llm/providers/anthropic/_utils/errors.py +2 -2
- mirascope/llm/providers/anthropic/beta_provider.py +64 -18
- mirascope/llm/providers/anthropic/provider.py +91 -33
- mirascope/llm/providers/base/__init__.py +0 -2
- mirascope/llm/providers/base/_utils.py +55 -11
- mirascope/llm/providers/base/base_provider.py +116 -37
- mirascope/llm/providers/google/__init__.py +2 -17
- mirascope/llm/providers/google/_utils/__init__.py +2 -0
- mirascope/llm/providers/google/_utils/decode.py +37 -15
- mirascope/llm/providers/google/_utils/encode.py +127 -19
- mirascope/llm/providers/google/_utils/errors.py +3 -2
- mirascope/llm/providers/google/model_info.py +1 -0
- mirascope/llm/providers/google/provider.py +68 -19
- mirascope/llm/providers/mirascope/__init__.py +5 -0
- mirascope/llm/providers/mirascope/_utils.py +73 -0
- mirascope/llm/providers/mirascope/provider.py +349 -0
- mirascope/llm/providers/mlx/__init__.py +2 -17
- mirascope/llm/providers/mlx/_utils.py +8 -3
- mirascope/llm/providers/mlx/encoding/base.py +5 -2
- mirascope/llm/providers/mlx/encoding/transformers.py +5 -2
- mirascope/llm/providers/mlx/mlx.py +23 -6
- mirascope/llm/providers/mlx/provider.py +42 -13
- mirascope/llm/providers/ollama/__init__.py +1 -13
- mirascope/llm/providers/openai/_utils/errors.py +2 -2
- mirascope/llm/providers/openai/completions/__init__.py +2 -20
- mirascope/llm/providers/openai/completions/_utils/decode.py +14 -3
- mirascope/llm/providers/openai/completions/_utils/encode.py +35 -28
- mirascope/llm/providers/openai/completions/base_provider.py +40 -11
- mirascope/llm/providers/openai/provider.py +40 -10
- mirascope/llm/providers/openai/responses/__init__.py +1 -17
- mirascope/llm/providers/openai/responses/_utils/__init__.py +2 -0
- mirascope/llm/providers/openai/responses/_utils/decode.py +21 -8
- mirascope/llm/providers/openai/responses/_utils/encode.py +59 -19
- mirascope/llm/providers/openai/responses/provider.py +56 -18
- mirascope/llm/providers/provider_id.py +1 -0
- mirascope/llm/providers/provider_registry.py +96 -19
- mirascope/llm/providers/together/__init__.py +1 -13
- mirascope/llm/responses/__init__.py +6 -1
- mirascope/llm/responses/_utils.py +102 -12
- mirascope/llm/responses/base_response.py +5 -2
- mirascope/llm/responses/base_stream_response.py +139 -45
- mirascope/llm/responses/response.py +2 -1
- mirascope/llm/responses/root_response.py +89 -17
- mirascope/llm/responses/stream_response.py +6 -9
- mirascope/llm/tools/decorator.py +17 -8
- mirascope/llm/tools/tool_schema.py +43 -10
- mirascope/llm/tools/toolkit.py +35 -27
- mirascope/llm/tools/tools.py +123 -30
- mirascope/ops/__init__.py +64 -109
- mirascope/ops/_internal/configuration.py +82 -31
- mirascope/ops/_internal/exporters/exporters.py +64 -11
- mirascope/ops/_internal/instrumentation/llm/common.py +530 -0
- mirascope/ops/_internal/instrumentation/llm/cost.py +190 -0
- mirascope/ops/_internal/instrumentation/llm/encode.py +1 -1
- mirascope/ops/_internal/instrumentation/llm/llm.py +116 -1243
- mirascope/ops/_internal/instrumentation/llm/model.py +1798 -0
- mirascope/ops/_internal/instrumentation/llm/response.py +521 -0
- mirascope/ops/_internal/instrumentation/llm/serialize.py +300 -0
- mirascope/ops/_internal/protocols.py +83 -1
- mirascope/ops/_internal/traced_calls.py +4 -0
- mirascope/ops/_internal/traced_functions.py +141 -12
- mirascope/ops/_internal/tracing.py +78 -1
- mirascope/ops/_internal/utils.py +52 -4
- mirascope/ops/_internal/versioned_functions.py +54 -43
- {mirascope-2.0.0a5.dist-info → mirascope-2.0.1.dist-info}/METADATA +14 -13
- mirascope-2.0.1.dist-info/RECORD +423 -0
- {mirascope-2.0.0a5.dist-info → mirascope-2.0.1.dist-info}/licenses/LICENSE +1 -1
- mirascope/llm/formatting/_utils.py +0 -78
- mirascope/llm/mcp/client.py +0 -118
- mirascope/llm/providers/_missing_import_stubs.py +0 -49
- mirascope-2.0.0a5.dist-info/RECORD +0 -265
- {mirascope-2.0.0a5.dist-info → mirascope-2.0.1.dist-info}/WHEEL +0 -0
|
@@ -14,11 +14,13 @@ from ..errors.conflict_error import ConflictError
|
|
|
14
14
|
from ..errors.forbidden_error import ForbiddenError
|
|
15
15
|
from ..errors.internal_server_error import InternalServerError
|
|
16
16
|
from ..errors.not_found_error import NotFoundError
|
|
17
|
-
from ..
|
|
18
|
-
from ..
|
|
19
|
-
from ..
|
|
17
|
+
from ..errors.payment_required_error import PaymentRequiredError
|
|
18
|
+
from ..errors.service_unavailable_error import ServiceUnavailableError
|
|
19
|
+
from ..errors.too_many_requests_error import TooManyRequestsError
|
|
20
20
|
from ..types.not_found_error_body import NotFoundErrorBody
|
|
21
21
|
from ..types.permission_denied_error import PermissionDeniedError
|
|
22
|
+
from ..types.plan_limit_exceeded_error import PlanLimitExceededError
|
|
23
|
+
from ..types.rate_limit_error import RateLimitError
|
|
22
24
|
from .types.projects_create_response import ProjectsCreateResponse
|
|
23
25
|
from .types.projects_get_response import ProjectsGetResponse
|
|
24
26
|
from .types.projects_list_response_item import ProjectsListResponseItem
|
|
@@ -70,9 +72,9 @@ class RawProjectsClient:
|
|
|
70
72
|
raise BadRequestError(
|
|
71
73
|
headers=dict(_response.headers),
|
|
72
74
|
body=typing.cast(
|
|
73
|
-
|
|
75
|
+
typing.Optional[typing.Any],
|
|
74
76
|
parse_obj_as(
|
|
75
|
-
type_=
|
|
77
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
76
78
|
object_=_response.json(),
|
|
77
79
|
),
|
|
78
80
|
),
|
|
@@ -99,13 +101,35 @@ class RawProjectsClient:
|
|
|
99
101
|
),
|
|
100
102
|
),
|
|
101
103
|
)
|
|
104
|
+
if _response.status_code == 429:
|
|
105
|
+
raise TooManyRequestsError(
|
|
106
|
+
headers=dict(_response.headers),
|
|
107
|
+
body=typing.cast(
|
|
108
|
+
RateLimitError,
|
|
109
|
+
parse_obj_as(
|
|
110
|
+
type_=RateLimitError, # type: ignore
|
|
111
|
+
object_=_response.json(),
|
|
112
|
+
),
|
|
113
|
+
),
|
|
114
|
+
)
|
|
102
115
|
if _response.status_code == 500:
|
|
103
116
|
raise InternalServerError(
|
|
104
117
|
headers=dict(_response.headers),
|
|
105
118
|
body=typing.cast(
|
|
106
|
-
|
|
119
|
+
typing.Optional[typing.Any],
|
|
120
|
+
parse_obj_as(
|
|
121
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
122
|
+
object_=_response.json(),
|
|
123
|
+
),
|
|
124
|
+
),
|
|
125
|
+
)
|
|
126
|
+
if _response.status_code == 503:
|
|
127
|
+
raise ServiceUnavailableError(
|
|
128
|
+
headers=dict(_response.headers),
|
|
129
|
+
body=typing.cast(
|
|
130
|
+
typing.Optional[typing.Any],
|
|
107
131
|
parse_obj_as(
|
|
108
|
-
type_=
|
|
132
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
109
133
|
object_=_response.json(),
|
|
110
134
|
),
|
|
111
135
|
),
|
|
@@ -177,9 +201,20 @@ class RawProjectsClient:
|
|
|
177
201
|
raise BadRequestError(
|
|
178
202
|
headers=dict(_response.headers),
|
|
179
203
|
body=typing.cast(
|
|
180
|
-
|
|
204
|
+
typing.Optional[typing.Any],
|
|
181
205
|
parse_obj_as(
|
|
182
|
-
type_=
|
|
206
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
207
|
+
object_=_response.json(),
|
|
208
|
+
),
|
|
209
|
+
),
|
|
210
|
+
)
|
|
211
|
+
if _response.status_code == 402:
|
|
212
|
+
raise PaymentRequiredError(
|
|
213
|
+
headers=dict(_response.headers),
|
|
214
|
+
body=typing.cast(
|
|
215
|
+
PlanLimitExceededError,
|
|
216
|
+
parse_obj_as(
|
|
217
|
+
type_=PlanLimitExceededError, # type: ignore
|
|
183
218
|
object_=_response.json(),
|
|
184
219
|
),
|
|
185
220
|
),
|
|
@@ -210,9 +245,20 @@ class RawProjectsClient:
|
|
|
210
245
|
raise ConflictError(
|
|
211
246
|
headers=dict(_response.headers),
|
|
212
247
|
body=typing.cast(
|
|
213
|
-
|
|
248
|
+
typing.Optional[typing.Any],
|
|
249
|
+
parse_obj_as(
|
|
250
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
251
|
+
object_=_response.json(),
|
|
252
|
+
),
|
|
253
|
+
),
|
|
254
|
+
)
|
|
255
|
+
if _response.status_code == 429:
|
|
256
|
+
raise TooManyRequestsError(
|
|
257
|
+
headers=dict(_response.headers),
|
|
258
|
+
body=typing.cast(
|
|
259
|
+
RateLimitError,
|
|
214
260
|
parse_obj_as(
|
|
215
|
-
type_=
|
|
261
|
+
type_=RateLimitError, # type: ignore
|
|
216
262
|
object_=_response.json(),
|
|
217
263
|
),
|
|
218
264
|
),
|
|
@@ -221,9 +267,20 @@ class RawProjectsClient:
|
|
|
221
267
|
raise InternalServerError(
|
|
222
268
|
headers=dict(_response.headers),
|
|
223
269
|
body=typing.cast(
|
|
224
|
-
|
|
270
|
+
typing.Optional[typing.Any],
|
|
225
271
|
parse_obj_as(
|
|
226
|
-
type_=
|
|
272
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
273
|
+
object_=_response.json(),
|
|
274
|
+
),
|
|
275
|
+
),
|
|
276
|
+
)
|
|
277
|
+
if _response.status_code == 503:
|
|
278
|
+
raise ServiceUnavailableError(
|
|
279
|
+
headers=dict(_response.headers),
|
|
280
|
+
body=typing.cast(
|
|
281
|
+
typing.Optional[typing.Any],
|
|
282
|
+
parse_obj_as(
|
|
283
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
227
284
|
object_=_response.json(),
|
|
228
285
|
),
|
|
229
286
|
),
|
|
@@ -282,9 +339,9 @@ class RawProjectsClient:
|
|
|
282
339
|
raise BadRequestError(
|
|
283
340
|
headers=dict(_response.headers),
|
|
284
341
|
body=typing.cast(
|
|
285
|
-
|
|
342
|
+
typing.Optional[typing.Any],
|
|
286
343
|
parse_obj_as(
|
|
287
|
-
type_=
|
|
344
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
288
345
|
object_=_response.json(),
|
|
289
346
|
),
|
|
290
347
|
),
|
|
@@ -311,13 +368,35 @@ class RawProjectsClient:
|
|
|
311
368
|
),
|
|
312
369
|
),
|
|
313
370
|
)
|
|
371
|
+
if _response.status_code == 429:
|
|
372
|
+
raise TooManyRequestsError(
|
|
373
|
+
headers=dict(_response.headers),
|
|
374
|
+
body=typing.cast(
|
|
375
|
+
RateLimitError,
|
|
376
|
+
parse_obj_as(
|
|
377
|
+
type_=RateLimitError, # type: ignore
|
|
378
|
+
object_=_response.json(),
|
|
379
|
+
),
|
|
380
|
+
),
|
|
381
|
+
)
|
|
314
382
|
if _response.status_code == 500:
|
|
315
383
|
raise InternalServerError(
|
|
316
384
|
headers=dict(_response.headers),
|
|
317
385
|
body=typing.cast(
|
|
318
|
-
|
|
386
|
+
typing.Optional[typing.Any],
|
|
387
|
+
parse_obj_as(
|
|
388
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
389
|
+
object_=_response.json(),
|
|
390
|
+
),
|
|
391
|
+
),
|
|
392
|
+
)
|
|
393
|
+
if _response.status_code == 503:
|
|
394
|
+
raise ServiceUnavailableError(
|
|
395
|
+
headers=dict(_response.headers),
|
|
396
|
+
body=typing.cast(
|
|
397
|
+
typing.Optional[typing.Any],
|
|
319
398
|
parse_obj_as(
|
|
320
|
-
type_=
|
|
399
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
321
400
|
object_=_response.json(),
|
|
322
401
|
),
|
|
323
402
|
),
|
|
@@ -392,9 +471,9 @@ class RawProjectsClient:
|
|
|
392
471
|
raise BadRequestError(
|
|
393
472
|
headers=dict(_response.headers),
|
|
394
473
|
body=typing.cast(
|
|
395
|
-
|
|
474
|
+
typing.Optional[typing.Any],
|
|
396
475
|
parse_obj_as(
|
|
397
|
-
type_=
|
|
476
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
398
477
|
object_=_response.json(),
|
|
399
478
|
),
|
|
400
479
|
),
|
|
@@ -425,9 +504,20 @@ class RawProjectsClient:
|
|
|
425
504
|
raise ConflictError(
|
|
426
505
|
headers=dict(_response.headers),
|
|
427
506
|
body=typing.cast(
|
|
428
|
-
|
|
507
|
+
typing.Optional[typing.Any],
|
|
429
508
|
parse_obj_as(
|
|
430
|
-
type_=
|
|
509
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
510
|
+
object_=_response.json(),
|
|
511
|
+
),
|
|
512
|
+
),
|
|
513
|
+
)
|
|
514
|
+
if _response.status_code == 429:
|
|
515
|
+
raise TooManyRequestsError(
|
|
516
|
+
headers=dict(_response.headers),
|
|
517
|
+
body=typing.cast(
|
|
518
|
+
RateLimitError,
|
|
519
|
+
parse_obj_as(
|
|
520
|
+
type_=RateLimitError, # type: ignore
|
|
431
521
|
object_=_response.json(),
|
|
432
522
|
),
|
|
433
523
|
),
|
|
@@ -436,9 +526,20 @@ class RawProjectsClient:
|
|
|
436
526
|
raise InternalServerError(
|
|
437
527
|
headers=dict(_response.headers),
|
|
438
528
|
body=typing.cast(
|
|
439
|
-
|
|
529
|
+
typing.Optional[typing.Any],
|
|
530
|
+
parse_obj_as(
|
|
531
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
532
|
+
object_=_response.json(),
|
|
533
|
+
),
|
|
534
|
+
),
|
|
535
|
+
)
|
|
536
|
+
if _response.status_code == 503:
|
|
537
|
+
raise ServiceUnavailableError(
|
|
538
|
+
headers=dict(_response.headers),
|
|
539
|
+
body=typing.cast(
|
|
540
|
+
typing.Optional[typing.Any],
|
|
440
541
|
parse_obj_as(
|
|
441
|
-
type_=
|
|
542
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
442
543
|
object_=_response.json(),
|
|
443
544
|
),
|
|
444
545
|
),
|
|
@@ -489,9 +590,9 @@ class RawProjectsClient:
|
|
|
489
590
|
raise BadRequestError(
|
|
490
591
|
headers=dict(_response.headers),
|
|
491
592
|
body=typing.cast(
|
|
492
|
-
|
|
593
|
+
typing.Optional[typing.Any],
|
|
493
594
|
parse_obj_as(
|
|
494
|
-
type_=
|
|
595
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
495
596
|
object_=_response.json(),
|
|
496
597
|
),
|
|
497
598
|
),
|
|
@@ -518,13 +619,35 @@ class RawProjectsClient:
|
|
|
518
619
|
),
|
|
519
620
|
),
|
|
520
621
|
)
|
|
622
|
+
if _response.status_code == 429:
|
|
623
|
+
raise TooManyRequestsError(
|
|
624
|
+
headers=dict(_response.headers),
|
|
625
|
+
body=typing.cast(
|
|
626
|
+
RateLimitError,
|
|
627
|
+
parse_obj_as(
|
|
628
|
+
type_=RateLimitError, # type: ignore
|
|
629
|
+
object_=_response.json(),
|
|
630
|
+
),
|
|
631
|
+
),
|
|
632
|
+
)
|
|
521
633
|
if _response.status_code == 500:
|
|
522
634
|
raise InternalServerError(
|
|
523
635
|
headers=dict(_response.headers),
|
|
524
636
|
body=typing.cast(
|
|
525
|
-
|
|
637
|
+
typing.Optional[typing.Any],
|
|
638
|
+
parse_obj_as(
|
|
639
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
640
|
+
object_=_response.json(),
|
|
641
|
+
),
|
|
642
|
+
),
|
|
643
|
+
)
|
|
644
|
+
if _response.status_code == 503:
|
|
645
|
+
raise ServiceUnavailableError(
|
|
646
|
+
headers=dict(_response.headers),
|
|
647
|
+
body=typing.cast(
|
|
648
|
+
typing.Optional[typing.Any],
|
|
526
649
|
parse_obj_as(
|
|
527
|
-
type_=
|
|
650
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
528
651
|
object_=_response.json(),
|
|
529
652
|
),
|
|
530
653
|
),
|
|
@@ -585,9 +708,9 @@ class AsyncRawProjectsClient:
|
|
|
585
708
|
raise BadRequestError(
|
|
586
709
|
headers=dict(_response.headers),
|
|
587
710
|
body=typing.cast(
|
|
588
|
-
|
|
711
|
+
typing.Optional[typing.Any],
|
|
589
712
|
parse_obj_as(
|
|
590
|
-
type_=
|
|
713
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
591
714
|
object_=_response.json(),
|
|
592
715
|
),
|
|
593
716
|
),
|
|
@@ -614,13 +737,35 @@ class AsyncRawProjectsClient:
|
|
|
614
737
|
),
|
|
615
738
|
),
|
|
616
739
|
)
|
|
740
|
+
if _response.status_code == 429:
|
|
741
|
+
raise TooManyRequestsError(
|
|
742
|
+
headers=dict(_response.headers),
|
|
743
|
+
body=typing.cast(
|
|
744
|
+
RateLimitError,
|
|
745
|
+
parse_obj_as(
|
|
746
|
+
type_=RateLimitError, # type: ignore
|
|
747
|
+
object_=_response.json(),
|
|
748
|
+
),
|
|
749
|
+
),
|
|
750
|
+
)
|
|
617
751
|
if _response.status_code == 500:
|
|
618
752
|
raise InternalServerError(
|
|
619
753
|
headers=dict(_response.headers),
|
|
620
754
|
body=typing.cast(
|
|
621
|
-
|
|
755
|
+
typing.Optional[typing.Any],
|
|
756
|
+
parse_obj_as(
|
|
757
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
758
|
+
object_=_response.json(),
|
|
759
|
+
),
|
|
760
|
+
),
|
|
761
|
+
)
|
|
762
|
+
if _response.status_code == 503:
|
|
763
|
+
raise ServiceUnavailableError(
|
|
764
|
+
headers=dict(_response.headers),
|
|
765
|
+
body=typing.cast(
|
|
766
|
+
typing.Optional[typing.Any],
|
|
622
767
|
parse_obj_as(
|
|
623
|
-
type_=
|
|
768
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
624
769
|
object_=_response.json(),
|
|
625
770
|
),
|
|
626
771
|
),
|
|
@@ -692,9 +837,20 @@ class AsyncRawProjectsClient:
|
|
|
692
837
|
raise BadRequestError(
|
|
693
838
|
headers=dict(_response.headers),
|
|
694
839
|
body=typing.cast(
|
|
695
|
-
|
|
840
|
+
typing.Optional[typing.Any],
|
|
696
841
|
parse_obj_as(
|
|
697
|
-
type_=
|
|
842
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
843
|
+
object_=_response.json(),
|
|
844
|
+
),
|
|
845
|
+
),
|
|
846
|
+
)
|
|
847
|
+
if _response.status_code == 402:
|
|
848
|
+
raise PaymentRequiredError(
|
|
849
|
+
headers=dict(_response.headers),
|
|
850
|
+
body=typing.cast(
|
|
851
|
+
PlanLimitExceededError,
|
|
852
|
+
parse_obj_as(
|
|
853
|
+
type_=PlanLimitExceededError, # type: ignore
|
|
698
854
|
object_=_response.json(),
|
|
699
855
|
),
|
|
700
856
|
),
|
|
@@ -725,9 +881,20 @@ class AsyncRawProjectsClient:
|
|
|
725
881
|
raise ConflictError(
|
|
726
882
|
headers=dict(_response.headers),
|
|
727
883
|
body=typing.cast(
|
|
728
|
-
|
|
884
|
+
typing.Optional[typing.Any],
|
|
885
|
+
parse_obj_as(
|
|
886
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
887
|
+
object_=_response.json(),
|
|
888
|
+
),
|
|
889
|
+
),
|
|
890
|
+
)
|
|
891
|
+
if _response.status_code == 429:
|
|
892
|
+
raise TooManyRequestsError(
|
|
893
|
+
headers=dict(_response.headers),
|
|
894
|
+
body=typing.cast(
|
|
895
|
+
RateLimitError,
|
|
729
896
|
parse_obj_as(
|
|
730
|
-
type_=
|
|
897
|
+
type_=RateLimitError, # type: ignore
|
|
731
898
|
object_=_response.json(),
|
|
732
899
|
),
|
|
733
900
|
),
|
|
@@ -736,9 +903,20 @@ class AsyncRawProjectsClient:
|
|
|
736
903
|
raise InternalServerError(
|
|
737
904
|
headers=dict(_response.headers),
|
|
738
905
|
body=typing.cast(
|
|
739
|
-
|
|
906
|
+
typing.Optional[typing.Any],
|
|
740
907
|
parse_obj_as(
|
|
741
|
-
type_=
|
|
908
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
909
|
+
object_=_response.json(),
|
|
910
|
+
),
|
|
911
|
+
),
|
|
912
|
+
)
|
|
913
|
+
if _response.status_code == 503:
|
|
914
|
+
raise ServiceUnavailableError(
|
|
915
|
+
headers=dict(_response.headers),
|
|
916
|
+
body=typing.cast(
|
|
917
|
+
typing.Optional[typing.Any],
|
|
918
|
+
parse_obj_as(
|
|
919
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
742
920
|
object_=_response.json(),
|
|
743
921
|
),
|
|
744
922
|
),
|
|
@@ -797,9 +975,9 @@ class AsyncRawProjectsClient:
|
|
|
797
975
|
raise BadRequestError(
|
|
798
976
|
headers=dict(_response.headers),
|
|
799
977
|
body=typing.cast(
|
|
800
|
-
|
|
978
|
+
typing.Optional[typing.Any],
|
|
801
979
|
parse_obj_as(
|
|
802
|
-
type_=
|
|
980
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
803
981
|
object_=_response.json(),
|
|
804
982
|
),
|
|
805
983
|
),
|
|
@@ -826,13 +1004,35 @@ class AsyncRawProjectsClient:
|
|
|
826
1004
|
),
|
|
827
1005
|
),
|
|
828
1006
|
)
|
|
1007
|
+
if _response.status_code == 429:
|
|
1008
|
+
raise TooManyRequestsError(
|
|
1009
|
+
headers=dict(_response.headers),
|
|
1010
|
+
body=typing.cast(
|
|
1011
|
+
RateLimitError,
|
|
1012
|
+
parse_obj_as(
|
|
1013
|
+
type_=RateLimitError, # type: ignore
|
|
1014
|
+
object_=_response.json(),
|
|
1015
|
+
),
|
|
1016
|
+
),
|
|
1017
|
+
)
|
|
829
1018
|
if _response.status_code == 500:
|
|
830
1019
|
raise InternalServerError(
|
|
831
1020
|
headers=dict(_response.headers),
|
|
832
1021
|
body=typing.cast(
|
|
833
|
-
|
|
1022
|
+
typing.Optional[typing.Any],
|
|
1023
|
+
parse_obj_as(
|
|
1024
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1025
|
+
object_=_response.json(),
|
|
1026
|
+
),
|
|
1027
|
+
),
|
|
1028
|
+
)
|
|
1029
|
+
if _response.status_code == 503:
|
|
1030
|
+
raise ServiceUnavailableError(
|
|
1031
|
+
headers=dict(_response.headers),
|
|
1032
|
+
body=typing.cast(
|
|
1033
|
+
typing.Optional[typing.Any],
|
|
834
1034
|
parse_obj_as(
|
|
835
|
-
type_=
|
|
1035
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
836
1036
|
object_=_response.json(),
|
|
837
1037
|
),
|
|
838
1038
|
),
|
|
@@ -907,9 +1107,9 @@ class AsyncRawProjectsClient:
|
|
|
907
1107
|
raise BadRequestError(
|
|
908
1108
|
headers=dict(_response.headers),
|
|
909
1109
|
body=typing.cast(
|
|
910
|
-
|
|
1110
|
+
typing.Optional[typing.Any],
|
|
911
1111
|
parse_obj_as(
|
|
912
|
-
type_=
|
|
1112
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
913
1113
|
object_=_response.json(),
|
|
914
1114
|
),
|
|
915
1115
|
),
|
|
@@ -940,9 +1140,20 @@ class AsyncRawProjectsClient:
|
|
|
940
1140
|
raise ConflictError(
|
|
941
1141
|
headers=dict(_response.headers),
|
|
942
1142
|
body=typing.cast(
|
|
943
|
-
|
|
1143
|
+
typing.Optional[typing.Any],
|
|
944
1144
|
parse_obj_as(
|
|
945
|
-
type_=
|
|
1145
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1146
|
+
object_=_response.json(),
|
|
1147
|
+
),
|
|
1148
|
+
),
|
|
1149
|
+
)
|
|
1150
|
+
if _response.status_code == 429:
|
|
1151
|
+
raise TooManyRequestsError(
|
|
1152
|
+
headers=dict(_response.headers),
|
|
1153
|
+
body=typing.cast(
|
|
1154
|
+
RateLimitError,
|
|
1155
|
+
parse_obj_as(
|
|
1156
|
+
type_=RateLimitError, # type: ignore
|
|
946
1157
|
object_=_response.json(),
|
|
947
1158
|
),
|
|
948
1159
|
),
|
|
@@ -951,9 +1162,20 @@ class AsyncRawProjectsClient:
|
|
|
951
1162
|
raise InternalServerError(
|
|
952
1163
|
headers=dict(_response.headers),
|
|
953
1164
|
body=typing.cast(
|
|
954
|
-
|
|
1165
|
+
typing.Optional[typing.Any],
|
|
1166
|
+
parse_obj_as(
|
|
1167
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1168
|
+
object_=_response.json(),
|
|
1169
|
+
),
|
|
1170
|
+
),
|
|
1171
|
+
)
|
|
1172
|
+
if _response.status_code == 503:
|
|
1173
|
+
raise ServiceUnavailableError(
|
|
1174
|
+
headers=dict(_response.headers),
|
|
1175
|
+
body=typing.cast(
|
|
1176
|
+
typing.Optional[typing.Any],
|
|
955
1177
|
parse_obj_as(
|
|
956
|
-
type_=
|
|
1178
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
957
1179
|
object_=_response.json(),
|
|
958
1180
|
),
|
|
959
1181
|
),
|
|
@@ -1004,9 +1226,9 @@ class AsyncRawProjectsClient:
|
|
|
1004
1226
|
raise BadRequestError(
|
|
1005
1227
|
headers=dict(_response.headers),
|
|
1006
1228
|
body=typing.cast(
|
|
1007
|
-
|
|
1229
|
+
typing.Optional[typing.Any],
|
|
1008
1230
|
parse_obj_as(
|
|
1009
|
-
type_=
|
|
1231
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1010
1232
|
object_=_response.json(),
|
|
1011
1233
|
),
|
|
1012
1234
|
),
|
|
@@ -1033,13 +1255,35 @@ class AsyncRawProjectsClient:
|
|
|
1033
1255
|
),
|
|
1034
1256
|
),
|
|
1035
1257
|
)
|
|
1258
|
+
if _response.status_code == 429:
|
|
1259
|
+
raise TooManyRequestsError(
|
|
1260
|
+
headers=dict(_response.headers),
|
|
1261
|
+
body=typing.cast(
|
|
1262
|
+
RateLimitError,
|
|
1263
|
+
parse_obj_as(
|
|
1264
|
+
type_=RateLimitError, # type: ignore
|
|
1265
|
+
object_=_response.json(),
|
|
1266
|
+
),
|
|
1267
|
+
),
|
|
1268
|
+
)
|
|
1036
1269
|
if _response.status_code == 500:
|
|
1037
1270
|
raise InternalServerError(
|
|
1038
1271
|
headers=dict(_response.headers),
|
|
1039
1272
|
body=typing.cast(
|
|
1040
|
-
|
|
1273
|
+
typing.Optional[typing.Any],
|
|
1274
|
+
parse_obj_as(
|
|
1275
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1276
|
+
object_=_response.json(),
|
|
1277
|
+
),
|
|
1278
|
+
),
|
|
1279
|
+
)
|
|
1280
|
+
if _response.status_code == 503:
|
|
1281
|
+
raise ServiceUnavailableError(
|
|
1282
|
+
headers=dict(_response.headers),
|
|
1283
|
+
body=typing.cast(
|
|
1284
|
+
typing.Optional[typing.Any],
|
|
1041
1285
|
parse_obj_as(
|
|
1042
|
-
type_=
|
|
1286
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1043
1287
|
object_=_response.json(),
|
|
1044
1288
|
),
|
|
1045
1289
|
),
|
|
@@ -7,9 +7,4 @@ from .projects_get_response import ProjectsGetResponse
|
|
|
7
7
|
from .projects_list_response_item import ProjectsListResponseItem
|
|
8
8
|
from .projects_update_response import ProjectsUpdateResponse
|
|
9
9
|
|
|
10
|
-
__all__ = [
|
|
11
|
-
"ProjectsCreateResponse",
|
|
12
|
-
"ProjectsGetResponse",
|
|
13
|
-
"ProjectsListResponseItem",
|
|
14
|
-
"ProjectsUpdateResponse",
|
|
15
|
-
]
|
|
10
|
+
__all__ = ["ProjectsCreateResponse", "ProjectsGetResponse", "ProjectsListResponseItem", "ProjectsUpdateResponse"]
|
|
@@ -12,17 +12,11 @@ class ProjectsCreateResponse(UniversalBaseModel):
|
|
|
12
12
|
id: str
|
|
13
13
|
name: str
|
|
14
14
|
slug: str
|
|
15
|
-
organization_id: typing_extensions.Annotated[
|
|
16
|
-
|
|
17
|
-
]
|
|
18
|
-
created_by_user_id: typing_extensions.Annotated[
|
|
19
|
-
str, FieldMetadata(alias="createdByUserId")
|
|
20
|
-
]
|
|
15
|
+
organization_id: typing_extensions.Annotated[str, FieldMetadata(alias="organizationId")]
|
|
16
|
+
created_by_user_id: typing_extensions.Annotated[str, FieldMetadata(alias="createdByUserId")]
|
|
21
17
|
|
|
22
18
|
if IS_PYDANTIC_V2:
|
|
23
|
-
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
|
|
24
|
-
extra="allow", frozen=True
|
|
25
|
-
) # type: ignore # Pydantic v2
|
|
19
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
26
20
|
else:
|
|
27
21
|
|
|
28
22
|
class Config:
|
|
@@ -12,17 +12,11 @@ class ProjectsGetResponse(UniversalBaseModel):
|
|
|
12
12
|
id: str
|
|
13
13
|
name: str
|
|
14
14
|
slug: str
|
|
15
|
-
organization_id: typing_extensions.Annotated[
|
|
16
|
-
|
|
17
|
-
]
|
|
18
|
-
created_by_user_id: typing_extensions.Annotated[
|
|
19
|
-
str, FieldMetadata(alias="createdByUserId")
|
|
20
|
-
]
|
|
15
|
+
organization_id: typing_extensions.Annotated[str, FieldMetadata(alias="organizationId")]
|
|
16
|
+
created_by_user_id: typing_extensions.Annotated[str, FieldMetadata(alias="createdByUserId")]
|
|
21
17
|
|
|
22
18
|
if IS_PYDANTIC_V2:
|
|
23
|
-
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
|
|
24
|
-
extra="allow", frozen=True
|
|
25
|
-
) # type: ignore # Pydantic v2
|
|
19
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
26
20
|
else:
|
|
27
21
|
|
|
28
22
|
class Config:
|
|
@@ -12,17 +12,11 @@ class ProjectsListResponseItem(UniversalBaseModel):
|
|
|
12
12
|
id: str
|
|
13
13
|
name: str
|
|
14
14
|
slug: str
|
|
15
|
-
organization_id: typing_extensions.Annotated[
|
|
16
|
-
|
|
17
|
-
]
|
|
18
|
-
created_by_user_id: typing_extensions.Annotated[
|
|
19
|
-
str, FieldMetadata(alias="createdByUserId")
|
|
20
|
-
]
|
|
15
|
+
organization_id: typing_extensions.Annotated[str, FieldMetadata(alias="organizationId")]
|
|
16
|
+
created_by_user_id: typing_extensions.Annotated[str, FieldMetadata(alias="createdByUserId")]
|
|
21
17
|
|
|
22
18
|
if IS_PYDANTIC_V2:
|
|
23
|
-
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
|
|
24
|
-
extra="allow", frozen=True
|
|
25
|
-
) # type: ignore # Pydantic v2
|
|
19
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
26
20
|
else:
|
|
27
21
|
|
|
28
22
|
class Config:
|
|
@@ -12,17 +12,11 @@ class ProjectsUpdateResponse(UniversalBaseModel):
|
|
|
12
12
|
id: str
|
|
13
13
|
name: str
|
|
14
14
|
slug: str
|
|
15
|
-
organization_id: typing_extensions.Annotated[
|
|
16
|
-
|
|
17
|
-
]
|
|
18
|
-
created_by_user_id: typing_extensions.Annotated[
|
|
19
|
-
str, FieldMetadata(alias="createdByUserId")
|
|
20
|
-
]
|
|
15
|
+
organization_id: typing_extensions.Annotated[str, FieldMetadata(alias="organizationId")]
|
|
16
|
+
created_by_user_id: typing_extensions.Annotated[str, FieldMetadata(alias="createdByUserId")]
|
|
21
17
|
|
|
22
18
|
if IS_PYDANTIC_V2:
|
|
23
|
-
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
|
|
24
|
-
extra="allow", frozen=True
|
|
25
|
-
) # type: ignore # Pydantic v2
|
|
19
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
26
20
|
else:
|
|
27
21
|
|
|
28
22
|
class Config:
|