feat(openrouter): add gpt-5.4-image-2 image model#177
Open
ProfSynapse wants to merge 1 commit into
Open
Conversation
New OpenAI multimodal image-generation model on OpenRouter. Wired into image adapter only (precedent: gpt-5-image, flux-*, dall-e-* also live here, not in the chat ModelSpec registry). - ImageModel union: add 'gpt-5.4-image-2' - OpenRouterImageAdapter: supportedModels, modelMap, pricing table, listModels ModelInfo entry - Token pricing verbatim from OpenRouter API: $8/M input, $15/M output - Per-image rate mirrored from gpt-5-image ($0.08); OpenRouter publishes no per-image field for this model — verify before release Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gpt-5.4-image-2multimodal image-generation model as an OpenRouter option.OpenRouterImageAdapteronly — matches precedent ofgpt-5-image,flux-*,dall-e-*,gemini-*-image-preview(image models live in the image adapter, not the chatModelSpecregistry).$8/Minput,$15/Moutput, 272K context). Per-image rate mirrored fromgpt-5-image($0.08) — OpenRouter publishes no per-image field for this model; flagged for pre-release verification.Files
src/services/llm/types/ImageTypes.ts—ImageModelunion extended with'gpt-5.4-image-2'src/services/llm/adapters/openrouter/OpenRouterImageAdapter.ts— 4 insertion points:supportedModels,modelMap,getImageModelPricing,listModelsModelInfoentryNot in this PR (out of scope)
gemini-2.5-flash-imagein ModelAgentManager, DefaultsTab, etc. — ~6 sites). Users must manually select the new model. Change default in a separate PR if/when desired.OpenRouterModels.ts) entry intentionally NOT added — OpenRouter image models do not appear in that file per established precedent.Test plan
npm run buildclean (verified locally: eslint + tsc + esbuild + connector-content gen all pass)GPT-5.4 Image 2 (via OpenRouter)in image-generation UI and confirmgenerateImagetool routes toopenai/gpt-5.4-image-2withmodalities: ["image", "text"]🤖 Generated with Claude Code