Files
hermes-agent/tests
Teknium e7d84348d3 test(auxiliary): guard raw-URL plumbing for Anthropic-compat endpoints
Adds a regression suite for PR #17467 (issues #17705, #17413, #17086,
#10469). Two layers of guards:

1. Primitive-level: `_endpoint_speaks_anthropic_messages` and
   `_maybe_wrap_anthropic` behave correctly on both raw `/anthropic`
   and rewritten `/v1` inputs — so the detector/wrapper pair cannot
   silently drift.
2. Call-site plumbing: `_resolve_api_key_provider()` exercised end-to-end
   with a simulated MiniMax pool entry and a simulated explicit-creds
   entry. Both must forward the RAW `/anthropic` URL to
   `_maybe_wrap_anthropic`. Reverting any of the 4 `raw_base_url`
   plumbing changes in #17467 produces a clear failure:
   `Got: https://api.minimax.chat/v1, expected /anthropic`.

Validated by planting the pre-fix code: 2/2 call-site tests fail with
diagnostic messages; primitive tests correctly remain passing (they
were always true at the helper level).
2026-04-30 10:19:08 -07:00
..