Skip to content

Commit 18a7ecf

Browse files
authored
Merge pull request #449 from Pipelex/release/v0.15.4
### Added - **Enhanced `pipelex build` Command**: Now generates a self-contained directory (e.g., `results/pipeline_01/`) containing `bundle.plx`, `inputs.json`, `run_{pipe_code}.py`, `bundle_view.html`, and `bundle_view.svg`. New CLI options: `--output-name (-o)` for custom base name, `--output-dir` for custom directory, and `--no-extras` to generate only the `.plx` file. - **CLI Readiness Check**: Verifies that a virtual environment is active for development installations. - **Model Deck Presets**: Added `llm_for_creativity` and `cheap_llm_for_creativity` model waterfalls, plus `[cogt.model_deck_config]` section in `pipelex.toml` for configuring model fallback behavior. - WIP: **Groq Inference Backend Support**: Integrated full support for the Groq API with configuration file (`.pipelex/inference/backends/groq.toml`), model specifications, costs, capabilities, new model aliases (`base-groq`, `fast-groq`, `vision-groq`), and routing profile (`all_groq`). ### Changed - **CLI Output and Visualization**: Overhauled command-line output with rich, table-based layouts for pipeline components. Final output of `pipelex run` is now pretty-printed and adapts to content type. - **Documentation**: Updated "Get Started" and "Build Reliable AI Workflows" to reflect new directory-based build output and CLI options. - **Internal Code Refactoring**: Reorganized exception hierarchy into dedicated `exceptions.py` files per module, centralized validation logic into `validation.py` modules, added `ValueError` to blueprints, and removed unused exceptions for improved maintainability. - Updated pytest to `>=9.0.1` to support their new `pyproject.toml` config format. ### Fixed - Adjusted default temperature for `llm_for_testing_gen_object` preset from `0.5` to `0.1` for more deterministic structured data generation. - Corrected `LLM_FOR_VISUAL_DESIGN` skill in `pipe_llm_spec` to point to `cheap_llm_for_creativity` preset. - Standardized input variable names in `pipe_llm_vision.plx` from `imageA`/`imageB` to `image_a`/`image_b`. ### Removed - Deleted `pipelex/core/validation_errors.py` file as part of exception hierarchy refactoring.
2 parents e74f6f5 + 87b9c1c commit 18a7ecf

191 files changed

Lines changed: 4620 additions & 1860 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.badges/tests.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"schemaVersion": 1,
33
"label": "tests",
4-
"message": "1435",
4+
"message": "1526",
55
"color": "blue",
66
"cacheSeconds": 300
77
}

.pipelex/inference/backends.toml

Lines changed: 33 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ enabled = true
1616
endpoint = "https://inference.pipelex.com/v1"
1717
api_key = "${PIPELEX_INFERENCE_API_KEY}"
1818

19+
[anthropic]
20+
enabled = true
21+
api_key = "${ANTHROPIC_API_KEY}"
22+
claude_4_tokens_limit = 8192
23+
1924
[azure_openai]
2025
display_name = "Azure OpenAI"
2126
enabled = true
@@ -28,53 +33,54 @@ display_name = "Amazon Bedrock"
2833
enabled = true
2934
aws_region = "${AWS_REGION}"
3035

31-
[google]
32-
display_name = "Google AI"
36+
[blackboxai]
37+
display_name = "BlackBox AI"
3338
enabled = true
34-
api_key = "${GOOGLE_API_KEY}"
39+
endpoint = "https://api.blackbox.ai/v1"
40+
api_key = "${BLACKBOX_API_KEY}"
3541

36-
[vertexai]
37-
display_name = "Google Vertex AI"
42+
[fal]
43+
display_name = "FAL"
3844
enabled = true
39-
gcp_project_id = "${GCP_PROJECT_ID}"
40-
gcp_location = "${GCP_LOCATION}"
41-
gcp_credentials_file_path = "${GCP_CREDENTIALS_FILE_PATH}"
45+
api_key = "${FAL_API_KEY}"
4246

