unique_toolkit 1.35.2__py3-none-any.whl → 1.35.4__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.
@@ -2,7 +2,7 @@ import json
2
2
  import logging
3
3
  from typing import Unpack
4
4
 
5
- from pydantic import BaseModel
5
+ from pydantic import BaseModel, Field
6
6
 
7
7
  from unique_toolkit import LanguageModelService
8
8
  from unique_toolkit._common.pydantic_helpers import get_configuration_dict
@@ -28,6 +28,10 @@ class PlanningConfig(BaseModel):
28
28
  model_config = get_configuration_dict()
29
29
 
30
30
  planning_schema_config: PlanningSchemaConfig = PlanningSchemaConfig()
31
+ ignored_options: list[str] = Field(
32
+ default=["parallel_tool_calls"],
33
+ description="A list of options to ignore when calling the LLM for the planning step.",
34
+ )
31
35
 
32
36
 
33
37
  class PlanningMiddleware(LoopIterationRunner):
@@ -50,11 +54,16 @@ class PlanningMiddleware(LoopIterationRunner):
50
54
  ) -> LanguageModelAssistantMessage | None:
51
55
  planning_schema = get_planning_schema(self._config.planning_schema_config)
52
56
 
57
+ other_options = {
58
+ k: v
59
+ for k, v in kwargs.get("other_options", {}).items()
60
+ if k not in self._config.ignored_options
61
+ }
53
62
  response = await self._llm_service.complete_async(
54
63
  messages=kwargs["messages"],
55
64
  model_name=kwargs["model"].name,
56
65
  structured_output_model=planning_schema,
57
- other_options=kwargs.get("other_options", {}),
66
+ other_options=other_options,
58
67
  )
59
68
 
60
69
  if response.choices[0].message.parsed is None:
