tachibot-mcp 2.33.0 → 2.35.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 (68) hide show
  1. package/CHANGELOG.md +71 -0
  2. package/README.md +33 -10
  3. package/dist/src/cli/init.js +2 -2
  4. package/dist/src/config/model-constants.js +116 -57
  5. package/dist/src/config/model-defaults.js +4 -4
  6. package/dist/src/config/timeout-config.js +5 -1
  7. package/dist/src/modes/architect.js +6 -5
  8. package/dist/src/modes/code-reviewer.js +3 -1
  9. package/dist/src/modes/commit-guardian.js +3 -1
  10. package/dist/src/modes/documentation-writer.js +3 -1
  11. package/dist/src/modes/scout.js +2 -2
  12. package/dist/src/optimization/model-router.js +13 -5
  13. package/dist/src/optimization/token-optimizer.js +2 -1
  14. package/dist/src/orchestrators/collaborative/services/tool-execution/ToolExecutionService.js +18 -2
  15. package/dist/src/orchestrators/collaborative/services/visualization/VisualizationService.js +10 -6
  16. package/dist/src/profiles/balanced.js +2 -1
  17. package/dist/src/profiles/code_focus.js +3 -2
  18. package/dist/src/profiles/full.js +2 -1
  19. package/dist/src/profiles/heavy_coding.js +3 -2
  20. package/dist/src/profiles/minimal.js +2 -1
  21. package/dist/src/profiles/research_power.js +3 -2
  22. package/dist/src/tools/diff-review-tool.js +1 -1
  23. package/dist/src/tools/doctor-tool.js +1 -1
  24. package/dist/src/tools/gemini-tools.js +29 -2
  25. package/dist/src/tools/grok-enhanced.js +76 -39
  26. package/dist/src/tools/grok-search-lite-tool.js +5 -3
  27. package/dist/src/tools/grok-tools.js +18 -11
  28. package/dist/src/tools/jev-tool.js +105 -0
  29. package/dist/src/tools/jury-tool.js +7 -15
  30. package/dist/src/tools/openai-tools.js +102 -40
  31. package/dist/src/tools/openrouter-tools.js +84 -72
  32. package/dist/src/tools/plan-critique-tool.js +1 -1
  33. package/dist/src/tools/provider-catalog.js +2 -2
  34. package/dist/src/tools/registry.js +7 -5
  35. package/dist/src/tools/unified-ai-provider.js +2 -1
  36. package/dist/src/tools/workflow-validator-tool.js +13 -19
  37. package/dist/src/utils/ansi-styles.js +20 -0
  38. package/dist/src/utils/fallback-policy.js +47 -0
  39. package/dist/src/utils/file-reader.js +19 -8
  40. package/dist/src/utils/judge-runner.js +12 -5
  41. package/dist/src/utils/provider-failure.js +6 -1
  42. package/dist/src/validators/output-usage-validator.js +9 -1
  43. package/dist/src/workflows/engine/WorkflowExecutionEngine.js +7 -4
  44. package/dist/src/workflows/engine/WorkflowHelpers.js +83 -10
  45. package/dist/src/workflows/engine/handlers/StepExecutionHandler.js +2 -9
  46. package/dist/src/workflows/step-guard.js +103 -0
  47. package/dist/src/workflows/tool-mapper.js +150 -26
  48. package/docs/TOOLS_REFERENCE.md +41 -33
  49. package/docs/TOOL_PARAMETERS.md +6 -6
  50. package/docs/TOOL_PROFILES.md +13 -13
  51. package/docs/superpowers/plans/2026-08-29-planner-split-waves.md +317 -0
  52. package/docs/superpowers/plans/2026-09-29-model-watch-and-config.md +723 -0
  53. package/package.json +1 -1
  54. package/profiles/balanced.json +2 -2
  55. package/profiles/code_focus.json +3 -3
  56. package/profiles/full.json +2 -2
  57. package/profiles/heavy_coding.json +3 -3
  58. package/profiles/minimal.json +2 -2
  59. package/profiles/research_power.json +3 -3
  60. package/skills/council/SKILL.md +405 -0
  61. package/skills/jury/SKILL.md +149 -0
  62. package/skills/prompt/SKILL.md +11 -0
  63. package/skills/review/SKILL.md +18 -3
  64. package/skills/setup/SKILL.md +1 -1
  65. package/skills/write/SKILL.md +232 -0
  66. package/tools.config.json +2 -5
  67. package/workflows/accessibility-code-audit.yaml +1 -1
  68. package/workflows/jev-gated-answer.yaml +59 -0
