fix(auth): preserve 'custom' provider instead of collapsing to 'openrouter'#2633
Closed
dusterbloom wants to merge 5 commits into
Closed
fix(auth): preserve 'custom' provider instead of collapsing to 'openrouter'#2633dusterbloom wants to merge 5 commits into
dusterbloom wants to merge 5 commits into
Conversation
Tests for Phase 2 holographic memory layer: 22 pure math tests (encode/bind/unbind/bundle/similarity/serialization/SNR) and 59 integration tests covering HRR vector storage, 3-signal search scoring, probe/related/reason actions, memory bank lifecycle, auto-extraction, and numpy-absent fallbacks.
Adds a memory store plugin with Holographic Reduced Representations (HRR)
for algebraic fact retrieval. Unlike embedding-based approaches, HRR uses
phase vectors (hashlib + numpy) with zero models, zero APIs, zero GPU.
Key capabilities:
- search: keyword matching via FTS5 + Jaccard + HRR 3-signal scoring
- probe: single-entity recall ("what about peppi?")
- related: structural adjacency ("what connects to Rust?")
- reason: multi-entity composition ("what connects peppi AND backend?")
This is a vector-space JOIN — no embedding DB does this.
Also includes: trust scoring, entity resolution, temporal decay,
thread-safe SQLite, auto-extraction hook, memory bank monitoring.
81 tests (22 pure math + 59 integration).
Detects potentially contradictory facts by finding pairs with high entity overlap but low content-vector similarity. Uses HRR phase cosine to measure content divergence — no keyword heuristics. Completes the algebraic action progression: search → probe → related → reason → contradict 84 tests passing.
Test files now try ~/.hermes/plugins/ first (local dev), then fall back to plugins/ in the repo root (CI). Fixes ImportError on fresh runners where ~/.hermes doesn't exist.
…outer' resolve_provider() in auth.py treated 'custom' and 'openrouter' as identical, silently routing all custom provider traffic through OpenRouter. This broke local LLM setups (Ollama, llama.cpp, LM Studio) where users configured provider: custom with a local base_url. Three changes: - auth.py: return "custom" when requested provider is "custom" - runtime_provider.py: _resolve_named_custom_runtime() returns provider: "custom" instead of "openrouter" - runtime_provider.py: _resolve_openrouter_runtime() preserves "custom" in the provider field when that was the request Fixes NousResearch#2562, fixes NousResearch#2281
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
resolve_provider("custom")inauth.pyreturned"openrouter"— silently rerouting all custom/local provider traffic through OpenRouter_resolve_named_custom_runtime()stampedprovider: "openrouter"even for correctly resolved custom endpointsprovider: customandbase_url: http://localhost:*/v1in config.yaml had their settings silently ignoredChanges
hermes_cli/auth.py: Split{"openrouter", "custom"}set into separate checks —"custom"now returns"custom"hermes_cli/runtime_provider.py: Named custom providers returnprovider: "custom"instead of"openrouter"; openrouter resolver preserves"custom"when that was the requested providertests/test_custom_provider_fix.py: 6 new tests covering both bugstests/test_runtime_provider_resolution.py: Updated 1 assertion that encoded the buggy behaviorTest plan
Fixes #2562, fixes #2281