I tested leaving the API keys blank in the .env file, with the following config.yaml:
model:
default: gemini-flash-lite-latest # 默认模型:使用 Gemini 3.1 Flash Lite 的最新滚动版本
provider: google # 提供商:指定使用 Google 官方驱动
base_url: https://generativelanguage.googleapis.com/v1beta # API 地址:使用支持最新模型的 v1beta 接口
credential_pool: # 凭据池:定义一组可以轮换使用的 API Key
gemini: # 针对 gemini 服务的 Key 池
- provider: google # 第 1 个凭据源:指定提供商为 Google
api_key: GEMINI_API_KEY_1 # 第 1 个 API Key 内容
- provider: google # 第 2 个凭据源
api_key: GEMINI_API_KEY_2 # 第 2 个 API Key 内容
- provider: google # 第 3 个凭据源
api_key: GEMINI_API_KEY_3 # 第 3 个 API Key 内容
credential_pool_strategies: # 凭据池策略:定义如何切换上述 Key
gemini: fill_first # 策略方案:优先用死第一个 Key,直到触发 429 限流报错才切换到下一个
providers: {} # 特定提供商配置:目前为空,代表使用全局默认值
fallback_providers: # 备用方案:当凭据池里的所有 Key 都失效时启用的“救命稻草”
- provider: openrouter # 备选 1:通过 OpenRouter 调用
model: z-ai/glm-4.5-air:free # 模型 1:智谱 GLM-4.5 Air 免费版
- provider: openrouter # 备选 2
model: openai/gpt-oss-120b:free # 模型 2:OpenAI 120B 开源免费版
- provider: openrouter # 备选 3
model: openrouter/free # 模型 3:OpenRouter 随机分配的免费模型
However, it resulted in an error during execution. I then tried setting the API keys in the .env file as follows:
.env
GEMINI_API_KEY_1=your_api_key_1_here
GEMINI_API_KEY_2=your_api_key_2_here
GEMINI_API_KEY_3=your_api_key_3_here
But it still failed.
What is your method for multi-account rotation training? How to achieve