Skip to content

Commit b29dc48

Browse files
authored
Adapt to New inference backend config (#48)
- Bump `pipelex` to `v0.10.2`: See `Pipelex` changelog [here](https://docs.pipelex.com/changelog/)
1 parent cbd8f57 commit b29dc48

37 files changed

Lines changed: 1209 additions & 628 deletions

.pipelex/inference/backends.toml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
[pipelex_inference]
2+
endpoint = "https://inference.pipelex.com/v1"
3+
api_key = "${PIPELEX_INFERENCE_API_KEY}"
4+
5+
[blackboxai]
6+
enabled = true
7+
endpoint = "https://api.blackbox.ai/v1"
8+
api_key = "${BLACKBOX_API_KEY}"
9+
10+
[openai]
11+
enabled = true
12+
api_key = "${OPENAI_API_KEY}"
13+
14+
[azure_openai]
15+
enabled = true
16+
endpoint = "${AZURE_API_BASE}"
17+
api_key = "${AZURE_API_KEY}"
18+
api_version = "${AZURE_API_VERSION}"
19+
20+
[anthropic]
21+
enabled = true
22+
api_key = "${ANTHROPIC_API_KEY}"
23+
claude_4_tokens_limit = 8192
24+
25+
[ollama]
26+
enabled = true
27+
endpoint = "http://localhost:11434/v1"
28+
29+
[xai]
30+
enabled = true
31+
endpoint = "https://api.x.ai/v1"
32+
api_key = "${XAI_API_KEY}"
33+
34+
[bedrock]
35+
enabled = true
36+
aws_region = "${AWS_REGION}"
37+
38+
[vertexai]
39+
enabled = true
40+
gcp_project_id = "${GCP_PROJECT_ID}"
41+
gcp_location = "${GCP_LOCATION}"
42+
gcp_credentials_file_path = "${GCP_CREDENTIALS_FILE_PATH}"
43+
44+
[mistral]
45+
enabled = true
46+
api_key = "${MISTRAL_API_KEY}"
47+
48+
[internal] # software-only backend, runs internally, without AI
49+
enabled = true
50+
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
default_sdk = "anthropic"
2+
default_prompting_target = "anthropic"
3+
4+
[claude-3-haiku]
5+
model_id = "claude-3-haiku-20240307"
6+
max_tokens = 4096
7+
inputs = ["text", "images"]
8+
outputs = ["text", "structured"]
9+
max_prompt_images = 100
10+
costs = { input = 0.25, output = 1.25 }
11+
12+
[claude-3-opus]
13+
model_id = "claude-3-opus-20240229"
14+
max_tokens = 4096
15+
inputs = ["text", "images"]
16+
outputs = ["text", "structured"]
17+
max_prompt_images = 100
18+
costs = { input = 15.0, output = 75.0 }
19+
20+
["claude-3.5-sonnet"]
21+
model_id = "claude-3-5-sonnet-20240620"
22+
max_tokens = 8192
23+
inputs = ["text", "images"]
24+
outputs = ["text", "structured"]
25+
max_prompt_images = 100
26+
costs = { input = 3.0, output = 15.0 }
27+
28+
["claude-3.5-sonnet-v2"]
29+
model_id = "claude-3-5-sonnet-20241022"
30+
max_tokens = 8192
31+
inputs = ["text", "images"]
32+
outputs = ["text", "structured"]
33+
max_prompt_images = 100
34+
costs = { input = 3.0, output = 15.0 }
35+
36+
["claude-3.7-sonnet"]
37+
model_id = "claude-3-7-sonnet-20250219"
38+
max_tokens = 8192
39+
inputs = ["text", "images"]
40+
outputs = ["text", "structured"]
41+
max_prompt_images = 100
42+
costs = { input = 3.0, output = 15.0 }
43+
44+
[claude-4-sonnet]
45+
model_id = "claude-sonnet-4-20250514"
46+
max_tokens = 64000
47+
inputs = ["text", "images"]
48+
outputs = ["text", "structured"]
49+
max_prompt_images = 100
50+
costs = { input = 3.0, output = 15.0 }
51+
52+
[claude-4-opus]
53+
model_id = "claude-opus-4-20250514"
54+
max_tokens = 32000
55+
inputs = ["text", "images"]
56+
outputs = ["text", "structured"]
57+
max_prompt_images = 100
58+
costs = { input = 3.0, output = 15.0 }
59+
60+
["claude-4.1-opus"]
61+
model_id = "claude-opus-4-1-20250805"
62+
max_tokens = 32000
63+
inputs = ["text", "images"]
64+
outputs = ["text", "structured"]
65+
max_prompt_images = 100
66+
costs = { input = 3.0, output = 15.0 }
67+
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
default_sdk = "azure_openai"
2+
default_prompting_target = "openai"
3+
4+
[gpt-4o]
5+
model_id = "gpt-4o-2024-11-20"
6+
inputs = ["text", "images"]
7+
outputs = ["text", "structured"]
8+
costs = { input = 2.5, output = 10.0 }
9+
10+
[gpt-4o-mini]
11+
model_id = "gpt-4o-mini-2024-07-18"
12+
inputs = ["text", "images"]
13+
outputs = ["text", "structured"]
14+
costs = { input = 0.15, output = 0.6 }
15+
16+
["gpt-4.1"]
17+
model_id = "gpt-4.1-2025-04-14"
18+
inputs = ["text", "images"]
19+
outputs = ["text", "structured"]
20+
costs = { input = 2, output = 8 }
21+
22+
["gpt-4.1-mini"]
23+
model_id = "gpt-4.1-mini-2025-04-14"
24+
inputs = ["text", "images"]
25+
outputs = ["text", "structured"]
26+
costs = { input = 0.4, output = 1.6 }
27+
28+
["gpt-4.1-nano"]
29+
model_id = "gpt-4.1-nano-2025-04-14"
30+
inputs = ["text", "images"]
31+
outputs = ["text", "structured"]
32+
costs = { input = 0.1, output = 0.4 }
33+
34+
[o1-mini]
35+
model_id = "o1-mini-2024-09-12"
36+
inputs = ["text"]
37+
outputs = ["text", "structured"]
38+
costs = { input = 3.0, output = 12.0 }
39+
40+
[o1]
41+
model_id = "o1-2024-12-17"
42+
inputs = ["text", "images"]
43+
outputs = ["text", "structured"]
44+
costs = { input = 15.0, output = 60.0 }
45+
46+
[o3-mini]
47+
model_id = "o3-mini-2025-01-31"
48+
inputs = ["text"]
49+
outputs = ["text", "structured"]
50+
costs = { input = 1.1, output = 4.4 }
51+
52+
[gpt-5-mini]
53+
model_id = "gpt-5-mini-2025-08-07"
54+
inputs = ["text", "images"]
55+
outputs = ["text", "structured"]
56+
costs = { input = 0.25, output = 2.0 }
57+
58+
[gpt-5-nano]
59+
model_id = "gpt-5-nano-2025-08-07"
60+
inputs = ["text", "images"]
61+
outputs = ["text", "structured"]
62+
costs = { input = 0.05, output = 0.4 }
63+
64+
[gpt-5-chat]
65+
model_id = "gpt-5-chat-2025-08-07"
66+
inputs = ["text", "images"]
67+
outputs = ["text", "structured"]
68+
costs = { input = 1.25, output = 10.0 }
69+
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
default_sdk = "bedrock_aioboto3"
2+
default_prompting_target = "anthropic"
3+
4+
[bedrock-mistral-large]
5+
model_id = "mistral.mistral-large-2407-v1:0"
6+
max_tokens = 8192
7+
inputs = ["text"]
8+
outputs = ["text"]
9+
costs = { input = 4.0, output = 12.0 }
10+
11+
[bedrock-meta-llama-3-3-70b-instruct]
12+
model_id = "us.meta.llama3-3-70b-instruct-v1:0"
13+
max_tokens = 8192
14+
inputs = ["text"]
15+
outputs = ["text"]
16+
# TODO: find out the actual cost per million tokens for llama3 on bedrock
17+
costs = { input = 3.0, output = 15.0 }
18+
19+
[bedrock-nova-pro]
20+
model_id = "us.amazon.nova-pro-v1:0"
21+
max_tokens = 5120
22+
inputs = ["text"]
23+
outputs = ["text"]
24+
# TODO: find out the actual cost per million tokens for nova on bedrock
25+
costs = { input = 3.0, output = 15.0 }
26+
27+
################################################################################
28+
# Anthropic Models
29+
################################################################################
30+
31+
["claude-3.5-sonnet"]
32+
sdk = "bedrock_anthropic"
33+
model_id = "us.anthropic.claude-3-5-sonnet-20240620-v1:0"
34+
max_tokens = 8192
35+
inputs = ["text", "images"]
36+
outputs = ["text", "structured"]
37+
max_prompt_images = 100
38+
costs = { input = 3.0, output = 15.0 }
39+
40+
["claude-3.5-sonnet-v2"]
41+
sdk = "bedrock_anthropic"
42+
model_id = "anthropic.claude-3-5-sonnet-20241022-v2:0"
43+
max_tokens = 8192
44+
inputs = ["text", "images"]
45+
outputs = ["text", "structured"]
46+
max_prompt_images = 100
47+
costs = { input = 3.0, output = 15.0 }
48+
49+
["claude-3.7-sonnet"]
50+
sdk = "bedrock_anthropic"
51+
model_id = "us.anthropic.claude-3-7-sonnet-20250219-v1:0"
52+
max_tokens = 8192
53+
inputs = ["text", "images"]
54+
outputs = ["text", "structured"]
55+
max_prompt_images = 100
56+
costs = { input = 3.0, output = 15.0 }
57+
58+
[claude-4-sonnet]
59+
sdk = "bedrock_anthropic"
60+
model_id = "us.anthropic.claude-sonnet-4-20250514-v1:0"
61+
max_tokens = 64000
62+
inputs = ["text", "images"]
63+
outputs = ["text", "structured"]
64+
max_prompt_images = 100
65+
costs = { input = 3.0, output = 15.0 }
66+
67+
[claude-4-opus]
68+
sdk = "bedrock_anthropic"
69+
model_id = "us.anthropic.claude-opus-4-20250514-v1:0"
70+
max_tokens = 32000
71+
inputs = ["text", "images"]
72+
outputs = ["text", "structured"]
73+
max_prompt_images = 100
74+
costs = { input = 3.0, output = 15.0 }
75+
76+
["claude-4.1-opus"]
77+
sdk = "bedrock_anthropic"
78+
model_id = "us.anthropic.claude-opus-4-1-20250805-v1:0"
79+
max_tokens = 32000
80+
inputs = ["text", "images"]
81+
outputs = ["text", "structured"]
82+
max_prompt_images = 100
83+
costs = { input = 3.0, output = 15.0 }
84+

0 commit comments

Comments
 (0)