Files
hermes-agent/tests/agent
emozilla f51520c8ac
Some checks failed
Deploy Site / deploy-vercel (push) Has been cancelled
Deploy Site / deploy-docs (push) Has been cancelled
auto-fix lint issues & formatting / Generate eslint --fix patch (push) Has been cancelled
auto-fix lint issues & formatting / Apply patch (push) Has been cancelled
Skills Index Freshness Check / check-freshness (push) Has been cancelled
Skills Index Freshness Check / check-catalog-cors (push) Has been cancelled
Docs Search Monitor / probe (push) Has been cancelled
Build Skills Index / build-index (push) Has been cancelled
Build Skills Index / trigger-deploy (push) Has been cancelled
fix(model-metadata): never probe Anthropic with an OAuth token as x-api-key
The Anthropic step of get_model_context_length asks /v1/models with
x-api-key, the header of a Console key. It left an OAuth credential out
only when the token started with sk-ant-oat. The Messages client decides
by _is_oauth_token(): a JWT (eyJ...), a cc- token and any sk-ant- prefix
outside the Console key families are OAuth credentials too, and it sends
them to api.anthropic.com as a bearer token. With one of those, every
context-window lookup for an Anthropic model also sent the token to that
host in x-api-key, a header Anthropic does not accept an OAuth token in,
and then took the window from the later lookups, as it does for an
sk-ant-oat token.

The probe now asks _is_oauth_token(), the helper the Messages client,
the model list, the usage lookup and `hermes doctor` already decide by.
Console keys (sk-ant-api, -usr, -svc, -admin) are probed as before and
sk-ant-oat tokens are skipped as before. The rule reads the shape of the
credential on every host the probe reaches, as the sk-ant-oat rule did.
2026-11-23 11:13:05 -05:00
..