43-
[openai]
44-
display_name = "OpenAI"
47+
[google]
48+
display_name = "Google AI"
4549
enabled = true
46-
api_key = "${OPENAI_API_KEY}"
50+
api_key = "${GOOGLE_API_KEY}"
4751

48-
[anthropic]
52+
[groq]
53+
display_name = "Groq"
4954
enabled = true
50-
api_key = "${ANTHROPIC_API_KEY}"
51-
claude_4_tokens_limit = 8192
55+
endpoint = "https://api.groq.com/openai/v1"
56+
api_key = "${GROQ_API_KEY}"
5257

5358
[mistral]
5459
display_name = "Mistral AI"
5560
enabled = true
5661
api_key = "${MISTRAL_API_KEY}"
5762

58-
[xai]
59-
display_name = "xAI"
60-
enabled = true
61-
endpoint = "https://api.x.ai/v1"
62-
api_key = "${XAI_API_KEY}"
63-
6463
[ollama]
6564
enabled = true
6665
endpoint = "http://localhost:11434/v1"
6766

68-
[blackboxai]
69-
display_name = "BlackBox AI"
67+
[openai]
68+
display_name = "OpenAI"
7069
enabled = true
71-
endpoint = "https://api.blackbox.ai/v1"
72-
api_key = "${BLACKBOX_API_KEY}"
70+
api_key = "${OPENAI_API_KEY}"
7371

74-
[fal]
75-
display_name = "FAL"
72+
[vertexai]
73+
display_name = "Google Vertex AI"
7674
enabled = true
77-
api_key = "${FAL_API_KEY}"
75+
gcp_project_id = "${GCP_PROJECT_ID}"
76+
gcp_location = "${GCP_LOCATION}"
77+
gcp_credentials_file_path = "${GCP_CREDENTIALS_FILE_PATH}"
78+
79+
[xai]
80+
display_name = "xAI"
81+
enabled = true
82+
endpoint = "https://api.x.ai/v1"
83+
api_key = "${XAI_API_KEY}"
7884

