mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-13 23:56:07 +00:00
fix(openai): use gpt 5.5 for codex image responses
This commit is contained in:
@@ -17,6 +17,7 @@ Docs: https://docs.openclaw.ai
|
||||
|
||||
### Fixes
|
||||
|
||||
- OpenAI image generation: use `gpt-5.5` for the Codex OAuth responses transport instead of the retired `gpt-5.4` model, fixing 500s from ChatGPT Codex image generation. Fixes #71513. Thanks @baolongl.
|
||||
- MiniMax music generation: switch the bundled default model from the unsupported `music-2.5+` id to the current `music-2.6` API model. Fixes #64870 and addresses the music default from #62315. Thanks @noahclanman and @edwardzheng1.
|
||||
- Google media generation: strip a configured trailing `/v1beta` from Google music/video provider base URLs before calling the Google GenAI SDK, preventing doubled `/v1beta/v1beta` paths. Fixes #63240. (#63258) Thanks @Hybirdss.
|
||||
- Discord: restore direct-message voice-note preflight transcription and classify URL-only Ogg/Opus voice attachments as audio while skipping partial attachments without usable URLs. Fixes #61314 and #64803.
|
||||
|
||||
@@ -643,7 +643,7 @@ describe("openai image generation provider", () => {
|
||||
url: "https://chatgpt.com/backend-api/codex/responses",
|
||||
timeoutMs: 180_000,
|
||||
body: expect.objectContaining({
|
||||
model: "gpt-5.4",
|
||||
model: "gpt-5.5",
|
||||
instructions: "You are an image generation assistant.",
|
||||
stream: true,
|
||||
store: false,
|
||||
@@ -664,7 +664,7 @@ describe("openai image generation provider", () => {
|
||||
);
|
||||
expect(postMultipartRequestMock).not.toHaveBeenCalled();
|
||||
expect(logInfoMock).toHaveBeenCalledWith(
|
||||
"image auth selected: provider=openai-codex mode=oauth transport=codex-responses requestedModel=gpt-image-2 responsesModel=gpt-5.4 timeoutMs=180000",
|
||||
"image auth selected: provider=openai-codex mode=oauth transport=codex-responses requestedModel=gpt-image-2 responsesModel=gpt-5.5 timeoutMs=180000",
|
||||
);
|
||||
expect(result.images).toEqual([
|
||||
{
|
||||
@@ -724,7 +724,7 @@ describe("openai image generation provider", () => {
|
||||
}),
|
||||
);
|
||||
expect(logInfoMock).toHaveBeenCalledWith(
|
||||
"image auth selected: provider=openai-codex mode=oauth transport=codex-responses requestedModel=gpt-image-2 responsesModel=gpt-5.4 timeoutMs=180000",
|
||||
"image auth selected: provider=openai-codex mode=oauth transport=codex-responses requestedModel=gpt-image-2 responsesModel=gpt-5.5 timeoutMs=180000",
|
||||
);
|
||||
expect(result.images[0]?.buffer).toEqual(Buffer.from("codex-image"));
|
||||
});
|
||||
@@ -841,7 +841,7 @@ describe("openai image generation provider", () => {
|
||||
});
|
||||
|
||||
expect(logInfoMock).toHaveBeenCalledWith(
|
||||
"image auth selected: provider=openai-codex mode=oauth fakeignored transport=codex-responses requestedModel=gpt-image-2 forged=true next responsesModel=gpt-5.4 timeoutMs=180000",
|
||||
"image auth selected: provider=openai-codex mode=oauth fakeignored transport=codex-responses requestedModel=gpt-image-2 forged=true next responsesModel=gpt-5.5 timeoutMs=180000",
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ import { resolveConfiguredOpenAIBaseUrl } from "./shared.js";
|
||||
|
||||
const DEFAULT_OPENAI_IMAGE_BASE_URL = "https://api.openai.com/v1";
|
||||
const DEFAULT_OPENAI_CODEX_IMAGE_BASE_URL = OPENAI_CODEX_RESPONSES_BASE_URL;
|
||||
const DEFAULT_OPENAI_CODEX_IMAGE_RESPONSES_MODEL = "gpt-5.5";
|
||||
const OPENAI_CODEX_IMAGE_INSTRUCTIONS = "You are an image generation assistant.";
|
||||
const DEFAULT_OPENAI_IMAGE_TIMEOUT_MS = 180_000;
|
||||
const DEFAULT_OUTPUT_MIME = "image/png";
|
||||
@@ -522,7 +523,7 @@ function logCodexImageAuthSelected(params: {
|
||||
params.authMode,
|
||||
)} transport=codex-responses requestedModel=${sanitizeLogValue(
|
||||
model,
|
||||
)} responsesModel=gpt-5.4 timeoutMs=${params.timeoutMs}`,
|
||||
)} responsesModel=${DEFAULT_OPENAI_CODEX_IMAGE_RESPONSES_MODEL} timeoutMs=${params.timeoutMs}`,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -568,7 +569,7 @@ async function generateOpenAICodexImage(params: {
|
||||
url: `${baseUrl}/responses`,
|
||||
headers,
|
||||
body: {
|
||||
model: "gpt-5.4",
|
||||
model: DEFAULT_OPENAI_CODEX_IMAGE_RESPONSES_MODEL,
|
||||
input: [
|
||||
{
|
||||
role: "user",
|
||||
|
||||
Reference in New Issue
Block a user