test(messages): add messages-openai suite covering Anthropic↔OpenAI translation#5587
Merged
cdoern merged 2 commits intoogx-ai:mainfrom Apr 22, 2026
Merged
Conversation
…ranslation The existing messages suite runs against ollama, which satisfies the native passthrough branch in providers/inline/messages/impl.py and never touches the translation codepath. Add a new messages-openai suite that reuses tests/integration/messages with the gpt setup so requests flow through _anthropic_to_openai and _openai_to_anthropic end-to-end. Register the suite in ci_matrix.json so replay-mode CI covers it, and add a gpt/messages-openai entry to record-integration-tests.yml so future rerecord runs refresh it. Recordings captured against openai/gpt-4o are included so replay mode works without an API key. Signed-off-by: Charlie Doern <cdoern@redhat.com>
franciscojavierarceo
approved these changes
Apr 22, 2026
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.
Summary
messages-openaiintegration test suite that reusestests/integration/messageswith thegptsetup, so requests flow through_anthropic_to_openai/_openai_to_anthropicinproviders/inline/messages/impl.pyinstead of the native passthrough branch that the existingmessages(ollama-reasoning) suite hits.tests/integration/ci_matrix.jsonso replay-mode CI runs it, and adds agpt/messages-openairow to.github/workflows/record-integration-tests.ymlso future rerecord runs refresh it.openai/gpt-4oso replay mode works out-of-the-box (no API key required in CI).This is a precursor to #5577 — the batches tests there need a suite that targets OpenAI, because batches go through
create_message()which only exercises translation when the provider is not in_NATIVE_MESSAGES_MODULES.Test plan
Recorded locally and verified against
openai/gpt-4o:Result: 13/13 tests pass. Recording URLs point at
https://api.openai.com/v1/chat/completions, confirming the translation path is being exercised (not the Anthropic-native/v1/messagesendpoint the ollama suite hits).🤖 Generated with Claude Code