Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ re-exports plus the provider ids and factory record:
- `src/index.ts` — re-exports of the above plus the two provider-id
constants (`OPENAI_COMPATIBLE_RESPONSES_PROVIDER` is deprecated, removed
in 0.3.0) and `responsesAdapterFactories`.
- `*.test.ts` next to the source they cover.
- `src/*.test.ts` — unit tests for the wire codec and parser, excluded from
the build.
- `e2e/` — `runInference` through `@intx/inference-testing`, plus the
opt-in live suite (`OPENAI_RESPONSES_LIVE_URL`).

## Rules

Expand Down
18 changes: 18 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,21 @@ bun run check

`bun run check` is typecheck + lint + format:check + test. `bun run format`
rewrites the tree.

Unit tests sit next to the code in `src/`; end-to-end tests live in `e2e/`.
`e2e/live.test.ts` calls a real Responses API and runs only when
`OPENAI_RESPONSES_LIVE_URL` is set:

```sh
OPENAI_RESPONSES_LIVE_URL=http://localhost:11434/v1 \
OPENAI_RESPONSES_LIVE_MODEL=gpt-oss:20b bun run test:e2e
```

`OPENAI_RESPONSES_LIVE_KEY` is optional.

## Commit messages

Commit subjects and PR titles follow [Conventional Commits](https://www.conventionalcommits.org): `feat`, `fix`, `refactor`, `test`, `docs`, `build`, `ci`, `perf`, and `chore(release): x.y.z` for releases.
Add `!` only for public API breaks: removed or renamed exports, changed signatures, newly required params. Peer and dependency range changes are `build(deps):` with no `!`.
Keep subjects imperative, lowercase after the colon, 72 characters or less, and free of ticket IDs.
Every PR links its issue with a `Closes <issue id>` line in the PR body.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/e2e.test.ts → e2e/responses.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
OPENAI_COMPATIBLE_RESPONSES_PROVIDER,
OPENAI_RESPONSES_PROVIDER,
responsesAdapterFactories,
} from "./index";
} from "../src/index";

// Narrows the replayed request body for the reasoning-replay assertion below
// without an `as` cast on data that came off a real `Request`.
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"format": "prettier --write .",
"format:check": "prettier --check .",
"test": "bun test",
"test:e2e": "bun test e2e",
"check": "bun run typecheck && bun run lint && bun run format:check && bun run test"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
"lib": ["ESNext"],
"types": ["bun"]
},
"include": ["src", "tests"]
"include": ["src", "e2e"]
}
Loading