Skip to content

fix(agent): classify Responses tool outputs as tool results - #13819

Merged
rmccorm4 merged 4 commits into
ai-dynamo:mainfrom
xianlubird:codex/fix-responses-tool-output-trigger
Aug 27, 2026
Merged

rmccorm4 merged 4 commits into
ai-dynamo:mainfrom
xianlubird:codex/fix-responses-tool-output-trigger

Conversation

@xianlubird

@xianlubird xianlubird commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

Background

#12787 introduced provider-aware input-trigger classification for agent request traces, but intentionally left non-function Responses tool outputs as a follow-up. As a result, computer, shell, apply-patch, tool-search, and custom tool results are currently classified as other instead of tool_result. This loses the causal turn type in request traces and in worker-selection policies that consume agent context.

Summary

  • classify all explicit Responses tool-output item variants as InputTrigger::ToolResult
  • keep tool calls, reasoning items, messages, and other response items unchanged
  • add table-driven coverage for function, tool-search, computer, local-shell, shell, apply-patch, and custom-tool outputs

Validation

  • cargo fmt --all -- --check
  • cargo test -p dynamo-llm --lib input_trigger --no-default-features
  • cargo test -p dynamo-llm --lib request_trace --no-default-features -- --skip tool_relay
  • cargo clippy -p dynamo-llm --lib --no-default-features -- -D warnings
  • git diff --check

Open in Devin Review

Summary by CodeRabbit

  • Bug Fixes

    • Improved response classification so all supported tool-output types are consistently recognized as tool results.
  • Tests

    • Added coverage for each supported tool-output type to ensure consistent handling.

Signed-off-by: xianlubird <xianlubird@gmail.com>
@xianlubird
xianlubird requested a review from a team as a code owner August 26, 2026 08:15
@copy-pr-bot

copy-pr-bot Bot commented Aug 26, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@xianlubird
xianlubird temporarily deployed to external_collaborator August 26, 2026 08:15 — with GitHub Actions Inactive
@xianlubird
xianlubird temporarily deployed to external_collaborator August 26, 2026 08:15 — with GitHub Actions Inactive
@github-actions github-actions Bot added fix external-contribution Pull request is from an external contributor trusted-contributor Org-External user who is trusted to run CI without Org-member approval labels Aug 26, 2026
@dynamo-ops

Copy link
Copy Markdown
Contributor

/ok to test 6b88229

@github-actions github-actions Bot added the frontend `python -m dynamo.frontend` and `dynamo-run in=http|text|grpc` label Aug 26, 2026

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Open in Devin Review

@dynamo-review-agent dynamo-review-agent Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previous review comments have been addressed. Approving.

@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 4b588221-0b25-4af1-9e40-6e5d22f932a8

📥 Commits

Reviewing files that changed from the base of the PR and between 27f09d5 and 6b88229.

📒 Files selected for processing (1)
  • lib/llm/src/protocols/common/input_trigger.rs

Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review.


Walkthrough

OpenAI Responses input-trigger classification now maps all supported tool-output item variants to ToolResult. Tests add a reusable request builder and parameterized coverage for each variant.

Changes

Responses tool-output classification

Layer / File(s) Summary
Tool-output classification and coverage
lib/llm/src/protocols/common/input_trigger.rs
Responses requests classify function, tool-search, computer, local-shell, shell, apply-patch, and custom-tool outputs as ToolResult. Tests construct requests from serialized items and verify each supported variant.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 6b882

This change classifies explicit Responses tool outputs as tool results while preserving existing classifications for other item types; no actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the background, affected tool-output variants, intended behavior, unchanged behavior, tests, and validation commands. It does not include the required Related Issues section o… Add the required Related Issues section and select either a real issue reference, such as Closes #1234, or confirm that no related issue exists. Add a Where should the reviewer start? section that identifies the key file or code area for re…
Docstring Coverage ⚠️ Warning Docstring coverage is 60.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: classifying Responses tool outputs as tool results.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the background, affected tool-output variants, intended behavior, unchanged behavior, tests, and validation commands. It does not include the required Related Issues section or identify where the reviewer should start.

Resolution

Add the required Related Issues section and select either a real issue reference, such as Closes #1234, or confirm that no related issue exists. Add a Where should the reviewer start? section that identifies the key file or code area for review.

  • Fix all pre-merge checks with AI

Comment @coderabbitai help to get the list of available commands.

Signed-off-by: xianlubird <xianlubird@gmail.com>
@dynamo-ops

Copy link
Copy Markdown
Contributor

/ok to test eecd728

@xianlubird

Copy link
Copy Markdown
Contributor Author

The CI failure is unrelated to this PR’s code changes. Both the amd64 and arm64 builds completed successfully, including the image manifest merge. The job failed afterward during SBOM export because the remote BuildKit connection timed out (context deadline exceeded). The backend-status-check failure is only the aggregate result of that failed frontend build job.

Signed-off-by: xianlubird <xianlubird@gmail.com>
@xianlubird
xianlubird temporarily deployed to external_collaborator August 27, 2026 06:01 — with GitHub Actions Inactive
@dynamo-ops

Copy link
Copy Markdown
Contributor

/ok to test cf5df90

@xianlubird

Copy link
Copy Markdown
Contributor Author

The failing KV-router test (queued_selection_returns_refreshed_overlap_snapshot) is unrelated to this PR code change in input_trigger.rs.

@sara4dev
sara4dev temporarily deployed to external_collaborator August 27, 2026 16:13 — with GitHub Actions Inactive
@dynamo-ops

Copy link
Copy Markdown
Contributor

/ok to test b9448c5

@rmccorm4
rmccorm4 enabled auto-merge (squash) August 27, 2026 17:09

This branch was previously deployed

1 inactive deployment
external_collaborator — b9448c56 Deployed Aug 27, 2026 by sara4dev via ok-to-test #12982
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external-contribution Pull request is from an external contributor fix frontend `python -m dynamo.frontend` and `dynamo-run in=http|text|grpc` size/L trusted-contributor Org-External user who is trusted to run CI without Org-member approval

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants