Skip to content

feat(openrouter): trace GA and beta Responses APIs - #893

Merged
Abhijeet Prasad (AbhiPrasad) merged 2 commits into
mainfrom
abhi/openrouter-response-trace-915e4733
Oct 8, 2026
Merged

Abhijeet Prasad (AbhiPrasad) merged 2 commits into
mainfrom
abhi/openrouter-response-trace-915e4733

Conversation

@AbhiPrasad

@AbhiPrasad Abhijeet Prasad (AbhiPrasad) commented Oct 8, 2026 •

Copy link
Copy Markdown
Member
  • Trace GA client.responses.send and send_async through wrap_openrouter().
  • Auto-instrument the separate deprecated BetaResponses class when the module is available, while retaining OpenRouter 0.6.0 support.
  • Add cassette-backed GA Responses coverage and a subprocess auto-instrument check for beta Responses. No mocks or fakes were added.

Closes #860

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-08T17:00:31.327110Z 24bdbb9 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5bd2bfb84d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "Codex (@codex) review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".


class ResponsesSendPatcher(FunctionWrapperPatcher):
name = "openrouter.beta.responses.send"
name = "openrouter.responses.send"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep legacy Responses spans labeled as beta

With the supported OpenRouter 0.6.0 release, client.beta.responses is backed by openrouter.responses.Responses, while openrouter.beta_responses is unavailable. Consequently, package-level OpenRouterIntegration.setup() and auto_instrument() select this renamed patcher and now emit openrouter.responses.send for the beta API; only manual wrap_openrouter() selects BetaResponsesPatcher, so the new tests miss this entry-point mismatch. Version-gate this patcher or retain a legacy beta wrapper for the old module layout.

AGENTS.md reference: AGENTS.md:L134-L141

Useful? React with 👍 / 👎.

@AbhiPrasad Abhijeet Prasad (AbhiPrasad) changed the title fix(openrouter): trace GA and beta Responses APIs feat(openrouter): trace GA and beta Responses APIs Oct 8, 2026
@AbhiPrasad
Abhijeet Prasad (AbhiPrasad) merged commit b3a8314 into main Oct 8, 2026
83 checks passed
@AbhiPrasad
Abhijeet Prasad (AbhiPrasad) deleted the abhi/openrouter-response-trace-915e4733 branch October 8, 2026 17:21
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.

OpenRouter: GA client.responses is not traced by wrap_openrouter(), and client.beta.responses is not auto-instrumented

2 participants