mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
The openai-codex provider authenticates with a ChatGPT account, and the
Codex backend rejects gpt-5.5 and gpt-5.3-codex-spark for those accounts
("not supported when using Codex with a ChatGPT account"). Remove them
from the catalog so model pickers stop offering models that always fail.
Codex e2e tests that used openai-codex/gpt-5.5 now use gpt-6.1-sol, the
openai-codex default. The context overflow test uses gpt-5.6-sol to keep
its prompt smaller.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
35 lines
1.1 KiB
TypeScript
35 lines
1.1 KiB
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { complete, getModel } from "../src/compat.ts";
|
|
import type { Context } from "../src/types.ts";
|
|
import { resolveApiKey } from "./oauth.ts";
|
|
|
|
const codexToken = await resolveApiKey("openai-codex");
|
|
|
|
describe("openai-codex cache affinity e2e", () => {
|
|
it.skipIf(!codexToken)("handles SSE requests with aligned cache-affinity identifiers", async () => {
|
|
const model = getModel("openai-codex", "gpt-6.1-sol");
|
|
const sessionId = "0195d6e4-4cf9-7f44-a2d8-f8f7f49ee9d3";
|
|
const context: Context = {
|
|
systemPrompt: "You are a helpful assistant. Reply exactly as requested.",
|
|
messages: [
|
|
{
|
|
role: "user",
|
|
content: "Reply with exactly: cache affinity e2e success",
|
|
timestamp: Date.now(),
|
|
},
|
|
],
|
|
};
|
|
|
|
const response = await complete(model, context, {
|
|
apiKey: codexToken,
|
|
sessionId,
|
|
transport: "sse",
|
|
});
|
|
|
|
expect(response.stopReason, response.errorMessage).not.toBe("error");
|
|
expect(response.errorMessage).toBeUndefined();
|
|
expect(response.content.map((block) => (block.type === "text" ? block.text : "")).join("")).toContain(
|
|
"cache affinity e2e success",
|
|
);
|
|
});
|
|
});
|