unique_orchestrator 2026.48.0.dev12__tar.gz → 2026.48.0.dev14__tar.gz

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.
Files changed (35) hide show
  1. unique_orchestrator-2026.48.0.dev14/PKG-INFO +26 -0
  2. {unique_orchestrator-2026.48.0.dev12 → unique_orchestrator-2026.48.0.dev14}/pyproject.toml +10 -10
  3. {unique_orchestrator-2026.48.0.dev12 → unique_orchestrator-2026.48.0.dev14}/unique_orchestrator/config.py +39 -0
  4. {unique_orchestrator-2026.48.0.dev12 → unique_orchestrator-2026.48.0.dev14}/unique_orchestrator/tests/test_config_services_validators.py +22 -0
  5. {unique_orchestrator-2026.48.0.dev12 → unique_orchestrator-2026.48.0.dev14}/unique_orchestrator/unique_ai_builder.py +42 -2
  6. unique_orchestrator-2026.48.0.dev12/PKG-INFO +0 -26
  7. {unique_orchestrator-2026.48.0.dev12 → unique_orchestrator-2026.48.0.dev14}/README.md +0 -0
  8. {unique_orchestrator-2026.48.0.dev12 → unique_orchestrator-2026.48.0.dev14}/unique_orchestrator/__init__.py +0 -0
  9. {unique_orchestrator-2026.48.0.dev12 → unique_orchestrator-2026.48.0.dev14}/unique_orchestrator/_builders/__init__.py +0 -0
  10. {unique_orchestrator-2026.48.0.dev12 → unique_orchestrator-2026.48.0.dev14}/unique_orchestrator/_builders/history_manager.py +0 -0
  11. {unique_orchestrator-2026.48.0.dev12 → unique_orchestrator-2026.48.0.dev14}/unique_orchestrator/_builders/inject_tool_reminders.py +0 -0
  12. {unique_orchestrator-2026.48.0.dev12 → unique_orchestrator-2026.48.0.dev14}/unique_orchestrator/_builders/loop_iteration_runner.py +0 -0
  13. {unique_orchestrator-2026.48.0.dev12 → unique_orchestrator-2026.48.0.dev14}/unique_orchestrator/_builders/open_file_setup.py +0 -0
  14. {unique_orchestrator-2026.48.0.dev12 → unique_orchestrator-2026.48.0.dev14}/unique_orchestrator/_builders/skill_setup.py +0 -0
  15. {unique_orchestrator-2026.48.0.dev12 → unique_orchestrator-2026.48.0.dev14}/unique_orchestrator/prompts/generic_reference_prompt.jinja2 +0 -0
  16. {unique_orchestrator-2026.48.0.dev12 → unique_orchestrator-2026.48.0.dev14}/unique_orchestrator/prompts/system_prompt.jinja2 +0 -0
  17. {unique_orchestrator-2026.48.0.dev12 → unique_orchestrator-2026.48.0.dev14}/unique_orchestrator/prompts/user_message_prompt.jinja2 +0 -0
  18. {unique_orchestrator-2026.48.0.dev12 → unique_orchestrator-2026.48.0.dev14}/unique_orchestrator/settings.py +0 -0
  19. {unique_orchestrator-2026.48.0.dev12 → unique_orchestrator-2026.48.0.dev14}/unique_orchestrator/tests/test_agent_config_rjsf_ui_schema.py +0 -0
  20. {unique_orchestrator-2026.48.0.dev12 → unique_orchestrator-2026.48.0.dev14}/unique_orchestrator/tests/test_build_loop_iteration_runner.py +0 -0
  21. {unique_orchestrator-2026.48.0.dev12 → unique_orchestrator-2026.48.0.dev14}/unique_orchestrator/tests/test_qwen_max_loop_iterations.py +0 -0
  22. {unique_orchestrator-2026.48.0.dev12 → unique_orchestrator-2026.48.0.dev14}/unique_orchestrator/tests/test_register_code_interpreter_postprocessors.py +0 -0
  23. {unique_orchestrator-2026.48.0.dev12 → unique_orchestrator-2026.48.0.dev14}/unique_orchestrator/tests/test_unique_ai_async_modify.py +0 -0
  24. {unique_orchestrator-2026.48.0.dev12 → unique_orchestrator-2026.48.0.dev14}/unique_orchestrator/tests/test_unique_ai_execution_timing.py +0 -0
  25. {unique_orchestrator-2026.48.0.dev12 → unique_orchestrator-2026.48.0.dev14}/unique_orchestrator/tests/test_unique_ai_get_filtered_user_metadata.py +0 -0
  26. {unique_orchestrator-2026.48.0.dev12 → unique_orchestrator-2026.48.0.dev14}/unique_orchestrator/tests/test_unique_ai_log_tool_calls.py +0 -0
  27. {unique_orchestrator-2026.48.0.dev12 → unique_orchestrator-2026.48.0.dev14}/unique_orchestrator/tests/test_unique_ai_loop_debug_params.py +0 -0
  28. {unique_orchestrator-2026.48.0.dev12 → unique_orchestrator-2026.48.0.dev14}/unique_orchestrator/tests/test_unique_ai_persist_tool_calls.py +0 -0
  29. {unique_orchestrator-2026.48.0.dev12 → unique_orchestrator-2026.48.0.dev14}/unique_orchestrator/tests/test_unique_ai_plan_or_execute_include.py +0 -0
  30. {unique_orchestrator-2026.48.0.dev12 → unique_orchestrator-2026.48.0.dev14}/unique_orchestrator/tests/test_unique_ai_reference_order.py +0 -0
  31. {unique_orchestrator-2026.48.0.dev12 → unique_orchestrator-2026.48.0.dev14}/unique_orchestrator/tests/test_unique_ai_render_system_prompt_user_instructions.py +0 -0
  32. {unique_orchestrator-2026.48.0.dev12 → unique_orchestrator-2026.48.0.dev14}/unique_orchestrator/tests/test_unique_ai_token_usage.py +0 -0
  33. {unique_orchestrator-2026.48.0.dev12 → unique_orchestrator-2026.48.0.dev14}/unique_orchestrator/tests/test_utils_resolve_other_options.py +0 -0
  34. {unique_orchestrator-2026.48.0.dev12 → unique_orchestrator-2026.48.0.dev14}/unique_orchestrator/unique_ai.py +0 -0
  35. {unique_orchestrator-2026.48.0.dev12 → unique_orchestrator-2026.48.0.dev14}/unique_orchestrator/utils.py +0 -0
