crewplus 0.3.3__tar.gz → 0.3.4__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.
Files changed (79) hide show
  1. {crewplus-0.3.3 → crewplus-0.3.4}/PKG-INFO +1 -1
  2. {crewplus-0.3.3 → crewplus-0.3.4}/crewplus/services/gemini_chat_model.py +14 -2
  3. {crewplus-0.3.3 → crewplus-0.3.4}/pyproject.toml +1 -1
  4. {crewplus-0.3.3 → crewplus-0.3.4}/LICENSE +0 -0
  5. {crewplus-0.3.3 → crewplus-0.3.4}/README.md +0 -0
  6. {crewplus-0.3.3 → crewplus-0.3.4}/crewplus/__init__.py +0 -0
  7. {crewplus-0.3.3 → crewplus-0.3.4}/crewplus/__pycache__/__init__.cpython-311.pyc.1535298853824 +0 -0
  8. {crewplus-0.3.3 → crewplus-0.3.4}/crewplus/callbacks/__init__.py +0 -0
  9. {crewplus-0.3.3 → crewplus-0.3.4}/crewplus/callbacks/async_langfuse_handler.py +0 -0
  10. {crewplus-0.3.3 → crewplus-0.3.4}/crewplus/services/__init__.py +0 -0
  11. {crewplus-0.3.3 → crewplus-0.3.4}/crewplus/services/__pycache__/__init__.cpython-311.pyc.1535299230960 +0 -0
  12. {crewplus-0.3.3 → crewplus-0.3.4}/crewplus/services/__pycache__/gemini_chat_model.cpython-311.pyc.1535298773120 +0 -0
  13. {crewplus-0.3.3 → crewplus-0.3.4}/crewplus/services/__pycache__/runtime_model_factory.cpython-311.pyc.1959047557728 +0 -0
  14. {crewplus-0.3.3 → crewplus-0.3.4}/crewplus/services/azure_chat_model.py +0 -0
  15. {crewplus-0.3.3 → crewplus-0.3.4}/crewplus/services/capabilities/__init__.py +0 -0
  16. {crewplus-0.3.3 → crewplus-0.3.4}/crewplus/services/capabilities/base.py +0 -0
  17. {crewplus-0.3.3 → crewplus-0.3.4}/crewplus/services/capabilities/bash.py +0 -0
  18. {crewplus-0.3.3 → crewplus-0.3.4}/crewplus/services/capabilities/registry.py +0 -0
  19. {crewplus-0.3.3 → crewplus-0.3.4}/crewplus/services/capabilities/web_search.py +0 -0
  20. {crewplus-0.3.3 → crewplus-0.3.4}/crewplus/services/claude_chat_model.py +0 -0
  21. {crewplus-0.3.3 → crewplus-0.3.4}/crewplus/services/feedback.md +0 -0
  22. {crewplus-0.3.3 → crewplus-0.3.4}/crewplus/services/feedback_manager.py +0 -0
  23. {crewplus-0.3.3 → crewplus-0.3.4}/crewplus/services/init_services.py +0 -0
  24. {crewplus-0.3.3 → crewplus-0.3.4}/crewplus/services/model_load_balancer.py +0 -0
  25. {crewplus-0.3.3 → crewplus-0.3.4}/crewplus/services/oai_claude_chat_model.py +0 -0
  26. {crewplus-0.3.3 → crewplus-0.3.4}/crewplus/services/runtime_model_factory.py +0 -0
  27. {crewplus-0.3.3 → crewplus-0.3.4}/crewplus/services/schemas/feedback.py +0 -0
  28. {crewplus-0.3.3 → crewplus-0.3.4}/crewplus/services/tracing_manager.py +0 -0
  29. {crewplus-0.3.3 → crewplus-0.3.4}/crewplus/utils/__init__.py +0 -0
  30. {crewplus-0.3.3 → crewplus-0.3.4}/crewplus/utils/schema_action.py +0 -0
  31. {crewplus-0.3.3 → crewplus-0.3.4}/crewplus/utils/schema_document_updater.py +0 -0
  32. {crewplus-0.3.3 → crewplus-0.3.4}/crewplus/utils/tracing_util.py +0 -0
  33. {crewplus-0.3.3 → crewplus-0.3.4}/crewplus/vectorstores/milvus/__init__.py +0 -0
  34. {crewplus-0.3.3 → crewplus-0.3.4}/crewplus/vectorstores/milvus/milvus_schema_manager.py +0 -0
  35. {crewplus-0.3.3 → crewplus-0.3.4}/crewplus/vectorstores/milvus/schema_milvus.py +0 -0
  36. {crewplus-0.3.3 → crewplus-0.3.4}/crewplus/vectorstores/milvus/vdb_service.py +0 -0
  37. {crewplus-0.3.3 → crewplus-0.3.4}/docs/GeminiChatModel.md +0 -0
  38. {crewplus-0.3.3 → crewplus-0.3.4}/docs/ModelLoadBalancer.md +0 -0
  39. {crewplus-0.3.3 → crewplus-0.3.4}/docs/VDBService.md +0 -0
  40. {crewplus-0.3.3 → crewplus-0.3.4}/docs/index.md +0 -0
  41. {crewplus-0.3.3 → crewplus-0.3.4}/tests/README.md +0 -0
  42. {crewplus-0.3.3 → crewplus-0.3.4}/tests/conftest.py +0 -0
  43. {crewplus-0.3.3 → crewplus-0.3.4}/tests/output/drawing_ingestion/gpt-5.4_run1.md +0 -0
  44. {crewplus-0.3.3 → crewplus-0.3.4}/tests/output/drawing_ingestion/gpt-5.4_run2.md +0 -0
  45. {crewplus-0.3.3 → crewplus-0.3.4}/tests/output/drawing_ingestion/gpt-5.6-luna_run1.md +0 -0
  46. {crewplus-0.3.3 → crewplus-0.3.4}/tests/output/drawing_ingestion/gpt-5.6-luna_run2.md +0 -0
  47. {crewplus-0.3.3 → crewplus-0.3.4}/tests/output/drawing_ingestion/gpt-5.6-terra_run1.md +0 -0
  48. {crewplus-0.3.3 → crewplus-0.3.4}/tests/output/drawing_ingestion/gpt-5.6-terra_run2.md +0 -0
  49. {crewplus-0.3.3 → crewplus-0.3.4}/tests/output/drawing_ingestion/page24_150dpi.png +0 -0
  50. {crewplus-0.3.3 → crewplus-0.3.4}/tests/output/drawing_ingestion/report.md +0 -0
  51. {crewplus-0.3.3 → crewplus-0.3.4}/tests/output/drawing_ingestion/results.json +0 -0
  52. {crewplus-0.3.3 → crewplus-0.3.4}/tests/output/drawing_ingestion/session1-luna-terra/gpt-5.6-luna_run1.md +0 -0
  53. {crewplus-0.3.3 → crewplus-0.3.4}/tests/output/drawing_ingestion/session1-luna-terra/gpt-5.6-luna_run2.md +0 -0
  54. {crewplus-0.3.3 → crewplus-0.3.4}/tests/output/drawing_ingestion/session1-luna-terra/gpt-5.6-terra_run1.md +0 -0
  55. {crewplus-0.3.3 → crewplus-0.3.4}/tests/output/drawing_ingestion/session1-luna-terra/gpt-5.6-terra_run2.md +0 -0
  56. {crewplus-0.3.3 → crewplus-0.3.4}/tests/output/drawing_ingestion/session1-luna-terra/report.md +0 -0
  57. {crewplus-0.3.3 → crewplus-0.3.4}/tests/output/drawing_ingestion/session1-luna-terra/results.json +0 -0
  58. {crewplus-0.3.3 → crewplus-0.3.4}/tests/output/drawing_ingestion/session2-55-sol/gpt-5.5_run1.md +0 -0
  59. {crewplus-0.3.3 → crewplus-0.3.4}/tests/output/drawing_ingestion/session2-55-sol/gpt-5.5_run2.md +0 -0
  60. {crewplus-0.3.3 → crewplus-0.3.4}/tests/output/drawing_ingestion/session2-55-sol/gpt-5.6-sol_run1.md +0 -0
  61. {crewplus-0.3.3 → crewplus-0.3.4}/tests/output/drawing_ingestion/session2-55-sol/gpt-5.6-sol_run2.md +0 -0
  62. {crewplus-0.3.3 → crewplus-0.3.4}/tests/output/drawing_ingestion/session2-55-sol/page24_150dpi.png +0 -0
  63. {crewplus-0.3.3 → crewplus-0.3.4}/tests/output/drawing_ingestion/session2-55-sol/report.md +0 -0
  64. {crewplus-0.3.3 → crewplus-0.3.4}/tests/output/drawing_ingestion/session2-55-sol/results.json +0 -0
  65. {crewplus-0.3.3 → crewplus-0.3.4}/tests/output/drawing_ingestion/session2-55-sol/summary-report-55-sol.md +0 -0
  66. {crewplus-0.3.3 → crewplus-0.3.4}/tests/output/drawing_ingestion/summary-report.md +0 -0
  67. {crewplus-0.3.3 → crewplus-0.3.4}/tests/test_bash_tools.py +0 -0
  68. {crewplus-0.3.3 → crewplus-0.3.4}/tests/test_claude_api.py +0 -0
  69. {crewplus-0.3.3 → crewplus-0.3.4}/tests/test_claude_custom_endpoint_integration.py +0 -0
  70. {crewplus-0.3.3 → crewplus-0.3.4}/tests/test_claude_langchain_openai.py +0 -0
  71. {crewplus-0.3.3 → crewplus-0.3.4}/tests/test_claude_taskflow_schema.py +0 -0
  72. {crewplus-0.3.3 → crewplus-0.3.4}/tests/test_custom_claude_endpoint.py +0 -0
  73. {crewplus-0.3.3 → crewplus-0.3.4}/tests/test_gemini3_pro_preview.py +0 -0
  74. {crewplus-0.3.3 → crewplus-0.3.4}/tests/test_gemini_bind_tools.py +0 -0
  75. {crewplus-0.3.3 → crewplus-0.3.4}/tests/test_oai_claude_chat_model.py +0 -0
  76. {crewplus-0.3.3 → crewplus-0.3.4}/tests/test_ops_models_streaming.py +0 -0
  77. {crewplus-0.3.3 → crewplus-0.3.4}/tests/test_pdf_drawing_ingestion_gpt55_sol.py +0 -0
  78. {crewplus-0.3.3 → crewplus-0.3.4}/tests/test_pdf_drawing_ingestion_gpt56.py +0 -0
  79. {crewplus-0.3.3 → crewplus-0.3.4}/tests/test_runtime_model_factory.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: crewplus