@@ -95,7 +95,7 @@ def build_unique_custom_app(
95
95
  logger.error(f"Error parsing event: {e}", exc_info=True)
96
96
  return JSONResponse(
97
97
  status_code=status.HTTP_400_BAD_REQUEST,
98
- content={"error": f"Invalid event format: {str(e)}"},
98
+ content={"error": f"Invalid event format: {e.msg}"},
99
99
  )
100
100
 
101
101
  if event_data["event"] not in subscribed_event_names:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: unique_toolkit
3
- Version: 1.35.2
3
+ Version: 1.35.4
4
4
  Summary:
5
5
  License: Proprietary
6
6
  Author: Cedric Klinkert
@@ -121,6 +121,12 @@ All notable changes to this project will be documented in this file.
121
121
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
122
122
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
123
123
 
124
+ ## [1.35.4] - 2025-12-10
125
+ - Fix a potential stacktrace leak
126
+
127
+ ## [1.35.3] - 2025-12-10
128
+ - Add option to ignore some options when calling the LLM for the planning step.
129
+
124
130
  ## [1.35.2] - 2025-12-05
125
131
  - Increase speed of token reducer
126
132
 
@@ -67,7 +67,7 @@ unique_toolkit/agentic/loop_runner/_stream_handler_utils.py,sha256=FTGc5y8wkDnwn
67
67
  unique_toolkit/agentic/loop_runner/base.py,sha256=3g4PalzV00o8kcRwHds2c2rtxW4idD7_7vS2Z7GkMvQ,1370
68
68
  unique_toolkit/agentic/loop_runner/middleware/__init__.py,sha256=_yeRH8xYigfJZyQ5-5lZUo2RXDJkGfftCQrKFm2rWb4,217
69
69
  unique_toolkit/agentic/loop_runner/middleware/planning/__init__.py,sha256=Y9MlihNA8suNREixW98RF45bj0EMtD_tQuDrO2MEML4,304
70
- unique_toolkit/agentic/loop_runner/middleware/planning/planning.py,sha256=QiXqTGxQ-9Puc79blTBadD0piU7SY5INyndCdanfqA8,2877
70
+ unique_toolkit/agentic/loop_runner/middleware/planning/planning.py,sha256=5d8kyipuFyI_1SQG49f165eOwSHeSG1qjbJQ7laeTsk,3218
71
71
  unique_toolkit/agentic/loop_runner/middleware/planning/schema.py,sha256=76C36CWCLfDAYYqtaQlhXsmkWM1fCqf8j-l5afQREKA,2869
72
72
  unique_toolkit/agentic/loop_runner/runners/__init__.py,sha256=raaNpHcTfXkYURy0ysyacispSdQzYPDoG17PyR57uK4,205
73
73
  unique_toolkit/agentic/loop_runner/runners/basic.py,sha256=3swSPsefV1X-ltUC8iNAOrn9PL0abUUfWXJjhM4sShA,3116
@@ -135,7 +135,7 @@ unique_toolkit/agentic/tools/utils/source_handling/source_formatting.py,sha256=u
135
135
  unique_toolkit/agentic/tools/utils/source_handling/tests/test_source_formatting.py,sha256=EA8iVvb3L91OFk2XMbGcFuhe2etqm3Sx9QCYDGiOSOM,6995
136
136
  unique_toolkit/app/__init__.py,sha256=OaylhLwxeRlsHlcFGSlR5R7oREFsjv9wRdxuVZBYM_8,1371
137
137
  unique_toolkit/app/dev_util.py,sha256=J20peCvrSQKfMGdYPYwCirs3Yq2v_e33GzNBzNKbWN4,5531
138
- unique_toolkit/app/fast_api_factory.py,sha256=l6AZoR8RAh4IJxAHZR_ajAL5ojcGdVh7Z8pfSpDSEKM,4634
138
+ unique_toolkit/app/fast_api_factory.py,sha256=i65-zjTg2D4GOKIbaSkHBTxgjAP-rmFDeJpVYKxziXk,4633
139
139
  unique_toolkit/app/init_logging.py,sha256=Sh26SRxOj8i8dzobKhYha2lLrkrMTHfB1V4jR3h23gQ,678
140
140
  unique_toolkit/app/init_sdk.py,sha256=5_oDoETr6akwYyBCb0ivTdMNu3SVgPSkrXcDS6ELyY8,2269
141
141
  unique_toolkit/app/performance/async_tasks.py,sha256=H0l3OAcosLwNHZ8d2pd-Di4wHIXfclEvagi5kfqLFPA,1941
@@ -208,7 +208,7 @@ unique_toolkit/short_term_memory/service.py,sha256=5PeVBu1ZCAfyDb2HLVvlmqSbyzBBu
208
208
  unique_toolkit/smart_rules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
209
209
  unique_toolkit/smart_rules/compile.py,sha256=Ozhh70qCn2yOzRWr9d8WmJeTo7AQurwd3tStgBMPFLA,1246
210
210
  unique_toolkit/test_utilities/events.py,sha256=_mwV2bs5iLjxS1ynDCjaIq-gjjKhXYCK-iy3dRfvO3g,6410
211
- unique_toolkit-1.35.2.dist-info/LICENSE,sha256=GlN8wHNdh53xwOPg44URnwag6TEolCjoq3YD_KrWgss,193
212
- unique_toolkit-1.35.2.dist-info/METADATA,sha256=Q6IeZ9PHeit_qWXIbzwhpgq99Es-jGP_lQbxcAFca10,45878
213
- unique_toolkit-1.35.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
214
- unique_toolkit-1.35.2.dist-info/RECORD,,
211
+ unique_toolkit-1.35.4.dist-info/LICENSE,sha256=GlN8wHNdh53xwOPg44URnwag6TEolCjoq3YD_KrWgss,193
212
+ unique_toolkit-1.35.4.dist-info/METADATA,sha256=dcIwAZ7cJvDVgC11zc7DC29MqbTIkYZFjUI1C_vbLes,46044
213
+ unique_toolkit-1.35.4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
214
+ unique_toolkit-1.35.4.dist-info/RECORD,,