feat(node): Add responses.create to orchestrion OpenAI integration#21880
Merged
Conversation
Contributor
size-limit report 📦
|
Adds a diagnostics-channel (orchestrion) path for non-streaming `responses.create`, alongside the existing `chat.completions.create`. Reuses the shared core attribute helpers (responses shape already handled) and generalizes the subscriber to a per-channel operation table. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
b33f3cf to
a65ccd5
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.
Stacked on #21877 (base:
nh/openai-orchestrion) — review/merge that first.Adds a diagnostics-channel (orchestrion) path for non-streaming
responses.create, alongside thechat.completions.createsupport from the parent PR.responses.createmaps to thechatoperation (samegen_ai.chatspan shape as chat completions), matching the proxy'sOPENAI_METHOD_REGISTRY.No new attribute logic:
addResponseAttributesalready handles the Responses shape (status→ finish_reasons,output_text→ response text,output[].type === 'function_call'→ tool calls,input_tokens/output_tokens). Tool-call capture therefore works forresponses.createfor free. The subscriber is generalized from a single hardcoded channel to a{ channel, operation }table.Changes:
orchestrion/channels.ts: addOPENAI_RESPONSES: 'orchestrion:openai:responses'.orchestrion/config.ts: injectResponses.create(resources/responses/responses.js+.mjs).integrations/tracing-channel/openai.ts: subscribe to both channels via the operation table;createChatSpan→createGenAiSpan(data, operation, options).Scope: non-streaming only. Streaming and
embeddings/conversationsremain follow-ups.🤖 Generated with Claude Code