Skip to content

test(messages): add messages-openai suite covering Anthropic↔OpenAI translation#5587

Merged
cdoern merged 2 commits intoogx-ai:mainfrom
cdoern:feat/messages-openai-test-suite
Apr 22, 2026
Merged

test(messages): add messages-openai suite covering Anthropic↔OpenAI translation#5587
cdoern merged 2 commits intoogx-ai:mainfrom
cdoern:feat/messages-openai-test-suite

Conversation

@cdoern
Copy link
Copy Markdown
Collaborator

@cdoern cdoern commented Apr 17, 2026

Summary

  • Adds a new messages-openai integration test suite that reuses tests/integration/messages with the gpt setup, so requests flow through _anthropic_to_openai / _openai_to_anthropic in providers/inline/messages/impl.py instead of the native passthrough branch that the existing messages (ollama-reasoning) suite hits.
  • Registers the suite in tests/integration/ci_matrix.json so replay-mode CI runs it, and adds a gpt / messages-openai row to .github/workflows/record-integration-tests.yml so future rerecord runs refresh it.
  • Includes 12 recordings captured against openai/gpt-4o so 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:

./scripts/integration-tests.sh \
  --stack-config server:ci-tests \
  --suite messages-openai \
  --inference-mode record-if-missing

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/messages endpoint the ollama suite hits).

🤖 Generated with Claude Code

…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>
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Apr 17, 2026
@ogx-ai ogx-ai deleted a comment from nidhishgajjar Apr 22, 2026
@ogx-ai ogx-ai deleted a comment from nidhishgajjar Apr 22, 2026
@cdoern cdoern enabled auto-merge April 22, 2026 13:32
@cdoern cdoern added this pull request to the merge queue Apr 22, 2026
Merged via the queue into ogx-ai:main with commit 87c11f6 Apr 22, 2026
61 checks passed
@cdoern cdoern deleted the feat/messages-openai-test-suite branch April 22, 2026 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants