hermes-agent/tests/run_agent
kshitijk4poor 43de1ca8c2 refactor: remove _nr_to_assistant_message shim + fix flush_memories guard
NormalizedResponse and ToolCall now have backward-compat properties
so the agent loop can read them directly without the shim:

  ToolCall: .type, .function (returns self), .call_id, .response_item_id
  NormalizedResponse: .reasoning_content, .reasoning_details,
                      .codex_reasoning_items

This eliminates the 35-line shim and its 4 call sites in run_agent.py.

Also changes flush_memories guard from hasattr(response, 'choices')
to self.api_mode in ('chat_completions', 'bedrock_converse') so it
works with raw boto3 dicts too.

WS1 items 3+4 of Cycle 2 (#14418).
2026-04-23 02:30:05 -07:00
..
__init__.py
…
conftest.py
…
test_413_compression.py
…
test_860_dedup.py
…
test_1630_context_overflow_loop.py
…
test_agent_guardrails.py
…
test_agent_loop.py
…
test_agent_loop_tool_calling.py
…
test_agent_loop_vllm.py
…
test_anthropic_error_handling.py
…
test_anthropic_prompt_cache_policy.py fix(cache): enable prompt caching for Qwen on OpenCode/OpenCode-Go/Alibaba (#13528) 2026-04-21 06:40:58 -07:00
test_anthropic_third_party_oauth_guard.py
…
test_anthropic_truncation_continuation.py refactor: remove _nr_to_assistant_message shim + fix flush_memories guard 2026-04-23 02:30:05 -07:00
test_async_httpx_del_neuter.py
…
test_compression_boundary.py
…
test_compression_feasibility.py
…
test_compression_persistence.py
…
test_compression_trigger_excludes_reasoning.py
…
test_compressor_fallback_update.py
…
test_concurrent_interrupt.py
…
test_context_token_tracking.py
…
test_create_openai_client_kwargs_isolation.py
…
test_create_openai_client_proxy_env.py
…
test_create_openai_client_reuse.py
…
test_dict_tool_call_args.py
…
test_exit_cleanup_interrupt.py
…
test_fallback_model.py
…
test_flush_memories_codex.py
…
test_interactive_interrupt.py
…
test_interrupt_propagation.py
…
test_invalid_context_length_warning.py
…
test_long_context_tier_429.py
…
test_memory_provider_init.py
…
test_openai_client_lifecycle.py
…
test_percentage_clamp.py
…
test_plugin_context_engine_init.py
…
test_primary_runtime_restore.py
…
test_provider_attribution_headers.py
…
test_provider_fallback.py fix(agent): resolve fallback provider key_env secrets 2026-04-22 14:42:48 -07:00
test_provider_parity.py feat: add ResponsesApiTransport + wire all Codex transport paths 2026-04-21 19:48:56 -07:00
test_real_interrupt_subagent.py
…
test_redirect_stdout_issue.py
…
test_repair_tool_call_arguments.py
…
test_run_agent.py fix(display): strip standalone tool-call XML tags from visible text 2026-04-22 18:12:42 -07:00
test_run_agent_codex_responses.py feat: add ResponsesApiTransport + wire all Codex transport paths 2026-04-21 19:48:56 -07:00
test_run_agent_multimodal_prologue.py refactor: unify transport dispatch + collapse normalize shims 2026-04-22 18:34:25 -07:00
test_sequential_chats_live.py
…
test_session_meta_filtering.py
…
test_session_reset_fix.py
…
test_steer.py
…
test_streaming.py fix(streaming): silent retry when stream dies mid tool-call (#14151) 2026-04-22 13:47:33 -07:00
test_strict_api_validation.py
…
test_strip_reasoning_tags_cli.py fix(display): strip standalone tool-call XML tags from visible text 2026-04-22 18:12:42 -07:00
test_switch_model_context.py
…
test_switch_model_fallback_prune.py fix(model-switch): drop stale provider from fallback chain and env after /model 2026-04-21 14:31:47 -05:00
test_token_persistence_non_cli.py
…
test_tool_arg_coercion.py
…
test_unicode_ascii_codec.py
…