@@ -0,0 +1,26 @@
1
+ Metadata-Version: 2.3
2
+ Name: unique-orchestrator
3
+ Version: 2026.48.0.dev14
4
+ Summary:
5
+ Author: Andreas Hauri
6
+ Author-email: Andreas Hauri <andreas.hauri@unique.ai>
7
+ License: Proprietary
8
+ Requires-Dist: pydantic>=2.8.2,<3
9
+ Requires-Dist: pydantic-settings>=2.10.1,<3
10
+ Requires-Dist: typing-extensions>=4.9.0,<5
11
+ Requires-Dist: unique-toolkit>=2026.48.0.dev20,<2026.48.0rc0
12
+ Requires-Dist: unique-stock-ticker>=2026.48.0.dev11,<2026.48.0rc0
13
+ Requires-Dist: unique-follow-up-questions>=2026.48.0.dev12,<2026.48.0rc0
14
+ Requires-Dist: unique-internal-search>=2026.48.0.dev12,<2026.48.0rc0
15
+ Requires-Dist: unique-deep-research>=2026.48.0.dev12,<2026.48.0rc0
16
+ Requires-Dist: unique-web-search>=2026.48.0.dev13,<2026.48.0rc0
17
+ Requires-Dist: unique-swot>=2026.48.0.dev11,<2026.48.0rc0
18
+ Requires-Dist: unique-skill-tool>=2026.48.0.dev11,<2026.48.0rc0
19
+ Requires-Dist: unique-user-memory>=2026.48.0.dev11,<2026.48.0rc0
20
+ Requires-Dist: openai>=1.109.1,<3
21
+ Requires-Python: >=3.12, <4
22
+ Description-Content-Type: text/markdown
23
+
24
+ # Unique Orchestrator
25
+
26
+ Unique AI orchestrator agent to struct and direct subagents, tools and services
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "unique_orchestrator"
3
- version = "2026.48.0.dev12"
3
+ version = "2026.48.0.dev14"
4
4
  description = ""
