Files
oh-my-pi/packages/ai/test/openai-codex-include.test.ts
T
can1357 f66e5dba9b build(config): refactored build and TypeScript configuration with Bun loaders
- Removed WASM generation script; use Bun `wasm?raw` loader for imports.
- Added bunfig.toml with loaders for `.md`, `.py`, and `.wasm?raw` text imports.
- Added types/assets/index.d.ts for global TypeScript module declarations.
- Unified TypeScript configuration with tsgo-based checking across monorepo.
- Removed build and WASM steps from install and publish pipelines.
2026-01-24 00:03:52 +01:00

25 lines
872 B
TypeScript

import { describe, expect, it } from "bun:test";
import { type RequestBody, transformRequestBody } from "@oh-my-pi/pi-ai/providers/openai-codex/request-transformer";
describe("openai-codex include handling", () => {
it("always includes reasoning.encrypted_content when caller include is custom", async () => {
const body: RequestBody = {
model: "gpt-5.1-codex",
};
const transformed = await transformRequestBody(body, { include: ["foo"] });
expect(transformed.include).toEqual(["foo", "reasoning.encrypted_content"]);
});
it("does not duplicate reasoning.encrypted_content", async () => {
const body: RequestBody = {
model: "gpt-5.1-codex",
};
const transformed = await transformRequestBody(body, {
include: ["foo", "reasoning.encrypted_content"],
});
expect(transformed.include).toEqual(["foo", "reasoning.encrypted_content"]);
});
});