3
- Version: 0.3.3
3
+ Version: 0.3.4
4
4
  Summary: Base services for CrewPlus AI applications
5
5
  Author-Email: Tim Liu <tim@opsmateai.com>
6
6
  License: MIT
@@ -1032,8 +1032,20 @@ class GeminiChatModel(BaseChatModel):
1032
1032
 
1033
1033
  def _create_chat_result_with_usage(self, response) -> ChatResult:
1034
1034
  """Creates a ChatResult with usage metadata for Langfuse tracking."""
1035
- generated_text = response.text or "" # Default to empty string if None
1036
- finish_reason = response.candidates[0].finish_reason.name if response.candidates else None
1035
+ # response.text raises when the candidate list is empty or the response was
1036
+ # blocked by a safety filter, and finish_reason can be None -- both happen
1037
+ # exactly when thinking consumed the whole output budget, which is when the
1038
+ # caller most needs finish_reason to come through instead of an exception.
1039
+ try:
1040
+ generated_text = response.text or ""
1041
+ except Exception:
1042
+ generated_text = ""
1043
+
1044
+ finish_reason = None
1045
+ if response.candidates:
1046
+ raw_finish_reason = getattr(response.candidates[0], "finish_reason", None)
1047
+ if raw_finish_reason is not None:
1048
+ finish_reason = getattr(raw_finish_reason, "name", None) or str(raw_finish_reason)
1037
1049
 
1038
1050
  # Use the new mapping function here for invoke calls
1039
1051
  usage_metadata = self._extract_usage_metadata(response)
@@ -6,7 +6,7 @@ build-backend = "pdm.backend"
6
6
 
7
7
  [project]
8
8
  name = "crewplus"
9
- version = "0.3.3"
9
+ version = "0.3.4"
10
10
  description = "Base services for CrewPlus AI applications"
11
11
  authors = [
12
12
  { name = "Tim Liu", email = "tim@opsmateai.com" },
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes