second-opinion-mcp 0.4.0 → 0.4.1
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 +26 -21
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -52,9 +52,9 @@ Don't just get code reviews—ask for anything:
|
|
|
52
52
|
Switch between Gemini and GPT, or use both:
|
|
53
53
|
|
|
54
54
|
```
|
|
55
|
-
/second-opinion
|
|
56
|
-
/second-opinion
|
|
57
|
-
/second-opinion
|
|
55
|
+
/second-opinion consensus Review this code # Uses BOTH in parallel (default)
|
|
56
|
+
/second-opinion gemini Review this code # Uses Gemini only
|
|
57
|
+
/second-opinion openai Review this code # Uses GPT only
|
|
58
58
|
```
|
|
59
59
|
|
|
60
60
|
### Consensus Mode
|
|
@@ -69,7 +69,8 @@ Consensus mode:
|
|
|
69
69
|
- Calls both providers simultaneously (faster than sequential calls)
|
|
70
70
|
- Returns combined output with each model's perspective
|
|
71
71
|
- Highlights areas of agreement and differences
|
|
72
|
-
-
|
|
72
|
+
- **Smart fallback**: if only one API key is configured, automatically uses that single provider instead of failing
|
|
73
|
+
- Requires both `GEMINI_API_KEY` and `OPENAI_API_KEY` for true consensus; works with just one key via fallback
|
|
73
74
|
|
|
74
75
|
### Smart Token Budgeting
|
|
75
76
|
|
|
@@ -100,10 +101,10 @@ Reference files outside your session:
|
|
|
100
101
|
```
|
|
101
102
|
> /second-opinion
|
|
102
103
|
|
|
103
|
-
|
|
104
|
+
Consensus review complete! Written to second-opinions/add-auth-flow.consensus.review.md
|
|
104
105
|
- Analyzed 14 files (52,000 tokens)
|
|
105
|
-
- Key findings: Missing input validation in login handler,
|
|
106
|
-
|
|
106
|
+
- Key findings: [BLOCKING] Missing input validation in login handler,
|
|
107
|
+
[IMPORTANT] Consider rate limiting for auth endpoints
|
|
107
108
|
```
|
|
108
109
|
|
|
109
110
|
### Security Audit
|
|
@@ -258,10 +259,11 @@ claude mcp add second-opinion \
|
|
|
258
259
|
|----------|---------|-------------|
|
|
259
260
|
| `GEMINI_API_KEY` | — | API key for Google Gemini |
|
|
260
261
|
| `OPENAI_API_KEY` | — | API key for OpenAI |
|
|
261
|
-
| `GEMINI_MODEL` | `gemini-
|
|
262
|
-
| `OPENAI_MODEL` | `gpt-
|
|
263
|
-
| `DEFAULT_PROVIDER` | `
|
|
264
|
-
| `MAX_CONTEXT_TOKENS` | `
|
|
262
|
+
| `GEMINI_MODEL` | `gemini-3-flash-preview` | Gemini model to use |
|
|
263
|
+
| `OPENAI_MODEL` | `gpt-5.2` | OpenAI model to use |
|
|
264
|
+
| `DEFAULT_PROVIDER` | `consensus` | Default provider (`gemini`, `openai`, or `consensus`) |
|
|
265
|
+
| `MAX_CONTEXT_TOKENS` | `200000` | Maximum tokens for context |
|
|
266
|
+
| `MAX_OUTPUT_TOKENS` | `32768` | Maximum tokens for reviewer's response |
|
|
265
267
|
| `TEMPERATURE` | `0.3` | Default LLM temperature (0-1) |
|
|
266
268
|
| `RATE_LIMIT_WINDOW_MS` | `60000` | Rate limit window (1 minute) |
|
|
267
269
|
| `RATE_LIMIT_MAX_REQUESTS` | `10` | Max requests per window |
|
|
@@ -275,10 +277,11 @@ Create `~/.config/second-opinion/config.json`:
|
|
|
275
277
|
{
|
|
276
278
|
"geminiApiKey": "your-key",
|
|
277
279
|
"openaiApiKey": "your-key",
|
|
278
|
-
"defaultProvider": "
|
|
279
|
-
"geminiModel": "gemini-
|
|
280
|
-
"openaiModel": "gpt-
|
|
281
|
-
"maxContextTokens":
|
|
280
|
+
"defaultProvider": "consensus",
|
|
281
|
+
"geminiModel": "gemini-3-flash-preview",
|
|
282
|
+
"openaiModel": "gpt-5.2",
|
|
283
|
+
"maxContextTokens": 200000,
|
|
284
|
+
"maxOutputTokens": 32768,
|
|
282
285
|
"temperature": 0.3,
|
|
283
286
|
"rateLimitWindowMs": 60000,
|
|
284
287
|
"rateLimitMaxRequests": 10,
|
|
@@ -311,7 +314,7 @@ When calling the MCP tool directly:
|
|
|
311
314
|
|
|
312
315
|
| Parameter | Required | Default | Description |
|
|
313
316
|
|-----------|----------|---------|-------------|
|
|
314
|
-
| `provider` | Yes | — | `"gemini"`, `"openai"`, or `"consensus"` |
|
|
317
|
+
| `provider` | Yes | — | `"gemini"`, `"openai"`, or `"consensus"` (falls back to single provider if only one key configured) |
|
|
315
318
|
| `projectPath` | Yes | — | Absolute path to project |
|
|
316
319
|
| `task` | No | — | Custom prompt (defaults to code review) |
|
|
317
320
|
| `sessionId` | No | latest | Claude Code session ID |
|
|
@@ -324,7 +327,8 @@ When calling the MCP tool directly:
|
|
|
324
327
|
| `includeDependents` | No | `true` | Include importing files |
|
|
325
328
|
| `includeTests` | No | `true` | Include test files |
|
|
326
329
|
| `includeTypes` | No | `true` | Include type definitions |
|
|
327
|
-
| `
|
|
330
|
+
| `maxInputTokens` | No | `100000` | Context token budget |
|
|
331
|
+
| `maxOutputTokens` | No | `32768` | Max tokens for reviewer's response |
|
|
328
332
|
| `temperature` | No | `0.3` | LLM temperature (0-1) |
|
|
329
333
|
| `focusAreas` | No | — | Specific areas to focus on |
|
|
330
334
|
|
|
@@ -364,11 +368,12 @@ When calling the MCP tool directly:
|
|
|
364
368
|
│ ## Summary │
|
|
365
369
|
│ The authentication implementation is solid... │
|
|
366
370
|
│ │
|
|
367
|
-
│ ##
|
|
368
|
-
│
|
|
371
|
+
│ ## Findings │
|
|
372
|
+
│ [BLOCKING] Missing rate limiting on login endpoint │
|
|
373
|
+
│ [SUGGESTION] Consider adding refresh token rotation │
|
|
369
374
|
│ │
|
|
370
|
-
│ ##
|
|
371
|
-
│
|
|
375
|
+
│ ## What's Done Well │
|
|
376
|
+
│ [PRAISE] Clean separation of auth concerns │
|
|
372
377
|
│ │
|
|
373
378
|
└─────────────────────────────────────────────────────────────────┘
|
|
374
379
|
```
|