Skip to content

feat(kanban): gate notifier watcher on dispatch_in_gateway#37174

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-ae1aa4f2
Jun 2, 2026
Merged

feat(kanban): gate notifier watcher on dispatch_in_gateway#37174
teknium1 merged 1 commit into
mainfrom
hermes/hermes-ae1aa4f2

Conversation

@teknium1

@teknium1 teknium1 commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Summary

The /model picker no longer silently routes an OpenAI selection to OpenRouter. Users with a configured OpenAI provider (and no OpenRouter key) now stay on api.openai.com instead of hitting HTTP 401 "Missing Authentication header."

Root cause: hermes_cli/providers.py carries a legacy alias "openai" → "openrouter". The picker emitted a standalone slug="openai" row (gated on OPENAI_API_KEY); selecting it ran resolve_provider_full("openai"), which resolved that built-in alias to OpenRouter before checking the user's own providers.openai config.

Changes

  • model_switch.list_authenticated_providers: skip vendor names that are aliases to an aggregator (isolates exactly openai→openrouter; copilot/kimi/etc. are real providers and unaffected). Kills the phantom picker row.
  • providers.resolve_provider_full: user-config providers.<name> now resolves before the built-in alias table, so providers.openai (api.openai.com) beats the legacy alias.
  • model_switch PATH A: user-config providers resolve credentials via their own endpoint instead of the name-based runtime resolver that doesn't know user-config slugs; plus a fail-loud guard for explicit unauthed-aggregator hops.

Validation

Reporter config (provider=openai-api, no OpenRouter key) Before After
picker: OpenAI + gpt-4o-mini target=openrouter base=openrouter.ai → 401 target=openai base=api.openai.com ✓
explicit --provider openai-api api.openai.com ✓ api.openai.com ✓ (unchanged)

Targeted suites green (model_switch / providers / inventory / runtime / auth — 384 + 224 + 295 passing). Added 3 regression tests; converted 1 test that codified the phantom-row behavior.

Scope

Independent of #35056 (which doesn't touch the picker) and #24234 (separate encrypted-content 400). Does not change the OPENAI_API_KEY-implies-openrouter overlay (issue #6799) — that's a wider resolution-semantics change #35056 rewrites; the reported symptom is fixed without it.

Related issues: #14057 (duplicate OpenAI/openai picker rows), #19858 (model switcher hops to OpenRouter).

Infographic

kanban-workspace-inheritance

Infographic

retro-pop-grid

Infographic

kanban-notifier-gate

Non-dispatch gateways no longer open per-board kanban DBs for notifier
polling. Mirrors the existing dispatcher gate (config
kanban.dispatch_in_gateway, default True; env override
HERMES_KANBAN_DISPATCH_IN_GATEWAY) so multi-gateway setups collapse to a
single process holding kanban.db file descriptors.

Salvaged from PR #31964 by @steveonjava; tests and docs trimmed during
salvage.
@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

🔎 Lint report: hermes/hermes-ae1aa4f2 vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 9619 on HEAD, 9619 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 4984 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants