Skip to content

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

2.2 KB
Raw Blame

AgentHub 0.4.5: a stream survives output the client does not recognize

  • Date: 2026-08-20
  • Type: fix
  • Scope: core, cli, web
  • PR: #360

中文版

@prismshadow/agenthub moved from 0.4.4 to 0.4.5, which skips stream output a client does not recognize instead of failing the request (agenthub #181).

A gateway in front of a model API injects frames of its own during a long generation. 0.4.3 taught each protocol family the heartbeat spelling it had seen — keepalive on OpenAI Responses, ping on Anthropic Messages — so either spelling crossing into the other protocol still reached the unknown-event guard and threw. A relay that sent {"type": "ping", "cost": "@"} into a Responses stream ended the turn as llm request failed after 5 retries: Unknown output: {"type":"ping","cost":"@"}, because the engine classifies the throw as a retryable request failure and each retry met the next heartbeat.

Details

  • Every client that used to reject an unrecognized event now marks it unused instead — the Anthropic Messages and OpenAI Responses families, MiniMax M3 included — and the Gemini client skips an unrecognized content part, so no gateway frame can end a generation. Setting AGENTHUB_DEBUG to anything other than 0, false, no or off restores the guards for debugging, with the same error text as before.
  • AutoLLMClient gained listModels(), a defaultHeaders option, and the UnsupportedOperationError class; the bump added no call to any of them. The model catalog and protocol-path hints are unaffected, and protocol-path.ts's verification note now names the version it was re-checked against.
  • 0.4.5 also aligned the openai-responses and minimax-m3 message transforms with the GPT client, which flushes buffered assistant text at the end of a message rather than before each top-level item. A replayed turn of [text, tool_call] now reaches those two servers as [function_call, message], the order the GPT client has always sent.
  • pnpm-workspace.yaml's minimumReleaseAgeExclude entry names 0.4.5 and drops 0.4.4, as that file's own note instructed.