5
5
  readme = "README.md"
6
6
  license = { text = "Proprietary" }
@@ -12,15 +12,15 @@ dependencies = [
12
12
  "pydantic>=2.8.2,<3",
13
13
  "pydantic-settings>=2.10.1,<3",
14
14
  "typing-extensions>=4.9.0,<5",
15
- "unique-toolkit>=2026.48.0.dev17,<2026.48.0rc0",
16
- "unique-stock-ticker>=2026.48.0.dev10,<2026.48.0rc0",
17
- "unique-follow-up-questions>=2026.48.0.dev11,<2026.48.0rc0",
18
- "unique-internal-search>=2026.48.0.dev10,<2026.48.0rc0",
19
- "unique-deep-research>=2026.48.0.dev11,<2026.48.0rc0",
20
- "unique-web-search>=2026.48.0.dev10,<2026.48.0rc0",
21
- "unique-swot>=2026.48.0.dev10,<2026.48.0rc0",
22
- "unique-skill-tool>=2026.48.0.dev10,<2026.48.0rc0",
23
- "unique-user-memory>=2026.48.0.dev10,<2026.48.0rc0",
15
+ "unique-toolkit>=2026.48.0.dev20,<2026.48.0rc0",
16
+ "unique-stock-ticker>=2026.48.0.dev11,<2026.48.0rc0",
17
+ "unique-follow-up-questions>=2026.48.0.dev12,<2026.48.0rc0",
18
+ "unique-internal-search>=2026.48.0.dev12,<2026.48.0rc0",
19
+ "unique-deep-research>=2026.48.0.dev12,<2026.48.0rc0",
20
+ "unique-web-search>=2026.48.0.dev13,<2026.48.0rc0",
21
+ "unique-swot>=2026.48.0.dev11,<2026.48.0rc0",
22
+ "unique-skill-tool>=2026.48.0.dev11,<2026.48.0rc0",
23
+ "unique-user-memory>=2026.48.0.dev11,<2026.48.0rc0",
24
24
  "openai>=1.109.1,<3",
25
25
  ]
26
26
 
@@ -280,8 +280,47 @@ class LoopConfiguration(BaseToolConfig):
280
280
  model_specific: ModelSpecificConfig = ModelSpecificConfig()
281
281
 
282
282
 
283
+ class ContradictionCheckConfig(BaseToolConfig):
284
+ """Space setting for Conduct's contradiction check."""
285
+
286
+ enabled: bool = Field(
287
+ default=True,
288
+ description=(
289
+ "Run the check on answers from this space. By default it uses the "
290
+ "space model."
291
+ ),
292
+ )
293
+ language_model: Annotated[
294
+ LanguageModelName | None,
295
+ RJSFMetaTag(
296
+ {
297
+ "ui:field": "nullableActive",
298
+ "ui:fieldReplacesAnyOrOneOf": True,
299
+ "ui:options": {
300
+ "activeLabel": "Use a different model",
301
+ "activeValue": LanguageModelName.AZURE_GPT_51_2025_1113.value,
302
+ },
303
+ }
304
+ ),
305
+ ] = Field(
306
+ default=None,
307
+ title="Model",
308
+ description=(
309
+ "The model that judges the answer. When unset, the space's "
310
+ "chat model is used."
311
+ ),
312
+ )
313
+
314
+
283
315
  class EvaluationConfig(BaseToolConfig):
