@link-assistant/hive-mind 0.40.0 → 0.40.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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @link-assistant/hive-mind
2
2
 
3
+ ## 0.40.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 1ee78c9: fix: prefer Anthropic provider for public price calculation
8
+
9
+ When calculating public pricing for Claude models, fetchModelInfo now checks the Anthropic provider first instead of using the first match from the models.dev API (which was Helicone). This ensures pricing calculations show "Provider: Anthropic" as expected.
10
+
3
11
  ## 0.40.0
4
12
 
5
13
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@link-assistant/hive-mind",
3
- "version": "0.40.0",
3
+ "version": "0.40.1",
4
4
  "description": "AI-powered issue solver and hive mind for collaborative problem solving",
5
5
  "main": "src/hive.mjs",
6
6
  "type": "module",
@@ -493,7 +493,15 @@ export const fetchModelInfo = async (modelId) => {
493
493
  res.on('end', () => {
494
494
  try {
495
495
  const apiData = JSON.parse(data);
496
- // Search for the model across all providers
496
+ // For public pricing calculation, prefer Anthropic provider for Claude models
497
+ // Check Anthropic provider first
498
+ if (apiData.anthropic?.models?.[modelId]) {
499
+ const modelInfo = apiData.anthropic.models[modelId];
500
+ modelInfo.provider = apiData.anthropic.name || 'Anthropic';
501
+ resolve(modelInfo);
502
+ return;
503
+ }
504
+ // Search for the model across all other providers
497
505
  for (const provider of Object.values(apiData)) {
498
506
  if (provider.models && provider.models[modelId]) {
499
507
  const modelInfo = provider.models[modelId];