Skip to content

fix(tools): forward media args through live adapter#23770

Open
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:codex/23760-send-via-adapter-media
Open

fix(tools): forward media args through live adapter#23770
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:codex/23760-send-via-adapter-media

Conversation

@LeonSGP43

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes the live in-process _send_via_adapter() path so gateway adapters receive media_files and force_document just like the existing standalone sender path. Before this change, attachments could silently disappear whenever the gateway runner and adapter lived in the current process.

Related Issue

Fixes #23760

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

  • Forwarded media_files and force_document through the live adapter.send(...) call in /tools/send_message_tool.py
  • Added a regression test in /tests/tools/test_send_message_tool.py that exercises the live in-process adapter path and asserts both kwargs are preserved

How to Test

  1. Run uv run --frozen pytest -q -o addopts='' tests/tools/test_send_message_tool.py -k TestSendViaAdapterStandaloneFallback
  2. Confirm the new test_live_adapter_forwards_media_kwargs passes
  3. Run uv run --frozen ruff check tools/send_message_tool.py tests/tools/test_send_message_tool.py

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: macOS 15 / local targeted pytest and ruff

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

Screenshots / Logs

  • uv run --frozen pytest -q -o addopts='' tests/tools/test_send_message_tool.py -k TestSendViaAdapterStandaloneFallback -> 6 passed
  • uv run --frozen ruff check tools/send_message_tool.py tests/tools/test_send_message_tool.py -> passed

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/gateway Gateway runner, session dispatch, delivery labels May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: _send_via_adapter ignores media_files parameter — file attachments broken for qqbot

2 participants