hermes-bsd/tests/agent
bobashopcashier d89e7a3cd4 fix(anthropic): restrict fast mode to Opus 4.6 (Anthropic API contract)
Per https://platform.claude.com/docs/en/build-with-claude/fast-mode:
"Fast mode is currently supported on Opus 4.6 only. Sending speed: fast
with an unsupported model returns an error."

Pre-fix, _is_anthropic_fast_model() returned True for any claude-* model,
so /fast on Opus 4.7 (or Sonnet/Haiku) would persist agent.service_tier=fast
in config.yaml and the adapter would inject extra_body["speed"] = "fast"
on every subsequent request. Opus 4.7 returns:

  HTTP 400: 'claude-opus-4-7' does not support the `speed` parameter.

This wedged sessions across model upgrades (a user who ran /fast on Opus 4.6
and later switched the default model to 4.7 hit a hard 400 on every turn
until they manually edited config.yaml).

Changes:
- _is_anthropic_fast_model: gate on "opus-4-6" / "opus-4.6" only
- anthropic_adapter: add _supports_fast_mode predicate as defensive guard
  so stale request_overrides on an unsupported model are dropped silently
  instead of 400'ing
- Tests: flip the assertions that mirrored the bug (Sonnet/Haiku/Opus 4.7
  asserting fast-mode support) to match the documented API contract
2026-05-04 06:23:52 -07:00
..
transports fix(codex-transport): preserve request override headers for xai responses 2026-05-03 15:25:45 -07:00
__init__.py
test_anthropic_adapter.py fix(anthropic): restrict fast mode to Opus 4.6 (Anthropic API contract) 2026-05-04 06:23:52 -07:00
test_anthropic_keychain.py
test_auxiliary_client.py fix(auxiliary): propagate explicit_api_key to _try_anthropic() 2026-05-03 17:00:55 -07:00
test_auxiliary_client_anthropic_custom.py
test_auxiliary_config_bridge.py
test_auxiliary_main_first.py
test_auxiliary_named_custom_providers.py fix(fallback): let custom_providers shadow built-in aliases 2026-04-30 20:18:44 -07:00
test_auxiliary_transport_autodetect.py
test_bedrock_1m_context.py
test_bedrock_adapter.py fix(test): skip bedrock adapter tests when botocore is not installed 2026-05-04 04:41:55 -07:00
test_bedrock_integration.py
test_codex_cloudflare_headers.py fix(aux): remove hardcoded Codex fallback model, drop Codex from auto chain (#17765) 2026-04-29 23:23:50 -07:00
test_compress_focus.py
test_compressor_image_tokens.py
test_context_compressor.py fix(compressor): _prune_old_tool_results boundary direction 2026-05-04 05:05:18 -07:00
test_context_engine.py
test_context_references.py
test_copilot_acp_client.py fix(ci): recover 38 failing tests on main (#17642) 2026-04-29 20:05:32 -07:00
test_credential_pool.py test(credential_pool): regression coverage for .env vs os.environ precedence 2026-05-02 02:00:32 -07:00
test_credential_pool_routing.py
test_crossloop_client_cache.py
test_curator.py fix(skills): keep manual skills out of curator 2026-05-04 02:19:28 -07:00
test_curator_activity.py fix: use skill activity in curator status 2026-04-30 10:31:47 -07:00
test_curator_backup.py fix(curator): authoritative absorbed_into on delete + restore cron skill links on rollback (#18671) (#18731) 2026-05-02 01:29:57 -07:00
test_curator_classification.py fix(curator): prevent false-positive consolidation from substring matching 2026-05-04 01:21:23 -07:00
test_curator_reports.py fix(curator): rewrite cron job skill refs after consolidation (#18253) 2026-04-30 23:04:50 -07:00
test_deepseek_anthropic_thinking.py test(anthropic): regression guard for DeepSeek /anthropic thinking replay 2026-04-29 08:10:29 -07:00
test_direct_provider_url_detection.py
test_display.py
test_display_emoji.py
test_error_classifier.py fix(error_classifier): avoid large-context false overflow heuristics 2026-05-04 05:04:56 -07:00
test_external_skills.py
test_gemini_cloudcode.py
test_gemini_free_tier_gate.py
test_gemini_native_adapter.py
test_gemini_schema.py
test_image_gen_registry.py
test_image_routing.py
test_insights.py
test_kimi_coding_anthropic_thinking.py fix(anthropic): broaden Kimi thinking-suppression to custom endpoints (#17455) 2026-04-29 06:35:42 -07:00
test_local_stream_timeout.py
test_memory_provider.py
test_memory_session_switch.py fix(hindsight): route flush-on-switch through writer queue, not raw thread 2026-04-29 08:09:03 -07:00
test_memory_user_id.py
test_minimax_auxiliary_url.py
test_minimax_provider.py fix(ci): stabilize main test suite regressions (#17660) 2026-04-29 23:18:55 -07:00
test_model_metadata.py
test_model_metadata_local_ctx.py fix(tui): show correct context length 2026-04-28 12:27:36 -07:00
test_model_metadata_ssl.py
test_models_dev.py
test_moonshot_schema.py fix(moonshot): also strip nullable/enum after anyOf collapse 2026-04-30 23:14:31 -07:00
test_nous_rate_guard.py
test_onboarding.py docs(onboarding): lead OpenClaw residue banner with migrate, warn that cleanup breaks OpenClaw (#17507) 2026-04-29 08:08:36 -07:00
test_openrouter_response_cache.py feat(openrouter): add response caching support (#19132) 2026-05-03 01:54:24 -07:00
test_prompt_builder.py
test_prompt_caching.py
test_proxy_and_url_validation.py
test_rate_limit_tracker.py
test_redact.py
test_shell_hooks.py
test_shell_hooks_consent.py
test_skill_commands.py fix(skills): rescan skill_commands cache when platform scope changes (#18739) 2026-05-02 01:36:53 -07:00
test_skill_commands_reload.py refactor(reload-skills): queue note for next turn, drop cache invalidation + agent tool 2026-04-29 21:07:47 -07:00
test_skill_utils.py test(skill_utils): add regression tests for non-dict metadata in extract_skill_conditions 2026-04-30 20:37:15 -07:00
test_streaming_context_scrubber.py
test_subagent_progress.py
test_subagent_stop_hook.py
test_subdirectory_hints.py
test_title_generator.py
test_tool_guardrails.py fix(agent): make tool loop guardrails warning-first 2026-04-30 20:43:15 -07:00
test_unsupported_parameter_retry.py
test_unsupported_temperature_retry.py
test_usage_pricing.py
test_vision_resolved_args.py fix(vision): preserve explicit provider auth with custom base_url 2026-05-04 05:05:43 -07:00