tachibot-mcp 2.0.6 → 2.1.0

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.
Files changed (58) hide show
  1. package/.env.example +13 -3
  2. package/README.md +88 -44
  3. package/dist/src/config/model-constants.js +121 -91
  4. package/dist/src/config/model-defaults.js +35 -21
  5. package/dist/src/config/model-preferences.js +5 -4
  6. package/dist/src/config.js +2 -1
  7. package/dist/src/mcp-client.js +3 -3
  8. package/dist/src/modes/scout.js +2 -1
  9. package/dist/src/optimization/model-router.js +19 -16
  10. package/dist/src/orchestrator-instructions.js +1 -1
  11. package/dist/src/orchestrator-lite.js +1 -1
  12. package/dist/src/orchestrator.js +1 -1
  13. package/dist/src/profiles/balanced.js +1 -2
  14. package/dist/src/profiles/code_focus.js +1 -2
  15. package/dist/src/profiles/full.js +1 -2
  16. package/dist/src/profiles/minimal.js +1 -2
  17. package/dist/src/profiles/research_power.js +1 -2
  18. package/dist/src/server.js +13 -12
  19. package/dist/src/tools/gemini-tools.js +32 -16
  20. package/dist/src/tools/grok-enhanced.js +18 -17
  21. package/dist/src/tools/grok-tools.js +34 -20
  22. package/dist/src/tools/openai-tools.js +52 -61
  23. package/dist/src/tools/tool-router.js +53 -52
  24. package/dist/src/tools/unified-ai-provider.js +90 -9
  25. package/dist/src/tools/workflow-runner.js +16 -0
  26. package/dist/src/tools/workflow-validator-tool.js +1 -1
  27. package/dist/src/utils/api-keys.js +20 -0
  28. package/dist/src/utils/openrouter-gateway.js +117 -0
  29. package/dist/src/validators/interpolation-validator.js +4 -0
  30. package/dist/src/validators/tool-registry-validator.js +1 -1
  31. package/dist/src/validators/tool-types.js +0 -1
  32. package/dist/src/workflows/custom-workflows.js +4 -3
  33. package/dist/src/workflows/engine/VariableInterpolator.js +30 -3
  34. package/dist/src/workflows/engine/WorkflowExecutionEngine.js +2 -2
  35. package/dist/src/workflows/engine/WorkflowOutputFormatter.js +27 -4
  36. package/dist/src/workflows/fallback-strategies.js +2 -2
  37. package/dist/src/workflows/model-router.js +20 -11
  38. package/dist/src/workflows/tool-mapper.js +51 -24
  39. package/docs/API_KEYS.md +52 -18
  40. package/docs/CONFIGURATION.md +25 -8
  41. package/docs/TOOLS_REFERENCE.md +12 -48
  42. package/docs/TOOL_PARAMETERS.md +19 -16
  43. package/docs/WORKFLOWS.md +7 -7
  44. package/package.json +1 -1
  45. package/profiles/balanced.json +1 -2
  46. package/profiles/code_focus.json +1 -2
  47. package/profiles/debug_intensive.json +0 -1
  48. package/profiles/full.json +2 -3
  49. package/profiles/minimal.json +1 -2
  50. package/profiles/research_power.json +1 -2
  51. package/profiles/workflow_builder.json +1 -2
  52. package/tools.config.json +15 -3
  53. package/workflows/code-architecture-review.yaml +5 -3
  54. package/workflows/creative-brainstorm-yaml.yaml +1 -1
  55. package/workflows/pingpong.yaml +5 -3
  56. package/workflows/system/README.md +1 -1
  57. package/workflows/system/verifier.yaml +8 -5
  58. package/workflows/ultra-creative-brainstorm.yaml +3 -3
package/.env.example CHANGED
@@ -22,8 +22,11 @@ TACHIBOT_PROFILE=balanced
22
22
  # Perplexity API (for web search, research, reasoning)
23
23
  PERPLEXITY_API_KEY=
24
24
 
25
- # Grok API (for code analysis, debugging, architecture)
26
- GROK_API_KEY=
25
+ # Grok/xAI API (for code analysis, debugging, architecture)
26
+ # Get from: https://console.x.ai/
27
+ XAI_API_KEY=
28
+ # Legacy alias (both work):
29
+ # GROK_API_KEY=
27
30
 
28
31
  # OpenAI API (for GPT-5, analysis, comparison)
29
32
  OPENAI_API_KEY=
@@ -34,9 +37,16 @@ OPENAI_API_KEY=
34
37
  # Google Gemini API (for brainstorming, code/text analysis)
35
38
  GOOGLE_API_KEY=
36
39
 
37
- # OpenRouter API (for Qwen3 Coder and other models)
40
+ # OpenRouter API (for Qwen3 Coder, Kimi, and gateway mode)
38
41
  OPENROUTER_API_KEY=