package/CHANGELOG.md CHANGED
@@ -5,6 +5,77 @@ 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.0] - 2026-10-14
9
+
10
+ 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).
11
+
12
+ ### Changed
13
+ - **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.
14
+ - **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.
15
+ - **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.
16
+ - **`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.
17
+ - **`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.
18
+ - **`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`.
19
+ - 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.
20
+
21
+ ### Added
22
+ - **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.
23
+ - **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.
24
+
25
+ - **`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.
26
+ - **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.
27
+ - **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.
28
+
29
+ ### Security
30
+ - **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:
31
+ - run only tools **enabled in the active profile**;
32
+ - 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;
33
+ - may not set `useHeavy`, and may point `jev_decide` only at a `typesafe/*` model;
34
+ - may not call the meta tools (`workflow*`, `validate_workflow*`, `list_workflows`).
35
+ A refused step fails visibly. Direct tool calls are unchanged.
36
+
37
+ ### Changed (skills)
38
+ - **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.
39
+
40
+ ### Removed
41
+ - **`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).
42
+
43
+ ### Fixed
44
+ - **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.
45
+ - **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.
46
+ - **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.
47
+ - **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.
48
+ - **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.
49
+ - **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.
50
+ - **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.
51
+ - **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).
52
+
53
+ ## [2.34.0] - 2026-09-14
54
+
55
+ ### Changed
56
+ - **OpenAI default is now GPT-6 Astra (`gpt-6-astra`).** Released Sep 3, 2026: $10/$50 per 1M tokens (2x `gpt-5.6-sol`'s input price), 1.05M context, 128K output. Verified live against `/v1/models` and `/v1/responses` on Sep 14, 2026. Every `OPENAI_MODELS.DEFAULT` caller moves — `openai_reason`, `openai_brainstorm`, `openai_code_review`, `spec_writer`, `tachi`, the GPT reviewers in `diff_review` / `plan_critique` — along with the `PRO` / `THINKING` / `FULL` / `CODEX_MAX` aliases workflows use. Astra rolled out to a limited set of orgs first, so `callOpenAI` falls back astra → `gpt-5.6-sol` → `gpt-5.6-terra` on a 403/404. `openai_brainstorm` accepts `gpt-6-astra` alongside the three GPT-5.6 tiers.
57
+ - **`openai_explain` stays on `gpt-5.6-sol`.** Low-effort explanations don't need the flagship, so the tool is pinned to the previous default rather than doubling its per-call cost. `openai_search` (terra), the jury's GPT juror (luna) and the Gemini-down judge escalation (sol) are unchanged.
58
+ - **`qwq_reason` runs Qwen3.8-27B.** `qwen/qwq-32b` is gone from OpenRouter — every call returned 404 "No endpoints found", so the tool had been failing outright. The tool, its workflow mapping and the `openrouter_multi` `qwq-32b` option now call `qwen/qwen3.8-27b` (dense 27B, 1M context, $0.21/$2.55) with `reasoning_effort: medium`, falling back to `qwen3-235b-a22b-thinking-2507`. On a probability probe it answered correctly in 2.0s for $0.0007; the 235B thinking model took 16.3s. Tool name and parameters are unchanged.
59
+
60
+ ### Fixed
61
+ - **GPT-6 models could not be called at all.** `callOpenAI` used the Responses API only for model names starting with `gpt-5.`, so `gpt-6-astra` fell through to Chat Completions with `temperature: 0.7` and no reasoning effort. OpenAI answers that with 400 "'temperature' does not support 0.7 with this model". `gpt-6-*` now goes to the Responses API without temperature.
62
+ - **Astra rejects `reasoning_effort` `none` and `minimal`** — it accepts only low/medium/high/xhigh/max. Those values are now sent as `low` for GPT-6 models instead of burning the attempt on a 400; GPT-5.6 tiers still receive `none` unchanged.
63
+ - **Workflow steps ran a different OpenAI model than the tool of the same name.** `tool-mapper` reimplemented `openai_code_review`, `openai_explain` and `openai_reason` with its own prompts and model picks, so after the Astra bump a workflow `openai_code_review` step ran `gpt-5.6-luna` while the MCP tool ran `gpt-6-astra` (`openai_explain`: luna vs sol; `openai_reason`: `high` effort and a generic prompt vs `xhigh`). The three cases now delegate to the real tools, so model, effort and prompt match; a step's custom `systemPrompt` no longer applies to them. A second, unreachable `case "openai_reason"` was removed.
64
+ - **Stale model labels.** The `diff_review` and `plan_critique` panels labelled their GPT reviewer "GPT-5.6 Sol" and "GPT-5.5", and `doctor` / `tachibot init` still advertised "GPT-5.5".
65
+ - **Version drift.** 2.33.1 bumped only `package.json`; `manifest.json`, `server.json` and `package.mcpb.json` still said 2.33.0. All now carry 2.34.0.
66
+
67
+ ## [2.33.1] - 2026-08-29
68
+
69
+ ### Changed
70
+ - **Gemini flash tier bumped to `gemini-3.7-flash`** (GA Aug 13, 2026 — 1M ctx, $0.75/$3.75 intro pricing through Dec 31, 2026, then $1.50/$7.50). Powers `gemini_search` and the Pro-quota degradation path; `gemini-3.6-flash` stays wired as the fallback. Verified live against the Gemini API. No new Pro model exists as of Aug 29, 2026 (3.5 Pro missed its June window; still in partner testing), so the reasoning/judge default remains `gemini-3.1-pro-preview`.
71
+
72
+ ### Fixed
73
+ - **`grok_search` returned the model's plan instead of its answer.** xAI's `/v1/responses` agentic runs interleave several `message` items with `web_search_call` entries — a preamble ("I'll search official docs…"), the server-side searches, then the answer as a *later* message. Extraction used `.find(type === "message")`, i.e. first-message-wins, so any run where grok-4.6 narrated a plan returned the plan and silently dropped the answer (observed 3× on Aug 29; `grok_search_lite` dodged it because the cheaper model skips the preamble). Text and `url_citation` annotations are now collected from **every** message in order, and a response with no visible text at all (e.g. `status:"incomplete"` from reasoning exhausting `max_output_tokens`) throws a descriptive error instead of the fake-success `"No response from Grok"`.
74
+ - **OpenAI tools could return an empty response as success.** The Responses API returns HTTP 200 with `status: "incomplete"` (`incomplete_details.reason: "max_output_tokens"`) and a reasoning-only output array when reasoning consumes the whole token budget before any visible text. `callOpenAI` never read `status`, masked the miss with the placeholder "No response from OpenAI", and logged SUCCESS — billing the reasoning tokens for nothing and showing the caller no error. Empty visible text now records a per-attempt error and falls through the model fallback chain, so total failure surfaces as `[OpenAI request failed …]` naming the reason for every attempt.
75
+ - **GPT-5.x output budgets sat far below OpenAI's documented reserve.** `max_output_tokens` *includes* reasoning tokens, and the docs recommend reserving at least 25,000 for reasoning models — the tools passed 4,000–8,000, which high-effort reasoning exhausts before emitting a word (the empty-response trigger above). Responses-API calls with any `reasoning_effort` other than `none` now floor the budget at 25,000; the cap is an upper bound, so only tokens actually generated bill.
76
+ - **`npm test` ran sibling worktrees' suites.** `testPathIgnorePatterns` said "don't descend into agent worktrees" but never listed `.worktrees/`, so branches checked out there injected phantom failures into the main tree's run. Added `/.worktrees/` to the ignore list.
77
+ - **`focus` progress table printed `session_` as the session id.** Ids are `session_<timestamp>_<hex>`, so slicing the first 8 chars only ever showed the literal prefix; the distinctive hex tail is displayed instead. Emoji also left the table cells — terminal renderers count them as 1–2 columns inconsistently, skewing every border.
78
+
8
79
  ## [2.33.0] - 2026-08-27
9
80
 
10
81
  ### Added
package/README.md CHANGED
@@ -4,15 +4,15 @@
4
4
 
5
5
  ### Multi-Model AI Orchestration Platform
6
6
 
7
- [![Version](https://img.shields.io/badge/version-2.33.0-blue.svg)](https://www.npmjs.com/package/tachibot-mcp)
7
+ [![Version](https://img.shields.io/badge/version-2.34.0-blue.svg)](https://www.npmjs.com/package/tachibot-mcp)
8
8
  [![Tools](https://img.shields.io/badge/tools-67_active-brightgreen.svg)](#-tool-ecosystem-67-tools)
9
9
  [![License](https://img.shields.io/badge/license-AGPL--3.0-green.svg)](LICENSE)
10
10
  [![Node](https://img.shields.io/badge/node-%3E%3D22.0.0-brightgreen.svg)](https://nodejs.org)
11
11
  [![MCP](https://img.shields.io/badge/MCP-Compatible-purple.svg)](https://modelcontextprotocol.io)
12
12
 
13
- **67 AI tools. 12 providers. One protocol.**
13
+ **67 AI tools. 11 providers. One protocol.**
14
14
 
15
- Orchestrate Perplexity, Grok 4.6, GPT-5.6, Gemini, Qwen, Kimi K3, and MiniMax M3
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.
17
17
 
18
18
  [Get Started](#-quick-start) &#183; [View Tools](#-tool-ecosystem-67-tools) &#183; [Documentation](https://tachibot.com/docs)
@@ -30,6 +30,29 @@ from Claude Code, Claude Desktop, Cursor, or any MCP client.
30
30
 
31
31
  ## What's New
32
32
 
33
+ ### v2.35.0
34
+ - **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`.
35
+ - **Model refresh, every ID verified live:**
36
+ - `gpt-6.1-sol` (SOL tier, now also `openai_search`)
37
+ - `grok-4.7` for `grok_search`
38
+ - `gemini-3.8-flash` for search and Flash
39
+ - `stepfun/step-5-preview`, GLM 5.3, and a DeepSeek V4.1 Flash fallback
40
+ - **`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.
41
+ - **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.
42
+ - **Fixes:**
43
+ - Rescued Gemini answers were being discarded.
44
+ - OpenRouter fallbacks fired only on a single error type.
45
+ - `nextThought` OpenAI steps could silently call no model.
46
+ - The grok search timeout ignored the response body.
47
+ - **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.
48
+ - **Removed `ernie_reason`** (Baidu left OpenRouter on Oct 8). The `jev_decide` addition and `ernie_reason` removal leave the count at 67 tools.
49
+
50
+ ### v2.34.0
51
+ - **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.
52
+ - **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`.
53
+ - **`qwq_reason` works again.** `qwen/qwq-32b` was retired from OpenRouter (every call returned 404), so the tool now runs `qwen/qwen3.8-27b` at `reasoning_effort: medium` with the 235B thinking model as fallback — correct on a probe problem in 2.0s for $0.0007. Tool name and parameters are unchanged.
54
+ - Tool count unchanged at 67.
55
+
33
56
  ### v2.33.0
34
57
  - **The writing family (`storm`, `re3`, `de_generic`).** The library had creative *thinking* (`what_if`, `innovate`, `alt_view`, `creative_use`) and zero creative *writing*: against a 7-stage pipeline, stage 4 (structure) and stage 5 (draft) were empty, and stage 6 (revise) fell through to `reflexion` — which optimises toward *correct*, while prose revision is cutting, rhythm and specificity. **85 → 88 techniques.**
35
58
  - **`blog_writer`** — researched long-form in one call, composing `storm` and `re3` rather than carrying a private copy of their text. A copy would drift the moment either template was edited, and drift *silently*, because both paths still emit well-formed prose. `research: true` runs the persona interview first and feeds its 3 surprising answers into the four-pass write. **66 → 67 tools**; enabled in `full`, `balanced` and `research_power`.
@@ -77,7 +100,7 @@ from Claude Code, Claude Desktop, Cursor, or any MCP client.
77
100
 
78
101
  ### v2.27.1
79
102
  - **Kimi K3** (Jul 16, `moonshotai/kimi-k3`) now powers every Kimi tool, the `kimi` juror, and the Kimi seat on `diff_review`. 2.8T open-weight MoE — the largest open model shipped — with a **1M context (up from 262K)**, native multimodal input, and long-horizon agentic coding that beats Opus 4.8 and GPT-5.5 on coding/agent benchmarks. Note the price: **$3/$15 per M, 4x K2.7-Code** — K2.7-Code stays as the automatic fallback (K3 → K2.7-Code → K2.6).
80
- - **Gemini 3.6 Flash** (Jul 21, `gemini-3.6-flash`) is the new search/workhorse tier behind `gemini_search` — 1M context at **$1.50/$7.50, down from $9 output**, and ~17% fewer output tokens than 3.5 Flash. Flash-Lite moves to `gemini-3.5-flash-lite` ($0.30/$2.50).
103
+ - **Gemini 3.7 Flash** (GA Aug 13, `gemini-3.7-flash`) is the new search/workhorse tier behind `gemini_search` — 1M context at **$0.75/$3.75 intro pricing through Dec 31, 2026** (then $1.50/$7.50); `gemini-3.6-flash` stays as the fallback. Flash-Lite remains `gemini-3.5-flash-lite` ($0.30/$2.50).
81
104
  - **Everything else re-verified, unchanged** — a full provider audit (Jul 26) confirms GPT-5.6, Grok 4.5, DeepSeek V4 Pro, GLM-5.2, MiniMax M3, StepFun 3.7, ERNIE 4.5 VL, Qwen Coder-Next and Perplexity Sonar are all still the newest available. Gemini 3.1 Pro remains the reasoning/judge default: Google shipped three models on Jul 21 and **skipped 3.5 Pro**. xAI's staged rollout finished (EU access Jul 17), so the `grok-4.3` fallback is now quota/region insurance rather than a rollout workaround.
82
105
 
83
106
  ### v2.27.0
@@ -150,8 +173,8 @@ Skills automatically adapt to your configured API keys. Even with just 1-2 provi
150
173
  ## Key Features
151
174
 
152
175
  ### Multi-Model Intelligence
153
- - **65 AI Tools** across 12 providers &mdash; Perplexity, Grok, GPT-5, Gemini, Qwen, Kimi, MiniMax, DeepSeek, GLM (Zhipu), StepFun, ERNIE (Baidu), plus free local models (Ollama / LM Studio / llama.cpp / vLLM)
154
- - **Gemini 3.6 Flash** (`gemini-3.6-flash`, GA Jul 21 2026) &mdash; Flash/search tier; reasoning default stays `gemini-3.1-pro-preview` (Google has still not shipped a 3.5 Pro)
176
+ - **67 AI Tools** across 11 providers &mdash; Perplexity, Grok, GPT-6, Gemini, Qwen, Kimi, MiniMax, DeepSeek, GLM (Zhipu), StepFun, TypeSafe Jev, plus free local models (Ollama / LM Studio / llama.cpp / vLLM)
177
+ - **Gemini 4 Argon** (`gemini-4-argon`, GA Oct 13 2026) &mdash; reasoning/judge default; set `TACHI_GEMINI_PRO_MODEL=gemini-3.1-pro-preview` to roll back. Flash/search tier is `gemini-3.8-flash`
155
178
  - **Multi-Model Council** &mdash; planner_maker synthesizes plans from 5+ models into bite-sized TDD steps
156
179
  - **Smart Routing** &mdash; Automatic model selection for optimal results
157
180
  - **OpenRouter Gateway** &mdash; Optional single API key for all providers
@@ -170,7 +193,7 @@ Skills automatically adapt to your configured API keys. Even with just 1-2 provi
170
193
  | **Code Focus** | 43 | Software development, SWE tasks |
171
194
  | **Balanced** | 56 | General-purpose, mixed workflows |
172
195
  | **Heavy Coding** | 59 | Max code tools + agentic workflows |
173
- | **Full** (default) | 67 | Everything enabled |
196
+ | **Full** (default) | 68 | Everything enabled |
174
197
 
175
198
  ### Developer Experience
176
199
  - **Claude Code** &mdash; First-class support
@@ -256,13 +279,13 @@ See [Installation Guide](docs/INSTALLATION_BOTH.md) for detailed instructions.
256
279
  `perplexity_ask` &#183; `perplexity_reason` &#183; `grok_search` &#183; `grok_search_lite` &#183; `openai_search` &#183; `gemini_search`
257
280
 
258
281
  ### Reasoning & Planning (15)
259
- `grok_reason` &#183; `openai_reason` &#183; `qwen_reason` &#183; `qwq_reason` &#183; `kimi_thinking` &#183; `kimi_decompose` &#183; `deepseek_reason` &#183; `glm_reason` &#183; `stepfun_reason` &#183; `ernie_reason` &#183; `planner_maker` &#183; `planner_runner` &#183; `list_plans` &#183; `spec_writer` &#183; `blog_writer`
282
+ `grok_reason` &#183; `openai_reason` &#183; `qwen_reason` &#183; `qwq_reason` &#183; `kimi_thinking` &#183; `kimi_decompose` &#183; `deepseek_reason` &#183; `glm_reason` &#183; `stepfun_reason` &#183; `planner_maker` &#183; `planner_runner` &#183; `list_plans` &#183; `spec_writer` &#183; `blog_writer`
260
283
 
261
284
  ### Code Intelligence (11)
262
285
  `kimi_code` &#183; `grok_code` &#183; `grok_debug` &#183; `qwen_coder` &#183; `qwen_algo` &#183; `qwen_competitive` &#183; `deepseek_algo` &#183; `minimax_code` &#183; `minimax_agent` &#183; `testgen` &#183; `debug_triage`
263
286
 
264
- ### Analysis & Judgment (14)
265
- `gemini_analyze_text` &#183; `gemini_analyze_code` &#183; `gemini_judge` &#183; `jury` &#183; `diff_review` &#183; `plan_critique` &#183; `gemini_brainstorm` &#183; `openai_brainstorm` &#183; `openai_code_review` &#183; `openai_explain` &#183; `grok_brainstorm` &#183; `grok_architect` &#183; `security_review` &#183; `kimi_long_context`
287
+ ### Analysis & Judgment (15)
288
+ `gemini_analyze_text` &#183; `gemini_analyze_code` &#183; `gemini_judge` &#183; `jury` &#183; `diff_review` &#183; `plan_critique` &#183; `gemini_brainstorm` &#183; `openai_brainstorm` &#183; `openai_code_review` &#183; `openai_explain` &#183; `grok_brainstorm` &#183; `grok_architect` &#183; `security_review` &#183; `jev_decide` &#183; `kimi_long_context`
266
289
 
267
290
  ### Meta & Orchestration (6)
268
291
  `think` &#183; `nextThought` &#183; `focus` &#183; `tachi` &#183; `doctor` &#183; `usage_stats`
@@ -10,10 +10,10 @@ 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/ERNIE + planner (~30 tools)" },
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
- { name: "OpenAI", envVar: "OPENAI_API_KEY", unlocks: "GPT-5.5 tools + spec_writer" },
16
+ { name: "OpenAI", envVar: "OPENAI_API_KEY", unlocks: "OpenAI (GPT) tools + spec_writer" },
17
17
  { name: "Grok / xAI", envVar: "GROK_API_KEY", unlocks: "Grok tools + debug_triage" },
18
18
  ];
19
19
  function defaultProbe() {
@@ -6,35 +6,48 @@
6
6
  // =============================================================================
7
7
  // OPENAI MODELS (provider-based naming)
8
8
  // =============================================================================
9
- // GPT-5.6 released Jul 9, 2026 - CURRENT. Three durable tiers replace the pro/mini split:
9
+ // GPT-6 Astra released Sep 3, 2026 - CURRENT DEFAULT. `gpt-6-astra`: $10/$50 (cached $1),
10
+ // 1.05M ctx, 128K out. Verified live Sep 14, 2026 against /v1/models and /v1/responses:
11
+ // reasoning.effort accepts ONLY low|medium|high|xhigh|max ("none"/"minimal" are a 400, so
12
+ // callOpenAI maps them to "low"), and temperature must stay at the default — sending 0.7 is
13
+ // a 400. `gpt-6-astra-pro` / `gpt-astra-latest` exist on OpenRouter only (404 on the direct API).
14
+ // Rolled out to a limited set of orgs first, so callOpenAI falls back astra -> sol -> terra.
15
+ // GPT-5.6 (Jul 9, 2026) - three tiers kept as explicit picks and as Astra's runtime fallback:
10
16
  // sol (flagship $5/$30) / terra (balanced $2/$12) / luna (fast $0.20/$1.20). 1.05M ctx, 128K out.
11
17
  // Jul 30, 2026 price cut: luna -80%, terra -20%, sol unchanged. Verified Aug 12, 2026.
12
18
  // No Codex-specific API model exists (no gpt-5.6-codex / codex-max) — the CODEX* aliases
13
- // below are legacy names repointed onto the sol/terra/luna tiers.
14
- // "Pro" is no longer a model: sol + reasoning.effort (the $30/$180 gpt-5.5-pro tier is gone).
15
- // GPT-5.5 (Apr 23, 2026) kept as fallback. OpenRouter uses prefix: openai/gpt-5.6-sol etc.
19
+ // below are legacy names repointed onto current tiers.
20
+ // "Pro" is not an API model: flagship + reasoning.effort (the $30/$180 gpt-5.5-pro tier is gone).
21
+ // GPT-5.5 (Apr 23, 2026) kept as fallback. OpenRouter uses prefix: openai/gpt-6-astra etc.
16
22
  export const OPENAI_MODELS = {
17
- // GPT-5.6 tiers (Jul 9, 2026 - CURRENT)
18
- DEFAULT: "gpt-5.6-sol", // Flagship: coding/agentic SOTA, 54% more token-efficient than 5.5
19
- SOL: "gpt-5.6-sol", // Explicit tier alias (also aliased "gpt-5.6" server-side)
23
+ // GPT-6 Astra (Sep 3, 2026 - CURRENT)
24
+ DEFAULT: "gpt-6-astra", // Flagship: computer use, coding, science. $10/$50 (2x sol input)
25
+ ASTRA: "gpt-6-astra", // Explicit alias
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
20
29
  TERRA: "gpt-5.6-terra", // Balanced: gpt-5.5-level at $2/$12 (Jul 30, 2026 cut: -20%)
21
- LUNA: "gpt-5.6-luna", // Fast/cheap: $0.20/$1.20 after the Jul 30, 2026 -80% cut.
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).
22
31
  // Now ~9x cheaper than terra, not 2.5x — worth routing to it
23
32
  // far more aggressively. (Weak long-context recall: avoid huge inputs.)
24
- MINI: "gpt-5.6-luna", // "mini" tier successor (was gpt-5.4-mini)
25
- PRO: "gpt-5.6-sol", // Pro tier eliminated in 5.6 — sol + reasoning.effort xhigh (was gpt-5.5-pro $30/$180)
33
+ MINI: "gpt-6-luna", // "mini" tier successor (was gpt-5.4-mini)
34
+ PRO: "gpt-6-astra", // No pro API model — Astra + reasoning.effort xhigh/max (was gpt-5.5-pro $30/$180)
26
35
  // GPT-5.5 (Apr 2026) - fallback
27
36
  FALLBACK_5_5: "gpt-5.5",
28
37
  // Aliases for backward compatibility
29
- THINKING: "gpt-5.6-sol", // "Thinking" = sol with high reasoning effort
30
- FULL: "gpt-5.6-sol", // Map old FULL to DEFAULT
38
+ THINKING: "gpt-6-astra", // "Thinking" = flagship with high reasoning effort
39
+ FULL: "gpt-6-astra", // Map old FULL to DEFAULT
31
40
  CODEX: "gpt-5.6-terra", // Coding workhorse tier
32
- CODEX_MINI: "gpt-5.6-luna", // Cheapest tier
33
- CODEX_MAX: "gpt-5.6-sol", // Map old codex-max to flagship (use high effort)
34
- INSTANT: "gpt-5.6-luna", // Fast tier
41
+ CODEX_MINI: "gpt-6-luna", // Cheapest tier
42
+ CODEX_MAX: "gpt-6-astra", // Map old codex-max to flagship (use high effort)
43
+ INSTANT: "gpt-6-luna", // Fast tier
35
44
  };
36
45
  // OpenRouter model ID mapping (add prefix when using OpenRouter gateway)
37
46
  export const OPENROUTER_PREFIX_MAP = {
47
+ "gpt-6-astra": "openai/",
48
+ "gpt-6.1-sol": "openai/",
49
+ "gpt-6-sol": "openai/",
50
+ "gpt-6-luna": "openai/",
38
51
  "gpt-5.6-sol": "openai/",
39
52
  "gpt-5.6-terra": "openai/",
40
53
  "gpt-5.6-luna": "openai/",
@@ -44,6 +57,7 @@ export const OPENROUTER_PREFIX_MAP = {
44
57
  };
45
58
  // OpenAI Reasoning Effort Levels (for models that support it)
46
59
  // All three GPT-5.6 tiers (sol/terra/luna) accept the full range; medium is the API default.
60
+ // gpt-6-astra rejects NONE (and "minimal") with a 400 — callOpenAI sends LOW instead.
47
61
  export const OPENAI_REASONING = {
48
62
  NONE: "none", // No extra reasoning (fastest, allows temperature)
49
63
  LOW: "low", // Light reasoning — right for grounded web-search lookups
@@ -58,24 +72,38 @@ export const OPENAI_REASONING = {
58
72
  // =============================================================================
59
73
  // GEMINI MODELS (Google)
60
74
  // =============================================================================
61
- // Gemini 3.6 Flash GA'd Jul 21, 2026 — workhorse tier, 1M ctx, $1.50/$7.50, ~17% fewer
62
- // output tokens than 3.5 Flash. It is the new FLASH/search tier. Gemini 3.5 Flash-Lite
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).
80
+ // Gemini 3.7 Flash GA'd Aug 13, 2026 — the new workhorse/FLASH/search tier, 1M ctx,
81
+ // $0.75/$3.75 intro pricing through Dec 31, 2026 (then $1.50/$7.50). 3.6 Flash
82
+ // (Jul 21, 2026, $1.50/$7.50) stays live as the fallback. Gemini 3.5 Flash-Lite
63
83
  // shipped the same day ($0.30/$2.50) and replaces 3.1-flash-lite as the cheap tier.
64
- // Gemini 3.5 Pro STILL has not shipped (Google released three models on Jul 21 and
65
- // explicitly skipped Pro — internal perf goals unmet, "landing soon" + Gemini 4 pre-training
66
- // underway), so the reasoning DEFAULT stays on gemini-3.1-pro-preview.
84
+ // Gemini 3.5 Pro STILL has not shipped (missed its June window; "testing with partners",
85
+ // Gemini 4 pre-training underway — reverified via ai.google.dev Aug 29, 2026), so the
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
+ }
67
92
  export const GEMINI_MODELS = {
68
- // Gemini 3.1 Pro - reasoning default (3.0 Pro retired Mar 9, 2026; no 3.5 Pro as of Jul 26, 2026)
69
- GEMINI_3_PRO: "gemini-3.1-pro-preview", // Default: top reasoning model available
70
- GEMINI_3_1_PRO: "gemini-3.1-pro-preview", // Enhanced reasoning, 1M context
71
- GEMINI_3_6_FLASH: "gemini-3.6-flash", // GA Jul 21, 2026 - CURRENT flash/search tier, 1M ctx, $1.50/$7.50
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
99
+ GEMINI_3_6_FLASH: "gemini-3.6-flash", // GA Jul 21, 2026 - previous flash tier (fallback), $1.50/$7.50
72
100
  GEMINI_3_5_FLASH: "gemini-3.5-flash", // GA May 19, 2026 - previous flash tier (fallback)
73
101
  GEMINI_3_FLASH: "gemini-3-flash-preview", // Legacy fast frontier (kept for model-router)
74
102
  GEMINI_3_5_FLASH_LITE: "gemini-3.5-flash-lite", // Jul 21, 2026 - cheapest tier, $0.30/$2.50
75
103
  GEMINI_3_1_FLASH_LITE: "gemini-3.1-flash-lite", // Mar 3, 2026 - previous cheap tier (legacy)
76
104
  // Aliases
77
- PRO: "gemini-3.1-pro-preview",
78
- FLASH: "gemini-3.6-flash", // Bumped: 3.5-flash -> 3.6-flash (Jul 21, 2026)
105
+ get PRO() { return getGeminiProModel(); },
106
+ FLASH: "gemini-3.8-flash", // Bumped: 3.7-flash -> 3.8-flash (Sep 2, 2026)
79
107
  FLASH_LITE: "gemini-3.5-flash-lite", // Bumped: 3.1-flash-lite -> 3.5-flash-lite (Jul 21, 2026)
80
108
  };
81
109
  // Perplexity Models
@@ -86,14 +114,18 @@ export const PERPLEXITY_MODELS = {
86
114
  };
87
115
  // Grok Models (xAI) - Re-verified 2026-08-14 against GET /v1/models: Grok 4.6 has shipped and is
88
116
  // the current latest. Catalog: grok-4.20-0309-* (x3), grok-4.3, grok-4.5, grok-4.6, grok-build-0.1,
89
- // plus grok-imagine image/video. grok-4.7 and grok-5 do NOT exist yet.
117
+ // plus grok-imagine image/video. Re-checked 2026-09-29: grok-4.7 is live (launched Sep 21); grok-5 does not exist.
90
118
  // Also verified absent: grok-code-fast-2 (unannounced) and grok-build-0.2 (docs still list 0.1 only).
91
119
  export const GROK_MODELS = {
92
120
  // Grok 4.6 (Aug 2026) - CURRENT LATEST — verified against /v1/models on 2026-08-14.
93
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.
94
122
  // CRITICAL for search: 4.6 actually invokes web_search on the Agent Tools API; 4.5 does NOT
95
123
  // (returns ungrounded training-data answers with zero web_search_call entries).
96
- _4_6: "grok-4.6", // Latest: 500K ctx, $2/$6, cached $0.50/M
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
97
129
  // Grok 4.5 (Jul 8, 2026) - previous flagship ("Opus-class")
98
130
  // 500K context (SMALLER than 4.3's 1M — fine for tools, mind huge inputs), $2/$6,
99
131
  // configurable reasoning effort. EU API access landed Jul 17, 2026 — 4.3 kept as quota/region fallback.
@@ -105,9 +137,9 @@ export const GROK_MODELS = {
105
137
  _4_3_LATEST: "grok-4.3-latest", // Rolling alias for newest 4.3 snapshot
106
138
  _BUILD: "grok-build-0.1", // Coding specialist (May 29, 2026): 256k ctx, fast agentic coding
107
139
  // Grok 4.20 models (Mar 10, 2026) - LEGACY keys. Deprecated keys now resolve to the current flagship (4.5).
108
- _4_20_REASONING: "grok-4.5", // [deprecated key] → grok-4.5 (was grok-4.20-0309-reasoning)
109
- _4_20_NON_REASONING: "grok-4.5", // [deprecated key] → grok-4.5 (was grok-4.20-0309-non-reasoning)
110
- _4_20_MULTI_AGENT: "grok-4.5", // [deprecated key] → grok-4.5 (architect uses high reasoning.effort)
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)
111
143
  // Grok 4.1 fast models (Nov 2025) - BEST VALUE (10x cheaper)
112
144
  // RETIRED by xAI — verified Aug 12, 2026. DO NOT WIRE THESE TO ANYTHING.
113
145
  // The retirement is invisible at runtime: xAI answers a request for these ids with
@@ -146,20 +178,28 @@ export const MINIMAX_MODELS = {
146
178
  M3: "minimax/minimax-m3", // 1M ctx, MSA sparse attention, multimodal, agentic/coding, $0.30/$1.20
147
179
  M2_7: "minimax/minimax-m2.7", // 2300B/100B MoE, 200K ctx, SWE-Pro 56.22%, Multi-SWE #1 (fallback)
148
180
  M2_5: "minimax/minimax-m2.5", // SWE-Bench 80.2%, 37% faster than M2.1 (legacy)
149
- M2_1: "minimax/minimax-m2.1", // 230B/10B MoE - SWE-Bench 72.5% (legacy)
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
150
189
  };
151
190
  // Qwen Models (Alibaba via OpenRouter)
152
191
  // Qwen3 235B Thinking (July 2025) - Largest reasoning model available
153
192
  // Qwen3-Coder-Next (Feb 2026) - Agentic coding specialist, 80B/3B MoE, 262K context
154
193
  export const QWEN_MODELS = {
155
- 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
156
195
  MAX_3_7: "qwen/qwen3.7-max", // May 21, 2026: previous flagship, 1M ctx, agent-centric, $1.475/$4.425 (fallback)
157
196
  PLUS_3_7: "qwen/qwen3.7-plus", // Jun 3, 2026: general-purpose flagship, 1M ctx, multimodal, $0.32/$1.28
158
197
  PLUS_3_6: "qwen/qwen3.6-plus", // Apr 2026: previous general-purpose flagship (legacy)
159
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)
160
- CODER_PLUS: "qwen/qwen3-coder-plus", // Code specialist (32K context)
199
+ CODER_PLUS: "qwen/qwen3-coder-plus", // GONE from OpenRouter (verified 2026-10-14) — key kept for back-compat, do NOT call
161
200
  CODER: "qwen/qwen3-coder", // Legacy coder - 480B MoE, SWE-Bench 69.6%
162
- QWQ_32B: "qwen/qwq-32b", // Deep reasoning - CodeElo 1261
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
202
+ QWQ_32B: "qwen/qwq-32b", // RETIRED from OpenRouter (404 "No endpoints found", Sep 14, 2026) — do NOT call
163
203
  MAX_THINKING: "qwen/qwen3-235b-a22b-thinking-2507", // 235B MoE (22B active) thinking mode - heavy reasoning
164
204
  };
165
205
  // =============================================================================
@@ -192,6 +232,7 @@ export const ALL_MODELS = {
192
232
  ...KIMI_MODELS,
193
233
  ...QWEN_MODELS,
194
234
  ...MINIMAX_MODELS,
235
+ ...JEV_MODELS,
195
236
  };
196
237
  // Common workflow settings
197
238
  export const DEFAULT_WORKFLOW_SETTINGS = {
@@ -206,6 +247,11 @@ export const DEFAULT_WORKFLOW_SETTINGS = {
206
247
  // When new models release, update ONLY this section!
207
248
  // All tools automatically use the new models.
208
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).
253
+ // UPDATED Sep 14, 2026: OpenAI default gpt-5.6-sol -> gpt-6-astra (Sep 3);
254
+ // qwq_reason qwen/qwq-32b (retired from OpenRouter) -> qwen/qwen3.8-27b.
209
255
  // UPDATED Jul 26, 2026 (full provider audit):
210
256
  // Kimi K2.7-Code -> K3 (Jul 16) · Gemini Flash 3.5 -> 3.6 + Flash-Lite 3.1 -> 3.5 (Jul 21)
211
257
  // Re-verified as still-current, NOT bumped: GPT-5.6 tiers (Jul 9), Grok 4.5 (Jul 8),
@@ -213,32 +259,31 @@ export const DEFAULT_WORKFLOW_SETTINGS = {
213
259
  // StepFun 3.7, ERNIE 4.5 VL, Qwen Coder-Next, Perplexity Sonar.
214
260
  export const CURRENT_MODELS = {
215
261
  openai: {
216
- default: OPENAI_MODELS.DEFAULT, // gpt-5.6-sol - flagship, agentic/coding SOTA (Jul 2026)
217
- reason: OPENAI_MODELS.DEFAULT, // Deep reasoning (sol + effort=high)
218
- brainstorm: OPENAI_MODELS.DEFAULT, // Creative ideation (sol + effort=medium)
262
+ default: OPENAI_MODELS.DEFAULT, // gpt-6-astra - flagship (Sep 3, 2026), $10/$50
263
+ reason: OPENAI_MODELS.DEFAULT, // Deep reasoning (astra + effort=xhigh)
264
+ brainstorm: OPENAI_MODELS.DEFAULT, // Creative ideation (astra + effort=medium)
219
265
  code: OPENAI_MODELS.TERRA, // Code tasks (gpt-5.6-terra - 5.5-level at $2/$12)
220
- explain: OPENAI_MODELS.LUNA, // Explanations (gpt-5.6-luna - $0.20/$1.20, fast)
221
- search: OPENAI_MODELS.TERRA, // Web search: $10/1k call fee is flat across tiers,
222
- // so terra ($2/$12) does grounded lookup at 2.5x less
223
- // token cost than sol. All 5.6 tiers support web_search.
224
- // Premium: the 5.5-pro tier ($30/$180) is gone — sol + effort=max replaces it at $5/$30
225
- premium: OPENAI_MODELS.PRO, // Expert mode (gpt-5.6-sol + reasoning.effort=max)
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).
269
+ // Premium: the 5.5-pro tier ($30/$180) is gone — astra + effort=max replaces it at $10/$50
270
+ premium: OPENAI_MODELS.PRO, // Expert mode (gpt-6-astra + reasoning.effort=max)
226
271
  },
227
272
  grok: {
228
- reason: GROK_MODELS._4_5, // grok-4.5 (Jul 2026 flagship, high reasoning effort)
229
- code: GROK_MODELS._4_5, // grok-4.5 (flagship quality, tool-calling)
230
- debug: GROK_MODELS._4_5, // grok-4.5 (flagship debugging)
231
- brainstorm: GROK_MODELS._4_5, // grok-4.5 (500K context)
232
- search: GROK_MODELS._4_6, // grok-4.6: the ONLY current model verified (2026-08-14) to
233
- // actually invoke web_search on /v1/responses — grok-4.5
234
- // silently answers from training data with zero searches
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.
235
280
  search_lite: GROK_MODELS._4_3, // grok-4.3: $1.25/$2.50, 1M ctx — ~1.6x/2.4x cheaper than
236
281
  // grok-4.5 search. Was _4_1_FAST_NON_REASONING until that id
237
282
  // was retired (xAI silently served 4.3 for it anyway).
238
- architect: GROK_MODELS._4_5, // grok-4.5 with high reasoning.effort (agentic swarm behaviour)
283
+ architect: GROK_MODELS._4_7, // grok-4.7 with high reasoning.effort (agentic swarm behaviour)
239
284
  },
240
285
  gemini: {
241
- default: GEMINI_MODELS.GEMINI_3_PRO,
286
+ get default() { return GEMINI_MODELS.GEMINI_3_PRO; }, // gemini-4-argon unless TACHI_GEMINI_PRO_MODEL
242
287
  },
243
288
  perplexity: {
244
289
  search: PERPLEXITY_MODELS.SONAR, // $1/$1 per M (cheapest)
@@ -286,17 +331,17 @@ export const TOOL_DEFAULTS = {
286
331
  },
287
332
  // Gemini tools
288
333
  gemini_brainstorm: {
289
- model: CURRENT_MODELS.gemini.default,
334
+ get model() { return CURRENT_MODELS.gemini.default; }, // live: follows TACHI_GEMINI_PRO_MODEL
290
335
  maxTokens: 2048,
291
336
  temperature: 0.9,
292
337
  },
293
338
  gemini_analyze_code: {
294
- model: CURRENT_MODELS.gemini.default,
339
+ get model() { return CURRENT_MODELS.gemini.default; }, // live: follows TACHI_GEMINI_PRO_MODEL
295
340
  maxTokens: 2048,
296
341
  temperature: 0.3,
297
342
  },
298
343
  gemini_analyze_text: {
299
- model: CURRENT_MODELS.gemini.default,
344
+ get model() { return CURRENT_MODELS.gemini.default; }, // live: follows TACHI_GEMINI_PRO_MODEL
300
345
  maxTokens: 2048,
301
346
  temperature: 0.5,
302
347
  },
@@ -405,6 +450,10 @@ export const DEFAULT_WORKFLOW_TOOL = "openai_brainstorm";
405
450
  // Used in tool outputs, usage stats, logs - keeps display consistent
406
451
  export const MODEL_DISPLAY_NAMES = {
407
452
  // OpenAI
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",
408
457
  "gpt-5.6-sol": "gpt-5.6-sol",
409
458
  "gpt-5.6-terra": "gpt-5.6-terra",
410
459
  "gpt-5.6-luna": "gpt-5.6-luna",
@@ -415,7 +464,9 @@ export const MODEL_DISPLAY_NAMES = {
415
464
  "gpt-5.4-mini": "gpt-5.4-mini",
416
465
  "gpt-5.4-pro": "gpt-5.4-pro",
417
466
  // Gemini
467
+ "gemini-4-argon": "gemini-4-argon",
418
468
  "gemini-3.1-pro-preview": "gemini-3.1-pro",
469
+ "gemini-3.7-flash": "gemini-3.7-flash",
419
470
  "gemini-3.6-flash": "gemini-3.6-flash",
420
471
  "gemini-3.5-flash-lite": "gemini-3.5-flash-lite",
421
472
  "gemini-3.5-flash": "gemini-3.5-flash",
@@ -453,6 +504,7 @@ export const MODEL_DISPLAY_NAMES = {
453
504
  "qwen/qwen3-coder-plus": "qwen-coder",
454
505
  "qwen/qwen3-coder": "qwen-coder",
455
506
  "qwen/qwq-32b": "qwq-32b",
507
+ "qwen/qwen3.8-27b": "qwen3.8-27b",
456
508
  "qwen/qwen3-max-thinking": "qwen-max",
457
509
  "qwen/qwen3-235b-a22b-thinking-2507": "qwen-235b-thinking",
458
510
  // MiniMax
@@ -468,6 +520,10 @@ export function getModelDisplayName(modelId) {
468
520
  // Model pricing per 1K tokens (input/output average) for cost tracking
469
521
  export const MODEL_PRICING = {
470
522
  // OpenAI
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)
471
527
  "gpt-5.6-sol": 0.0175, // ($5 + $30) / 2 / 1000 (unchanged in the Jul 30 cut)
472
528
  "gpt-5.6-terra": 0.007, // ($2 + $12) / 2 / 1000 (Jul 30, 2026 cut: -20%)
473
529
  "gpt-5.6-luna": 0.0007, // ($0.20 + $1.20) / 2 / 1000 (Jul 30, 2026 cut: -80%)
@@ -477,8 +533,10 @@ export const MODEL_PRICING = {
477
533
  "gpt-5.4-mini": 0.002625, // ($0.75 + $4.50) / 2 / 1000 (Mar 17, 2026)
478
534
  "gpt-5.4-pro": 0.105, // ($30 + $180) / 2 / 1000 (Mar 2026)
479
535
  // Gemini
536
+ "gemini-4-argon": 0.006, // ($2 + $10) / 2 / 1000 intro through Nov 30, 2026 — $4/$20 (0.012) from Dec 1
480
537
  "gemini-3.1-pro-preview": 0.007, // ($2 + $12) / 2 / 1000
481
- "gemini-3.6-flash": 0.0045, // ($1.50 + $7.50) / 2 / 1000 (GA Jul 21, 2026)
538
+ "gemini-3.7-flash": 0.00225, // ($0.75 + $3.75) / 2 / 1000 intro through Dec 31, 2026 (then $1.50/$7.50)
539
+ "gemini-3.6-flash": 0.0045, // ($1.50 + $7.50) / 2 / 1000 (GA Jul 21, 2026 - fallback)
482
540
  "gemini-3.5-flash-lite": 0.0014, // ($0.30 + $2.50) / 2 / 1000 (Jul 21, 2026)
483
541
  "gemini-3.5-flash": 0.00525, // ($1.50 + $9) / 2 / 1000 (GA May 19, 2026 - fallback)
484
542
  "gemini-3-flash-preview": 0.00175, // ($0.50 + $3) / 2 / 1000 (legacy)
@@ -516,6 +574,7 @@ export const MODEL_PRICING = {
516
574
  "qwen/qwen3-coder-plus": 0.0005,
517
575
  "qwen/qwen3-coder": 0.0003,
518
576
  "qwen/qwq-32b": 0.001,
577
+ "qwen/qwen3.8-27b": 0.001382, // ($0.214 + $2.55) / 2 / 1000 (Aug 14, 2026)
519
578
  "qwen/qwen3-max-thinking": 0.005,
520
579
  "qwen/qwen3-235b-a22b-thinking-2507": 0.000822, // ($0.15 + $1.50) / 2 / 1000
521
580
  // OpenRouter models - MiniMax (VERY CHEAP!)
@@ -16,10 +16,10 @@ import { GEMINI_MODELS, OPENAI_MODELS, GROK_MODELS, PERPLEXITY_MODELS, KIMI_MODE
16
16
  */
