Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 36 additions & 9 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# [OPTIONAL] Free Pipelex Inference API key - Get yours on Discord: https://go.pipelex.com/discord
# No credit card required, limited time offer
PIPELEX_GATEWAY_API_KEY=
# cocode runs its AI workflows on your machine, with your own provider keys.
#
# It ships with the OpenAI backend switched on, and the model deck's default tiers are OpenAI models,
# so OPENAI_API_KEY is all you need to start. A key on its own is not enough for any other provider:
# its backend also has to be switched on, and the model deck pointed at its models. The README says
# how, and so does https://docs.pipelex.com/latest/get-started/configure-ai-providers/

# OpenAI: to use models like GPT-4o and GPT-5
# OpenAI: the provider cocode ships configured for
OPENAI_API_KEY=

# Azure: to use models like GPT-4o and GPT-5 from OpenAI but on Azure cloud
# Azure: to use OpenAI models on Azure cloud
AZURE_API_BASE=
AZURE_API_VERSION=
AZURE_API_KEY=
Expand All @@ -15,27 +18,51 @@ AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_REGION=

# To use Claude models directly from their creator, Anthropic
# To use Claude models directly from their creator, Anthropic
ANTHROPIC_API_KEY=

# To use Mistral models
MISTRAL_API_KEY=

# To generate images from fal.ai, the service of Forest Labs
# OpenRouter: one key for models from many providers at once
OPENROUTER_API_KEY=

# To generate images from fal.ai
FAL_API_KEY=

# Google AI Studio - Use GOOGLE_API_KEY for direct API access (simpler, rate-limited)
GOOGLE_API_KEY=

# Google Cloud Platform (GCP) - Use these for production Vertex AI access (requires GCP project setup)
# We recomment to use GOOGLE_API_KEY OR GCP credentials, not both
# We recommend using GOOGLE_API_KEY OR GCP credentials, not both
GCP_PROJECT_ID=
GCP_LOCATION=
GCP_CREDENTIALS_FILE_PATH=gcp_credentials.json

# To use Grok from x.ai
XAI_API_KEY=
XAI_API_ENDPOINT=https://api.x.ai/v1/

# To get access to many models with one key from blackbox.ai
BLACKBOX_API_KEY=

# To use open models served by Groq
GROQ_API_KEY=

# To generate images with models on the Hugging Face Inference API
HF_TOKEN=

# Portkey: an AI gateway reaching many providers with one key
PORTKEY_API_KEY=

# To use models hosted on Scaleway
SCALEWAY_ENDPOINT=
SCALEWAY_API_KEY=

# To use MiniMax models
MINIMAX_API_KEY=

# Linkup: the models behind web search and web page extraction
LINKUP_API_KEY=

# TypeSafe: the models behind judgment steps
TYPESAFE_API_KEY=
5 changes: 2 additions & 3 deletions .github/workflows/tests-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ jobs:
env:
VIRTUAL_ENV: ${{ github.workspace }}/.venv
ENV: dev
# Our CI never sends usage statistics: the off switch every Pipelex tool honours. Safe on the pinned pipelex, which
# refuses DO_NOT_TRACK only when it boots with inference and the Pipelex Gateway enabled, because `make gha-tests`
# always passes --disable-inference.
# Our CI never sends usage statistics: the off switch every Pipelex tool honours. The pinned pipelex sends none and
# reads DO_NOT_TRACK only to turn its own telemetry off, which it honours at any boot.
DO_NOT_TRACK: "1"
steps:
- uses: actions/checkout@v4
Expand Down
50 changes: 36 additions & 14 deletions .pipelex/inference/backends.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,23 @@
# This file configures the inference backends available to Pipelex.
# Each backend connects to a different AI service provider (OpenAI, Anthropic, Google, etc.).
#
# Documentation: https://docs.pipelex.com
# cocode ships with `openai` switched on, because the model deck's default tiers are OpenAI models:
# an OPENAI_API_KEY in your .env file is all a run needs. A run refuses to start while an enabled
# backend's key is missing, so switch a backend on only when you hold its key. The cocode package
# carries this directory and runs on it from any directory without an inference configuration of
# its own.
#
# To run on another provider without editing this tracked file, write the change in a git-ignored
# backends_override.toml beside it (for instance `[openai] enabled = false` and
# `[anthropic] enabled = true`), then point the deck's aliases and the presets that name a model at
# that provider's models in a deck file of your own, such as deck/x_custom_provider_deck.toml. The
# README gives both files in full.
#
# Documentation: https://docs.pipelex.com/latest/get-started/configure-ai-providers/
# Support: https://go.pipelex.com/discord
#
####################################################################################################

