mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-24 16:54:43 +00:00
The _needs_trusted_identity_retry method was hard-coding specific
server-side error strings to detect when a request failed due to
missing X-OpenViking-Account / X-OpenViking-User headers. Each new
server-side error variant required another string added to the client.
Replace the string enumeration with a structural match: the error
message mentions one of the tenant headers AND the HTTP status is 400.
This covers all current error variants:
- "Trusted mode requests must include X-OpenViking-Account and User"
- "ROOT requests to tenant-scoped APIs must include X-OpenViking-Account"
- "Trusted mode requests must include X-OpenViking-Account."
- "Trusted mode requests must include X-OpenViking-User."
The 400 status guard avoids false-positives on 403 errors such as
"USER API keys cannot override X-OpenViking-User", which must not
trigger a retry.
All 176 existing tests pass.
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_byterover_provider.py | ||
| test_config_schema.py | ||
| test_hindsight_config_schema.py | ||
| test_hindsight_provider.py | ||
| test_holographic_auto_extract.py | ||
| test_holographic_retrieval.py | ||
| test_holographic_shutdown_closes_db.py | ||
| test_holographic_store.py | ||
| test_honcho_config_schema.py | ||
| test_mem0_backend.py | ||
| test_mem0_providers.py | ||
| test_mem0_setup.py | ||
| test_mem0_v3.py | ||
| test_memory_lazy_install.py | ||
| test_openviking_provider.py | ||
| test_openviking_shutdown.py | ||
| test_retaindb_provider.py | ||
| test_supermemory_provider.py | ||