Skip to content
Closed
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
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,8 @@
"form-data": ">=4.0.4",
"bluebird": ">=3.7.2"
}
},
"dependencies": {
"@google/gemini-cli-core": "^0.2.2"
}
}
8 changes: 7 additions & 1 deletion packages/types/src/provider-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
featherlessModels,
fireworksModels,
geminiModels,
geminiCliModels,
groqModels,
ioIntelligenceModels,
mistralModels,
Expand Down Expand Up @@ -470,7 +471,7 @@ export const getApiProtocol = (provider: ProviderName | undefined, modelId?: str
}

export const MODELS_BY_PROVIDER: Record<
Exclude<ProviderName, "fake-ai" | "human-relay" | "gemini-cli" | "lmstudio" | "openai" | "ollama">,
Exclude<ProviderName, "fake-ai" | "human-relay" | "lmstudio" | "openai" | "ollama">,
{ id: ProviderName; label: string; models: string[] }
> = {
anthropic: {
Expand Down Expand Up @@ -515,6 +516,11 @@ export const MODELS_BY_PROVIDER: Record<
label: "Google Gemini",
models: Object.keys(geminiModels),
},
"gemini-cli": {
id: "gemini-cli",
label: "Google Gemini CLI",
models: Object.keys(geminiCliModels),
},
groq: { id: "groq", label: "Groq", models: Object.keys(groqModels) },
"io-intelligence": {
id: "io-intelligence",
Expand Down
54 changes: 54 additions & 0 deletions packages/types/src/providers/gemini-cli.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import type { ModelInfo } from "../model.js"

// Gemini CLI models - using the same models as regular Gemini
// The CLI provides access to the same models through OAuth authentication
export type GeminiCliModelId = keyof typeof geminiCliModels

export const geminiCliDefaultModelId: GeminiCliModelId = "gemini-2.0-flash-001"

// Re-use the same model definitions as the regular Gemini provider
// since Gemini CLI provides access to the same models
export const geminiCliModels = {
"gemini-2.0-flash-001": {
maxTokens: 8192,
contextWindow: 1_048_576,
supportsImages: true,
supportsPromptCache: true,
inputPrice: 0.1,
outputPrice: 0.4,
cacheReadsPrice: 0.025,
cacheWritesPrice: 1.0,
},
"gemini-1.5-flash-002": {
maxTokens: 8192,
contextWindow: 1_048_576,
supportsImages: true,
supportsPromptCache: true,
inputPrice: 0.15, // This is the pricing for prompts above 128k tokens.
outputPrice: 0.6,
cacheReadsPrice: 0.0375,
cacheWritesPrice: 1.0,
tiers: [
{
contextWindow: 128_000,
inputPrice: 0.075,
outputPrice: 0.3,
cacheReadsPrice: 0.01875,
},
{
contextWindow: Infinity,
inputPrice: 0.15,
outputPrice: 0.6,
cacheReadsPrice: 0.0375,
},
],
},
"gemini-1.5-pro-002": {
maxTokens: 8192,
contextWindow: 2_097_152,
supportsImages: true,
supportsPromptCache: false,
inputPrice: 0,
outputPrice: 0,
},
} as const satisfies Record<string, ModelInfo>
1 change: 1 addition & 0 deletions packages/types/src/providers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export * from "./doubao.js"
export * from "./featherless.js"
export * from "./fireworks.js"
export * from "./gemini.js"
export * from "./gemini-cli.js"
export * from "./glama.js"
export * from "./groq.js"
export * from "./huggingface.js"
Expand Down
Loading
Loading