fix(openai): support Codex agent input items - #2455
Open
0YHR0 wants to merge 3 commits into
Open
Conversation
Signed-off-by: 0YHR0 <97868579@qq.com>
📄 Knowledge reviewDosu skipped reviewing this PR because your organization has used its |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2455 +/- ##
==========================================
- Coverage 85.05% 85.04% -0.01%
==========================================
Files 159 159
Lines 22645 22655 +10
==========================================
+ Hits 19261 19268 +7
- Misses 2217 2219 +2
- Partials 1167 1168 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
nacx
enabled auto-merge (squash)
July 30, 2026 11:05
…gent-input-items # Conflicts: # internal/apischema/openai/openai.go # internal/apischema/openai/openai_test.go
auto-merge was automatically disabled
August 2, 2026 07:56
Head branch was pushed to by a user without write access
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Allow Responses API requests containing Codex-emitted agent_message and agent_reasoning input items to pass through OpenAI-compatible backends.
Root cause
The Responses input-item union rejected these types before the request reached the upstream provider.
Fix
Preserve the raw JSON for both types, so their evolving Codex-specific fields are forwarded unchanged without requiring an incomplete schema model.
Related Issue
Fixes #2442
Testing