Repository navigation
feat(server): add typed OpenAI Responses integration - #2465
Merged
Merged
Conversation
3 of 4 tasks
Pouyanpi
force-pushed
the
pouyanpi/openai-responses-typed-1
branch
from
October 20, 2026 08:12
efa77f8 to
4ad4b4c
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Pouyanpi
force-pushed
the
pouyanpi/openai-responses-typed-1
branch
from
October 20, 2026 12:31
4ad4b4c to
f687d68
Compare
Pouyanpi
marked this pull request as ready for review
October 20, 2026 13:58
Contributor
Contributor
[Medium impact] The PR appears safe to merge within its documented experimental boundary. SummaryAdds typed OpenAI Responses support to the experimental proxy:
No new actionable issues were found. The previous dependent-contract issue is addressed by PR #2466, not this PR alone; that assessment depends on #2466. PR #2463 retains the fix. Tests were not run during this review.
|
Pouyanpi
force-pushed
the
pouyanpi/openai-responses-typed-1
branch
from
October 20, 2026 15:41
15ab8a9 to
07dc67c
Compare
Pouyanpi
force-pushed
the
pouyanpi/openai-responses-typed-1
branch
from
October 20, 2026 17:06
07dc67c to
8306d7d
Compare
Pouyanpi
force-pushed
the
pouyanpi/openai-responses-typed-1
branch
3 times, most recently
from
October 21, 2026 09:41
62c78ad to
50d57b9
Compare
Pouyanpi
force-pushed
the
pouyanpi/openai-responses-typed-1
branch
from
October 21, 2026 11:06
50d57b9 to
fff253c
Compare
Pouyanpi
force-pushed
the
pouyanpi/openai-responses-typed-1
branch
from
October 21, 2026 11:56
fff253c to
df2f6c6
Compare
m-misiura
reviewed
Oct 21, 2026
Pouyanpi
force-pushed
the
pouyanpi/openai-responses-typed-1
branch
from
October 21, 2026 15:42
df2f6c6 to
49f8e99
Compare
Base automatically changed from
pouyanpi/phase-d-final-20261013-d5-rails
to
develop
October 22, 2026 05:18
m-misiura
reviewed
Oct 22, 2026
m-misiura
reviewed
Oct 22, 2026
m-misiura
reviewed
Oct 22, 2026
Contributor
|
thanks for all the modifications @Pouyanpi; I see no reasons not to LGTM now :) |
m-misiura
approved these changes
Oct 23, 2026
Collaborator
Author
|
Thanks @m-misiura, super helpful as always! 💪 |
Responses output interleaves metadata with a single assistant message. Declare branch selection and cardinality alongside object policy, and derive the existing buffered and stream selectors without duplicating extraction paths. Export only disjoint required-literal object unions and retain fail-closed checks for overlapping branches and hidden subjects. Signed-off-by: Pouyanpi <13303554+Pouyanpi@users.noreply.github.com>
Bind a single foreground input and one assistant output within heterogeneous provider output. Preserve reviewed metadata while closing unsupported content paths, including citations and token logprobs. Export the actual endpoint as a derived contract and check variant cardinality against runtime validation without introducing compiler dependencies. Signed-off-by: Pouyanpi <13303554+Pouyanpi@users.noreply.github.com>
Classify text deltas, verified snapshots, reviewed reasoning metadata, and provider errors through the existing kernel. Keep native completion, supplied identity and sequence checks, and Responses error framing in request-local hooks. Reject uninspected citations and token logprobs, and export the bound event declarations without serializing hook behavior. Validation: Responses streaming/export tests pass. The experimental suite passes 1599 tests and retains the existing real-core shutdown timeout failure; lifecycle fixes remain separate. Signed-off-by: Pouyanpi <13303554+Pouyanpi@users.noreply.github.com>
…tion Add an explicit multi-operation OpenAI factory while preserving the Chat-only factory and dialect behavior. Reuse the existing application assembly, transport ownership, and real regex Rails configuration for buffered and streaming acceptance checks. Verify native stream error decoding with the installed OpenAI SDK offline, and document the guarded subset and inherited lifecycle limitations. Signed-off-by: Pouyanpi <13303554+Pouyanpi@users.noreply.github.com>
Accept typed operation names for Chat Completions, Responses, or both. Keep the existing fixed two-operation default and reject unknown, duplicate, empty, or malformed selections before constructing an integration. Delegate the Chat-only factory to the shared assembly while preserving its explicit dialect endpoint customization and upstream settings. Document that selection installs guard bindings, not a route allowlist; unselected routes retain passthrough behavior. Validate selected versus unselected input/output behavior with real regex Rails and HTTPX owners in buffered and streaming modes. Validation: 730 affected offline tests and pre-commit passed. Core lifecycle prerequisites remain separate. Signed-off-by: Pouyanpi <13303554+Pouyanpi@users.noreply.github.com>
Accept access_programs, billing, frequency_penalty, presence_penalty, store, and tool_usage as opaque metadata in buffered responses and lifecycle snapshots. Regenerate the inspection contract from the typed declarations. Signed-off-by: Pouyanpi <13303554+Pouyanpi@users.noreply.github.com>
Add authentic buffered and streaming success and provider-error recordings, offline policy and byte-preservation replay, and output-blocking regressions. Document capture provenance and reuse a shared proxy test harness. Conformance inventories and classification mutations remain in the downstream conformance branch. Signed-off-by: Pouyanpi <13303554+Pouyanpi@users.noreply.github.com>
Signed-off-by: Pouyanpi <13303554+Pouyanpi@users.noreply.github.com>
Signed-off-by: Pouyanpi <13303554+Pouyanpi@users.noreply.github.com>
Signed-off-by: Pouyanpi <13303554+Pouyanpi@users.noreply.github.com>
Signed-off-by: Pouyanpi <13303554+Pouyanpi@users.noreply.github.com>
Pouyanpi
force-pushed
the
pouyanpi/openai-responses-typed-1
branch
from
October 23, 2026 10:22
af956dc to
09f6799
Compare
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
Add buffered and streaming OpenAI Responses support to the experimental transparent proxy. Typed Python declarations define the guarded content and reviewed metadata; the existing HTTP transport, streaming kernel, and application assembly execute them.
What changes
store,access_programs,billing,frequency_penalty,presence_penalty, andtool_usage, in buffered responses and streaming lifecycle snapshots.create_openai_integrationselection for Chat Completions, Responses, or both. Keepcreate_openai_chat_integrationChat-only.Supported boundary
The guarded path supports one nonempty string input, foreground execution, and one assistant text output with reviewed reasoning metadata. Input arrays, additional plaintext context/history, tools, plaintext reasoning summaries, citations, token logprobs, and replacement remain unsupported.
Guarded-request restrictions apply even when inspection is disabled. With output inspection enabled, unsupported response shapes and events fail closed. Disabled output inspection retains raw response relay. Forwarded payloads and SSE bytes are not reconstructed from projection models.
Opaque metadata is preserved without inspection. The hooks are not a complete provider schema or lifecycle validator. Recordings establish compatibility with the captured native profile and sanitized replay representation, not original network chunking, socket delivery, every OpenAI-compatible backend, or complete interrupted-cleanup safety.
Checklist
Summary by CodeRabbit
New Features
Bug Fixes
Documentation