Skip to content

fix(tools): support namespaced custom tool aliases - #1934

Draft
jenfonro wants to merge 1 commit into
lidge-jun:devfrom
jenfonro:fix/namespaced-custom-tool-alias
Draft

fix(tools): support namespaced custom tool aliases#1934
jenfonro wants to merge 1 commit into
lidge-jun:devfrom
jenfonro:fix/namespaced-custom-tool-alias

Conversation

@jenfonro

@jenfonro jenfonro commented Aug 17, 2026

Copy link
Copy Markdown

Summary

  • Preserve custom tools nested inside Responses namespace declarations and lower them through each routed adapter with their flattened wire name.

  • Resolve a bare namespaced tool_choice only when the logical name is unique in the complete request catalog, then restore that exact alias as a custom tool call.

  • Carry tool kind per wire alias across streaming, buffered, image, and web-search bridges so same-named custom and function tools remain distinct while undeclared or ambiguous calls still fail closed.\n- No user-facing configuration or documentation contract changes.\n\n## Verification

  • bun test tests/responses-parser.test.ts tests/responses-tool-conformance.test.ts tests/reasoning-effort.test.ts tests/tool-catalog-nudge.test.ts tests/command-code-provider.test.ts (135 pass, 0 fail before the final collision-parity test was added)

  • bun test tests/responses-tool-conformance.test.ts (24 pass, 0 fail, including the final streaming/non-streaming same-name collision case)

  • bun run typecheck

  • bun run privacy:scan

  • git diff --check

  • bun run test (12750 pass, 15 skip, 3 fail across 823 files). Two failures reproduce unchanged on an untouched upstream/dev checkout: the competing-OFF Codex sync race and the configured-catalog EACCES case when run as root. The CL-03 output-byte-limit case timed out only under the 1108-second loaded full run; bun test tests/lab-live-pinned-timeouts.test.ts passed all 3 cases immediately afterward.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

Review readiness checklist

This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:

  • All CI tests are green on my local testing.

  • I pushed my PR to the latest dev commit.

  • I resolved all correct Codex and CodeRabbit findings.

  • My PR is ready for review.

@github-actions

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 03b5934c-f50a-4d63-b3e0-2727849c86d7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions

Copy link
Copy Markdown
Contributor

⏳ DRAFT

  • review readiness checklist open (0/4 boxes ticked).

What to do

  • Tick all four boxes in the PR description once you're done (currently 0/4).

Review readiness checklist

  • ⬜ All CI tests are green on my local testing.
  • ⬜ I pushed my PR to the latest dev commit.
  • ⬜ I resolved all correct Codex and CodeRabbit findings.
  • ⬜ My PR is ready for review.

0/4 boxes ticked.

This PR stays in draft until every box above is ticked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant