ClaudeMods
☰
ZH-CN
● 0 人在线 · 浏览 0 次
赞助提交作品
教程资源 · 发布者 unknown

Z-GRC:面向 LLM 治理的 Python 库与控制面板,同样适用于命令行工具(Claude Code 等):r/ClaudeCode

Z-GRC 是一款面向 LLM 应用与命令行工具的开源治理、风险与控制引擎。它包含一个拦截 LLM API 调用的 Python 包、一个用于管理用户、用户组、配额与 API 令牌的 Next.js 控制面板,以及代理服务器模式。借助代理模式,Claude Code 等已部署的工具无需修改源代码,就能把 LLM 流量路由过来,实现实时成本控制与拦截。

已翻译

关于这个 mod

该帖子宣布了 Z-GRC(Governance, Risk, Control,治理、风险与控制)。这是团队的首个开源版本,旨在解决 AI 代理、聊天机器人和内部工具项目中反复出现的痛点:意外的成本激增、缺乏实时用量控制、共享的 LLM 凭证无法按用户控制成本,以及无法覆盖 DEV/STAGE 环境。

解决方案包含三个部分:一个 Python 包(z-grc),作为拦截 LLM API 调用的运行时;一个 Next.js 控制面板(z-grc-application),用于创建用户、用户组、配额与 API 令牌,并可视化用量;以及基于 z-grc 包的代理服务器模式,让 Claude Code(Codex 仍在开发中)等已部署的应用,把 LLM 流量路由经过它。简单地说,无需修改源代码,就能控制 Claude Code 的成本。

认证令牌携带经过压缩并加入噪声的负载数据,其中嵌入了用户身份、配置、配额上限、拦截条件以及遥测的目的地。控制面板负责签发这些令牌并保存配置。该包可以在前台或后台以代理服务器模式运行,外部命令行工具无需修改代码、无需等待,即可把 LLM 流量导向它。一旦超过目标成本,就会进行拦截。

链接:仓库 https://github.com/zeb-ai/z-grc,文档 https://zeb-ai.github.io/z-grc-application/

安装

安装方法请查看原始来源。

原文 / README

Title: Z-GRC a Python library & control panel for LLM governance & also applicable for CLIs (claude code, ) : r/ClaudeCode Skip to main contentZ-GRC a Python library & control panel for LLM governance & also applicable for CLIs (claude code, ) : r/ClaudeCode. Open menu Open navigationGo to Reddit Home. # Z-GRC a Python library & control panel for LLM governance & also applicable for CLIs (claude code, ). Hi, My team and I have been building Z-GRC (Governance, Risk, Control) and this is the first time we're sharing a project as open source. Why we built it ?, Across our projects like AI agents, LLM chatbots, internal tools kept facing into the same pain points everytime like, Unexpected cost spikes at unexpected times, with no idea how much had been used until the bill arrived. No way to control usage in real time applications, Shared LLM credentials floating around inside a project or across the whole org, with no per-user cost control and no coverage usage for DEV, STAGE environments. So we started designing what we wished existed, a governance engine you can drop into any application, whether it's actively in development or already shipped with a oneline line or top of the code file that's all we can can control of the cost consumption of that application. A Python package (z-grc):** the runtime that intercepts LLM API calls. A Next.js control panel (z-grc-application): where you create users, user-groups, quotas and API tokens and visualize everything. Proxy Server ( usingz-grc package): where we can control already build application like claude code, codex(WIP) with proxy server. in simple terms we can control cost in Claude code without touching the source code. It carries compressed payload data with noise added and it embeds everything the package needs which user is this, configuration, quota limits, when to block, where to send telemetry, allof it. The control panel (NextJS application) is what mints these tokens that's where the configuration actually lives and that's where the embedding happens. The package can run as a proxy server in foreground or background mode, so external CLI tools route their LLM traffic through it without code changes with no waiting time and blocks when target cost execeeded. - Repo : https://github.com/zeb-ai/z-grc. Z-GRC Application <> Control Panel:. - Docs: https://zeb-ai.github.io/z-grc-application/.

更多类似作品