pi-opencode-go-provider 1.0.3 → 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 CHANGED
@@ -93,17 +93,19 @@ After loading the extension, use the `/model` command in pi to select your prefe
93
93
 
94
94
  Then select "opencode-go" as the provider and choose from the available models.
95
95
 
96
+ The default model for this provider is `kimi-k2.6` (matching pi core's built-in default); use `/model` to pick another.
97
+
96
98
  ## Authentication
97
99
 
98
- The opencode-go API key can be configured in multiple ways (resolved in this order):
100
+ The opencode-go API key can be configured in multiple ways. Credentials are resolved in this order:
99
101
 
100
- 1. **`auth.json`** (recommended)Add to `~/.pi/agent/auth.json`:
102
+ 1. **CLI flag**`--api-key` (highest priority, runtime override)
103
+ 2. **`auth.json`** (recommended) — Add to `~/.pi/agent/auth.json`:
101
104
  ```json
102
105
  { "opencode-go": { "type": "api_key", "key": "your-api-key" } }
103
106
  ```
104
- The `key` field supports literal values, env var names, and shell commands (prefix with `!`). See [pi's auth file docs](https://github.com/badlogic/pi-mono) for details.
105
- 2. **Runtime override** — Use the `--api-key` CLI flag
106
- 3. **Environment variable** — Set `OPENCODE_API_KEY`
107
+ The `key` field supports literals, `$ENV_VAR`/`${ENV_VAR}` interpolation, and `!command` execution. See [pi's providers docs](https://github.com/earendil-works/pi-coding-agent/blob/main/docs/providers.md) for details.
108
+ 3. **Environment variable** — `OPENCODE_API_KEY`
107
109
 
108
110
  ## Environment Variables
109
111
 
package/index.ts CHANGED
@@ -300,6 +300,7 @@ export default function (pi: ExtensionAPI) {
300
300
  const staleModels = buildModels(staleBase, customModels, patches);
301
301
 
302
302
  pi.registerProvider("opencode-go", {
303
+ name: "OpenCode Go",
303
304
  baseUrl: BASE_URL,
304
305
  apiKey: "$OPENCODE_API_KEY",
305
306
  api: "openai-completions",
@@ -326,6 +327,7 @@ export default function (pi: ExtensionAPI) {
326
327
  revalidateModels(cachedApiKey, embeddedModels, signal).then((freshBase) => {
327
328
  if (freshBase && !signal.aborted) {
328
329
  pi.registerProvider("opencode-go", {
330
+ name: "OpenCode Go",
329
331
  baseUrl: BASE_URL,
330
332
  apiKey: "$OPENCODE_API_KEY",
331
333
  api: "openai-completions",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-opencode-go-provider",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "Opencode Go provider extension for pi - Fast, efficient GLM, Kimi, and MiniMax models through the opencode.ai API",
5
5
  "type": "module",
6
6
  "main": "index.ts",
package/patch.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "deepseek-v4-flash": {
3
3
  "compat": { "requiresReasoningContentOnAssistantMessages": true, "thinkingFormat": "deepseek" },
4
- "thinkingLevelMap": { "minimal": null, "low": null, "medium": null, "high": "high", "xhigh": "max" }
4
+ "thinkingLevelMap": { "minimal": null, "low": null, "medium": null, "high": "high", "max": "max" }
5
5
  },
6
6
  "deepseek-v4-pro": {
7
7
  "compat": { "requiresReasoningContentOnAssistantMessages": true, "thinkingFormat": "deepseek" },
8
- "thinkingLevelMap": { "minimal": null, "low": null, "medium": null, "high": "high", "xhigh": "max" }
8
+ "thinkingLevelMap": { "minimal": null, "low": null, "medium": null, "high": "high", "max": "max" }
9
9
  },
10
10
  "kimi-k2.6": {
11
11
  "compat": { "thinkingFormat": "deepseek", "supportsReasoningEffort": false },