.agents/skills/response-compliance/SKILL.md
Run the official OpenResponses compliance test suite against the local (or remote) Response API endpoint.
# From the openapi package directory
cd lobehub/packages/openapi
# Run all tests (dev mode, localhost:3010)
APP_URL=http://localhost:3010 bun run test:response-compliance -- \
--auth-header "lobe-auth-dev-backend-api" --no-bearer --api-key 1
# Run specific tests only
APP_URL=http://localhost:3010 bun run test:response-compliance -- \
--auth-header "lobe-auth-dev-backend-api" --no-bearer --api-key 1 \
--filter basic-response,streaming-response
# Verbose mode (shows request/response details)
APP_URL=http://localhost:3010 bun run test:response-compliance -- \
--auth-header "lobe-auth-dev-backend-api" --no-bearer --api-key 1 -v
# JSON output (for CI)
APP_URL=http://localhost:3010 bun run test:response-compliance -- \
--auth-header "lobe-auth-dev-backend-api" --no-bearer --api-key 1 --json
ENABLE_MOCK_DEV_USER=true in .envapi/v1/responses route registered (via src/app/(backend)/api/v1/[[...route]]/route.ts)| Mode | Flags |
|---|---|
| Dev (mock user) | --auth-header "lobe-auth-dev-backend-api" --no-bearer --api-key 1 |
| API Key | --api-key lb-xxxxxxxxxxxxxxxx |
| Custom | --auth-header <name> --api-key <value> |
Available --filter values:
| ID | Description | Related Issue |
|---|---|---|
basic-response | Simple text generation (non-streaming) | LOBE-5858 |
streaming-response | SSE streaming lifecycle + events | LOBE-5859 |
system-prompt | System role message handling | LOBE-5858 |
tool-calling | Function tool definition + call output | LOBE-5860 |
image-input | Multimodal image URL content | — |
multi-turn | Conversation history via input items | LOBE-5861 |
| Variable | Default | Description |
|---|---|---|
APP_URL | http://localhost:3010 | Server base URL (auto-appends /api/v1) |
API_KEY | — | API key (alternative to --api-key flag) |
The script (lobehub/packages/openapi/scripts/compliance-test.sh) clones the official openresponses/openresponses repo into scripts/openresponses-compliance/ (gitignored) and runs its CLI test runner. First run clones; subsequent runs update from upstream.
-v to see full request/response payloadslobehub/packages/openapi/src/types/responses.type.tslobehub/packages/openapi/src/services/responses.service.tslobehub/packages/openapi/src/controllers/responses.controller.tslobehub/packages/openapi/src/routes/responses.route.tslobehub/packages/openapi/scripts/compliance-test.shsrc/app/(backend)/api/v1/[[...route]]/route.ts