pi-radeon
v1.0.2
Published
AMD Radeon Cloud LLM provider for Pi
Maintainers
Readme
pi-radeon
AMD Radeon Cloud LLM provider for Pi. Seamlessly connects Pi to the AMD Radeon Cloud Token Factory with dynamic model discovery.
About AMD Radeon Cloud
AMD Radeon Cloud is AMD's GPU cloud platform powered by AMD AI accelerators and the ROCm software stack.
Through its Token Factory service, AMD Radeon Cloud delivers high-performance, cost-effective inference endpoints for state-of-the-art open-source LLMs. Key capabilities include:
- Massive Context Windows: Up to 1M tokens (e.g., DeepSeek V4 Flash) for large codebase analysis and long-form generation.
- Hardware-Accelerated Inference: Low-latency execution powered by AMD GPU clusters and optimized serving frameworks (vLLM / SGLang).
- Reasoning & Function Calling: First-class support for chain-of-thought thinking streams and tool execution.
To use this extension, obtain an API key from the Token Factory at developer.amd.com.cn/radeon.
Features
- Dynamic Model Discovery: Automatically queries the Radeon Cloud API (
/models) on startup to register available models without requiring package updates. - Native Reasoning & Thinking: Full support for DeepSeek and Qwen reasoning/thinking tokens and streaming.
- Tool Calling: Full compatibility with Pi agent tools (file operations, bash execution, code search, diagnostics).
- Accurate Cost Tracking: Calculates live token pricing (input, output, cache read) per million tokens from API pricing metadata.
- Resilient Fallback: Instant startup with built-in model definitions if offline or before authentication is configured.
Installation
Install pi-radeon globally in Pi using either npm or GitHub:
From npm
pi install npm:pi-radeonFrom GitHub
pi install git:github.com/jh0nz/pi-radeonTemporary Run (without installation)
pi -e npm:pi-radeonAuthentication
You can authenticate using Pi's interactive /login command or by setting an environment variable.
Option 1: Native Pi Login (Recommended)
Start Pi and run the login command:
/login radeonEnter your AMD Radeon Cloud API key when prompted. Pi securely stores it in ~/.pi/agent/auth.json.
Option 2: Environment Variable
Export your API key in your shell configuration (~/.bashrc, ~/.zshrc, or ~/.config/fish/config.fish):
export RADEON_API_KEY="rc-your-api-key-here"The extension also accepts RADEON_CLOUD_API_KEY and AMD_RADEON_API_KEY.
Usage
Interactive Selection
Start Pi and open the model selector:
/modelSelect any radeon/... model from the list.
Direct Launch
# DeepSeek V4 Flash (1M context window, reasoning enabled)
pi --model radeon/DeepSeek-V4-Flash
# Qwen 3.8 Flash Next
pi --model radeon/Qwen3.8-Flash-Next
# MiniCPM 5 1B
pi --model radeon/MiniCPM5-1BList Available Models
pi --list-models | grep radeonTechnical Details
- Base URL:
https://developer.amd.com.cn/radeon/api/v1 - Protocol: High-performance
openai-completionsengine with Server-Sent Events (SSE) streaming. - Dynamic Endpoint: Queries
GET https://developer.amd.com.cn/radeon/api/v1/modelswith a 3.5s timeout safeguard on startup.
License
MIT (c) jh0nz
