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
16 changes: 8 additions & 8 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ session-id routing, request-body switches) are config, not forked code.

## Layout

`src/responses.ts` mirrors Interchange's own OpenAI Chat Completions adapter
section order — quirks schema + resolver → event schemas → streaming parse →
JSON parse → header extractors → factory. Request building lives under
`src/protocol/`, following Interchange's `inference-discovery-openai` layout.
`src/index.ts` is re-exports plus registry-shaped values:
`src/responses.ts` holds the quirks schema + resolver, the header
extractors, and the factory that wires `src/protocol/` together, following
Interchange's `inference-discovery-openai` layout. `src/index.ts` is
re-exports plus registry-shaped values:

- `src/responses.ts` — `ResponsesQuirks` and its resolver, `ResponsesHooks`,
event schemas, SSE streaming parse, non-streaming JSON parse, block
indexing, terminal-event detection, the rate-limit header extractors, and
`createOpenAIResponsesAdapter` / `responsesAdapterFactory`.
the rate-limit header extractors, and `createOpenAIResponsesAdapter` /
`responsesAdapterFactory`.
- `src/protocol/body.ts` — `buildResponsesRequest` with its content, tool,
system-prompt, and reasoning helpers, plus reasoning `encrypted_content`
signature tag/replay.
- `src/protocol/iterator.ts` — event schemas, SSE streaming parse,
non-streaming JSON parse, block indexing, and terminal-event detection.
- `src/index.ts` — re-exports of the above plus the two provider-id
constants and `responsesAdapterFactories`.
- `*.test.ts` next to the source they cover.
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { AdapterFactory } from "@intx/inference";
import { isResponsesStreamTerminal } from "./protocol/iterator.js";
import {
createOpenAIResponsesAdapter,
isResponsesStreamTerminal,
responsesAdapterFactory,
ResponsesQuirks,
} from "./responses.js";
Expand Down
Loading
Loading