Commit 87c11f6
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
File tree
- .github/workflows
- tests/integration
- messages/recordings
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
| 194 | + | |
| 195 | + | |
194 | 196 | | |
195 | 197 | | |
196 | 198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
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