[pipelex_gateway]
display_name = "⭐ Pipelex Gateway"
enabled = true # Enable after accepting terms via `pipelex init config`
api_key = "${PIPELEX_GATEWAY_API_KEY}"

[anthropic]
enabled = false
api_key = "${ANTHROPIC_API_KEY}"
Expand Down Expand Up @@ -58,6 +65,17 @@ display_name = "Hugging Face"
enabled = false
api_key = "${HF_TOKEN}"

[linkup]
display_name = "Linkup"
enabled = false
api_key = "${LINKUP_API_KEY}"

[minimax]
display_name = "MiniMax"
enabled = false
endpoint = "https://api.minimax.io/anthropic"
api_key = "${MINIMAX_API_KEY}"

[mistral]
display_name = "Mistral AI"
enabled = false
Expand All @@ -69,9 +87,15 @@ endpoint = "http://localhost:11434/v1"

[openai]
display_name = "OpenAI"
enabled = false
enabled = true
api_key = "${OPENAI_API_KEY}"

[openrouter]
display_name = "OpenRouter"
enabled = false
endpoint = "https://openrouter.ai/api/v1"
api_key = "${OPENROUTER_API_KEY}"

[portkey]
display_name = "Portkey"
enabled = false
Expand All @@ -84,6 +108,11 @@ enabled = false
endpoint = "${SCALEWAY_ENDPOINT}"
api_key = "${SCALEWAY_API_KEY}"

[typesafe]
display_name = "TypeSafe"
enabled = false
api_key = "${TYPESAFE_API_KEY}"

[vertexai]
display_name = "Google Vertex AI"
enabled = false # This is the only one we disable because setting it up requires internet access just to get credentials so it fails in CI sandboxes
Expand All @@ -99,10 +128,3 @@ api_key = "${XAI_API_KEY}"

[internal] # software-only backend, runs internally, without AI
enabled = true

# Deprecated
[pipelex_inference]
display_name = "🛑 Legacy Pipelex Inference"
enabled = false
endpoint = "https://inference.pipelex.com/v1"
api_key = "${PIPELEX_INFERENCE_API_KEY}"
6 changes: 6 additions & 0 deletions .pipelex/inference/backends/.kit_manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"files": {
"internal.toml": "d99ddf303c4da154d01d88d7f2839c07dc8dd6a98c0446290a75a0f3c4eef0d8"
},
"kit_version": "0.83.0"
}
117 changes: 117 additions & 0 deletions .pipelex/inference/backends/anthropic.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ model_type = "llm"
sdk = "anthropic"
structure_method = "instructor/anthropic_tools"
thinking_mode = "manual"
valued_constraints = { min_thinking_budget = 1024 } # Anthropic refuses a smaller budget_tokens

################################################################################
# LANGUAGE MODELS
Expand Down Expand Up @@ -100,6 +101,15 @@ outputs = ["text", "structured"]
max_prompt_images = 100
costs = { input = 5.0, output = 25.0 }

["claude-4.6-sonnet"]
model_id = "claude-sonnet-4-6"
max_tokens = 64000
inputs = ["text", "images", "pdf"]
outputs = ["text", "structured"]
max_prompt_images = 100
costs = { input = 3.0, output = 15.0 }
thinking_mode = "adaptive"

["claude-4.6-opus"]
model_id = "claude-opus-4-6"
max_tokens = 64000
Expand All @@ -108,3 +118,110 @@ outputs = ["text", "structured"]
max_prompt_images = 100
costs = { input = 5.0, output = 25.0 }
thinking_mode = "adaptive"

# --- Claude 4.7 Series --------------------------------------------------------
["claude-4.7-opus"]
model_id = "claude-opus-4-7"
max_tokens = 128000
inputs = ["text", "images", "pdf"]
outputs = ["text", "structured"]
max_prompt_images = 100
costs = { input = 5.0, output = 25.0 }
thinking_mode = "adaptive"
listed_constraints = ["temperature_unsupported"]

# --- Claude 4.8 Series --------------------------------------------------------
["claude-4.8-opus"]
model_id = "claude-opus-4-8"
max_tokens = 128000
inputs = ["text", "images", "pdf"]
outputs = ["text", "structured"]
max_prompt_images = 100
costs = { input = 5.0, output = 25.0 }
thinking_mode = "adaptive"
listed_constraints = ["temperature_unsupported"]

# --- Claude 5 Series ----------------------------------------------------------
[claude-5-sonnet]
model_id = "claude-sonnet-5"
max_tokens = 64000
inputs = ["text", "images", "pdf"]
outputs = ["text", "structured"]
max_prompt_images = 100
costs = { input = 2.0, output = 10.0 }
thinking_mode = "adaptive"
listed_constraints = ["temperature_unsupported"]

[claude-5-opus]
model_id = "claude-opus-5"
max_tokens = 128000
inputs = ["text", "images", "pdf"]
outputs = ["text", "structured"]
max_prompt_images = 100
costs = { input = 5.0, output = 25.0 }
thinking_mode = "adaptive"
listed_constraints = ["temperature_unsupported"]

[claude-5-fable]
model_id = "claude-fable-5"
max_tokens = 128000
inputs = ["text", "images", "pdf"]
outputs = ["text", "structured"]
max_prompt_images = 100
costs = { input = 10.0, output = 50.0 }
thinking_mode = "adaptive"
listed_constraints = ["temperature_unsupported"]

# --- Claude 5.1 Series --------------------------------------------------------
["claude-5.1-fable"]
model_id = "claude-fable-5-1"
max_tokens = 128000
inputs = ["text", "images", "pdf"]
outputs = ["text", "structured"]
max_prompt_images = 100
costs = { input = 10.0, output = 50.0 }
thinking_mode = "adaptive"
# Fable 5.1 refuses tool_choice "tool" and "any", which is what the section default
# instructor/anthropic_tools forces; the reasoning variant leaves tool_choice on auto.
structure_method = "instructor/anthropic_reasoning_tools"
listed_constraints = ["temperature_unsupported"]

# --- Claude 5.5 Series --------------------------------------------------------
["claude-5.5-sonnet"]
model_id = "claude-sonnet-5-5"
max_tokens = 128000
inputs = ["text", "images", "pdf"]
outputs = ["text", "structured"]
max_prompt_images = 100
costs = { input = 2.0, output = 10.0 }
thinking_mode = "adaptive"
# Sonnet 5.5 refuses tool_choice "tool" and "any", which is what the section default
# instructor/anthropic_tools forces; the reasoning variant leaves tool_choice on auto.
structure_method = "instructor/anthropic_reasoning_tools"
listed_constraints = ["temperature_unsupported"]

["claude-5.5-opus"]
model_id = "claude-opus-5-5"
max_tokens = 128000
inputs = ["text", "images", "pdf"]
outputs = ["text", "structured"]
max_prompt_images = 100
costs = { input = 4.0, output = 20.0 }
thinking_mode = "adaptive"
# Opus 5.5 refuses tool_choice "tool" and "any", like Sonnet 5.5 above.
structure_method = "instructor/anthropic_reasoning_tools"
listed_constraints = ["temperature_unsupported"]

["claude-5.5-haiku"]
model_id = "claude-haiku-5-5"
max_tokens = 128000
inputs = ["text", "images", "pdf"]
outputs = ["text", "structured"]
max_prompt_images = 100
# The price of a prompt up to 100,000 tokens; a longer prompt pays $0.50 / $2.50.
costs = { input = 0.10, output = 0.50 }
thinking_mode = "adaptive"
# Unlike Sonnet 5.5 and Opus 5.5, Haiku 5.5 accepts the forced tool_choice that
# instructor/anthropic_tools sends; it then answers with the tool call and no thinking.
structure_method = "instructor/anthropic_tools"
listed_constraints = ["temperature_unsupported"]
Loading
Loading