Using Scaleway Models in this Home Manager Configuration
This document explains how to use Scaleway models (Devstral) with the pi coding agent configured in this home-manager setup.
Prerequisites
Before using Scaleway models, you need to:
- Have a Scaleway account with API access
- Obtain your Scaleway Access Key and Secret Key
- Store these credentials in the appropriate SOPS-encrypted files
Setting Up Scaleway Credentials
1. Update the Scaleway Secrets File
The Scaleway credentials are stored in secrets/scaleway.yaml and encrypted with SOPS. To edit:
SOPS_AGE_KEY_FILE=~/.config/sops/age/keys.txt sops secrets/scaleway.yaml
The file should contain:
access_key: "your-scaleway-access-key-here"
secret_key: "your-scaleway-secret-key-here"
2. Verify Model Configuration
Check that the Scaleway models are properly configured in pi-models.json:
{
"providers": {
"scaleway": {
"baseUrl": "https://api.scaleway.ai/v1",
"api": "openai-completions",
"apiKey": "$SCW_SECRET_KEY",
"compat": {
"supportsDeveloperRole": false,
"maxTokensField": "max_tokens",
"requiresToolResultName": true,
"supportsUsageInStreaming": false
}
}
}
}
Note: The actual model definitions (including devstral-2-123b-instruct-2512 and qwen3-coder-30b-a3b-instruct) are now defined in pi-extensions/scaleway.ts rather than in pi-models.json.
Using Scaleway Models with pi
1. Accessing Models in pi
Once configured, the Scaleway models will be available in pi’s model selection interface:
- “Devstral 2 123B (Scaleway)” -
devstral-2-123b-instruct-2512(Default) - “Qwen3 Coder 30B (Scaleway)” -
qwen3-coder-30b-a3b-instruct - “Mistral Medium 3.5 128B (Scaleway)” -
mistral-medium-3.5-128b(256k context window)
2. Model Selection in pi
When using pi, you can select these models through:
- The
/modelscommand in pi to view available models - The model dropdown menu in the UI
- Command-line specification when starting pi
3. Model Usage Restrictions
According to the agent configuration, Scaleway models:
- Support text input only
- Have large context windows (131,072 tokens for Devstral 2 123B and Qwen3 Coder 30B, 262,144 tokens for Mistral Medium 3.5 128B)
- Support up to 16,384 max tokens (Scaleway API limit)
- Do not support reasoning features
- Are configured with zero cost (for tracking purposes)
- Devstral 2 123B is now the default model
- Mistral Medium 3.5 128B is available as an alternative model
Troubleshooting
1. Authentication Issues
If you encounter authentication problems:
-
Ensure your Scaleway credentials are correct in
secrets/scaleway.yaml -
Re-encrypt the file after making changes:
SOPS_AGE_KEY_FILE=~/.config/sops/age/keys.txt sops encrypt --overwrite secrets/scaleway.yaml -
Reactivate the configuration:
home-manager switch --flake .#philipp
2. Model Availability
If the Scaleway models don’t appear in pi:
- Check that the
pi-models.jsonfile is correctly formatted - Verify that the Ollama service is running (though Scaleway models don’t use Ollama)
- Ensure the Scaleway API keys are properly set in the SOPS-encrypted file
- Restart the pi agent or reload the configuration
Cost Considerations
The Scaleway models are configured with zero cost in the pi-models.json file. This is for tracking purposes only. Actual usage will incur charges according to Scaleway’s pricing for their API.
Testing Model Access
You can test if the Scaleway models are properly configured by:
- Starting pi with the configuration
- Using the
/modelscommand to list available models - Attempting a simple chat with one of the Scaleway models to ensure connectivity