hermes-bsd/website/docs/developer-guide
Siddharth Balyan 183d86b3e0
fix(openrouter): route reasoning_effort to verbosity for adaptive Anthropic models (#43436)
* fix(openrouter): route reasoning_effort to verbosity for adaptive Anthropic models

Reasoning-mandatory Anthropic models (Claude 4.6+/fable/mythos-class) over
OpenRouter ignore reasoning.effort and use adaptive thinking. #42991 correctly
stopped Hermes from sending a reasoning field to them (it 400s), but put nothing
in its place — leaving agent.reasoning_effort a silent no-op on the OpenRouter
path: the model always ran at its adaptive default (high) regardless of config.

OpenRouter honors the requested effort on the top-level verbosity field instead
(maps to Anthropic output_config.effort). Route the existing
reasoning_config[effort] there for these models while still never emitting a
reasoning field, preserving the #42991 fix. No new config arg — the value the
user already sets via agent.reasoning_effort now flows to verbosity.

- low/medium/high/xhigh/max pass through verbatim (OpenRouter accepts the
  extended scale for Claude; verified live HTTP 200 + monotonic token spend).
- effort unset/none/disabled omits verbosity so the model keeps its default.
- native Anthropic transport already correct; unchanged.

Fixes #43432

* test(openrouter): cover real effort range (add minimal, frame max as passthrough)

Adversarial review noted the verbosity tests looped over 'max' — a value
parse_reasoning_effort can never produce — while omitting 'minimal', which it
can. Align the routing test with the real config range
(VALID_REASONING_EFFORTS = minimal/low/medium/high/xhigh) and keep a separate
value-agnostic passthrough test that documents why xhigh/max must survive
verbatim (TypedDict, no runtime literal validation; OpenRouter accepts the
extended scale for Claude).

* docs: explain reasoning_effort -> verbosity routing for adaptive Anthropic models

Document that reasoning_effort transparently maps to OpenRouter's verbosity
field for adaptive-thinking Anthropic models (Claude 4.6+/Fable/Mythos), where
reasoning.effort is ignored. Note xhigh is the configurable ceiling (max is wire-
only). Add verbosity as a top-level-kwarg example in the provider-plugin guide.
2026-06-10 15:03:01 +05:30
..
_category_.json
acp-internals.md
adding-platform-adapters.md docs: deep audit — registry drift, stale claims, 2-week PR coverage, dashboard screenshot (#40952) 2026-06-07 01:39:06 -07:00
adding-providers.md
adding-tools.md
agent-loop.md docs: deep audit — registry drift, stale claims, 2-week PR coverage, dashboard screenshot (#40952) 2026-06-07 01:39:06 -07:00
architecture.md
browser-supervisor.md
context-compression-and-caching.md feat(compression): raise compaction trigger to 85% for gpt-5.5 on Codex OAuth (#40957) 2026-06-07 01:40:50 -07:00
context-engine-plugin.md
contributing.md fix(docs): remove remaining stale submodule references missed by #38089 (#38105) 2026-06-03 03:11:19 -07:00
creating-skills.md
cron-internals.md
extending-the-cli.md
gateway-internals.md
image-gen-provider-plugin.md
memory-provider-plugin.md
model-provider-plugin.md fix(openrouter): route reasoning_effort to verbosity for adaptive Anthropic models (#43436) 2026-06-10 15:03:01 +05:30
plugin-llm-access.md
programmatic-integration.md
prompt-assembly.md
provider-runtime.md
session-storage.md
tools-runtime.md
trajectory-format.md
video-gen-provider-plugin.md
web-search-provider-plugin.md docs: deep audit — registry drift, stale claims, 2-week PR coverage, dashboard screenshot (#40952) 2026-06-07 01:39:06 -07:00