unique_toolkit 2026.26.0.dev8__py3-none-any.whl → 2026.26.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/app/unique_settings.py +35 -11
- unique_toolkit/language_model/infos.py +5 -1
- {unique_toolkit-2026.26.0.dev8.dist-info → unique_toolkit-2026.26.0.dev10.dist-info}/METADATA +2 -2
- {unique_toolkit-2026.26.0.dev8.dist-info → unique_toolkit-2026.26.0.dev10.dist-info}/RECORD +5 -5
- {unique_toolkit-2026.26.0.dev8.dist-info → unique_toolkit-2026.26.0.dev10.dist-info}/WHEEL +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
from enum import StrEnum
|
|
3
4
|
from logging import getLogger
|
|
4
5
|
from pathlib import Path
|
|
5
6
|
from typing import TYPE_CHECKING, Any, Self, TypeVar
|
|
@@ -308,6 +309,11 @@ class UniqueApp(BaseSettings):
|
|
|
308
309
|
|
|
309
310
|
# Api
|
|
310
311
|
# Settings only as only obtained from the environment.
|
|
312
|
+
class ApiType(StrEnum):
|
|
313
|
+
INTERNAL = "internal"
|
|
314
|
+
EXTERNAL = "external"
|
|
315
|
+
NEXT = "next"
|
|
316
|
+
LEGACY = "legacy"
|
|
311
317
|
|
|
312
318
|
|
|
313
319
|
@register_config()
|
|
@@ -323,6 +329,9 @@ class UniqueApi(BaseSettings):
|
|
|
323
329
|
"API_BASE",
|
|
324
330
|
),
|
|
325
331
|
)
|
|
332
|
+
|
|
333
|
+
api_type: ApiType = Field(default=ApiType.LEGACY)
|
|
334
|
+
|
|
326
335
|
version: str = Field(
|
|
327
336
|
default="2023-12-06",
|
|
328
337
|
validation_alias=AliasChoices(
|
|
@@ -353,24 +362,39 @@ class UniqueApi(BaseSettings):
|
|
|
353
362
|
)
|
|
354
363
|
)
|
|
355
364
|
|
|
356
|
-
|
|
357
|
-
|
|
365
|
+
@staticmethod
|
|
366
|
+
def _legacy_base_path(hostname: str | None) -> str:
|
|
358
367
|
base_path = "/public/chat"
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
"gateway.qa.unique" in parsed.hostname
|
|
362
|
-
or "gateway.unique" in parsed.hostname
|
|
368
|
+
if hostname and (
|
|
369
|
+
"gateway.qa.unique" in hostname or "gateway.unique" in hostname
|
|
363
370
|
):
|
|
364
371
|
base_path = "/public/chat-gen2"
|
|
365
372
|
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
or "
|
|
370
|
-
or
|
|
373
|
+
# Typical internal single tenants
|
|
374
|
+
if hostname and (
|
|
375
|
+
"localhost" in hostname
|
|
376
|
+
or "svc.cluster.local" in hostname
|
|
377
|
+
or ".svc." in hostname
|
|
378
|
+
or hostname.endswith(".svc")
|
|
371
379
|
):
|
|
372
380
|
base_path = "/public"
|
|
373
381
|
|
|
382
|
+
return base_path
|
|
383
|
+
|
|
384
|
+
def base_path(self) -> tuple[ParseResult, str]:
|
|
385
|
+
parsed = urlparse(self.base_url)
|
|
386
|
+
|
|
387
|
+
# Case of next qa only
|
|
388
|
+
match self.api_type:
|
|
389
|
+
case ApiType.NEXT:
|
|
390
|
+
base_path = "public/chat-gen2"
|
|
391
|
+
case ApiType.EXTERNAL:
|
|
392
|
+
base_path = "public/chat"
|
|
393
|
+
case ApiType.INTERNAL:
|
|
394
|
+
base_path = "public"
|
|
395
|
+
case ApiType.LEGACY:
|
|
396
|
+
base_path = self._legacy_base_path(parsed.hostname)
|
|
397
|
+
|
|
374
398
|
return parsed, base_path
|
|
375
399
|
|
|
376
400
|
def sdk_url(self) -> str:
|
|
@@ -88,6 +88,7 @@ class LanguageModelName(StrEnum):
|
|
|
88
88
|
ANTHROPIC_CLAUDE_OPUS_4_5 = "litellm:anthropic-claude-opus-4-5"
|
|
89
89
|
ANTHROPIC_CLAUDE_OPUS_4_6 = "litellm:anthropic-claude-opus-4-6"
|
|
90
90
|
ANTHROPIC_CLAUDE_OPUS_4_7 = "litellm:anthropic-claude-opus-4-7"
|
|
91
|
+
ANTHROPIC_CLAUDE_OPUS_4_8 = "litellm:anthropic-claude-opus-4-8"
|
|
91
92
|
GEMINI_2_0_FLASH = "litellm:gemini-2-0-flash"
|
|
92
93
|
GEMINI_2_5_FLASH = "litellm:gemini-2-5-flash"
|
|
93
94
|
GEMINI_2_5_FLASH_LITE = "litellm:gemini-2-5-flash-lite"
|
|
@@ -1700,7 +1701,10 @@ class LanguageModelInfo(BaseModel):
|
|
|
1700
1701
|
published_at=date(2026, 4, 16),
|
|
1701
1702
|
supported_reasoning_efforts=[],
|
|
1702
1703
|
)
|
|
1703
|
-
case
|
|
1704
|
+
case (
|
|
1705
|
+
LanguageModelName.ANTHROPIC_CLAUDE_OPUS_4_8
|
|
1706
|
+
| LanguageModelName.VERTEX_CLAUDE_OPUS_4_8
|
|
1707
|
+
):
|
|
1704
1708
|
return cls(
|
|
1705
1709
|
name=model_name,
|
|
1706
1710
|
capabilities=[
|
{unique_toolkit-2026.26.0.dev8.dist-info → unique_toolkit-2026.26.0.dev10.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: unique-toolkit
|
|
3
|
-
Version: 2026.26.0.
|
|
3
|
+
Version: 2026.26.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>
|
|
@@ -16,7 +16,7 @@ Requires-Dist: sseclient>=0.0.27,<0.0.28
|
|
|
16
16
|
Requires-Dist: openai>=1.105.0,<3
|
|
17
17
|
Requires-Dist: platformdirs>=4.0.0,<5
|
|
18
18
|
Requires-Dist: pillow>=12.1.1
|
|
19
|
-
Requires-Dist: unique-sdk>=2026.26.0.
|
|
19
|
+
Requires-Dist: unique-sdk>=2026.26.0.dev12,<2026.26.0rc0
|
|
20
20
|
Requires-Dist: jambo>=0.1.2,<0.2
|
|
21
21
|
Requires-Dist: jinja2>=3.1.6,<4
|
|
22
22
|
Requires-Dist: docxtpl>=0.20.1,<0.21
|
|
@@ -234,7 +234,7 @@ unique_toolkit/app/init_sdk.py,sha256=5_oDoETr6akwYyBCb0ivTdMNu3SVgPSkrXcDS6ELyY
|
|
|
234
234
|
unique_toolkit/app/performance/async_tasks.py,sha256=8Xv5kEmmFDJO7YyyBxv4e7bcNgq-3z_E2_4z1Yn9EqU,1970
|
|
235
235
|
unique_toolkit/app/performance/async_wrapper.py,sha256=yVVcRDkcdyfjsxro-N29SBvi-7773wnfDplef6-y8xw,1077
|
|
236
236
|
unique_toolkit/app/schemas.py,sha256=f5h9BqCuqHvrXUAB7tjrx0PSLmuJJKlZ89othqOsuSY,14762
|
|
237
|
-
unique_toolkit/app/unique_settings.py,sha256=
|
|
237
|
+
unique_toolkit/app/unique_settings.py,sha256=XrRcKobm0DHFIFJvScEeRVBDmRotBZTz9qctg34FbY8,23364
|
|
238
238
|
unique_toolkit/app/verification.py,sha256=GxFFwcJMy25fCA_Xe89wKW7bgqOu8PAs5y8QpHF0GSc,3861
|
|
239
239
|
unique_toolkit/app/webhook.py,sha256=evpxLDnvz7P3D7-TV1XBkl8WcoldXpjOkw3tvFRxHr0,2368
|
|
240
240
|
unique_toolkit/chat/__init__.py,sha256=N9RubtxWN7UF0DlxP7YgeNTgjjk6p7AwkbGaVvuZCv0,938
|
|
@@ -374,7 +374,7 @@ unique_toolkit/language_model/builder.py,sha256=KwBzsD6-fvQnB4p2I7M-5Tk6j4tmQ973
|
|
|
374
374
|
unique_toolkit/language_model/constants.py,sha256=B-topqW0r83dkC_25DeQfnPk3n53qzIHUCBS7YJ0-1U,119
|
|
375
375
|
unique_toolkit/language_model/default_language_model.py,sha256=mcyuFs_V6tp52C8xJSHiEHO4kFGj6xed1gvozvCRD7k,1181
|
|
376
376
|
unique_toolkit/language_model/functions.py,sha256=iTxCpcavUp1kAitJi16SIL33Y442aWKWH4W2qPpLfts,23054
|
|
377
|
-
unique_toolkit/language_model/infos.py,sha256=
|
|
377
|
+
unique_toolkit/language_model/infos.py,sha256=V3gKj4DyZwapbLAzDBPjw2D8LlWY9UaSAPIYrYpkAYk,130125
|
|
378
378
|
unique_toolkit/language_model/prompt.py,sha256=JSawaLjQg3VR-E2fK8engFyJnNdk21zaO8pPIodzN4Q,3991
|
|
379
379
|
unique_toolkit/language_model/reference.py,sha256=T3wr2jP_uRg5wKVIbKqLbxJlcgxfbZQGq3XdjbQ2kSo,6984
|
|
380
380
|
unique_toolkit/language_model/schemas.py,sha256=JZbIT3w1cj5fKrYaQ55X7sjXmCo6i_GqgJ198V3RXSg,29474
|
|
@@ -399,6 +399,6 @@ unique_toolkit/short_term_memory/service.py,sha256=Qo-c9yxzC1ZEEHJyIG_vnRs_ef0SK
|
|
|
399
399
|
unique_toolkit/smart_rules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
400
400
|
unique_toolkit/smart_rules/compile.py,sha256=vRe0aMJWuVIK-VsqomgxQImzke7MDmwgSxxJfYCa7zw,1386
|
|
401
401
|
unique_toolkit/test_utilities/events.py,sha256=FLrhMh0A_mQutAUjoD0FdMcVQ4Gq31r35OVGzRjvLro,6760
|
|
402
|
-
unique_toolkit-2026.26.0.
|
|
403
|
-
unique_toolkit-2026.26.0.
|
|
404
|
-
unique_toolkit-2026.26.0.
|
|
402
|
+
unique_toolkit-2026.26.0.dev10.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
|
|
403
|
+
unique_toolkit-2026.26.0.dev10.dist-info/METADATA,sha256=CVZCkcBgE9h3sf9dyxIX6NjYXjG1V_pu2qn3PWpsMsU,7428
|
|
404
|
+
unique_toolkit-2026.26.0.dev10.dist-info/RECORD,,
|
|
File without changes
|