# Response API Compliance

Runs OpenResponses compliance tests and diagnoses endpoint schema failures.

- Repository: https://github.com/lobehub/lobehub (83676 stars)
- Category: Testing
- License: see repository
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add lobehub/lobehub --skill response-compliance -g -a claude-code -y`
Codex: `npx skills add lobehub/lobehub --skill response-compliance -g -a codex -y`
Cursor: `npx skills add lobehub/lobehub --skill response-compliance -g -a cursor -y`
Gemini CLI: `npx skills add lobehub/lobehub --skill response-compliance -g -a gemini-cli -y`

## Description

Use for OpenResponses/Response API compliance tests, endpoint schema failures and test runs.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# OpenResponses Compliance Test

Run the official OpenResponses compliance test suite against the local (or remote) Response API endpoint.

## Quick Start

```bash
# From the openapi package directory
cd 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
```

## Prerequisites

- Dev server running with `ENABLE_MOCK_DEV_USER=true` in `.env`
- The `api/v1/responses` route registered (via `src/app/(backend)/api/v1/[[...route]]/route.ts`)

## Auth Modes

| 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>`                            |

## Test IDs

Available `--filter` values:

The rest: https://github.com/lobehub/lobehub/blob/HEAD/.agents/skills/response-compliance/SKILL.md
