Spaces:
Sleeping
Sleeping
Commit History
-
fix: surface BardErrorInfo as error instead of silent null content
When Gemini upstream returns BardErrorInfo (e.g. [1060] from Docker bridge networks), the server now returns a proper 502 error with the error code instead of silently returning content: null. Also adds Docker host networking note to README. Closes #249fb5cad
-
fix(security): honor api_keys auth in monolithic gemini_web2api.py
aeonframeworkThe README documents that setting api_keys in config.json gates /v1/* behind Bearer / x-api-key auth. The modular package (gemini_web2api/server.py) implements this via _authorized(). The monolithic script the README's Quick Start runs (`python gemini_web2api.py`) does not — DEFAULT_CONFIG omits api_keys, do_GET / do_POST never check it, so /v1/chat/completions and /v1/responses accept any request regardless of config. Combined with the default host of 0.0.0.0, anyone reachable on the operator's network can use the operator's Google account (and configured cookie) to drive Gemini, with the activity attributed to the operator's IP and Google account. Fix: - Add api_keys: [] to DEFAULT_CONFIG (defaults to no-auth, matches docs). - Add _authorized() to GeminiHandler — same logic as the modular package. - Gate /v1/* in do_GET and do_POST behind _authorized(), returning 401 with {"error": {"message": "invalid api key"}} on rejection. Behavior matches the modular package and the README'…b99e340
-
Support authenticated Gemini account routing
ethansunqing04b9d27
-
merge PR #6: api key auth + docker
8937524 -
Merge remote-tracking branch 'origin/main'
HouYunFei8ae5a8e -
feat(server): 添加 API 密钥认证和 Docker 部署支持
HouYunFei +1: CodexCo-Authored-By: Codex <noreply@openai.com>f39fd46 -
feat: add Google native API support for Gemini CLI compatibility
LiangLliuAdd /v1beta/models endpoints (generateContent, streamGenerateContent) so that Gemini CLI can connect directly via GOOGLE_GEMINI_BASE_URL.f805ec8 -
feat: add proxy support (--proxy / config / env var)
Users behind firewall can now configure HTTP proxy via: - CLI: --proxy http://127.0.0.1:7890 - config.json: {"proxy": "http://..."} - env: HTTPS_PROXY=http://...cda0962 -
init: gemini-web2api v1.0.0
OpenAI-compatible API server for Google Gemini web interface. Zero auth, cross-platform, single file, no dependencies.504aef8