mirror of
https://github.com/katanemo/plano.git
synced 2026-05-05 13:53:03 +02:00
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>
This commit is contained in:
parent
baeee56f6b
commit
3a6a672c9d
11 changed files with 1758 additions and 43 deletions
42
tests/archgw/config_mock_llm.yaml
Normal file
42
tests/archgw/config_mock_llm.yaml
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
version: v0.3.0
|
||||
|
||||
listeners:
|
||||
- type: model
|
||||
name: model_listener
|
||||
port: 12000
|
||||
|
||||
model_providers:
|
||||
# OpenAI Models - all point to mock server
|
||||
- model: openai/gpt-5-mini-2025-08-07
|
||||
access_key: $OPENAI_API_KEY
|
||||
default: true
|
||||
base_url: http://host.docker.internal:51001
|
||||
|
||||
- model: openai/gpt-4o-mini
|
||||
access_key: $OPENAI_API_KEY
|
||||
base_url: http://host.docker.internal:51001
|
||||
|
||||
- model: openai/o3
|
||||
access_key: $OPENAI_API_KEY
|
||||
base_url: http://host.docker.internal:51001
|
||||
|
||||
- model: openai/gpt-4o
|
||||
access_key: $OPENAI_API_KEY
|
||||
base_url: http://host.docker.internal:51001
|
||||
|
||||
# Anthropic Models - point to mock server
|
||||
- model: anthropic/claude-sonnet-4-20250514
|
||||
access_key: $ANTHROPIC_API_KEY
|
||||
base_url: http://host.docker.internal:51001
|
||||
|
||||
# Model aliases
|
||||
model_aliases:
|
||||
arch.summarize.v1:
|
||||
target: gpt-5-mini-2025-08-07
|
||||
|
||||
arch.v1:
|
||||
target: o3
|
||||
|
||||
# State storage for v1/responses API multi-turn tests
|
||||
state_storage:
|
||||
type: memory
|
||||
Loading…
Add table
Add a link
Reference in a new issue