unique_toolkit 2026.22.0.dev8__py3-none-any.whl → 2026.22.0.dev9__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.
@@ -46,6 +46,13 @@ class OpenAIBuiltInTool(ABC, Generic[ToolType]):
46
46
  def display_name(self) -> str:
47
47
  raise NotImplementedError()
48
48
 
49
+ def is_capability(self) -> bool:
50
+ """Return True if this tool is a capability that must remain in the
51
+ active tool set regardless of ``tool_choices`` filtering.
52
+ Default: False.
53
+ """
54
+ return False
55
+
49
56
  def get_required_include_params(self) -> list[ResponseIncludable]:
50
57
  """Return Responses API `include` values required by this tool.
51
58
 
@@ -302,6 +302,10 @@ class OpenAICodeInterpreterTool(OpenAIBuiltInTool[CodeInterpreter]):
302
302
  def is_exclusive(self) -> bool:
303
303
  return self._is_exclusive
304
304
 
305
+ @override
306
+ def is_capability(self) -> bool:
307
+ return True
308
+
305
309
  @classmethod
306
310
  async def build_tool(
307
311
  cls,
@@ -117,6 +117,16 @@ class Tool(ABC, Generic[ConfigType]):
117
117
  """
118
118
  return ""
119
119
 
120
+ def is_capability(self) -> bool:
121
+ """Return True if this tool is a capability that must remain in the
122
+ active tool set regardless of ``tool_choices`` filtering.
123
+
124
+ Capability tools are always kept in ``_tools`` when enabled, even when
125
+ another tool is force-selected via ``tool_choices`` or an exclusive tool
126
+ wins the selection. Default: False.
127
+ """
128
+ return False
129
+
120
130
  @deprecated(
121
131
  "Do not use. The tool should not determine how"
122
132
  "it is checked. This should be defined by the user"
@@ -24,7 +24,6 @@ from unique_toolkit.agentic.tools.factory import ToolFactory
24
24
  from unique_toolkit.agentic.tools.mcp.manager import MCPManager
25
25
  from unique_toolkit.agentic.tools.names import (
26
26
  INTERNAL_SEARCH_TOOL_NAME,
27
- SKILL_TOOL_NAME,
28
27
  UPLOADED_SEARCH_TOOL_NAME,
29
28
  )
30
29
  from unique_toolkit.agentic.tools.openai_builtin.base import (
@@ -162,11 +161,6 @@ class _ToolManager(Generic[_ApiMode]):
162
161
  continue
163
162
  # if tool choices are given, only include those tools
164
163
  if len(self._tool_choices) > 0 and t.name not in self._tool_choices:
165
- if (
166
- t.name == OpenAIBuiltInToolName.CODE_INTERPRETER
167
- or t.name == SKILL_TOOL_NAME
168
- ):
169
- self._tools.append(t)
170
164
  continue
171
165
  # is the tool exclusive and has been choosen by the user?
172
166
  if t.is_exclusive() and len(tool_choices) > 0 and t.name in tool_choices:
@@ -181,6 +175,18 @@ class _ToolManager(Generic[_ApiMode]):
181
175
 
182
176
  self._tools.append(t)
183
177
 
178
+ # Capability tools bypass tool_choices filtering — they are always
179
+ # included when enabled, regardless of what was force-selected.
180
+ active_names = {t.name for t in self._tools}
181
+ for t in self.available_tools:
182
+ if (
183
+ t.is_enabled()
184
+ and t.name not in self._disabled_tools
185
+ and t.is_capability()
186
+ and t.name not in active_names
187
+ ):
188
+ self._tools.append(t)
189
+
184
190
  def _restore_uploaded_search_for_internal_search_if_available(
185
191
  self,
186
192
  exclusive_tool: Tool[Any] | OpenAIBuiltInTool[Any],
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: unique-toolkit
3
- Version: 2026.22.0.dev8
3
+ Version: 2026.22.0.dev9
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>
@@ -199,7 +199,7 @@ unique_toolkit/agentic/tools/mcp/models.py,sha256=DaBVzwJ4dqtgzm8Mv0-NOGBU04zyVe
199
199
  unique_toolkit/agentic/tools/mcp/tool_wrapper.py,sha256=X2-UY-hQ4wguPOcf0TD4YoSKtc1vwNmGFY1rkDhARBI,15228
200
200
  unique_toolkit/agentic/tools/names.py,sha256=MDF0ONLrxeC-iz--EtyrHAox_RN6zasxo5MSbXQYGyw,412
201
201
  unique_toolkit/agentic/tools/openai_builtin/__init__.py,sha256=Q6d9mhsLRVF3erT2yMxLld62D3FTZ8nbovI4vLv4Nso,701
202
- unique_toolkit/agentic/tools/openai_builtin/base.py,sha256=D9bcOaedHQhXOJZACRkDWJte4kY8QXEnsL-LccmJLB4,1621
202
+ unique_toolkit/agentic/tools/openai_builtin/base.py,sha256=Ob5n1S6HduFbI5RsjIklasRjoKsgCwh840KAb6p2IaI,1858
203
203
  unique_toolkit/agentic/tools/openai_builtin/code_interpreter/__init__.py,sha256=PIt8wxfSeNYqExWpvrjZxD5sntd5Wv8bXKfoeCB4XWs,764
204
204
  unique_toolkit/agentic/tools/openai_builtin/code_interpreter/config.py,sha256=zH5ZQSQrCwTRIAQFFx7fCRw65e2xMdMP-vG3ZFZsC7Y,18820
205
205
  unique_toolkit/agentic/tools/openai_builtin/code_interpreter/postprocessors/__init__.py,sha256=ZSNvtRDSRipcfJg9gEsXm9DZDU7ODsAcko9vEmKevmI,584
@@ -207,13 +207,13 @@ unique_toolkit/agentic/tools/openai_builtin/code_interpreter/postprocessors/arti
207
207
  unique_toolkit/agentic/tools/openai_builtin/code_interpreter/postprocessors/code_display.py,sha256=Q4crOkYG-C_uTSc7rW14cP1H4IWxsKpfuftafDHbjEo,2897
208
208
  unique_toolkit/agentic/tools/openai_builtin/code_interpreter/postprocessors/generated_files.py,sha256=2bcRHoW-FwC8lniGFVIAXwUBK7NoSAmjfqCmJEvATz4,58941
209
209
  unique_toolkit/agentic/tools/openai_builtin/code_interpreter/schemas.py,sha256=W7egCmYrPrzic0aXsu9wY5fvQ8y_cl4Tzq_cjVs0mZs,542
210
- unique_toolkit/agentic/tools/openai_builtin/code_interpreter/service.py,sha256=BnwTO2pJTYrhsp269sUkd18p3NVl1TCzfhlYCkhbUwI,14088
210
+ unique_toolkit/agentic/tools/openai_builtin/code_interpreter/service.py,sha256=vfu9Z3pNv-jvSz1vP7JzzWzeLrL3l1x5swWMIGRSge4,14160
211
211
  unique_toolkit/agentic/tools/openai_builtin/manager.py,sha256=CkfMRsjrRDv_X-zfJHZnxxOdpCK1qzf6RGGxKtUHp9k,3519
212
212
  unique_toolkit/agentic/tools/schemas.py,sha256=4BTJ0q7fiAVQ2Uy9kVJnS0rcKeKKaYTkOFq8XGZwMJ0,5291
213
213
  unique_toolkit/agentic/tools/test/test_mcp_manager.py,sha256=uWrTmnenQ70s5hrTfMYVah2vDT-jZq4nQmvhutypEK8,19195
214
214
  unique_toolkit/agentic/tools/test/test_tool_progress_reporter.py,sha256=XHNezB8itj9KzpQgD0cwRtp2AgRUfUkQsHc3bTyPj6c,15801
215
- unique_toolkit/agentic/tools/tool.py,sha256=hVJ7aaasz_tghyCJmiDLmbOIrweW2B7oBHJmBuueSNQ,8758
216
- unique_toolkit/agentic/tools/tool_manager.py,sha256=fWS7vnjc9CZm8kvV_Vy8TTN87TVqjbpuAm_5vMIH7OE,21287
215
+ unique_toolkit/agentic/tools/tool.py,sha256=l92-yE8zgwYoaZGm3VmgKCw6CfyFeMiiWxPHqgRjNB4,9176
216
+ unique_toolkit/agentic/tools/tool_manager.py,sha256=wa56ILltD3uq-O8B6NhqU92w3i2Bq-J0Ir0HCZui7sA,21549
217
217
  unique_toolkit/agentic/tools/tool_progress_reporter.py,sha256=GaR0oqDUJZvBB9WCUVYYh0Zvs6U-LMygJCCrqPlitgA,10296
218
218
  unique_toolkit/agentic/tools/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
219
219
  unique_toolkit/agentic/tools/utils/source_handling/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -391,6 +391,6 @@ unique_toolkit/short_term_memory/service.py,sha256=Ncw0_0CNM6kmzJSLVJGG5GcKpBduI
391
391
  unique_toolkit/smart_rules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
392
392
  unique_toolkit/smart_rules/compile.py,sha256=Ozhh70qCn2yOzRWr9d8WmJeTo7AQurwd3tStgBMPFLA,1246
393
393
  unique_toolkit/test_utilities/events.py,sha256=FLrhMh0A_mQutAUjoD0FdMcVQ4Gq31r35OVGzRjvLro,6760
394
- unique_toolkit-2026.22.0.dev8.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
395
- unique_toolkit-2026.22.0.dev8.dist-info/METADATA,sha256=hGPVGC6UppTD5ZyJoEUEoZee0BhV8w1Gjq-96eRCMvc,7392
396
- unique_toolkit-2026.22.0.dev8.dist-info/RECORD,,
394
+ unique_toolkit-2026.22.0.dev9.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
395
+ unique_toolkit-2026.22.0.dev9.dist-info/METADATA,sha256=ShiSlMfxe7Ibor4WRI3ntzKdKhbF3gPbIoAQN7pMrhI,7392
396
+ unique_toolkit-2026.22.0.dev9.dist-info/RECORD,,