284
316
  hallucination_config: HallucinationConfig = HallucinationConfig()
317
+ contradiction_check_config: ContradictionCheckConfig = Field(
318
+ default_factory=ContradictionCheckConfig,
319
+ title="Hallucination check",
320
+ description=(
321
+ "Checks cited search answers for statements that contradict a source."
322
+ ),
323
+ )
285
324
 
286
325
 
287
326
  # ------------------------------------------------------------
@@ -165,6 +165,28 @@ class TestUniqueAIServicesEvaluationConfigValidator:
165
165
 
166
166
  assert isinstance(services.evaluation_config, EvaluationConfig)
167
167
 
168
+ def test_contradiction_check_defaults_on_without_its_own_model(self):
169
+ config = EvaluationConfig.model_validate({})
170
+
171
+ assert config.contradiction_check_config.enabled is True
172
+ assert config.contradiction_check_config.language_model is None
173
+
174
+ def test_contradiction_check_reads_the_space_form_names(self):
175
+ config = EvaluationConfig.model_validate(
176
+ {
177
+ "contradictionCheckConfig": {
178
+ "enabled": False,
179
+ "languageModel": LanguageModelName.AZURE_GPT_51_2025_1113,
180
+ }
181
+ }
182
+ )
183
+
184
+ assert config.contradiction_check_config.enabled is False
185
+ assert (
186
+ config.contradiction_check_config.language_model
187
+ == LanguageModelName.AZURE_GPT_51_2025_1113
188
+ )
189
+
168
190
 
169
191
  # ---------------------------------------------------------------------------
170
192
  # Helpers
@@ -1,3 +1,4 @@
1
+ from collections.abc import Callable, Sequence
1
2
  from logging import Logger
2
3
  from typing import Any, NamedTuple, cast
3
4
 
@@ -18,10 +19,14 @@ from unique_toolkit.agentic.chat_title import ChatTitleGenerator
18
19
  from unique_toolkit.agentic.debug_info_manager.debug_info_manager import (
19
20
  DebugInfoManager,
20
21
  )
21
- from unique_toolkit.agentic.evaluation.evaluation_manager import EvaluationManager
22
+ from unique_toolkit.agentic.evaluation.evaluation_manager import (
23
+ Evaluation,
24
+ EvaluationManager,
25
+ )
22
26
  from unique_toolkit.agentic.evaluation.hallucination.hallucination_evaluation import (
23
27
  HallucinationEvaluation,
24
28
  )
29
+ from unique_toolkit.agentic.evaluation.schemas import EvaluationMetricName
25
30
  from unique_toolkit.agentic.history_manager.history_manager import HistoryManager
26
31
  from unique_toolkit.agentic.history_manager.utils import (
27
32
  get_selected_uploaded_content_ids,
@@ -157,12 +162,30 @@ class _ChatServiceResponsesStreaming(ResponsesSupportCompleteWithReferences):
157
162
  )
158
163
 
159
164
 
165
+ class EvaluationBuildContext(NamedTuple):
166
+ """Turn components an evaluation factory may wire into its evaluation."""
167
+
168
+ chat_service: ChatService
169
+ reference_manager: ReferenceManager
170
+
171
+
172
+ EvaluationFactory = Callable[[EvaluationBuildContext], Evaluation]
173
+ """Builds one evaluation per turn.
174
+
175
+ The evaluation runs like the built-in ones: only on turns where a tool that ran
176
+ lists its name. One named ``EvaluationMetricName.HALLUCINATION`` replaces the
177
+ built-in hallucination check, which is then not created.
178
+ """
179
+
180
+
160
181
  async def build_unique_ai(
161
182
  event: ChatEvent,
162
183
  logger: Logger,
163
184
  config: UniqueAIConfig,
164
185
  debug_info_manager: DebugInfoManager,
165
186
  enable_chat_title_generation: bool = False,
187
+ *,
188
+ evaluation_factories: Sequence[EvaluationFactory] = (),
166
189
  ) -> UniqueAI:
