unique_toolkit 2026.22.0.dev8__py3-none-any.whl → 2026.22.0.dev10__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.
- unique_toolkit/_common/utils/files.py +3 -2
- unique_toolkit/agentic/tools/openai_builtin/base.py +7 -0
- unique_toolkit/agentic/tools/openai_builtin/code_interpreter/service.py +4 -0
- unique_toolkit/agentic/tools/tool.py +10 -0
- unique_toolkit/agentic/tools/tool_manager.py +12 -6
- {unique_toolkit-2026.22.0.dev8.dist-info → unique_toolkit-2026.22.0.dev10.dist-info}/METADATA +1 -1
- {unique_toolkit-2026.22.0.dev8.dist-info → unique_toolkit-2026.22.0.dev10.dist-info}/RECORD +8 -8
- {unique_toolkit-2026.22.0.dev8.dist-info → unique_toolkit-2026.22.0.dev10.dist-info}/WHEEL +0 -0
|
@@ -8,6 +8,7 @@ from pathlib import Path
|
|
|
8
8
|
class FileMimeType(StrEnum):
|
|
9
9
|
PDF = "application/pdf"
|
|
10
10
|
DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
|
|
11
|
+
DOTX = "application/vnd.openxmlformats-officedocument.wordprocessingml.template"
|
|
11
12
|
DOC = "application/msword"
|
|
12
13
|
# TODO: clean up duplicates and make the monolith compatible with this.
|
|
13
14
|
XLSX = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
@@ -41,7 +42,7 @@ class FileMimeType(StrEnum):
|
|
|
41
42
|
@property
|
|
42
43
|
def is_docx(self) -> bool:
|
|
43
44
|
cls = self.__class__
|
|
44
|
-
return self in {cls.DOCX, cls.DOC}
|
|
45
|
+
return self in {cls.DOCX, cls.DOTX, cls.DOC}
|
|
45
46
|
|
|
46
47
|
@property
|
|
47
48
|
def is_pdf(self) -> bool:
|
|
@@ -98,7 +99,7 @@ class FileMimeType(StrEnum):
|
|
|
98
99
|
|
|
99
100
|
def get_common_name(extension: FileMimeType) -> str:
|
|
100
101
|
match extension:
|
|
101
|
-
case FileMimeType.DOCX | FileMimeType.DOC:
|
|
102
|
+
case FileMimeType.DOCX | FileMimeType.DOTX | FileMimeType.DOC:
|
|
102
103
|
return "docx"
|
|
103
104
|
case (
|
|
104
105
|
FileMimeType.XLSX
|
|
@@ -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],
|
{unique_toolkit-2026.22.0.dev8.dist-info → unique_toolkit-2026.22.0.dev10.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: unique-toolkit
|
|
3
|
-
Version: 2026.22.0.
|
|
3
|
+
Version: 2026.22.0.dev10
|
|
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>
|
|
@@ -71,7 +71,7 @@ unique_toolkit/_common/token/token_counting.py,sha256=OQw_PdwNd1OwqJZ85j3Y9ELr3n
|
|
|
71
71
|
unique_toolkit/_common/token/tokenizers/deepseek/tokenizer.json,sha256=YhrC4y0NumWEBEEjGIGKqozozaSS5ZgwEJ2NprUX-0E,7847652
|
|
72
72
|
unique_toolkit/_common/token/tokenizers/qwen/tokenizer.json,sha256=wDghF-oynN8JcEETL21zWSS2l5JNb2_DlFcT6WzodTk,7031645
|
|
73
73
|
unique_toolkit/_common/utils/__init__.py,sha256=qHrEy-3zkbFPdGFriRscPbGKuQfOuPi3O7tE5Zw5VHY,37
|
|
74
|
-
unique_toolkit/_common/utils/files.py,sha256=
|
|
74
|
+
unique_toolkit/_common/utils/files.py,sha256=8gK4bIfRJnzBLsGOVqB3xXnKH9QKJE2onAkObs7bnVw,4928
|
|
75
75
|
unique_toolkit/_common/utils/image/encode.py,sha256=IJhtTcIT_azhiDsPp15oYs2LPze2l-sGlZrJASHrDVI,658
|
|
76
76
|
unique_toolkit/_common/utils/jinja/helpers.py,sha256=UQWj0hFMtnuUFYDJ8NKbEblvYE8DrWX1o7fKQU3H9IQ,262
|
|
77
77
|
unique_toolkit/_common/utils/jinja/render.py,sha256=J5UBIWoljl-Us7SjZIap9wewcLTzpXjQpOgas_YTf3Y,482
|
|
@@ -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=
|
|
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=
|
|
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=
|
|
216
|
-
unique_toolkit/agentic/tools/tool_manager.py,sha256=
|
|
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.
|
|
395
|
-
unique_toolkit-2026.22.0.
|
|
396
|
-
unique_toolkit-2026.22.0.
|
|
394
|
+
unique_toolkit-2026.22.0.dev10.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
|
|
395
|
+
unique_toolkit-2026.22.0.dev10.dist-info/METADATA,sha256=-KSmz24EthKwajFWdZZkfC681UMqZIrFRbx3lmOnU-8,7393
|
|
396
|
+
unique_toolkit-2026.22.0.dev10.dist-info/RECORD,,
|
|
File without changes
|