tachibot-mcp 2.34.0 → 2.35.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 +60 -0
- package/README.md +35 -8
- package/dist/src/cli/init.js +1 -1
- package/dist/src/config/model-constants.js +75 -37
- package/dist/src/config/model-defaults.js +1 -1
- package/dist/src/config/timeout-config.js +5 -1
- package/dist/src/modes/architect.js +6 -5
- package/dist/src/modes/code-reviewer.js +3 -1
- package/dist/src/modes/commit-guardian.js +3 -1
- package/dist/src/modes/documentation-writer.js +3 -1
- package/dist/src/modes/scout.js +2 -2
- package/dist/src/optimization/model-router.js +10 -5
- package/dist/src/optimization/token-optimizer.js +2 -1
- package/dist/src/orchestrators/collaborative/services/tool-execution/ToolExecutionService.js +18 -2
- package/dist/src/profiles/balanced.js +2 -1
- package/dist/src/profiles/code_focus.js +3 -2
- package/dist/src/profiles/full.js +2 -1
- package/dist/src/profiles/heavy_coding.js +3 -2
- package/dist/src/profiles/minimal.js +2 -1
- package/dist/src/profiles/research_power.js +3 -2
- package/dist/src/tools/gemini-tools.js +29 -2
- package/dist/src/tools/grok-enhanced.js +53 -26
- package/dist/src/tools/grok-search-lite-tool.js +5 -3
- package/dist/src/tools/grok-tools.js +18 -11
- package/dist/src/tools/jev-tool.js +105 -0
- package/dist/src/tools/jury-tool.js +16 -16
- package/dist/src/tools/openai-tools.js +34 -13
- package/dist/src/tools/openrouter-tools.js +76 -67
- package/dist/src/tools/planner-tools.js +66 -28
- package/dist/src/tools/provider-catalog.js +2 -2
- package/dist/src/tools/registry.js +6 -4
- package/dist/src/tools/unified-ai-provider.js +2 -1
- package/dist/src/tools/workflow-validator-tool.js +13 -19
- package/dist/src/utils/ansi-styles.js +8 -0
- package/dist/src/utils/fallback-policy.js +47 -0
- package/dist/src/utils/file-reader.js +19 -8
- package/dist/src/utils/judge-runner.js +12 -5
- package/dist/src/utils/provider-failure.js +6 -1
- package/dist/src/validators/output-usage-validator.js +9 -1
- package/dist/src/workflows/engine/WorkflowExecutionEngine.js +7 -4
- package/dist/src/workflows/engine/WorkflowHelpers.js +83 -10
- package/dist/src/workflows/engine/handlers/StepExecutionHandler.js +2 -9
- package/dist/src/workflows/step-guard.js +103 -0
- package/dist/src/workflows/tool-mapper.js +131 -8
- package/docs/TOOLS_REFERENCE.md +39 -30
- package/docs/TOOL_PARAMETERS.md +6 -6
- package/docs/TOOL_PROFILES.md +13 -13
- package/docs/superpowers/plans/2026-09-29-model-watch-and-config.md +723 -0
- package/package.json +1 -1
- package/profiles/balanced.json +2 -2
- package/profiles/code_focus.json +3 -3
- package/profiles/full.json +2 -2
- package/profiles/heavy_coding.json +3 -3
- package/profiles/minimal.json +2 -2
- package/profiles/research_power.json +3 -3
- package/skills/council/SKILL.md +96 -27
- package/skills/prompt/SKILL.md +11 -0
- package/skills/review/SKILL.md +17 -2
- package/skills/write/SKILL.md +27 -5
- package/tools.config.json +2 -5
- package/workflows/accessibility-code-audit.yaml +1 -1
- package/workflows/jev-gated-answer.yaml +59 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,66 @@ All notable changes to TachiBot MCP will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [2.35.1] - 2026-10-15
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- **The planner's code-analysis step now runs on DeepSeek V4 Pro** (`deepseek_reason`) instead of Qwen3-Coder-Next (`qwen_coder`, an 80B/3B-active MoE at $0.14/$0.80). That step was the one small model in a council of flagships (Grok 4.7, Kimi K3, GPT-6 Astra, Qwen3.8 Max, Gemini 4 Argon), and it adds a sixth lab to the plan. In a live check, DeepSeek V4 Pro scored a sample Express handler on quality, security and performance in about 29s. Set `TACHI_PLANNER_TIER=standard` to switch back to the cheaper lineup. The variable is read at call time.
|
|
12
|
+
- **The jury's GPT juror is pinned to `gpt-6.1-sol`** ($2/$10). Since v2.14.7 it had passed no model, so it silently got `callOpenAI`'s cheap default, which is now `gpt-6-luna` ($0.10/$0.50, weak recall on long inputs). Override it with `TACHI_JURY_OPENAI_MODEL`, for example `gpt-6-astra`.
|
|
13
|
+
- **Planner prompts call the analysis "CODE ANALYSIS"** instead of "QWEN'S ANALYSIS", so later models aren't told the wrong author. The prior key stays `analyze_qwen` for compatibility.
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
- **The planner no longer hands the agent a tool that its profile doesn't register.** `code_focus` includes `planner_maker` but not `qwen_reason`, so the draft-synthesis step and the `planner_runner` 50% gate pointed at a missing tool. Both now fall back to `deepseek_reason`, and the analysis step falls back to `qwen_coder`.
|
|
17
|
+
- **The `planner_runner` 50% gate now sends `{problem, approach}`**, matching the reasoning tools' schema, instead of `{query}`.
|
|
18
|
+
- **The `kimi_decompose` step description said "Kimi K2.5".** It now says Kimi K3, the model it actually calls.
|
|
19
|
+
|
|
20
|
+
### Security
|
|
21
|
+
- **The workflow step guard now validates paths with the file reader's own parsing.** In 2.35.0 the guard parsed `files` separately from the reader, so `foo:5` could open a symlink out of the repo and `.` could expand to `credentials.json`. Every file the reader would open is now checked, and hidden path segments (`.env`, `.git`, `.ssh`…) are refused.
|
|
22
|
+
|
|
23
|
+
## [2.35.0] - 2026-10-14
|
|
24
|
+
|
|
25
|
+
Every model ID below was verified on 2026-10-14 against the provider's live model listing and with real calls through the built tools (16/16 tool paths pass).
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
- **Gemini reasoning/judge default is now Gemini 4 Argon (`gemini-4-argon`)**, GA Oct 13, 2026. Pricing is $2/$10 per 1M tokens through Nov 30, 2026, then **$4/$20 from Dec 1**. Thinking tokens bill as output. Context is 1M in, but output is capped at **32K** (3.x Pro allowed 65K), so `callGemini` clamps the budget. No current caller asks for more than 18K.
|
|
29
|
+
- **Gemini Pro model is switchable without a code change.** Set `TACHI_GEMINI_PRO_MODEL=gemini-3.1-pro-preview` to roll back. The value is read at call time (`getGeminiProModel()`; `GEMINI_MODELS.PRO` / `GEMINI_3_PRO` and `CURRENT_MODELS.gemini.default` are getters), so a value in `.env` is honoured even though the constants module loads before dotenv runs. On any Argon failure (a key or region without access returns a non-retryable 403/404), `callGemini` falls back to `gemini-3.1-pro-preview` and then degrades to Flash. Legacy modes that hardcoded `gemini-3.1-pro-preview` (commit guardian, code reviewer, documentation writer, scout, architect, token optimizer) now follow the switch.
|
|
30
|
+
- **OpenAI `SOL` tier is `gpt-6.1-sol`** (Sep 29, 2026, same $2/$10). `gpt-6-sol` stays as its fallback (`SOL_6_0`). Astra's fallback chain is now astra → 6.1-sol → 6-sol → 5.6-terra.
|
|
31
|
+
- **`openai_search` moved from `gpt-5.6-terra` to `gpt-6.1-sol`**, which is cheaper ($2/$10 vs $2/$12). On a fresh-news query terra answered with a minor Ads update, while 6.1-sol found the actual launch.
|
|
32
|
+
- **`grok_search` moved from `grok-4.6` to `grok-4.7`.** This reverses the Sep 29 call. Across 3 queries 4.7 returned 19 / 79 / 2 unique citations vs 4.6's 2 / 4 / 2 and found newer facts.
|
|
33
|
+
- **`stepfun_reason` and the `stepfun` juror run `stepfun/step-5-preview`** (Oct 8, 2026: 600B/27B-active MoE, 1M ctx, $1/$2.70), falling back to `step-3.7-flash` and then `step-3.5-flash`.
|
|
34
|
+
- Also included (prepared Sep 29, first committed here): GPT-6 `sol` / `luna` tiers, `gemini-3.8-flash` as the Flash/search tier, `grok-4.7` as the Grok flagship, GLM 5.3, the DeepSeek V4.1 Flash fallback, the pinned `qwen3.8-max-0902` snapshot, and `jev_decide` registered under OpenRouter.
|
|
35
|
+
|
|
36
|
+
### Added
|
|
37
|
+
- **Fallbacks are never silent, and they can be turned off.** Whenever a different model answers than the one requested (Gemini Argon → 3.1 Pro → Flash, the OpenAI tier chain, OpenRouter `MODEL_FALLBACKS`, the Grok region fallback), the answer starts with a banner: `[degraded: <requested> unavailable — <reason>; answered by <actual>]`. The reason is plain English: model not available (retired or not routed), no access for this key/region, rate-limited or quota exhausted, timed out, provider overloaded, or invalid API key. **`TACHI_MODEL_FALLBACK=off`** turns all model swaps off, including the judge's Gemini → OpenAI escalation, and returns the requested model's own error instead. This is for users who would rather fail than be billed for, or answered by, a different (e.g. cheaper or free-tier) model.
|
|
38
|
+
- **Out of credits never falls back.** A 402, OpenAI's `insufficient_quota` or an "insufficient credits" error now stops at once with "out of credits / billing (top up the provider account)". Previously it tried every model in the chain, all of which bill the same account.
|
|
39
|
+
|
|
40
|
+
- **`jev_decide` actually loads now.** On v2.34.0 it was switched on in the profiles but never registered. It asks TypeSafe Jev (`typesafe/jev-1.13`, through OpenRouter's System One endpoint) typed questions: `noul` for a yes/no probability, `choice` to pick an option, `score` to rate on a scale. You get calibrated probabilities back as JSON, for about $0.00002 per call in under a second.
|
|
41
|
+
- **Workflows can branch on Jev decisions.** Step conditions now support dotted paths and `== != > >= < <=`, and read into JSON step outputs, e.g. `if: "gate.answers.grounded.noul < 0.6"`. New `workflows/jev-gated-answer.yaml`: a Perplexity answer, then a Jev check that it is grounded in sources, then Grok research and a Gemini revision only if that check fails.
|
|
42
|
+
- **Jev checks in the skills.** `/council` gets an evidence-sufficiency check after research (it caps confidence) and a calibrated pick plus risk score before the resolution, with a rule for what happens when they disagree. `/review` cross-checks its merge verdict and risk. `/prompt` ranks candidate techniques when keyword matching is weak. `/write` gains a Jev check.
|
|
43
|
+
|
|
44
|
+
### Security
|
|
45
|
+
- **Workflow steps now have a trust boundary** (`src/workflows/step-guard.ts`). Delegating workflow steps to the real tools gave any workflow YAML (`workflow({ file })` runs any path, and workflow files get shared) the same power as the user's own MCP client. Steps now:
|
|
46
|
+
- run only tools **enabled in the active profile**;
|
|
47
|
+
- may pass `files` only when every file the reader would open resolves **inside the working directory**. The guard uses the file reader's own parsing, line-range handling and directory expansion, so the two can't disagree (for example `foo:5` vs `foo`, or `.` expanding to `credentials.json`). Symlinks are followed, including into files that don't exist yet. No hidden path segment at all (`.env`, `.git`, `.ssh`, `.kube`…), no credential-looking names (`*.pem`/`*.key`, `credentials*`, `secrets*`, `id_rsa*`…), no home-relative paths. The file reader has no sandbox of its own;
|
|
48
|
+
- may not set `useHeavy`, and may point `jev_decide` only at a `typesafe/*` model;
|
|
49
|
+
- may not call the meta tools (`workflow*`, `validate_workflow*`, `list_workflows`).
|
|
50
|
+
A refused step fails visibly. Direct tool calls are unchanged.
|
|
51
|
+
|
|
52
|
+
### Changed (skills)
|
|
53
|
+
- **Jev calibration calls are now blind.** `/council`, `/review` and `/prompt` no longer show Jev other models' rankings, scores or verdicts, and list options alphabetically. With a leaked "X ranked first" hint Jev echoed it (p = 0.99); the same evidence sent blind gave that option 0.10. Otherwise its agree/dissent signal means nothing.
|
|
54
|
+
|
|
55
|
+
### Removed
|
|
56
|
+
- **`ernie_reason` and the `ernie` juror.** `baidu/ernie-4.5-vl-424b-a47b` expired from OpenRouter on Oct 8, 2026, and OpenRouter lists no Baidu model now, so every call would 404. Tool count goes from 68 to 67 (`balanced` 56, `research_power` 37, `full` 67).
|
|
57
|
+
|
|
58
|
+
### Fixed
|
|
59
|
+
- **Reasoning models could return half-finished reasoning as the answer.** When `finish_reason` is `length` with empty content, `callOpenRouter` now retries once with a larger budget and otherwise returns an explicit "incomplete" error. `deepseek_reason` and `deepseek_algo` budgets went from 8K to 32K.
|
|
60
|
+
- **Successful degraded Gemini answers were thrown away.** The `[degraded: … unavailable, answered by …]` banner contains the word "unavailable", which `isProviderFailure` matched. Every answer that Pro → Flash degradation rescued was therefore treated as a failure, and the judge escalated to a paid OpenAI call. The banner now counts as success, and the judge reports the model that actually answered.
|
|
61
|
+
- **OpenRouter model fallbacks almost never ran.** `MODEL_FALLBACKS` (K3 → K2.7-Code, DeepSeek V4 Pro → V4.1 Flash, GLM 5.3 → 5.2, StepFun 5 → 3.7, …) fired only on Alibaba's `FreeTierOnly` error, so a retired or preview model's 404, a 429 or a 5xx returned an error with its configured fallback unused. They now trigger on 404/408/429/5xx and "No endpoints found". The single hop also keeps `reasoning_effort`, which the old bare `true` flag dropped.
|
|
62
|
+
- **A juror that spent its whole budget on reasoning was still counted.** The `[OpenRouter incomplete: …]` marker is now a provider failure, so the jury drops that juror instead of synthesizing an empty opinion.
|
|
63
|
+
- **The `grok_search` timeout stopped covering the response body.** The timer was cleared as soon as headers arrived, so a stalled body read could hang forever while heartbeats hid it. Body consumption is now inside the timeout.
|
|
64
|
+
- **The Gemini Pro override was frozen at import in several places** (`model-defaults` scout/challenger/verifier, `TOOL_DEFAULTS`, and mode instances built at module load). These are now live getters.
|
|
65
|
+
- **OpenAI steps in `nextThought` could silently do nothing.** The router sent any OpenAI prompt containing a code fence to `openai_code_review`. Chain prompts carry earlier thoughts, which often contain fences, and that tool had no executor, so the step returned "[Tool openai_code_review not available …]" without calling any model. Routing now requires explicit code-review intent, and the executor case exists.
|
|
66
|
+
- **Long `grok_search` / `grok_search_lite` runs were killed by the MCP client's 60s timeout.** They now heartbeat and use a dedicated `TACHI_SEARCH_TIMEOUT` (default 5 minutes).
|
|
67
|
+
|
|
8
68
|
## [2.34.0] - 2026-09-14
|
|
9
69
|
|
|
10
70
|
### Changed
|
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
[](https://nodejs.org)
|
|
11
11
|
[](https://modelcontextprotocol.io)
|
|
12
12
|
|
|
13
|
-
**67 AI tools.
|
|
13
|
+
**67 AI tools. 11 providers. One protocol.**
|
|
14
14
|
|
|
15
15
|
Orchestrate Perplexity, Grok 4.6, GPT-6 Astra, Gemini, Qwen, Kimi K3, and MiniMax M3
|
|
16
16
|
from Claude Code, Claude Desktop, Cursor, or any MCP client.
|
|
@@ -30,6 +30,32 @@ from Claude Code, Claude Desktop, Cursor, or any MCP client.
|
|
|
30
30
|
|
|
31
31
|
## What's New
|
|
32
32
|
|
|
33
|
+
### v2.35.1
|
|
34
|
+
- **The planner's code analysis runs on DeepSeek V4 Pro** instead of Qwen3-Coder-Next, the one small model in the council. That adds a sixth lab. Set `TACHI_PLANNER_TIER=standard` for the cheaper lineup.
|
|
35
|
+
- **The jury's GPT juror is pinned to `gpt-6.1-sol`.** It had been silently getting the cheap `gpt-6-luna` default. Override with `TACHI_JURY_OPENAI_MODEL`.
|
|
36
|
+
- **Fixes:**
|
|
37
|
+
- The planner no longer points at tools its profile doesn't register (`code_focus` lacks `qwen_reason`).
|
|
38
|
+
- The `planner_runner` 50% gate now sends the right params.
|
|
39
|
+
- The workflow step guard now checks paths with the file reader's own parsing.
|
|
40
|
+
- Tool count unchanged at 67.
|
|
41
|
+
|
|
42
|
+
### v2.35.0
|
|
43
|
+
- **Gemini 4 Argon is the reasoning/judge default** (GA Oct 13). In our judge tests it was faster and cheaper than 3.1 Pro even at its Dec 1 price ($4/$20), and on a real diff it caught defects that 3.1 Pro passed as "no defects, 5/5". Switch back without a code change with `TACHI_GEMINI_PRO_MODEL=gemini-3.1-pro-preview`.
|
|
44
|
+
- **Model refresh, every ID verified live:**
|
|
45
|
+
- `gpt-6.1-sol` (SOL tier, now also `openai_search`)
|
|
46
|
+
- `grok-4.7` for `grok_search`
|
|
47
|
+
- `gemini-3.8-flash` for search and Flash
|
|
48
|
+
- `stepfun/step-5-preview`, GLM 5.3, and a DeepSeek V4.1 Flash fallback
|
|
49
|
+
- **`jev_decide` works now.** It asks TypeSafe Jev for yes/no, choice or score answers as calibrated probabilities, for about $0.00002 per call. Workflows can branch on its answers (`if: "gate.answers.grounded.noul < 0.6"`), and `/council`, `/review`, `/prompt` and `/write` use it as a calibration check.
|
|
50
|
+
- **Fallbacks are never silent, and can be turned off.** An answer from a backup model starts with `[degraded: X unavailable — <reason>; answered by Y]`. `TACHI_MODEL_FALLBACK=off` turns backup models off entirely. Running out of credits never triggers a fallback.
|
|
51
|
+
- **Fixes:**
|
|
52
|
+
- Rescued Gemini answers were being discarded.
|
|
53
|
+
- OpenRouter fallbacks fired only on a single error type.
|
|
54
|
+
- `nextThought` OpenAI steps could silently call no model.
|
|
55
|
+
- The grok search timeout ignored the response body.
|
|
56
|
+
- **Security: workflow steps have a trust boundary.** Steps run only profile-enabled tools, may read only files inside the working directory (no `..`, symlink escapes or secrets such as `.env` and keys), and can't turn on Grok Heavy.
|
|
57
|
+
- **Removed `ernie_reason`** (Baidu left OpenRouter on Oct 8). The `jev_decide` addition and `ernie_reason` removal leave the count at 67 tools.
|
|
58
|
+
|
|
33
59
|
### v2.34.0
|
|
34
60
|
- **GPT-6 Astra is the OpenAI default.** `gpt-6-astra` (Sep 3, 2026; $10/$50, 1.05M context) now backs `openai_reason`, `openai_brainstorm`, `openai_code_review`, `spec_writer`, `tachi` and the GPT reviewers in `diff_review` / `plan_critique`. Astra rolled out to a limited set of orgs first, so calls fall back to `gpt-5.6-sol`, then `gpt-5.6-terra`, when an org lacks access. `openai_explain` stays on sol — low-effort explanations don't need the flagship.
|
|
35
61
|
- **GPT-6 models could not be called at all.** `callOpenAI` only used the Responses API for names starting with `gpt-5.`, so Astra fell through to Chat Completions with `temperature: 0.7` and got a 400. `gpt-6-*` now goes to the Responses API without temperature, and the `none`/`minimal` reasoning efforts Astra rejects are sent as `low`.
|
|
@@ -156,9 +182,10 @@ Skills automatically adapt to your configured API keys. Even with just 1-2 provi
|
|
|
156
182
|
## Key Features
|
|
157
183
|
|
|
158
184
|
### Multi-Model Intelligence
|
|
159
|
-
- **
|
|
160
|
-
- **Gemini
|
|
161
|
-
- **Multi-Model Council** — planner_maker synthesizes plans from
|
|
185
|
+
- **67 AI Tools** across 11 providers — Perplexity, Grok, GPT-6, Gemini, Qwen, Kimi, MiniMax, DeepSeek, GLM (Zhipu), StepFun, TypeSafe Jev, plus free local models (Ollama / LM Studio / llama.cpp / vLLM)
|
|
186
|
+
- **Gemini 4 Argon** (`gemini-4-argon`, GA Oct 13 2026) — reasoning/judge default; set `TACHI_GEMINI_PRO_MODEL=gemini-3.1-pro-preview` to roll back. Flash/search tier is `gemini-3.8-flash`
|
|
187
|
+
- **Multi-Model Council** — planner_maker synthesizes plans from six labs into bite-sized TDD steps. Code analysis runs on DeepSeek V4 Pro; set `TACHI_PLANNER_TIER=standard` for the cheaper Qwen3-Coder-Next lineup
|
|
188
|
+
- **Jury** — the GPT juror runs on `gpt-6.1-sol`; override with `TACHI_JURY_OPENAI_MODEL` (e.g. `gpt-6-astra`)
|
|
162
189
|
- **Smart Routing** — Automatic model selection for optimal results
|
|
163
190
|
- **OpenRouter Gateway** — Optional single API key for all providers
|
|
164
191
|
|
|
@@ -176,7 +203,7 @@ Skills automatically adapt to your configured API keys. Even with just 1-2 provi
|
|
|
176
203
|
| **Code Focus** | 43 | Software development, SWE tasks |
|
|
177
204
|
| **Balanced** | 56 | General-purpose, mixed workflows |
|
|
178
205
|
| **Heavy Coding** | 59 | Max code tools + agentic workflows |
|
|
179
|
-
| **Full** (default) |
|
|
206
|
+
| **Full** (default) | 68 | Everything enabled |
|
|
180
207
|
|
|
181
208
|
### Developer Experience
|
|
182
209
|
- **Claude Code** — First-class support
|
|
@@ -262,13 +289,13 @@ See [Installation Guide](docs/INSTALLATION_BOTH.md) for detailed instructions.
|
|
|
262
289
|
`perplexity_ask` · `perplexity_reason` · `grok_search` · `grok_search_lite` · `openai_search` · `gemini_search`
|
|
263
290
|
|
|
264
291
|
### Reasoning & Planning (15)
|
|
265
|
-
`grok_reason` · `openai_reason` · `qwen_reason` · `qwq_reason` · `kimi_thinking` · `kimi_decompose` · `deepseek_reason` · `glm_reason` · `stepfun_reason` · `
|
|
292
|
+
`grok_reason` · `openai_reason` · `qwen_reason` · `qwq_reason` · `kimi_thinking` · `kimi_decompose` · `deepseek_reason` · `glm_reason` · `stepfun_reason` · `planner_maker` · `planner_runner` · `list_plans` · `spec_writer` · `blog_writer`
|
|
266
293
|
|
|
267
294
|
### Code Intelligence (11)
|
|
268
295
|
`kimi_code` · `grok_code` · `grok_debug` · `qwen_coder` · `qwen_algo` · `qwen_competitive` · `deepseek_algo` · `minimax_code` · `minimax_agent` · `testgen` · `debug_triage`
|
|
269
296
|
|
|
270
|
-
### Analysis & Judgment (
|
|
271
|
-
`gemini_analyze_text` · `gemini_analyze_code` · `gemini_judge` · `jury` · `diff_review` · `plan_critique` · `gemini_brainstorm` · `openai_brainstorm` · `openai_code_review` · `openai_explain` · `grok_brainstorm` · `grok_architect` · `security_review` · `kimi_long_context`
|
|
297
|
+
### Analysis & Judgment (15)
|
|
298
|
+
`gemini_analyze_text` · `gemini_analyze_code` · `gemini_judge` · `jury` · `diff_review` · `plan_critique` · `gemini_brainstorm` · `openai_brainstorm` · `openai_code_review` · `openai_explain` · `grok_brainstorm` · `grok_architect` · `security_review` · `jev_decide` · `kimi_long_context`
|
|
272
299
|
|
|
273
300
|
### Meta & Orchestration (6)
|
|
274
301
|
`think` · `nextThought` · `focus` · `tachi` · `doctor` · `usage_stats`
|
package/dist/src/cli/init.js
CHANGED
|
@@ -10,7 +10,7 @@ import * as path from "node:path";
|
|
|
10
10
|
import * as readline from "node:readline/promises";
|
|
11
11
|
import { fileURLToPath } from "node:url";
|
|
12
12
|
const KEYS = [
|
|
13
|
-
{ name: "OpenRouter", envVar: "OPENROUTER_API_KEY", unlocks: "DeepSeek/GLM/Kimi/Qwen/MiniMax/StepFun
|
|
13
|
+
{ name: "OpenRouter", envVar: "OPENROUTER_API_KEY", unlocks: "DeepSeek/GLM/Kimi/Qwen/MiniMax/StepFun + planner (~30 tools)" },
|
|
14
14
|
{ name: "Perplexity", envVar: "PERPLEXITY_API_KEY", unlocks: "web research tools" },
|
|
15
15
|
{ name: "Gemini / Google", envVar: "GOOGLE_API_KEY", unlocks: "Gemini tools + jury judge + diff_review/plan_critique" },
|
|
16
16
|
{ name: "OpenAI", envVar: "OPENAI_API_KEY", unlocks: "OpenAI (GPT) tools + spec_writer" },
|
|
@@ -23,13 +23,14 @@ export const OPENAI_MODELS = {
|
|
|
23
23
|
// GPT-6 Astra (Sep 3, 2026 - CURRENT)
|
|
24
24
|
DEFAULT: "gpt-6-astra", // Flagship: computer use, coding, science. $10/$50 (2x sol input)
|
|
25
25
|
ASTRA: "gpt-6-astra", // Explicit alias
|
|
26
|
-
// GPT-
|
|
27
|
-
SOL: "gpt-
|
|
26
|
+
// GPT-6 mid/budget tiers (Sep 2026). No gpt-6-terra exists — TERRA stays on 5.6.
|
|
27
|
+
SOL: "gpt-6.1-sol", // GPT-6.1 mid tier (Sep 29, 2026 DevDay): $2/$10, replaced gpt-6-sol. Astra's first fallback
|
|
28
|
+
SOL_6_0: "gpt-6-sol", // Previous mid tier (Sep 14, 2026): $2/$10 — 6.1-sol's fallback
|
|
28
29
|
TERRA: "gpt-5.6-terra", // Balanced: gpt-5.5-level at $2/$12 (Jul 30, 2026 cut: -20%)
|
|
29
|
-
LUNA: "gpt-
|
|
30
|
+
LUNA: "gpt-6-luna", // GPT-6 budget tier (Sep 14, 2026): $0.10/$0.50 (was gpt-5.6-luna $0.20/$1.20).
|
|
30
31
|
// Now ~9x cheaper than terra, not 2.5x — worth routing to it
|
|
31
32
|
// far more aggressively. (Weak long-context recall: avoid huge inputs.)
|
|
32
|
-
MINI: "gpt-
|
|
33
|
+
MINI: "gpt-6-luna", // "mini" tier successor (was gpt-5.4-mini)
|
|
33
34
|
PRO: "gpt-6-astra", // No pro API model — Astra + reasoning.effort xhigh/max (was gpt-5.5-pro $30/$180)
|
|
34
35
|
// GPT-5.5 (Apr 2026) - fallback
|
|
35
36
|
FALLBACK_5_5: "gpt-5.5",
|
|
@@ -37,13 +38,16 @@ export const OPENAI_MODELS = {
|
|
|
37
38
|
THINKING: "gpt-6-astra", // "Thinking" = flagship with high reasoning effort
|
|
38
39
|
FULL: "gpt-6-astra", // Map old FULL to DEFAULT
|
|
39
40
|
CODEX: "gpt-5.6-terra", // Coding workhorse tier
|
|
40
|
-
CODEX_MINI: "gpt-
|
|
41
|
+
CODEX_MINI: "gpt-6-luna", // Cheapest tier
|
|
41
42
|
CODEX_MAX: "gpt-6-astra", // Map old codex-max to flagship (use high effort)
|
|
42
|
-
INSTANT: "gpt-
|
|
43
|
+
INSTANT: "gpt-6-luna", // Fast tier
|
|
43
44
|
};
|
|
44
45
|
// OpenRouter model ID mapping (add prefix when using OpenRouter gateway)
|
|
45
46
|
export const OPENROUTER_PREFIX_MAP = {
|
|
46
47
|
"gpt-6-astra": "openai/",
|
|
48
|
+
"gpt-6.1-sol": "openai/",
|
|
49
|
+
"gpt-6-sol": "openai/",
|
|
50
|
+
"gpt-6-luna": "openai/",
|
|
47
51
|
"gpt-5.6-sol": "openai/",
|
|
48
52
|
"gpt-5.6-terra": "openai/",
|
|
49
53
|
"gpt-5.6-luna": "openai/",
|
|
@@ -68,26 +72,38 @@ export const OPENAI_REASONING = {
|
|
|
68
72
|
// =============================================================================
|
|
69
73
|
// GEMINI MODELS (Google)
|
|
70
74
|
// =============================================================================
|
|
75
|
+
// Gemini 4 Argon GA'd Oct 13, 2026 — the new PRO/reasoning/judge default (verified live 2026-10-14:
|
|
76
|
+
// chat + google_search grounding). $2/$10 intro through Nov 30, 2026, then $4/$20 (thinking tokens bill
|
|
77
|
+
// as output). 1M ctx in, but only 32K out (3.x Pro/Flash allow 65K) — no current caller asks for >18K.
|
|
78
|
+
// Swap back without a code change: TACHI_GEMINI_PRO_MODEL=gemini-3.1-pro-preview (read lazily, so the
|
|
79
|
+
// value from .env is honored even though this module loads before dotenv runs).
|
|
71
80
|
// Gemini 3.7 Flash GA'd Aug 13, 2026 — the new workhorse/FLASH/search tier, 1M ctx,
|
|
72
81
|
// $0.75/$3.75 intro pricing through Dec 31, 2026 (then $1.50/$7.50). 3.6 Flash
|
|
73
82
|
// (Jul 21, 2026, $1.50/$7.50) stays live as the fallback. Gemini 3.5 Flash-Lite
|
|
74
83
|
// shipped the same day ($0.30/$2.50) and replaces 3.1-flash-lite as the cheap tier.
|
|
75
84
|
// Gemini 3.5 Pro STILL has not shipped (missed its June window; "testing with partners",
|
|
76
85
|
// Gemini 4 pre-training underway — reverified via ai.google.dev Aug 29, 2026), so the
|
|
77
|
-
// reasoning
|
|
86
|
+
// reasoning default stayed on gemini-3.1-pro-preview until Argon (it is Argon's fallback now).
|
|
87
|
+
export const GEMINI_PRO_DEFAULT = "gemini-4-argon";
|
|
88
|
+
/** Active Gemini Pro-tier model: TACHI_GEMINI_PRO_MODEL override, else Gemini 4 Argon. */
|
|
89
|
+
export function getGeminiProModel() {
|
|
90
|
+
return process.env.TACHI_GEMINI_PRO_MODEL?.trim() || GEMINI_PRO_DEFAULT;
|
|
91
|
+
}
|
|
78
92
|
export const GEMINI_MODELS = {
|
|
79
|
-
//
|
|
80
|
-
GEMINI_3_PRO
|
|
81
|
-
|
|
82
|
-
|
|
93
|
+
// Pro tier — getters so the env override is read at call time, not at import time
|
|
94
|
+
get GEMINI_3_PRO() { return getGeminiProModel(); }, // Legacy key name: "the default Pro model"
|
|
95
|
+
GEMINI_4_ARGON: "gemini-4-argon", // Oct 13, 2026 GA: frontier reasoning, 1M in / 32K out, $2/$10 → $4/$20 Dec 1
|
|
96
|
+
GEMINI_3_1_PRO: "gemini-3.1-pro-preview", // Previous Pro default (Mar 2026), 65K out — Argon's fallback
|
|
97
|
+
GEMINI_3_8_FLASH: "gemini-3.8-flash", // Sep 2, 2026 - CURRENT flash/search tier, 1M ctx, $0.75/$3.75 (verified 2026-09-29)
|
|
98
|
+
GEMINI_3_7_FLASH: "gemini-3.7-flash", // GA Aug 13, 2026 - previous flash tier (fallback), $0.75/$3.75 intro
|
|
83
99
|
GEMINI_3_6_FLASH: "gemini-3.6-flash", // GA Jul 21, 2026 - previous flash tier (fallback), $1.50/$7.50
|
|
84
100
|
GEMINI_3_5_FLASH: "gemini-3.5-flash", // GA May 19, 2026 - previous flash tier (fallback)
|
|
85
101
|
GEMINI_3_FLASH: "gemini-3-flash-preview", // Legacy fast frontier (kept for model-router)
|
|
86
102
|
GEMINI_3_5_FLASH_LITE: "gemini-3.5-flash-lite", // Jul 21, 2026 - cheapest tier, $0.30/$2.50
|
|
87
103
|
GEMINI_3_1_FLASH_LITE: "gemini-3.1-flash-lite", // Mar 3, 2026 - previous cheap tier (legacy)
|
|
88
104
|
// Aliases
|
|
89
|
-
PRO
|
|
90
|
-
FLASH: "gemini-3.
|
|
105
|
+
get PRO() { return getGeminiProModel(); },
|
|
106
|
+
FLASH: "gemini-3.8-flash", // Bumped: 3.7-flash -> 3.8-flash (Sep 2, 2026)
|
|
91
107
|
FLASH_LITE: "gemini-3.5-flash-lite", // Bumped: 3.1-flash-lite -> 3.5-flash-lite (Jul 21, 2026)
|
|
92
108
|
};
|
|
93
109
|
// Perplexity Models
|
|
@@ -98,14 +114,18 @@ export const PERPLEXITY_MODELS = {
|
|
|
98
114
|
};
|
|
99
115
|
// Grok Models (xAI) - Re-verified 2026-08-14 against GET /v1/models: Grok 4.6 has shipped and is
|
|
100
116
|
// the current latest. Catalog: grok-4.20-0309-* (x3), grok-4.3, grok-4.5, grok-4.6, grok-build-0.1,
|
|
101
|
-
// plus grok-imagine image/video. grok-4.7
|
|
117
|
+
// plus grok-imagine image/video. Re-checked 2026-09-29: grok-4.7 is live (launched Sep 21); grok-5 does not exist.
|
|
102
118
|
// Also verified absent: grok-code-fast-2 (unannounced) and grok-build-0.2 (docs still list 0.1 only).
|
|
103
119
|
export const GROK_MODELS = {
|
|
104
120
|
// Grok 4.6 (Aug 2026) - CURRENT LATEST — verified against /v1/models on 2026-08-14.
|
|
105
121
|
// 500K ctx, $2/$6 (same as 4.5), cached input $0.50/M (vs 4.5's $0.30/M). No `-latest` alias yet.
|
|
106
122
|
// CRITICAL for search: 4.6 actually invokes web_search on the Agent Tools API; 4.5 does NOT
|
|
107
123
|
// (returns ungrounded training-data answers with zero web_search_call entries).
|
|
108
|
-
|
|
124
|
+
// Grok 4.7 (Sep 21, 2026; /v1/models `created` says Sep 2 — pre-launch timestamp) - CURRENT FLAGSHIP,
|
|
125
|
+
// verified 2026-09-29 (chat + search). $2/$6, doubled above 200K prompt tokens. Search paths
|
|
126
|
+
// stay on 4.6: same query gave 1 citation on 4.7 vs 18 on 4.6.
|
|
127
|
+
_4_7: "grok-4.7", // Flagship: 500K ctx, $2/$6, reasoning_effort
|
|
128
|
+
_4_6: "grok-4.6", // Search: 500K ctx, $2/$6, cached $0.50/M
|
|
109
129
|
// Grok 4.5 (Jul 8, 2026) - previous flagship ("Opus-class")
|
|
110
130
|
// 500K context (SMALLER than 4.3's 1M — fine for tools, mind huge inputs), $2/$6,
|
|
111
131
|
// configurable reasoning effort. EU API access landed Jul 17, 2026 — 4.3 kept as quota/region fallback.
|
|
@@ -117,9 +137,9 @@ export const GROK_MODELS = {
|
|
|
117
137
|
_4_3_LATEST: "grok-4.3-latest", // Rolling alias for newest 4.3 snapshot
|
|
118
138
|
_BUILD: "grok-build-0.1", // Coding specialist (May 29, 2026): 256k ctx, fast agentic coding
|
|
119
139
|
// Grok 4.20 models (Mar 10, 2026) - LEGACY keys. Deprecated keys now resolve to the current flagship (4.5).
|
|
120
|
-
_4_20_REASONING: "grok-4.
|
|
121
|
-
_4_20_NON_REASONING: "grok-4.
|
|
122
|
-
_4_20_MULTI_AGENT: "grok-4.
|
|
140
|
+
_4_20_REASONING: "grok-4.7", // [deprecated key] → grok-4.7 (was grok-4.20-0309-reasoning)
|
|
141
|
+
_4_20_NON_REASONING: "grok-4.7", // [deprecated key] → grok-4.7 (was grok-4.20-0309-non-reasoning)
|
|
142
|
+
_4_20_MULTI_AGENT: "grok-4.7", // [deprecated key] → grok-4.7 (architect uses high reasoning.effort)
|
|
123
143
|
// Grok 4.1 fast models (Nov 2025) - BEST VALUE (10x cheaper)
|
|
124
144
|
// RETIRED by xAI — verified Aug 12, 2026. DO NOT WIRE THESE TO ANYTHING.
|
|
125
145
|
// The retirement is invisible at runtime: xAI answers a request for these ids with
|
|
@@ -158,18 +178,25 @@ export const MINIMAX_MODELS = {
|
|
|
158
178
|
M3: "minimax/minimax-m3", // 1M ctx, MSA sparse attention, multimodal, agentic/coding, $0.30/$1.20
|
|
159
179
|
M2_7: "minimax/minimax-m2.7", // 2300B/100B MoE, 200K ctx, SWE-Pro 56.22%, Multi-SWE #1 (fallback)
|
|
160
180
|
M2_5: "minimax/minimax-m2.5", // SWE-Bench 80.2%, 37% faster than M2.1 (legacy)
|
|
161
|
-
|
|
181
|
+
};
|
|
182
|
+
// Jev (TypeSafe via OpenRouter) — typed decisions, NOT a chat model. Served only on
|
|
183
|
+
// OpenRouter's System One endpoint (/api/v1/systemone) and absent from /api/v1/models,
|
|
184
|
+
// so never route these through callOpenRouter. ~$0.04/M input, output free, ~0.3s.
|
|
185
|
+
// Verified live 2026-10-14: jev-1.13 answers (served as jev-1.13-20260917);
|
|
186
|
+
// jev-latest is a 400. typesafe/jev-router is a chat-completions meta-router — not wired.
|
|
187
|
+
export const JEV_MODELS = {
|
|
188
|
+
JEV_1_13: "typesafe/jev-1.13", // noul / choice / score questions over a state
|
|
162
189
|
};
|
|
163
190
|
// Qwen Models (Alibaba via OpenRouter)
|
|
164
191
|
// Qwen3 235B Thinking (July 2025) - Largest reasoning model available
|
|
165
192
|
// Qwen3-Coder-Next (Feb 2026) - Agentic coding specialist, 80B/3B MoE, 262K context
|
|
166
193
|
export const QWEN_MODELS = {
|
|
167
|
-
MAX_3_8: "qwen/qwen3.8-max", // Aug 3, 2026: CURRENT flagship reasoning model — 1M ctx, multimodal (text+image+video), reasoning_effort, $2/$6
|
|
194
|
+
MAX_3_8: "qwen/qwen3.8-max-0902", // Aug 3, 2026: CURRENT flagship reasoning model — 1M ctx, multimodal (text+image+video), reasoning_effort, $2/$6
|
|
168
195
|
MAX_3_7: "qwen/qwen3.7-max", // May 21, 2026: previous flagship, 1M ctx, agent-centric, $1.475/$4.425 (fallback)
|
|
169
196
|
PLUS_3_7: "qwen/qwen3.7-plus", // Jun 3, 2026: general-purpose flagship, 1M ctx, multimodal, $0.32/$1.28
|
|
170
197
|
PLUS_3_6: "qwen/qwen3.6-plus", // Apr 2026: previous general-purpose flagship (legacy)
|
|
171
198
|
CODER_NEXT: "qwen/qwen3-coder-next", // 80B/3B MoE, 262K ctx, SWE-Bench >70%, $0.14/$0.80 (still PRIMARY coder — no 3.6-coder yet)
|
|
172
|
-
CODER_PLUS: "qwen/qwen3-coder-plus", //
|
|
199
|
+
CODER_PLUS: "qwen/qwen3-coder-plus", // GONE from OpenRouter (verified 2026-10-14) — key kept for back-compat, do NOT call
|
|
173
200
|
CODER: "qwen/qwen3-coder", // Legacy coder - 480B MoE, SWE-Bench 69.6%
|
|
174
201
|
DENSE_3_8_27B: "qwen/qwen3.8-27b", // Aug 14, 2026: dense 27B reasoning, 1M ctx, reasoning_effort, $0.21/$2.55 — powers qwq_reason
|
|
175
202
|
QWQ_32B: "qwen/qwq-32b", // RETIRED from OpenRouter (404 "No endpoints found", Sep 14, 2026) — do NOT call
|
|
@@ -205,6 +232,7 @@ export const ALL_MODELS = {
|
|
|
205
232
|
...KIMI_MODELS,
|
|
206
233
|
...QWEN_MODELS,
|
|
207
234
|
...MINIMAX_MODELS,
|
|
235
|
+
...JEV_MODELS,
|
|
208
236
|
};
|
|
209
237
|
// Common workflow settings
|
|
210
238
|
export const DEFAULT_WORKFLOW_SETTINGS = {
|
|
@@ -219,6 +247,9 @@ export const DEFAULT_WORKFLOW_SETTINGS = {
|
|
|
219
247
|
// When new models release, update ONLY this section!
|
|
220
248
|
// All tools automatically use the new models.
|
|
221
249
|
// ============================================================================
|
|
250
|
+
// UPDATED Oct 14, 2026: Gemini Pro 3.1-pro-preview -> gemini-4-argon (Oct 13 GA; env-switchable);
|
|
251
|
+
// OpenAI SOL gpt-6-sol -> gpt-6.1-sol (Sep 29); openai_search terra -> 6.1-sol; grok_search 4.6 -> 4.7;
|
|
252
|
+
// StepFun 3.7-flash -> step-5-preview (Oct 8); ERNIE removed (Baidu left OpenRouter Oct 8).
|
|
222
253
|
// UPDATED Sep 14, 2026: OpenAI default gpt-5.6-sol -> gpt-6-astra (Sep 3);
|
|
223
254
|
// qwq_reason qwen/qwq-32b (retired from OpenRouter) -> qwen/qwen3.8-27b.
|
|
224
255
|
// UPDATED Jul 26, 2026 (full provider audit):
|
|
@@ -232,28 +263,27 @@ export const CURRENT_MODELS = {
|
|
|
232
263
|
reason: OPENAI_MODELS.DEFAULT, // Deep reasoning (astra + effort=xhigh)
|
|
233
264
|
brainstorm: OPENAI_MODELS.DEFAULT, // Creative ideation (astra + effort=medium)
|
|
234
265
|
code: OPENAI_MODELS.TERRA, // Code tasks (gpt-5.6-terra - 5.5-level at $2/$12)
|
|
235
|
-
explain: OPENAI_MODELS.
|
|
236
|
-
search: OPENAI_MODELS.
|
|
237
|
-
//
|
|
238
|
-
// token cost than sol. All 5.6 tiers support web_search.
|
|
266
|
+
explain: OPENAI_MODELS.SOL, // openai_explain pins gpt-6.1-sol at low effort ($2/$10)
|
|
267
|
+
search: OPENAI_MODELS.SOL, // Web search: $10/1k call fee is flat across tiers; gpt-6.1-sol
|
|
268
|
+
// ($2/$10) beat terra on a fresh-news query (2026-10-14).
|
|
239
269
|
// Premium: the 5.5-pro tier ($30/$180) is gone — astra + effort=max replaces it at $10/$50
|
|
240
270
|
premium: OPENAI_MODELS.PRO, // Expert mode (gpt-6-astra + reasoning.effort=max)
|
|
241
271
|
},
|
|
242
272
|
grok: {
|
|
243
|
-
reason: GROK_MODELS.
|
|
244
|
-
code: GROK_MODELS.
|
|
245
|
-
debug: GROK_MODELS.
|
|
246
|
-
brainstorm: GROK_MODELS.
|
|
247
|
-
search: GROK_MODELS.
|
|
248
|
-
//
|
|
249
|
-
//
|
|
273
|
+
reason: GROK_MODELS._4_7, // grok-4.7 (Sep 21, 2026 flagship, reasoning effort)
|
|
274
|
+
code: GROK_MODELS._4_7, // grok-4.7 (flagship quality, tool-calling)
|
|
275
|
+
debug: GROK_MODELS._4_7, // grok-4.7 (flagship debugging)
|
|
276
|
+
brainstorm: GROK_MODELS._4_7, // grok-4.7 (500K context)
|
|
277
|
+
search: GROK_MODELS._4_7, // grok-4.7: re-verified 2026-10-14 over 3 queries — 19/79/2 unique
|
|
278
|
+
// citations vs 4.6's 2/4/2, and found the newer facts. (Sep 29 it
|
|
279
|
+
// lost 1 vs 18; xAI has since fixed 4.7's search.) 4.5 never grounds.
|
|
250
280
|
search_lite: GROK_MODELS._4_3, // grok-4.3: $1.25/$2.50, 1M ctx — ~1.6x/2.4x cheaper than
|
|
251
281
|
// grok-4.5 search. Was _4_1_FAST_NON_REASONING until that id
|
|
252
282
|
// was retired (xAI silently served 4.3 for it anyway).
|
|
253
|
-
architect: GROK_MODELS.
|
|
283
|
+
architect: GROK_MODELS._4_7, // grok-4.7 with high reasoning.effort (agentic swarm behaviour)
|
|
254
284
|
},
|
|
255
285
|
gemini: {
|
|
256
|
-
default
|
|
286
|
+
get default() { return GEMINI_MODELS.GEMINI_3_PRO; }, // gemini-4-argon unless TACHI_GEMINI_PRO_MODEL
|
|
257
287
|
},
|
|
258
288
|
perplexity: {
|
|
259
289
|
search: PERPLEXITY_MODELS.SONAR, // $1/$1 per M (cheapest)
|
|
@@ -301,17 +331,17 @@ export const TOOL_DEFAULTS = {
|
|
|
301
331
|
},
|
|
302
332
|
// Gemini tools
|
|
303
333
|
gemini_brainstorm: {
|
|
304
|
-
model
|
|
334
|
+
get model() { return CURRENT_MODELS.gemini.default; }, // live: follows TACHI_GEMINI_PRO_MODEL
|
|
305
335
|
maxTokens: 2048,
|
|
306
336
|
temperature: 0.9,
|
|
307
337
|
},
|
|
308
338
|
gemini_analyze_code: {
|
|
309
|
-
model
|
|
339
|
+
get model() { return CURRENT_MODELS.gemini.default; }, // live: follows TACHI_GEMINI_PRO_MODEL
|
|
310
340
|
maxTokens: 2048,
|
|
311
341
|
temperature: 0.3,
|
|
312
342
|
},
|
|
313
343
|
gemini_analyze_text: {
|
|
314
|
-
model
|
|
344
|
+
get model() { return CURRENT_MODELS.gemini.default; }, // live: follows TACHI_GEMINI_PRO_MODEL
|
|
315
345
|
maxTokens: 2048,
|
|
316
346
|
temperature: 0.5,
|
|
317
347
|
},
|
|
@@ -421,6 +451,9 @@ export const DEFAULT_WORKFLOW_TOOL = "openai_brainstorm";
|
|
|
421
451
|
export const MODEL_DISPLAY_NAMES = {
|
|
422
452
|
// OpenAI
|
|
423
453
|
"gpt-6-astra": "gpt-6-astra",
|
|
454
|
+
"gpt-6.1-sol": "gpt-6.1-sol",
|
|
455
|
+
"gpt-6-sol": "gpt-6-sol",
|
|
456
|
+
"gpt-6-luna": "gpt-6-luna",
|
|
424
457
|
"gpt-5.6-sol": "gpt-5.6-sol",
|
|
425
458
|
"gpt-5.6-terra": "gpt-5.6-terra",
|
|
426
459
|
"gpt-5.6-luna": "gpt-5.6-luna",
|
|
@@ -431,6 +464,7 @@ export const MODEL_DISPLAY_NAMES = {
|
|
|
431
464
|
"gpt-5.4-mini": "gpt-5.4-mini",
|
|
432
465
|
"gpt-5.4-pro": "gpt-5.4-pro",
|
|
433
466
|
// Gemini
|
|
467
|
+
"gemini-4-argon": "gemini-4-argon",
|
|
434
468
|
"gemini-3.1-pro-preview": "gemini-3.1-pro",
|
|
435
469
|
"gemini-3.7-flash": "gemini-3.7-flash",
|
|
436
470
|
"gemini-3.6-flash": "gemini-3.6-flash",
|
|
@@ -487,6 +521,9 @@ export function getModelDisplayName(modelId) {
|
|
|
487
521
|
export const MODEL_PRICING = {
|
|
488
522
|
// OpenAI
|
|
489
523
|
"gpt-6-astra": 0.030, // ($10 + $50) / 2 / 1000 (Sep 3, 2026 - current default)
|
|
524
|
+
"gpt-6.1-sol": 0.006, // ($2 + $10) / 2 / 1000 (Sep 29, 2026 - SOL tier)
|
|
525
|
+
"gpt-6-sol": 0.006, // ($2 + $10) / 2 / 1000 (Sep 14, 2026 - fallback)
|
|
526
|
+
"gpt-6-luna": 0.0003, // ($0.10 + $0.50) / 2 / 1000 (Sep 14, 2026 - LUNA/MINI tier)
|
|
490
527
|
"gpt-5.6-sol": 0.0175, // ($5 + $30) / 2 / 1000 (unchanged in the Jul 30 cut)
|
|
491
528
|
"gpt-5.6-terra": 0.007, // ($2 + $12) / 2 / 1000 (Jul 30, 2026 cut: -20%)
|
|
492
529
|
"gpt-5.6-luna": 0.0007, // ($0.20 + $1.20) / 2 / 1000 (Jul 30, 2026 cut: -80%)
|
|
@@ -496,6 +533,7 @@ export const MODEL_PRICING = {
|
|
|
496
533
|
"gpt-5.4-mini": 0.002625, // ($0.75 + $4.50) / 2 / 1000 (Mar 17, 2026)
|
|
497
534
|
"gpt-5.4-pro": 0.105, // ($30 + $180) / 2 / 1000 (Mar 2026)
|
|
498
535
|
// Gemini
|
|
536
|
+
"gemini-4-argon": 0.006, // ($2 + $10) / 2 / 1000 intro through Nov 30, 2026 — $4/$20 (0.012) from Dec 1
|
|
499
537
|
"gemini-3.1-pro-preview": 0.007, // ($2 + $12) / 2 / 1000
|
|
500
538
|
"gemini-3.7-flash": 0.00225, // ($0.75 + $3.75) / 2 / 1000 intro through Dec 31, 2026 (then $1.50/$7.50)
|
|
501
539
|
"gemini-3.6-flash": 0.0045, // ($1.50 + $7.50) / 2 / 1000 (GA Jul 21, 2026 - fallback)
|
|
@@ -16,7 +16,7 @@ import { GEMINI_MODELS, OPENAI_MODELS, GROK_MODELS, PERPLEXITY_MODELS, KIMI_MODE
|
|
|
16
16
|
*/
|
|
17
17
|
const MODELS = {
|
|
18
18
|
// Google Gemini
|
|
19
|
-
GEMINI
|
|
19
|
+
get GEMINI() { return GEMINI_MODELS.GEMINI_3_PRO; }, // gemini-4-argon unless TACHI_GEMINI_PRO_MODEL (read per call)
|
|
20
20
|
// OpenAI (GPT-6 Astra)
|
|
21
21
|
OPENAI: OPENAI_MODELS.THINKING, // gpt-6-astra (default - most capable, agentic)
|
|
22
22
|
OPENAI_REASON: OPENAI_MODELS.THINKING, // gpt-6-astra (deep reasoning)
|
|
@@ -27,6 +27,10 @@ export function getTimeoutConfig() {
|
|
|
27
27
|
// OpenRouter timeout (180s default, 600s for thinking/reasoning models)
|
|
28
28
|
openrouter: parseInt(process.env.TACHI_OPENROUTER_TIMEOUT || '180000'),
|
|
29
29
|
openrouterThinking: parseInt(process.env.TACHI_OPENROUTER_THINKING_TIMEOUT || '600000'),
|
|
30
|
+
// Agentic live search (grok_search/_lite): multi-hop web+X search runs routinely
|
|
31
|
+
// pass 60s. Callers must also heartbeat, or the MCP client's own 60s request
|
|
32
|
+
// timeout kills the call first.
|
|
33
|
+
search: parseInt(process.env.TACHI_SEARCH_TIMEOUT || '300000'), // 5 minutes
|
|
30
34
|
// Progress threshold (30 seconds)
|
|
31
35
|
progressThreshold: parseInt(process.env.TACHI_PROGRESS_THRESHOLD || '30000'),
|
|
32
36
|
};
|
|
@@ -48,7 +52,7 @@ export function getOpenRouterModelTimeout(modelId) {
|
|
|
48
52
|
const id = modelId.toLowerCase();
|
|
49
53
|
if (id.includes('thinking') || id.includes('reasoning') ||
|
|
50
54
|
id.includes('kimi') || id.includes('deepseek') || id.includes('glm') ||
|
|
51
|
-
id.includes('stepfun') ||
|
|
55
|
+
id.includes('stepfun') ||
|
|
52
56
|
id.includes('qwen3.8') || id.includes('qwen3.7-max')) {
|
|
53
57
|
return config.openrouterThinking;
|
|
54
58
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { ModelRouter } from '../workflows/model-router.js';
|
|
2
2
|
import { TokenTracker } from '../optimization/token-tracker.js';
|
|
3
3
|
import { BatchExecutor } from '../optimization/batch-executor.js';
|
|
4
|
+
import { getGeminiProModel } from '../config/model-constants.js';
|
|
4
5
|
export class Architect {
|
|
5
6
|
constructor() {
|
|
6
7
|
this.stages = {
|
|
7
8
|
gemini_analysis: {
|
|
8
|
-
model
|
|
9
|
+
get model() { return getGeminiProModel(); },
|
|
9
10
|
maxTokens: 1000000,
|
|
10
11
|
tasks: [
|
|
11
12
|
'fullCodebaseAnalysis',
|
|
@@ -79,8 +80,8 @@ export class Architect {
|
|
|
79
80
|
};
|
|
80
81
|
}
|
|
81
82
|
selectGeminiModel(options) {
|
|
82
|
-
//
|
|
83
|
-
return
|
|
83
|
+
// Active Pro model (gemini-4-argon unless TACHI_GEMINI_PRO_MODEL overrides it)
|
|
84
|
+
return getGeminiProModel();
|
|
84
85
|
}
|
|
85
86
|
calculateGeminiTokens(options) {
|
|
86
87
|
const depthMultiplier = {
|
|
@@ -362,8 +363,8 @@ export class Architect {
|
|
|
362
363
|
calculateTotalCost(stageResults) {
|
|
363
364
|
let cost = 0;
|
|
364
365
|
for (const result of stageResults) {
|
|
365
|
-
if (result.model
|
|
366
|
-
cost += (result.tokens / 1000000) * 1.25; // Gemini
|
|
366
|
+
if (result.model.startsWith('gemini-')) {
|
|
367
|
+
cost += (result.tokens / 1000000) * 1.25; // Rough Gemini Pro blended rate
|
|
367
368
|
}
|
|
368
369
|
else if (result.model === 'think') {
|
|
369
370
|
cost += 0; // Free!
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
import { getGeminiProModel } from '../config/model-constants.js';
|
|
1
2
|
export class CodeReviewer {
|
|
2
3
|
constructor() {
|
|
3
|
-
this.defaultModel = 'gemini-3.1-pro-preview';
|
|
4
4
|
this.defaultMaxTokens = 4000;
|
|
5
5
|
this.defaultFocusAreas = [
|
|
6
6
|
'security', 'performance', 'readability', 'bugs', 'best-practices'
|
|
7
7
|
];
|
|
8
8
|
}
|
|
9
|
+
// Getter, not a field: instances are built at module load, before .env is applied
|
|
10
|
+
get defaultModel() { return getGeminiProModel(); }
|
|
9
11
|
async review(code, options = {}) {
|
|
10
12
|
const model = options.model || this.defaultModel;
|
|
11
13
|
const maxTokens = options.maxTokens || this.defaultMaxTokens;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { getGeminiProModel } from '../config/model-constants.js';
|
|
1
2
|
export class CommitGuardian {
|
|
2
3
|
constructor() {
|
|
3
|
-
this.defaultModel = 'gemini-3.1-pro-preview';
|
|
4
4
|
this.defaultMaxTokens = 5000;
|
|
5
5
|
this.securityPatterns = [
|
|
6
6
|
{ pattern: /api[_-]?key/i, type: 'api_key' },
|
|
@@ -22,6 +22,8 @@ export class CommitGuardian {
|
|
|
22
22
|
{ pattern: /\s+$/gm, type: 'trailing_whitespace' }
|
|
23
23
|
];
|
|
24
24
|
}
|
|
25
|
+
// Getter, not a field: instances are built at module load, before .env is applied
|
|
26
|
+
get defaultModel() { return getGeminiProModel(); }
|
|
25
27
|
async validate(context, options = {}) {
|
|
26
28
|
const model = options.model || this.defaultModel;
|
|
27
29
|
const maxTokens = options.maxTokens || this.defaultMaxTokens;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { getGeminiProModel } from '../config/model-constants.js';
|
|
1
2
|
export class DocumentationWriter {
|
|
2
3
|
constructor() {
|
|
3
|
-
this.defaultModel = 'gemini-3.1-pro-preview';
|
|
4
4
|
this.defaultMaxTokens = 3000;
|
|
5
5
|
this.defaultStyle = 'narrative';
|
|
6
6
|
}
|
|
7
|
+
// Getter, not a field: instances are built at module load, before .env is applied
|
|
8
|
+
get defaultModel() { return getGeminiProModel(); }
|
|
7
9
|
async generateDocs(code, options = {}) {
|
|
8
10
|
const model = options.model || this.defaultModel;
|
|
9
11
|
const maxTokens = options.maxTokens || this.defaultMaxTokens;
|
package/dist/src/modes/scout.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ModelRouter } from '../workflows/model-router.js';
|
|
2
2
|
import { getScoutModels, getDefaultModels } from '../config/model-defaults.js';
|
|
3
|
-
import { GROK_MODELS } from '../config/model-constants.js';
|
|
3
|
+
import { GROK_MODELS, getGeminiProModel } from '../config/model-constants.js';
|
|
4
4
|
import { getGrokApiKey } from '../utils/api-keys.js';
|
|
5
5
|
import { createProgressStream } from '../utils/progress-stream.js';
|
|
6
6
|
import { providerRouter } from '../utils/provider-router.js';
|
|
@@ -64,7 +64,7 @@ export class Scout {
|
|
|
64
64
|
flow: 'conditional-hybrid',
|
|
65
65
|
perplexityTimeout: 8000, // Base timeout
|
|
66
66
|
perplexityFor: 'latest API docs only',
|
|
67
|
-
primary
|
|
67
|
+
get primary() { return getGeminiProModel(); },
|
|
68
68
|
upgradeCondition: 'complexity > 0.8',
|
|
69
69
|
tokens: 2000,
|
|
70
70
|
defaultProvider: PROVIDER_PERPLEXITY,
|