Skip to content
This repository was archived by the owner on Jun 9, 2026. It is now read-only.

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

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

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

Conversation

@Microck

@Microck Microck commented Feb 25, 2026

Copy link
Copy Markdown
Contributor

摘要

  • 在运行时设置中新增 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
Copy Markdown

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant