Skip to content

支持使用与 OpenAI 兼容的默认设置的 GEMINI_API_KEY#357

Open
Microck wants to merge 2 commits intoUsagi-org:masterfrom
Microck:feat/gemini-api-key-support
Open

支持使用与 OpenAI 兼容的默认设置的 GEMINI_API_KEY#357
Microck wants to merge 2 commits intoUsagi-org:masterfrom
Microck:feat/gemini-api-key-support

Conversation

@Microck
Copy link
Contributor

@Microck Microck commented Feb 25, 2026

摘要

  • 在运行时设置中新增 Gemini Key 支持:当未设置 OPENAI_API_KEY 时,应用可使用 GEMINI_API_KEY 运行
  • 在后端配置解析与设置测试流程中,自动应用 Gemini 的 OpenAI 兼容默认值(https://generativelanguage.googleapis.com/v1beta/openai/ + gemini-2.0-flash
  • 更新 Web UI、.env.example 与 README:提供 Gemini Key 输入,并说明回退(fallback)行为

验证

  • uv run pytest tests/unit/test_ai_runtime_config.py
  • python3 -m compileall src
  • web-ui 目录执行 npm run build

@chatgpt-codex-connector
Copy link

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@Microck Microck changed the title Support GEMINI_API_KEY with OpenAI-compatible defaults 支持使用与 OpenAI 兼容的默认设置的 GEMINI_API_KEY Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant