hermes-agent/agent
kshitijk4poor 5cbbade24c fix(streaming): zero-event guard parity for the anthropic_messages path
The chat_completions path raises EmptyStreamError when a stream yields
no chunks and no finish_reason (#64420). _call_anthropic() had no
equivalent, and the eventless failure surfaces differently by client:

- Real Anthropic SDK: no message_start means no final-message snapshot,
  so get_final_message() raises a bare AssertionError — not in the
  retry loop's transient set, so it burned no retries and surfaced raw.
- OpenAI-compat shims: may fabricate a contentless Message with no
  stop_reason (or return None), flowing out as a 'successful' empty turn.

Track whether any stream event arrived and normalize both shapes to
EmptyStreamError, giving the anthropic path the same transient retry
budget in the shared _call() retry loop. A real completed response
always carries a stop_reason, so the guard cannot fire on legitimate
turns (including eventless mocks with stop_reason='end_turn').

Follow-up to #64420.
2026-07-15 10:58:36 +05:30
..
lsp
…
pet
…
secret_sources
…
transports chore(mcp): drop stale input_schema comment on add_tool call 2026-07-14 21:36:32 -07:00
__init__.py
…
account_usage.py feat(codex): redeem banked usage-limit resets via /usage reset (#64280) 2026-07-14 03:23:19 -07:00
agent_init.py fix(agent): validate credential pool after provider auto-detection (#63425) 2026-07-14 16:51:35 +05:30
agent_runtime_helpers.py refactor(reasoning): unify per-model reasoning resolution behind a single chokepoint 2026-07-14 11:46:40 -07:00
anthropic_adapter.py
…
async_utils.py
…
auxiliary_client.py refactor(moa): drop auxiliary-task reasoning knob in favor of per-slot preset config 2026-07-14 21:08:22 -07:00
azure_identity_adapter.py
…
background_review.py fix(background_review): gate reasoning_config inheritance on not-routed + dedupe recorder stubs 2026-07-14 17:19:46 +05:30
bedrock_adapter.py
…
billing_view.py
…
bounded_response.py
…
browser_provider.py
…
browser_registry.py
…
chat_completion_helpers.py fix(streaming): zero-event guard parity for the anthropic_messages path 2026-07-15 10:58:36 +05:30
codex_responses_adapter.py
…
codex_runtime.py fix(context): persist fallback compaction breaker 2026-07-14 02:19:40 +05:30
coding_context.py
…
context_breakdown.py
…
context_compressor.py fix(context): persist fallback compaction breaker 2026-07-14 02:19:40 +05:30
context_engine.py
…
context_references.py
…
conversation_compression.py fix(context): persist fallback compaction breaker 2026-07-14 02:19:40 +05:30
conversation_loop.py Handle null tool call arguments 2026-07-14 21:46:41 -07:00
copilot_acp_client.py fix(file-safety): distinguish safe-root write denial from credential blocks 2026-07-14 17:09:40 +05:30
credential_persistence.py
…
credential_pool.py fix(auth): centralize pool auth normalization 2026-07-13 23:20:48 +05:30
credential_sources.py
…
credits_tracker.py
…
curator.py
…
curator_backup.py
…
display.py
…
error_classifier.py
…
errors.py fix(streaming): retry zero-chunk streams 2026-07-15 10:58:36 +05:30
file_safety.py fix(file-safety): distinguish safe-root write denial from credential blocks 2026-07-14 17:09:40 +05:30
gemini_native_adapter.py feat(gemini): improve request context for support and compatibility 2026-07-13 22:26:19 -07:00
gemini_schema.py
…
i18n.py
…
image_gen_provider.py
…
image_gen_registry.py
…
image_routing.py
…
insights.py
…
iteration_budget.py
…
jiter_preload.py
…
kanban_stop.py follow-up: integrate agent nudge + dispatcher retry docs and tests 2026-07-14 16:47:33 +05:30
learn_prompt.py
…
learning_graph.py
…
learning_graph_render.py
…
learning_mutations.py
…
lmstudio_reasoning.py
…
manual_compression_feedback.py
…
markdown_tables.py
…
memory_manager.py
…
memory_provider.py
…
message_content.py
…
message_sanitization.py
…
moa_loop.py feat(moa): support per-slot reasoning effort 2026-07-14 21:08:22 -07:00
moa_trace.py
…
model_metadata.py refactor(agent): drop the solar-pro rolling alias, default to solar-pro3 2026-07-15 00:09:24 +05:30
models_dev.py
…
moonshot_schema.py
…
nous_rate_guard.py
…
onboarding.py
…
oneshot.py
…
plugin_llm.py
…
portal_tags.py
…
process_bootstrap.py
…
prompt_builder.py fix(agent): gate Telegram rich-Markdown hint on rich_messages config 2026-07-14 06:48:53 -07:00
prompt_caching.py
…
rate_limit_tracker.py
…
reactions.py
…
reasoning_timeouts.py
…
redact.py
…
replay_cleanup.py
…
retry_utils.py
…
runtime_cwd.py
…
secret_scope.py
…
shell_hooks.py
…
skill_bundles.py
…
skill_commands.py fix(skills): guard skill slash commands against core-command and slug collisions 2026-07-14 16:41:21 +05:30
skill_preprocessing.py
…
skill_utils.py
…
ssl_guard.py
…
ssl_verify.py
…
stream_diag.py
…
subdirectory_hints.py
…
system_prompt.py fix(agent): gate Telegram rich-Markdown hint on rich_messages config 2026-07-14 06:48:53 -07:00
think_scrubber.py
…
thinking_timeout_guidance.py
…
thread_scoped_output.py
…
title_generator.py
…
tool_dispatch_helpers.py fix: adapt null-args salvage to segment planner, align tests with current contracts 2026-07-14 21:46:41 -07:00
tool_executor.py perf(agent): segment mixed tool batches to recover lost concurrency (#64460) 2026-07-14 11:53:05 -07:00
tool_guardrails.py
…
tool_result_classification.py
…
trace_upload.py
…
trajectory.py
…
transcription_provider.py
…
transcription_registry.py fix(deepinfra): harden multimodal provider routing 2026-07-14 02:59:39 +05:30
tts_provider.py
…
tts_registry.py feat(providers): Support DeepInfra as an LLM provider 2026-07-14 02:59:39 +05:30
turn_context.py fix(session): preserve clean multimodal persistence override 2026-07-14 03:32:45 +05:30
turn_finalizer.py fix(session): restore clean API-local turn content 2026-07-14 03:32:46 +05:30
turn_retry_state.py
…
usage_pricing.py
…
verification_evidence.py
…
verification_stop.py
…
verify_hooks.py
…
vertex_adapter.py
…
video_gen_provider.py feat(providers): Support DeepInfra as an LLM provider 2026-07-14 02:59:39 +05:30
video_gen_registry.py fix(deepinfra): harden multimodal provider routing 2026-07-14 02:59:39 +05:30
web_search_provider.py
…
web_search_registry.py
…