Skip to content

A local-first multi-agent app development platform, built on PenguinHarness

6.2 KB
Raw Blame

AgentHub 0.4.4: a max thinking level, and gateway heartbeats that no longer kill a stream

  • Date: 2026-08-19
  • Type: feature
  • Scope: core, server, web, cli, docs
  • PR: #334
  • Issue: #286
  • Breaking: yes — on DeepSeek models the low and xhigh tiers now send shallower efforts than before; pick max to keep the depth xhigh used to give.

中文版

@prismshadow/agenthub moved from 0.4.2 to 0.4.4, over two releases: 0.4.3 skips the heartbeat events gateways inject into a streaming response instead of failing the stream (agenthub #174), and 0.4.4 added a MAX thinking level above XHIGH and re-mapped every client's effort vocabulary onto the widened ladder (agenthub #176). The harness took the new tier all the way through: max is now a selectable thinking level in the Web pickers, a valid thinking_level for run_subagent, and an accepted value everywhere a level is stored or sent.

Gateway heartbeats

A gateway in front of a model API — one-api-style proxies, OpenRouter — sends a heartbeat during a long generation. On 0.4.2 that event reached the unknown-event guard and threw, the harness classified the throw as a retryable request failure, and the retry hit the next heartbeat: a long generation through such a gateway reconnected until it gave up, showing as an endless "reconnecting" in the Web App.

  • Responses-protocol clients (gpt-5.6, openai-responses, minimax-m3) treat keepalive as a known no-op; Chat Completions clients (openai-chat, deepseek-v4, glm-5.3, kimi-k3) read choices only when the field is populated; the Anthropic-protocol clients (claude-5, ant-messages) accept ping. Genuinely unknown events still fail loudly.
  • 0.4.4 then generalized the Gemini half: instead of inferring a heartbeat from a chunk carrying neither candidates nor usage, gemini3_7 marks a chunk unused when nothing was read out of it at all — no content items, no usage, no finish reason. Streams that omit usage behave the same either way.

The max tier

  • ThinkingLevelName gained "max", and mapThinkingLevel maps it to AgentHub's ThinkingLevel.MAX. Every client maps the tier onto the deepest effort its vendor accepts and degrades silently where no such tier exists — Gemini and MiniMax M3 stop at their high — so picking it never fails.
  • max is offered in the Web pickers, not merely accepted as a stored value. The pickers exclude none because many models cannot disable thinking; max carries no such caveat, so it joins low / medium / high / xhigh in SELECTABLE_THINKING_LEVELS, in DEFAULT_CHAT_THINKING_LEVELS (a Project's [default_chat] fallback), and in SUBAGENT_THINKING_LEVELS — the tiers run_subagent accepts for thinking_level.
  • The per-turn thinkingLevel on POST /api/sessions/:id/tasks and the Agent config's model.thinking_level both accept max; anything else is still a 400.
  • The CLI offers it too. --thinking and /thinking (#322) validate against core's DEFAULT_CHAT_THINKING_LEVELS, so they accepted max the moment the ladder widened — but their help text, /thinking readouts and invalid-level message spell the tiers out in free text and still stopped at xhigh, advertising less than the flag took. Those eight strings (both locales) and the CLI docs now name max, and a test pins the advertised set against the accepted one so the two cannot drift apart again.
  • xhigh was described in both locales as "the highest tier" of extended reasoning, which the new tier made false. Its description now names it as the tier beyond high, and max took over the superlative — the same rewording AgentHub applied to its own playground selector. Nothing in the harness compared or clamped levels ordinally, so no other site assumed xhigh was the ceiling.

DeepSeek effort re-mapping

DeepSeek's reasoning_effort accepts low / high / max and folds medium and xhigh onto high server-side. 0.4.4 aligned the client with that vocabulary, which changes what two existing tiers send on DeepSeek models:

Tier Sent before (0.4.3) Sent now (0.4.4)
LOW high low
XHIGH max high
MAX — max

A DeepSeek Session left on low therefore reasons less, and costs less, than it did; one on xhigh reasons less deeply than it did.

Thinking-level labels name the wire value

Each tier is now labelled with the value it actually sends: the Chinese label appends it in parentheses (极高 (xhigh), 最高 (max)) and the English label is that value itself — xhigh, not Extreme High. Every surface reading the shared name table picked it up: the conversation-time pickers, the mid-chat switch dialog and its toasts, and the Project chat-defaults dialog. The Agent settings rows already showed the raw wire value.

Compatibility

  • DeepSeek users who relied on xhigh should switch to max to keep the effort that tier used to send. A Session on low needs no action unless the old (much deeper) behavior was wanted, in which case high is the closest match.
  • Widening run_subagent's thinking_level enum changed the default tool entry, so KERNEL_VERSION advanced to generation 2026-08-19 with tools.builtin.run_subagent as its only changed leaf. Every existing Agent takes a kernel update; an entry the user edited is kept untouched and one they deleted stays deleted, so nothing has to be done by hand.
  • Stored configs and traces carrying any older level keep working — the ladder only grew at the top, and no existing value changed meaning in the harness.
  • pnpm-workspace.yaml's minimumReleaseAgeExclude entry now names 0.4.4 alone; the 0.4.3 entry was dropped as that file's own note instructed.
  • The two published packages were diffed to confirm no base URL or endpoint construction changed between 0.4.3 and 0.4.4, so the model catalog and the protocol-path hints are unaffected; protocol-path.ts's verification note names 0.4.4 as the version it was re-checked against.