Skip to content

fix(plugins/honcho): monkeypatch SDK to ignore new server fields - #67104

Open
archdex-art wants to merge 2 commits into
NousResearch:mainfrom
archdex-art:fix/honcho-plugin-pydantic-validation
Open

fix(plugins/honcho): monkeypatch SDK to ignore new server fields#67104
archdex-art wants to merge 2 commits into
NousResearch:mainfrom
archdex-art:fix/honcho-plugin-pydantic-validation

Conversation

@archdex-art

Copy link
Copy Markdown

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 a 1 validation error for PeerResponse crash upon session initialization.

Since we cannot bump the dependency until upstream publishes a new release to PyPI, this applies a targeted Pydantic monkeypatch to PeerConfig at module load time. By setting extra = 'ignore' and recompiling the model via model_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.

@alt-glitch alt-glitch added type/bug Something isn't working comp/plugins Plugin system and bundled plugins tool/memory Memory tool and memory providers comp/tui Terminal UI (ui-tui/ + tui_gateway/) area/nix Nix flake, NixOS module, container packaging P3 Low — cosmetic, nice to have duplicate This issue or pull request already exists needs-decision Awaiting maintainer decision before any implementation labels Jul 18, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

This bundle contains the same Nix TUI source-filter repair as open #67082, plus a separate Honcho workaround for #67013. Please split the independent Honcho change into a focused PR.

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, or model_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.0 model, demonstrating that the intended parse succeeds and known fields remain available.

Automated hermes-sweeper review.

Comment thread nix/tui.nix
{ pkgs, hermesNpmLib, ... }:
let
npm = hermesNpmLib.mkNpmPassthru { dirs = [ "ui-tui" ]; };
npm = hermesNpmLib.mkNpmPassthru { dirs = [ "ui-tui" "apps/shared" ]; };

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform area/memory Memory subsystem: store, providers, sync, background reviews labels Jul 19, 2026
@GottZ

GottZ commented Aug 3, 2026

Copy link
Copy Markdown

This was generated by AI during triage.

Summary

Six 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 consolidation

Author action: split out the part that can merge. Keep #67104 open as the recorded best existing fix for #67013, but remove its duplicate nix/tui.nix change and add the PeerResponse regression coverage requested by the contributor review; keep #67082 open as the focused salvage path for #67056/#67079, while #67090, #67098, #67475, and #67885 remain closed as duplicates of #67082.

Complex graph

flowchart 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"
Loading

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/memory Memory subsystem: store, providers, sync, background reviews area/nix Nix flake, NixOS module, container packaging comp/plugins Plugin system and bundled plugins comp/tui Terminal UI (ui-tui/ + tui_gateway/) duplicate This issue or pull request already exists needs-decision Awaiting maintainer decision before any implementation P3 Low — cosmetic, nice to have sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades tool/memory Memory tool and memory providers type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Honcho plugin fails to parse PeerResponse after Honcho server update

4 participants