Commit graph

3 commits

Author SHA1 Message Date
Adil Hafeez
d8e5e48f4a Fix mock handlers to match gateway routing behavior
- OpenAI client → Claude model: gateway routes to /v1/chat/completions
  (not /v1/messages), so use setup_openai_chat_mock
- Responses API: gateway translates all requests to /v1/chat/completions
  on upstream with base_url providers, so use setup_openai_chat_mock
- Remove unused imports (json, pytest, setup_responses_api_mock)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 23:54:57 +00:00
Adil Hafeez
aeef0c33a8 Fix HandlerType import and apply Black formatting
- Import HandlerType from pytest_httpserver.httpserver (not top-level)
- Apply Black formatting to all new test files

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 23:47:12 +00:00
Adil Hafeez
3a6a672c9d Add mock-based E2E tests and gate live tests to main/nightly
Introduce a new mock-based E2E test suite that uses pytest_httpserver to
simulate LLM provider responses, eliminating the need for real API keys
on PR builds. The mock tests cover model alias routing, protocol
transformation (OpenAI↔Anthropic), Responses API passthrough/translation,
streaming, tool calls, thinking mode, and multi-turn state management.

CI changes:
- Add mock-e2e-tests job (zero secrets, runs on every PR)
- Gate all live E2E jobs to main pushes + nightly schedule
- Scope secrets to only the keys each job actually needs
- Add daily cron schedule for full live test coverage

Also relaxes exact-match assertions in live e2e tests to structural
checks (non-null, non-empty) since LLM output is non-deterministic.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 19:33:48 +00:00