@vtstech/pi-api 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -0
- package/api.js +1 -1
- package/package.json +3 -3
package/README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# @vtstech/pi-api
|
|
2
|
+
|
|
3
|
+
API Mode Switcher extension for the [Pi Coding Agent](https://github.com/badlogic/pi-mono).
|
|
4
|
+
|
|
5
|
+
Runtime switching of API modes, base URLs, thinking settings, and compat flags in `models.json`. Supports all 10 Pi API modes.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pi install "npm:@vtstech/pi-api"
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Commands
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
/api Show current provider config (mode, URL, compat flags)
|
|
17
|
+
/api mode <mode> Switch API mode (partial match supported)
|
|
18
|
+
/api url <url> Switch base URL
|
|
19
|
+
/api think on|off|auto Toggle thinking for all models in provider
|
|
20
|
+
/api compat <key> View compat flags
|
|
21
|
+
/api compat <key> <val> Set compat flag
|
|
22
|
+
/api modes List all 10 supported API modes
|
|
23
|
+
/api providers List all configured providers
|
|
24
|
+
/api reload Hint to run /reload
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Supported API Modes
|
|
28
|
+
|
|
29
|
+
`anthropic-messages` · `openai-completions` · `openai-responses` · `azure-openai-responses` · `openai-codex-responses` · `mistral-conversations` · `google-generative-ai` · `google-gemini-cli` · `google-vertex` · `bedrock-converse-stream`
|
|
30
|
+
|
|
31
|
+
## Features
|
|
32
|
+
|
|
33
|
+
- Partial mode matching — `/api mode openai-r` matches `openai-responses`
|
|
34
|
+
- Auto-detect local provider — targets the first `localhost`/`ollama` provider by default
|
|
35
|
+
- Batch thinking toggle — set `reasoning: true/false` across all models at once
|
|
36
|
+
- Compat flag management — get/set `supportsDeveloperRole`, `thinkingFormat`, `maxTokensField`, etc.
|
|
37
|
+
- Tab-completion for sub-commands
|
|
38
|
+
|
|
39
|
+
## Links
|
|
40
|
+
|
|
41
|
+
- [Full Documentation](https://github.com/VTSTech/pi-coding-agent#api-mode-switcher-apits)
|
|
42
|
+
- [Changelog](https://github.com/VTSTech/pi-coding-agent/blob/main/CHANGELOG.md)
|
|
43
|
+
|
|
44
|
+
## License
|
|
45
|
+
|
|
46
|
+
MIT — [VTSTech](https://www.vts-tech.org)
|
package/api.js
CHANGED
|
@@ -53,7 +53,7 @@ function resolveProvider(config, explicit) {
|
|
|
53
53
|
}
|
|
54
54
|
function api_temp_default(pi) {
|
|
55
55
|
const branding = [
|
|
56
|
-
` \u26A1 Pi API Mode Switcher v1.0.
|
|
56
|
+
` \u26A1 Pi API Mode Switcher v1.0.5`,
|
|
57
57
|
` Written by VTSTech`,
|
|
58
58
|
` GitHub: https://github.com/VTSTech`,
|
|
59
59
|
` Website: www.vts-tech.org`
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vtstech/pi-api",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "API Mode Switcher extension for Pi Coding Agent",
|
|
5
5
|
"main": "api.js",
|
|
6
|
-
"keywords": ["pi-
|
|
6
|
+
"keywords": ["pi-extensions"],
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"access": "public",
|
|
9
9
|
"type": "module",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"url": "https://github.com/VTSTech/pi-coding-agent"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@vtstech/pi-shared": "1.0.
|
|
17
|
+
"@vtstech/pi-shared": "1.0.5"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
20
|
"@mariozechner/pi-coding-agent": ">=0.66"
|