Skip to content

Commit 05762cb

Browse files
committed
feat(config):更新默认模型和相关配置
更新默认模型和相关配置: - 将默认测试模型从 gemini-1.5-flash 更新为 gemini-2.5-flash-lite - 更新思考模型列表至 gemini-2.5-flash 和 gemini-2.5-pro - 添加新的图像模型 gemini-2.5-flash-image-preview - 更新搜索模型配置以支持最新的 Gemini 2.5 系列 - 同步更新文档中的模型配置说明
1 parent 78f38cc commit 05762cb

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

.env.example

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ AUTH_TOKEN=sk-123456
1414
VERTEX_API_KEYS=["AQ.Abxxxxxxxxxxxxxxxxxxx"]
1515
# For Vertex AI Platform Express API Base URL
1616
VERTEX_EXPRESS_BASE_URL=https://aiplatform.googleapis.com/v1beta1/publishers/google
17-
TEST_MODEL=gemini-1.5-flash
18-
THINKING_MODELS=["gemini-2.5-flash-preview-04-17"]
19-
THINKING_BUDGET_MAP={"gemini-2.5-flash-preview-04-17": 4000}
20-
IMAGE_MODELS=["gemini-2.0-flash-exp"]
21-
SEARCH_MODELS=["gemini-2.0-flash-exp","gemini-2.0-pro-exp"]
17+
TEST_MODEL=gemini-2.5-flash-lite
18+
THINKING_MODELS=["gemini-2.5-flash","gemini-2.5-pro"]
19+
THINKING_BUDGET_MAP={"gemini-2.5-flash": -1}
20+
IMAGE_MODELS=["gemini-2.0-flash-exp", "gemini-2.5-flash-image-preview"]
21+
SEARCH_MODELS=["gemini-2.5-flash","gemini-2.5-pro"]
2222
FILTERED_MODELS=["gemini-1.0-pro-vision-latest", "gemini-pro-vision", "chat-bison-001", "text-bison-001", "embedding-gecko-001"]
2323
# 是否启用网址上下文,默认启用
2424
URL_CONTEXT_ENABLED=false

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,9 @@ This endpoint is directly forwarded to official OpenAI Compatible API format end
184184
| `ALLOWED_TOKENS` | **Required**, list of access tokens | `[]` |
185185
| `AUTH_TOKEN` | Super admin token, defaults to the first of `ALLOWED_TOKENS` | `sk-123456` |
186186
| `ADMIN_SESSION_EXPIRE` | Admin session expiration time in seconds (5 minutes to 24 hours) | `3600` |
187-
| `TEST_MODEL` | Model for testing key validity | `gemini-1.5-flash` |
188-
| `IMAGE_MODELS` | Models supporting image generation | `["gemini-2.0-flash-exp"]` |
189-
| `SEARCH_MODELS` | Models supporting web search | `["gemini-2.0-flash-exp"]` |
187+
| `TEST_MODEL` | Model for testing key validity | `gemini-2.5-flash-lite` |
188+
| `IMAGE_MODELS` | Models supporting image generation | `["gemini-2.0-flash-exp", "gemini-2.5-flash-image-preview"]` |
189+
| `SEARCH_MODELS` | Models supporting web search | `["gemini-2.5-flash","gemini-2.5-pro"]` |
190190
| `FILTERED_MODELS` | Disabled models | `[]` |
191191
| `TOOLS_CODE_EXECUTION_ENABLED` | Enable code execution tool | `false` |
192192
| `SHOW_SEARCH_LINK` | Display search result links in response | `true` |

README_ZH.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,9 @@ app/
184184
| `API_KEYS` | **必填**, Gemini API 密钥列表,用于负载均衡 | `[]` |
185185
| `ALLOWED_TOKENS` | **必填**, 允许访问的 Token 列表 | `[]` |
186186
| `AUTH_TOKEN` | 超级管理员 Token,不填则使用 `ALLOWED_TOKENS` 的第一个 | `sk-123456` |
187-
| `TEST_MODEL` | 用于测试密钥可用性的模型 | `gemini-1.5-flash` |
188-
| `IMAGE_MODELS` | 支持绘图功能的模型列表 | `["gemini-2.0-flash-exp"]` |
189-
| `SEARCH_MODELS` | 支持搜索功能的模型列表 | `["gemini-2.0-flash-exp"]` |
187+
| `TEST_MODEL` | 用于测试密钥可用性的模型 | `gemini-2.5-flash-lite` |
188+
| `IMAGE_MODELS` | 支持绘图功能的模型列表 | `["gemini-2.0-flash-exp", "gemini-2.5-flash-image-preview"]` |
189+
| `SEARCH_MODELS` | 支持搜索功能的模型列表 | `["gemini-2.5-flash","gemini-2.5-pro"]` |
190190
| `FILTERED_MODELS` | 被禁用的模型列表 | `[]` |
191191
| `TOOLS_CODE_EXECUTION_ENABLED` | 是否启用代码执行工具 | `false` |
192192
| `SHOW_SEARCH_LINK` | 是否在响应中显示搜索结果链接 | `true` |

app/config/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ def validate_mysql_config(cls, v: Any, info: ValidationInfo) -> Any:
7373
CUSTOM_HEADERS: Dict[str, str] = {}
7474

7575
# 模型相关配置
76-
SEARCH_MODELS: List[str] = ["gemini-2.0-flash-exp"]
77-
IMAGE_MODELS: List[str] = ["gemini-2.0-flash-exp"]
76+
SEARCH_MODELS: List[str] = ["gemini-2.5-flash", "gemini-2.5-pro"]
77+
IMAGE_MODELS: List[str] = ["gemini-2.0-flash-exp", "gemini-2.5-flash-image-preview"]
7878
FILTERED_MODELS: List[str] = DEFAULT_FILTER_MODELS
7979
TOOLS_CODE_EXECUTION_ENABLED: bool = False
8080
# 是否启用网址上下文

app/core/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
# 模型相关常量
1111
SUPPORTED_ROLES = ["user", "model", "system"]
12-
DEFAULT_MODEL = "gemini-1.5-flash"
12+
DEFAULT_MODEL = "gemini-2.5-flash-lite"
1313
DEFAULT_TEMPERATURE = 0.7
1414
DEFAULT_MAX_TOKENS = 8192
1515
DEFAULT_TOP_P = 0.9

0 commit comments

Comments
 (0)