GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(config): null web/backend and known_plugin_toolsets values no longer crash (#61142, #53196 salvage) by teknium1 · Pull Request #61835 · NousResearch/hermes-agent

Conversation

@teknium1

@teknium1 teknium1 commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Final two live members of the YAML-null config bug class: a null web:/web.backend: value no longer crashes web tools, and a null known_plugin_toolsets: no longer breaks hermes tools on both its read and write paths.

Salvages @HumphreySun98's #61142 and @17324393074's #53196 (authorship preserved), with one sibling-site follow-up.

Changes

  • tools/web_tools.py (fix(web): don't crash on a null web/backend config value #61142, cherry-picked): _load_web_config() honors its -> dict contract on a null web: section; check_web_api_key() guards None.lower() on a null backend. +2 tests.
  • hermes_cli/tools_config.py (fix(tools_config): guard against None in known_plugin_toolsets config #53196, cherry-picked): read path guards known_plugin_toolsets: null in _get_platform_tools()
  • Follow-up: write path in the same module — setdefault() does not replace a present-but-null key, so saving platform tools crashed indexing into None; normalized with an isinstance check
  • scripts/release.py: AUTHOR_MAP entries for both contributors (fix(tools_config): guard against None in known_plugin_toolsets config #53196's commit is under an unlinked local identity)

Validation

Before After
web: null → _load_web_config() None (contract violation) {}
web.backend: null → check_web_api_key() AttributeError clean boolean
known_plugin_toolsets: null, read AttributeError defaults
known_plugin_toolsets: null, write TypeError on save normalized dict
test_web_tools_config.py + test_tools_config.py — green

Both premises reproduced live on current main before salvage.

Infographic

null-config-stragglers

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

HumphreySun98 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
HumphreySun98 and others added 4 commits July 9, 2026 20:09
@HumphreySun98 @teknium1
fix(web): don't crash on a null web/backend config value
ca7457a
`_load_web_config()` is typed `-> dict` but returned `load_config().get("web",
{})`, which is `None` when the config has a present-but-null `web:` section
(YAML `web:` with no body). Every caller then does
`_load_web_config().get(...)` and raises `AttributeError: 'NoneType' object
has no attribute 'get'` — this hits `_get_backend`, `check_web_api_key`, and
the extract-char-limit reader.

Separately, `check_web_api_key()` read the backend as
`.get("backend", "").lower()`; a null `web.backend` value yields `None` (the
`""` default only applies when the key is absent), so `None.lower()` raised.
`check_web_api_key` is the `check_fn` gate for `web_search`/`web_extract`, so
this surfaced as an exception during tool-availability checking.

- Make `_load_web_config()` honor its `-> dict` contract (`... or {}`), fixing
  the null-`web:`-section crash at every call site.
- Guard the backend value in `check_web_api_key` with `or ""`, mirroring the
  existing guard in `_get_backend`.

Adds regression tests for both the null-backend-value and null-web-section
cases.
sonxi @teknium1
fix(tools_config): guard against None in known_plugin_toolsets config
dcbe984
When config.yaml has known_plugin_toolsets set to null (or any value
mapped to None by the YAML loader), config.get returns None (dict.get
only falls back to the default when the key is absent, not when its
value is None). The subsequent set(known_map.get(platform, [])) then
crashes with TypeError: NoneType object is not iterable and the gateway
fails to start, even though no plugin toolsets are configured.

Add or-empty-dict and or-empty-list guards so a null/None value is
treated as empty instead of crashing the platform-tools resolver.
@teknium1
chore: AUTHOR_MAP entries for HumphreySun98 + 17324393074 (PR #61142/#…
d3d9351
…53196 salvage)
@teknium1
fix(tools_config): widen null guard to known_plugin_toolsets write path
99d14c9
Sibling of the salvaged #53196 read-path fix: setdefault() does not
replace a present-but-null key, so saving platform tools with
known_plugin_toolsets: null in config.yaml crashed on indexing None.
@17324393074

17324393074 commented Jul 10, 2026 via email

Copy link
Copy Markdown
这是来自QQ邮箱的假期自动回复邮件。你好,我最近正在休假中,无法亲自回复你的邮件。我将在假期结束后,尽快给你回复。
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/cli CLI entry point, hermes_cli/, setup wizard tool/web Web search and extraction area/config Config system, migrations, profiles labels Jul 10, 2026
@alt-glitch

alt-glitch commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

This was generated by AI during triage.

Salvage consolidating two open null-config fixes with authorship preserved: #61142 (null web:/web.backend:) and #53196 (null known_plugin_toolsets:), plus a sibling write-path follow-up in the same module. Related to the known_plugin_toolsets discoverability cluster (#55793/#55801). A human should pick between this consolidated salvage and the individual source PRs.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@teknium1
teknium1 merged commit 07271a6 into main Jul 10, 2026
31 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@teknium1
teknium1 deleted the salvage/null-config-stragglers branch July 10, 2026 03:28
This was referenced Jul 10, 2026
fix(web): don't crash on a null web/backend config value #61142
Closed
fix(tools_config): guard against None in known_plugin_toolsets config #53196
Closed
@HumphreySun98

HumphreySun98 commented Jul 10, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Thanks for salvaging and merging this, @teknium1 — glad the null web/backend config fix landed.

Happy to follow up on the tools_config sibling paths if useful.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

area/config Config system, migrations, profiles comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists tool/web Web search and extraction type/bug Something isn't working

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@teknium1 @17324393074 @alt-glitch @HumphreySun98
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.