tachibot-mcp 2.0.5 → 2.0.6

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.
@@ -32,11 +32,14 @@ export const PERPLEXITY_MODELS = {
32
32
  SONAR_PRO: "sonar-pro", // Main search model
33
33
  SONAR_REASONING: "sonar-reasoning-pro", // Reasoning model
34
34
  };
35
- // Grok Models (xAI) - Updated 2025-11-07
35
+ // Grok Models (xAI) - Updated 2025-11-21 with Grok 4.1
36
36
  export const GROK_MODELS = {
37
- // New fast models (2025) - PRIMARY USE
37
+ // Grok 4.1 models (Nov 2025) - LATEST & BEST
38
+ _4_1: "grok-4.1", // Latest: 2M context, $0.20/$0.50, enhanced reasoning & creativity
39
+ _4_1_FAST: "grok-4.1-fast", // Tool-calling optimized: 2M context, $0.20/$0.50, agentic workflows
40
+ // Previous fast models (2025) - Still good
38
41
  CODE_FAST: "grok-code-fast-1", // Coding specialist: 256K→2M, $0.20/$1.50, 92 tok/sec
39
- _4_FAST_REASONING: "grok-4-fast-reasoning", // Cheap reasoning: 2M→4M, $0.20/$0.50 (3x cheaper!)
42
+ _4_FAST_REASONING: "grok-4-fast-reasoning", // Cheap reasoning: 2M→4M, $0.20/$0.50
40
43
  _4_FAST: "grok-4-fast-non-reasoning", // Fast general: 2M→4M, $0.20/$0.50
41
44
  // Expensive/specialized (use sparingly)
42
45
  _4_HEAVY: "grok-4-0709", // Multi-agent: 256K→2M, $3/$15 (expensive!)
@@ -132,39 +135,39 @@ export const TOOL_DEFAULTS = {
132
135
  maxTokens: 3000,
133
136
  temperature: 0.7,
134
137
  },
135
- // Grok tools - UPDATED with new fast models
138
+ // Grok tools - UPDATED 2025-11-21 with Grok 4.1
136
139
  grok: {
137
- model: GROK_MODELS._4_FAST_REASONING, // Changed: 3x cheaper output
140
+ model: GROK_MODELS._4_1, // Latest: Enhanced reasoning & creativity
138
141
  maxTokens: 4000,
139
142
  temperature: 0.7,
140
143
  },
141
144
  grok_reason: {
142
- model: GROK_MODELS._4_FAST_REASONING, // Changed: 3x cheaper, 8x context
145
+ model: GROK_MODELS._4_1, // Latest: Enhanced reasoning with lower hallucination
143
146
  maxTokens: 8000,
144
147
  temperature: 0.7,
145
148
  },
146
149
  grok_code: {
147
- model: GROK_MODELS.CODE_FAST, // Changed: Coding specialist, 3x faster
150
+ model: GROK_MODELS._4_1_FAST, // Tool-calling optimized, better than code-fast-1
148
151
  maxTokens: 4000,
149
152
  temperature: 0.3,
150
153
  },
151
154
  grok_search: {
152
- model: GROK_MODELS._4_FAST_REASONING, // Changed: Use fast reasoning with search
155
+ model: GROK_MODELS._4_1, // Latest with enhanced reasoning
153
156
  maxTokens: 3000,
154
157
  temperature: 0.7,
155
158
  },
156
159
  grok_brainstorm: {
157
- model: GROK_MODELS._4_FAST, // Changed: Fast non-reasoning for creativity
160
+ model: GROK_MODELS._4_1, // Latest: Enhanced creativity & emotional intelligence
158
161
  maxTokens: 4000,
159
162
  temperature: 0.9,
160
163
  },
161
164
  grok_architect: {
162
- model: GROK_MODELS._4_FAST_REASONING, // New: Architecture needs reasoning
165
+ model: GROK_MODELS._4_1, // Latest: Enhanced architecture reasoning
163
166
  maxTokens: 4000,
164
167
  temperature: 0.6,
165
168
  },
166
169
  grok_debug: {
167
- model: GROK_MODELS.CODE_FAST, // New: Use code specialist for debugging
170
+ model: GROK_MODELS._4_1_FAST, // Tool-calling optimized for debugging
168
171
  maxTokens: 3000,
169
172
  temperature: 0.3,
170
173
  },
@@ -12,10 +12,13 @@ config({ path: path.resolve(__dirname, '../../../.env') });
12
12
  // Grok API configuration
13
13
  const GROK_API_KEY = process.env.GROK_API_KEY || process.env.XAI_API_KEY;
14
14
  const GROK_API_URL = "https://api.x.ai/v1/chat/completions";
15
- // Grok models - Updated 2025-11-07 with new fast models
15
+ // Grok models - Updated 2025-11-21 with Grok 4.1
16
16
  export var GrokModel;
17
17
  (function (GrokModel) {
18
- // New fast models (2025) - PRIMARY USE
18
+ // Grok 4.1 models (Nov 2025) - LATEST & BEST
19
+ GrokModel["GROK_4_1"] = "grok-4.1";
20
+ GrokModel["GROK_4_1_FAST"] = "grok-4.1-fast";
21
+ // Previous fast models (2025) - Still good
19
22
  GrokModel["CODE_FAST"] = "grok-code-fast-1";
20
23
  GrokModel["GROK_4_FAST_REASONING"] = "grok-4-fast-reasoning";
21
24
  GrokModel["GROK_4_FAST"] = "grok-4-fast-non-reasoning";
@@ -35,7 +38,7 @@ export async function callGrokEnhanced(messages, options = {}) {
35
38
  content: `[Grok API key not configured. Add GROK_API_KEY or XAI_API_KEY to .env file]`
36
39
  };
37
40
  }
38
- const { model = GrokModel.GROK_4_FAST_REASONING, // Changed: Use cheap fast reasoning by default
41
+ const { model = GrokModel.GROK_4_1, // Updated 2025-11-21: Use latest Grok 4.1 by default
39
42
  temperature = 0.7, maxTokens = options.useHeavy ? 100000 : 4000, enableLiveSearch = false, searchSources = 100, // Default to 100 sources for cost control
40
43
  searchDomains = [], structuredOutput = false } = options;
41
44
  try {
@@ -140,9 +143,9 @@ Cite your sources when using web data.`
140
143
  content: query
141
144
  }
142
145
  ];
143
- log?.info(`Grok Scout: ${variant} research with ${enableLiveSearch ? 'live search' : 'knowledge base'} (using ${enableLiveSearch ? 'grok-4-fast-reasoning with search' : 'grok-4-fast-reasoning'})`);
146
+ log?.info(`Grok Scout: ${variant} research with ${enableLiveSearch ? 'live search' : 'knowledge base'} (using grok-4.1 with enhanced reasoning)`);
144
147
  const result = await callGrokEnhanced(messages, {
145
- model: GrokModel.GROK_4_FAST_REASONING, // Changed: Use fast reasoning (works with search)
148
+ model: GrokModel.GROK_4_1, // Updated 2025-11-21: Use latest Grok 4.1
146
149
  enableLiveSearch,
147
150
  searchSources,
148
151
  searchDomains,
@@ -197,11 +200,11 @@ ${enableLiveSearch ? 'Use live search for current information when needed.' : ''
197
200
  content: problem
198
201
  }
199
202
  ];
200
- const modelName = useHeavy ? 'Grok-4-Heavy' : 'Grok-4-Fast-Reasoning';
201
- const costInfo = useHeavy ? '$3/$15 (expensive!)' : '$0.20/$0.50 (cheap!)';
203
+ const modelName = useHeavy ? 'Grok-4-Heavy' : 'Grok-4.1';
204
+ const costInfo = useHeavy ? '$3/$15 (expensive!)' : '$0.20/$0.50 (latest!)';
202
205
  log?.info(`Using ${modelName} (${approach}) with ${enableLiveSearch ? 'live search' : 'knowledge base'} - Cost: ${costInfo}`);
203
206
  const result = await callGrokEnhanced(messages, {
204
- model: useHeavy ? GrokModel.GROK_4_HEAVY : GrokModel.GROK_4_FAST_REASONING, // Changed: Use fast reasoning unless heavy requested
207
+ model: useHeavy ? GrokModel.GROK_4_HEAVY : GrokModel.GROK_4_1, // Updated 2025-11-21: Use latest Grok 4.1
205
208
  useHeavy,
206
209
  enableLiveSearch,
207
210
  searchSources: 50,
@@ -253,14 +256,14 @@ export const grokFunctionTool = {
253
256
  ];
254
257
  // Make request with tools
255
258
  const requestBody = {
256
- model: args.useHeavy ? GrokModel.GROK_4_HEAVY : GrokModel.GROK_4_FAST_REASONING, // Changed: Use fast reasoning unless heavy requested
259
+ model: args.useHeavy ? GrokModel.GROK_4_HEAVY : GrokModel.GROK_4_1_FAST, // Updated 2025-11-21: Use tool-calling optimized Grok 4.1 Fast
257
260
  messages,
258
261
  tools,
259
262
  tool_choice: "auto", // Let Grok decide when to call functions
260
263
  max_tokens: args.useHeavy ? 50000 : 5000,
261
264
  temperature: 0.3 // Lower for function calling
262
265
  };
263
- log?.info(`Function calling with ${args.useHeavy ? 'Grok-4-Heavy ($3/$15)' : 'Grok-4-Fast-Reasoning ($0.20/$0.50)'}`);
266
+ log?.info(`Function calling with ${args.useHeavy ? 'Grok-4-Heavy ($3/$15)' : 'Grok-4.1-Fast ($0.20/$0.50, tool-calling optimized)'}`);
264
267
  try {
265
268
  const response = await fetch(GROK_API_URL, {
266
269
  method: "POST",
@@ -318,13 +321,13 @@ Limit search to ${max_search_results} sources for cost control.`
318
321
  content: `Search for: ${query}`
319
322
  }
320
323
  ];
321
- log?.info(`Grok Search: ${max_search_results} sources, recency: ${recency} (using grok-4-fast-reasoning with search)`);
324
+ log?.info(`Grok Search: ${max_search_results} sources, recency: ${recency} (using grok-4.1 with enhanced reasoning)`);
322
325
  // Extract domains from sources if specified
323
326
  const domains = sources
324
327
  ?.filter((s) => s.allowed_websites)
325
328
  ?.flatMap((s) => s.allowed_websites) || [];
326
329
  const result = await callGrokEnhanced(messages, {
327
- model: GrokModel.GROK_4_FAST_REASONING, // Changed: Use fast reasoning with search
330
+ model: GrokModel.GROK_4_1, // Updated 2025-11-21: Use latest Grok 4.1 with search
328
331
  enableLiveSearch: true,
329
332
  searchSources: max_search_results,
330
333
  searchDomains: domains,
@@ -348,10 +351,10 @@ export function isGrokAvailable() {
348
351
  export function getGrokStatus() {
349
352
  return {
350
353
  available: isGrokAvailable(),
351
- model: GrokModel.GROK_4_FAST_REASONING,
354
+ model: GrokModel.GROK_4_1,
352
355
  features: [
353
- 'Fast reasoning (grok-4-fast-reasoning: $0.20/$0.50, 2M→4M context)',
354
- 'Code specialist (grok-code-fast-1: 92 tok/sec)',
356
+ 'Grok 4.1 (Nov 2025): Enhanced reasoning, creativity & emotional intelligence ($0.20/$0.50, 2M context)',
357
+ 'Grok 4.1 Fast: Tool-calling optimized, agentic workflows ($0.20/$0.50, 2M context)',
355
358
  'Heavy mode available (grok-4-0709: $3/$15, use sparingly)',
356
359
  'Live web search with citations',
357
360
  'Function calling',
@@ -14,10 +14,13 @@ config({ path: path.resolve(__dirname, '../../../.env') });
14
14
  // Grok API configuration
15
15
  const GROK_API_KEY = process.env.GROK_API_KEY;
16
16
  const GROK_API_URL = "https://api.x.ai/v1/chat/completions";
17
- // Available Grok models - Updated 2025-11-07 with new fast models
17
+ // Available Grok models - Updated 2025-11-21 with Grok 4.1
18
18
  export var GrokModel;
19
19
  (function (GrokModel) {
20
- // New fast models (2025) - PRIMARY USE
20
+ // Grok 4.1 models (Nov 2025) - LATEST & BEST
21
+ GrokModel["GROK_4_1"] = "grok-4.1";
22
+ GrokModel["GROK_4_1_FAST"] = "grok-4.1-fast";
23
+ // Previous fast models (2025) - Still good
21
24
  GrokModel["CODE_FAST"] = "grok-code-fast-1";
22
25
  GrokModel["GROK_4_FAST_REASONING"] = "grok-4-fast-reasoning";
23
26
  GrokModel["GROK_4_FAST"] = "grok-4-fast-non-reasoning";
@@ -28,7 +31,7 @@ export var GrokModel;
28
31
  /**
29
32
  * Call Grok API
30
33
  */
31
- export async function callGrok(messages, model = GrokModel.GROK_4_FAST_REASONING, // Changed: Use cheap fast reasoning by default
34
+ export async function callGrok(messages, model = GrokModel.GROK_4_1, // Updated 2025-11-21: Use latest Grok 4.1 by default
32
35
  temperature = 0.7, maxTokens = 16384, // Increased default for comprehensive responses
33
36
  forceVisibleOutput = true) {
34
37
  if (!GROK_API_KEY) {
@@ -44,7 +47,9 @@ forceVisibleOutput = true) {
44
47
  });
45
48
  try {
46
49
  // For Grok 4 models, we need to handle reasoning tokens specially
47
- const isGrok4 = model === GrokModel.GROK_4_FAST_REASONING ||
50
+ const isGrok4 = model === GrokModel.GROK_4_1 ||
51
+ model === GrokModel.GROK_4_1_FAST ||
52
+ model === GrokModel.GROK_4_FAST_REASONING ||
48
53
  model === GrokModel.GROK_4_FAST ||
49
54
  model === GrokModel.GROK_4_HEAVY;
50
55
  // Adjust prompt for Grok 4 to ensure visible output
@@ -113,7 +118,7 @@ export const grokReasonTool = {
113
118
  const messages = [
114
119
  {
115
120
  role: "system",
116
- content: `You are Grok, an expert at logical reasoning and problem-solving.
121
+ content: `You are Grok 4.1, an expert at logical reasoning and problem-solving with enhanced emotional intelligence.
117
122
  ${approachPrompts[approach]}.
118
123
  ${context ? `Context: ${context}` : ''}`
119
124
  },
@@ -122,8 +127,8 @@ ${context ? `Context: ${context}` : ''}`
122
127
  content: problem
123
128
  }
124
129
  ];
125
- // Use GROK_4_FAST_REASONING by default (3x cheaper!), GROK_4_HEAVY only if explicitly requested
126
- const model = useHeavy ? GrokModel.GROK_4_HEAVY : GrokModel.GROK_4_FAST_REASONING;
130
+ // Use GROK_4_1 by default (latest with enhanced reasoning!), GROK_4_HEAVY only if explicitly requested
131
+ const model = useHeavy ? GrokModel.GROK_4_HEAVY : GrokModel.GROK_4_1;
127
132
  const maxTokens = useHeavy ? 100000 : 16384; // 100k for heavy, 16k for normal reasoning
128
133
  log?.info(`Using Grok model: ${model} for deep reasoning (max tokens: ${maxTokens}, cost: ${useHeavy ? 'expensive $3/$15' : 'cheap $0.20/$0.50'})`);
129
134
  return await callGrok(messages, model, 0.7, maxTokens, true);
@@ -154,7 +159,7 @@ export const grokCodeTool = {
154
159
  const messages = [
155
160
  {
156
161
  role: "system",
157
- content: `You are Grok Code Fast, an expert programmer and code analyst.
162
+ content: `You are Grok 4.1 Fast, an expert programmer and code analyst with advanced tool-calling capabilities.
158
163
  Task: ${taskPrompts[task]}
159
164
  ${language ? `Language: ${language}` : ''}
160
165
  ${requirements ? `Requirements: ${requirements}` : ''}`
@@ -164,8 +169,8 @@ ${requirements ? `Requirements: ${requirements}` : ''}`
164
169
  content: `Code:\n\`\`\`${language || ''}\n${code}\n\`\`\``
165
170
  }
166
171
  ];
167
- log?.info(`Using Grok Code Fast (92 tok/sec coding specialist)`);
168
- return await callGrok(messages, GrokModel.CODE_FAST, 0.2, 4000, true);
172
+ log?.info(`Using Grok 4.1 Fast (2M context, enhanced reasoning, $0.20/$0.50)`);
173
+ return await callGrok(messages, GrokModel.GROK_4_1_FAST, 0.2, 4000, true);
169
174
  }
170
175
  };
171
176
  /**
@@ -43,6 +43,22 @@ export class ModelRouter {
43
43
  reasoning: 10,
44
44
  useFor: ['complex reasoning with evidence']
45
45
  }],
46
+ ['grok-4.1', {
47
+ id: 'grok-4.1',
48
+ cost: 9,
49
+ quality: 10,
50
+ speed: 7,
51
+ reasoning: 10,
52
+ useFor: ['enhanced reasoning', 'creativity', 'emotional intelligence', 'first-principles']
53
+ }],
54
+ ['grok-4.1-fast', {
55
+ id: 'grok-4.1-fast',
56
+ cost: 9,
57
+ quality: 10,
58
+ speed: 8,
59
+ reasoning: 10,
60
+ useFor: ['tool-calling', 'agentic workflows', 'code analysis', 'fast reasoning']
61
+ }],
46
62
  ['grok-4', {
47
63
  id: 'grok-4',
48
64
  cost: 9,
@@ -134,14 +150,14 @@ export class ModelRouter {
134
150
  return 'lmstudio-local';
135
151
  }
136
152
  const taskTypeMap = {
137
- 'code': task.complexity > 0.7 ? 'qwen3-coder-480b' : 'gemini-2.5-flash',
153
+ 'code': task.complexity > 0.7 ? 'qwen3-coder-480b' : 'grok-4.1-fast',
138
154
  'research': 'perplexity-sonar-pro',
139
155
  'reasoning': task.complexity > 0.5 ? 'gpt5' : 'gpt5_mini',
140
156
  'scout': 'multi-model',
141
157
  'verifier': task.complexity > 0.5 ? 'gpt5' : 'gpt5_mini',
142
158
  'challenger': 'gpt5_mini',
143
159
  'auditor': 'perplexity-sonar-pro',
144
- 'architect': 'grok-4',
160
+ 'architect': 'grok-4.1',
145
161
  'commit_guardian': 'gemini-2.5-flash'
146
162
  };
147
163
  return taskTypeMap[task.type] || this.selectByConstraints(task, constraints);
package/docs/API_KEYS.md CHANGED
@@ -116,7 +116,9 @@ Grok (by xAI) provides live web search, reasoning, and code analysis.
116
116
 
117
117
  #### Models Available
118
118
 
119
- - **grok-4** - Latest reasoning model
119
+ - **grok-4.1** - Latest (Nov 2025): Enhanced reasoning, creativity & emotional intelligence
120
+ - **grok-4.1-fast** - Tool-calling optimized: Fast inference, agentic workflows
121
+ - **grok-4** - Previous reasoning model
120
122
  - **grok-4-0709** - Specific version
121
123
  - **grok-4-heavy** - Extended context (256k tokens)
122
124
 
@@ -124,7 +126,9 @@ Grok (by xAI) provides live web search, reasoning, and code analysis.
124
126
 
125
127
  | Model | Input | Output | Notes |
126
128
  |-------|-------|--------|-------|
127
- | Grok-4 | $5.00 / 1M tokens | $15.00 / 1M tokens | Standard |
129
+ | Grok-4.1 | $0.20 / 1M tokens | $0.50 / 1M tokens | Latest & best! |
130
+ | Grok-4.1-fast | $0.20 / 1M tokens | $0.50 / 1M tokens | Tool-calling optimized |
131
+ | Grok-4 | $5.00 / 1M tokens | $15.00 / 1M tokens | Previous version |
128
132
  | Grok-4-heavy | $10.00 / 1M tokens | $30.00 / 1M tokens | 256k context |
129
133
  | **Live Search** | **$5 / 1k sources** | - | Extra cost per search! |
130
134
 
@@ -514,7 +514,7 @@ perplexity_reason({
514
514
 
515
515
  ### grok_search
516
516
 
517
- Cost-optimized web search using Grok-4's live search with advanced filtering.
517
+ Cost-optimized web search using Grok-4.1's live search with advanced filtering and enhanced reasoning.
518
518
 
519
519
  #### Schema
520
520
 
@@ -640,7 +640,7 @@ grok_search({
640
640
 
641
641
  ### grok_reason
642
642
 
643
- Deep logical reasoning with Grok-4 using first principles.
643
+ Deep logical reasoning with Grok-4.1 using first principles and enhanced emotional intelligence.
644
644
 
645
645
  #### Schema
646
646
 
@@ -686,7 +686,7 @@ grok_reason({
686
686
 
687
687
  ### grok_code
688
688
 
689
- Code analysis and optimization with Grok-4.
689
+ Code analysis and optimization with Grok-4.1 Fast (tool-calling optimized).
690
690
 
691
691
  #### Schema
692
692
 
@@ -738,7 +738,7 @@ grok_code({
738
738
 
739
739
  ### grok_debug
740
740
 
741
- Deep debugging assistance with Grok-4.
741
+ Deep debugging assistance with Grok-4.1 Fast.
742
742
 
743
743
  #### Schema
744
744
 
@@ -772,7 +772,7 @@ grok_debug({
772
772
 
773
773
  ### grok_architect
774
774
 
775
- System architecture and design with Grok-4.
775
+ System architecture and design with Grok-4.1.
776
776
 
777
777
  #### Schema
778
778
 
@@ -800,7 +800,7 @@ grok_architect({
800
800
 
801
801
  ### grok_brainstorm
802
802
 
803
- Creative brainstorming using Grok-4-heavy.
803
+ Creative brainstorming using Grok-4.1 with enhanced creativity and emotional intelligence.
804
804
 
805
805
  #### Schema
806
806
 
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "tachibot-mcp",
3
3
  "mcpName": "io.github.byPawel/tachibot-mcp",
4
4
  "displayName": "TachiBot MCP - Universal AI Orchestrator",
5
- "version": "2.0.5",
5
+ "version": "2.0.6",
6
6
  "type": "module",
7
7
  "main": "dist/src/server.js",
8
8
  "bin": {
package/smithery.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  # Smithery configuration file: https://smithery.ai/docs/config#smitheryyaml
2
2
  name: "tachibot-mcp"
3
- description: "Multi-model AI orchestration platform with 26 tools across Perplexity, Grok, OpenAI GPT-5, Gemini, and Qwen. Features YAML workflows, 5 token-optimized profiles (4k-19k), smart routing, and cost controls. Build complex AI pipelines with variable passing and parallel execution."
4
- version: "2.0.0"
3
+ description: "Multi-model AI orchestration platform with 31 tools across Perplexity, Grok, OpenAI GPT-5, Gemini, and Qwen. Features YAML workflows, 5 token-optimized profiles (4k-20k), smart routing, and cost controls. Build complex AI pipelines with variable passing and parallel execution."
4
+ version: "2.0.6"
5
5
 
6
6
  startCommand:
7
7
  type: stdio