feat(codex): add GPT-5.6 Sol, Terra, and Luna image aliases (#3806)

This commit is contained in:
An Nguyen
2026-09-05 21:00:51 +07:00
parent f388b5e56b
commit ed963931b4
4 changed files with 103 additions and 3 deletions

View File

@@ -316,7 +316,7 @@ describe("handleImageGenerationCore", () => {
expect(responseBody.data[0].b64_json).toBeTruthy();
});
it("generates image with Codex gpt-5.5-image using current Codex version header", async () => {
it.each(["gpt-5.5", "gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna"])("generates image with Codex %s-image using current Codex version header", async (model) => {
global.fetch.mockResolvedValueOnce(
new Response(
[
@@ -335,7 +335,7 @@ describe("handleImageGenerationCore", () => {
size: "1024x1024",
output_format: "png",
},
modelInfo: { provider: "codex", model: "gpt-5.5-image" },
modelInfo: { provider: "codex", model: `${model}-image` },
credentials: {
accessToken: "codex-token",
providerSpecificData: { chatgptAccountId: "account-123" },
@@ -358,7 +358,7 @@ describe("handleImageGenerationCore", () => {
const fetchCall = global.fetch.mock.calls[0];
const requestBody = JSON.parse(fetchCall[1].body);
expect(requestBody.model).toBe("gpt-5.5");
expect(requestBody.model).toBe(model);
expect(requestBody.tools).toEqual([
{ type: "image_generation", output_format: "png", size: "1024x1024" },
]);