mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-06 08:18:58 +00:00
Integrate twin-openai (fake OpenAI server) into the workspace and wire it into the e2e_test macro so OpenAI tests can run without real API credentials. The twin server starts in-process via OnceLock on first use and provides per-test isolation through bearer-token namespacing. Changes: - Add Twin as default TestMode, replacing Off (gating now via #[ignore]) - Extend #[e2e_test] macro with `twin` requirement for twin-only, live-only, and dual-mode (twin + live) test gating - Add e2e_openai!() macro returning (base_url, api_key) - Convert openai_complete and openai_gpt_5_3_codex_complete to dual-mode - Add new openai_server_error twin-only test with scripted 500 error - Standardize axum 0.8 as workspace dependency across all crates - Relax twin-openai ResponsesRequest to accept unknown fields via flatten Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1.3 KiB
1.3 KiB
Compatibility Matrix
Supported endpoints:
GET /healthzPOST /v1/responsesPOST /v1/chat/completionsPOST /__admin/scenariosPOST /__admin/resetGET /__admin/requests
State isolation:
/v1/*request state is scoped by bearer token- admin routes may include the same bearer token to target that namespace
- admin routes without auth operate on the global namespace
Supported /v1/responses fields:
- bearer auth
streammetadatastopprevious_response_idreasoningtext.format.type = text | json_object | json_schema- image inputs in
input[*].content[*].type = input_image - scripted tool calls and continuation input items
Supported /v1/chat/completions fields:
- bearer auth
streamtoolstool_choiceresponse_format.type = text | json_object | json_schemastop- reasoning-bearing assistant content
Structured output subset:
- object roots
- primitive property types:
string,integer,number,boolean - nested object properties
Unsupported schema constructs fail explicitly:
- arrays
anyOfoneOf
Failure scripting:
- application errors with explicit status and OpenAI-shaped body
- optional
Retry-After - delay before headers
- hang before first byte
- inter-event stream delay
- close stream after N chunks
- malformed/truncated SSE ending