hermes - ✅(Solved) Fix Anthropic adapter fast mode predicate incorrectly matches non-4.6 models [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#20360Fetched 2026-05-06 06:37:09
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×4commented ×1cross-referenced ×1

Fix Action

Fixed

PR fix notes

PR #20490: fix(anthropic): preserve betas when fast mode is unsupported

Description (problem / solution / changelog)

Summary\n- tighten Anthropic fast-mode support detection to Opus 4.6 model IDs only\n- keep common Anthropic beta headers on native fast_mode requests even when speed=fast is omitted for unsupported models\n- add predicate coverage for dotted/cased Opus 4.6 names and non-4.6 lookalikes\n\nFixes #20360.\n\n## Verification\n- scripts/run_tests.sh tests/agent/test_anthropic_adapter.py::TestBuildAnthropicKwargs::test_supports_fast_mode_predicate tests/agent/test_anthropic_adapter.py::TestBuildAnthropicKwargs::test_fast_mode_omitted_for_unsupported_model tests/agent/test_anthropic_adapter.py::TestBuildAnthropicKwargs::test_fast_mode_still_applied_on_opus_46 tests/agent/test_bedrock_1m_context.py::TestBedrockContext1MBeta::test_build_anthropic_kwargs_includes_1m_for_bedrock_fastmode\n- git diff --check -- agent/anthropic_adapter.py tests/agent/test_anthropic_adapter.py\n\nNote: I also ran scripts/run_tests.sh tests/agent/test_anthropic_adapter.py tests/agent/test_bedrock_1m_context.py. The affected fast-mode/Bedrock coverage passed, but three existing macOS OAuth setup-token tests in test_anthropic_adapter.py failed because the keychain subprocess mock returns a MagicMock stdout; that is outside this fast-mode change.

Changed files

  • agent/anthropic_adapter.py (modified, +17/-14)
  • tests/agent/test_anthropic_adapter.py (modified, +2/-0)
RAW_BUFFERClick to expand / collapse

During Windows native installer verification, the installer packaging scope passed cleanly, but a full single-worker suite run reached an unrelated Anthropic adapter failure.\n\nFailing test:\n\\ntests/agent/test_anthropic_adapter.py::test_supports_fast_mode_predicate\n\\n\nThis appears outside the Windows installer packaging scope. Track separately so the installer PR remains focused.\n\nExpected direction: verify the fast mode support predicate only matches models intended for that path, and does not accidentally accept non-4.6 models.

extent analysis

TL;DR

The issue is likely due to the fast mode support predicate not correctly filtering out non-4.6 models, causing an Anthropic adapter failure.

Guidance

  • Verify that the test_supports_fast_mode_predicate test is correctly implemented and only expects models intended for the fast mode path.
  • Check the logic of the fast mode support predicate to ensure it accurately distinguishes between 4.6 models and other models.
  • Review the test suite to identify any potential interactions or dependencies that could be contributing to the failure.
  • Consider adding additional logging or debugging statements to help isolate the cause of the Anthropic adapter failure.

Notes

The issue appears to be related to a specific test case and adapter failure, but without more information about the code or implementation details, it's difficult to provide a more specific solution.

Recommendation

Apply workaround: Modify the fast mode support predicate to correctly filter out non-4.6 models, and re-run the test suite to verify the fix.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - ✅(Solved) Fix Anthropic adapter fast mode predicate incorrectly matches non-4.6 models [1 pull requests, 1 comments, 2 participants]