fix(plugins/honcho): monkeypatch SDK to ignore new server fields - #67104
fix(plugins/honcho): monkeypatch SDK to ignore new server fields#67104archdex-art wants to merge 2 commits into
Conversation
teknium1
left a comment
There was a problem hiding this comment.
Thanks for isolating a plausible SDK/server compatibility failure. Current main still pins honcho-ai==2.2.0 (pyproject.toml:186) and configures observe_others before session.add_peers (plugins/memory/honcho/session.py:200-210), so the affected SDK path remains relevant.
Problems
- This bundles an unrelated Nix source-filter change at
nix/tui.nix:4. The existing maintainer comment links that same change to open #67082 and requests a focused Honcho PR. - The diff adds no regression coverage for the SDK response-model compatibility path. Current tests do not cover
PeerResponse,PeerConfig, ormodel_rebuild.
Suggested changes
- Split the Nix line into #67082 and keep this PR limited to Honcho.
- Add a regression test using a representative newer-server response payload against the pinned
honcho-ai==2.2.0model, demonstrating that the intended parse succeeds and known fields remain available.
Automated hermes-sweeper review.
| { pkgs, hermesNpmLib, ... }: | ||
| let | ||
| npm = hermesNpmLib.mkNpmPassthru { dirs = [ "ui-tui" ]; }; | ||
| npm = hermesNpmLib.mkNpmPassthru { dirs = [ "ui-tui" "apps/shared" ]; }; |
There was a problem hiding this comment.
This is independent of the Honcho SDK workaround and duplicates the focused Nix repair tracked in #67082. Please split it out so the Honcho compatibility fix can be reviewed and tested independently.
| # Workaround for issue #67013: newer Honcho servers send fields (like observe_others) | ||
| # that the honcho-ai<=2.2.0 SDK strictly rejects. We monkeypatch the Pydantic models | ||
| # to ignore extra fields until the upstream SDK is updated on PyPI. | ||
| try: |
There was a problem hiding this comment.
Please add a regression test that parses a representative newer-server payload through the pinned honcho-ai==2.2.0 model. The PR currently changes global Pydantic behavior without coverage of the reported PeerResponse failure.
SummarySix PRs address this three-issue complex. Only #67104 changes the Honcho failure path by relaxing SDK model handling of new server fields; #67082, #67090, #67098, #67475, and #67885 address the separate Nix TUI source-filter omission, while #67104 also duplicates that Nix change. Related pull requests
Duplicates#67082, #67098, #67475, and #67885 implement the same functional Nix TUI source-filter correction; #67090 targets that correction but its displayed diff contains conflict markers. The Nix portion of #67104 also duplicates #67082, but #67104 is not a full duplicate because its Honcho workaround uniquely targets #67013. Suggested consolidationAuthor action: split out the part that can merge. Keep #67104 open as the recorded best existing fix for #67013, but remove its duplicate Complex graphflowchart TD
classDef open fill:#dbeafe,stroke:#1d4ed8,color:#1e3a8a
classDef merged fill:#dcfce7,stroke:#15803d,color:#14532d
classDef closed fill:#e5e7eb,stroke:#6b7280,color:#1f2937
classDef unverified fill:#f3f4f6,stroke:#9ca3af,color:#374151
classDef best stroke-width:3px,stroke:#b45309
classDef target stroke-width:3px,stroke:#4338ca
I67013(["issue #67013 (open)"])
I67056(["issue #67056 (open)"])
I67079(["issue #67079 (open)"])
subgraph Dup67082 ["PRs duplicating each other"]
P67082["PR #67082 (open)"]
P67090["PR #67090 (closed)"]
P67098["PR #67098 (closed)"]
P67104["PR #67104 (open)"]
P67475["PR #67475 (closed)"]
P67885["PR #67885 (closed)"]
end
P67104 -->|best fix| I67013
P67104 -->|fixes| I67056
P67104 -->|fixes| I67079
class I67013 open
class I67056 open
class I67079 open
class P67082 open
class P67090 closed
class P67098 closed
class P67104 open
class P67475 closed
class P67885 closed
class P67082 best
class P67082 best
class P67104 best
class P67104 target
click I67013 "https://github.com/NousResearch/hermes-agent/issues/67013"
click I67056 "https://github.com/NousResearch/hermes-agent/issues/67056"
click I67079 "https://github.com/NousResearch/hermes-agent/issues/67079"
click P67082 "https://github.com/NousResearch/hermes-agent/pull/67082"
click P67090 "https://github.com/NousResearch/hermes-agent/pull/67090"
click P67098 "https://github.com/NousResearch/hermes-agent/pull/67098"
click P67104 "https://github.com/NousResearch/hermes-agent/pull/67104"
click P67475 "https://github.com/NousResearch/hermes-agent/pull/67475"
click P67885 "https://github.com/NousResearch/hermes-agent/pull/67885"
Graph: solid arrow = fixes / best fix, dashed arrow = partial or unverified (see edge label); boxed group = PRs duplicating each other; amber border = best fix; indigo border = target; gray node = closed (state tag in the node label). Cross-PR triage: Reviewed 6 pull requests and 3 issues in this complex. Each diff was read against this issue; Assessment working set: 4 kB of PR diffs, 15 kB of issue/PR text, 6 kB of discussion (13 comments), 16 verify verdicts. verdicts reflect diff content, not PR titles. Part of an automated triage batch. |
Fixes #67013
The Honcho server has updated its schema (adding fields like
observe_others), but the latest Python SDK available on PyPI (honcho-ai==2.2.0) is strictly typed to reject unknown fields, causing a1 validation error for PeerResponsecrash upon session initialization.Since we cannot bump the dependency until upstream publishes a new release to PyPI, this applies a targeted Pydantic monkeypatch to
PeerConfigat module load time. By settingextra = 'ignore'and recompiling the model viamodel_rebuild(force=True), Hermes gracefully ignores any new API fields sent by newer servers while still remaining compatible with the pinned 2.2.0 SDK.