Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

💄 style(model-bank): add Gemini 4 Carbon to Google, Vertex AI and OpenRouter (#22783)

YuTengjing739cafda2c97
diff --git a/packages/model-bank/src/aiModels/__tests__/index.test.ts b/packages/model-bank/src/aiModels/__tests__/index.test.ts
index 1f5e2720508..2288b0ca668 100644
--- a/packages/model-bank/src/aiModels/__tests__/index.test.ts
+++ b/packages/model-bank/src/aiModels/__tests__/index.test.ts
@@ -351,6 +351,9 @@ describe('recent direct-provider models', () => {
['openai', 'gpt-6-astra', 'gpt6ReasoningEffort'],
['google', 'gemini-3.8-flash', 'thinkingLevel3'],
['vertexai', 'gemini-3.8-flash', 'thinkingLevel3'],
+ ['google', 'gemini-4-carbon', 'thinkingLevel3'],
+ ['vertexai', 'gemini-4-carbon', 'thinkingLevel3'],
+ ['openrouter', 'google/gemini-4-carbon', 'thinkingLevel3'],
['xai', 'grok-4.6', 'grok4_6ReasoningEffort'],
['qwen', 'qwen3.8-max', 'qwen38ReasoningEffort'],
['qwen', 'qwen3.8-max-0902', 'qwen38ReasoningEffort'],
@@ -382,6 +385,24 @@ describe('Gemini 3.8 introductory pricing', () => {
});
});
+describe('Gemini 4 Carbon introductory pricing', () => {
+ it.each([
+ ['google', 'gemini-4-carbon'],
+ ['vertexai', 'gemini-4-carbon'],
+ ['openrouter', 'google/gemini-4-carbon'],
+ ])('bills %s/%s at $2 input and $10 output', (providerId, id) => {
+ const model = LOBE_DEFAULT_MODEL_LIST.find(
+ (entry) => entry.providerId === providerId && entry.id === id,
+ );
+ expect(model?.pricing?.units).toEqual(
+ expect.arrayContaining([
+ { name: 'textInput', rate: 2, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 10, strategy: 'fixed', unit: 'millionTokens' },
+ ]),
+ );
+ });
+});
+
describe('subscription model catalogs', () => {
it.each([
['chatgpt', 'gpt-6-astra', 'gpt6ReasoningEffort'],
diff --git a/packages/model-bank/src/aiModels/google/index.ts b/packages/model-bank/src/aiModels/google/index.ts
index ce27742c688..fd61d40f12d 100644
--- a/packages/model-bank/src/aiModels/google/index.ts
+++ b/packages/model-bank/src/aiModels/google/index.ts
@@ -154,6 +154,53 @@ const googleChatModels: AIChatModelCard[] = [
},
type: 'chat',
},
+ {
+ abilities: {
+ audio: true,
+ functionCall: true,
+ reasoning: true,
+ search: true,
+ structuredOutput: true,
+ video: true,
+ vision: true,
+ },
+ // Same unified 1M window as Argon: 64K output by default, up to 1M with long decode.
+ // https://ai.google.dev/gemini-api/docs/models/gemini-4-carbon
+ contextWindowTokens: 1_048_576,
+ description:
+ "Gemini 4 Carbon is Google's strongest model, with state-of-the-art cybersecurity and long-horizon capabilities for sustained agentic coding, multimodal knowledge work, and scientific reasoning.",
+ displayName: 'Gemini 4 Carbon',
+ enabled: true,
+ family: 'gemini',
+ generation: 'gemini-4',
+ id: 'gemini-4-carbon',
+ isOfficial: true,
+ maxOutput: 65_536,
+ /** Introductory rates through 2026-11-30; they double afterward ($4 input, $0.20 cached input,
+ * $20 output). Explicit caching is not supported, so there is no cache-write price.
+ * @see https://ai.google.dev/gemini-api/docs/pricing
+ */
+ pricing: {
+ units: [
+ { name: 'textInput_cacheRead', rate: 0.1, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textInput', rate: 2, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'imageInput', rate: 2, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'videoInput', rate: 2, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'audioInput', rate: 2, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 10, strategy: 'fixed', unit: 'millionTokens' },
+ ],
+ },
+ releasedAt: '2026-11-10',
+ // Sampling parameters are ignored by the API.
+ // https://ai.google.dev/gemini-api/docs/latest-model
+ settings: {
+ disabledParams: ['temperature', 'top_p'],
+ extendParams: ['thinkingLevel3', 'urlContext'],
+ searchImpl: 'params',
+ searchProvider: 'google',
+ },
+ type: 'chat',
+ },
{
abilities: {
audio: true,
diff --git a/packages/model-bank/src/aiModels/openrouter/google.ts b/packages/model-bank/src/aiModels/openrouter/google.ts
new file mode 100644
index 00000000000..941725181a1
--- /dev/null
+++ b/packages/model-bank/src/aiModels/openrouter/google.ts
@@ -0,0 +1,129 @@
+import type { AIChatModelCard } from '../../types/aiModel';
+
+/** Google models served through OpenRouter, kept in list order where `index.ts` spreads them. */
+export const openrouterGoogleModels: AIChatModelCard[] = [
+ {
+ abilities: {
+ functionCall: true,
+ reasoning: true,
+ search: true,
+ structuredOutput: true,
+ vision: true,
+ },
+ contextWindowTokens: 1_048_576,
+ description:
+ "Gemini 4 Carbon is Google's strongest model, with state-of-the-art cybersecurity and long-horizon capabilities for sustained agentic coding, multimodal knowledge work, and scientific reasoning.",
+ displayName: 'Gemini 4 Carbon',
+ enabled: true,
+ family: 'gemini',
+ generation: 'gemini-4',
+ id: 'google/gemini-4-carbon',
+ maxOutput: 65_536,
+ // https://openrouter.ai/api/v1/models/google/gemini-4-carbon/endpoints
+ pricing: {
+ units: [
+ { name: 'textInput_cacheRead', rate: 0.1, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textInput', rate: 2, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'imageInput', rate: 2, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'audioInput', rate: 2, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 10, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textInput_cacheWrite', rate: 0.1875, strategy: 'fixed', unit: 'millionTokens' },
+ ],
+ },
+ releasedAt: '2026-11-10',
+ // OpenRouter forwards `thinkingLevel` as `reasoning.effort`. `urlContext` is a Gemini API
+ // tool OpenRouter does not proxy, so it is left out.
+ settings: {
+ disabledParams: ['temperature', 'top_p'],
+ extendParams: ['thinkingLevel3'],
+ searchImpl: 'params',
+ },
+ type: 'chat',
+ },
+ {
+ abilities: {
+ imageOutput: true,
+ reasoning: true,
+ vision: true,
+ },
+ contextWindowTokens: 65_536 + 65_536,
+ description:
+ 'Gemini 3.1 Flash Image Preview, a.k.a. "Nano Banana 2," is Google’s latest state of the art image generation and editing model, delivering Pro-level visual quality at Flash speed. It combines advanced contextual understanding with fast, cost-efficient inference, making complex image generation and iterative edits significantly more accessible.',
+ displayName: 'Nano Banana 2',
+ family: 'gemini',
+ generation: 'gemini-3.1',
+ id: 'google/gemini-3.1-flash-image-preview',
+ knowledgeCutoff: '2025-01',
+ maxOutput: 65_536,
+ pricing: {
+ approximatePricePerImage: 0.067,
+ units: [
+ { name: 'imageOutput', rate: 60, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textInput', rate: 0.25, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 1.5, strategy: 'fixed', unit: 'millionTokens' },
+ ],
+ },
+ releasedAt: '2026-02-26',
+ settings: {
+ extendParams: ['imageAspectRatio2', 'imageResolution2', 'thinkingLevel4'],
+ },
+ type: 'chat',
+ },
+ {
+ abilities: {
+ imageOutput: true,
+ reasoning: true,
+ vision: true,
+ },
+ contextWindowTokens: 131_072 + 32_768,
+ description:
+ 'Nano Banana Pro is Google’s most advanced image-generation and editing model, built on Gemini 3 Pro. It extends the original Nano Banana with significantly improved multimodal reasoning, real-world grounding, and high-fidelity visual synthesis. The model generates context-rich graphics, from infographics and diagrams to cinematic composites, and can incorporate real-time information via Search grounding.',
+ displayName: 'Nano Banana Pro',
+ family: 'gemini',
+ generation: 'gemini-3',
+ id: 'google/gemini-3-pro-image-preview',
+ knowledgeCutoff: '2025-01',
+ maxOutput: 32_768,
+ pricing: {
+ approximatePricePerImage: 0.134,
+ units: [
+ { name: 'imageOutput', rate: 120, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textInput', rate: 2, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 12, strategy: 'fixed', unit: 'millionTokens' },
+ ],
+ },
+ releasedAt: '2025-11-20',
+ settings: {
+ extendParams: ['imageAspectRatio', 'imageResolution'],
+ },
+ type: 'chat',
+ },
+ {
+ abilities: {
+ imageOutput: true,
+ vision: true,
+ },
+ contextWindowTokens: 32_768 + 8192,
+ description:
+ 'Gemini 2.5 Flash Image, a.k.a. "Nano Banana," is now generally available. It is a state of the art image generation model with contextual understanding. It is capable of image generation, edits, and multi-turn conversations.',
+ displayName: 'Nano Banana',
+ family: 'gemini',
+ generation: 'gemini-2.5',
+ id: 'google/gemini-2.5-flash-image',
+ knowledgeCutoff: '2025-06',
+ maxOutput: 8192,
+ pricing: {
+ approximatePricePerImage: 0.039,
+ units: [
+ { name: 'imageOutput', rate: 30, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textInput', rate: 0.3, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 2.5, strategy: 'fixed', unit: 'millionTokens' },
+ ],
+ },
+ releasedAt: '2025-10-07',
+ settings: {
+ extendParams: ['imageAspectRatio', 'imageResolution'],
+ },
+ type: 'chat',
+ },
+];
diff --git a/packages/model-bank/src/aiModels/openrouter/index.ts b/packages/model-bank/src/aiModels/openrouter/index.ts
index e46abda0d5c..ae3107a405a 100644
--- a/packages/model-bank/src/aiModels/openrouter/index.ts
+++ b/packages/model-bank/src/aiModels/openrouter/index.ts
@@ -1,5 +1,6 @@
import type { AIChatModelCard } from '../../types/aiModel';
import { openrouterDecisionModels } from './decision';
+import { openrouterGoogleModels } from './google';
// https://openrouter.ai/docs/api-reference/list-available-models
const openrouterChatModels: AIChatModelCard[] = [
@@ -388,92 +389,7 @@ const openrouterChatModels: AIChatModelCard[] = [
releasedAt: '2025-08-21',
type: 'chat',
},
- {
- abilities: {
- imageOutput: true,
- reasoning: true,
- vision: true,
- },
- contextWindowTokens: 65_536 + 65_536,
- description:
- 'Gemini 3.1 Flash Image Preview, a.k.a. "Nano Banana 2," is Google’s latest state of the art image generation and editing model, delivering Pro-level visual quality at Flash speed. It combines advanced contextual understanding with fast, cost-efficient inference, making complex image generation and iterative edits significantly more accessible.',
- displayName: 'Nano Banana 2',
- family: 'gemini',
- generation: 'gemini-3.1',
- id: 'google/gemini-3.1-flash-image-preview',
- knowledgeCutoff: '2025-01',
- maxOutput: 65_536,
- pricing: {
- approximatePricePerImage: 0.067,
- units: [
- { name: 'imageOutput', rate: 60, strategy: 'fixed', unit: 'millionTokens' },
- { name: 'textInput', rate: 0.25, strategy: 'fixed', unit: 'millionTokens' },
- { name: 'textOutput', rate: 1.5, strategy: 'fixed', unit: 'millionTokens' },
- ],
- },
- releasedAt: '2026-02-26',
- settings: {
- extendParams: ['imageAspectRatio2', 'imageResolution2', 'thinkingLevel4'],
- },
- type: 'chat',
- },
- {
- abilities: {
- imageOutput: true,
- reasoning: true,
- vision: true,
- },
- contextWindowTokens: 131_072 + 32_768,
- description:
- 'Nano Banana Pro is Google’s most advanced image-generation and editing model, built on Gemini 3 Pro. It extends the original Nano Banana with significantly improved multimodal reasoning, real-world grounding, and high-fidelity visual synthesis. The model generates context-rich graphics, from infographics and diagrams to cinematic composites, and can incorporate real-time information via Search grounding.',
- displayName: 'Nano Banana Pro',
- family: 'gemini',
- generation: 'gemini-3',
- id: 'google/gemini-3-pro-image-preview',
- knowledgeCutoff: '2025-01',
- maxOutput: 32_768,
- pricing: {
- approximatePricePerImage: 0.134,
- units: [
- { name: 'imageOutput', rate: 120, strategy: 'fixed', unit: 'millionTokens' },
- { name: 'textInput', rate: 2, strategy: 'fixed', unit: 'millionTokens' },
- { name: 'textOutput', rate: 12, strategy: 'fixed', unit: 'millionTokens' },
- ],
- },
- releasedAt: '2025-11-20',
- settings: {
- extendParams: ['imageAspectRatio', 'imageResolution'],
- },
- type: 'chat',
- },
- {
- abilities: {
- imageOutput: true,
- vision: true,
- },
- contextWindowTokens: 32_768 + 8192,
- description:
- 'Gemini 2.5 Flash Image, a.k.a. "Nano Banana," is now generally available. It is a state of the art image generation model with contextual understanding. It is capable of image generation, edits, and multi-turn conversations.',
- displayName: 'Nano Banana',
- family: 'gemini',
- generation: 'gemini-2.5',
- id: 'google/gemini-2.5-flash-image',
- knowledgeCutoff: '2025-06',
- maxOutput: 8192,
- pricing: {
- approximatePricePerImage: 0.039,
- units: [
- { name: 'imageOutput', rate: 30, strategy: 'fixed', unit: 'millionTokens' },
- { name: 'textInput', rate: 0.3, strategy: 'fixed', unit: 'millionTokens' },
- { name: 'textOutput', rate: 2.5, strategy: 'fixed', unit: 'millionTokens' },
- ],
- },
- releasedAt: '2025-10-07',
- settings: {
- extendParams: ['imageAspectRatio', 'imageResolution'],
- },
- type: 'chat',
- },
+ ...openrouterGoogleModels,
{
abilities: {
reasoning: true,
diff --git a/packages/model-bank/src/aiModels/vertexai.ts b/packages/model-bank/src/aiModels/vertexai.ts
index fa09572728c..5cc40c515d7 100644
--- a/packages/model-bank/src/aiModels/vertexai.ts
+++ b/packages/model-bank/src/aiModels/vertexai.ts
@@ -4,6 +4,49 @@ import { imagenGenParameters } from './google';
// ref: https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models
const vertexaiChatModels: AIChatModelCard[] = [
+ {
+ abilities: {
+ audio: true,
+ functionCall: true,
+ reasoning: true,
+ search: true,
+ structuredOutput: true,
+ video: true,
+ vision: true,
+ },
+ contextWindowTokens: 1_048_576,
+ description:
+ "Gemini 4 Carbon is Google's strongest model, with state-of-the-art cybersecurity and long-horizon capabilities for sustained agentic coding, multimodal knowledge work, and scientific reasoning.",
+ displayName: 'Gemini 4 Carbon',
+ enabled: true,
+ family: 'gemini',
+ generation: 'gemini-4',
+ id: 'gemini-4-carbon',
+ maxOutput: 65_536,
+ /** The Agent Platform pricing page does not list Carbon yet. The global endpoint bills the
+ * Gemini API introductory rates (OpenRouter's `google-vertex/global` endpoint lists $2 / $10 /
+ * $0.10 cached), and the Cloud SKU catalog already carries the $4 / $20 standard rates.
+ * @see https://ai.google.dev/gemini-api/docs/pricing
+ */
+ pricing: {
+ units: [
+ { name: 'textInput_cacheRead', rate: 0.1, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textInput', rate: 2, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'imageInput', rate: 2, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'videoInput', rate: 2, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'audioInput', rate: 2, strategy: 'fixed', unit: 'millionTokens' },
+ { name: 'textOutput', rate: 10, strategy: 'fixed', unit: 'millionTokens' },
+ ],
+ },
+ releasedAt: '2026-11-10',
+ settings: {
+ disabledParams: ['temperature', 'top_p'],
+ extendParams: ['thinkingLevel3', 'urlContext'],
+ searchImpl: 'params',
+ searchProvider: 'google',
+ },
+ type: 'chat',
+ },
{
abilities: {
audio: true,