Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryAdds canonical Key changes:
Note: The API change from Confidence Score: 4/5
|
| Filename | Overview |
|---|---|
| biome.json | Added canonical biome.json lint/format config matching WOPR plugin standards |
| src/index.ts | Formatting changes + switched from registerLLMProvider to registerProvider API + removed deprecated tier field |
Last reviewed commit: 69b84a3
src/index.ts
Outdated
| try { | ||
| const opencode = await import("@opencode-ai/sdk"); | ||
| OpencodeSDK = opencode; | ||
| } catch (_error) { |
There was a problem hiding this comment.
catch block missing explicit type annotation - should be catch (_error: unknown) per WOPR plugin conventions
| } catch (_error) { | |
| } catch (_error: unknown) { |
Context Used: Context from dashboard - WOPR Plugins: Architecture Contract (flag violations as blockers)
PLUGIN STRUCTURE:
- Each plugin i... (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/index.ts
Line: 82
Comment:
catch block missing explicit type annotation - should be `catch (_error: unknown)` per WOPR plugin conventions
```suggestion
} catch (_error: unknown) {
```
**Context Used:** Context from `dashboard` - WOPR Plugins: Architecture Contract (flag violations as blockers)
PLUGIN STRUCTURE:
- Each plugin i... ([source](https://app.greptile.com/review/custom-context?memory=de4b562c-87ef-41c0-9a4d-78b8b2bc8d5e))
How can I resolve this? If you propose a fix, please make it concise.
src/index.ts
Outdated
| ctx.log.info("Registering OpenCode provider..."); | ||
| ctx.registerLLMProvider(opencodeProvider); |
There was a problem hiding this comment.
Verify that registerProvider/unregisterProvider is the correct API. Per capability provider conventions, the pattern should be ctx.registerCapabilityProvider("llm", opencodeProvider). Confirm this change aligns with latest @wopr-network/plugin-types.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/index.ts
Line: 330-331
Comment:
Verify that `registerProvider`/`unregisterProvider` is the correct API. Per capability provider conventions, the pattern should be `ctx.registerCapabilityProvider("llm", opencodeProvider)`. Confirm this change aligns with latest `@wopr-network/plugin-types`.
How can I resolve this? If you propose a fix, please make it concise.Also fixes pre-existing TS errors: remove unknown `tier` field from ManifestProviderEntry, use registerProvider/unregisterProvider API. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…d names - Add `_error: unknown` type annotation to catch block in loadOpencodeSDK (Greptile convention flag) - Add missing `tier: "byok"` to ManifestProviderEntry (required field per plugin-types) - Rename registerProvider/unregisterProvider → registerLLMProvider/unregisterLLMProvider (correct WOPRPluginContext API) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…c (WOP-1070) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…Provider (WOP-1070) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace generic registerProvider/unregisterProvider with the typed registerLLMProvider/unregisterLLMProvider API from plugin-types 0.7.1. Also add missing required `tier: "byok"` on manifest provider entry. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…rovider (WOP-1070) - Remove tier: "byok" (field removed from ManifestProviderEntry in plugin-types 0.7.x) - Upgrade @wopr-network/plugin-types from ^0.2.1 to ^0.7.0 - Use registerProvider/unregisterProvider (registerLLMProvider does not exist in 0.7.x) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
adedd2d to
e1c1691
Compare
| return health.data?.healthy === true; | ||
| } catch (error: unknown) { | ||
| logger.error("[opencode] Credential validation failed:", error); | ||
| return true; // Allow anyway, server might not be running yet |
There was a problem hiding this comment.
🟡 Medium src/index.ts:143
Returning true on validation failure masks missing SDK errors. When query() later calls getClient() outside its try/catch, an unhandled rejection occurs. Consider returning false to fail fast during validation.
| return true; // Allow anyway, server might not be running yet | |
| return false; // Allow anyway, server might not be running yet |
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file src/index.ts around line 143:
Returning `true` on validation failure masks missing SDK errors. When `query()` later calls `getClient()` outside its try/catch, an unhandled rejection occurs. Consider returning `false` to fail fast during validation.
Evidence trail:
src/index.ts lines 77-87 (loadOpencodeSDK throws error when SDK missing), lines 133-145 (validateCredentials catches error and returns true at line 143), lines 169-178 (getClient calls loadOpencodeSDK), lines 180-183 (query calls getClient at line 181, try block starts at line 183)
Summary
Closes WOP-1070
biome.json(fromwopr-plugin-discordreference) for provider pluginsbiome check --fixto auto-fix existing violationsbiome checkwith zero errors (warnings only for noExplicitAny/noNonNullAssertion)Test plan
npm run checkpasses in each repobiome check src/shows zero errorsGenerated with Claude Code
Note
Route model selection to dynamic provider IDs in
OpencodeClient.queryand add Biome lint config for WOP-1070Switch
OpencodeClient.queryto resolveproviderIDfrommodelIDprefixes and updatevalidateCredentialsto returntrueon errors; addbiome.jsonand reformat code.📍Where to Start
Start with
resolveProviderIDusage insideOpencodeClient.queryin src/index.ts.Macroscope summarized e1c1691.