Skip to content

Commit 87c11f6

Browse files
authored
test(messages): add messages-openai suite covering Anthropic↔OpenAI translation (#5587)
## 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`: ```bash ./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](https://claude.com/claude-code) Signed-off-by: Charlie Doern <cdoern@redhat.com>
1 parent 4958b3d commit 87c11f6

15 files changed

Lines changed: 1591 additions & 0 deletions

.github/workflows/record-integration-tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,8 @@ jobs:
191191
suite: base
192192
- setup: gpt
193193
suite: responses
194+
- setup: gpt
195+
suite: messages-openai
194196
- setup: azure
195197
suite: responses
196198
- setup: bedrock

tests/integration/ci_matrix.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
{"suite": "vllm-reasoning", "setup": "vllm"},
1414
{"suite": "ollama-reasoning", "setup": "ollama-reasoning"},
1515
{"suite": "messages", "setup": "ollama-reasoning"},
16+
{"suite": "messages-openai", "setup": "gpt"},
1617
{"suite": "interactions", "setup": "gemini"}
1718
],
1819
"stainless": [

tests/integration/messages/recordings/06931312f62d0b59939d9a2d8cf674611bde5725285ce77ffaae46af1dba9065.json

Lines changed: 73 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)