Skip to content

[codex] Support pretty rendering for Responses API inputs#5

Merged
alexanderkreidich merged 1 commit into
openclaw-stablefrom
codex/gpt-responses-pretty-input
Apr 21, 2026
Merged

[codex] Support pretty rendering for Responses API inputs#5
alexanderkreidich merged 1 commit into
openclaw-stablefrom
codex/gpt-responses-pretty-input

Conversation

@alexanderkreidich

Copy link
Copy Markdown

What changed

This teaches the OpenAI ChatML adapter to recognize and normalize OpenAI Responses API request payloads that use input instead of messages, including requests with tool definitions.

It also excludes the raw input field from additionalInput so the conversation is not duplicated in the pretty view, and adds coverage for Responses-style requests plus an embedding payload guard.

Why

GPT subscription traffic is being logged in Responses API request shape, while the existing pretty renderer only recognized chat-completions style messages and Responses output payloads. As a result, request-side pretty rendering showed nothing useful for those rows.

Impact

Responses API requests with input should render as ChatML in the Langfuse pretty view instead of falling back to opaque JSON. Embedding-style payloads are intentionally not reclassified as chat.

Root cause

The adapter detected messages and output, but not request payloads shaped like { input: ... }, which is what the GPT subscription path emits.

Validation

  • Added adapter tests for Responses API request detection and normalization
  • Added integration coverage to ensure additionalInput excludes input
  • Ran git diff --check

Notes

I did not run the full TypeScript/Vitest suite in this environment because the required package manager and dependencies were not available locally.

@alexanderkreidich alexanderkreidich marked this pull request as ready for review April 20, 2026 14:08
@github-actions

Copy link
Copy Markdown

@claude review

@alexanderkreidich

Copy link
Copy Markdown
Author

@codex review

@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: 48993f613c

ℹ️ 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 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 address that feedback".

Comment thread packages/shared/src/utils/chatml/adapters/openai.ts
@alexanderkreidich alexanderkreidich force-pushed the codex/gpt-responses-pretty-input branch from 48993f6 to d12ca9f Compare April 21, 2026 11:16
@alexanderkreidich alexanderkreidich merged commit e20142b into openclaw-stable Apr 21, 2026
1 of 2 checks passed
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.

1 participant