hermes-agent-features/agent
kshitijk4poor 04e039f687 fix: Kimi /coding thinking block survival + empty reasoning_content + block ordering
Follow-up to the cherry-picked PR #13897 fix. Three issues found:

1. CRITICAL: The thinking block synthesised from reasoning_content was
   immediately stripped by the third-party signature management code
   (Kimi is classified as _is_third_party_anthropic_endpoint). Added a
   Kimi-specific carve-out that preserves unsigned thinking blocks while
   still stripping Anthropic-signed blocks Kimi can't validate.

2. Empty-string reasoning_content was silently dropped because the
   truthiness check ('if reasoning_content and ...') evaluates to False
   for ''. Changed to 'isinstance(reasoning_content, str)' so the
   tier-3 fallback from _copy_reasoning_content_for_api (which injects
   '' for Kimi tool-call messages with no reasoning) actually produces
   a thinking block.

3. The thinking block was appended AFTER tool_use blocks. Anthropic
   protocol requires thinking -> text -> tool_use ordering. Changed to
   blocks.insert(0, ...) to prepend.
2026-04-22 08:21:23 -07:00
..
transports feat: add BedrockTransport + wire all Bedrock transport paths 2026-04-21 20:58:37 -07:00
__init__.py
account_usage.py
anthropic_adapter.py fix: Kimi /coding thinking block survival + empty reasoning_content + block ordering 2026-04-22 08:21:23 -07:00
auxiliary_client.py feat: add Step Plan provider support (salvage #6005) 2026-04-22 02:59:58 -07:00
bedrock_adapter.py
codex_responses_adapter.py
context_compressor.py
context_engine.py
context_references.py
copilot_acp_client.py
credential_pool.py
credential_sources.py
display.py
error_classifier.py fix(error_classifier): don't classify generic 404 as model_not_found (#14013) 2026-04-22 06:11:47 -07:00
file_safety.py
gemini_cloudcode_adapter.py
gemini_native_adapter.py
gemini_schema.py
google_code_assist.py
google_oauth.py
image_gen_provider.py feat(plugins): pluggable image_gen backends + OpenAI provider (#13799) 2026-04-21 21:30:10 -07:00
image_gen_registry.py feat(plugins): pluggable image_gen backends + OpenAI provider (#13799) 2026-04-21 21:30:10 -07:00
insights.py
manual_compression_feedback.py
memory_manager.py
memory_provider.py
model_metadata.py feat: add Step Plan provider support (salvage #6005) 2026-04-22 02:59:58 -07:00
models_dev.py feat: add Step Plan provider support (salvage #6005) 2026-04-22 02:59:58 -07:00
nous_rate_guard.py
prompt_builder.py fix(prompt): tell CLI agents not to emit MEDIA:/path tags (#13766) 2026-04-21 19:36:05 -07:00
prompt_caching.py
rate_limit_tracker.py
redact.py
retry_utils.py
shell_hooks.py
skill_commands.py
skill_utils.py
subdirectory_hints.py
title_generator.py
trajectory.py
usage_pricing.py