polydev-ai 1.9.51 → 1.9.52

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/mcp/manifest.json CHANGED
@@ -262,7 +262,7 @@
262
262
  },
263
263
  "base_model": {
264
264
  "type": "string",
265
- "description": "Optional: the model making this ranking (auto-detected from IDE if not provided, e.g. 'claude-opus-4-6', 'gpt-5.3-codex')"
265
+ "description": "IMPORTANT: Identify yourself pass YOUR model name/ID (e.g. 'claude-opus-4-6', 'claude-sonnet-4-5', 'gpt-5.3-codex', 'gemini-3-pro'). This tracks which AI judge made the ranking."
266
266
  }
267
267
  },
268
268
  "required": ["ranked_models"]
@@ -460,19 +460,47 @@ Token will be saved automatically after login.`
460
460
  return await this.handleGetPerspectivesWithCLIs(params, id);
461
461
  }
462
462
 
463
- // Enrich rank_perspectives with base model + client info before forwarding
463
+ // Enrich rank_perspectives with IDE + base model info before forwarding
464
464
  if (toolName === 'rank_perspectives' || toolName === 'polydev.rank_perspectives') {
465
- if (params.arguments && !params.arguments.base_model) {
466
- // Inject base model from IDE client info (set during MCP initialize handshake)
467
- if (this.clientInfo?.name) {
468
- params.arguments.base_model = this.clientInfo.name;
465
+ if (params.arguments) {
466
+ // Always inject IDE info from MCP clientInfo (set during initialize handshake)
467
+ // Known clientInfo.name values from MCP clients:
468
+ // claude-code, Claude Desktop, cursor, windsurf, cline, continue,
469
+ // github-copilot-developer, vscode, jetbrains
470
+ if (!params.arguments.ide && this.clientInfo?.name) {
471
+ params.arguments.ide = this.clientInfo.name;
469
472
  if (this.clientInfo.version) {
470
- params.arguments.base_model += `/${this.clientInfo.version}`;
473
+ params.arguments.ide_version = this.clientInfo.version;
471
474
  }
472
475
  }
473
- }
474
- if (params.arguments && !params.arguments.client_id) {
475
- params.arguments.client_id = 'stdio-wrapper';
476
+
477
+ // If model didn't self-identify, infer base_model from IDE name
478
+ // Note: This is a fallback — the model's own self-report (from tool args) is preferred
479
+ if (!params.arguments.base_model && this.clientInfo?.name) {
480
+ const ideName = (this.clientInfo.name || '').toLowerCase();
481
+ // Map IDE name → likely base model family (not specific model version)
482
+ if (ideName.includes('claude')) {
483
+ params.arguments.base_model = 'claude'; // Could be opus, sonnet, haiku
484
+ } else if (ideName.includes('cursor')) {
485
+ params.arguments.base_model = 'cursor'; // Could be claude, gpt, etc.
486
+ } else if (ideName.includes('windsurf') || ideName.includes('codeium')) {
487
+ params.arguments.base_model = 'windsurf';
488
+ } else if (ideName.includes('cline')) {
489
+ params.arguments.base_model = 'cline';
490
+ } else if (ideName.includes('continue')) {
491
+ params.arguments.base_model = 'continue';
492
+ } else if (ideName.includes('codex')) {
493
+ params.arguments.base_model = 'codex';
494
+ } else if (ideName.includes('gemini')) {
495
+ params.arguments.base_model = 'gemini';
496
+ } else {
497
+ params.arguments.base_model = ideName;
498
+ }
499
+ }
500
+
501
+ if (!params.arguments.client_id) {
502
+ params.arguments.client_id = 'stdio-wrapper';
503
+ }
476
504
  }
477
505
  }
478
506
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polydev-ai",
3
- "version": "1.9.51",
3
+ "version": "1.9.52",
4
4
  "engines": {
5
5
  "node": ">=20.x <=22.x"
6
6
  },
@@ -78,7 +78,7 @@
78
78
  "marked": "^16.2.1",
79
79
  "next": "^15.5.7",
80
80
  "open": "^11.0.0",
81
- "polydev-ai": "^1.9.50",
81
+ "polydev-ai": "^1.9.51",
82
82
  "posthog-js": "^1.157.2",
83
83
  "prismjs": "^1.30.0",
84
84
  "react": "^18.3.1",