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/image-model-handle (#13)

Thomas Hebrard943e25dd213d
diff --git a/pipelex/cogt/imgg/imgg_engine_factory.py b/pipelex/cogt/imgg/imgg_engine_factory.py
index 4db3befcb..03f0eb7bc 100644
--- a/pipelex/cogt/imgg/imgg_engine_factory.py
+++ b/pipelex/cogt/imgg/imgg_engine_factory.py
@@ -13,9 +13,12 @@ class ImggEngineFactory:
cls,
imgg_handle: str,
) -> ImggEngine:
- parts = imgg_handle.split("/")
+ if "/" not in imgg_handle:
+ raise ImggEngineFactoryError(f"Invalid Imgg handle: {imgg_handle}. Expected format: platform/model_name")
+
+ parts = imgg_handle.split("/", 1)
if len(parts) != 2:
- raise ImggEngineFactoryError(f"Invalid Imgg handle: {imgg_handle}")
+ raise ImggEngineFactoryError(f"Invalid Imgg handle: {imgg_handle}. Expected format: platform/model_name")
try:
imgg_platform = ImggPlatform(parts[0])
diff --git a/uv.lock b/uv.lock
index d7328815d..ca7cedcff 100644
--- a/uv.lock
+++ b/uv.lock
@@ -834,7 +834,7 @@ wheels = [
[[package]]
name = "pipelex"
-version = "0.2.9"
+version = "0.2.8"
source = { editable = "." }
dependencies = [
{ name = "aiofiles" },