@link-assistant/hive-mind 1.35.9 → 1.35.10
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/CHANGELOG.md +13 -0
- package/README.md +1 -1
- package/package.json +1 -1
- package/src/agent.lib.mjs +7 -47
- package/src/claude.lib.mjs +2 -2
- package/src/claude.prompts.lib.mjs +2 -1
- package/src/github.lib.mjs +1 -1
- package/src/hive.config.lib.mjs +2 -1
- package/src/hive.mjs +1 -1
- package/src/models/index.mjs +871 -0
- package/src/opencode.lib.mjs +4 -15
- package/src/review.mjs +4 -3
- package/src/solve.config.lib.mjs +8 -19
- package/src/solve.mjs +1 -1
- package/src/task.mjs +4 -3
- package/src/telegram-bot.mjs +2 -2
- package/src/model-info.lib.mjs +0 -360
- package/src/model-mapping.lib.mjs +0 -176
- package/src/model-validation.lib.mjs +0 -427
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @link-assistant/hive-mind
|
|
2
2
|
|
|
3
|
+
## 1.35.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 21e1f5e: fix: fix model recognition logic and update free models docs (Issue #1473)
|
|
8
|
+
- Consolidate `model-info.lib.mjs`, `model-mapping.lib.mjs`, and `model-validation.lib.mjs` into single `src/models/index.mjs`
|
|
9
|
+
- Fix `resolveModelId()` to use `mapModelForTool()` as single source of truth instead of duplicated hardcoded maps that were missing agent free model mappings
|
|
10
|
+
- Fix false warning "Main model does not match requested model" for agent free models (e.g., `kimi-k2.5-free` → `opencode/kimi-k2.5-free`)
|
|
11
|
+
- Add missing base model pricing mappings for `minimax-m2.5-free`, `glm-5-free`, `glm-4.5-air-free`, `deepseek-r1-free`, `giga-potato-free` in `getBaseModelForPricing()`
|
|
12
|
+
- Update `validateAgentConnection()` default model to `minimax-m2.5-free`
|
|
13
|
+
- Update `docs/FREE_MODELS.md` to sync with upstream [Agent CLI FREE_MODELS.md](https://github.com/link-assistant/agent/blob/main/FREE_MODELS.md)
|
|
14
|
+
- Update README.md examples to use `minimax-m2.5-free` instead of deprecated `kimi-k2.5-free`
|
|
15
|
+
|
|
3
16
|
## 1.35.9
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -445,8 +445,8 @@ Examples:
|
|
|
445
445
|
/solve https://github.com/owner/repo/issues/123 --model opus --think max
|
|
446
446
|
|
|
447
447
|
Free Models (with --tool agent):
|
|
448
|
-
/solve https://github.com/owner/repo/issues/123 --tool agent --model kimi-k2.5-free
|
|
449
448
|
/solve https://github.com/owner/repo/issues/123 --tool agent --model minimax-m2.5-free
|
|
449
|
+
/solve https://github.com/owner/repo/issues/123 --tool agent --model opencode/minimax-m2.5-free
|
|
450
450
|
/solve https://github.com/owner/repo/issues/123 --tool agent --model gpt-5-nano
|
|
451
451
|
/solve https://github.com/owner/repo/issues/123 --tool agent --model big-pickle
|
|
452
452
|
|
package/package.json
CHANGED
package/src/agent.lib.mjs
CHANGED
|
@@ -18,6 +18,7 @@ import { reportError } from './sentry.lib.mjs';
|
|
|
18
18
|
import { timeouts } from './config.lib.mjs';
|
|
19
19
|
import { detectUsageLimit, formatUsageLimitMessage } from './usage-limit.lib.mjs';
|
|
20
20
|
import { sanitizeObjectStrings } from './unicode-sanitization.lib.mjs';
|
|
21
|
+
import { agentModels, defaultModels, freeToBaseModelMap } from './models/index.mjs';
|
|
21
22
|
|
|
22
23
|
// Import pricing functions from claude.lib.mjs
|
|
23
24
|
// We reuse fetchModelInfo and checkModelVisionCapability to get data from models.dev API
|
|
@@ -112,20 +113,12 @@ const getOriginalProviderName = providerId => {
|
|
|
112
113
|
* - isFreeVariant: Whether this is a free variant
|
|
113
114
|
*/
|
|
114
115
|
const getBaseModelForPricing = modelName => {
|
|
115
|
-
//
|
|
116
|
-
const freeToBaseMap = {
|
|
117
|
-
'kimi-k2.5-free': 'kimi-k2.5',
|
|
118
|
-
'glm-4.7-free': 'glm-4.7',
|
|
119
|
-
'minimax-m2.1-free': 'minimax-m2.1',
|
|
120
|
-
'trinity-large-preview-free': 'trinity-large-preview',
|
|
121
|
-
// Grok models don't have a paid equivalent with same name
|
|
122
|
-
// These are kept as-is since they're truly free
|
|
123
|
-
};
|
|
116
|
+
// Issue #1473: Use centralized freeToBaseModelMap from models/index.mjs
|
|
124
117
|
|
|
125
118
|
// Check if there's a direct mapping
|
|
126
|
-
if (
|
|
119
|
+
if (freeToBaseModelMap[modelName]) {
|
|
127
120
|
return {
|
|
128
|
-
baseModelName:
|
|
121
|
+
baseModelName: freeToBaseModelMap[modelName],
|
|
129
122
|
isFreeVariant: true,
|
|
130
123
|
};
|
|
131
124
|
}
|
|
@@ -283,46 +276,13 @@ export const calculateAgentPricing = async (modelId, tokenUsage) => {
|
|
|
283
276
|
};
|
|
284
277
|
|
|
285
278
|
// Model mapping to translate aliases to full model IDs for Agent
|
|
286
|
-
//
|
|
287
|
-
// Issue #1185: Free models use opencode/ prefix (not openai/)
|
|
288
|
-
// Issue #1300: Updated mappings - use opencode/ and kilo/ prefixes only,
|
|
289
|
-
// short names for Kilo-exclusive models map to kilo/ prefix
|
|
279
|
+
// Issue #1473: Uses centralized agentModels from models/index.mjs (single source of truth)
|
|
290
280
|
export const mapModelToId = model => {
|
|
291
|
-
|
|
292
|
-
// OpenCode Zen free models
|
|
293
|
-
grok: 'opencode/grok-code',
|
|
294
|
-
'grok-code': 'opencode/grok-code',
|
|
295
|
-
'grok-code-fast-1': 'opencode/grok-code',
|
|
296
|
-
'big-pickle': 'opencode/big-pickle',
|
|
297
|
-
'gpt-5-nano': 'opencode/gpt-5-nano',
|
|
298
|
-
'minimax-m2.5-free': 'opencode/minimax-m2.5-free',
|
|
299
|
-
// Kilo Gateway free models - short names for Kilo-exclusive models (Issue #1300)
|
|
300
|
-
'glm-5-free': 'kilo/glm-5-free',
|
|
301
|
-
'glm-4.5-air-free': 'kilo/glm-4.5-air-free',
|
|
302
|
-
'deepseek-r1-free': 'kilo/deepseek-r1-free',
|
|
303
|
-
'giga-potato-free': 'kilo/giga-potato-free',
|
|
304
|
-
'trinity-large-preview': 'kilo/trinity-large-preview',
|
|
305
|
-
// Premium models
|
|
306
|
-
sonnet: 'anthropic/claude-3-5-sonnet',
|
|
307
|
-
haiku: 'anthropic/claude-3-5-haiku',
|
|
308
|
-
opus: 'anthropic/claude-3-opus',
|
|
309
|
-
'gemini-3-pro': 'google/gemini-3-pro',
|
|
310
|
-
'gpt-4o-mini': 'openai/gpt-4o-mini',
|
|
311
|
-
'gpt-4o': 'openai/gpt-4o',
|
|
312
|
-
'claude-3.5-haiku': 'anthropic/claude-3.5-haiku',
|
|
313
|
-
'claude-3.5-sonnet': 'anthropic/claude-3.5-sonnet',
|
|
314
|
-
// Deprecated free models (backward compatibility)
|
|
315
|
-
'kimi-k2.5-free': 'opencode/kimi-k2.5-free', // Deprecated: not supported by OpenCode Zen (Issue #1391)
|
|
316
|
-
'glm-4.7-free': 'opencode/glm-4.7-free',
|
|
317
|
-
'minimax-m2.1-free': 'opencode/minimax-m2.1-free',
|
|
318
|
-
};
|
|
319
|
-
|
|
320
|
-
// Return mapped model ID if it's an alias, otherwise return as-is
|
|
321
|
-
return modelMap[model] || model;
|
|
281
|
+
return agentModels[model] || model;
|
|
322
282
|
};
|
|
323
283
|
|
|
324
284
|
// Function to validate Agent connection
|
|
325
|
-
export const validateAgentConnection = async (model =
|
|
285
|
+
export const validateAgentConnection = async (model = defaultModels.agent) => {
|
|
326
286
|
// Map model alias to full ID
|
|
327
287
|
const mappedModel = mapModelToId(model);
|
|
328
288
|
|
package/src/claude.lib.mjs
CHANGED
|
@@ -16,7 +16,7 @@ import { sanitizeObjectStrings } from './unicode-sanitization.lib.mjs';
|
|
|
16
16
|
import { displayBudgetStats } from './claude.budget-stats.lib.mjs';
|
|
17
17
|
import { buildClaudeResumeCommand } from './claude.command-builder.lib.mjs';
|
|
18
18
|
import { handleClaudeRuntimeSwitch } from './claude.runtime-switch.lib.mjs'; // see issue #1141
|
|
19
|
-
import { CLAUDE_MODELS as availableModels } from './
|
|
19
|
+
import { CLAUDE_MODELS as availableModels } from './models/index.mjs'; // Issue #1221
|
|
20
20
|
export { availableModels }; // Re-export for backward compatibility
|
|
21
21
|
// Helper to display resume command at end of session
|
|
22
22
|
const showResumeCommand = async (sessionId, tempDir, claudePath, model, log) => {
|
|
@@ -48,7 +48,7 @@ export const mapModelToId = model => {
|
|
|
48
48
|
return availableModels[model] || model;
|
|
49
49
|
};
|
|
50
50
|
// Function to validate Claude CLI connection with retry logic
|
|
51
|
-
export const validateClaudeConnection = async (model = 'haiku
|
|
51
|
+
export const validateClaudeConnection = async (model = 'haiku') => {
|
|
52
52
|
// Map model alias to full ID
|
|
53
53
|
const mappedModel = mapModelToId(model);
|
|
54
54
|
// Retry configuration for API overload errors
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import { getArchitectureCareSubPrompt } from './architecture-care.prompts.lib.mjs';
|
|
7
7
|
import { getExperimentsExamplesSubPrompt } from './experiments-examples.prompts.lib.mjs';
|
|
8
|
+
import { primaryModelNames } from './models/index.mjs';
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* Build the user prompt for Claude
|
|
@@ -309,7 +310,7 @@ Agent Commander usage (unified subagent delegation).
|
|
|
309
310
|
--tool <name>: Agent to use (claude, opencode, codex, agent)
|
|
310
311
|
--working-directory <path>: Execution directory (use current directory for context)
|
|
311
312
|
--prompt <text>: The task to delegate
|
|
312
|
-
--model <name>: Model to use (
|
|
313
|
+
--model <name>: Model to use (${[...new Set(Object.values(primaryModelNames).flat())].slice(0, 5).join(', ')}, etc.)
|
|
313
314
|
--isolation <mode>: Execution context (none, screen, docker)
|
|
314
315
|
--detached: Run in background mode
|
|
315
316
|
- Examples:
|
package/src/github.lib.mjs
CHANGED
|
@@ -11,7 +11,7 @@ export { isSafeToken, isHexInSafeContext, getGitHubTokensFromFiles, getGitHubTok
|
|
|
11
11
|
import { uploadLogWithGhUploadLog } from './log-upload.lib.mjs';
|
|
12
12
|
import { formatResetTimeWithRelative } from './usage-limit.lib.mjs'; // See: https://github.com/link-assistant/hive-mind/issues/1236
|
|
13
13
|
// Import model info helpers (Issue #1225)
|
|
14
|
-
import { getToolDisplayName, getModelInfoForComment } from './
|
|
14
|
+
import { getToolDisplayName, getModelInfoForComment } from './models/index.mjs';
|
|
15
15
|
// Re-export for use by other modules
|
|
16
16
|
export { getToolDisplayName };
|
|
17
17
|
|
package/src/hive.config.lib.mjs
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
// This module has no heavy dependencies to allow fast loading for --help
|
|
5
5
|
|
|
6
6
|
import { SOLVE_OPTION_DEFINITIONS } from './solve.config.lib.mjs';
|
|
7
|
+
import { buildModelOptionDescription } from './models/index.mjs';
|
|
7
8
|
|
|
8
9
|
// Hive-only options that are NOT solve options (hive-specific functionality).
|
|
9
10
|
// These are excluded when auto-registering solve-passthrough options.
|
|
@@ -19,7 +20,7 @@ const SOLVE_ONLY_OPTION_NAMES = new Set(['resume', 'working-directory', 'only-pr
|
|
|
19
20
|
const HIVE_CUSTOM_SOLVE_OPTIONS = {
|
|
20
21
|
model: {
|
|
21
22
|
type: 'string',
|
|
22
|
-
description:
|
|
23
|
+
description: `${buildModelOptionDescription()}, or any model ID supported by the tool`,
|
|
23
24
|
alias: 'm',
|
|
24
25
|
default: 'sonnet',
|
|
25
26
|
},
|
package/src/hive.mjs
CHANGED
|
@@ -101,7 +101,7 @@ if (isDirectExecution) {
|
|
|
101
101
|
const claudeLib = await import('./claude.lib.mjs');
|
|
102
102
|
const { validateClaudeConnection } = claudeLib;
|
|
103
103
|
// Import model validation library
|
|
104
|
-
const modelValidation = await import('./
|
|
104
|
+
const modelValidation = await import('./models/index.mjs');
|
|
105
105
|
const { validateAndExitOnInvalidModel } = modelValidation;
|
|
106
106
|
const githubLib = await import('./github.lib.mjs');
|
|
107
107
|
const { checkGitHubPermissions, fetchAllIssuesWithPagination, fetchProjectIssues, isRateLimitError, batchCheckPullRequestsForIssues, parseGitHubUrl, batchCheckArchivedRepositories } = githubLib;
|