Merge origin/master (v0.5.69) into gitea/new_feature
This commit is contained in:
@@ -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" },
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user