7985
[internal] # software-only backend, runs internally, without AI
8086
enabled = true
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
################################################################################
2+
# Groq Backend Configuration
3+
################################################################################
4+
#
5+
# This file defines the model specifications for Groq models.
6+
# It contains model definitions for various LLM models accessible through
7+
# the Groq API, including text-only and vision-capable models.
8+
#
9+
# Configuration structure:
10+
# - Each model is defined in its own section with the model name as the header
11+
# - Headers with dots or slashes must be quoted (e.g., ["meta-llama/llama-4-scout"])
12+
# - Model costs are in USD per million tokens (input/output)
13+
# - Vision models support max 5 images per request, 33MP max resolution
14+
#
15+
# Documentation: https://docs.pipelex.com
16+
# Support: https://go.pipelex.com/discord
17+
#
18+
################################################################################
19+
20+
################################################################################
21+
# MODEL DEFAULTS
22+
################################################################################
23+
24+
[defaults]
25+
model_type = "llm"
26+
sdk = "groq"
27+
prompting_target = "groq"
28+
29+
################################################################################
30+
# PRODUCTION TEXT MODELS
31+
################################################################################
32+
33+
# --- Meta Llama 3.x Series ----------------------------------------------------
34+
["llama-3.1-8b-instant"]
35+
model_id = "llama-3.1-8b-instant"
36+
max_tokens = 131072
37+
inputs = ["text"]
38+
outputs = ["text", "structured"]
39+
costs = { input = 0.05, output = 0.08 }
40+
41+
["llama-3.3-70b-versatile"]
42+
model_id = "llama-3.3-70b-versatile"
43+
max_tokens = 32768
44+
inputs = ["text"]
45+
outputs = ["text", "structured"]
46+
costs = { input = 0.59, output = 0.79 }
47+
48+
# --- Meta Llama Guard ---------------------------------------------------------
49+
["meta-llama/llama-guard-4-12b"]
50+
model_id = "meta-llama/llama-guard-4-12b"
51+
max_tokens = 1024
52+
inputs = ["text"]
53+
outputs = ["text", "structured"]
54+
costs = { input = 0.20, output = 0.20 }
55+
56+
# --- OpenAI GPT-OSS Models ----------------------------------------------------
57+
["openai/gpt-oss-20b"]
58+
model_id = "openai/gpt-oss-20b"
59+
max_tokens = 65536
60+
inputs = ["text"]
61+
outputs = ["text", "structured"]
62+
costs = { input = 0.075, output = 0.30 }
63+
64+
["openai/gpt-oss-120b"]
65+
model_id = "openai/gpt-oss-120b"
66+
max_tokens = 65536
67+
inputs = ["text"]
68+
outputs = ["text", "structured"]
69+
costs = { input = 0.15, output = 0.60 }
70+
71+
# --- Groq Compound Systems ----------------------------------------------------
72+
["groq/compound"]
73+
model_id = "groq/compound"
74+
max_tokens = 8192
75+
inputs = ["text"]
76+
outputs = ["text", "structured"]
77+
costs = { input = 0.15, output = 0.45 }
78+
79+
["groq/compound-mini"]
80+
model_id = "groq/compound-mini"
81+
max_tokens = 8192
82+
inputs = ["text"]
83+
outputs = ["text", "structured"]
84+
costs = { input = 0.10, output = 0.30 }
85+
86+
################################################################################
87+
# PREVIEW MODELS
88+
################################################################################
89+
90+
# --- Meta Llama 4 Vision Models (Preview) -------------------------------------
91+
["meta-llama/llama-4-scout-17b-16e-instruct"]
92+
model_id = "meta-llama/llama-4-scout-17b-16e-instruct"
93+
max_tokens = 8192
94+
inputs = ["text", "images"]
95+
outputs = ["text", "structured"]
96+
max_prompt_images = 5
97+
costs = { input = 0.11, output = 0.34 }
98+
99+
["meta-llama/llama-4-maverick-17b-128e-instruct"]
100+
model_id = "meta-llama/llama-4-maverick-17b-128e-instruct"
101+
max_tokens = 8192
102+
inputs = ["text", "images"]
103+
outputs = ["text", "structured"]
104+
max_prompt_images = 5
105+
costs = { input = 0.20, output = 0.60 }
106+
107+
# --- Moonshot Kimi K2 ---------------------------------------------------------
108+
["moonshotai/kimi-k2-instruct-0905"]
109+
model_id = "moonshotai/kimi-k2-instruct-0905"
110+
max_tokens = 16384
111+
inputs = ["text"]
112+
outputs = ["text", "structured"]
113+
costs = { input = 1.00, output = 3.00 }
114+
115+
# --- OpenAI Safety Model ------------------------------------------------------
116+
["openai/gpt-oss-safeguard-20b"]
117+
model_id = "openai/gpt-oss-safeguard-20b"
118+
max_tokens = 65536
119+
inputs = ["text"]
120+
outputs = ["text", "structured"]
121+
costs = { input = 0.075, output = 0.30 }
122+
123+
# --- Qwen 3 -------------------------------------------------------------------
124+
["qwen/qwen3-32b"]
125+
model_id = "qwen/qwen3-32b"
126+
max_tokens = 40960
127+
inputs = ["text"]
128+
outputs = ["text", "structured"]
129+
costs = { input = 0.29, output = 0.59 }

.pipelex/inference/backends/mistral.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ outputs = ["text", "structured"]
129129
costs = { input = 0.4, output = 2.0 }
130130

131131
################################################################################
132-
# OCR MODELS
132+
# EXTRACTION MODELS
133133
################################################################################
134134

135135
# --- OCR Models ---------------------------------------------------------------
@@ -140,4 +140,3 @@ max_tokens = 131072
140140
inputs = ["pdf", "image"]
141141
outputs = ["pages"]
142142
costs = { input = 0.4, output = 2.0 }
143-

.pipelex/inference/deck/base_deck.toml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,18 @@ base-claude = "claude-4.5-sonnet"
2121
base-gpt = "gpt-4o"
2222
base-gemini = "gemini-2.5-flash"
2323
base-mistral = "mistral-medium"
24+
base-groq = "llama-3.3-70b-versatile"
2425

