Skip to content

[Feature] AI Gateway: Allow re-viewing and copying existing API Keys instead of showing them only once #13726

Description

@20has

1Panel Version

1.0.1

Please describe your needs or suggestions for improvements

AI Gateway 的 API Keys 管理界面在创建新 API Key 时只显示一次完整密钥,关闭弹窗后即无法再次查看或复制。如果用户当时没有及时复制(剪贴板被覆盖、忘记保存等),唯一的补救方式就是删除该 Key 并重新创建,然后重新配置所有使用旧 Key 的客户端。

对于自托管的网关来说,管理员同时是密钥的创建者和使用者,"只显示一次"的安全模型更适用于云 SaaS 平台(如 OpenAI Platform),在自建场景下增加了不必要的运维负担。

Please describe the solution you suggest

希望 API Keys 管理界面能重新查看或复制已创建的 API Key,具体建议:

  1. 在每个 Key 条目上提供"复制"按钮,点击后将完整 Key 复制到剪贴板
  2. 或者提供"查看"按钮,点击后在弹窗中显示完整 Key 并支持手动复制

参考同类网关产品 new-api / one-api,它们的 API Keys 列表均支持随时查看和复制已有密钥。

Additional Information

对比同类产品:

产品 API Key 创建后可重新查看 可复制
new-api
one-api
OpenAI Platform 否(仅显示一次)
1Panel AI Gateway 否(仅显示一次)

OpenAI Platform 作为云 SaaS 有其安全考量(用户不掌控服务端,密钥泄露风险高);但 1Panel AI Gateway 是自托管网关,管理员对服务端有完全控制权,隐藏已创建密钥的安全收益有限,却明显影响日常使用体验。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions