@andersea/pi-scaleway-provider
Pi Agent extension for Scaleway's Generative APIs
Package details
Install @andersea/pi-scaleway-provider from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@andersea/pi-scaleway-provider- Package
@andersea/pi-scaleway-provider- Version
0.3.0- Published
- Jul 18, 2026
- Downloads
- 226/mo · 226/wk
- Author
- andersea
- License
- MIT
- Types
- extension
- Size
- 16.1 KB
- Dependencies
- 0 dependencies · 2 peers
Pi manifest JSON
{
"extensions": [
"./extensions/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
Scaleway Generative AI Extension for Pi
A minimal Pi extension that registers Scaleway's Generative APIs as a native Pi provider.
Installation
# Production — install via npm (recommended)
pi install npm:@andersea/pi-scaleway-gen
# Or install from git
pi install git:github.com/andersea/pi-scaleway-provider
# Development — load directly from source
pi -e ./extensions/index.ts
Authentication
Scaleway supports two authentication methods:
Method 1: Interactive Login (Recommended)
# Start Pi, then run:
/login scaleway
# Enter your API key when prompted
Credentials are stored securely in ~/.pi/agent/auth.json and persist across sessions.
Method 2: Environment Variable
export SCW_SECRET_KEY="scw_..."
💡 Note:
SCW_SECRET_KEYis the official Scaleway convention. Get your API key from Scaleway Console → Credentials → API Keys.
Credential Resolution
Pi resolves credentials in this order: auth.json → environment variable.
Usage
Select a Scaleway Model
# List available Scaleway models
/model scaleway/
# Use a specific model
/model scaleway/gpt-oss-120b
Development
# Install dependencies
npm install
# Build (optional - jiti loads TS directly)
npm run build
# Lint
npm run lint
# Test with Pi
SCW_SECRET_KEY=scw_xxx pi -e ./extensions/index.ts
Architecture
This extension uses Pi's provider registration pattern:
pi.registerProvider("scaleway", {
name: "Scaleway Generative AI",
baseUrl: "https://api.scaleway.ai/v1",
apiKey: "$SCW_SECRET_KEY",
authHeader: true,
api: "openai-completions",
models: getModels()
});
All Scaleway models use the openai-completions API — including gpt-oss-120b, which the Scaleway docs suggest must use the Responses API. In practice, Scaleway's /v1/responses endpoint rejects the include field that Pi sends for reasoning models, so all models are routed through chat completions.
Models are defined in extensions/models.ts as a static, curated list sourced from Scaleway's supported models page.
Only serverless chat/generation models are included — non-chat models (audio, embeddings), EOL models, and dedicated-only models are excluded.
License
MIT