@fnnm/pi-iflow-connector
v1.0.2
Published
iFlow.cn provider extension for pi-coding-agent
Maintainers
Readme
iFlow Provider Connector
iFlow.cn provider connector for pi-coding-agent.
Features
- OAuth2 authentication with PKCE via iflow CLI
- 6 official iFlow models:
- qwen3-coder-plus
- qwen3-235b
- deepseek-v3.2
- deepseek-v3
- kimi-k2
- glm-4.6
- Free access to all models
- 128,000 token context window
Installation
Global Installation
npm install -g @fnnm/pi-iflow-connectorLocal Installation
npm install @fnnm/pi-iflow-connectorManual Installation
Clone this repository and link it:
git clone https://github.com/elsin/pi-iflow-connector.git
npm run build
npm run postinstall
pi -e .Usage
Using iflow CLI Credentials
- Install iflow CLI and login:
npm install -g iflow-cli
iflow login- Start pi with connector:
pi -e ./packages/iflow-extension- Login to iFlow:
/login iflow- Use iFlow models:
pi -m iflow/qwen3-coder-plusUsing API Key
Set IFLOW_API_KEY environment variable:
export IFLOW_API_KEY=your-api-key
pi -m iflow/qwen3-coder-plusModels
| Model ID | Name | Context Window | Max Tokens | |----------|------|----------------|------------| | qwen3-coder-plus | Qwen3 Coder Plus | 128,000 | 65,536 | | qwen3-235b | Qwen3 235B | 128,000 | 65,536 | | deepseek-v3.2 | DeepSeek V3.2 | 128,000 | 65,536 | | deepseek-v3 | DeepSeek V3 | 128,000 | 65,536 | | kimi-k2 | Kimi K2 | 128,000 | 65,536 | | glm-4.6 | GLM 4.6 | 128,000 | 65,536 |
Authentication
OAuth2 with iflow CLI
The extension uses OAuth2 authentication via iflow CLI:
- Run
iflow loginto authenticate with iFlow - The extension reads credentials from
~/.iflow/oauth_creds.json - The extension uses the access token directly as the API key
- Tokens are automatically refreshed when expired via the OAuth refresh flow
API Key
Alternatively, you can set IFLOW_API_KEY environment variable:
export IFLOW_API_KEY=your-api-keyDevelopment
Build
npm run buildWatch Mode
npm run devTest
npm testType Check
npm run checkTroubleshooting
"No iflow CLI credentials found"
Make sure you have run iflow login and that ~/.iflow/oauth_creds.json exists.
"Failed to fetch user info"
Check your internet connection and ensure iflow CLI credentials are valid.
"No API key found in user info response"
Your iflow account may not have API access. Contact iFlow support.
License
MIT
Support
- GitHub Issues: https://github.com/badlogic/pi-mono/issues
- iFlow Documentation: https://iflow.cn
