Skip to content

Build AI methods with your coding agent, then run them anywhere: as an MCP for chatbots, as a webapp for people, or via API for your software.

Fix cubic review findings: talent resolution, library_dirs passthrough, dry-run status

Louis Choquel8c7e4b2b5b3b
diff --git a/pipelex/builder/operations/inputs_ops.py b/pipelex/builder/operations/inputs_ops.py
index 9e1bb2fcb..de7759260 100644
--- a/pipelex/builder/operations/inputs_ops.py
+++ b/pipelex/builder/operations/inputs_ops.py
@@ -44,7 +44,7 @@ async def build_inputs_for_pipe(
"""
if mthds_contents:
# validate_bundle opens a library, loads blueprints, and sets it as current
- validate_bundle_result = await validate_bundle(mthds_contents=mthds_contents)
+ validate_bundle_result = await validate_bundle(mthds_contents=mthds_contents, library_dirs=library_dirs)
blueprints = validate_bundle_result.blueprints
if not pipe_code:
# Find the first blueprint that declares a main_pipe, domain-qualified
diff --git a/pipelex/builder/operations/models_ops.py b/pipelex/builder/operations/models_ops.py
index 4c0ac17e2..1b2312d76 100644
--- a/pipelex/builder/operations/models_ops.py
+++ b/pipelex/builder/operations/models_ops.py
@@ -114,9 +114,12 @@ def _filter_talent_mappings_by_backend(
for talent_name, preset_name in mappings.items():
bare_name = _strip_sigil(preset_name)
setting = presets_dict.get(bare_name)
- if setting is None:
- continue
- spec = _resolve_preset_backend(model_deck, setting.model, model_type)
+ if setting is not None:
+ # Direct preset — resolve via its model handle
+ spec = _resolve_preset_backend(model_deck, setting.model, model_type)
+ else:
+ # May be an alias or waterfall reference — resolve via model_deck
+ spec = model_deck.get_optional_inference_model(model_handle=bare_name, model_type=model_type)
if spec is not None and spec.backend_name == backend:
filtered[talent_name] = preset_name
return filtered
diff --git a/pipelex/builder/operations/validate_ops.py b/pipelex/builder/operations/validate_ops.py
index 6b2324629..3db5873bc 100644
--- a/pipelex/builder/operations/validate_ops.py
+++ b/pipelex/builder/operations/validate_ops.py
@@ -147,11 +147,11 @@ async def validate_pipe(
library_manager.load_libraries(library_id=library_id, library_dirs=effective_dirs)
the_pipe = get_required_pipe(pipe_code=pipe_code)
- await dry_run_pipe(the_pipe, raise_on_failure=True)
+ dry_run_output = await dry_run_pipe(the_pipe, raise_on_failure=True)
return {
"success": True,
- "validated_pipes": [{"pipe_code": pipe_code, "status": "SUCCESS"}],
+ "validated_pipes": [{"pipe_code": pipe_code, "status": dry_run_output.status}],
"total_pipes": 1,
}
@@ -182,11 +182,11 @@ async def validate_pipe_in_bundle(
# Now get the specific pipe and dry-run only that one
the_pipe = get_required_pipe(pipe_code=pipe_code)
- await dry_run_pipe(the_pipe, raise_on_failure=True)
+ dry_run_output = await dry_run_pipe(the_pipe, raise_on_failure=True)
return {
"success": True,
"bundle_path": str(bundle_path),
- "validated_pipes": [{"pipe_code": pipe_code, "status": "SUCCESS"}],
+ "validated_pipes": [{"pipe_code": pipe_code, "status": dry_run_output.status}],
"total_pipes": 1,
}