Repository navigation
feat(gemini): 在 VM 页面统一管理宿主账号与专用 API Key - #1173
Merged
Merged
Conversation
Contributor
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 73dd7e2f-0773-4624-8f05-b169c68c6753) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改动
边界
503 gemini_runtime_not_supported,不派单、不扣费;不会将已授权标为运行就绪。验证
Note
Medium Risk
Changes managed-key authorization and public route handling for a new platform scope; inference remains disabled but misconfiguration could confuse operators or block legitimate non-Gemini keys if scope checks regress.
Overview
Introduces an admin-only
geminiAPI key scope so dedicated keys can hit Gemini session/self-service paths only; gateway auth rejects those keys on Claude, Codex, and other inference routes, and/v1/gemini/sessionsstill fails closed withgemini_runtime_not_supported(replacing the prior blanket billing-unavailable behavior).Panel/backend: key normalization forbids VM lists, pools, or API category on Gemini keys; non-admins cannot create or retarget Gemini keys. Gemini keys get an empty
/v1/modelslist.Panel UI: host Gemini environments are mapped into the existing VM rack/table (platform filter, CRAGAnti labeling, proxy display, detail dialog for authorize/refresh) while Import → Gemini stays create-only; key dialogs add Gemini · CRAGAnti with matching client payload validation.
Docs and e2e/unit tests cover the new scope, routing, and UI boundaries (no OAuth inference or billing yet).
Reviewed by Cursor Bugbot for commit e7545f1. Configure here.