Repository navigation
fix(codex): preserve and normalize additional_tools IDs - #8754
Merged
Wei-Shaw merged 2 commits intoNov 16, 2026
Merged
Conversation
Contributor
Author
|
已补上这次复测指出的 UUID 连字符差异,更新到 8dcdfff22。此前只保留声明 ID 确实漏了这一种真实输入形状。 现在对格式完整的 本地 Go 1.27.3 验证:完整 unit 26,921 通过、41 跳过;Docker PostgreSQL/Redis integration 16,185 通过、16 跳过;lint 0 问题。新增回归覆盖带/不带连字符、无效 ID、引用顺序、输入不变性,以及 8 条实际转发路径的出站 ID 和原生 这些是本地转换和模拟上游响应验证;本次未执行真实 OAuth/model 请求或 Codex 端到端测试。请用这个 head 复测原来的真实请求,确认原生 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


OAuth stateless-input cleanup drops
input[].additional_tools.id. Losing that declaration identity can make native tool discovery return an ordinaryfunction_call, which Codex rejects. The reporter's same-request comparison also shows that preserving a hyphenated UUID alone is insufficient in their OAuth scenario.Preserve declaration IDs and compact only the strict
at_<8-4-4-4-12 hex UUID>shape, for exampleat_00112233-4455-4677-8899-aabbccddeeff→at_00112233445546778899aabbccddeeff. Update matchingitem_referenceIDs to declarations present in the same request, including references preceding declarations. Compact and opaque declaration IDs are retained; malformed, missing and non-string values are left for upstream validation.Apply the same bounded conversion at the shared OAuth compatibility entry so ordinary and passthrough forwarding agree. The raw JSON path patches only relevant IDs, preserving unrelated large integers and escaped text; API Key compatibility requests keep their original IDs in this pass. Existing message/reasoning history cleanup remains covered.
Fixes #8752.
Validation (Go 1.27.3, macOS arm64):
fd648775810e, UUID filter/reference cases, the shared OAuth entry, and all eight ordinary/passthrough × Responses Lite on/off × streaming/buffered forwarding paths fail the new normalization expectations; API Key and malformed/opaque-ID controls pass.go test -tags=unit ./... -count=1: 26,921 passed, 41 skipped.go test -p=1 -tags=integration ./... -count=1: 16,185 passed, 16 skipped, using the repository's Docker PostgreSQL/Redis harness.golangci-lintv2.14.0: 0 issues.The existing
backend-securityfailure on the previous head isGO-2026-6859innet/http@go1.27.3; the separate Go 1.27.4 upgrade is #8670. Existing heap-growth and WS TTFT timing assertions failed in earlier local validation. Both assertions are unchanged, and the final full suites above passed.AI-assisted implementation and local validation. The tests inspect outgoing request IDs and forward synthetic native
tool_search_callresponses. Live provider success comes from the reporter's comparison; I have not run a live OAuth/model request or Codex end-to-end test of this updated head.