unique_toolkit 2026.20.0.dev32__py3-none-any.whl → 2026.20.0.dev33__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.
@@ -0,0 +1,10 @@
1
+ """Canonical tool-name constants shared across toolkit modules.
2
+
3
+ This module intentionally contains only string constants so callers can depend on
4
+ stable tool identifiers without importing concrete tool classes.
5
+
6
+ TODO(UN-20578): Add canonical name constants for the remaining toolkit tools.
7
+ """
8
+
9
+ INTERNAL_SEARCH_TOOL_NAME = "InternalSearch"
10
+ UPLOADED_SEARCH_TOOL_NAME = "UploadedSearch"
@@ -22,6 +22,10 @@ from unique_toolkit.agentic.tools.a2a import A2AManager, SubAgentTool
22
22
  from unique_toolkit.agentic.tools.config import ToolBuildConfig
23
23
  from unique_toolkit.agentic.tools.factory import ToolFactory
24
24
  from unique_toolkit.agentic.tools.mcp.manager import MCPManager
25
+ from unique_toolkit.agentic.tools.names import (
26
+ INTERNAL_SEARCH_TOOL_NAME,
27
+ UPLOADED_SEARCH_TOOL_NAME,
28
+ )
25
29
  from unique_toolkit.agentic.tools.openai_builtin.base import (
26
30
  OpenAIBuiltInTool,
27
31
  OpenAIBuiltInToolName,
@@ -163,6 +167,9 @@ class _ToolManager(Generic[_ApiMode]):
163
167
  # is the tool exclusive and has been choosen by the user?
164
168
  if t.is_exclusive() and len(tool_choices) > 0 and t.name in tool_choices:
165
169
  self._tools = [t] # override all other tools
170
+ self._restore_uploaded_search_for_internal_search_if_available(
171
+ exclusive_tool=t
172
+ )
166
173
  break
167
174
  # if the tool is exclusive but no tool choices are given, skip it
168
175
  if t.is_exclusive():
@@ -170,6 +177,27 @@ class _ToolManager(Generic[_ApiMode]):
170
177
 
171
178
  self._tools.append(t)
172
179
 
180
+ def _restore_uploaded_search_for_internal_search_if_available(
181
+ self,
182
+ exclusive_tool: Tool[Any] | OpenAIBuiltInTool[Any],
183
+ ) -> None:
184
+ """Keep UploadedSearch available when InternalSearch wins exclusivity."""
185
+ if exclusive_tool.name != INTERNAL_SEARCH_TOOL_NAME:
186
+ return
187
+
188
+ uploaded_search_tool = next(
189
+ (
190
+ tool
191
+ for tool in self.available_tools
192
+ if tool.name == UPLOADED_SEARCH_TOOL_NAME
193
+ ),
194
+ None,
195
+ )
196
+ if uploaded_search_tool is None:
197
+ return
198
+
199
+ self._tools.append(uploaded_search_tool)
200
+
173
201
  def filter_tool_calls(
174
202
  self,
175
203
  tool_calls: list[LanguageModelFunction],
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: unique-toolkit
3
- Version: 2026.20.0.dev32
3
+ Version: 2026.20.0.dev33
4
4
  Summary:
5
5
  Author: Cedric Klinkert, Martin Fadler, Sadique Sheik, Fabian Schläpfer, Pascal Hauri, Ejiroghene Oki-Peter, Rami Azouz, Ricardo Visini, Sanzio Monti
6
6
  Author-email: Cedric Klinkert <cedric.klinkert@unique.ch>, Martin Fadler <martin.fadler@unique.ch>, Sadique Sheik <sadique@unique.ch>, Fabian Schläpfer <fabian@unique.ch>, Pascal Hauri <pascal@unique.ch>, Ejiroghene Oki-Peter <oki-peter.ejiroghene@unique.ai>, Rami Azouz <rami.ext@unique.ch>, Ricardo Visini <ricardo.visini@unique.ch>, Sanzio Monti <sanzio.monti@unique.ai>
@@ -196,6 +196,7 @@ unique_toolkit/agentic/tools/mcp/__init__.py,sha256=RLF_p-LDRC7GhiB3fdCi4u3bh6V9
196
196
  unique_toolkit/agentic/tools/mcp/manager.py,sha256=DPYwwDe6RSZyuPaxn-je49fP_qOOs0ZV46EM6GZcV4c,2748
197
197
  unique_toolkit/agentic/tools/mcp/models.py,sha256=DaBVzwJ4dqtgzm8Mv0-NOGBU04zyVe-RgWntBhkpmnE,742
198
198
  unique_toolkit/agentic/tools/mcp/tool_wrapper.py,sha256=X2-UY-hQ4wguPOcf0TD4YoSKtc1vwNmGFY1rkDhARBI,15228
199
+ unique_toolkit/agentic/tools/names.py,sha256=qNslmbMsC98Hji7KYeq0PmB3k3p7sqAxr6oRrfo_tfY,386
199
200
  unique_toolkit/agentic/tools/openai_builtin/__init__.py,sha256=Q6d9mhsLRVF3erT2yMxLld62D3FTZ8nbovI4vLv4Nso,701
200
201
  unique_toolkit/agentic/tools/openai_builtin/base.py,sha256=D9bcOaedHQhXOJZACRkDWJte4kY8QXEnsL-LccmJLB4,1621
201
202
  unique_toolkit/agentic/tools/openai_builtin/code_interpreter/__init__.py,sha256=PIt8wxfSeNYqExWpvrjZxD5sntd5Wv8bXKfoeCB4XWs,764
@@ -210,7 +211,7 @@ unique_toolkit/agentic/tools/schemas.py,sha256=4BTJ0q7fiAVQ2Uy9kVJnS0rcKeKKaYTkO
210
211
  unique_toolkit/agentic/tools/test/test_mcp_manager.py,sha256=uWrTmnenQ70s5hrTfMYVah2vDT-jZq4nQmvhutypEK8,19195
211
212
  unique_toolkit/agentic/tools/test/test_tool_progress_reporter.py,sha256=XHNezB8itj9KzpQgD0cwRtp2AgRUfUkQsHc3bTyPj6c,15801
212
213
  unique_toolkit/agentic/tools/tool.py,sha256=hVJ7aaasz_tghyCJmiDLmbOIrweW2B7oBHJmBuueSNQ,8758
213
- unique_toolkit/agentic/tools/tool_manager.py,sha256=5M9crTWchmirqs4HbYLJtBxxaS3iva9ptcWJcHwTVeM,20277
214
+ unique_toolkit/agentic/tools/tool_manager.py,sha256=FFS0eSm6VH5okBpHtGHZYhlWj37lcg2emO2J4PKa6UU,21177
214
215
  unique_toolkit/agentic/tools/tool_progress_reporter.py,sha256=GaR0oqDUJZvBB9WCUVYYh0Zvs6U-LMygJCCrqPlitgA,10296
215
216
  unique_toolkit/agentic/tools/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
216
217
  unique_toolkit/agentic/tools/utils/source_handling/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -361,6 +362,6 @@ unique_toolkit/short_term_memory/service.py,sha256=Ncw0_0CNM6kmzJSLVJGG5GcKpBduI
361
362
  unique_toolkit/smart_rules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
362
363
  unique_toolkit/smart_rules/compile.py,sha256=Ozhh70qCn2yOzRWr9d8WmJeTo7AQurwd3tStgBMPFLA,1246
363
364
  unique_toolkit/test_utilities/events.py,sha256=FLrhMh0A_mQutAUjoD0FdMcVQ4Gq31r35OVGzRjvLro,6760
364
- unique_toolkit-2026.20.0.dev32.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
365
- unique_toolkit-2026.20.0.dev32.dist-info/METADATA,sha256=ilqUn7ka6lHlJti-7TQPT23e_J-QeFgJHdo-iv0Bw40,7394
366
- unique_toolkit-2026.20.0.dev32.dist-info/RECORD,,
365
+ unique_toolkit-2026.20.0.dev33.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
366
+ unique_toolkit-2026.20.0.dev33.dist-info/METADATA,sha256=QtDb9GmNX7qCfGDxrwtn-R3ojAzUJGMoNhlyNPWxyNE,7394
367
+ unique_toolkit-2026.20.0.dev33.dist-info/RECORD,,