167
190
  config = _apply_model_choice_override(event=event, logger=logger, config=config)
168
191
  _record_language_model_debug_info(
@@ -174,6 +197,7 @@ async def build_unique_ai(
174
197
  logger,
175
198
  config,
176
199
  enable_chat_title_generation=enable_chat_title_generation,
200
+ evaluation_factories=evaluation_factories,
177
201
  )
178
202
 
179
203
  if (
@@ -319,6 +343,7 @@ async def _build_common(
319
343
  config: UniqueAIConfig,
320
344
  *,
321
345
  enable_chat_title_generation: bool = False,
346
+ evaluation_factories: Sequence[EvaluationFactory] = (),
322
347
  ) -> _CommonComponents:
323
348
  chat_service = ChatService(event)
324
349
  message_step_logger = MessageStepLogger(chat_service)
@@ -362,8 +387,21 @@ async def _build_common(
362
387
 
363
388
  reference_manager = ReferenceManager()
364
389
 
390
+ evaluation_build_context = EvaluationBuildContext(
391
+ chat_service=chat_service,
392
+ reference_manager=reference_manager,
393
+ )
394
+ supplied_evaluations = [
395
+ build_evaluation(evaluation_build_context)
396
+ for build_evaluation in evaluation_factories
397
+ ]
398
+ supplied_names = {evaluation.get_name() for evaluation in supplied_evaluations}
399
+
365
400
  evaluation_manager = EvaluationManager(logger=logger, chat_service=chat_service)
366
- if config.agent.services.evaluation_config:
401
+ if (
402
+ config.agent.services.evaluation_config
403
+ and EvaluationMetricName.HALLUCINATION not in supplied_names
404
+ ):
367
405
  evaluation_manager.add_evaluation(
368
406
  HallucinationEvaluation(
369
407
  config.agent.services.evaluation_config.hallucination_config,
@@ -371,6 +409,8 @@ async def _build_common(
371
409
  reference_manager,
372
410
  )
373
411
  )
412
+ for evaluation in supplied_evaluations:
413
+ evaluation_manager.add_evaluation(evaluation)
374
414
 
375
415
  mcp_manager = MCPManager(
376
416
  mcp_servers=event.payload.mcp_servers,
@@ -1,26 +0,0 @@
1
- Metadata-Version: 2.3
2
- Name: unique-orchestrator
3
- Version: 2026.48.0.dev12
4
- Summary:
5
- Author: Andreas Hauri
6
- Author-email: Andreas Hauri <andreas.hauri@unique.ai>
7
- License: Proprietary
8
- Requires-Dist: pydantic>=2.8.2,<3
9
- Requires-Dist: pydantic-settings>=2.10.1,<3
10
- Requires-Dist: typing-extensions>=4.9.0,<5
11
- Requires-Dist: unique-toolkit>=2026.48.0.dev17,<2026.48.0rc0
12
- Requires-Dist: unique-stock-ticker>=2026.48.0.dev10,<2026.48.0rc0
13
- Requires-Dist: unique-follow-up-questions>=2026.48.0.dev11,<2026.48.0rc0
14
- Requires-Dist: unique-internal-search>=2026.48.0.dev10,<2026.48.0rc0
15
- Requires-Dist: unique-deep-research>=2026.48.0.dev11,<2026.48.0rc0
16
- Requires-Dist: unique-web-search>=2026.48.0.dev10,<2026.48.0rc0
17
- Requires-Dist: unique-swot>=2026.48.0.dev10,<2026.48.0rc0
18
- Requires-Dist: unique-skill-tool>=2026.48.0.dev10,<2026.48.0rc0
19
- Requires-Dist: unique-user-memory>=2026.48.0.dev10,<2026.48.0rc0
20
- Requires-Dist: openai>=1.109.1,<3
21
- Requires-Python: >=3.12, <4
22
- Description-Content-Type: text/markdown
23
-
24
- # Unique Orchestrator
25
-
26
- Unique AI orchestrator agent to struct and direct subagents, tools and services