Skip to content

Commit 99f6024

Browse files
Add Gemini 2.0 Flash Thinking model support
- Add Google Gemini 2.0 Flash Thinking as an available model - Free tier available with extended thinking capabilities - Add GOOGLE_API_KEY to .env.example for easy setup - Users can get a free API key at https://aistudio.google.com/apikey
1 parent 9099552 commit 99f6024

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

chat-client/.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# API Keys (Optional - can also be set via UI settings)
22
ANTHROPIC_API_KEY=sk-ant-...
33
OPENAI_API_KEY=sk-...
4+
GOOGLE_API_KEY=AIza...

chat-client/ai/providers.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { createOpenAI } from "@ai-sdk/openai";
22
import { createAnthropic } from "@ai-sdk/anthropic";
3+
import { createGoogleGenerativeAI } from "@ai-sdk/google";
34

45
import {
56
customProvider,
@@ -43,12 +44,16 @@ const anthropicClient = createAnthropic({
4344
apiKey: getApiKey('ANTHROPIC_API_KEY'),
4445
});
4546

47+
const googleClient = createGoogleGenerativeAI({
48+
apiKey: getApiKey('GOOGLE_API_KEY'),
49+
});
4650

4751
// const xaiClient = createXai({
4852
// apiKey: getApiKey('XAI_API_KEY'),
4953
// });
5054

5155
const languageModels = {
56+
"gemini-2-flash-thinking": googleClient("gemini-2.0-flash-thinking-exp-01-21"),
5257
"gpt-5": openaiClient("gpt-5-2025-08-07"),
5358
"claude-4-sonnet": anthropicClient('claude-sonnet-4-20250514'),
5459
// "qwen-qwq": wrapLanguageModel(
@@ -61,6 +66,13 @@ const languageModels = {
6166
};
6267

6368
export const modelDetails: Record<keyof typeof languageModels, ModelInfo> = {
69+
"gemini-2-flash-thinking": {
70+
provider: "Google",
71+
name: "Gemini 2.0 Flash Thinking",
72+
description: "Google's reasoning model with extended thinking capabilities. Free tier available.",
73+
apiVersion: "gemini-2.0-flash-thinking-exp-01-21",
74+
capabilities: ["Deep Reasoning", "Thinking", "Free", "Agentic"]
75+
},
6476
"gpt-5": {
6577
provider: "OpenAI",
6678
name: "GPT-5",

0 commit comments

Comments
 (0)