2526
best-gpt = "gpt-4o"
2627
best-claude = "claude-4.1-opus"
2728
best-gemini = "gemini-2.5-pro"
2829
best-mistral = "mistral-medium"
2930
best-grok = "grok-3"
3031

32+
# Groq-specific aliases
33+
fast-groq = "llama-3.1-8b-instant"
34+
vision-groq = "meta-llama/llama-4-scout-17b-16e-instruct"
35+
3136
# Image generation aliases
3237
base-img-gen = "flux-pro/v1.1"
3338
best-img-gen = "flux-pro/v1.1-ultra"
@@ -39,6 +44,7 @@ fast-img-gen = "fast-lightning-sdxl"
3944

4045
[waterfalls]
4146
smart_llm = [
47+
"llama-3.3-70b-versatile",
4248
"claude-4.5-sonnet",
4349
"claude-4.1-opus",
4450
"claude-4-sonnet",
@@ -60,7 +66,7 @@ smart_llm_for_structured = [
6066
"claude-4-sonnet",
6167
"gpt-4o", # we use gpt-4o here rather than gpt-5 until we handle reasoning parameters
6268
]
63-
69+
llm_for_creativity = ["claude-4.1-opus", "gemini-2.5-pro", "gpt-4o"]
6470
llm_for_large_codebase = [
6571
"gemini-2.5-pro",
6672
"claude-4.5-sonnet",
@@ -81,6 +87,12 @@ cheap_llm_for_vision = [
8187
"claude-3-haiku",
8288
]
8389
cheap_llm_for_structured = ["gpt-4o-mini", "mistral-small", "claude-3-haiku"]
90+
cheap_llm_for_creativity = [
91+
"gemini-2.5-flash",
92+
"grok-3-mini",
93+
"gpt-4o-mini",
94+
"claude-4.5-haiku",
95+
]
8496

8597
####################################################################################################
8698
# LLM Presets
@@ -115,10 +127,15 @@ llm_for_table_to_text = { model = "base-claude", temperature = 0.3 }
115127
llm_to_prompt_img_gen = { model = "base-claude", temperature = 0.2 }
116128
llm_to_prompt_img_gen_cheap = { model = "gpt-4o-mini", temperature = 0.5 }
117129

130+
# Groq-specific presets (fast inference, low cost)
131+
llm_groq_fast_text = { model = "fast-groq", temperature = 0.2 }
132+
llm_groq_balanced = { model = "base-groq", temperature = 0.5 }
133+
llm_groq_vision = { model = "vision-groq", temperature = 0.3 }
134+
118135
# LLM Presets — For Testing ---------------------------------------------------------------------
119136

120137
llm_for_testing_gen_text = { model = "cheap_llm", temperature = 0.5 }
121-
llm_for_testing_gen_object = { model = "cheap_llm_for_structured", temperature = 0.5 }
138+
llm_for_testing_gen_object = { model = "cheap_llm_for_structured", temperature = 0.1 }
122139
llm_for_testing_vision = { model = "cheap_llm_for_vision", temperature = 0.5 }
123140
llm_for_testing_vision_structured = { model = "cheap_llm_for_vision", temperature = 0.5 }
124141

.pipelex/inference/routing_profiles.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,3 +149,7 @@ description = "Example routing profile using specific models"
149149

150150
"grok-3" = "pipelex_inference"
151151
"grok-3-mini" = "xai"
152+
153+
[profiles.all_groq]
154+
description = "Use groq backend for all its supported models"
155+
default = "groq"

.pipelex/pipelex.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,25 @@ excluded_dirs = [
4343
"results",
4444
]
4545

46+
[pipelex.builder_config]
47+
# Uncomment to change where the generated pipelines are saved
48+
# default_output_dir = "."
49+
# default_bundle_file_name = "bundle"
50+
# default_directory_base_name = "pipeline"
51+
4652
[pipelex.log_config]
4753
default_log_level = "INFO"
4854

4955
[pipelex.log_config.package_log_levels]
5056
pipelex = "INFO"
5157

58+
[cogt]
59+
[cogt.model_deck_config]
60+
# Uncomment to disable model fallback: it will raise errors instead of using secondary model options
61+
# is_model_fallback_enabled = false
62+
# Uncomment to change the reaction to missing presets: "raise" (default), "log" or "none"
63+
# missing_presets_reaction = "raise"
64+
5265
[cogt.llm_config]
5366
# Uncomment any of these to enable dumping the inputs or outputs of text-genration with an LLM
5467
# is_dump_text_prompts_enabled = true

.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@
5959
"program": "${workspaceFolder}/.venv/bin/pipelex",
6060
"args": [
6161
"run",
62-
"results/test_1.plx",
62+
"results/pipeline_01/bundle.plx",
6363
"--inputs",
64-
"results/inputs_2.json",
64+
"results/pipeline_01/inputs.json",
6565
],
6666
"console": "integratedTerminal",
6767
"justMyCode": false

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
11
# Changelog
22

3+
## [v0.15.4] - 2025-11-12
4+
5+
### Added
6+
- **Enhanced `pipelex build` Command**: Now generates a self-contained directory (e.g., `results/pipeline_01/`) containing `bundle.plx`, `inputs.json`, `run_{pipe_code}.py`, `bundle_view.html`, and `bundle_view.svg`. New CLI options: `--output-name (-o)` for custom base name, `--output-dir` for custom directory, and `--no-extras` to generate only the `.plx` file.
7+
- **CLI Readiness Check**: Verifies that a virtual environment is active for development installations.
8+
- **Model Deck Presets**: Added `llm_for_creativity` and `cheap_llm_for_creativity` model waterfalls, plus `[cogt.model_deck_config]` section in `pipelex.toml` for configuring model fallback behavior.
9+
- WIP: **Groq Inference Backend Support**: Integrated full support for the Groq API with configuration file (`.pipelex/inference/backends/groq.toml`), model specifications, costs, capabilities, new model aliases (`base-groq`, `fast-groq`, `vision-groq`), and routing profile (`all_groq`).
10+
11+
### Changed
12+
- **CLI Output and Visualization**: Overhauled command-line output with rich, table-based layouts for pipeline components. Final output of `pipelex run` is now pretty-printed and adapts to content type.
13+
- **Documentation**: Updated "Get Started" and "Build Reliable AI Workflows" to reflect new directory-based build output and CLI options.
14+
- **Internal Code Refactoring**: Reorganized exception hierarchy into dedicated `exceptions.py` files per module, centralized validation logic into `validation.py` modules, added `ValueError` to blueprints, and removed unused exceptions for improved maintainability.
15+
- Updated pytest to `>=9.0.1` to support their new `pyproject.toml` config format.
16+
17+
### Fixed
18+
- Adjusted default temperature for `llm_for_testing_gen_object` preset from `0.5` to `0.1` for more deterministic structured data generation.
19+
- Corrected `LLM_FOR_VISUAL_DESIGN` skill in `pipe_llm_spec` to point to `cheap_llm_for_creativity` preset.
20+
- Standardized input variable names in `pipe_llm_vision.plx` from `imageA`/`imageB` to `image_a`/`image_b`.
21+
22+
### Removed
23+
- Deleted `pipelex/core/validation_errors.py` file as part of exception hierarchy refactoring.
24+
25+
326
## [v0.15.3] - 2025-11-07
427

528
### Fixed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ codex-tests: env
222222
gha-tests: env
223223
$(call PRINT_TITLE,"Unit testing for github actions")
224224
@echo "• Running unit tests for github actions (excluding inference and gha_disabled)"
225-
$(VENV_PYTEST) --exitfirst --quiet -m "(dry_runnable or not inference) and not (gha_disabled or pipelex_api)" || [ $$? = 5 ]
225+
$(VENV_PYTEST) -n auto --exitfirst --quiet -m "(dry_runnable or not inference) and not (gha_disabled or pipelex_api)" || [ $$? = 5 ]
226226

227227
run-all-tests: env
228228
$(call PRINT_TITLE,"Running all unit tests")

0 commit comments

Comments
 (0)