Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions src/services/llm/adapters/openrouter/OpenRouterImageAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export class OpenRouterImageAdapter extends BaseImageAdapter {
'gemini-3-pro-image-preview' as ImageModel,
'gemini-3.1-flash-image-preview' as ImageModel,
'gpt-5-image' as ImageModel,
'gpt-5.4-image-2' as ImageModel,
'flux-2-pro' as ImageModel,
'flux-2-flex' as ImageModel
];
Expand All @@ -94,6 +95,7 @@ export class OpenRouterImageAdapter extends BaseImageAdapter {
'gemini-3-pro-image-preview': 'google/gemini-3-pro-image-preview',
'gemini-3.1-flash-image-preview': 'google/gemini-3.1-flash-image-preview',
'gpt-5-image': 'openai/gpt-5-image',
'gpt-5.4-image-2': 'openai/gpt-5.4-image-2',
// Add other image-capable models as they become available
'flux-2-pro': 'black-forest-labs/flux.2-pro',
'flux-2-flex': 'black-forest-labs/flux.2-flex'
Expand Down Expand Up @@ -369,6 +371,7 @@ export class OpenRouterImageAdapter extends BaseImageAdapter {
'gemini-3-pro-image-preview': 0.08,
'gemini-3.1-flash-image-preview': 0.04,
'gpt-5-image': 0.08,
'gpt-5.4-image-2': 0.08,
'flux-2-pro': 0.05,
'flux-2-flex': 0.03
};
Expand Down Expand Up @@ -466,6 +469,25 @@ export class OpenRouterImageAdapter extends BaseImageAdapter {
lastUpdated: '2026-02-26'
}
},
{
id: 'gpt-5.4-image-2',
name: 'GPT-5.4 Image 2 (via OpenRouter)',
contextWindow: 272000,
maxOutputTokens: 128000,
supportsJSON: false,
supportsImages: true,
supportsFunctions: false,
supportsStreaming: false,
supportsThinking: false,
supportsImageGeneration: true,
pricing: {
inputPerMillion: 8,
outputPerMillion: 15,
imageGeneration: 0.08,
currency: 'USD',
lastUpdated: '2026-04-24'
}
},
{
id: 'flux-2-pro',
name: 'FLUX.2 Pro (via OpenRouter)',
Expand Down
1 change: 1 addition & 0 deletions src/services/llm/types/ImageTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ export type ImageModel =
| 'gemini-3-pro-image-preview' // Google Nano Banana Pro (advanced)
| 'gemini-3.1-flash-image-preview' // Google Nano Banana 2 (flash speed, pro quality)
| 'gpt-5-image' // OpenAI GPT-5 Image (OpenRouter only)
| 'gpt-5.4-image-2' // OpenAI GPT-5.4 Image 2 (OpenRouter only)
| 'flux-2-pro' // Black Forest Labs FLUX.2 Pro (OpenRouter only)
| 'flux-2-flex'; // Black Forest Labs FLUX.2 Flex (OpenRouter only)

Expand Down