diff options
| author | Kujtim Hoxha <[email protected]> | 2025-04-19 15:15:29 +0200 |
|---|---|---|
| committer | Kujtim Hoxha <[email protected]> | 2025-04-21 13:42:29 +0200 |
| commit | 2b5a33e476ae3c6b5c6345777d20792786836dda (patch) | |
| tree | ca22c0a7d6c8f73a21e2b67f31b927b7df187d4d /internal/llm/models | |
| parent | bf8cd3bd128d97cf93fcd1481c37db0e46945fd2 (diff) | |
| download | opencode-2b5a33e476ae3c6b5c6345777d20792786836dda.tar.gz opencode-2b5a33e476ae3c6b5c6345777d20792786836dda.zip | |
lsp improvements
Diffstat (limited to 'internal/llm/models')
| -rw-r--r-- | internal/llm/models/gemini.go | 63 | ||||
| -rw-r--r-- | internal/llm/models/models.go | 5 |
2 files changed, 64 insertions, 4 deletions
diff --git a/internal/llm/models/gemini.go b/internal/llm/models/gemini.go new file mode 100644 index 000000000..00bf7387f --- /dev/null +++ b/internal/llm/models/gemini.go @@ -0,0 +1,63 @@ +package models + +const ( + ProviderGemini ModelProvider = "gemini" + + // Models + Gemini25Flash ModelID = "gemini-2.5-flash" + Gemini25 ModelID = "gemini-2.5" + Gemini20Flash ModelID = "gemini-2.0-flash" + Gemini20FlashLite ModelID = "gemini-2.0-flash-lite" +) + +var GeminiModels = map[ModelID]Model{ + Gemini25Flash: { + ID: Gemini25Flash, + Name: "Gemini 2.5 Flash", + Provider: ProviderGemini, + APIModel: "gemini-2.5-flash-preview-04-17", + CostPer1MIn: 0.15, + CostPer1MInCached: 0, + CostPer1MOutCached: 0, + CostPer1MOut: 0.60, + ContextWindow: 1000000, + DefaultMaxTokens: 50000, + }, + Gemini25: { + ID: Gemini25, + Name: "Gemini 2.5 Pro", + Provider: ProviderGemini, + APIModel: "gemini-2.5-pro-preview-03-25", + CostPer1MIn: 1.25, + CostPer1MInCached: 0, + CostPer1MOutCached: 0, + CostPer1MOut: 10, + ContextWindow: 1000000, + DefaultMaxTokens: 50000, + }, + + Gemini20Flash: { + ID: Gemini20Flash, + Name: "Gemini 2.0 Flash", + Provider: ProviderGemini, + APIModel: "gemini-2.0-flash", + CostPer1MIn: 0.10, + CostPer1MInCached: 0, + CostPer1MOutCached: 0, + CostPer1MOut: 0.40, + ContextWindow: 1000000, + DefaultMaxTokens: 6000, + }, + Gemini20FlashLite: { + ID: Gemini20FlashLite, + Name: "Gemini 2.0 Flash Lite", + Provider: ProviderGemini, + APIModel: "gemini-2.0-flash-lite", + CostPer1MIn: 0.05, + CostPer1MInCached: 0, + CostPer1MOutCached: 0, + CostPer1MOut: 0.30, + ContextWindow: 1000000, + DefaultMaxTokens: 6000, + }, +} diff --git a/internal/llm/models/models.go b/internal/llm/models/models.go index aba4a10c3..cccbd2765 100644 --- a/internal/llm/models/models.go +++ b/internal/llm/models/models.go @@ -23,9 +23,6 @@ type Model struct { // Model IDs const ( // GEMINI - GEMINI25 ModelID = "gemini-2.5" - GRMINI20Flash ModelID = "gemini-2.0-flash" - // GROQ QWENQwq ModelID = "qwen-qwq" @@ -35,7 +32,6 @@ const ( // GEMINI const ( ProviderBedrock ModelProvider = "bedrock" - ProviderGemini ModelProvider = "gemini" ProviderGROQ ModelProvider = "groq" // ForTests @@ -95,4 +91,5 @@ var SupportedModels = map[ModelID]Model{ func init() { maps.Copy(SupportedModels, AnthropicModels) maps.Copy(SupportedModels, OpenAIModels) + maps.Copy(SupportedModels, GeminiModels) } |