17
17
  const MODELS = {
18
18
  // Google Gemini
19
- GEMINI: GEMINI_MODELS.GEMINI_3_PRO, // gemini-3.1-pro-preview
20
- // OpenAI (GPT-5.5)
21
- OPENAI: OPENAI_MODELS.THINKING, // gpt-5.5 (default - most capable, agentic)
22
- OPENAI_REASON: OPENAI_MODELS.THINKING, // gpt-5.5 (deep reasoning)
19
+ get GEMINI() { return GEMINI_MODELS.GEMINI_3_PRO; }, // gemini-4-argon unless TACHI_GEMINI_PRO_MODEL (read per call)
20
+ // OpenAI (GPT-6 Astra)
21
+ OPENAI: OPENAI_MODELS.THINKING, // gpt-6-astra (default - most capable, agentic)
22
+ OPENAI_REASON: OPENAI_MODELS.THINKING, // gpt-6-astra (deep reasoning)
23
23
  // xAI Grok
24
24
  GROK: GROK_MODELS._4_3, // grok-4.3 (Apr 2026 flagship, 1M ctx, $1.25/$2.50)
25
25
  // Perplexity
@@ -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') || id.includes('ernie') ||
55
+ id.includes('stepfun') ||
52
56
  id.includes('qwen3.8') || id.includes('qwen3.7-max')) {
53
57
  return config.openrouterThinking;
54
58
  }