mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-17 07:03:25 +00:00
fix codex context window and add a few tests
This commit is contained in:
parent
8a6384a925
commit
f8d731a134
4 changed files with 90 additions and 11 deletions
|
|
@ -231,7 +231,7 @@ describe("openai-codex streaming", () => {
|
|||
await streamResult.result();
|
||||
});
|
||||
|
||||
it("clamps gpt-5.3-codex minimal reasoning effort to low", async () => {
|
||||
it.each(["gpt-5.3-codex", "gpt-5.4"])("clamps %s minimal reasoning effort to low", async (modelId) => {
|
||||
const tempDir = mkdtempSync(join(tmpdir(), "pi-codex-stream-"));
|
||||
process.env.PI_CODING_AGENT_DIR = tempDir;
|
||||
|
||||
|
|
@ -303,8 +303,8 @@ describe("openai-codex streaming", () => {
|
|||
global.fetch = fetchMock as typeof fetch;
|
||||
|
||||
const model: Model<"openai-codex-responses"> = {
|
||||
id: "gpt-5.3-codex",
|
||||
name: "GPT-5.3 Codex",
|
||||
id: modelId,
|
||||
name: modelId,
|
||||
api: "openai-codex-responses",
|
||||
provider: "openai-codex",
|
||||
baseUrl: "https://chatgpt.com/backend-api",
|
||||
|
|
|
|||
|
|
@ -14,6 +14,12 @@ describe("supportsXhigh", () => {
|
|||
expect(supportsXhigh(model!)).toBe(false);
|
||||
});
|
||||
|
||||
it("returns true for GPT-5.4 models", () => {
|
||||
const model = getModel("openai-codex", "gpt-5.4");
|
||||
expect(model).toBeDefined();
|
||||
expect(supportsXhigh(model!)).toBe(true);
|
||||
});
|
||||
|
||||
it("returns false for OpenRouter Opus 4.6 (openai-completions API)", () => {
|
||||
const model = getModel("openrouter", "anthropic/claude-opus-4.6");
|
||||
expect(model).toBeDefined();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue