@azumag/opencode-rate-limit-fallback 1.0.0 → 1.0.2

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.
@@ -8,7 +8,11 @@
8
8
  "WebFetch(domain:github.blog)",
9
9
  "Bash(npm login:*)",
10
10
  "Bash(npm token create:*)",
11
- "Bash(npm view:*)"
11
+ "Bash(npm view:*)",
12
+ "Bash(git add:*)",
13
+ "Bash(git commit -m \"$\\(cat <<''EOF''\nPublish as scoped package @azumag/opencode-rate-limit-fallback\n\n- Rename package to @azumag/opencode-rate-limit-fallback\n- Add npm installation instructions to README\n- Add npm version badge\n\nCo-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>\nEOF\n\\)\")",
14
+ "Bash(git push:*)",
15
+ "Bash(git commit:*)"
12
16
  ]
13
17
  }
14
18
  }
package/README.md CHANGED
@@ -1,4 +1,6 @@
1
- # opencode-rate-limit-fallback
1
+ # @azumag/opencode-rate-limit-fallback
2
+
3
+ [![npm version](https://badge.fury.io/js/@azumag%2Fopencode-rate-limit-fallback.svg)](https://www.npmjs.com/package/@azumag/opencode-rate-limit-fallback)
2
4
 
3
5
  OpenCode plugin that automatically switches to fallback models when rate limited.
4
6
 
@@ -12,6 +14,18 @@ OpenCode plugin that automatically switches to fallback models when rate limited
12
14
 
13
15
  ## Installation
14
16
 
17
+ Add the plugin to your `opencode.json`:
18
+
19
+ ```json
20
+ {
21
+ "plugins": ["@azumag/opencode-rate-limit-fallback"]
22
+ }
23
+ ```
24
+
25
+ OpenCode will automatically install the plugin on startup.
26
+
27
+ ### Manual Installation (Alternative)
28
+
15
29
  Copy `index.ts` to your OpenCode plugins directory:
16
30
 
17
31
  ```bash
@@ -20,14 +34,6 @@ curl -o ~/.config/opencode/plugins/rate-limit-fallback.ts \
20
34
  https://raw.githubusercontent.com/azumag/opencode-rate-limit-fallback/main/index.ts
21
35
  ```
22
36
 
23
- Or manually download and copy:
24
-
25
- ```bash
26
- cp index.ts ~/.config/opencode/plugins/rate-limit-fallback.ts
27
- ```
28
-
29
- Dependencies (`@opencode-ai/plugin`) will be automatically installed by OpenCode on startup.
30
-
31
37
  Restart OpenCode to load the plugin.
32
38
 
33
39
  ## Configuration
package/index.ts CHANGED
@@ -76,6 +76,7 @@ function isRateLimitError(error: any): boolean {
76
76
  "quota exceeded",
77
77
  "resource exhausted",
78
78
  "usage limit",
79
+ "High concurrency usage of this API",
79
80
  "429",
80
81
  ];
81
82
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azumag/opencode-rate-limit-fallback",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "OpenCode plugin that automatically switches to fallback models when rate limited",
5
5
  "main": "index.ts",
6
6
  "type": "module",