39
42
 
43
+ # ===================================
44
+ # OpenRouter Gateway Mode (Optional)
45
+ # ===================================
46
+ # When enabled, routes OpenAI/Gemini/Grok through OpenRouter
47
+ # Benefits: Single API key, unified billing, automatic fallbacks
48
+ # Note: Kimi/Qwen always use OpenRouter, Perplexity always uses direct API
49
+ USE_OPENROUTER_GATEWAY=false
40
50
 
41
51
  # Anthropic API (optional - not currently used in Claude Code mode)
42
52
  # ANTHROPIC_API_KEY=
package/README.md CHANGED
@@ -1,11 +1,46 @@
1
1
  # TachiBot MCP - Universal AI Orchestrator
2
2
 
3
- [![Version](https://img.shields.io/badge/version-2.0.0-blue.svg)](https://github.com/byPawel/tachibot-mcp)
3
+ [![Version](https://img.shields.io/badge/version-2.1.0-blue.svg)](https://github.com/byPawel/tachibot-mcp)
4
4
  [![License](https://img.shields.io/badge/license-Apache%202.0-green.svg)](LICENSE)
5
5
  [![Node](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen.svg)](https://nodejs.org)
6
6
  [![MCP](https://img.shields.io/badge/MCP-Compatible-purple.svg)](https://modelcontextprotocol.io)
7
7
 
8
- Multi-model AI orchestration platform with 31 tools (32 with competitive mode), advanced workflows, and intelligent prompt engineering. Works with Claude Code, Claude Desktop, Cursor, and any MCP-compatible client.
8
+ Multi-model AI orchestration platform with 31 tools, advanced workflows, and intelligent prompt engineering. Works with Claude Code, Claude Desktop, Cursor, and any MCP-compatible client.
9
+
10
+ ---
11
+
12
+ ## 🔑 Bring Your Own Keys
13
+
14
+ **Two ways to connect — pick what works for you:**
15
+
16
+ | Mode | Keys Needed | Best For |
17
+ |------|-------------|----------|
18
+ | **Gateway Mode** | 2 keys (OpenRouter + Perplexity) | Simplicity, unified billing |
19
+ | **Direct Mode** | 5+ keys (one per provider) | Maximum control, no middleman |
20
+
21
+ ### Gateway Mode (Recommended)
22
+ Route GPT-5, Gemini, and Grok through OpenRouter — same key you need for Qwen/Kimi anyway.
23
+
24
+ ```bash
25
+ OPENROUTER_API_KEY=sk-or-xxx # GPT-5, Gemini, Grok, Qwen, Kimi
26
+ PERPLEXITY_API_KEY=pplx-xxx # Required separately (not on OpenRouter)
27
+ USE_OPENROUTER_GATEWAY=true
28
+ ```
29
+
30
+ ### Direct Mode
31
+ Use each provider's native API directly.
32
+
33
+ ```bash
34
+ OPENAI_API_KEY=sk-xxx # GPT-5
35
+ GOOGLE_API_KEY=xxx # Gemini
36
+ GROK_API_KEY=xxx # Grok
37
+ OPENROUTER_API_KEY=sk-or-xxx # Qwen, Kimi (always via OpenRouter)
38
+ PERPLEXITY_API_KEY=pplx-xxx # Perplexity
39
+ ```
40
+
41
+ Both modes work. Gateway mode just means fewer accounts to manage.
42
+
43
+ Get keys: [OpenRouter](https://openrouter.ai) | [Perplexity](https://perplexity.ai)
9
44
 
10
45
  ---
11
46
 
@@ -29,6 +64,7 @@ Multi-model AI orchestration platform with 31 tools (32 with competitive mode),
29
64
  - **31 AI Tools:** Perplexity, Grok, GPT-5, Gemini, Qwen, Kimi (32 with competitive mode)
30
65
  - **Multi-Model Reasoning:** Challenger, Verifier, Scout modes
31
66
  - **Smart Routing:** Automatic model selection for optimal results
67
+ - **OpenRouter Gateway:** Optional single API key for all providers (OpenAI, Gemini, Grok)
32
68
 
33
69
  ### 🔄 Advanced Workflows
34
70
  - **YAML-Based Workflows:** Define complex multi-step AI processes
@@ -38,10 +74,10 @@ Multi-model AI orchestration platform with 31 tools (32 with competitive mode),
38
74
 
39
75
  ### 🎯 Tool Profiles
40
76
  - **Minimal** (8 tools) - Budget-friendly, token-constrained
41
- - **Research Power** (15 tools) - Default, best balance
42
- - **Code Focus** (13 tools) - Software development
43
- - **Balanced** (17 tools) - General-purpose
44
- - **Full** (31 tools, 32 with competitive) - Maximum capability
77
+ - **Research Power** (13 tools) - Default, best balance
78
+ - **Code Focus** (15 tools) - Software development
79
+ - **Balanced** (18 tools) - General-purpose
80
+ - **Full** (31 tools, includes competitive mode) - Maximum capability
45
81
 
46
82
  ### 🔧 Developer Experience
47
83
  - **Claude Code Native** - First-class support
@@ -66,37 +102,41 @@ tachibot --version
66
102
 
67
103
  ### Setup
68
104
 
69
- 1. **Add API Keys** (at least one):
70
- ```bash
71
- cp .env.example .env
72
- # Edit .env and add your API keys
73
- ```
74
-
75
- 2. **Configure Profile** (optional):
76
- ```bash
77
- # Edit .env
78
- TACHIBOT_PROFILE=research_power # or minimal, code_focus, balanced, full
79
- ```
80
-
81
- 3. **Add to Claude Code/Desktop**:
82
- ```json
83
- {
84
- "mcpServers": {
85
- "tachibot": {
86
- "command": "tachibot",
87
- "env": {
88
- "PERPLEXITY_API_KEY": "your-key",
89
- "GROK_API_KEY": "your-key",
90
- "OPENAI_API_KEY": "your-key",
91
- "GEMINI_API_KEY": "your-key",
92
- "OPENROUTER_API_KEY": "your-key"
93
- }
94
- }
95
- }
96
- }
97
- ```
98
-
99
- 4. **Restart Claude** and you're ready! 🎉
105
+ **Option A: Single Key Mode (Recommended)**
106
+ ```json
107
+ {
108
+ "mcpServers": {
109
+ "tachibot": {
110
+ "command": "tachibot",
111
+ "env": {
112
+ "OPENROUTER_API_KEY": "sk-or-xxx",
113
+ "PERPLEXITY_API_KEY": "pplx-xxx",
114
+ "USE_OPENROUTER_GATEWAY": "true"
115
+ }
116
+ }
117
+ }
118
+ }
119
+ ```
120
+
121
+ **Option B: Direct Provider Keys**
122
+ ```json
123
+ {
124
+ "mcpServers": {
125
+ "tachibot": {
126
+ "command": "tachibot",
127
+ "env": {
128
+ "PERPLEXITY_API_KEY": "your-key",
129
+ "GROK_API_KEY": "your-key",
130
+ "OPENAI_API_KEY": "your-key",
131
+ "GOOGLE_API_KEY": "your-key",
132
+ "OPENROUTER_API_KEY": "your-key"
133
+ }
134
+ }
135
+ }
136
+ }
137
+ ```
138
+
139
+ **Restart Claude** and you're ready!
100
140
 
101
141
  See [Installation Guide](docs/INSTALLATION_BOTH.md) for detailed instructions.
102
142
 
@@ -106,9 +146,9 @@ See [Installation Guide](docs/INSTALLATION_BOTH.md) for detailed instructions.
106
146
 
107
147
  ### Core Tools
108
148
  - 🔍 **Research:** `perplexity_ask`, `perplexity_research`, `grok_search`, `scout`
109
- - 🧠 **Reasoning:** `grok_reason`, `kimi_thinking`, `openai_brainstorm`, `focus`
110
- - 💡 **Analysis:** `gemini_brainstorm`, `gemini_analyze_text`, `qwen_coder`
111
- - ✅ **Validation:** `verifier`, `challenger`
149
+ - 🧠 **Reasoning:** `grok_reason`, `openai_reason`, `perplexity_reason`, `kimi_thinking`, `focus`
150
+ - 💡 **Analysis:** `gemini_brainstorm`, `gemini_analyze_text`, `openai_brainstorm`, `qwen_coder`
151
+ - ✅ **Validation:** `verifier`*, `challenger`* (*multi-model workflows)
112
152
  - 💭 **Meta:** `think`, `nextThought`
113
153
 
114
154
  ### Advanced Modes
@@ -118,10 +158,14 @@ See [Installation Guide](docs/INSTALLATION_BOTH.md) for detailed instructions.
118
158
  - **Verifier** - Multi-model consensus verification
119
159
 
120
160
  ### Workflows
121
- - **Ultra Creative Brainstorm** - 15 steps, 10 techniques
122
- - **Iterative Problem Solver** - Research → Analyze → Solve
161
+ - **Ultra Creative Brainstorm** - 15 steps, 10 prompt techniques
123
162
  - **Code Architecture Review** - Systematic code analysis
163
+ - **Code Review** - PR and code review workflow
164
+ - **UX Research Flow** - User experience research
124
165
  - **Accessibility Audit** - WCAG compliance checking
166
+ - **Creative Brainstorm** - Quick ideation workflow
167
+ - **PingPong** - Multi-model debate/collaboration
168
+ - **System Workflows** - `verifier`, `challenger`, `scout`
125
169
  - **Custom Workflows** - Build your own in YAML
126
170
 
127
171
  ---
@@ -183,7 +227,7 @@ We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
183
227
 
184
228
  ## 📄 License
185
229
 
186
- Apache License 2.0 - see [LICENSE](LICENSE) for details.
230
+ AGPL-3.0 - see [LICENSE](LICENSE) for details.
187
231
 
188
232
  ---
189
233
 
@@ -196,6 +240,6 @@ Apache License 2.0 - see [LICENSE](LICENSE) for details.
196
240
 
197
241
  ---
198
242
 
199
- **Made with ❤️ by the TachiBot Team**
243
+ **Made with ❤️ by [@byPawel](https://github.com/byPawel)**
200
244
 
201
245
  *Transform your AI workflow with intelligent multi-model orchestration.*
@@ -1,30 +1,37 @@
1
1
  /**
2
2
  * Centralized Model Names and Constants
3
+ * Named by PROVIDER (not model version) for consistency and future-proofing
3
4
  * Use these constants instead of hardcoded strings in workflows and tools
4
5
  */
5
- // OpenAI GPT-5.1 Models (November 2025)
6
- export const GPT51_MODELS = {
7
- FULL: "gpt-5.1", // Full reasoning model ($1.25/$10 per 1M tokens)
8
- CODEX_MINI: "gpt-5.1-codex-mini", // Coding optimized, cost-efficient ($0.25/$2 per 1M tokens) - DEFAULT
9
- CODEX: "gpt-5.1-codex", // Advanced coding ($1.25/$10 per 1M tokens)
6
+ // =============================================================================
7
+ // OPENAI MODELS (provider-based naming)
8
+ // =============================================================================
9
+ // NOTE: Codex models use /v1/responses endpoint, non-codex use /v1/chat/completions
10
+ export const OPENAI_MODELS = {
11
+ // General purpose (use /v1/chat/completions)
12
+ FULL: "gpt-5.1", // Flagship: reasoning/fallback ($10/$30, 2M context)
13
+ PRO: "gpt-5-pro", // Premium: complex orchestration ($20/$60, 4M context)
14
+ // Code specialized (use /v1/responses endpoint!)
15
+ CODEX_MINI: "gpt-5.1-codex-mini", // Workhorse: 70-80% of code tasks ($2/$6, 256K)
16
+ CODEX: "gpt-5.1-codex", // Power: complex code tasks ($15/$45, 1M context)
17
+ CODEX_MAX: "gpt-5.1-codex-max", // Frontier: deep analysis & multi-file refactoring
10
18
  };
11
- // GPT-5.1 Reasoning Effort Levels
12
- export const GPT51_REASONING = {
19
+ // OpenAI Reasoning Effort Levels (for models that support it)
20
+ export const OPENAI_REASONING = {
13
21
  NONE: "none", // No extra reasoning (fastest, cheapest)
14
22
  LOW: "low", // Light reasoning
15
23
  MEDIUM: "medium", // Balanced reasoning (default)
16
24
  HIGH: "high", // Maximum reasoning (slowest, most thorough)
17
25
  };
18
- // OpenAI GPT-4 Models (Legacy - mapped to GPT-5.1)
19
- export const GPT4_MODELS = {
20
- O_MINI: "gpt-5.1-codex-mini", // Cost-efficient
21
- O: "gpt-5.1", // Current best
22
- _1_MINI: "gpt-4.1-mini", // Best value with 1M context
23
- };
24
- // Google Gemini Models (2025)
26
+ // =============================================================================
27
+ // GEMINI MODELS (Google)
28
+ // =============================================================================
25
29
  export const GEMINI_MODELS = {
26
- FLASH: "gemini-2.5-flash", // Latest fast model
27
- PRO: "gemini-2.5-pro", // Most advanced reasoning
30
+ // Gemini 3 (November 2025 - Latest)
31
+ GEMINI_3_PRO: "gemini-3-pro-preview", // Latest: structured outputs & multimodal, 1M context
32
+ // Gemini 2.5 (Previous generation - still available)
33
+ FLASH: "gemini-2.5-flash", // Fast model
34
+ PRO: "gemini-2.5-pro", // Advanced reasoning
28
35
  FLASH_LITE: "gemini-2.5-flash-lite", // Cost-effective
29
36
  };
30
37
  // Perplexity Models
@@ -32,12 +39,12 @@ export const PERPLEXITY_MODELS = {
32
39
  SONAR_PRO: "sonar-pro", // Main search model
33
40
  SONAR_REASONING: "sonar-reasoning-pro", // Reasoning model
34
41
  };
35
- // Grok Models (xAI) - Updated 2025-11-21 with Grok 4.1
42
+ // Grok Models (xAI) - Updated 2025-11-22 with correct API model names
36
43
  export const GROK_MODELS = {
37
44
  // 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
45
+ _4_1_FAST_REASONING: "grok-4-1-fast-reasoning", // Latest: 2M context, $0.20/$0.50, enhanced reasoning
46
+ _4_1_FAST_NON_REASONING: "grok-4-1-fast-non-reasoning", // Tool-calling optimized: 2M context, $0.20/$0.50
47
+ // Grok 4 fast models (2025) - Still good
41
48
  CODE_FAST: "grok-code-fast-1", // Coding specialist: 256K→2M, $0.20/$1.50, 92 tok/sec
42
49
  _4_FAST_REASONING: "grok-4-fast-reasoning", // Cheap reasoning: 2M→4M, $0.20/$0.50
43
50
  _4_FAST: "grok-4-fast-non-reasoning", // Fast general: 2M→4M, $0.20/$0.50
@@ -45,18 +52,43 @@ export const GROK_MODELS = {
45
52
  _4_HEAVY: "grok-4-0709", // Multi-agent: 256K→2M, $3/$15 (expensive!)
46
53
  _3: "grok-3", // Legacy with search: 256K→2M
47
54
  };
48
- // Kimi Models (Moonshot AI via OpenRouter) - Added 2025-11-07
55
+ // Kimi Models (Moonshot AI via OpenRouter)
49
56
  export const KIMI_MODELS = {
50
57
  K2_THINKING: "moonshotai/kimi-k2-thinking", // 1T MoE, 32B active - Leading open-source agentic reasoning (256k context)
51
58
  };
59
+ // Qwen Models (Alibaba via OpenRouter)
60
+ export const QWEN_MODELS = {
61
+ CODER_PLUS: "qwen/qwen3-coder-plus", // Code specialist (32K context)
62
+ CODER: "qwen/qwen3-coder", // Standard coder
63
+ QWQ_32B: "qwen/qwq-32b", // Deep reasoning
64
+ };
65
+ // =============================================================================
66
+ // OPENROUTER MODELS (Unified - all models accessible via OpenRouter)
67
+ // =============================================================================
68
+ export const OPENROUTER_MODELS = {
69
+ // Qwen models
70
+ ...QWEN_MODELS,
71
+ // Kimi models
72
+ ...KIMI_MODELS,
73
+ };
74
+ // =============================================================================
75
+ // PROVIDERS - All provider constants in one place
76
+ // =============================================================================
77
+ export const PROVIDERS = {
78
+ openai: OPENAI_MODELS,
79
+ google: GEMINI_MODELS,
80
+ xai: GROK_MODELS,
81
+ perplexity: PERPLEXITY_MODELS,
82
+ openrouter: OPENROUTER_MODELS,
83
+ };
52
84
  // All models combined for validation
53
85
  export const ALL_MODELS = {
54
- ...GPT51_MODELS,
55
- ...GPT4_MODELS,
86
+ ...OPENAI_MODELS,
56
87
  ...GEMINI_MODELS,
57
88
  ...PERPLEXITY_MODELS,
58
89
  ...GROK_MODELS,
59
90
  ...KIMI_MODELS,
91
+ ...QWEN_MODELS,
60
92
  };
61
93
  // Common workflow settings
62
94
  export const DEFAULT_WORKFLOW_SETTINGS = {
@@ -65,154 +97,152 @@ export const DEFAULT_WORKFLOW_SETTINGS = {
65
97
  retries: 3,
66
98
  timeout: 30000, // 30 seconds
67
99
  };
68
- // Tool-specific defaults for ALL tools
100
+ // ============================================================================
101
+ // CURRENT_MODELS - SINGLE BUMP POINT FOR MODEL VERSIONS
102
+ // ============================================================================
103
+ // When new models release, update ONLY this section!
104
+ // All tools automatically use the new models.
105
+ // ============================================================================
106
+ export const CURRENT_MODELS = {
107
+ openai: {
108
+ reason: OPENAI_MODELS.PRO, // Deep reasoning
109
+ brainstorm: OPENAI_MODELS.FULL, // Creative ideation
110
+ code: OPENAI_MODELS.CODEX_MINI, // Code tasks (cheap & fast)
111
+ explain: OPENAI_MODELS.CODEX_MINI, // Explanations
112
+ },
113
+ grok: {
114
+ reason: GROK_MODELS._4_1_FAST_REASONING,
115
+ code: GROK_MODELS._4_1_FAST_NON_REASONING,
116
+ debug: GROK_MODELS._4_1_FAST_NON_REASONING,
117
+ brainstorm: GROK_MODELS._4_1_FAST_REASONING,
118
+ search: GROK_MODELS._4_1_FAST_REASONING,
119
+ architect: GROK_MODELS._4_1_FAST_REASONING,
120
+ },
121
+ gemini: {
122
+ default: GEMINI_MODELS.GEMINI_3_PRO,
123
+ },
124
+ perplexity: {
125
+ search: PERPLEXITY_MODELS.SONAR_PRO,
126
+ reason: PERPLEXITY_MODELS.SONAR_REASONING,
127
+ },
128
+ openrouter: {
129
+ kimi: KIMI_MODELS.K2_THINKING,
130
+ qwen: QWEN_MODELS.CODER_PLUS,
131
+ }
132
+ };
133
+ // Tool-specific defaults - References CURRENT_MODELS for easy bumping
69
134
  export const TOOL_DEFAULTS = {
70
- // OpenAI GPT-5.1 tools
71
- openai_gpt5_reason: {
72
- model: GPT51_MODELS.FULL,
73
- reasoning_effort: GPT51_REASONING.HIGH,
135
+ // OpenAI tools
136
+ openai_reason: {
137
+ model: CURRENT_MODELS.openai.reason,
138
+ reasoning_effort: OPENAI_REASONING.HIGH,
74
139
  maxTokens: 4000,
75
140
  temperature: 0.7,
76
141
  },
77
142
  openai_brainstorm: {
78
- model: GPT51_MODELS.CODEX_MINI,
79
- reasoning_effort: GPT51_REASONING.MEDIUM,
143
+ model: CURRENT_MODELS.openai.brainstorm,
144
+ reasoning_effort: OPENAI_REASONING.MEDIUM,
80
145
  maxTokens: 2000,
81
146
  temperature: 0.9,
82
147
  },
83
- openai_compare: {
84
- model: GPT51_MODELS.CODEX_MINI,
85
- reasoning_effort: GPT51_REASONING.LOW,
86
- maxTokens: 2000,
87
- temperature: 0.7,
88
- },
89
148
  openai_code_review: {
90
- model: GPT51_MODELS.CODEX_MINI,
91
- reasoning_effort: GPT51_REASONING.MEDIUM,
149
+ model: CURRENT_MODELS.openai.code,
150
+ reasoning_effort: OPENAI_REASONING.MEDIUM,
92
151
  maxTokens: 2000,
93
152
  temperature: 0.3,
94
153
  },
95
154
  openai_explain: {
96
- model: GPT51_MODELS.CODEX_MINI,
97
- reasoning_effort: GPT51_REASONING.LOW,
155
+ model: CURRENT_MODELS.openai.explain,
156
+ reasoning_effort: OPENAI_REASONING.LOW,
98
157
  maxTokens: 1500,
99
158
  temperature: 0.7,
100
159
  },
101
160
  // Gemini tools
102
- gemini_query: {
103
- model: GEMINI_MODELS.PRO,
104
- maxTokens: 2048,
105
- temperature: 0.7,
106
- },
107
161
  gemini_brainstorm: {
108
- model: GEMINI_MODELS.PRO,
162
+ model: CURRENT_MODELS.gemini.default,
109
163
  maxTokens: 2048,
110
164
  temperature: 0.9,
111
165
  },
112
166
  gemini_analyze_code: {
113
- model: GEMINI_MODELS.PRO,
167
+ model: CURRENT_MODELS.gemini.default,
114
168
  maxTokens: 2048,
115
169
  temperature: 0.3,
116
170
  },
117
171
  gemini_analyze_text: {
118
- model: GEMINI_MODELS.PRO,
172
+ model: CURRENT_MODELS.gemini.default,
119
173
  maxTokens: 2048,
120
174
  temperature: 0.5,
121
175
  },
122
176
  // Perplexity tools
123
177
  perplexity_ask: {
124
- model: PERPLEXITY_MODELS.SONAR_PRO,
178
+ model: CURRENT_MODELS.perplexity.search,
125
179
  maxTokens: 2000,
126
180
  temperature: 0.7,
127
181
  },
128
182
  perplexity_reason: {
129
- model: PERPLEXITY_MODELS.SONAR_REASONING,
183
+ model: CURRENT_MODELS.perplexity.reason,
130
184
  maxTokens: 4000,
131
185
  temperature: 0.7,
132
186
  },
133
187
  perplexity_research: {
134
- model: PERPLEXITY_MODELS.SONAR_PRO,
188
+ model: CURRENT_MODELS.perplexity.search,
135
189
  maxTokens: 3000,
136
190
  temperature: 0.7,
137
191
  },
138
- // Grok tools - UPDATED 2025-11-21 with Grok 4.1
139
- grok: {
140
- model: GROK_MODELS._4_1, // Latest: Enhanced reasoning & creativity
141
- maxTokens: 4000,
142
- temperature: 0.7,
143
- },
192
+ // Grok tools
144
193
  grok_reason: {
145
- model: GROK_MODELS._4_1, // Latest: Enhanced reasoning with lower hallucination
194
+ model: CURRENT_MODELS.grok.reason,
146
195
  maxTokens: 8000,
147
196
  temperature: 0.7,
148
197
  },
149
198
  grok_code: {
150
- model: GROK_MODELS._4_1_FAST, // Tool-calling optimized, better than code-fast-1
199
+ model: CURRENT_MODELS.grok.code,
151
200
  maxTokens: 4000,
152
201
  temperature: 0.3,
153
202
  },
154
203
  grok_search: {
155
- model: GROK_MODELS._4_1, // Latest with enhanced reasoning
204
+ model: CURRENT_MODELS.grok.search,
156
205
  maxTokens: 3000,
157
206
  temperature: 0.7,
158
207
  },
159
208
  grok_brainstorm: {
160
- model: GROK_MODELS._4_1, // Latest: Enhanced creativity & emotional intelligence
209
+ model: CURRENT_MODELS.grok.brainstorm,
161
210
  maxTokens: 4000,
162
211
  temperature: 0.9,
163
212
  },
164
213
  grok_architect: {
165
- model: GROK_MODELS._4_1, // Latest: Enhanced architecture reasoning
214
+ model: CURRENT_MODELS.grok.architect,
166
215
  maxTokens: 4000,
167
216
  temperature: 0.6,
168
217
  },
169
218
  grok_debug: {
170
- model: GROK_MODELS._4_1_FAST, // Tool-calling optimized for debugging
219
+ model: CURRENT_MODELS.grok.debug,
171
220
  maxTokens: 3000,
172
221
  temperature: 0.3,
173
222
  },
174
- // Qwen tools (via OpenRouter)
223
+ // OpenRouter tools
175
224
  qwen_coder: {
176
225
  maxTokens: 4000,
177
226
  temperature: 0.5,
178
227
  },
179
- // Kimi tools (via OpenRouter)
180
228
  kimi_thinking: {
181
- model: KIMI_MODELS.K2_THINKING,
182
- maxTokens: 16000, // Large for detailed reasoning chains
183
- temperature: 0.7, // Higher for creative reasoning
229
+ model: CURRENT_MODELS.openrouter.kimi,
230
+ maxTokens: 16000,
231
+ temperature: 0.7,
184
232
  },
185
- // Meta tools (think, focus, code_reviewer, etc.)
233
+ // Meta tools
186
234
  think: {
187
- model: GPT51_MODELS.FULL,
188
- reasoning_effort: GPT51_REASONING.HIGH,
235
+ model: CURRENT_MODELS.openai.reason,
236
+ reasoning_effort: OPENAI_REASONING.HIGH,
189
237
  maxTokens: 500,
190
238
  temperature: 0.7,
191
239
  },
192
240
  focus: {
193
- model: GPT51_MODELS.CODEX_MINI,
194
- reasoning_effort: GPT51_REASONING.LOW,
241
+ model: CURRENT_MODELS.openai.code,
242
+ reasoning_effort: OPENAI_REASONING.LOW,
195
243
  maxTokens: 2000,
196
244
  temperature: 0.8,
197
245
  },
198
- code_reviewer: {
199
- model: GPT51_MODELS.CODEX_MINI,
200
- reasoning_effort: GPT51_REASONING.MEDIUM,
201
- maxTokens: 2000,
202
- temperature: 0.5,
203
- },
204
- test_architect: {
205
- model: GPT51_MODELS.CODEX_MINI,
206
- reasoning_effort: GPT51_REASONING.MEDIUM,
207
- maxTokens: 2000,
208
- temperature: 0.6,
209
- },
210
- documentation_writer: {
211
- model: GPT51_MODELS.CODEX_MINI,
212
- reasoning_effort: GPT51_REASONING.LOW,
213
- maxTokens: 2000,
214
- temperature: 0.7,
215
- },
216
246
  };
217
247
  // Default tool to use in workflows if not specified
218
248
  export const DEFAULT_WORKFLOW_TOOL = "openai_brainstorm";
@@ -5,53 +5,67 @@
5
5
  * with smart defaults that balance cost and quality.
6
6
  *
7
7
  * Environment variables allow users to override defaults via Claude Desktop config.
8
+ *
9
+ * DRY: Imports model names from model-constants.ts - update there to bump versions.
10
+ */
11
+ import { GEMINI_MODELS, OPENAI_MODELS, GROK_MODELS, PERPLEXITY_MODELS, KIMI_MODELS, QWEN_MODELS } from './model-constants.js';
12
+ /**
13
+ * Default model selections by provider
14
+ * Strategy: Always use latest models (quality over cost)
15
+ * Update model-constants.ts to bump versions
8
16
  */
17
+ const MODELS = {
18
+ // Google Gemini
19
+ GEMINI: GEMINI_MODELS.GEMINI_3_PRO, // gemini-3-pro-preview
20
+ // OpenAI
21
+ OPENAI: OPENAI_MODELS.CODEX_MINI, // gpt-5.1-codex-mini (default)
22
+ OPENAI_REASON: OPENAI_MODELS.FULL, // gpt-5.1 (deep reasoning)
23
+ // xAI Grok
24
+ GROK: GROK_MODELS._4_1_FAST_REASONING, // grok-4-1-fast-reasoning
25
+ // Perplexity
26
+ PERPLEXITY: PERPLEXITY_MODELS.SONAR_PRO, // sonar-pro
27
+ PERPLEXITY_REASON: PERPLEXITY_MODELS.SONAR_REASONING, // sonar-reasoning-pro
28
+ // OpenRouter
29
+ QWEN: QWEN_MODELS.CODER_PLUS, // qwen/qwen3-coder-plus
30
+ KIMI: KIMI_MODELS.K2_THINKING, // moonshotai/kimi-k2-thinking
31
+ };
9
32
  /**
10
33
  * Get Scout model configuration
11
- *
12
- * Defaults:
13
- * - quick_scout: Flash + gpt-5.1-codex-mini (speed + cost efficient)
14
- * - research_scout: Pro + gpt-5.1-codex-mini (quality + cost balance)
34
+ * All variants use Gemini 3 Pro (latest & best)
15
35
  */
16
36
  export function getScoutModels() {
17
37
  const quick = process.env.SCOUT_QUICK_MODELS?.split(',').map(m => m.trim()) ||
18
- ['qwen/qwen3-coder-plus', 'gemini-2.5-flash', 'gpt-5.1-codex-mini'];
38
+ [MODELS.QWEN, MODELS.GEMINI, MODELS.OPENAI];
19
39
  const research = process.env.SCOUT_RESEARCH_MODELS?.split(',').map(m => m.trim()) ||
20
- ['qwen/qwen3-coder-plus', 'gemini-2.5-pro', 'gpt-5.1-codex-mini'];
40
+ [MODELS.QWEN, MODELS.GEMINI, MODELS.OPENAI];
21
41
  return { quick, research };
22
42
  }
23
43
  /**
24
44
  * Get Challenger model configuration
25
- *
26
- * Defaults: Pro + gpt-5.1-codex-mini (quality for critical analysis, cost efficient)
45
+ * Uses Gemini 3 Pro for critical analysis
27
46
  */
28
47
  export function getChallengerModels() {
29
48
  return process.env.CHALLENGER_MODELS?.split(',').map(m => m.trim()) ||
30
- ['qwen/qwen3-coder-plus', 'gemini-2.5-pro', 'gpt-5.1-codex-mini'];
49
+ [MODELS.QWEN, MODELS.GEMINI, MODELS.OPENAI];
31
50
  }
32
51
  /**
33
52
  * Get Verifier model configuration
34
- *
35
- * Defaults:
36
- * - quick_verify: Flash + gpt-5.1-codex-mini (fast checks, cost efficient)
37
- * - standard modes: Pro + gpt-5.1-codex-mini (quality + cost balance)
38
- * - deep_verify: Pro + gpt-5.1 (maximum quality for critical verification)
53
+ * All variants use Gemini 3 Pro; deep uses gpt-5.1 for max reasoning
39
54
  */
40
55
  export function getVerifierModels() {
41
56
  const quick = process.env.VERIFIER_QUICK_MODELS?.split(',').map(m => m.trim()) ||
42
- ['qwen/qwen3-coder-plus', 'gemini-2.5-flash', 'gpt-5.1-codex-mini'];
57
+ [MODELS.QWEN, MODELS.GEMINI, MODELS.OPENAI];
43
58
  const deep = process.env.VERIFIER_DEEP_MODELS?.split(',').map(m => m.trim()) ||
44
- ['qwen/qwen3-coder-plus', 'gemini-2.5-pro', 'gpt-5.1'];
59
+ [MODELS.QWEN, MODELS.GEMINI, MODELS.OPENAI_REASON];
45
60
  const standard = process.env.VERIFIER_STANDARD_MODELS?.split(',').map(m => m.trim()) ||
46
- ['qwen/qwen3-coder-plus', 'gemini-2.5-pro', 'gpt-5.1-codex-mini'];
61
+ [MODELS.QWEN, MODELS.GEMINI, MODELS.OPENAI];
47
62
  return { quick, deep, standard };
48
63
  }
49
64
  /**
50
- * Get default fallback models (used when variant has no specific config)
51
- *
52
- * Default: Pro + gpt-5.1-codex-mini (balanced quality and cost)
65
+ * Get default fallback models
66
+ * Uses Gemini 3 Pro + codex-mini
53
67
  */
54
68
  export function getDefaultModels() {
55
69
  return process.env.DEFAULT_MODELS?.split(',').map(m => m.trim()) ||
56
- ['qwen/qwen3-coder-plus', 'gemini-2.5-pro', 'gpt-5.1-codex-mini'];
70
+ [MODELS.QWEN, MODELS.GEMINI, MODELS.OPENAI];
57
71
  }